Buteo::SyncOnChange Class Reference

this class initiates a sync if there are changes in storage(s) it's asked to monitor More...

`#include <SyncOnChange.h>`

Inheritance diagram for Buteo::SyncOnChange:

## Public Slots

void | sync (QString aStorageName)

## Public Member Functions

| SyncOnChange ()
| constructor
| ~SyncOnChange ()
| destructor
bool | enable (const QHash< QString, QList< SyncProfile * > > &aSOCStorageMap, SyncOnChangeScheduler *aSOCScheduler, PluginManager *aPluginManager, QStringList *failedStorages)
| enable sync on change for a list of storages for the interested profiles
void | enable ()
void | disable ()
| disable sync on change immediately, i.e stop listening to change notifiers
void | disableNext ()
| Note the next change, and disable SOC if that happens.
void | addProfile (const QString &aStorageName, SyncProfile *aProfile)
| adds a profile to the list of profiles interested in soc for a specific storage

## Detailed Description

this class initiates a sync if there are changes in storage(s) it's asked to monitor

## Member Function Documentation

## addProfile()

void SyncOnChange::addProfile | ( | const QString & | aStorageName,
|  | SyncProfile * | aProfile )

adds a profile to the list of profiles interested in soc for a specific storage

Parameters

  aStorageName | storage name
  aProfile | sync profile

## enable() [1/2]

void SyncOnChange::enable | ( |  | ) |

If the storage change notifier plug-in's have already been loaded, call this to re-enable sync on change. Handy to call after a disable.

This also checks if there were changes when SOC was disabled, and notifies if there were any

## enable() [2/2]

bool SyncOnChange::enable | ( | const QHash< QString, QList< SyncProfile * > > & | aSOCStorageMap,
|  | SyncOnChangeScheduler * | aSOCScheduler,
|  | PluginManager * | aPluginManager,
|  | QStringList * | failedStorages )

enable sync on change for a list of storages for the interested profiles

Destroys the profile objects when they are no longer needed

Parameters

  aPluginManager | Used to load SOC storage plug-ins
  aSOCScheduler | used to schedule SOC
  aSOCStorageMap | map of well-known storage name to list of sync profiles insterested in SOC for that storage
  failedStorages | of storage names for which SOC couldn't be enabled

Returns
  false if SOC can't be enabled for one or more storages

## sync

void SyncOnChange::sync | ( | QString | aStorageName | ) |

slot

initiate sync for this storage

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

- SyncOnChange.h
- SyncOnChange.cpp