diff --git a/src/matrix-c-types.c b/src/matrix-c-types.c index f16475d..99aaf46 100644 --- a/src/matrix-c-types.c +++ b/src/matrix-c-types.c @@ -188,3 +188,14 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error); * * Room membership types. */ + +/** + * MatrixRoomPreset: + * @MATRIX_ROOM_PRESET_NONE: no preset + * @MATRIX_ROOM_PRESET_PRIVATE: preset for private rooms + * @MATRIX_ROOM_PRESET_TRUSTED_PRIVATE: same as private rooms, but all users get the same power + * level as the room creator + * @MATRIX_ROOM_PRESET_PUBLIC: preset for public rooms + * + * Preset values for matrix_api_create_room() calls. + */ diff --git a/src/matrix-c-types.h b/src/matrix-c-types.h index 1055dcc..cd8c75e 100644 --- a/src/matrix-c-types.h +++ b/src/matrix-c-types.h @@ -133,4 +133,11 @@ typedef enum { MATRIX_ROOM_MEMBERSHIP_KNOCK } MatrixRoomMembership; +typedef enum { + MATRIX_ROOM_PRESET_NONE, + MATRIX_ROOM_PRESET_PRIVATE, + MATRIX_ROOM_PRESET_TRUSTED_PRIVATE, + MATRIX_ROOM_PRESET_PUBLIC +} MatrixRoomPreset; + #endif /* __MATRIX_TYPE_H__ */ diff --git a/src/matrix-types.vala b/src/matrix-types.vala index 17c0210..0ced692 100644 --- a/src/matrix-types.vala +++ b/src/matrix-types.vala @@ -17,32 +17,6 @@ */ namespace Matrix { - /** - * Preset values for matrix_api_create_room() calls. - */ - public enum RoomPreset { - /** - * no preset - */ - NONE, - - /** - * preset for private rooms - */ - PRIVATE, - - /** - * same as private rooms, but all users get the same power - * level as the room creator - */ - TRUSTED_PRIVATE, - - /** - * preset for public rooms - */ - PUBLIC; - } - /** * Visibility values for room creation. Not to be confused with * join rules. diff --git a/vapi/c-api.vapi b/vapi/c-api.vapi index d578628..b60e8b1 100644 --- a/vapi/c-api.vapi +++ b/vapi/c-api.vapi @@ -132,6 +132,14 @@ namespace Matrix { KNOCK; } + [CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_ROOM_PRESET_")] + public enum RoomPreset { + NONE, + PRIVATE, + TRUSTED_PRIVATE, + PUBLIC; + } + /** * The major version number of the Matrix.org GLib SDK. */