Nepomuk
resourcemanager.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _NEPOMUK_RESOURCE_MANAGER_H_
00022 #define _NEPOMUK_RESOURCE_MANAGER_H_
00023
00024 #include "nepomuk_export.h"
00025
00026 #include <QtCore/QObject>
00027 #include <QtCore/QUrl>
00028
00029
00030 namespace Soprano {
00031 class Model;
00032 }
00033
00034 namespace Nepomuk {
00035 namespace Middleware {
00036 class Registry;
00037 }
00038
00039 class Resource;
00040 class Variant;
00041 class ResourceManagerHelper;
00042
00050 class NEPOMUK_EXPORT ResourceManager : public QObject
00051 {
00052 Q_OBJECT
00053
00054 public:
00055 static ResourceManager* instance();
00056
00068 int init();
00069
00074 bool initialized() const;
00075
00079 Soprano::Model* mainModel();
00080
00089 void setOverrideMainModel( Soprano::Model* model );
00090
00101 KDE_DEPRECATED Resource createResourceFromUri( const QString& uri );
00102
00109 void removeResource( const QString& uri );
00110
00117 QList<Resource> allResourcesOfType( const QUrl& type );
00118
00122 KDE_DEPRECATED QList<Resource> allResourcesOfType( const QString& type );
00123
00135 QList<Resource> allResourcesWithProperty( const QUrl& uri, const Variant& v );
00136
00140 KDE_DEPRECATED QList<Resource> allResourcesWithProperty( const QString& uri, const Variant& v );
00141
00146 QString generateUniqueUri();
00147
00151 void notifyError( const QString& uri, int errorCode );
00152
00153 Q_SIGNALS:
00163 void resourceModified( const QString& uri );
00164
00172 void error( const QString& uri, int errorCode );
00173
00174
00175
00176 private Q_SLOTS:
00177
00178 void slotStoreChanged();
00179
00180 private:
00181 friend class Nepomuk::ResourceManagerHelper;
00182 ResourceManager();
00183 ~ResourceManager();
00184
00185 class Private;
00186 Private* const d;
00187 };
00188 }
00189
00190 #endif