Move the RoomVisibility enum to Vala

This commit is contained in:
Gergely Polonkai 2016-03-03 14:28:22 +01:00
parent ddf4c9de73
commit 6bf5515693
4 changed files with 10 additions and 26 deletions

View File

@ -41,13 +41,6 @@ namespace Matrix {
public static GLib.Quark quark ();
}
[CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_ROOM_VISIBILITY_")]
public enum RoomVisibility {
DEFAULT,
PUBLIC,
PRIVATE;
}
[CCode (cheader_filename = "matrix-types.h")]
public class StateEvent {
public Json.Node? get_json_node();

View File

@ -102,6 +102,16 @@ namespace Matrix {
PUBLIC; /// preset for public rooms
}
/**
* Visibility values for room creation. Not to be confused with
* join rules.
*/
public enum RoomVisibility {
DEFAULT, /// use a server-assigned value (usually {{{private}}}
PUBLIC, /// make the room visible in the public room list
PRIVATE; /// hide the room from the public room list
}
private int?
_g_enum_nick_to_value(Type enum_type, string nick)
{

View File

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

View File

@ -72,12 +72,6 @@ typedef enum {
#define MATRIX_ERROR matrix_error_quark()
GQuark matrix_error_quark(void);
typedef enum {
MATRIX_ROOM_VISIBILITY_DEFAULT,
MATRIX_ROOM_VISIBILITY_PUBLIC,
MATRIX_ROOM_VISIBILITY_PRIVATE
} MatrixRoomVisibility;
typedef struct _MatrixStateEvent MatrixStateEvent;
GType matrix_state_event_get_type(void);