Classes | |
class | DateFilter |
Rapresents the filter entity on the start/end dates, for appointments. More... | |
class | DefaultWinConfigFactory |
This class is a factory of default configurations. More... | |
class | HwndFunctions |
Contains methods to find the UI window handle. More... | |
class | PicturesSyncSource |
This class extends the FileSyncSource class, it's specialized for pictures items. More... | |
class | SyncException |
Defines exceptions for sync process. More... | |
class | WindowsSyncClient |
Derivate from SyncClient, implements only continueAfterPrepareSync method. More... | |
class | WindowsSyncSource |
This class is the extension of SyncSource class for specific Client objects. More... | |
class | WindowsSyncSourceConfig |
This class groups all configuration properties for a WindowsSyncSource. More... | |
Modules | |
Configuration | |
Utility functions | |
Scheduler functions | |
Data Tranformation functions | |
Event listeners | |
Defines | |
#define | PLUGIN_UI_CLASSNAME _T("FunambolApp") |
#define | SYNC_MUTEX_NAME "fol-SyncInProgress" |
#define | EMPTY_WSTRING L"" |
#define | VCARD_DEFAULT_NAME L"card" |
#define | VCALENDAR_DEFAULT_NAME L"event" |
#define | VTODO_DEFAULT_NAME L"task" |
#define | VNOTE_DEFAULT_NAME L"note" |
#define | SIFC_DEFAULT_NAME L"scard" |
#define | SIFE_DEFAULT_NAME L"scal" |
#define | SIFT_DEFAULT_NAME L"stask" |
#define | SIFN_DEFAULT_NAME L"snote" |
#define | MAX_PATH_LENGTH 512 |
Typedefs | |
typedef std::list< std::wstring > | itemKeyList |
typedef itemKeyList::iterator | itemKeyIterator |
Functions | |
void | throwSyncException (const char *msg, DWORD code=NULL) |
use these functions to throw Client exceptions. | |
int | initializeClient (bool isScheduled) |
Initialize the client: open configuration, open LOG. | |
int | initLog (bool isScheduled) |
Initialize the LOG. | |
int | startSync () |
Entry point to start the synchronization process. | |
int | closeClient () |
Closing operation before exiting client DLL. | |
void | closeOutlook () |
If Outlook session is active, close it and clean-up shared objects. | |
void | checkAbortedSync () |
Check if synchronization session has been intentionally aborted. | |
bool | checkSyncInProgress () |
Check if a synchronization process is already running. | |
void | softTerminateSync () |
This function is called to terminate the sync session (soft way). | |
int | hardTerminateSync (HANDLE hSyncThread) |
This function is called to terminate the sync session (hard way). | |
int | exitSyncThread (int code) |
This function is called to terminate the sync thread. | |
void | endSync () |
Common operations to end the sync process. | |
void | upgradePlugin (const int oldVersion, const int oldFunambolVersion) |
Operations to upgrade the plugin from 'oldVersion' to this version. | |
const char * | getClientLastErrorMsg () |
const int | getClientLastErrorCode () |
int | OpenMessageBox (HWND hwnd, UINT type, UINT msg) |
int | updateProcedure (HWND hwnd, bool manual=false) |
Starts the whole update procedure. | |
bool | isNewSwVersionAvailable () |
Returns true if a new version is known to be available for upgrade. | |
int | checkUpdate () |
It is called to check if there is a new version available. | |
bool | checkForMandatoryUpdateBeforeStartingSync () |
#define SYNC_MUTEX_NAME "fol-SyncInProgress" |
Referenced by getSyncMutexName().
typedef std::list<std::wstring> itemKeyList |
void checkAbortedSync | ( | ) |
Check if synchronization session has been intentionally aborted.
A flag 'abortSync' inside OutlookConfig singleton object is used to indicate that the user wants to abort the sync. The client periodically checks this flag, using this function.
References endSync(), OutlookConfig::getAbortSync(), OutlookConfig::setAbortSync(), and throwSyncException().
Referenced by WindowsSyncSource::addItem(), WindowsSyncSource::beginSync(), PicturesSyncSource::beginSync(), WindowsSyncSource::createOldItems(), WindowsSyncSource::deleteItem(), WindowsSyncSource::endSync(), PicturesSyncSource::getAllItemList(), WindowsSyncSource::getFirstDeletedItem(), WindowsSyncSource::getFirstItem(), WindowsSyncSource::getFirstNewItem(), WindowsSyncSource::getFirstUpdatedItem(), WindowsSyncSource::getNextDeletedItem(), WindowsSyncSource::getNextItem(), WindowsSyncSource::getNextNewItem(), WindowsSyncSource::getNextUpdatedItem(), PicturesSyncSource::insertItem(), WindowsSyncSource::manageModificationsFromLastSync(), PicturesSyncSource::modifyItem(), WindowsSyncSource::pushAllItemsToList(), WindowsSyncSource::removeAllItems(), PicturesSyncSource::removeAllItems(), PicturesSyncSource::removeItem(), and WindowsSyncSource::updateItem().
bool checkSyncInProgress | ( | ) |
Check if a synchronization process is already running.
This is obtained checking the correspondent mutex, which is created during the sync process.
References getSyncMutexName(), and readSystemErrorMsg().
int checkUpdate | ( | ) |
It is called to check if there is a new version available.
If there is one, it sets a parameter into the reigistry. If necessary, will request via http the updated information.
References UpdateManager::checkIsToUpdate().
Referenced by startSync().
void endSync | ( | ) |
Common operations to end the sync process.
References closeOutlook(), and readSystemErrorMsg().
Referenced by checkAbortedSync(), manageClientException(), and startSync().
int exitSyncThread | ( | int | code | ) |
This function is called to terminate the sync thread.
Like 'hardTerminateSync' but used internally by client to terminate the syncThread (HANDLE set during startSync).
code | the exit code for the sync thread |
References readSystemErrorMsg(), and syncThread().
int hardTerminateSync | ( | HANDLE | hSyncThread | ) |
This function is called to terminate the sync session (hard way).
If softTerminateSync() did not work, use this function to terminate the thread of synchronization.
hSyncThread | the handle of sync thread to terminate |
References readSystemErrorMsg().
Referenced by syncThreadKiller().
int initializeClient | ( | bool | isScheduled | ) |
Initialize the client: open configuration, open LOG.
Configuration is a singleton object that MUST remain active during all program life. Will be released with close() method.
isScheduled | true if it's a scheduled sync |
References OutlookConfig::checkToUpgrade(), OutlookConfig::createDefaultConfig(), OutlookConfig::getFunambolSwv(), OutlookConfig::getInstance(), OutlookConfig::getOldFunambolSwv(), OutlookConfig::getOldSwv(), SyncManagerConfig::getSwv(), initLog(), OutlookConfig::read(), safeMessageBox(), OutlookConfig::save(), OutlookConfig::upgradeConfig(), and upgradePlugin().
Referenced by __declspec().
int initLog | ( | bool | isScheduled | ) |
Initialize the LOG.
Log File is placed under 'app data' directory for current user, if directories not found they will be created. Log file is reset and set level with this call.
reset | if scheduled, we don't reset the log |
References SyncManagerConfig::getClientConfig(), OutlookConfig::getInstance(), makeDataDirs(), safeMessageBox(), and writeToFile().
Referenced by initializeClient().
bool isNewSwVersionAvailable | ( | ) |
Returns true if a new version is known to be available for upgrade.
This method does not query the upgrade server, but it uses the information available in the config.
References UpdateManager::isNewVersionAvailable().
Referenced by CMainSyncFrame::OnInitMenuPopup().
void softTerminateSync | ( | ) |
This function is called to terminate the sync session (soft way).
We first try to "soft" terminate the thread, setting the correspondent flag inside OutlookConfig. This is to correctly close the session.
References OutlookConfig::setAbortSync().
int startSync | ( | ) |
Entry point to start the synchronization process.
References checkUpdate(), endSync(), SyncManagerConfig::getAccessConfig(), SyncManagerConfig::getClientConfig(), WindowsSyncSource::getConfig(), WindowsSyncSourceConfig::getIsSynced(), PicturesSyncSource::getIsSynced(), SyncReport::getLastErrorCode(), SyncReport::getLastErrorMsg(), WindowsSyncSourceConfig::getName(), SyncSource::getReport(), SyncManagerConfig::getServerDataStore(), SyncSourceReport::getSourceName(), OutlookConfig::getSourcesVisible(), SyncSourceReport::getState(), getSyncMutexName(), SyncClient::getSyncReport(), OutlookConfig::getSyncSourceConfig(), SyncManagerConfig::getSyncSourceConfigsCount(), WindowsSyncSourceConfig::isEnabled(), OMA_MIME_TYPE, printReport(), OutlookConfig::readSourcesTimestamps(), readSystemErrorMsg(), OutlookConfig::removeSourceVisible(), OutlookConfig::safeAddSourceVisible(), OutlookConfig::save(), OutlookConfig::saveBeginSync(), OutlookConfig::setAbortSync(), OutlookConfig::setScheduledSync(), SOURCE_ERROR, SyncClient::sync(), syncThread(), and updateProcedure().
Referenced by syncThread().
void throwSyncException | ( | const char * | msg, | |
DWORD | code | |||
) |
use these functions to throw Client exceptions.
use these functions to throw Client exceptions.
Get the instance of SyncException, set the data and throw it.
References SyncException::getInstance(), and SyncException::setExceptionData().
Referenced by checkAbortedSync(), and manageClientException().
int updateProcedure | ( | HWND | hwnd, | |
bool | manual = false | |||
) |
Starts the whole update procedure.
hwnd | the handle of the main window from the UI. It is set by the when the method is called by the UI form | |
manual | parameter indicates that the user is starting from UI It returns a value indicating the UI have to show the "Update Software" menu item to start the update procedure manually. ret 1,2 the UI must show the item ret -1,0 the UI hides the item |
References UpdateManager::checkForUpdates(), UpdateManager::isNewVersionAvailable(), UpdateManager::manualCheckForUpdates(), and UpdateManager::setHwnd().
Referenced by startSync().
void upgradePlugin | ( | const int | oldVersion, | |
const int | oldFunambolVersion | |||
) |
Operations to upgrade the plugin from 'oldVersion' to this version.
Should be called only once during plugin first start.
References OutlookConfig::getInstance(), getScheduledTaskName(), getWindowsUser(), makeDataDirs(), and readSystemErrorMsg().
Referenced by initializeClient().