Soprano::Client::LocalSocketClient Class Reference

Creates a connection to the Soprano server through a local socket interface. More...

#include <Soprano/Client/LocalSocketClient>

Inheritance diagram for Soprano::Client::LocalSocketClient:

Inheritance graph
[legend]

List of all members.

Public Slots

bool connect (const QString &name=QString())
void disconnect ()

Public Member Functions

 LocalSocketClient (QObject *parent=0)
virtual ~LocalSocketClient ()
bool isConnected () const
ModelcreateModel (const QString &name, const QList< BackendSetting > &settings=QList< BackendSetting >())
void removeModel (const QString &name)


Detailed Description

Creates a connection to the Soprano server through a local socket interface.

The Soprano server supports more than one way of communication. Beside D-Bus (see DBusClient) it can be contacted via a local socket.

Models creates by this client are thread-safe and provide faster access to the server than D-Bus communication.

Warning:
The LocalSocketClient does not support signals. Thus, the models created by it will not emit signals such as Model::statementAdded.
Author:
Sebastian Trueg <trueg@kde.org>
Since:
2.1

Definition at line 57 of file localsocketclient.h.


Constructor & Destructor Documentation

Soprano::Client::LocalSocketClient::LocalSocketClient ( QObject parent = 0  ) 

Create a new Client instance.

virtual Soprano::Client::LocalSocketClient::~LocalSocketClient (  )  [virtual]

Destructor.


Member Function Documentation

bool Soprano::Client::LocalSocketClient::isConnected (  )  const

Check if the client is connected to a server.

Returns:
true if this client is connected to a server, false otherwise.

Model* Soprano::Client::LocalSocketClient::createModel ( const QString name,
const QList< BackendSetting > &  settings = QListBackendSetting >() 
)

Creates a new Model instance that wraps a server model. Client models are very light wrappers and creating them is very fast.

Parameters:
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.
Returns:
A new Model instance wrapping the requested server model or 0 on error (check lastError() for details.)

void Soprano::Client::LocalSocketClient::removeModel ( const QString name  ) 

Deletes a model including all its data.

Parameters:
name The name of the model to remove.
Warning:
Calling this method will remove all data physically. It can not be reverted. Use with care.

bool Soprano::Client::LocalSocketClient::connect ( const QString name = QString()  )  [slot]

Tries to connect to the Soprano server.

Returns:
true on success, false if an error occured. Check lastError() for details.

void Soprano::Client::LocalSocketClient::disconnect (  )  [slot]

Disconnect from the server. The created model instances are not deleted but remain useless; open iterators are closed.


The documentation for this class was generated from the following file:

Generated on Tue Jul 22 17:39:35 2008 for Soprano by  doxygen 1.5.6