From 6f540e46525b68394ecc4939bedba3d2cbd0222a Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Thu, 3 Mar 2016 12:34:30 +0100 Subject: [PATCH] Move the EventFormat enum to Vala --- src/c-api.vapi | 7 ------- src/matrix-enums.vala | 9 +++++++++ src/matrix-types.c | 14 -------------- src/matrix-types.h | 6 ------ 4 files changed, 9 insertions(+), 27 deletions(-) diff --git a/src/c-api.vapi b/src/c-api.vapi index fef85d4..bf67fe9 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_EVENT_FORMAT_")] - public enum EventFormat { - DEFAULT, - CLIENT, - FEDERATION - } - [CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_RESIZE_METHOD_")] public enum ResizeMethod { DEFAULT, diff --git a/src/matrix-enums.vala b/src/matrix-enums.vala index 2e4591d..8638696 100644 --- a/src/matrix-enums.vala +++ b/src/matrix-enums.vala @@ -17,6 +17,15 @@ */ namespace Matrix { + /** + * Event format received when synchronizing. + */ + public enum EventFormat { + DEFAULT, /// event format will be omitted from the filter, so the server will use its default (usually {{{FEDERATION}}}) + CLIENT, /// return the events in a format suitable for clients + FEDERATION; /// return the raw event as receieved over federation + } + public string? _g_enum_value_to_nick(Type enum_type, int value, diff --git a/src/matrix-types.c b/src/matrix-types.c index d4f9a11..3d0ada9 100644 --- a/src/matrix-types.c +++ b/src/matrix-types.c @@ -111,20 +111,6 @@ */ G_DEFINE_QUARK(matrix-error-quark, matrix_error); -/** - * MatrixEventFormat: - * @MATRIX_EVENT_FORMAT_DEFAULT: event format will be omitted from the - * filter, so the server will use its - * default (usually - * @MATRIX_EVENT_FORMAT_FEDERATION) - * @MATRIX_EVENT_FORMAT_CLIENT: return the events in a format suitable - * for clients - * @MATRIX_EVENT_FORMAT_FEDERATION: return the raw event as receieved - * over federation - * - * Event format received when synchronizing. - */ - /** * MatrixRoomPreset: * @MATRIX_ROOM_PRESET_NONE: no preset diff --git a/src/matrix-types.h b/src/matrix-types.h index 13c060b..c06b8ef 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_EVENT_FORMAT_DEFAULT, - MATRIX_EVENT_FORMAT_CLIENT, - MATRIX_EVENT_FORMAT_FEDERATION -} MatrixEventFormat; - typedef enum { MATRIX_RESIZE_METHOD_DEFAULT, MATRIX_RESIZE_METHOD_CROP,