| Top |
| #define | MATRIX_TYPE_EVENT |
| void | matrix_event_from_json () |
| void | matrix_event_to_json () |
| void | matrix_event_set_custom_field () |
| JsonNode * | matrix_event_get_custom_field () |
| void | matrix_event_delete_custom_field () |
| MatrixEvent * | matrix_event_new () |
| const gchar * | matrix_event_get_sender () |
| void | matrix_event_set_sender () |
| const gchar * | matrix_event_get_room_id () |
| void | matrix_event_set_room_id () |
| const gchar * | matrix_event_get_event_type () |
| gulong * | matrix_event_get_origin_server_ts () |
| void | matrix_event_set_origin_server_ts () |
| MatrixUnsignedEventData * | matrix_event_get_unsigned_data () |
| void | matrix_event_set_unsigned_data () |
| JsonNode * | matrix_event_get_json () |
| MatrixEvent * | matrix_event_new_from_json () |
| GType | matrix_event_get_handler () |
| void | matrix_event_register_type () |
| void | matrix_event_unregister_type () |
void matrix_event_from_json (MatrixEvent *self,JsonNode *json_data,GError **error);
Subclasses should implement this function to initialize themselves from JSON data.
self |
the MatrixEvent instance |
|
json_data |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_event_to_json (MatrixEvent *self,JsonNode *json_data,GError **error);
Subclasses should implement this to export their data to JSON.
self |
the MatrixEvent instance |
|
json_data |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_event_set_custom_field (MatrixEvent *self,const gchar *field_name,JsonNode *value);
Set a value for a custom field.
JsonNode * matrix_event_get_custom_field (MatrixEvent *self,const gchar *field_name);
Get the value of a custom field.
void matrix_event_delete_custom_field (MatrixEvent *self,const gchar *field_name);
Delete a custom field.
const gchar *
matrix_event_get_sender (MatrixEvent *self);
Get and return the current value of the "sender" property.
The Matrix ID of the events sender.
void matrix_event_set_sender (MatrixEvent *self,const gchar *value);
Set the value of the "sender" property to value
.
The Matrix ID of the events sender.
const gchar *
matrix_event_get_room_id (MatrixEvent *self);
Get and return the current value of the "room-id" property.
The ID of the room this event is associated with.
void matrix_event_set_room_id (MatrixEvent *self,const gchar *value);
Set the value of the "room-id" property to value
.
The ID of the room this event is associated with.
const gchar *
matrix_event_get_event_type (MatrixEvent *self);
Get and return the current value of the "event-type" property.
The type of the event.
gulong *
matrix_event_get_origin_server_ts (MatrixEvent *self);
Get and return the current value of the "origin-server-ts" property.
The timestamp of the event on the originating server.
void matrix_event_set_origin_server_ts (MatrixEvent *self,gulong *value);
Set the value of the "origin-server-ts" property to value
.
The timestamp of the event on the originating server.
self |
the MatrixEvent instance to modify |
|
value |
the new value of the "origin-server-ts" property |
MatrixUnsignedEventData *
matrix_event_get_unsigned_data (MatrixEvent *self);
Get and return the current value of the "unsigned-data" property.
The unsigned part of the event.
void matrix_event_set_unsigned_data (MatrixEvent *self,MatrixUnsignedEventData *value);
Set the value of the "unsigned-data" property to value
.
The unsigned part of the event.
self |
the MatrixEvent instance to modify |
|
value |
the new value of the "unsigned-data" property |
JsonNode *
matrix_event_get_json (MatrixEvent *self);
Get and return the current value of the "json" property.
The event as a JSON node.
MatrixEvent * matrix_event_new_from_json (gchar *event_type,const gchar *room_id,JsonNode *json_data,GError **error);
event_type |
|
|
room_id |
|
|
json_data |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
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.
struct MatrixEvent {
GObject parent_instance;
MatrixEventPrivate * priv;
gchar* _sender;
gchar* _room_id;
};
Base class for Matrix events.
struct MatrixEventClass {
GObjectClass parent_class;
void (*from_json) (MatrixEvent* self, JsonNode* json_data, GError** error);
void (*to_json) (MatrixEvent* self, JsonNode* json_data, GError** error);
};
The class structure for MATRIX_TYPE_EVENT. All the fields in this structure are private and should never be accessed directly.
GObjectClass |
the parent class structure |
|
virtual method called by |
||
virtual method called by |