NepomukDaemons
Nepomuk::Search::QueryServiceClient Class Reference
Convenience frontend to the Nepomuk Query DBus Service. More...
#include <Nepomuk/Search/QueryServiceClient>

Public Slots | |
bool | blockingQuery (const Query &query) |
bool | blockingQuery (const QString &query) |
void | close () |
bool | query (const Query &query) |
bool | query (const QString &query) |
Signals | |
void | entriesRemoved (const QList< QUrl > &entries) |
void | finishedListing () |
void | newEntries (const QList< Nepomuk::Search::Result > &entries) |
Public Member Functions | |
QueryServiceClient (QObject *parent=0) | |
~QueryServiceClient () | |
Static Public Member Functions | |
static bool | serviceAvailable () |
Detailed Description
Convenience frontend to the Nepomuk Query DBus Service.The QueryServiceClient provides an easy way to access the Nepomuk Query Service without having to deal with any communication details. By default it monitors queries for changes.
Usage is simple: Create an instance of the client for each search you want to track. Once instance may also be reused for subsequent queries if further updates of the persistent query are not necessary.
Definition at line 47 of file queryserviceclient.h.
Constructor & Destructor Documentation
Nepomuk::Search::QueryServiceClient::QueryServiceClient | ( | QObject * | parent = 0 |
) |
Nepomuk::Search::QueryServiceClient::~QueryServiceClient | ( | ) |
Member Function Documentation
bool Nepomuk::Search::QueryServiceClient::blockingQuery | ( | const Query & | query | ) | [slot] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- See also:
- query(const Query&)
Definition at line 199 of file queryserviceclient.cpp.
bool Nepomuk::Search::QueryServiceClient::blockingQuery | ( | const QString & | query | ) | [slot] |
Start a query using the Nepomuk user query language.
Results will be reported as with query(const QString&) but a local event loop will be started to block the method call until all results have been listed.
The client will be closed after the initial listing. Thus, changes to results will not be reported as it is the case with the non-blocking methods.
- Returns:
true
if the query service was found and the query was started.false
otherwise.
- See also:
- query(const QString&), close()
Definition at line 184 of file queryserviceclient.cpp.
void Nepomuk::Search::QueryServiceClient::close | ( | ) | [slot] |
Close the client, thus stop to monitor the query for changes.
Without closing the client it will continue signalling changes to the results.
This will also make any blockingQuery return immediately.
Definition at line 214 of file queryserviceclient.cpp.
Emitted if the search results changed when monitoring a query.
- Parameters:
-
entries A list of resource URIs identifying the resources that dropped out of the query results.
void Nepomuk::Search::QueryServiceClient::finishedListing | ( | ) | [signal] |
Emitted when the initial listing has been finished, ie.
if all results have been reported via newEntries. If no further updates are necessary the client should be closed now.
void Nepomuk::Search::QueryServiceClient::newEntries | ( | const QList< Nepomuk::Search::Result > & | entries | ) | [signal] |
Emitted for new search results.
This signal is emitted both for the initial listing and for changes to the search.
bool Nepomuk::Search::QueryServiceClient::query | ( | const Query & | query | ) | [slot] |
Start a query.
Results will be reported via newEntries. All results have been reported once finishedListing has been emitted.
- Returns:
true
if the query service was found and the query was started.false
otherwise.
Definition at line 170 of file queryserviceclient.cpp.
bool Nepomuk::Search::QueryServiceClient::query | ( | const QString & | query | ) | [slot] |
Start a query using the Nepomuk user query language.
Results will be reported via newEntries. All results have been reported once finishedListing has been emitted.
- Returns:
true
if the query service was found and the query was started.false
otherwise.
- See also:
- QueryParser
Definition at line 156 of file queryserviceclient.cpp.
bool Nepomuk::Search::QueryServiceClient::serviceAvailable | ( | ) | [static] |
Check if the service is running.
- Returns:
true
if the Nepomuk query service is running and could be contacted via DBus,false
otherwise
Definition at line 227 of file queryserviceclient.cpp.
The documentation for this class was generated from the following files: