Move the RoomPreset enum to Vala

This commit is contained in:
Gergely Polonkai 2016-03-03 14:26:15 +01:00
parent f9542d2f0c
commit ddf4c9de73
4 changed files with 10 additions and 27 deletions

View File

@ -41,14 +41,6 @@ namespace Matrix {
public static GLib.Quark quark (); public static GLib.Quark quark ();
} }
[CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_ROOM_PRESET_")]
public enum RoomPreset {
NONE,
PRIVATE,
TRUSTED_PRIVATE,
PUBLIC;
}
[CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_ROOM_VISIBILITY_")] [CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_ROOM_VISIBILITY_")]
public enum RoomVisibility { public enum RoomVisibility {
DEFAULT, DEFAULT,

View File

@ -92,6 +92,16 @@ namespace Matrix {
SCALE; /// scale thumbnail to the requested size SCALE; /// scale thumbnail to the requested size
} }
/**
* Preset values for matrix_api_create_room() calls.
*/
public enum RoomPreset {
NONE, /// no preset
PRIVATE, /// preset for private rooms
TRUSTED_PRIVATE, /// same as private rooms, but all users get the same power level as the room creator
PUBLIC; /// preset for public rooms
}
private int? private int?
_g_enum_nick_to_value(Type enum_type, string nick) _g_enum_nick_to_value(Type enum_type, string nick)
{ {

View File

@ -110,18 +110,6 @@
*/ */
G_DEFINE_QUARK(matrix-error-quark, matrix_error); G_DEFINE_QUARK(matrix-error-quark, matrix_error);
/**
* 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.
*/
/** /**
* MatrixRoomVisibility: * MatrixRoomVisibility:
* @MATRIX_ROOM_VISIBILITY_DEFAULT: use a server-assigned value * @MATRIX_ROOM_VISIBILITY_DEFAULT: use a server-assigned value

View File

@ -72,13 +72,6 @@ typedef enum {
#define MATRIX_ERROR matrix_error_quark() #define MATRIX_ERROR matrix_error_quark()
GQuark matrix_error_quark(void); GQuark matrix_error_quark(void);
typedef enum {
MATRIX_ROOM_PRESET_NONE,
MATRIX_ROOM_PRESET_PRIVATE,
MATRIX_ROOM_PRESET_TRUSTED_PRIVATE,
MATRIX_ROOM_PRESET_PUBLIC
} MatrixRoomPreset;
typedef enum { typedef enum {
MATRIX_ROOM_VISIBILITY_DEFAULT, MATRIX_ROOM_VISIBILITY_DEFAULT,
MATRIX_ROOM_VISIBILITY_PUBLIC, MATRIX_ROOM_VISIBILITY_PUBLIC,