From a3dee44bb80452113f48943a8365c208cc130270 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Thu, 2 Nov 2017 12:24:48 +0100 Subject: [PATCH] Port MatrixCallAnswerType to C --- src/matrix-c-types.c | 8 ++++++++ src/matrix-c-types.h | 5 +++++ src/matrix-types.vala | 15 --------------- vapi/c-api.vapi | 6 ++++++ 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/matrix-c-types.c b/src/matrix-c-types.c index da30138..683b948 100644 --- a/src/matrix-c-types.c +++ b/src/matrix-c-types.c @@ -284,3 +284,11 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error); * * Call offer types */ + +/** + * MatrixCallAnswerType: + * @MATRIX_CALL_ANSWER_TYPE_UNKNOWN: represents a value unknown to this library + * @MATRIX_CALL_ANSWER_TYPE_ANSWER: call answer + * + * Call answer types + */ diff --git a/src/matrix-c-types.h b/src/matrix-c-types.h index dd42cf7..787fe9b 100644 --- a/src/matrix-c-types.h +++ b/src/matrix-c-types.h @@ -190,4 +190,9 @@ typedef enum { MATRIX_CALL_OFFER_TYPE_OFFER } MatrixCallOfferType; +typedef enum { + MATRIX_CALL_ANSWER_TYPE_UNKNOWN, + MATRIX_CALL_ANSWER_TYPE_ANSWER +} MatrixCallAnswerType; + #endif /* __MATRIX_TYPE_H__ */ diff --git a/src/matrix-types.vala b/src/matrix-types.vala index c59dca3..9d152a4 100644 --- a/src/matrix-types.vala +++ b/src/matrix-types.vala @@ -17,21 +17,6 @@ */ namespace Matrix { - /** - * Call answer types - */ - public enum CallAnswerType { - /** - * represents a value unknown to this library - */ - UNKNOWN, - - /** - * call answer - */ - ANSWER; - } - /** * Information about the file referred to in a URL. */ diff --git a/vapi/c-api.vapi b/vapi/c-api.vapi index d210233..1d5236d 100644 --- a/vapi/c-api.vapi +++ b/vapi/c-api.vapi @@ -198,6 +198,12 @@ namespace Matrix { OFFER; } + [CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_CALL_ANSWER_TYPE_")] + public enum CallAnswerType { + UNKNOWN, + ANSWER; + } + /** * The major version number of the Matrix.org GLib SDK. */