Port MatrixRoomPreset to C

This commit is contained in:
Gergely Polonkai 2017-11-02 10:06:18 +01:00
parent 62b106511d
commit b69b9d0d89
4 changed files with 26 additions and 26 deletions

View File

@ -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.
*/

View File

@ -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__ */

View File

@ -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.

View File

@ -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.
*/