Port MatrixSearchKey to C

This commit is contained in:
Gergely Polonkai 2017-11-02 10:18:46 +01:00
parent 5c3911e6fb
commit 80e61b8f93
4 changed files with 22 additions and 20 deletions

View File

@ -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.
*/

View File

@ -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__ */

View File

@ -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
*

View File

@ -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.
*/