Buteo Synchronization Framework
Public Slots | Signals | Public Member Functions | List of all members
Buteo::SyncClientInterfacePrivate Class Reference

Private implementation class for SyncClientInterface. More...

#include <SyncClientInterfacePrivate.h>

Inheritance diagram for Buteo::SyncClientInterfacePrivate:

Public Slots

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 will be of the following format More...
 
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 More...
 

Signals

void profileChanged (QString aProfileId, int aChangeType, QString aChangedProfile)
 Signal that gets emitted on receiving profileChanged from msyncd. More...
 
void resultsAvailable (QString aProfileId, Buteo::SyncResults aLastResults)
 Signal that gets emitted on receiving resultsAvailable from msyncd. More...
 

Public Member Functions

 SyncClientInterfacePrivate (SyncClientInterface *aParent)
 Constructor. More...
 
 ~SyncClientInterfacePrivate ()
 Destructor.
 
bool startSync (const QString &aProfileId) const
 function to start the sync More...
 
void abortSync (const QString &aProfileId) const
 function to abort the sync More...
 
QStringList getRunningSyncList ()
 function to get Running sync list More...
 
bool removeProfile (QString &aProfileId)
 function to remove a profile More...
 
bool updateProfile (Buteo::SyncProfile &aProfile)
 function to update an existing profile More...
 
bool getBackUpRestoreState ()
 function to add a profile More...
 
bool isValid ()
 function to check if the interface is valid More...
 
bool setSyncSchedule (QString &aProfileId, SyncSchedule &aSchedule)
 this function converts the SyncSchedule object to an xml file of the below format More...
 
bool saveSyncResults (const QString &aProfileId, const Buteo::SyncResults &aSyncResults)
 this function converts the save the syncResults into log.xml file corresponding to profileName. More...
 
Buteo::SyncResults getLastSyncResult (const QString &aProfileId)
 To get lastSyncResult. More...
 
QList< QString > allVisibleSyncProfiles ()
 Gets all visible sync profiles. More...
 
QString syncProfile (const QString &aProfileId)
 Gets a sync profile. More...
 
QStringList syncProfilesByKey (const QString &aKey, const QString &aValue)
 Gets a sync profiles which matches the key-value. More...
 
QStringList syncProfilesByType (const QString &aType)
 Gets a profiles matching the profile type. More...
 

Detailed Description

Private implementation class for SyncClientInterface.

Constructor & Destructor Documentation

◆ SyncClientInterfacePrivate()

SyncClientInterfacePrivate::SyncClientInterfacePrivate ( SyncClientInterface aParent)

Constructor.

Parameters
aParent- pointer to the parent object

Member Function Documentation

◆ abortSync()

void SyncClientInterfacePrivate::abortSync ( const QString &  aProfileId) const

function to abort the sync

Parameters
aProfileId- id of the profile to abort the sync

◆ allVisibleSyncProfiles()

QList< QString > SyncClientInterfacePrivate::allVisibleSyncProfiles ( )

Gets all visible sync profiles.

Returns all sync profiles that should be visible in sync ui. A profile is visible if it has not been explicitly set as hidden.

Returns
The list of sync profiles.

◆ getBackUpRestoreState()

bool SyncClientInterfacePrivate::getBackUpRestoreState ( )

function to add a profile

Returns
returns the backup restore state.

◆ getLastSyncResult()

Buteo::SyncResults SyncClientInterfacePrivate::getLastSyncResult ( const QString &  aProfileId)

To get lastSyncResult.

Parameters
aProfileId
Returns
SyncResults of syncLastResult.

◆ getRunningSyncList()

QStringList SyncClientInterfacePrivate::getRunningSyncList ( )

function to get Running sync list

Returns
- list of running sync profile ids

◆ isValid()

bool SyncClientInterfacePrivate::isValid ( )

function to check if the interface is valid

Returns
status of the validity of the interface

◆ profileChanged

void Buteo::SyncClientInterfacePrivate::profileChanged ( QString  aProfileId,
int  aChangeType,
QString  aChangedProfile 
)
signal

Signal that gets emitted on receiving profileChanged from msyncd.

Parameters
aProfileId- id of the profile
aChangeType- change type whether addition , deletion or modification
aChangedProfile- changed sync profie as XMl string.

◆ removeProfile()

bool SyncClientInterfacePrivate::removeProfile ( QString &  aProfileId)

function to remove a profile

