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

Nepomuk-Core

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk-core
  • services
  • storage
storage.h
Go to the documentation of this file.
1 /* This file is part of the KDE Project
2  Copyright (c) 2008 Sebastian Trueg <trueg@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef _NEPOMUK_STORAGE_H_
20 #define _NEPOMUK_STORAGE_H_
21 
22 #include "service2.h"
23 #include <Soprano/Model>
24 
25 class KJob;
26 
27 namespace Nepomuk2 {
28 
29  namespace Query {
30  class QueryService;
31  }
32  class BackupManager;
33  class Repository;
34 
35  class Storage : public Service2
36  {
37  Q_OBJECT
38  Q_CLASSINFO( "D-Bus Interface", "org.kde.nepomuk.Storage" )
39 
40  public:
41  Storage();
42  ~Storage();
43 
44  Soprano::Model* model();
45 
46  public Q_SLOTS:
47  Q_SCRIPTABLE QString usedSopranoBackend() const;
48 
56  void resetRepository();
57 
58  Q_SCRIPTABLE void closePublicInterfaces();
59  Q_SCRIPTABLE void openPublicInterfaces();
60 
61  Q_SCRIPTABLE void migrateGraphs();
62  Q_SCRIPTABLE void migrateGraphsByBackup();
63  signals:
64  // Used by the BackupManager to know we're back online after a reset
65  void resetRepositoryDone(const QString& oldPath, const QString& newPath);
66 
67  Q_SCRIPTABLE void migrateGraphsDone();
68  Q_SCRIPTABLE void migrateGraphsPercent(int percent);
69 
70  private Q_SLOTS:
71  void slotRepositoryLoaded( Repository* repo, bool success );
72  void slotRepositoryClosed();
73  void slotRepositoryClosedAfterReset();
74 
75  void slotMigrationPercent(KJob*, ulong percent);
76  void slotMigrationDone();
77 
78  void slotMigrationBackupProgress(int percent);
79  void slotMigrationRestoreProgress(int percent);
80  void slotMigrationBackupDone();
81  void slotMigrationRestoreDone();
82  void slotMigrationResetDone(const QString& old, const QString& newPath);
83 
84  private:
85  Repository* m_repository;
86 
87  Query::QueryService* m_queryService;
88  BackupManager* m_backupManager;
89 
90  bool m_resetInProgress;
91  QString m_oldPath;
92  QString m_newPath;
93 
94  bool dataMigrationRequired();
95  void setDataMigrated();
96  bool hasMigrationData();
97  };
98 }
99 
100 #endif
Nepomuk2::Storage::usedSopranoBackend
Q_SCRIPTABLE QString usedSopranoBackend() const
Definition: storage.cpp:299
Nepomuk2::Storage::openPublicInterfaces
Q_SCRIPTABLE void openPublicInterfaces()
Definition: storage.cpp:106
Nepomuk2::BackupManager
Definition: backupmanager.h:39
Nepomuk2::Storage::migrateGraphsByBackup
Q_SCRIPTABLE void migrateGraphsByBackup()
Definition: storage.cpp:200
Nepomuk2::Storage
Definition: storage.h:35
Nepomuk2::Storage::model
Soprano::Model * model()
Definition: storage.cpp:304
Nepomuk2::Storage::migrateGraphsDone
Q_SCRIPTABLE void migrateGraphsDone()
Nepomuk2::Service2
New Base class for all Nepomuk services.
Definition: service2.h:88
service2.h
Nepomuk2::Storage::migrateGraphsPercent
Q_SCRIPTABLE void migrateGraphsPercent(int percent)
Nepomuk2::Repository
Represents the main Nepomuk model.
Definition: repository.h:53
Nepomuk2::Storage::~Storage
~Storage()
Definition: storage.cpp:65
Nepomuk2::Storage::resetRepositoryDone
void resetRepositoryDone(const QString &oldPath, const QString &newPath)
Nepomuk2::Storage::resetRepository
void resetRepository()
Switches off the Repository and renames the database directory to a new name.
Definition: storage.cpp:162
Nepomuk2::Storage::Storage
Storage()
Definition: storage.cpp:46
Nepomuk2::Storage::migrateGraphs
Q_SCRIPTABLE void migrateGraphs()
Definition: storage.cpp:269
Nepomuk2::Storage::closePublicInterfaces
Q_SCRIPTABLE void closePublicInterfaces()
Definition: storage.cpp:118
Nepomuk2::BackupManager
org::kde::nepomuk::BackupManager BackupManager
Definition: backupwizardpages.h:42
KJob
Nepomuk2::Query::QueryService
Definition: queryservice.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

Skip menu "Nepomuk-Core"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

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

Search



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