Buteo Synchronization Framework
SyncBackup.h
1/*
2 * This file is part of buteo-syncfw package
3 *
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5 *
6 * Contact: Sateesh Kavuri <sateesh.kavuri@nokia.com>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * version 2.1 as published by the Free Software Foundation.
11 *
12 * This library is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 *
22 */
23
24#ifndef SYNCBACKUP_H
25#define SYNCBACKUP_H
26
27#include "SyncBackupProxy.h"
28#include "SyncBackupAdaptor.h"
29
30namespace Buteo {
31
37class SyncBackup : public SyncBackupProxy // Derived from QObject
38{
39 Q_OBJECT
40
41public:
45 SyncBackup();
46
51
56
60 void sendReply (uchar aResult);
61
62public slots:
63 // From backup framework ...
64
69 uchar backupStarts(const QDBusMessage &message);
70
75 uchar backupFinished(const QDBusMessage &message);
76
81 uchar restoreStarts(const QDBusMessage &message);
82
87 uchar restoreFinished(const QDBusMessage &message);
88
89private:
90 bool iBackupRestore;
91 QDBusMessage *iReply;
92 SyncBackupAdaptor *iAdaptor;
93 // Reply to backup dbus framework that response will
94 // be delayed
95 void sendDelayReply(const QDBusMessage &message);
96
97#ifdef SYNCFW_UNIT_TESTS
98 friend class SyncBackupTest;
99#endif
100
101};
102
103}
104
105#endif // SYNCBACKUP_H
Adaptor class for interface com.nokia.backupclient.
Definition: SyncBackupAdaptor.h:52
Defines a D-Bus backup proxy for the backupclient.
Definition: SyncBackupProxy.h:41
Handles Sync requirements towards Backup.
Definition: SyncBackup.h:38
SyncBackup()
Default Constructor.
Definition: SyncBackup.cpp:35
uchar backupFinished(const QDBusMessage &message)
Definition: SyncBackup.cpp:109
void sendReply(uchar aResult)
Reply to backup framework, result of o/p.
Definition: SyncBackup.cpp:80
~SyncBackup()
Destructor.
Definition: SyncBackup.cpp:54
uchar restoreStarts(const QDBusMessage &message)
Definition: SyncBackup.cpp:119
bool getBackUpRestoreState()
Requests the current state og backup/restore operation.
Definition: SyncBackup.cpp:138
uchar restoreFinished(const QDBusMessage &message)
Definition: SyncBackup.cpp:128
uchar backupStarts(const QDBusMessage &message)
Called by backup framework when backup starts.
Definition: SyncBackup.cpp:100