Port MatrixGuestAccess to C

This commit is contained in:
Gergely Polonkai 2017-11-02 11:41:02 +01:00
parent 1f0fdb79e3
commit 49b466f67e
4 changed files with 22 additions and 20 deletions

View File

@ -267,3 +267,12 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error);
* *
* Room history visibility * Room history visibility
*/ */
/**
* MatrixGuestAccess:
* @MATRIX_GUEST_ACCESS_UNKNOWN: represents a value unknown to this library
* @MATRIX_GUEST_ACCESS_CAN_JOIN: guest users are allowed to access the room
* @MATRIX_GUEST_ACCESS_FORBIDDEN: guest users are not allowed to access the room
*
* Room guest access
*/

View File

@ -179,4 +179,10 @@ typedef enum {
MATRIX_HISTORY_VISIBILITY_WORLD_READABLE MATRIX_HISTORY_VISIBILITY_WORLD_READABLE
} MatrixHistoryVisibility; } MatrixHistoryVisibility;
typedef enum {
MATRIX_GUEST_ACCESS_UNKNOWN,
MATRIX_GUEST_ACCESS_CAN_JOIN,
MATRIX_GUEST_ACCESS_FORBIDDEN
} MatrixGuestAccess;
#endif /* __MATRIX_TYPE_H__ */ #endif /* __MATRIX_TYPE_H__ */

View File

@ -17,26 +17,6 @@
*/ */
namespace Matrix { namespace Matrix {
/**
* Room guest access
*/
public enum GuestAccess {
/**
* represents a value unknown to this library
*/
UNKNOWN,
/**
* guest users are allowed to access the room
*/
CAN_JOIN,
/**
* guest users are not allowed to access the room
*/
FORBIDDEN;
}
/** /**
* Call offer types * Call offer types
*/ */

View File

@ -185,6 +185,13 @@ namespace Matrix {
WORLD_READABLE; WORLD_READABLE;
} }
[CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_GUEST_ACCESS_")]
public enum GuestAccess {
UNKNOWN,
CAN_JOIN,
FORBIDDEN;
}
/** /**
* The major version number of the Matrix.org GLib SDK. * The major version number of the Matrix.org GLib SDK.
*/ */