Scheduler functions
[Client DLL]

Collaboration diagram for Scheduler functions:


Defines

#define SCHED_COMMENT   L"Funambol Outlook Plug-in scheduler"
#define SCHED_PARAM   L"schedule"
#define NEVER   "Never"
#define EVERY_DAY   "Every day"

Functions

int setScheduler (const bool enable, const int minutes)
 Set the scheduled task of plugin.
bool getScheduler (int *minutes)
 Get information about scheduled task of plugin.
int setScheduleTask (const char *frequency, const int dayNum, const int minNum)
 Set a Task into task scheduler.
int getScheduleTask (bool *active, int *dayNum, int *minNum)
 Get task info from Task scheduler.
int deleteScheduleTask ()
 Delete the schedule task.
ITaskScheduler * initScheduleInstance ()
 Call CoInitialize to initialize the COM library and then CoCreateInstance to get the Task Scheduler object.
int getScheduledTaskName (std::wstring &taskName)
 Used to create the scheduled task name: "Funambol Outlook Plug-in - <UserName>".

Function Documentation

int deleteScheduleTask (  ) 

Delete the schedule task.

Returns:
0 if no errors

int getScheduledTaskName ( wstring &  taskName  ) 

Used to create the scheduled task name: "Funambol Outlook Plug-in - <UserName>".

'Username' is the current Windows user, so each user has a different task.

Parameters:
taskName [OUT] the name of task
Returns:
0 if no errors

bool getScheduler ( int *  minutes  ) 

Get information about scheduled task of plugin.

Parameters:
minutes [OUT] the repeating minutes of task
Returns:
true if task is active. false if task is disabled or not existing.

int getScheduleTask ( bool *  active,
int *  dayNum,
int *  minNum 
)

Get task info from Task scheduler.

Returns 0 if task found and no errors, -1 if task not found. If task found: frequency, dayNum, minNum and statusCode are set.

Parameters:
active : [OUT] true if task is active
dayNum : [OUT] repeating every 'dayNum' days
minNum : [OUT] repeating every 'minNum' minutes
Returns:
0 = task found, status correct. 1 = task found, status incorrect. 2 = task found but manually changed. -1 = task not found. -2 = errors occurred.

ITaskScheduler* initScheduleInstance (  ) 

Call CoInitialize to initialize the COM library and then CoCreateInstance to get the Task Scheduler object.

Sets the lastErrorMsg in case of errors.

Parameters:
pITS,: pointer to ITaskScheduler interface
Returns:
0 if no errors

int setScheduler ( const bool  enable,
const int  minutes 
)

Set the scheduled task of plugin.

Parameters:
enable true = activate the scheduler false = disable the scheduler (delete the task)
minutes the repeating minutes of task
Returns:
0 if no errors

int setScheduleTask ( const char *  frequency,
const int  dayNum,
const int  minNum 
)

Set a Task into task scheduler.

It takes values to insert from Schedule form. If task already exists, it is updated with passed parameters. Starting time is always set to current time (task starts now).

Parameters:
frequency : NEVER or EVERY_DAY
dayNum : repeate the task every 'dayNum'
minNum : repeate the task every 'minNum'
Returns:
0 if no errors.


Generated on Mon Feb 4 09:50:52 2008 for Funambol Outlook Plug-in Library by  doxygen 1.5.2