diff --git a/src/matrix-c-types.c b/src/matrix-c-types.c index 8515961..83ecebd 100644 --- a/src/matrix-c-types.c +++ b/src/matrix-c-types.c @@ -98,3 +98,11 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error); * * User account types. */ + +/** + * MatrixEventDirection: + * @MATRIX_EVENT_DIRECTION_FORWARD: list events after the specified one + * @MATRIX_EVENT_DIRECTION_BACKWARD: list events before the specified one + * + * Direction of events when requesting an event context. + */ diff --git a/src/matrix-c-types.h b/src/matrix-c-types.h index 9f12328..1d07209 100644 --- a/src/matrix-c-types.h +++ b/src/matrix-c-types.h @@ -80,4 +80,9 @@ typedef enum { MATRIX_ACCOUNT_KIND_GUEST } MatrixAccountKind; +typedef enum { + MATRIX_EVENT_DIRECTION_FORWARD, + MATRIX_EVENT_DIRECTION_BACKWARD +} MatrixEventDirection; + #endif /* __MATRIX_TYPE_H__ */ diff --git a/src/matrix-types.vala b/src/matrix-types.vala index 0b6b6e0..24428f3 100644 --- a/src/matrix-types.vala +++ b/src/matrix-types.vala @@ -17,21 +17,6 @@ */ namespace Matrix { - /** - * Direction of events when requesting an event context. - */ - public enum EventDirection { - /** - * list events after the specified one - */ - FORWARD, - - /** - * list events before the specified one - */ - BACKWARD; - } - /** * Event format received when synchronizing. */ diff --git a/vapi/c-api.vapi b/vapi/c-api.vapi index 6b1f903..59b1bcd 100644 --- a/vapi/c-api.vapi +++ b/vapi/c-api.vapi @@ -71,6 +71,12 @@ namespace Matrix { GUEST; } + [CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_EVENT_DIRECTION_")] + public enum EventDirection { + FORWARD, + BACKWARD; + } + /** * The major version number of the Matrix.org GLib SDK. */