Buteo Synchronization Framework: Buteo::StorageChangeNotifierPlugin Class Reference

Buteo Synchronization Framework

Signals | Public Member Functions | Protected Attributes | List of all members
Buteo::StorageChangeNotifierPlugin Class Referenceabstract

Implement this class to notify about changes in a specific storage - contacts/calendar/sms, or even custom ones like a facebook storage, if there's such a storage on the device. More...

`#include <StorageChangeNotifierPlugin.h>`

Inheritance diagram for Buteo::StorageChangeNotifierPlugin:

## Signals
void | storageChange ()
| emit this signal when there's a change in this storage. It's upto the plug-in when and how frequently it wants to emit this signal

## Public Member Functions
| StorageChangeNotifierPlugin (const QString &aStorageName)
| constructor More...
virtual | ~StorageChangeNotifierPlugin ()
| destructor
virtual QString | name () const =0
| the name should be a well-known name which buteo sync-fw knows about as a storage that could be synced, for eg hcontacts for contacts storage More...
virtual bool | hasChanges () const =0
| Check if this storage has changes since the last time it was asked for the same. More...
virtual void | changesReceived ()=0
virtual void | enable ()=0
| Enable listening to storage changes.
virtual void | disable (bool disableAfterNextChange=false)=0
| Disable listening to storage changes. More...

## Protected Attributes
QString | iStorageName

## Detailed Description

Implement this class to notify about changes in a specific storage - contacts/calendar/sms, or even custom ones like a facebook storage, if there's such a storage on the device.

## Constructor & Destructor Documentation

## ◆ StorageChangeNotifierPlugin()

Buteo::StorageChangeNotifierPlugin::StorageChangeNotifierPlugin | ( | const QString & | aStorageName | ) |
| inline

constructor

Parameters

  aStorageName | pass the well known sync storage name

## Member Function Documentation

## ◆ changesReceived()

virtual void Buteo::StorageChangeNotifierPlugin::changesReceived | ( |  | ) |
| pure virtual

Call this after the change notification has been received, either via a signal or by calling hasChanges() manually

## ◆ disable()

virtual void Buteo::StorageChangeNotifierPlugin::disable | ( | bool | disableAfterNextChange = `false` | ) |
| pure virtual

Disable listening to storage changes.

Parameters

  disableAfterNextChange | if set to true, then we disable listening only if the next change occurs and if enable() hasn't been called before this change is receivied. This helps to get one notification in case items are added in batches.

## ◆ hasChanges()

virtual bool Buteo::StorageChangeNotifierPlugin::hasChanges | ( |  | ) | const
| pure virtual

Check if this storage has changes since the last time it was asked for the same.

Returns
  true if there are changes, false otherwise

## ◆ name()

virtual QString Buteo::StorageChangeNotifierPlugin::name | ( |  | ) | const
| pure virtual

the name should be a well-known name which buteo sync-fw knows about as a storage that could be synced, for eg hcontacts for contacts storage

Returns
  well-known storage name

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

- StorageChangeNotifierPlugin.h
- moc_StorageChangeNotifierPlugin.cpp