From afbaff4a4beebaa30376b21ca171cfdcd7e8bfea Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Thu, 3 Mar 2016 14:22:00 +0100 Subject: [PATCH] Move the PusherKind enum to Vala --- src/c-api.vapi | 9 --------- src/matrix-enums.vala | 11 +++++++++++ src/matrix-types.c | 17 ----------------- src/matrix-types.h | 8 -------- 4 files changed, 11 insertions(+), 34 deletions(-) diff --git a/src/c-api.vapi b/src/c-api.vapi index 94ba4f4..7b3aa6c 100644 --- a/src/c-api.vapi +++ b/src/c-api.vapi @@ -41,15 +41,6 @@ namespace Matrix { public static GLib.Quark quark (); } - [CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_PUSHER_KIND_")] - public enum PusherKind { - OVERRIDE, - SENDER, - ROOM, - CONTENT, - UNDERRIDE; - } - [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 3632d96..6a994a4 100644 --- a/src/matrix-enums.vala +++ b/src/matrix-enums.vala @@ -65,6 +65,17 @@ namespace Matrix { 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 {{{==}}} } + /** + * Pusher types. + */ + public enum PusherKind { + OVERRIDE, /// highest priority rules + SENDER, /// for (unencrypted) messages that match certain patterns + ROOM, /// for all messages for a given room. The rule ID of a room rule is always the ID of the room that it affects + CONTENT, /// for messages from a specific Matrix user ID. The rule ID of such rules is always the Matrix ID of the user whose messages they'd apply to + UNDERRIDE; /// lowest priority rules + } + /** * Resizing methods for matrix_api_media_thumbnail(). */ diff --git a/src/matrix-types.c b/src/matrix-types.c index cf3c8e7..dd6bfcb 100644 --- a/src/matrix-types.c +++ b/src/matrix-types.c @@ -135,23 +135,6 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error); * rules. */ -/** - * MatrixPusherKind: - * @MATRIX_PUSHER_KIND_OVERRIDE: highest priority rules - * @MATRIX_PUSHER_KIND_SENDER: for (unencrypted) messages that match - * certain patterns - * @MATRIX_PUSHER_KIND_ROOM: for all messages for a given room. The - * rule ID of a room rule is always the ID - * of the room that it affects - * @MATRIX_PUSHER_KIND_CONTENT: for messages from a specific Matrix - * user ID. The rule ID of such rules is - * always the Matrix ID of the user whose - * messages they'd apply to - * @MATRIX_PUSHER_KIND_UNDERRIDE: lowest priority rules - * - * Pusher types. - */ - /** * 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 72a8732..ff24b14 100644 --- a/src/matrix-types.h +++ b/src/matrix-types.h @@ -89,14 +89,6 @@ typedef enum { MATRIX_RECEIPT_TYPE_READ } MatrixReceiptType; -typedef enum { - MATRIX_PUSHER_KIND_OVERRIDE, - MATRIX_PUSHER_KIND_SENDER, - MATRIX_PUSHER_KIND_ROOM, - MATRIX_PUSHER_KIND_CONTENT, - MATRIX_PUSHER_KIND_UNDERRIDE -} MatrixPusherKind; - typedef struct _MatrixStateEvent MatrixStateEvent; GType matrix_state_event_get_type(void);