Infinity.XmlConnection¶
- Implementations:
Methods¶
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
The X.509 certificate ( |
||
r |
A unique identification on the network for the local site |
||
r |
An identifier for the type of network this connection is on |
||
r |
The X.509 certificate of the remote site |
||
r |
A unique identification on the network for the remote site |
||
r |
The status of the connection. |
Signals¶
Name |
Short Description |
---|---|
This signal is emitted when an error occurs for this connection. |
|
Signal which is emitted when an XML node has been received by this connection. |
|
Signal which is emitted when an XML node has been successfully transmitted with this connection. |
Fields¶
None
Class Details¶
- class Infinity.XmlConnection¶
- Bases:
- Structure:
Infinity.XmlConnection
is an opaque data type. You should only access it via the public API functions.- close()¶
Closes the given connection.
- error(error)¶
- Parameters:
error (
GLib.Error
) – The error that occurred.
Emits the “error” signal on self. This will most likely only be useful to implementors.
Note that the error may or may not be fatal for the connection. If it is fatal, then a status notify to
Infinity.XmlConnectionStatus.CLOSING
orInfinity.XmlConnectionStatus.CLOSED
will follow. If you are implementing a custom class implementingInfinity.XmlConnection
, make sure to always emit the “error” signal before doing the status notify because many users of the connection will release their reference when the connection is no longer connected.
- open()¶
- Raises:
- Returns:
- Return type:
Attempts to open the given XML connection. If the process fails, error will be set. The connection needs to be in status
Infinity.XmlConnectionStatus.CLOSED
for this function to be called. Even if this function succeeds, the connection process can fail later. In that case the status of self will be reset toInfinity.XmlConnectionStatus.CLOSED
and theInfinity.XmlConnection
::error
signal will be emitted.
- received(xml)¶
- Parameters:
xml (
libxml2.NodePtr
) – The XML message that has been received.
Emits the “received” signal on self. This will most likely only be useful to implementors.
- send(xml)¶
- Parameters:
xml (
libxml2.NodePtr
) – A XML message to send. The function takes ownership of the XML node.
Sends the given XML message to the remote host.
- sent(xml)¶
- Parameters:
xml (
libxml2.NodePtr
) – The XML message that has been sent.
Emits the “sent” signal on self. This will most likely only be useful to implementors.
- do_close() virtual¶
Closes the given connection.
- do_error(error) virtual¶
- Parameters:
error (
GLib.Error
) – The error that occurred.
Emits the “error” signal on connection. This will most likely only be useful to implementors.
Note that the error may or may not be fatal for the connection. If it is fatal, then a status notify to
Infinity.XmlConnectionStatus.CLOSING
orInfinity.XmlConnectionStatus.CLOSED
will follow. If you are implementing a custom class implementingInfinity.XmlConnection
, make sure to always emit the “error” signal before doing the status notify because many users of the connection will release their reference when the connection is no longer connected.
- do_open() virtual¶
-
Attempts to open the given XML connection. If the process fails, error will be set. The connection needs to be in status
Infinity.XmlConnectionStatus.CLOSED
for this function to be called. Even if this function succeeds, the connection process can fail later. In that case the status of connection will be reset toInfinity.XmlConnectionStatus.CLOSED
and theInfinity.XmlConnection
::error
signal will be emitted.
- do_received(xml) virtual¶
- Parameters:
xml (
libxml2.NodePtr
) – The XML message that has been received.
Emits the “received” signal on connection. This will most likely only be useful to implementors.
- do_send(xml) virtual¶
- Parameters:
xml (
libxml2.NodePtr
) – A XML message to send. The function takes ownership of the XML node.
Sends the given XML message to the remote host.
- do_sent(xml) virtual¶
- Parameters:
xml (
libxml2.NodePtr
) – The XML message that has been sent.
Emits the “sent” signal on connection. This will most likely only be useful to implementors.
Signal Details¶
- Infinity.XmlConnection.signals.error(xml_connection, error)¶
- Signal Name:
error
- Flags:
- Parameters:
xml_connection (
Infinity.XmlConnection
) – The object which received the signalerror (
GLib.Error
) – A pointer to aGLib.Error
object with details on the error
This signal is emitted when an error occurs for this connection. For example, if the connection cannot be established and the status changes from
Infinity.XmlConnectionStatus.OPENING
toInfinity.XmlConnectionStatus.CLOSED
, then this signal is usually emitted with more details on the error.Note however that the error may or may not be fatal for the connection. If it is fatal, then a status notify to
Infinity.XmlConnectionStatus.CLOSING
orInfinity.XmlConnectionStatus.CLOSED
will follow.
- Infinity.XmlConnection.signals.received(xml_connection, node)¶
- Signal Name:
received
- Flags:
- Parameters:
xml_connection (
Infinity.XmlConnection
) – The object which received the signalnode (
object
orNone
) – Anlibxml2.NodePtr
referring to the XML node that has been received
Signal which is emitted when an XML node has been received by this connection.
- Infinity.XmlConnection.signals.sent(xml_connection, node)¶
- Signal Name:
sent
- Flags:
- Parameters:
xml_connection (
Infinity.XmlConnection
) – The object which received the signalnode (
object
orNone
) – Anlibxml2.NodePtr
referring to the XML node that has been sent
Signal which is emitted when an XML node has been successfully transmitted with this connection.
Property Details¶
- Infinity.XmlConnection.props.local_certificate¶
-
The X.509 certificate (
InfGnutls.X509Crt
) of the local site
- Infinity.XmlConnection.props.local_id¶
-
A unique identification on the network for the local site
- Infinity.XmlConnection.props.network¶
-
An identifier for the type of network this connection is on
- Infinity.XmlConnection.props.remote_certificate¶
- Name:
remote-certificate
- Type:
- Default Value:
- Flags:
The X.509 certificate of the remote site
- Infinity.XmlConnection.props.remote_id¶
-
A unique identification on the network for the remote site
- Infinity.XmlConnection.props.status¶
- Name:
status
- Type:
- Default Value:
- Flags:
The status of the connection.