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
50 ~SyncBackup ();
51
53 static const char *DBUS_BACKUP_OBJECT;
54
59
63 void sendReply (uchar aResult);
64
65signals:
66
67public slots:
68 // From backup framework ...
69
74 uchar backupStarts(const QDBusMessage &message);
75
80 uchar backupFinished(const QDBusMessage &message);
81
86 uchar restoreStarts(const QDBusMessage &message);
87
92 uchar restoreFinished(const QDBusMessage &message);
93
97 void backupServiceUnregistered(const QString &serviceName);
98
99private :
100 bool iBackupRestore;
101 QDBusMessage *iReply;
102 QDBusServiceWatcher *iWatchService;
103 SyncBackupAdaptor *iAdaptor;
104 // Reply to backup dbus framework that response will
105 // be delayed
106 uchar sendDelayReply (const QDBusMessage &message);
107
108#ifdef SYNCFW_UNIT_TESTS
109 friend class SyncBackupTest;
110#endif
111
112};
113
114}
115
116#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:37
uchar backupFinished(const QDBusMessage &message)
Definition: SyncBackup.cpp:131
void backupServiceUnregistered(const QString &serviceName)
Definition: SyncBackup.cpp:76
void sendReply(uchar aResult)
Reply to backup framework, result of o/p.
Definition: SyncBackup.cpp:102
~SyncBackup()
Destructor.
Definition: SyncBackup.cpp:62
static const char * DBUS_BACKUP_OBJECT
path to the backup dbus object
Definition: SyncBackup.h:53
uchar restoreStarts(const QDBusMessage &message)
Definition: SyncBackup.cpp:141
bool getBackUpRestoreState()
Requests the current state og backup/restore operation.
Definition: SyncBackup.cpp:160
uchar restoreFinished(const QDBusMessage &message)
Definition: SyncBackup.cpp:150
uchar backupStarts(const QDBusMessage &message)
Called by backup framework when backup starts.
Definition: SyncBackup.cpp:122