diff --git a/src/matrix-c-types.c b/src/matrix-c-types.c index ac7fa77..66df662 100644 --- a/src/matrix-c-types.c +++ b/src/matrix-c-types.c @@ -267,3 +267,12 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error); * * 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 + */ diff --git a/src/matrix-c-types.h b/src/matrix-c-types.h index ef57f01..97ae244 100644 --- a/src/matrix-c-types.h +++ b/src/matrix-c-types.h @@ -179,4 +179,10 @@ typedef enum { MATRIX_HISTORY_VISIBILITY_WORLD_READABLE } MatrixHistoryVisibility; +typedef enum { + MATRIX_GUEST_ACCESS_UNKNOWN, + MATRIX_GUEST_ACCESS_CAN_JOIN, + MATRIX_GUEST_ACCESS_FORBIDDEN +} MatrixGuestAccess; + #endif /* __MATRIX_TYPE_H__ */ diff --git a/src/matrix-types.vala b/src/matrix-types.vala index 15c1af3..3a038f1 100644 --- a/src/matrix-types.vala +++ b/src/matrix-types.vala @@ -17,26 +17,6 @@ */ 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 */ diff --git a/vapi/c-api.vapi b/vapi/c-api.vapi index 641dfcb..5518888 100644 --- a/vapi/c-api.vapi +++ b/vapi/c-api.vapi @@ -185,6 +185,13 @@ namespace Matrix { 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. */