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

Nepomuk

  • nepomuk
  • core
resourcewatcher.h
Go to the documentation of this file.
1 /*
2  This file is part of the Nepomuk KDE project.
3  Copyright (C) 2011 Vishesh Handa <handa.vish@gmail.com>
4  Copyright (C) 2011 Sebastian Trueg <trueg@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 
22 #ifndef RESOURCEWATCHER_H
23 #define RESOURCEWATCHER_H
24 
25 #include "../types/class.h"
26 #include "../types/property.h"
27 #include "resource.h"
28 
29 #include <QtDBus/QDBusVariant>
30 #include <QtCore/QVariant>
31 
32 namespace Nepomuk {
33 
78  class ResourceWatcher : public QObject
79  {
80  Q_OBJECT
81 
82  public:
89  ResourceWatcher( QObject* parent = 0 );
90 
94  virtual ~ResourceWatcher();
95 
96  public Q_SLOTS:
104  void addType( const Types::Class & type );
105 
114  void addResource( const Nepomuk::Resource & res );
115 
124  void addProperty( const Types::Property & property );
125 
133  void removeType( const Types::Class & type );
134 
143  void removeResource( const Nepomuk::Resource & res );
144 
153  void removeProperty( const Types::Property & property );
154 
162  void setTypes( const QList<Types::Class> & types_ );
163 
172  void setResources( const QList<Nepomuk::Resource> & resources_ );
173 
182  void setProperties( const QList<Types::Property> & properties_ );
183 
190  QList<Types::Class> types() const;
191 
198  QList<Nepomuk::Resource> resources() const;
199 
206  QList<Types::Property> properties() const;
207 
215  bool start();
216 
223  void stop();
224 
225  Q_SIGNALS:
232  void resourceCreated( const Nepomuk::Resource & resource, const QList<QUrl>& types ); //FIXME: Use either Resource or uri, not a mix
233 
240  void resourceRemoved( const QUrl & uri, const QList<QUrl>& types );
241 
248  void resourceTypeAdded( const Nepomuk::Resource & res, const Types::Class & type );
249 
258  void resourceTypeRemoved( const Nepomuk::Resource & res, const Types::Class & type );
259 
266  void propertyAdded( const Nepomuk::Resource & resource,
267  const Nepomuk::Types::Property & property,
268  const QVariant & value );
269 
276  void propertyRemoved( const Nepomuk::Resource & resource,
277  const Nepomuk::Types::Property & property,
278  const QVariant & value );
279 
294  void propertyChanged( const Nepomuk::Resource & resource,
295  const Nepomuk::Types::Property & property,
296  const QVariantList & oldValue,
297  const QVariantList & newValue );
298 
299  private Q_SLOTS:
300  void slotResourceCreated(const QString& res, const QStringList& types);
301  void slotResourceRemoved(const QString& res, const QStringList& types);
302  void slotResourceTypeAdded(const QString& res, const QString& type);
303  void slotResourceTypeRemoved(const QString& res, const QString& type);
304  void slotPropertyAdded(const QString& res, const QString& prop, const QVariantList& objects);
305  void slotPropertyRemoved(const QString& res, const QString& prop, const QVariantList& objects);
306  void slotPropertyChanged(const QString& res, const QString& prop,
307  const QVariantList & oldObjs,
308  const QVariantList & newObjs);
309  private:
310  class Private;
311  Private * d;
312  };
313 }
314 
315 #endif // RESOURCEWATCHER_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Fri Nov 16 2012 14:54:54 by doxygen 1.8.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.8.5 API Reference

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