Top |
GType * | matrix_message_get_handler () |
void | matrix_message_register_type () |
void | matrix_message_unregister_type () |
#define | MATRIX_MESSAGE_TYPE_BASE |
void | matrix_message_base_from_json () |
void | matrix_message_base_to_json () |
const gchar * | matrix_message_base_get_message_type () |
void | matrix_message_base_set_message_type () |
const gchar * | matrix_message_base_get_body () |
void | matrix_message_base_set_body () |
JsonNode * | matrix_message_base_get_json () |
MatrixMessageBase * | matrix_message_base_new_from_json () |
GType *
matrix_message_get_handler (const gchar *message_type
);
Get the GType of the class that is registered to handle messages with type param
message_type.
void matrix_message_register_type (const gchar *message_type
,GType message_gtype
,GError **error
);
Register param
message_type to be handled by the type param
message_gtype.
void
matrix_message_unregister_type (const gchar *message_type
);
Unregister param
message_type.
#define MATRIX_MESSAGE_TYPE_BASE (matrix_message_base_get_type ())
The type for MatrixMessageBase.
void matrix_message_base_from_json (MatrixMessageBase *self
,JsonNode *json_data
,GError **error
);
Subclasses should override this method to initialize themselves from JSON data while chaining up to allow parent classes to do the same.
self |
the MatrixMessageBase instance |
|
json_data |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_message_base_to_json (MatrixMessageBase *self
,JsonNode *json_data
,GError **error
);
Subclasses should override this method to export their data to JSON, while chaining up to allow parent classes to do the same.
self |
the MatrixMessageBase instance |
|
json_data |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
const gchar *
matrix_message_base_get_message_type (MatrixMessageBase *self
);
Get and return the current value of the "message-type" property.
The message type.
void matrix_message_base_set_message_type (MatrixMessageBase *self
,const gchar *value
);
Set the value of the "message-type" property to value
.
The message type.
self |
the MatrixMessageBase instance to modify |
|
value |
the new value of the "message-type" property |
const gchar *
matrix_message_base_get_body (MatrixMessageBase *self
);
Get and return the current value of the "body" property.
The body of the message.
void matrix_message_base_set_body (MatrixMessageBase *self
,const gchar *value
);
Set the value of the "body" property to value
.
The body of the message.
JsonNode *
matrix_message_base_get_json (MatrixMessageBase *self
);
Get and return the current value of the "json" property.
MatrixMessageBase * matrix_message_base_new_from_json (JsonNode *json_data
,GError **error
);
struct MatrixMessageBase { GObject parent_instance; MatrixMessageBasePrivate * priv; };
Base class for message handlers.
Message handler base class.
struct MatrixMessageBaseClass { GObjectClass parent_class; void (*from_json) (MatrixMessageBase* self, JsonNode* json_data, GError** error); void (*to_json) (MatrixMessageBase* self, JsonNode* json_data, GError** error); };
The class structure for MATRIX_MESSAGE_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 |