Top |
#define | AGS_MESSAGE_DELIVERY_GET_OBJ_MUTEX() |
void | ags_message_delivery_set_message_queue () |
GList * | ags_message_delivery_get_message_queue () |
void | ags_message_delivery_add_message_queue () |
void | ags_message_delivery_remove_message_queue () |
GList * | ags_message_delivery_find_sender_namespace () |
GList * | ags_message_delivery_find_recipient_namespace () |
void | ags_message_delivery_add_message_envelope () |
void | ags_message_delivery_remove_message_envelope () |
GList * | ags_message_delivery_find_sender () |
GList * | ags_message_delivery_find_recipient () |
GList * | ags_message_delivery_query_message () |
AgsMessageDelivery * | ags_message_delivery_get_instance () |
AgsMessageDelivery * | ags_message_delivery_new () |
The AgsMessageDelivery acts as messages passing system. Obtain the singleton
instance by calling ags_message_delivery_get_instance()
.
To query the message queue for message envelopes there are functions like:
ags_message_delivery_find_sender()
ags_message_delivery_find_recipient()
ags_message_delivery_query_message()
Make sure to cleanup the queue after you queried it.
ags_message_delivery_remove_message_envelope()
You instatiate a message queue with sender-namespace
and recipient-namespace
.
ags_message_queue_new()
ags_message_queue_set_recipient_namespace()
Then you subscribe to a message queue by calling
ags_message_delivery_add_message_queue()
If you want to send a message, you first check if the AgsMessageQueue is available. Then you can add a message envelope by calling:
ags_message_delivery_add_message_envelope()
#define AGS_MESSAGE_DELIVERY_GET_OBJ_MUTEX(obj) (&(((AgsMessageDelivery *) obj)->obj_mutex))
void ags_message_delivery_set_message_queue (AgsMessageDelivery *message_delivery
,GList *message_queue
);
Set message_queue
of message_delivery
.
message_delivery |
||
message_queue |
the GList containing AgsMessageQueue. |
[element-type Ags.MessageQueue][transfer full] |
Since: 3.6.16
GList *
ags_message_delivery_get_message_queue
(AgsMessageDelivery *message_delivery
);
Get message queue of message_delivery
.
Since: 3.6.16
void ags_message_delivery_add_message_queue (AgsMessageDelivery *message_delivery
,GObject *message_queue
);
Add message_queue
to message_delivery
.
Since: 3.0.0
void ags_message_delivery_remove_message_queue (AgsMessageDelivery *message_delivery
,GObject *message_queue
);
Remove message_queue
to message_delivery
.
Since: 3.0.0
GList * ags_message_delivery_find_sender_namespace (AgsMessageDelivery *message_delivery
,gchar *sender_namespace
);
Find sender namespace of AgsMessageQueue in message_delivery
.
message_delivery |
the AgsMessageDelivery to search |
|
sender_namespace |
the sender namespace as string to find |
the matching GList containing AgsMessageQueue or NULL
.
[element-type Ags.MessageQueue][transfer full]
Since: 3.0.0
GList * ags_message_delivery_find_recipient_namespace (AgsMessageDelivery *message_delivery
,gchar *recipient_namespace
);
Find recipient namespace of AgsMessageQueue in message_delivery
.
message_delivery |
the AgsMessageDelivery to search |
|
recipient_namespace |
the recipient namespace as string to find |
the matching GList containing AgsMessageQueue or NULL
.
[element-type Ags.MessageQueue][transfer full]
Since: 3.0.0
void ags_message_delivery_add_message_envelope (AgsMessageDelivery *message_delivery
,gchar *sender_namespace
,GObject *message_envelope
);
Add message
to an AgsMessageQueue specified by sender_namespace
.
Since: 3.0.0
void ags_message_delivery_remove_message_envelope (AgsMessageDelivery *message_delivery
,gchar *sender_namespace
,GObject *message_envelope
);
Remove message
from an AgsMessageQueue specified by sender_namespace
.
Since: 3.0.0
GList * ags_message_delivery_find_sender (AgsMessageDelivery *message_delivery
,gchar *recipient_namespace
,GObject *sender
);
Find sender
for recipient_namespace
matching AgsMessageQueue. If recipient_namespace
equals NULL
match
all available message queues.
message_delivery |
||
recipient_namespace |
the recipient namespace as string, maybe |
|
sender |
the sender as GObject |
Since: 3.0.0
GList * ags_message_delivery_find_recipient (AgsMessageDelivery *message_delivery
,gchar *recipient_namespace
,GObject *recipient
);
Find recipient
for recipient_namespace
matching AgsMessageQueue. If recipient_namespace
equals NULL
match
all available message queues.
message_delivery |
||
recipient_namespace |
the recipient namespace as string, maybe |
|
recipient |
the recipient as GObject |
Since: 3.0.0
GList * ags_message_delivery_query_message (AgsMessageDelivery *message_delivery
,gchar *recipient_namespace
,gchar *xpath
);
Query xpath
for recipient_namespace
matching AgsMessageQueue. If recipient_namespace
equals NULL
match
all available message queues.
message_delivery |
||
recipient_namespace |
the recipient namespace as string, maybe |
|
xpath |
the xpath to query |
Since: 3.0.0
AgsMessageDelivery * ags_message_delivery_get_instance ();
Get the AgsMessageDelivery instance.
Since: 3.0.0
AgsMessageDelivery * ags_message_delivery_new ();
Create a new AgsMessageDelivery.
Since: 3.0.0