Infinity.CommunicationManager¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Infinity.CommunicationManager(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Infinity.CommunicationManager
is an opaque data type. You should only access it via the public API functions.- classmethod new()¶
- Returns:
- Return type:
Creates a new
Infinity.CommunicationManager
.
- add_factory(factory)¶
- Parameters:
factory (
Infinity.CommunicationFactory
) – TheInfinity.CommunicationFactory
to add.
Adds a new
Infinity.CommunicationFactory
to self. This makes self support all method/network combinations that factory supports. If multiple added factories support the same combination, the one which was added first will be used to instantiate theInfinity.CommunicationMethod
.
- get_factory_for(network, method_name)¶
- Parameters:
- Returns:
- Return type:
Returns the
Infinity.CommunicationFactory
that self will use to instantiate aInfinity.CommunicationMethod
for method_name on network, orNone
if the network/method combination is not supported.
- join_group(group_name, publisher_conn, method)¶
- Parameters:
group_name (
str
) – The group to join.publisher_conn (
Infinity.XmlConnection
) – AInfinity.XmlConnection
to the publishing host.method (
str
) – The communication method to use.
- Returns:
A new
Infinity.CommunicationJoinedGroup
, orNone
. Free withGObject.Object.unref
() to leave the group.- Return type:
Joins a communication group published by a remote host. publisher_conn needs to be a to the publishing host with status
Infinity.XmlConnectionStatus.OPEN
orInfinity.XmlConnectionStatus.OPENING
. group_name specifies the name of the group to join.method specifies the communication method to use. It must match the communication method the publisher has chosen for publisher_conn's network (see
Infinity.CommunicationGroup.get_method_for_network
()). The function returnsNone
if method is not supported (which meansInfinity.CommunicationManager.get_factory_for
() for publisher_conn's network and method returnsNone
).
- open_group(group_name, methods)¶
- Parameters:
- Returns:
A
Infinity.CommunicationHostedGroup
. Free withGObject.Object.unref
() to leave the group.- Return type:
Opens a new communication group published by the local host. group_name is an identifier for the group via which other hosts can join the group using
Infinity.CommunicationManager.join_group
(). It needs to be unique among all groups opened by the local host.methods specifies what communication methods the group should use, in order of priority. If a method is not supported for a given network, then the next one in the array is tried. If none is supported, then the “central” method will be used, which is guaranteed to be supported for all networks.