Infinity.XmppManager¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new() | 
| add_connection(connection) | |
| contains_connection(connection) | |
| lookup_connection_by_address(address, port) | |
| lookup_connection_by_hostname(hostname, service, srv) | |
| remove_connection(connection) | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
| do_connection_added(connection) | |
| do_connection_removed(connection, replaced_by) | 
Properties¶
None
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| connection-added | This signal is emitted whenever a new connection has been added to the Infinity.XmppManager, viaInfinity.XmppManager.add_connection(). | 
| connection-removed | 
Class Details¶
- 
class Infinity.XmppManager(**kwargs)¶
- Bases: - GObject.Object- Abstract: - No - Structure: - Infinity.XmppManagerClass- Infinity.XmppManageris an opaque data type. You should only access it via the public API functions.- 
classmethod new()¶
- Returns: - A new - Infinity.XmppManager.- Return type: - Infinity.XmppManager- Creates a new xmpp manager. 
 - 
add_connection(connection)¶
- Parameters: - connection ( - Infinity.XmppConnection) – A- Infinity.XmppConnectionnot yet contained in self.- Adds the given connection to self so that it is found by - Infinity.XmppManager.lookup_connection_by_address(),- Infinity.XmppManager.lookup_connection_by_hostname() and- Infinity.XmppManager.contains_connection().
 - 
contains_connection(connection)¶
- Parameters: - connection ( - Infinity.XmppConnection) – A- Infinity.XmppConnection.- Returns: - Trueif connection is contained in self,- Falseotherwise.- Return type: - bool- Returns whether connection is contained in self. 
 - 
lookup_connection_by_address(address, port)¶
- Parameters: - address (Infinity.IpAddress) – The remoteInfinity.IpAddressof the connection to look for.
- port (int) – The remote port number of the connection to look for.
 - Returns: - A - Infinity.XmppConnectionwith the given address and port, or- Noneif not found.- Return type: - Looks for a - Infinity.XmppConnectioncontained in self whose underlaying- Infinity.TcpConnectionhas the given address and port set. Returns- Noneif there is no such connection.- This function may also return a closed connection. You can then attempt to reopen it, or remove it from the manager using - Infinity.XmppManager.remove_connection() when that fails.
- address (
 - 
lookup_connection_by_hostname(hostname, service, srv)¶
- Parameters: - Returns: - A - Infinity.XmppConnectionwith the given hostname, service and srv, or- Noneif not found.- Return type: - Looks for a - Infinity.XmppConnectioncontained in self whose underlaying- Infinity.TcpConnectionhas a- Infinity.NameResolverwith the given properties.- This function may also return a closed connection. You can then attempt to reopen it, or remove it from the manager using - Infinity.XmppManager.remove_connection() when that fails.
 - 
remove_connection(connection)¶
- Parameters: - connection ( - Infinity.XmppConnection) – A- Infinity.XmppConnectioncontained in self.- Removes the given connection from self. 
 - 
do_connection_added(connection) virtual¶
- Parameters: - connection ( - Infinity.XmppConnection) –
 - 
do_connection_removed(connection, replaced_by) virtual¶
- Parameters: - connection (Infinity.XmppConnection) –
- replaced_by (Infinity.XmppConnection) –
 
- connection (
 
- 
classmethod 
Signal Details¶
- 
Infinity.XmppManager.signals.connection_added(xmpp_manager, connection)¶
- Signal Name: - connection-added- Flags: - Parameters: - xmpp_manager (Infinity.XmppManager) – The object which received the signal
- connection (Infinity.XmppConnection) – TheInfinity.XmppConnectionthat was added to xmpp_manager.
 - This signal is emitted whenever a new connection has been added to the - Infinity.XmppManager, via- Infinity.XmppManager.add_connection().
- xmpp_manager (
- 
Infinity.XmppManager.signals.connection_removed(xmpp_manager, object, p0)¶
- Signal Name: - connection-removed- Flags: - Parameters: - xmpp_manager (Infinity.XmppManager) – The object which received the signal
- object (Infinity.XmppConnection) –
- p0 (Infinity.XmppConnection) –
 
- xmpp_manager (