diff --git a/src/c-api.vapi b/src/c-api.vapi index 2cfb2e4..94ba4f4 100644 --- a/src/c-api.vapi +++ b/src/c-api.vapi @@ -50,14 +50,6 @@ namespace Matrix { UNDERRIDE; } - [CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_PUSHER_CONDITION_KIND_")] - public enum PusherConditionKind { - EVENT_MATCH, - PROFILE_TAG, - CONTAINS_DISPLAY_NAME, - ROOM_MEMBER_COUNT; - } - [CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_ROOM_PRESET_")] public enum RoomPreset { NONE, diff --git a/src/matrix-enums.vala b/src/matrix-enums.vala index ddedc68..3632d96 100644 --- a/src/matrix-enums.vala +++ b/src/matrix-enums.vala @@ -55,6 +55,16 @@ namespace Matrix { FREE_FOR_CHAT; /// user is free for chat } + /** + * Condition types for pushers. + */ + public enum PusherConditionKind { + EVENT_MATCH, /// glob pattern match on a field of the event. Requires a {{{key}}} and a {{{pattern}}} parameter + PROFILE_TAG, /// matches the profile tag of the device that the notification would be delivered to. Requires a {{{profile_tag}}} parameter + CONTAINS_DISPLAY_NAME, /// matches unencrypted messages where the content's body contains the owner's display name in that room. + 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 {{{==}}} + } + /** * Resizing methods for matrix_api_media_thumbnail(). */ diff --git a/src/matrix-types.c b/src/matrix-types.c index bb7451b..cf3c8e7 100644 --- a/src/matrix-types.c +++ b/src/matrix-types.c @@ -152,52 +152,6 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error); * Pusher types. */ -/** - * 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. - */ - /** * MatrixReceiptType: * @MATRIX_RECEIPT_TYPE_READ: indicate that the message has been read diff --git a/src/matrix-types.h b/src/matrix-types.h index ca7a5db..72a8732 100644 --- a/src/matrix-types.h +++ b/src/matrix-types.h @@ -97,13 +97,6 @@ typedef enum { MATRIX_PUSHER_KIND_UNDERRIDE } MatrixPusherKind; -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; - typedef struct _MatrixStateEvent MatrixStateEvent; GType matrix_state_event_get_type(void);