Top | ![]() |
![]() |
![]() |
![]() |
#define | XED_MESSAGE_CONST() |
struct _XedMessageType | xed_message_get_message_type () |
void | xed_message_get () |
void | xed_message_get_valist () |
void | xed_message_get_value () |
void | xed_message_set () |
void | xed_message_set_valist () |
void | xed_message_set_value () |
void | xed_message_set_valuesv () |
const gchar * | xed_message_get_object_path () |
const gchar * | xed_message_get_method () |
gboolean | xed_message_has_key () |
GType | xed_message_get_key_type () |
gboolean | xed_message_validate () |
char * | method | Read |
char * | object-path | Read |
XedMessageType * | type | Read / Write / Construct Only |
Communication on a XedMessageBus is done through messages. Messages are sent over the bus and received by connecting callbacks on the message bus. A XedMessage is an instantiation of a XedMessageType, containing values for the arguments as specified in the message type.
A message can be seen as a method call, or signal emission depending on who is the sender and who is the receiver. There is no explicit distinction between methods and signals.
#define XED_MESSAGE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XED_TYPE_MESSAGE, XedMessage const))
struct _XedMessageType
xed_message_get_message_type (XedMessage *message
);
void xed_message_get (XedMessage *message
,...
);
Get values of message arguments. The supplied var_args
should contain
pairs of keys and pointers to variables which are set to the argument
value for the specified key.
void xed_message_get_valist (XedMessage *message
,va_list var_args
);
Get values of message arguments. The supplied var_args
should contain
pairs of keys and pointers to variables which are set to the argument
value for the specified key.
message |
the XedMessage |
|
var_args |
a |
void xed_message_get_value (XedMessage *message
,const gchar *key
,GValue *value
);
Get the value of a specific message argument. value
will be initialized
with the correct type.
void xed_message_set (XedMessage *message
,...
);
Set values of message arguments. The supplied var_args
should contain
pairs of keys and argument values.
void xed_message_set_valist (XedMessage *message
,va_list var_args
);
Set values of message arguments. The supplied var_args
should contain
pairs of keys and argument values.
void xed_message_set_value (XedMessage *message
,const gchar *key
,GValue *value
);
Set value of message argument key
to value
.
void xed_message_set_valuesv (XedMessage *message
,const gchar **keys
,GValue *values
,gint n_values
);
Set message argument values.
message |
the XedMessage |
|
keys |
keys to set values for. |
[array length=n_values] |
values |
values to set. |
[array length=n_values] |
n_values |
number of arguments to set values for |
const gchar *
xed_message_get_object_path (XedMessage *message
);
Get the message object path.
const gchar *
xed_message_get_method (XedMessage *message
);
Get the message method.
gboolean xed_message_has_key (XedMessage *message
,const gchar *key
);
Check whether the message has a specific key.
GType xed_message_get_key_type (XedMessage *message
,const gchar *key
);
Get the type of a message argument.
gboolean
xed_message_validate (XedMessage *message
);
Validates the message arguments according to the message type.
“method”
property “method” char *
The messages method.
Owner: XedMessage
Flags: Read
Default value: NULL
“object-path”
property “object-path” char *
The message object path.
Owner: XedMessage
Flags: Read
Default value: NULL
“type”
property“type” XedMessageType *
The message type.
Owner: XedMessage
Flags: Read / Write / Construct Only