Buteo Synchronization Framework: SyncClientInterfacePrivate.h Source File

Buteo Synchronization Framework

SyncClientInterfacePrivate.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 SYNCCLIENTINTERFACEPRIVATE_H
25#define SYNCCLIENTINTERFACEPRIVATE_H
26
27#include <QObject>
28#include "SyncDaemonProxy.h"
29#include <SyncProfile.h>
30
31namespace Buteo {
32
33class SyncProfile;
34class SyncSchedule;
35class SyncResults;
36class SyncClientInterface;
37
39 class SyncClientInterfacePrivate: public QObject
40{
41 Q_OBJECT
42public:
47 SyncClientInterfacePrivate(SyncClientInterface *aParent);
48
51 ~SyncClientInterfacePrivate();
52
57 bool startSync(const QString &aProfileId) const;
58
63 void abortSync(const QString &aProfileId) const;
64
69 QStringList getRunningSyncList();
70
75 bool removeProfile(QString &aProfileId);
76
81 bool updateProfile(Buteo::SyncProfile &aProfile);
82
87 bool getBackUpRestoreState();
88
93 bool isValid();
94
106 bool setSyncSchedule(QString &aProfileId, SyncSchedule &aSchedule);
107
114 bool saveSyncResults(const QString &aProfileId, const Buteo::SyncResults &aSyncResults);
115
120 Buteo::SyncResults getLastSyncResult(const QString &aProfileId);
121
128 QList<QString /*profileAsXml*/> allVisibleSyncProfiles();
129
138 QString syncProfile(const QString &aProfileId);
139
149 QStringList syncProfilesByKey(const QString &aKey, const QString &aValue);
150
156 QStringList syncProfilesByType(const QString &aType);
157
158public slots:
159
184 void slotProfileChanged(QString aProfileId, int aChangeType, QString aChangedProfileAsXml);
185
198 void resultsAvailable(QString aProfileId, QString aLastSyncResultAsXml);
199
200signals:
201
208 void profileChanged(QString aProfileId, int aChangeType, QString aChangedProfile);
209
215 void resultsAvailable(QString aProfileId, Buteo::SyncResults aLastResults);
216
217private:
218
219 SyncDaemonProxy *iSyncDaemon;
220
221 Buteo::SyncClientInterface *iParent;
222
223};
224
225
226};
227
228#endif
Buteo::SyncClientInterfacePrivate
Private implementation class for SyncClientInterface.
Definition: SyncClientInterfacePrivate.h:40
Buteo::SyncClientInterfacePrivate::removeProfile
bool removeProfile(QString &aProfileId)
function to remove a profile
Definition: SyncClientInterfacePrivate.cpp:117
Buteo::SyncClientInterfacePrivate::getRunningSyncList
QStringList getRunningSyncList()
function to get Running sync list
Definition: SyncClientInterfacePrivate.cpp:107
Buteo::SyncClientInterfacePrivate::setSyncSchedule
bool setSyncSchedule(QString &aProfileId, SyncSchedule &aSchedule)
this function converts the SyncSchedule object to an xml file of the below format
Definition: SyncClientInterfacePrivate.cpp:158
Buteo::SyncClientInterfacePrivate::resultsAvailable
void resultsAvailable(QString aProfileId, QString aLastSyncResultAsXml)
this is the slot where we will receive the xml data for results from msyncd the xml looks like this
Definition: SyncClientInterfacePrivate.cpp:145
Buteo::SyncClientInterfacePrivate::getBackUpRestoreState
bool getBackUpRestoreState()
function to add a profile
Definition: SyncClientInterfacePrivate.cpp:187
Buteo::SyncClientInterfacePrivate::SyncClientInterfacePrivate
SyncClientInterfacePrivate(SyncClientInterface *aParent)
Constructor.
Definition: SyncClientInterfacePrivate.cpp:39
Buteo::SyncClientInterfacePrivate::profileChanged
void profileChanged(QString aProfileId, int aChangeType, QString aChangedProfile)
Signal that gets emitted on receiving profileChanged from msyncd.
Definition: moc_SyncClientInterfacePrivate.cpp:173
Buteo::SyncClientInterfacePrivate::slotProfileChanged
void slotProfileChanged(QString aProfileId, int aChangeType, QString aChangedProfileAsXml)
this is the slot where we will receive the xml data for profile from msyncd. The XML Data received wi...
Definition: SyncClientInterfacePrivate.cpp:138
Buteo::SyncClientInterfacePrivate::allVisibleSyncProfiles
QList< QString > allVisibleSyncProfiles()
Gets all visible sync profiles.
Definition: SyncClientInterfacePrivate.cpp:221
Buteo::SyncClientInterfacePrivate::startSync
bool startSync(const QString &aProfileId) const
function to start the sync
Definition: SyncClientInterfacePrivate.cpp:87
Buteo::SyncClientInterfacePrivate::isValid
bool isValid()
function to check if the interface is valid
Definition: SyncClientInterfacePrivate.cpp:197
Buteo::SyncClientInterfacePrivate::saveSyncResults
bool saveSyncResults(const QString &aProfileId, const Buteo::SyncResults &aSyncResults)
this function converts the save the syncResults into log.xml file corresponding to profileName.
Definition: SyncClientInterfacePrivate.cpp:173
Buteo::SyncClientInterfacePrivate::syncProfilesByKey
QStringList syncProfilesByKey(const QString &aKey, const QString &aValue)
Gets a sync profiles which matches the key-value.
Definition: SyncClientInterfacePrivate.cpp:251
Buteo::SyncClientInterfacePrivate::syncProfile
QString syncProfile(const QString &aProfileId)
Gets a sync profile.
Definition: SyncClientInterfacePrivate.cpp:238
Buteo::SyncClientInterfacePrivate::syncProfilesByType
QStringList syncProfilesByType(const QString &aType)
Gets a profiles matching the profile type.
Definition: SyncClientInterfacePrivate.cpp:263
Buteo::SyncClientInterfacePrivate::getLastSyncResult
Buteo::SyncResults getLastSyncResult(const QString &aProfileId)
To get lastSyncResult.
Definition: SyncClientInterfacePrivate.cpp:202
Buteo::SyncClientInterfacePrivate::abortSync
void abortSync(const QString &aProfileId) const
function to abort the sync
Definition: SyncClientInterfacePrivate.cpp:99
Buteo::SyncClientInterfacePrivate::~SyncClientInterfacePrivate
~SyncClientInterfacePrivate()
Destructor.
Definition: SyncClientInterfacePrivate.cpp:80
Buteo::SyncClientInterfacePrivate::updateProfile
bool updateProfile(Buteo::SyncProfile &aProfile)
function to update an existing profile
Definition: SyncClientInterfacePrivate.cpp:127
Buteo::SyncClientInterface
SyncInterface Class - Main Entry Point for SyncFW Clients.
Definition: SyncClientInterface.h:50
Buteo::SyncProfile
A top level synchronization profile.
Definition: SyncProfile.h:49
Buteo::SyncResults
Contains information about a completed synchronization session.
Definition: SyncResults.h:62
Buteo::SyncSchedule
Class for handling sync schedule settings.
Definition: SyncSchedule.h:53
QList
Definition: SyncBackupAdaptor.h:40
SyncDaemonProxy
Proxy class for interface com.meego.msyncd.
Definition: SyncDaemonProxy.h:49