From fe238ff23623f5eba203fa0dd52e0aace9365abb Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Thu, 2 Nov 2017 09:51:02 +0100 Subject: [PATCH] Port MatrixReceiptType to C --- src/matrix-c-types.c | 7 +++++++ src/matrix-c-types.h | 4 ++++ src/matrix-types.vala | 10 ---------- vapi/c-api.vapi | 5 +++++ 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/matrix-c-types.c b/src/matrix-c-types.c index 4e822e9..0a2b6f9 100644 --- a/src/matrix-c-types.c +++ b/src/matrix-c-types.c @@ -155,3 +155,10 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error); * * Pusher types. */ + +/** + * MatrixReceiptType: + * @MATRIX_RECEIPT_TYPE_READ: indicate that the message has been read + * + * Receipt types of acknowledgment. + */ diff --git a/src/matrix-c-types.h b/src/matrix-c-types.h index 9642522..d0fec31 100644 --- a/src/matrix-c-types.h +++ b/src/matrix-c-types.h @@ -114,4 +114,8 @@ typedef enum { MATRIX_PUSHER_KIND_UNDERRIDE } MatrixPusherKind; +typedef enum { + MATRIX_RECEIPT_TYPE_READ +} MatrixReceiptType; + #endif /* __MATRIX_TYPE_H__ */ diff --git a/src/matrix-types.vala b/src/matrix-types.vala index fda2e1c..c5c8fe2 100644 --- a/src/matrix-types.vala +++ b/src/matrix-types.vala @@ -17,16 +17,6 @@ */ namespace Matrix { - /** - * Receipt types of acknowledgment. - */ - public enum ReceiptType { - /** - * indicate that the message has been read - */ - READ; - } - /** * Resizing methods for matrix_api_media_thumbnail(). */ diff --git a/vapi/c-api.vapi b/vapi/c-api.vapi index b7ea719..2e45c81 100644 --- a/vapi/c-api.vapi +++ b/vapi/c-api.vapi @@ -110,6 +110,11 @@ namespace Matrix { UNDERRIDE; } + [CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_RECEIPT_TYPE_")] + public enum ReceiptType { + READ; + } + /** * The major version number of the Matrix.org GLib SDK. */