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 | 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 | PROGRAM_NAME_EXE "OutlookPlugin.exe" |
#define | SYNC_MUTEX_NAME "fol-SyncInProgress" |
#define | ASK_SLOW_TIMEOUT 25 |
25 seconds | |
#define | SCHED_DEFAULT_REPEAT_MINS 15 |
15 minutes | |
#define | SCHED_DURATION_DAYS 1 |
1 day | |
#define | SYNC_TIMEOUT 120 |
120 minutes | |
#define | MAX_LOG_SIZE 10000000 |
10 MB | |
#define | EMPTY_WSTRING L"" |
#define | DISPLAY_SLOWSYNC_WARNING 0 |
1 to display a timed-msgbox if Server requests a SLOW SYNC | |
#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 (int oldVersion) |
Operations to upgrade the plugin from 'oldVersion' to this version. | |
const char * | getClientLastErrorMsg () |
const int | getClientLastErrorCode () |
#define PROGRAM_NAME_EXE "OutlookPlugin.exe" |
Referenced by setScheduleTask().
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(), WindowsSyncSource::createOldItems(), WindowsSyncSource::deleteItem(), WindowsSyncSource::endSync(), WindowsSyncSource::getFirstDeletedItem(), WindowsSyncSource::getFirstItem(), WindowsSyncSource::getFirstNewItem(), WindowsSyncSource::getFirstUpdatedItem(), WindowsSyncSource::getNextDeletedItem(), WindowsSyncSource::getNextItem(), WindowsSyncSource::getNextNewItem(), WindowsSyncSource::getNextUpdatedItem(), WindowsSyncSource::manageModificationsFromLastSync(), WindowsSyncSource::pushAllItemsToList(), WindowsSyncSource::removeAllItems(), 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().
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(), SyncManagerConfig::getClientConfig(), OutlookConfig::getInstance(), OutlookConfig::getOldSwv(), 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().
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 endSync(), SyncManagerConfig::getAccessConfig(), SyncManagerConfig::getClientConfig(), SyncReport::getLastErrorCode(), SyncReport::getLastErrorMsg(), WindowsSyncSourceConfig::getName(), SyncSource::getReport(), SyncSourceReport::getSourceName(), SyncSourceReport::getState(), WindowsSyncSourceConfig::getSync(), getSyncMutexName(), SyncClient::getSyncReport(), OutlookConfig::getSyncSourceConfig(), SyncManagerConfig::getSyncSourceConfigsCount(), MAX_LOG_SIZE, printReport(), OutlookConfig::readSourcesTimestamps(), readSystemErrorMsg(), OutlookConfig::save(), OutlookConfig::saveBeginSync(), OutlookConfig::setAbortSync(), OutlookConfig::setScheduledSync(), SOURCE_ERROR, SyncClient::sync(), SYNCSOURCE_CALENDAR, and syncThread().
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().
void upgradePlugin | ( | int | oldVersion | ) |
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().