• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.9.5 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 
00199         int typeCount() const;
00200 
00207         QList<Nepomuk::Resource> resources() const;
00208 
00216         int resourceCount() const;
00217 
00224         QList<Types::Property> properties() const;
00225 
00233         int propertyCount() const;
00234 
00242         bool start();
00243 
00250         void stop();
00251 
00252     Q_SIGNALS:
00259         void resourceCreated( const Nepomuk::Resource & resource, const QList<QUrl>& types ); //FIXME: Use either Resource or uri, not a mix
00260 
00267         void resourceRemoved( const QUrl & uri, const QList<QUrl>& types );
00268 
00275         void resourceTypeAdded( const Nepomuk::Resource & res, const Types::Class & type );
00276 
00285         void resourceTypeRemoved( const Nepomuk::Resource & res, const Types::Class & type );
00286 
00293         void propertyAdded( const Nepomuk::Resource & resource,
00294                             const Nepomuk::Types::Property & property,
00295                             const QVariant & value );
00296 
00303         void propertyRemoved( const Nepomuk::Resource & resource,
00304                               const Nepomuk::Types::Property & property,
00305                               const QVariant & value );
00306 
00321         void propertyChanged( const Nepomuk::Resource & resource,
00322                               const Nepomuk::Types::Property & property,
00323                               const QVariantList & oldValue,
00324                               const QVariantList & newValue );
00325 
00326     private Q_SLOTS:
00327         void slotResourceCreated(const QString& res, const QStringList& types);
00328         void slotResourceRemoved(const QString& res, const QStringList& types);
00329         void slotResourceTypeAdded(const QString& res, const QString& type);
00330         void slotResourceTypeRemoved(const QString& res, const QString& type);
00331         void slotPropertyAdded(const QString& res, const QString& prop, const QVariantList& objects);
00332         void slotPropertyRemoved(const QString& res, const QString& prop, const QVariantList& objects);
00333         void slotPropertyChanged(const QString& res, const QString& prop,
00334                                  const QVariantList & oldObjs,
00335                                  const QVariantList & newObjs);
00336     private:
00337         class Private;
00338         Private * d;
00339     };
00340 }
00341 
00342 #endif // RESOURCEWATCHER_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Mon Jan 21 2019 12:30:24 by doxygen 1.7.5.1 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.9.5 API Reference

Skip menu "kdelibs-4.9.5 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