Port MatrixRoomVisibility to C

This commit is contained in:
Gergely Polonkai 2017-11-02 10:09:18 +01:00
parent b69b9d0d89
commit 6b8f2fe22c
4 changed files with 23 additions and 22 deletions

View File

@ -199,3 +199,13 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error);
*
* Preset values for matrix_api_create_room() calls.
*/
/**
* MatrixRoomVisibility:
* @MATRIX_ROOM_VISIBILITY_DEFAULT: use a server-assigned value (usually
* #MATRIX_ROOM_VISIBILITY_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.
*/

View File

@ -140,4 +140,10 @@ typedef enum {
MATRIX_ROOM_PRESET_PUBLIC
} MatrixRoomPreset;
typedef enum {
MATRIX_ROOM_VISIBILITY_DEFAULT,
MATRIX_ROOM_VISIBILITY_PUBLIC,
MATRIX_ROOM_VISIBILITY_PRIVATE
} MatrixRoomVisibility;
#endif /* __MATRIX_TYPE_H__ */

View File

@ -17,28 +17,6 @@
*/
namespace Matrix {
/**
* Visibility values for room creation. Not to be confused with
* join rules.
*/
public enum RoomVisibility {
/**
* use a server-assigned value (usually
* {@link Matrix.RoomVisibility.PRIVATE})
*/
DEFAULT,
/**
* make the room visible in the public room list
*/
PUBLIC,
/**
* hide the room from the public room list
*/
PRIVATE;
}
/**
* Room join rules.
*/

View File

@ -140,6 +140,13 @@ namespace Matrix {
PUBLIC;
}
[CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_ROOM_VISIBILITY_")]
public enum RoomVisibility {
DEFAULT,
PUBLIC,
PRIVATE;
}
/**
* The major version number of the Matrix.org GLib SDK.
*/