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
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

## Signals

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

## Public Member Functions

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

## 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.

## profilesByType()

QStringList SyncClientInterfacePrivate::profilesByType | ( | const QString & | aType | ) |

Gets profiles matching the profile type.

Parameters

  aType | Type of the profile service/storage/sync.

Returns
  The profiles as Xml string list.

## removeProfile()

bool SyncClientInterfacePrivate::removeProfile | ( | const QString & | aProfileId | ) |

function to remove a profile

Parameters

  aProfileId | id 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 | ( | const QString & | aProfileId,
|  | const 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

  aProfileId | Name 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

  aKey | Key to match for profile.
  aValue | Value 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

  aType | Type of the profile service/storage/sync.

Returns
  The sync profile ids as string list.

## updateProfile()

bool SyncClientInterfacePrivate::updateProfile | ( | const Buteo::SyncProfile & | aProfile | ) |

function to update an existing profile

Parameters

  aProfile | profile object to add

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

- SyncClientInterfacePrivate.h
- SyncClientInterfacePrivate.cpp