diff --git a/src/matrix-c-types.c b/src/matrix-c-types.c index 6fe14c7..0be7c27 100644 --- a/src/matrix-c-types.c +++ b/src/matrix-c-types.c @@ -228,3 +228,12 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error); * * Search ordering. */ + +/** + * MatrixSearchKey: + * @MATRIX_SEARCH_KEY_CONTENT_BODY: search in the body of a message + * @MATRIX_SEARCH_KEY_CONTENT_NAME: search in the name of rooms + * @MATRIX_SEARCH_KEY_CONTENT_TOPIC: search in the topic of rooms + * + * Search keys. + */ diff --git a/src/matrix-c-types.h b/src/matrix-c-types.h index 63a4fb6..c3f49fe 100644 --- a/src/matrix-c-types.h +++ b/src/matrix-c-types.h @@ -159,4 +159,10 @@ typedef enum { MATRIX_SEARCH_ORDER_RANK } MatrixSearchOrder; +typedef enum { + MATRIX_SEARCH_KEY_CONTENT_BODY, + MATRIX_SEARCH_KEY_CONTENT_NAME, + MATRIX_SEARCH_KEY_CONTENT_TOPIC +} MatrixSearchKey; + #endif /* __MATRIX_TYPE_H__ */ diff --git a/src/matrix-types.vala b/src/matrix-types.vala index b0d765d..93edd99 100644 --- a/src/matrix-types.vala +++ b/src/matrix-types.vala @@ -17,26 +17,6 @@ */ namespace Matrix { - /** - * Search keys. - */ - public enum SearchKey { - /** - * search in the body of a message - */ - CONTENT_BODY, - - /** - * search in the name of rooms - */ - CONTENT_NAME, - - /** - * search in the topic of rooms - */ - CONTENT_TOPIC; - } - /** * Search grouping * diff --git a/vapi/c-api.vapi b/vapi/c-api.vapi index bf3f72c..6d8bba6 100644 --- a/vapi/c-api.vapi +++ b/vapi/c-api.vapi @@ -162,6 +162,13 @@ namespace Matrix { RANK; } + [CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_SEARCH_KEY_")] + public enum SearchKey { + CONTENT_BODY, + CONTENT_NAME, + CONTENT_TOPIC; + } + /** * The major version number of the Matrix.org GLib SDK. */