| Top |
| GType * | matrix_event_get_handler () |
| void | matrix_event_register_type () |
| void | matrix_event_unregister_type () |
| #define | MATRIX_EVENT_TYPE_BASE |
| void | matrix_event_base_from_json () |
| void | matrix_event_base_to_json () |
| const gchar * | matrix_event_base_get_event_type () |
| JsonNode * | matrix_event_base_get_json () |
| MatrixEventBase * | matrix_event_base_new_from_json () |
GType *
matrix_event_get_handler (const gchar *event_type);
Get the GType of the class that is registered to handle events with type param
event_type.
void matrix_event_register_type (const gchar *event_type,GType event_gtype,GError **error);
Registers param
event_type to be handled by the type param
event_gtype.
void
matrix_event_unregister_type (const gchar *event_type);
Unregister param
event_type.
#define MATRIX_EVENT_TYPE_BASE (matrix_event_base_get_type ())
The type for MatrixEventBase.
void matrix_event_base_from_json (MatrixEventBase *self,JsonNode *json_data,GError **error);
Subclasses should implement this function to initialize themselves from JSON data.
self |
the MatrixEventBase instance |
|
json_data |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_event_base_to_json (MatrixEventBase *self,JsonNode *json_data,GError **error);
Subclasses should implement this to export their data to JSON.
self |
the MatrixEventBase instance |
|
json_data |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
const gchar *
matrix_event_base_get_event_type (MatrixEventBase *self);
Get and return the current value of the "event-type" property.
The type of the event. It should be namespaced similar to the Java package naming conventions, e.g. com.example.subdomain.event.type. It cannot be changed after object initialization.
JsonNode *
matrix_event_base_get_json (MatrixEventBase *self);
Get and return the current value of the "json" property.
The event as a JSON node.
MatrixEventBase * matrix_event_base_new_from_json (gchar *event_type,JsonNode *json_data,GError **error);
struct MatrixEventBase {
GObject parent_instance;
MatrixEventBasePrivate * priv;
gchar* _event_type;
};
Base class for Matrix events.
struct MatrixEventBaseClass {
GObjectClass parent_class;
void (*from_json) (MatrixEventBase* self, JsonNode* json_data, GError** error);
void (*to_json) (MatrixEventBase* self, JsonNode* json_data, GError** error);
};
The class structure for MATRIX_EVENT_TYPE_BASE. All the fields in this structure are private and should never be accessed directly.
the parent class structure |
||
virtual method called by |
||
virtual method called by |