• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Nepomuk

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk
  • query
queryserviceclient.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2008-2010 Sebastian Trueg <trueg@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) version 3, or any
8  later version accepted by the membership of KDE e.V. (or its
9  successor approved by the membership of KDE e.V.), which shall
10  act as a proxy defined in Section 6 of version 3 of the license.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public
18  License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef _NEPOMUK_QUERY_SERVICE_CLIENT_H_
22 #define _NEPOMUK_QUERY_SERVICE_CLIENT_H_
23 
24 #include <QtCore/QObject>
25 
26 #include "property.h"
27 #include "query.h"
28 
29 #include "nepomukquery_export.h"
30 
31 class QUrl;
32 
33 namespace Nepomuk {
34  namespace Query {
35 
36  class Result;
37 
58  class NEPOMUKQUERY_EXPORT QueryServiceClient : public QObject
59  {
60  Q_OBJECT
61 
62  public:
66  QueryServiceClient( QObject* parent = 0 );
67 
71  ~QueryServiceClient();
72 
78  static bool serviceAvailable();
79 
102  static QList<Nepomuk::Query::Result> syncQuery( const Query& query, bool *ok = 0 );
103 
118  static QList<Nepomuk::Query::Result> syncSparqlQuery( const QString& query,
119  const Nepomuk::Query::RequestPropertyMap& requestPropertyMap = Nepomuk::Query::RequestPropertyMap(),
120  bool *ok = 0 );
121 
134  static QList<Nepomuk::Query::Result> syncDesktopQuery( const QString& query, bool *ok = 0 );
135 
136  public Q_SLOTS:
148  bool query( const Query& query );
149 
201  bool sparqlQuery( const QString& query, const Nepomuk::Query::RequestPropertyMap& requestPropertyMap = Nepomuk::Query::RequestPropertyMap() );
202 
208  bool desktopQuery( const QString& query );
209 
228  bool blockingQuery( const Query& query );
229 
239  bool blockingSparqlQuery( const QString& query, const Nepomuk::Query::RequestPropertyMap& requestPropertyMap = Nepomuk::Query::RequestPropertyMap() );
240 
248  bool blockingDesktopQuery( const QString& query );
249 
257  void close();
258 
265  bool isListingFinished() const;
266 
273  QString errorMessage() const;
274 
275  Q_SIGNALS:
280  void newEntries( const QList<Nepomuk::Query::Result>& entries );
281 
287  void entriesRemoved( const QList<QUrl>& entries );
288 
301  void resultCount( int count );
302 
312  void finishedListing();
313 
321  void error( const QString& errorMessage );
322 
328  void serviceAvailabilityChanged( bool running );
329 
330  private:
331  class Private;
332  Private* const d;
333 
334  Q_PRIVATE_SLOT( d, void _k_entriesRemoved( const QStringList& ) )
335  Q_PRIVATE_SLOT( d, void _k_finishedListing() )
336  Q_PRIVATE_SLOT( d, void _k_handleQueryReply(QDBusPendingCallWatcher*) )
337  Q_PRIVATE_SLOT( d, void _k_serviceRegistered( const QString& ) )
338  Q_PRIVATE_SLOT( d, void _k_serviceUnregistered( const QString& ) )
339  };
340  }
341 }
342 
343 #endif
Nepomuk::Query::RequestPropertyMap
QHash< QString, Nepomuk::Types::Property > RequestPropertyMap
Convinience definition for request property mappings as used in QueryServiceClient::sparqlQuery() and...
Definition: query.h:41
Nepomuk::Query::QueryServiceClient
Convenience frontend to the Nepomuk Query DBus Service.
Definition: queryserviceclient.h:58
Nepomuk::Query::Query
A Nepomuk desktop query.
Definition: query.h:76
QObject
property.h
query.h
nepomukquery_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk

Skip menu "Nepomuk"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal