#include <GXmlNetwork.h>
Inheritance diagram for GWE::GXmlNetwork:


Public Slots | |
| virtual void | setNetworkId (const QString &id)=0 |
| virtual void | setMasterServer (const QString &master)=0 |
| virtual bool | initNetwork ()=0 |
| virtual bool | closeNetwork ()=0 |
| virtual void | setPassword (const QString &password)=0 |
| virtual bool | send (QDomElement data, const QString &destination)=0 |
| virtual bool | send (const QString &data)=0 |
| virtual bool | flushOutput ()=0 |
| virtual void | makeDestinationAvailable (const QString &destination)=0 |
Signals | |
| void | networkConnected () |
| void | networkDisconnected () |
| void | networkError (int error_num, const QString &description, const QString &peer) |
| void | peerDisconnected (const QString &peerNetworkId) |
| void | dataAvailable (QDomElement data, const QString &source_peer) |
| void | presenceChanged (QString server, bool available) |
Public Member Functions | |
| GXmlNetwork (QObject *parent=0) | |
| virtual | ~GXmlNetwork () |
| virtual bool | isConnected ()=0 |
| virtual QString | getNetworkId () const =0 |
| virtual QString | getMasterServer () const =0 |
The GWE Server management logic is implemented in the data controller, which also knows to which destination server data should be sent. Thus this class can concentrate on providing reliable data transportation.
| GWE::GXmlNetwork::GXmlNetwork | ( | QObject * | parent = 0 |
) | [inline] |
Constructor.
| virtual GWE::GXmlNetwork::~GXmlNetwork | ( | ) | [inline, virtual] |
Virtaul Destructor.
| virtual bool GWE::GXmlNetwork::closeNetwork | ( | ) | [pure virtual, slot] |
Shuts down the network. This should be called when the GWE Server is shutting down, and AFTER all required tasks were performed to allow safe shutdown (moving data to other server, etc.).
Implemented in GWE::GXmlDirectNetwork, and GWE::GXmppNetwork.
| void GWE::GXmlNetwork::dataAvailable | ( | QDomElement | data, | |
| const QString & | source_peer | |||
| ) | [signal] |
Emitted when one complete DOM document was successfully read from given peer.
| virtual bool GWE::GXmlNetwork::flushOutput | ( | ) | [pure virtual, slot] |
Send all pending output data. This call blocks until all data was sent.
Implemented in GWE::GXmlDirectNetwork, and GWE::GXmppNetwork.
| virtual QString GWE::GXmlNetwork::getMasterServer | ( | ) | const [pure virtual] |
| virtual QString GWE::GXmlNetwork::getNetworkId | ( | ) | const [pure virtual] |
Implemented in GWE::GXmlDirectNetwork, and GWE::GXmppNetwork.
| virtual bool GWE::GXmlNetwork::initNetwork | ( | ) | [pure virtual, slot] |
Initialization.
Implemented in GWE::GXmlDirectNetwork, and GWE::GXmppNetwork.
| virtual bool GWE::GXmlNetwork::isConnected | ( | ) | [pure virtual] |
Implemented in GWE::GXmlDirectNetwork, and GWE::GXmppNetwork.
| virtual void GWE::GXmlNetwork::makeDestinationAvailable | ( | const QString & | destination | ) | [pure virtual, slot] |
Try to establish a connection to given destination.
Implemented in GWE::GXmlDirectNetwork, and GWE::GXmppNetwork.
| void GWE::GXmlNetwork::networkConnected | ( | ) | [signal] |
Emitted when the network has just been successfully connected.
| void GWE::GXmlNetwork::networkDisconnected | ( | ) | [signal] |
Emitted when the network gets disconnetected. It is also emitted when closeNetwork was called to shut down the connection.
| void GWE::GXmlNetwork::networkError | ( | int | error_num, | |
| const QString & | description, | |||
| const QString & | peer | |||
| ) | [signal] |
Emitted for any kind of error.
| peer | The address of the communication partner. Empty if communication was not peer to peer. |
| void GWE::GXmlNetwork::peerDisconnected | ( | const QString & | peerNetworkId | ) | [signal] |
Emitted if a peer GWE Server is disconnected.
| void GWE::GXmlNetwork::presenceChanged | ( | QString | server, | |
| bool | available | |||
| ) | [signal] |
Emitted when a GWE Server changes its presence state, for example if the other server goes offline.
| virtual bool GWE::GXmlNetwork::send | ( | const QString & | data | ) | [pure virtual, slot] |
Given string is directly sent, it's the responsibility of the application to make it XML compliant.
Implemented in GWE::GXmlDirectNetwork, and GWE::GXmppNetwork.
| virtual bool GWE::GXmlNetwork::send | ( | QDomElement | data, | |
| const QString & | destination | |||
| ) | [pure virtual, slot] |
Add data for transportation. It is up to the network implementation when the data is actually sent.
| data | The data that will be sent to the given network destination. | |
| destination | The GWE Server to which the data should be sent to. |
Implemented in GWE::GXmlDirectNetwork, and GWE::GXmppNetwork.
| virtual void GWE::GXmlNetwork::setMasterServer | ( | const QString & | master | ) | [pure virtual, slot] |
Sets the ID of the master server.
Implemented in GWE::GXmlDirectNetwork.
| virtual void GWE::GXmlNetwork::setNetworkId | ( | const QString & | id | ) | [pure virtual, slot] |
Sets the ID of this server.
Implemented in GWE::GXmlDirectNetwork.
| virtual void GWE::GXmlNetwork::setPassword | ( | const QString & | password | ) | [pure virtual, slot] |
Sets the password to be used
Implemented in GWE::GXmlDirectNetwork, and GWE::GXmppNetwork.
1.4.7