Infinity.CommunicationRegistry

g GObject.Object GObject.Object Infinity.CommunicationRegistry Infinity.CommunicationRegistry GObject.Object->Infinity.CommunicationRegistry

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

cancel_messages (group, connection)

is_registered (group, connection)

register (group, method, connection)

send (group, connection, xml)

unregister (group, connection)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Infinity.CommunicationRegistry(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Infinity.CommunicationRegistryClass

Infinity.CommunicationRegistry is an opaque data type. You should only access it via the public API functions.

cancel_messages(group, connection)
Parameters:

Stops all messages scheduled to be sent to connection in group from being sent.

is_registered(group, connection)
Parameters:
Returns:

True if connection has been registered, or False otherwise.

Return type:

bool

Returns whether connection has been registered for group with Infinity.CommunicationRegistry.register().

register(group, method, connection)
Parameters:

Registers connection with group. This allows sending messages to connection via Infinity.CommunicationRegistry.send(). For received messages, Infinity.CommunicationMethod.received() is called on method.

connection must have status Infinity.XmlConnectionStatus.OPEN.

send(group, connection, xml)
Parameters:

Sends an XML message to connection. connection must have been registered with Infinity.CommunicationRegistry.register() before. If the message has been sent, Infinity.CommunicationMethod.sent() is called on the method the connection was registered with. Infinity.CommunicationMethod.enqueued() is called when sending the message can no longer be cancelled via Infinity.CommunicationRegistry.cancel_messages().

This function takes ownership of xml.

unregister(group, connection)
Parameters:

Unregisters connection from group. Incoming messages are no longer reported to group’s method, and Infinity.CommunicationRegistry.send() can no longer be called for connection.