PicturesSyncSource Class Reference
[Client DLL]

This class extends the FileSyncSource class, it's specialized for pictures items. More...

#include <PicturesSyncSource.h>

Inheritance diagram for PicturesSyncSource:
[legend]
Collaboration diagram for PicturesSyncSource:
[legend]

List of all members.

Public Member Functions

 PicturesSyncSource (const WCHAR *name, WindowsSyncSourceConfig *sc)
 Constructor.
const WindowsSyncSourceConfiggetConfig () const
 read-only access to configuration
WindowsSyncSourceConfiggetConfig ()
 read-write access to configuration
int beginSync ()
 Sets the 'isSynced' flag, then calls the father method FileSyncSource::beginSync().
int endSync ()
 Calls the father method FileSyncSource::endSync(), then sets the endTimestamp value to 'now'.
EnumerationgetAllItemList ()
 From FileSyncSource.
int insertItem (SyncItem &item)
 Called by the sync engine to add an item that the server has sent.
int modifyItem (SyncItem &item)
 Called by the sync engine to update an item that the source already should have.
int removeItem (SyncItem &item)
 Called by the sync engine to update an item that the source already should have.
int removeAllItems ()
 Removes all the item of the sync source.
bool getIsSynced () const
void setIsSynced (bool v)

Protected Attributes

WindowsSyncSourceConfigpicturesConfig
 Configuration object for the source.


Detailed Description

This class extends the FileSyncSource class, it's specialized for pictures items.

The sync direction is fixed on "one-way-from-server", so the method getAllItemList() symply does nothing. Deletes coming from Server are not expected, so th method removeItem() is not implemented (we don't want to delete pictures on Client). "picturesConfig::folderPath" and "dir" have the same meaning, so they are set at the same value in the constructor. Configuration paramenters that need to be saved inside the registry are stored in the WindowsSyncSourceConfig& picturesConfig object, owned by OutlookConfig.


Constructor & Destructor Documentation

PicturesSyncSource::PicturesSyncSource ( const WCHAR *  name,
WindowsSyncSourceConfig sc 
)

Constructor.

if folderPath is empty, here we read and set the default value, which is the shell folder for pictures (i.e. "C:\Users\<username>\Images") "dir" is used by FileSyncSource during the sync process, so it's set to the same value of "folderPath".

References getDefaultPicturesPath(), and picturesConfig.


Member Function Documentation

int PicturesSyncSource::insertItem ( SyncItem &  item  )  [virtual]

Called by the sync engine to add an item that the server has sent.

The sync source is expected to add it to its database, then set the key to the local key assigned to the new item. Alternatively the sync source can match the new item against one of the existing items and return that key.

Parameters:
item the item as sent by the server
Returns:
SyncML status code

Reimplemented from FileSyncSource.

References checkAbortedSync().

int PicturesSyncSource::modifyItem ( SyncItem &  item  )  [virtual]

Called by the sync engine to update an item that the source already should have.

The item's key is the local key of that item.

Parameters:
item the item as sent by the server
Returns:
SyncML status code

Reimplemented from FileSyncSource.

References checkAbortedSync().

int PicturesSyncSource::removeAllItems (  )  [virtual]

Removes all the item of the sync source.

It is called by the engine in the case of a refresh from server to clean all the client items before receiving the server ones.

Reimplemented from FileSyncSource.

References checkAbortedSync().

int PicturesSyncSource::removeItem ( SyncItem &  item  )  [virtual]

Called by the sync engine to update an item that the source already should have.

The item's key is the local key of that item, no data is provided.

Parameters:
item the item as sent by the server

Reimplemented from FileSyncSource.

References checkAbortedSync().


Member Data Documentation

Configuration object for the source.

It's a reference to WindowsSyncSourceConfig object owned by OutlookConfig. It's automatically initialized in the constructor.

Referenced by beginSync(), endSync(), getConfig(), and PicturesSyncSource().


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

Generated on Tue Apr 6 13:00:42 2010 for Funambol Outlook Plug-in Library by  doxygen 1.5.7.1