diff --git a/docs/reference/matrix-glib/matrix-glib-sections.txt b/docs/reference/matrix-glib/matrix-glib-sections.txt
index 390f97a..9953b6d 100644
--- a/docs/reference/matrix-glib/matrix-glib-sections.txt
+++ b/docs/reference/matrix-glib/matrix-glib-sections.txt
@@ -19,6 +19,9 @@ matrix_client_get_type
matrix-api-types
Fundamental types for MatrixAPI
+
+MatrixAPIEventFormat
+
MatrixAPIFilterRules
matrix_api_filter_rules_new
@@ -70,6 +73,8 @@ matrix_api_room_filter_get_json_node
matrix_api_room_filter_get_json_data
+MATRIX_TYPE_API_EVENT_FORMAT
+matrix_api_event_format_get_type
MATRIX_TYPE_API_FILTER_RULES
matrix_api_filter_rules_get_type
MATRIX_TYPE_API_ROOM_FILTER
@@ -184,7 +189,6 @@ MatrixAPIError
MATRIX_API_ERROR
-MatrixAPIEventFormat
MatrixAPIFilter
MatrixAPIStateEvent
MatrixAPI3PidCredential
@@ -202,8 +206,6 @@ MatrixApiPrivate
matrix_api_get_type
MATRIX_TYPE_API_EVENT_DIRECTION
matrix_api_event_direction_get_type
-MATRIX_TYPE_API_EVENT_FORMAT
-matrix_api_event_format_get_type
MATRIX_TYPE_API_PRESENCE
matrix_api_presence_get_type
MATRIX_TYPE_API_PUSHER_CONDITION_KIND
diff --git a/src/Makefile.am b/src/Makefile.am
index 5652b3f..6f27081 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,7 +15,10 @@ INST_H_BUILT_FILES = \
matrix-enumtypes.h \
$(NULL)
-matrix_enum_headers = matrix-api.h
+matrix_enum_headers = \
+ matrix-api.h \
+ matrix-api-types.h \
+ $(NULL)
libmatrix_glib_0_0_la_SOURCES = \
matrix-client.c \
diff --git a/src/matrix-api-types.c b/src/matrix-api-types.c
index 1378eb8..d21da78 100644
--- a/src/matrix-api-types.c
+++ b/src/matrix-api-types.c
@@ -28,6 +28,20 @@
* communication with the homeserver.
*/
+/**
+ * MatrixAPIEventFormat:
+ * @MATRIX_API_EVENT_FORMAT_DEFAULT: event format will be omitted from
+ * the filter, so the server will
+ * use its default (usually
+ * @MATRIX_API_EVENT_FORMAT_FEDERATION)
+ * @MATRIX_API_EVENT_FORMAT_CLIENT: return the events in a format
+ * suitable for clients
+ * @MATRIX_API_EVENT_FORMAT_FEDERATION: return the raw event as
+ * receieved over federation
+ *
+ * Event format received when synchronizing.
+ */
+
/**
* MatrixAPIFilterRules: (ref-func matrix_api_filter_rules_ref) (unref-func matrix_api_filter_rules_unref)
*
@@ -757,6 +771,7 @@ matrix_api_filter_rules_get_json_data(MatrixAPIFilterRules *rules,
json_node_free(node);
data = json_generator_to_data(generator, datalen);
+ g_object_unref(generator);
return data;
}
diff --git a/src/matrix-api-types.h b/src/matrix-api-types.h
index 20797bc..92d035f 100644
--- a/src/matrix-api-types.h
+++ b/src/matrix-api-types.h
@@ -24,6 +24,12 @@
G_BEGIN_DECLS
+typedef enum {
+ MATRIX_API_EVENT_FORMAT_DEFAULT,
+ MATRIX_API_EVENT_FORMAT_CLIENT,
+ MATRIX_API_EVENT_FORMAT_FEDERATION
+} MatrixAPIEventFormat;
+
typedef struct _MatrixAPIFilterRules MatrixAPIFilterRules;
GType matrix_api_filter_rules_get_type(void);
diff --git a/src/matrix-api.c b/src/matrix-api.c
index 5aa326b..4ba41d6 100644
--- a/src/matrix-api.c
+++ b/src/matrix-api.c
@@ -237,20 +237,6 @@
* Receipt types of acknowledgment.
*/
-/**
- * MatrixAPIEventFormat:
- * @MATRIX_API_EVENT_FORMAT_DEFAULT: event format will be omitted from
- * the filter, so the server will
- * use its default (usually
- * @MATRIX_API_EVENT_FORMAT_FEDERATION)
- * @MATRIX_API_EVENT_FORMAT_CLIENT: return the events in a format
- * suitable for clients
- * @MATRIX_API_EVENT_FORMAT_FEDERATION: return the raw event as
- * receieved over federation
- *
- * Event format received when synchronizing.
- */
-
/**
* MatrixAPIPusher:
* @app_display_name: a string that will allow the user to identify
diff --git a/src/matrix-api.h b/src/matrix-api.h
index d1e0314..529f120 100644
--- a/src/matrix-api.h
+++ b/src/matrix-api.h
@@ -82,12 +82,6 @@ typedef enum {
MATRIX_API_EVENT_DIRECTION_BACKWARD
} MatrixAPIEventDirection;
-typedef enum {
- MATRIX_API_EVENT_FORMAT_DEFAULT,
- MATRIX_API_EVENT_FORMAT_CLIENT,
- MATRIX_API_EVENT_FORMAT_FEDERATION
-} MatrixAPIEventFormat;
-
typedef enum {
MATRIX_API_RECEIPT_TYPE_READ
} MatrixAPIReceiptType;