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

Nepomuk

queryserviceclient.h

Go to the documentation of this file.
00001 /*
00002    Copyright (c) 2008-2010 Sebastian Trueg <trueg@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) version 3, or any
00008    later version accepted by the membership of KDE e.V. (or its
00009    successor approved by the membership of KDE e.V.), which shall
00010    act as a proxy defined in Section 6 of version 3 of the license.
00011 
00012    This library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Lesser General Public License for more details.
00016 
00017    You should have received a copy of the GNU Lesser General Public
00018    License along with this library.  If not, see <http://www.gnu.org/licenses/>.
00019 */
00020 
00021 #ifndef _NEPOMUK_QUERY_SERVICE_CLIENT_H_
00022 #define _NEPOMUK_QUERY_SERVICE_CLIENT_H_
00023 
00024 #include <QtCore/QObject>
00025 
00026 #include "property.h"
00027 #include "query.h"
00028 
00029 #include "nepomukquery_export.h"
00030 
00031 class QUrl;
00032 
00033 namespace Nepomuk {
00034     namespace Query {
00035 
00036         class Result;
00037 
00058         class NEPOMUKQUERY_EXPORT QueryServiceClient : public QObject
00059         {
00060             Q_OBJECT
00061 
00062         public:
00066             QueryServiceClient( QObject* parent = 0 );
00067 
00071             ~QueryServiceClient();
00072 
00078             static bool serviceAvailable();
00079 
00102             static QList<Nepomuk::Query::Result> syncQuery( const Query& query, bool *ok = 0 );
00103 
00118             static QList<Nepomuk::Query::Result> syncSparqlQuery( const QString& query,
00119                             const Nepomuk::Query::RequestPropertyMap& requestPropertyMap = Nepomuk::Query::RequestPropertyMap(),
00120                             bool *ok = 0 );
00121 
00134             static QList<Nepomuk::Query::Result> syncDesktopQuery( const QString& query, bool *ok = 0 );
00135 
00136         public Q_SLOTS:
00148             bool query( const Query& query );
00149 
00201             bool sparqlQuery( const QString& query, const Nepomuk::Query::RequestPropertyMap& requestPropertyMap = Nepomuk::Query::RequestPropertyMap() );
00202 
00208             bool desktopQuery( const QString& query );
00209 
00228             bool blockingQuery( const Query& query );
00229 
00239             bool blockingSparqlQuery( const QString& query, const Nepomuk::Query::RequestPropertyMap& requestPropertyMap = Nepomuk::Query::RequestPropertyMap() );
00240 
00248             bool blockingDesktopQuery( const QString& query );
00249 
00257             void close();
00258 
00265             bool isListingFinished() const;
00266 
00273             QString errorMessage() const;
00274 
00275         Q_SIGNALS:
00280             void newEntries( const QList<Nepomuk::Query::Result>& entries );
00281 
00287             void entriesRemoved( const QList<QUrl>& entries );
00288 
00301             void resultCount( int count );
00302 
00312             void finishedListing();
00313 
00321             void error( const QString& errorMessage );
00322 
00323         private:
00324             class Private;
00325             Private* const d;
00326 
00327             Q_PRIVATE_SLOT( d, void _k_entriesRemoved( const QStringList& ) )
00328             Q_PRIVATE_SLOT( d, void _k_finishedListing() )
00329             Q_PRIVATE_SLOT( d, void _k_handleQueryReply(QDBusPendingCallWatcher*) )
00330         };
00331     }
00332 }
00333 
00334 #endif

Nepomuk

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal