| Top |  |  |  |  | 
InfCommunicationRegistry provides a way for InfCommunicationMethod
implementations to share connections with other groups. Before using a
connection, call inf_communication_registry_register(). Then, messages can
be sent to the group via inf_communication_registry_send().
The InfCommunicationRegistry calls inf_communication_method_received()
on your method when it received a message for the group,
inf_communication_method_enqueued() when sending the message cannot be
cancelled anymore via inf_communication_registry_cancel_messages() and
inf_communication_method_sent() when the message has been sent.
void inf_communication_registry_register (InfCommunicationRegistry *registry,InfCommunicationGroup *group,InfCommunicationMethod *method,InfXmlConnection *connection);
Registers connection with group
. This allows sending messages to
connection
 via inf_communication_registry_send(). For received messages,
inf_communication_method_received() is called on method
.
connection
 must have status INF_XML_CONNECTION_OPEN.
| registry | ||
| group | The group for which to register a connection. | |
| method | The InfCommunicationMethod used. | |
| connection | The connection to register. | 
void inf_communication_registry_unregister (InfCommunicationRegistry *registry,InfCommunicationGroup *group,InfXmlConnection *connection);
Unregisters connection
 from group
. Incoming messages are no longer
reported to group's method, and inf_communication_registry_send() can
no longer be called for connection
.
gboolean inf_communication_registry_is_registered (InfCommunicationRegistry *registry,InfCommunicationGroup *group,InfXmlConnection *connection);
Returns whether connection
 has been registered for group
 with
inf_communication_registry_register().
void inf_communication_registry_send (InfCommunicationRegistry *registry,InfCommunicationGroup *group,InfXmlConnection *connection,xmlNodePtr xml);
Sends an XML message to connection
. connection
 must have been registered
with inf_communication_registry_register() before. If the message has been
sent, inf_communication_method_sent() is called on the method the
connection was registered with. inf_communication_method_enqueued() is
called when sending the message can no longer be cancelled via
inf_communication_registry_cancel_messages().
This function takes ownership of xml
.
| registry | ||
| group | The group for which to send the message InfCommunicationGroup. | |
| connection | A registered InfXmlConnection. | |
| xml | The message to send. | [transfer full] | 
void inf_communication_registry_cancel_messages (InfCommunicationRegistry *registry,InfCommunicationGroup *group,InfXmlConnection *connection);
Stops all messages scheduled to be sent to connection
 in group
 from being
sent.
| registry | ||
| group | The group for which to cancel messages. | |
| connection | A registered InfXmlConnection. | 
struct InfCommunicationRegistry;
InfCommunicationRegistry is an opaque data type. You should only access it via the public API functions.