Port MatrixSearchOrder to C

This commit is contained in:
Gergely Polonkai 2017-11-02 10:15:36 +01:00
parent 76d68d5c7b
commit 5c3911e6fb
4 changed files with 19 additions and 15 deletions

View File

@ -220,3 +220,11 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error);
* *
* Room join rules. * Room join rules.
*/ */
/**
* MatrixSearchOrder:
* @MATRIX_SEARCH_ORDER_RECENT: order messages as they arrived
* @MATRIX_SEARCH_ORDER_RANK: order messages by relevance
*
* Search ordering.
*/

View File

@ -154,4 +154,9 @@ typedef enum {
MATRIX_JOIN_RULES_KNOCK MATRIX_JOIN_RULES_KNOCK
} MatrixJoinRules; } MatrixJoinRules;
typedef enum {
MATRIX_SEARCH_ORDER_RECENT,
MATRIX_SEARCH_ORDER_RANK
} MatrixSearchOrder;
#endif /* __MATRIX_TYPE_H__ */ #endif /* __MATRIX_TYPE_H__ */

View File

@ -17,21 +17,6 @@
*/ */
namespace Matrix { namespace Matrix {
/**
* Search ordering.
*/
public enum SearchOrder {
/**
* order messages as they arrived
*/
RECENT,
/**
* order messages by relevance
*/
RANK;
}
/** /**
* Search keys. * Search keys.
*/ */

View File

@ -156,6 +156,12 @@ namespace Matrix {
KNOCK; KNOCK;
} }
[CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_SEARCH_ORDER_")]
public enum SearchOrder {
RECENT,
RANK;
}
/** /**
* The major version number of the Matrix.org GLib SDK. * The major version number of the Matrix.org GLib SDK.
*/ */