Port MatrixPusherConditionKind to C
This commit is contained in:
		| @@ -127,3 +127,18 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error); | ||||
|  * | ||||
|  * Presence values for matrix_api_set_presence() and other presence related queries. | ||||
|  */ | ||||
|  | ||||
| /** | ||||
|  * MatrixPusherConditionKind: | ||||
|  * @MATRIX_PUSHER_CONDITION_KIND_EVENT_MATCH: glob pattern match on a field of the event. | ||||
|  *     Requires a `key` and a `pattern` parameter | ||||
|  * @MATRIX_PUSHER_CONDITION_KIND_PROFILE_TAG: matches the profile tag of the device that the | ||||
|  *     notification would be delivered to.  Requires a `profile_tag` parameter | ||||
|  * @MATRIX_PUSHER_CONDITION_KIND_CONTAINS_DISPLAY_NAME: matches unencrypted messages where the | ||||
|  *     content's body contains the owner's display name in that room. | ||||
|  * @MATRIX_PUSHER_CONDITION_KIND_ROOM_MEMBER_COUNT: matches the current number of members in the | ||||
|  *     room.  Requires an `is` parameter, which must be an integer, optionally prefixed by `==`, | ||||
|  *     `<`, `>`, `<=` or `>=`.  If the prefix is omitted, it defaults to `==` | ||||
|  * | ||||
|  * Condition types for pushers. | ||||
|  */ | ||||
|   | ||||
| @@ -99,4 +99,11 @@ typedef enum { | ||||
|     MATRIX_PRESENCE_FREE_FOR_CHAT | ||||
| } MatrixPresence; | ||||
|  | ||||
| typedef enum { | ||||
|     MATRIX_PUSHER_CONDITION_KIND_EVENT_MATCH, | ||||
|     MATRIX_PUSHER_CONDITION_KIND_PROFILE_TAG, | ||||
|     MATRIX_PUSHER_CONDITION_KIND_CONTAINS_DISPLAY_NAME, | ||||
|     MATRIX_PUSHER_CONDITION_KIND_ROOM_MEMBER_COUNT | ||||
| } MatrixPusherConditionKind; | ||||
|  | ||||
| #endif  /* __MATRIX_TYPE_H__ */ | ||||
|   | ||||
| @@ -17,38 +17,6 @@ | ||||
|  */ | ||||
|  | ||||
| namespace Matrix { | ||||
|     /** | ||||
|      * Condition types for pushers. | ||||
|      */ | ||||
|     public enum PusherConditionKind { | ||||
|         /** | ||||
|          * glob pattern match on a field of the event. Requires a | ||||
|          * {{{key}}} and a {{{pattern}}} parameter | ||||
|          */ | ||||
|         EVENT_MATCH, | ||||
|  | ||||
|         /** | ||||
|          * matches the profile tag of the device that the notification | ||||
|          * would be delivered to. Requires a {{{profile_tag}}} | ||||
|          * parameter | ||||
|          */ | ||||
|         PROFILE_TAG, | ||||
|  | ||||
|         /** | ||||
|          * matches unencrypted messages where the content's body | ||||
|          * contains the owner's display name in that room. | ||||
|          */ | ||||
|         CONTAINS_DISPLAY_NAME, | ||||
|  | ||||
|         /** | ||||
|          * matches the current number of members in the room. Requires | ||||
|          * an {{{is}}} parameter, which must be an integer, optionally | ||||
|          * prefixed by {{{==}}}, {{{<}}}, {{{>}}}, {{{<=}}} or | ||||
|          * {{{>=}}}. If the prefix is omitted, it defaults to {{{==}}} | ||||
|          */ | ||||
|         ROOM_MEMBER_COUNT; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Pusher types. | ||||
|      */ | ||||
|   | ||||
| @@ -93,6 +93,14 @@ namespace Matrix { | ||||
|         FREE_FOR_CHAT; | ||||
|     } | ||||
|  | ||||
|     [CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_PUSHER_CONDITION_KIND_")] | ||||
|     public enum PusherConditionKind { | ||||
|         EVENT_MATCH, | ||||
|         PROFILE_TAG, | ||||
|         CONTAINS_DISPLAY_NAME, | ||||
|         ROOM_MEMBER_COUNT; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * The major version number of the Matrix.org GLib SDK. | ||||
|      */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user