• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

NepomukDaemons

queryservice.h

Go to the documentation of this file.
00001 /* 
00002    Copyright (c) 2008 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 Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
00017 */
00018 
00019 #ifndef _NEPOMUK_VIRTUAL_FOLDER_SERVICE_H_
00020 #define _NEPOMUK_VIRTUAL_FOLDER_SERVICE_H_
00021 
00022 #include <Nepomuk/Service>
00023 
00024 #include <QtCore/QUrl>
00025 #include <QtCore/QVariant>
00026 #include <QtCore/QMultiHash>
00027 
00028 class QDBusObjectPath;
00029 class QDBusMessage;
00030 
00031 
00032 namespace Nepomuk {
00033     namespace Search {
00034 
00035         class Folder;
00036         class FolderConnection;
00037         class Query;
00038 
00039         class QueryService : public Service
00040         {
00041             Q_OBJECT
00042             Q_CLASSINFO( "D-Bus Interface", "org.kde.nepomuk.QueryService" )
00043 
00044         public:
00045             QueryService( QObject* parent, const QVariantList& );
00046             ~QueryService();
00047 
00048             Soprano::Model* mainModel();
00049 
00050             static QueryService* instance();
00051             
00052         public Q_SLOTS:
00053             Q_SCRIPTABLE QDBusObjectPath query( const QString& query, const QStringList& props, const QDBusMessage& msg );
00054             Q_SCRIPTABLE QDBusObjectPath query( const Nepomuk::Search::Query& query, const QDBusMessage& msg );
00055 
00056         private Q_SLOTS:
00057             void slotServiceOwnerChanged( const QString& serviceName,
00058                                           const QString&,
00059                                           const QString& newOwner );
00060             void slotFolderDestroyed( QObject* folder );
00061             void slotFolderConnectionDestroyed( QObject* conn );
00062         
00063         private:
00067             Folder* getFolder( const Query& query );
00068 
00069             static QueryService* s_instance;
00070 
00071             QHash<Query, Folder*> m_openFolders;
00072             QHash<Folder*, Query> m_folderQueryHash;
00073             QMultiHash<QString, FolderConnection*> m_openConnections;      // maps from DBus service to connection
00074             QHash<FolderConnection*, QString> m_connectionDBusServiceHash; // maps connections to their using dbus service
00075 
00076             int m_folderConnectionCnt; // only used for unique dbus object path generation
00077         };
00078     }
00079 }
00080 
00081 #endif

NepomukDaemons

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

API Reference

Skip menu "API Reference"
  • KCMShell
  • KNotify
  • KStyles
  • Nepomuk Daemons
Generated for API Reference by doxygen 1.5.7
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