Port MatrixEventFormat to C

This commit is contained in:
Gergely Polonkai 2017-11-02 09:30:04 +01:00
parent 94c49193c8
commit 25f809d37e
4 changed files with 23 additions and 22 deletions

View File

@ -106,3 +106,13 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error);
*
* Direction of events when requesting an event context.
*/
/**
* MatrixEventFormat:
* @MATRIX_EVENT_FORMAT_DEFAULT: event format will be omitted from the filter, so the server
* will use its default (usually #MATRIX_EVENT_FORMAT_FEDERATION)
* @MATRIX_EVENT_FORMAT_CLIENT: return the events in a format suitable for clients
* @MATRIX_EVENT_FORMAT_FEDERATION: return the raw event as receieved over federation
*
* Event format received when synchronizing.
*/

View File

@ -85,4 +85,10 @@ typedef enum {
MATRIX_EVENT_DIRECTION_BACKWARD
} MatrixEventDirection;
typedef enum {
MATRIX_EVENT_FORMAT_DEFAULT,
MATRIX_EVENT_FORMAT_CLIENT,
MATRIX_EVENT_FORMAT_FEDERATION
} MatrixEventFormat;
#endif /* __MATRIX_TYPE_H__ */

View File

@ -17,28 +17,6 @@
*/
namespace Matrix {
/**
* Event format received when synchronizing.
*/
public enum EventFormat {
/**
* event format will be omitted from the filter, so the server
* will use its default (usually
* {@link Matrix.EventFormat.FEDERATION})
*/
DEFAULT,
/**
* return the events in a format suitable for clients
*/
CLIENT,
/**
* return the raw event as receieved over federation
*/
FEDERATION;
}
/**
* Presence values for matrix_api_set_user_presence() and other
* presence related queries.

View File

@ -77,6 +77,13 @@ namespace Matrix {
BACKWARD;
}
[CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_EVENT_FORMAT_")]
public enum EventFormat {
DEFAULT,
CLIENT,
FEDERATION;
}
/**
* The major version number of the Matrix.org GLib SDK.
*/