From 6bf55156933ce5b39870e4615eb1c127abbbba3f Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Thu, 3 Mar 2016 14:28:22 +0100 Subject: [PATCH] Move the RoomVisibility enum to Vala --- src/c-api.vapi | 7 ------- src/matrix-enums.vala | 10 ++++++++++ src/matrix-types.c | 13 ------------- src/matrix-types.h | 6 ------ 4 files changed, 10 insertions(+), 26 deletions(-) diff --git a/src/c-api.vapi b/src/c-api.vapi index 37681fd..a45258c 100644 --- a/src/c-api.vapi +++ b/src/c-api.vapi @@ -41,13 +41,6 @@ namespace Matrix { public static GLib.Quark quark (); } - [CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_ROOM_VISIBILITY_")] - public enum RoomVisibility { - DEFAULT, - PUBLIC, - PRIVATE; - } - [CCode (cheader_filename = "matrix-types.h")] public class StateEvent { public Json.Node? get_json_node(); diff --git a/src/matrix-enums.vala b/src/matrix-enums.vala index 6a990db..4e050a9 100644 --- a/src/matrix-enums.vala +++ b/src/matrix-enums.vala @@ -102,6 +102,16 @@ namespace Matrix { PUBLIC; /// preset for public rooms } + /** + * Visibility values for room creation. Not to be confused with + * join rules. + */ + public enum RoomVisibility { + DEFAULT, /// use a server-assigned value (usually {{{private}}} + PUBLIC, /// make the room visible in the public room list + PRIVATE; /// hide the room from the public room list + } + private int? _g_enum_nick_to_value(Type enum_type, string nick) { diff --git a/src/matrix-types.c b/src/matrix-types.c index 9b2c96c..491d21e 100644 --- a/src/matrix-types.c +++ b/src/matrix-types.c @@ -110,19 +110,6 @@ */ G_DEFINE_QUARK(matrix-error-quark, matrix_error); -/** - * MatrixRoomVisibility: - * @MATRIX_ROOM_VISIBILITY_DEFAULT: use a server-assigned value - * (usually private - * @MATRIX_ROOM_VISIBILITY_PUBLIC: make the room visible in the public - * room list - * @MATRIX_ROOM_VISIBILITY_PRIVATE: hide the room from the public room - * list - * - * Visibility values for room creation. Not to be confused with join - * rules. - */ - /** * MatrixStateEvent: * diff --git a/src/matrix-types.h b/src/matrix-types.h index 3a2a066..9007d2a 100644 --- a/src/matrix-types.h +++ b/src/matrix-types.h @@ -72,12 +72,6 @@ typedef enum { #define MATRIX_ERROR matrix_error_quark() GQuark matrix_error_quark(void); -typedef enum { - MATRIX_ROOM_VISIBILITY_DEFAULT, - MATRIX_ROOM_VISIBILITY_PUBLIC, - MATRIX_ROOM_VISIBILITY_PRIVATE -} MatrixRoomVisibility; - typedef struct _MatrixStateEvent MatrixStateEvent; GType matrix_state_event_get_type(void);