Parameters
aProfileIdid of the profule to remove to add

◆ resultsAvailable [1/2]

void Buteo::SyncClientInterfacePrivate::resultsAvailable ( QString  aProfileId,
Buteo::SyncResults  aLastResults 
)
signal

Signal that gets emitted on receiving resultsAvailable from msyncd.

Parameters
aProfileId- id of the profile
aLastResults- last results as SyncResults Object

◆ resultsAvailable [2/2]

void SyncClientInterfacePrivate::resultsAvailable ( QString  aProfileId,
QString  aLastSyncResultAsXml 
)
slot

this is the slot where we will receive the xml data for results from msyncd the xml looks like this

<syncresults scheduled="false" majorcode="0" minorcode = "0" time="2010-06-01T06:43:32">
<target name="">
<local modified="0" added="0" deleted="0"/>
<remote modified="0" added="4" deleted="0"/>
</target>
</syncresults>
Parameters
aProfileId- id of the profile
aLastSyncResultAsXml- last sync result as xml

◆ saveSyncResults()

bool SyncClientInterfacePrivate::saveSyncResults ( const QString &  aProfileId,
const Buteo::SyncResults aSyncResults 
)

this function converts the save the syncResults into log.xml file corresponding to profileName.

<syncresults scheduled="false" majorcode="1" minorcode = "501" time="2010-06-01T06:43:32">

◆ setSyncSchedule()

bool SyncClientInterfacePrivate::setSyncSchedule ( QString &  aProfileId,
SyncSchedule aSchedule 
)

this function converts the SyncSchedule object to an xml file of the below format

<schedule interval="15" days="1,2,3,4,5,6,7" time="">
<rush begin="08:00:00" enabled="true" interval="5" end="17:00:00" days="1,2,3,4,5"/>
</schedule>
Parameters
aProfileId- profile id
aSchedule- schedule object

◆ slotProfileChanged

void SyncClientInterfacePrivate::slotProfileChanged ( QString  aProfileId,
int  aChangeType,
QString  aChangedProfileAsXml 
)
slot

this is the slot where we will receive the xml data for profile from msyncd. The XML Data received will be of the following format

<?xml version="1.0" encoding="UTF-8"?>
<profile type="sync" name="ovi.com-sr1">
<key value="1" name="accountid"/>
<key value="true" name="active"/>
<key value="true" name="enabled"/>
<key value="false" name="hidden"/>
<key value="true" name="scheduled"/>
<key value="true" name="use_accounts"/>
<profile type="service" name="ovi.com"/>
<profile type="storage" name="hcontacts">
<key value="true" name="enabled"/>
</profile>
<schedule interval="15" days="1,2,3,4,5,6,7" time="">
<rush begin="08:00:00" enabled="true" interval="5" end="17:00:00" days="1,2,3,4,5"/>
</schedule>
</profile>
Parameters
aProfileId- id of the profile
aChangeType- change type whether addition , deletion or modification
aChangedProfileAsXml- changed profile arrives as xml

◆ startSync()

bool SyncClientInterfacePrivate::startSync ( const QString &  aProfileId) const

function to start the sync

Parameters
aProfileId- id of the profile to start the sync

◆ syncProfile()

QString SyncClientInterfacePrivate::syncProfile ( const QString &  aProfileId)

Gets a sync profile.

Loads and merges also all sub-profiles that are referenced from the main profile. Loads the log of finished synchronization sessions with this profile.

Parameters
aProfileIdName of the profile to get.
Returns
The sync profile as Xml string.

◆ syncProfilesByKey()

QStringList SyncClientInterfacePrivate::syncProfilesByKey ( const QString &  aKey,
const QString &  aValue 
)

Gets a sync profiles which matches the key-value.

Loads and merges also all sub-profiles that are referenced from the main profile. Loads the log of finished synchronization sessions with this profile.

Parameters
aKeyKey to match for profile.
aValueValue to match for profile.
Returns
The sync profiles as Xml string list.

◆ syncProfilesByType()

QStringList SyncClientInterfacePrivate::syncProfilesByType ( const QString &  aType)

Gets a profiles matching the profile type.

Parameters
aTypeType of the profile service/storage/sync.
Returns
The sync profile ids as string list.

◆ updateProfile()

bool SyncClientInterfacePrivate::updateProfile ( Buteo::SyncProfile aProfile)

function to update an existing profile

Parameters
aProfileprofile object to add

The documentation for this class was generated from the following files: