#include <Soprano/Client/TcpClient>
Public Member Functions | |
| TcpClient (QObject *parent=0) | |
| virtual | ~TcpClient () |
| bool | connect (const QHostAddress &address=QHostAddress::LocalHost, int port=DEFAULT_PORT) |
| bool | isConnected () |
| void | disconnect () |
| Model * | createModel (const QString &name, const QList< BackendSetting > &settings=QList< BackendSetting >()) |
Static Public Attributes | |
| static const quint16 | DEFAULT_PORT |
The Soprano server can be accessed normally through PluginManager::discoverBackendByName() with name "sopranoserver" or by simply creating an instance of TcpClient. The latter solution can have advantages as it uses a new connection to the server.
Definition at line 51 of file tcpclient.h.
| virtual Soprano::Client::TcpClient::~TcpClient | ( | ) | [virtual] |
Destructor.
| bool Soprano::Client::TcpClient::connect | ( | const QHostAddress & | address = QHostAddress::LocalHost, |
|
| int | port = DEFAULT_PORT | |||
| ) |
Tries to connect to the Soprano server.
true on success, false if an error occured. Check lastError() for details. | bool Soprano::Client::TcpClient::isConnected | ( | ) |
Check if the client is connected to a server.
true if this client is connected to a server, false otherwise. | void Soprano::Client::TcpClient::disconnect | ( | ) |
Disconnect from the server. The created model instances are not deleted but remain useless; open iterators are closed.
| Model* Soprano::Client::TcpClient::createModel | ( | const QString & | name, | |
| const QList< BackendSetting > & | settings = QList< BackendSetting >() | |||
| ) |
Creates a new Model instance that wraps a server model. Client models are very light wrappers and creating them is very fast.
| name | The name of the model to access. | |
| settings | The settings to send to the server for creating a new model. These settings may be ignored by the server if a model with that name has already been created. |
const quint16 Soprano::Client::TcpClient::DEFAULT_PORT [static] |
The default Soprano server connection port.
Definition at line 69 of file tcpclient.h.
1.5.4