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

Nepomuk

resourcewatcher.h
Go to the documentation of this file.
00001 /*
00002     This file is part of the Nepomuk KDE project.
00003     Copyright (C) 2011  Vishesh Handa <handa.vish@gmail.com>
00004     Copyright (C) 2011 Sebastian Trueg <trueg@kde.org>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Lesser General Public
00008     License as published by the Free Software Foundation; either
00009     version 2.1 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Lesser General Public License for more details.
00015 
00016     You should have received a copy of the GNU Lesser General Public
00017     License along with this library; if not, write to the Free Software
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00019 */
00020 
00021 
00022 #ifndef RESOURCEWATCHER_H
00023 #define RESOURCEWATCHER_H
00024 
00025 #include "../types/class.h"
00026 #include "../types/property.h"
00027 #include "resource.h"
00028 
00029 #include <QtDBus/QDBusVariant>
00030 #include <QtCore/QVariant>
00031 
00032 namespace Nepomuk {
00033 
00078     class ResourceWatcher : public QObject
00079     {
00080         Q_OBJECT
00081 
00082     public:
00089         ResourceWatcher( QObject* parent = 0 );
00090 
00094         virtual ~ResourceWatcher();
00095 
00096     public Q_SLOTS:
00104         void addType( const Types::Class & type );
00105 
00114         void addResource( const Nepomuk::Resource & res );
00115 
00124         void addProperty( const Types::Property & property );
00125 
00133         void removeType( const Types::Class & type );
00134 
00143         void removeResource( const Nepomuk::Resource & res );
00144 
00153         void removeProperty( const Types::Property & property );
00154 
00162         void setTypes( const QList<Types::Class> & types_ );
00163 
00172         void setResources( const QList<Nepomuk::Resource> & resources_ );
00173 
00182         void setProperties( const QList<Types::Property> & properties_ );
00183 
00190         QList<Types::Class> types() const;
00191 
00198         QList<Nepomuk::Resource> resources() const;
00199 
00206         QList<Types::Property> properties() const;
00207 
00215         bool start();
00216 
00223         void stop();
00224 
00225     Q_SIGNALS:
00232         void resourceCreated( const Nepomuk::Resource & resource, const QList<QUrl>& types ); //FIXME: Use either Resource or uri, not a mix
00233 
00240         void resourceRemoved( const QUrl & uri, const QList<QUrl>& types );
00241 
00248         void resourceTypeAdded( const Nepomuk::Resource & res, const Types::Class & type );
00249 
00258         void resourceTypeRemoved( const Nepomuk::Resource & res, const Types::Class & type );
00259 
00266         void propertyAdded( const Nepomuk::Resource & resource,
00267                             const Nepomuk::Types::Property & property,
00268                             const QVariant & value );
00269 
00276         void propertyRemoved( const Nepomuk::Resource & resource,
00277                               const Nepomuk::Types::Property & property,
00278                               const QVariant & value );
00279 
00294         void propertyChanged( const Nepomuk::Resource & resource,
00295                               const Nepomuk::Types::Property & property,
00296                               const QVariantList & oldValue,
00297                               const QVariantList & newValue );
00298 
00299     private Q_SLOTS:
00300         void slotResourceCreated(const QString& res, const QStringList& types);
00301         void slotResourceRemoved(const QString& res, const QStringList& types);
00302         void slotResourceTypeAdded(const QString& res, const QString& type);
00303         void slotResourceTypeRemoved(const QString& res, const QString& type);
00304         void slotPropertyAdded(const QString& res, const QString& prop, const QVariantList& objects);
00305         void slotPropertyRemoved(const QString& res, const QString& prop, const QVariantList& objects);
00306         void slotPropertyChanged(const QString& res, const QString& prop,
00307                                  const QVariantList & oldObjs,
00308                                  const QVariantList & newObjs);
00309     private:
00310         class Private;
00311         Private * d;
00312     };
00313 }
00314 
00315 #endif // RESOURCEWATCHER_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Wed May 2 2012 17:32:54 by doxygen 1.8.0 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-4.8.3 API Reference

Skip menu "kdelibs-4.8.3 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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