Port MatrixPusherKind to C

This commit is contained in:
Gergely Polonkai 2017-11-02 09:47:59 +01:00
parent c91035dbd0
commit c8fe8e1ebb
4 changed files with 30 additions and 33 deletions

View File

@ -142,3 +142,16 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error);
*
* Condition types for pushers.
*/
/**
* MatrixPusherKind:
* @MATRIX_PUSHER_KIND_OVERRIDE: highest priority rules
* @MATRIX_PUSHER_KIND_SENDER: for (unencrypted) messages that match certain patterns
* @MATRIX_PUSHER_KIND_ROOM: for all messages for a given room. The rule ID of a room rule is
* always the ID of the room that it affects
* @MATRIX_PUSHER_KIND_CONTENT: for messages from a specific Matrix user ID. The rule ID of such
* rules is always the Matrix ID of the user whose messages they'd apply to
* @MATRIX_PUSHER_KIND_UNDERRIDE: lowest priority rules
*
* Pusher types.
*/

View File

@ -106,4 +106,12 @@ typedef enum {
MATRIX_PUSHER_CONDITION_KIND_ROOM_MEMBER_COUNT
} MatrixPusherConditionKind;
typedef enum {
MATRIX_PUSHER_KIND_OVERRIDE,
MATRIX_PUSHER_KIND_SENDER,
MATRIX_PUSHER_KIND_ROOM,
MATRIX_PUSHER_KIND_CONTENT,
MATRIX_PUSHER_KIND_UNDERRIDE
} MatrixPusherKind;
#endif /* __MATRIX_TYPE_H__ */

View File

@ -17,39 +17,6 @@
*/
namespace Matrix {
/**
* Pusher types.
*/
public enum PusherKind {
/**
* highest priority rules
*/
OVERRIDE,
/**
* for (unencrypted) messages that match certain patterns
*/
SENDER,
/**
* for all messages for a given room. The rule ID of a room
* rule is always the ID of the room that it affects
*/
ROOM,
/**
* for messages from a specific Matrix user ID. The rule ID of
* such rules is always the Matrix ID of the user whose
* messages they'd apply to
*/
CONTENT,
/**
* lowest priority rules
*/
UNDERRIDE;
}
/**
* Receipt types of acknowledgment.
*/

View File

@ -101,6 +101,15 @@ namespace Matrix {
ROOM_MEMBER_COUNT;
}
[CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_PUSHER_KIND_")]
public enum PusherKind {
OVERRIDE,
SENDER,
ROOM,
CONTENT,
UNDERRIDE;
}
/**
* The major version number of the Matrix.org GLib SDK.
*/