Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / runtime / nepomuk / repository.h
blob0103930a2135c619742c4a673ed9954d90f7d648
1 /*
3 * $Id: sourceheader 511311 2006-02-19 14:51:05Z trueg $
5 * This file is part of the Nepomuk KDE project.
6 * Copyright (C) 2006-2007 Sebastian Trueg <trueg@kde.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 * See the file "COPYING" for the exact licensing terms.
15 #ifndef _REPOSITORY_H_
16 #define _REPOSITORY_H_
18 #include <QtCore/QString>
19 #include <QtCore/QMap>
21 #include <soprano/version.h>
23 #ifndef SOPRANO_IS_VERSION
24 #define SOPRANO_IS_VERSION(a,b,c) false
25 #endif
27 #if SOPRANO_IS_VERSION(2,0,90)
28 #include <Soprano/Util/SignalCacheModel>
29 #else
30 #include <Soprano/FilterModel>
31 #endif
34 namespace Soprano {
35 class Model;
36 namespace Index {
37 class IndexFilterModel;
38 class CLuceneIndex;
42 namespace Nepomuk {
44 class Repository : public
45 #if SOPRANO_IS_VERSION(2,0,90)
46 Soprano::Util::SignalCacheModel
47 #else
48 Soprano::FilterModel
49 #endif
51 Q_OBJECT
53 public:
54 ~Repository();
56 QString name() const { return m_name; }
58 static Repository* open( const QString& path, const QString& name );
60 private:
61 Repository();
63 QString m_name;
64 Soprano::Model* m_model;
65 Soprano::Index::CLuceneIndex* m_index;
66 Soprano::Index::IndexFilterModel* m_indexModel;
69 typedef QMap<QString, Repository*> RepositoryMap;
72 #endif