• 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
  • backup
backupmanager.h
Go to the documentation of this file.
1 /*
2  This file is part of the Nepomuk KDE project.
3  Copyright (C) 2010 Vishesh Handa <handa.vish@gmail.com>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) version 3, or any
9  later version accepted by the membership of KDE e.V. (or its
10  successor approved by the membership of KDE e.V.), which shall
11  act as a proxy defined in Section 6 of version 3 of the license.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 
23 #ifndef BACKUPMANAGER_H
24 #define BACKUPMANAGER_H
25 
26 #include <QtCore/QObject>
27 #include <QtCore/QDateTime>
28 #include <QtCore/QTimer>
29 
30 #include <Soprano/Model>
31 
32 #include <KConfig>
33 #include <KJob>
34 
35 namespace Nepomuk2 {
36 
37  class Storage;
38 
39  class BackupManager : public QObject
40  {
41  Q_OBJECT
42  Q_CLASSINFO("D-Bus Interface", "org.kde.nepomuk.BackupManager")
43 
44  public:
45  BackupManager(Storage* storageService);
46  virtual ~BackupManager();
47 
48  public slots:
49  void backup( const QString & url = QString() );
50  void backupTagsAndRatings( const QString & url = QString() );
51  void restore(const QString & url );
52 
53  signals:
54  void backupStarted();
55  void backupDone();
56  void backupError(const QString& error);
57  void backupPercent(int percent);
58 
59  void restoreStarted();
60  void restoreDone();
61  void restoreError(const QString& error);
62  void restorePercent(int percent);
63  private:
64  QString m_backupLocation;
65 
66  QTime m_backupTime;
67  int m_daysBetweenBackups;
68  int m_maxBackups;
69 
70  KConfig m_config;
71 
72  QTimer m_timer;
73  void resetTimer();
74  void removeOldBackups();
75 
76  Soprano::Model* m_model;
77  Storage* m_storageService;
78 
79  private slots:
80  void slotConfigDirty();
81  void automatedBackup();
82 
83  // Backup
84  void slotBackupDone(KJob * job);
85  void slotBackupPercent(KJob* job, ulong percent);
86 
87  // Backup Restoration
88  void slotRestorationDone(KJob* job);
89  void slotRestorationPercent(KJob* job, ulong percent);
90  };
91 
92 }
93 #endif // BACKUPMANAGER_H
Nepomuk2::BackupManager::restorePercent
void restorePercent(int percent)
Nepomuk2::BackupManager::backup
void backup(const QString &url=QString())
Definition: backupmanager.cpp:78
Nepomuk2::BackupManager
Definition: backupmanager.h:39
Nepomuk2::Storage
Definition: storage.h:35
Nepomuk2::BackupManager::restoreStarted
void restoreStarted()
QObject
Nepomuk2::BackupManager::backupPercent
void backupPercent(int percent)
Nepomuk2::BackupManager::~BackupManager
virtual ~BackupManager()
Definition: backupmanager.cpp:73
Nepomuk2::BackupManager::restore
void restore(const QString &url)
Definition: backupmanager.cpp:254
Nepomuk2::BackupManager::restoreError
void restoreError(const QString &error)
Nepomuk2::BackupManager::backupDone
void backupDone()
Nepomuk2::BackupManager::backupError
void backupError(const QString &error)
Nepomuk2::BackupManager::restoreDone
void restoreDone()
Nepomuk2::BackupManager::backupTagsAndRatings
void backupTagsAndRatings(const QString &url=QString())
Definition: backupmanager.cpp:104
Nepomuk2::BackupManager::backupStarted
void backupStarted()
Nepomuk2::BackupManager::BackupManager
BackupManager(Storage *storageService)
Definition: backupmanager.cpp:46
KJob
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 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