RScheduler Class Reference

#include <csch_cli.h>

class RScheduler : public RSessionBase, public RSessionBase
Public Member Functions
RScheduler()
IMPORT_C TIntConnect()
IMPORT_C TIntCreatePersistentSchedule(TSchedulerItemRef &, const CArrayFixFlat< TScheduleEntryInfo2 > &)
IMPORT_C TIntCreatePersistentSchedule(TSchedulerItemRef &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTsTime &)
IMPORT_C TIntCreatePersistentSchedule(TSchedulerItemRef &, const CArrayFixFlat< TScheduleEntryInfo > &)
IMPORT_C TIntCreatePersistentSchedule(TSchedulerItemRef &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTime &)
IMPORT_C TIntDeleteSchedule(const TInt)
IMPORT_C TIntDeleteTask(const TInt)
IMPORT_C TIntDisableSchedule(const TInt)
IMPORT_C TIntEditSchedule(const TInt, const CArrayFixFlat< TScheduleEntryInfo2 > &)
IMPORT_C TIntEditSchedule(TInt, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTsTime &)
IMPORT_C TIntEditSchedule(const TInt, const CArrayFixFlat< TScheduleEntryInfo > &)
IMPORT_C TIntEditSchedule(TInt, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTime &)
IMPORT_C TIntEnableSchedule(const TInt)
IMPORT_C TIntGetScheduleL(const TInt, TScheduleState2 &, CArrayFixFlat< TScheduleEntryInfo2 > &, CArrayFixFlat< TTaskInfo > &, TTsTime &)
IMPORT_C TIntGetScheduleL(TInt, TScheduleState2 &, CArrayFixFlat< TTaskSchedulerCondition > &, TTsTime &, CArrayFixFlat< TTaskInfo > &)
IMPORT_C TIntGetScheduleL(const TInt, TScheduleState &, CArrayFixFlat< TScheduleEntryInfo > &, CArrayFixFlat< TTaskInfo > &, TTime &)
IMPORT_C TIntGetScheduleL(TInt, TScheduleState &, CArrayFixFlat< TTaskSchedulerCondition > &, TTime &, CArrayFixFlat< TTaskInfo > &)
IMPORT_C TIntGetScheduleRefsL(CArrayFixFlat< TSchedulerItemRef > &, const TScheduleFilter)
IMPORT_C TIntGetScheduleTypeL(TInt, TScheduleType &)
IMPORT_C TIntGetTaskDataSize(const TInt, TInt &)
IMPORT_C TIntGetTaskInfoL(const TInt, TTaskInfo &, TPtr &, TSchedulerItemRef &, TTsTime &)
IMPORT_C TIntGetTaskInfoL(const TInt, TTaskInfo &, TPtr &, TSchedulerItemRef &, TTime &)
IMPORT_C TIntGetTaskRefsL(CArrayFixFlat< TSchedulerItemRef > &, const TScheduleFilter, const TTaskFilter)
IMPORT_C TIntRegister(const TFileName &, const TInt)
IMPORT_C TIntScheduleTask(TTaskInfo &, HBufC &, const TInt)
IMPORT_C TIntScheduleTask(TTaskInfo &, HBufC &, TSchedulerItemRef &, const CArrayFixFlat< TScheduleEntryInfo2 > &)
IMPORT_C TIntScheduleTask(TTaskInfo &, HBufC &, TSchedulerItemRef &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTsTime &)
IMPORT_C TIntScheduleTask(TTaskInfo &, HBufC &, TSchedulerItemRef &, const CArrayFixFlat< TScheduleEntryInfo > &)
IMPORT_C TIntScheduleTask(TTaskInfo &, HBufC &, TSchedulerItemRef &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTime &)
IMPORT_C TVersionVersion()
IMPORT_C TInt__DbgCheckHeap(TInt)
IMPORT_C TInt__DbgFailNext(TInt)
IMPORT_C TInt__DbgMarkEnd(TInt)
IMPORT_C TInt__DbgMarkHeap()
IMPORT_C TInt__DbgResetHeap()
IMPORT_C TInt__FaultServer()
Inherited Attributes
RHandleBase::iHandle
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::Close()
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()

Detailed Description

Client side interface to the Task Scheduler.

Constructor & Destructor Documentation

RScheduler ( )

IMPORT_CRScheduler()

Default constructor.

Member Function Documentation

Connect ( )

IMPORT_C TIntConnect()

Connects a client to the Task Scheduler server, creating a session with that server.

Return Value
KErrNone, if successful; otherwise one of the other system wide error codes.

CreatePersistentSchedule ( TSchedulerItemRef &, const CArrayFixFlat< TScheduleEntryInfo2 > & )

IMPORT_C TIntCreatePersistentSchedule(TSchedulerItemRef &aRef,
const CArrayFixFlat< TScheduleEntryInfo2 > &aEntryList
)

Creates a persistent time based schedule.

This schedule has no tasks associated with it but merely contains information about start and finish times.

See also: TScheduleEntryInfo2

Parameters
aRefDefinition of the new schedule. On return this contains a valid handle to the newly created schedule.
aEntryListThe set of schedule entries that make up the new schedule.
Return Value
KErrNone, if successful, KErrArgument if the condition array is empty, or an entry has an interval less than 1, KErrServerBusy, if a backup or restore operation is taking place, KErrPermissionDenied if the client does not have WriteDeviceData capability. Otherwise one of the other system wide error codes.
Capability
WriteDeviceData

CreatePersistentSchedule ( TSchedulerItemRef &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTsTime & )

IMPORT_C TIntCreatePersistentSchedule(TSchedulerItemRef &aRef,
const CArrayFixFlat< TTaskSchedulerCondition > &aConditions,
const TTsTime &aDefaultRunTime
)

Creates a persistent condition based schedule.

This schedule has no tasks associated with it but merely contains information about conditions that must be satified to complete this schedule.

See also: TTaskSchedulerCondition

Parameters
aRefDefinition of the new schedule. On return this contains a valid handle to the newly created schedule.
aConditionsAn array of system agent conditons that make up the schedule.
aDefaultRunTimeThe time at which the schedule with run if no conditions are met. If this is a local time based value, the schedule will remain at that local time regardless of timezone and DST changes (ie. it will float) If the value is UTC based, the schedule will remain at that UTC time (will not float).
Return Value
KErrNone, if successful, KErrArgument if the condition array is empty or if the publish and subscribe variables have an invalid category, KErrServerBusy, if a backup or restore operation is taking place, KErrPermissionDenied if the client does not have WriteDeviceData capability. Otherwise one of the other system wide error codes.
Capability
WriteDeviceData

CreatePersistentSchedule ( TSchedulerItemRef &, const CArrayFixFlat< TScheduleEntryInfo > & )

IMPORT_C TIntCreatePersistentSchedule(TSchedulerItemRef &aRef,
const CArrayFixFlat< TScheduleEntryInfo > &aEntryList
)
Deprecated

Creates a persistent time based schedule.

This schedule has no tasks associated with it but merely contains information about start and finish times.

See also: TScheduleEntryInfo

See note in CSch_Cli.h

Parameters
aRefDefinition of the new schedule. On return this contains a valid handle to the newly created schedule.
aEntryListThe set of schedule entries that make up the new schedule. Start times of all entries are assumed to be local time based.
Return Value
KErrNone, if successful, KErrArgument if the condition array is empty, or an entry has an interval less than 1, KErrServerBusy, if a backup or restore operation is taking place, KErrPermissionDenied if the client does not have WriteDeviceData capability. Otherwise one of the other system wide error codes.
Capability
WriteDeviceData

CreatePersistentSchedule ( TSchedulerItemRef &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTime & )

IMPORT_C TIntCreatePersistentSchedule(TSchedulerItemRef &aRef,
const CArrayFixFlat< TTaskSchedulerCondition > &aConditions,
const TTime &aDefaultRunTime
)
Deprecated

Creates a persistent condition based schedule.

This schedule has no tasks associated with it but merely contains information about conditions that must be satified to complete this schedule.

See also: TTaskSchedulerCondition

See note in CSch_Cli.h

Parameters
aRefDefinition of the new schedule. On return this contains a valid handle to the newly created schedule.
aConditionsAn array of system agent conditons that make up the schedule.
aDefaultRunTimeThe time at which the schedule with run if no conditions are met. Default run times of all schedules created using this API are assumed to be local time based.
Return Value
KErrNone, if successful, KErrArgument if the condition array is empty or if the publish and subscribe variables have an invalid category. KErrServerBusy, if a backup or restore operation is taking place. KErrPermissionDenied if the client does not have WriteDeviceData capability. Otherwise one of the other system wide error codes.
Capability
WriteDeviceData

DeleteSchedule ( const TInt )

IMPORT_C TIntDeleteSchedule(const TIntaScheduleHandle)const

Deletes the specified schedule.

Note that a schedule cannot be deleted if there are tasks associated with it; the tasks must be explicitly deleted first.

Parameters
aScheduleHandleThe Id that identifies the schedule.
Return Value
KErrNone if successful, KErrNotFound if there is no schedule with the specified Id, KErrArgument if there are outstanding tasks associated with the schedule, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, KErrServerBusy, if a backup or restore operation is taking place or any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

DeleteTask ( const TInt )

IMPORT_C TIntDeleteTask(const TIntaTaskId)const

Deletes the specified task.

Parameters
aTaskIdThe Id that identifies the task.
Return Value
KErrNone if successful, KErrNotFound if there is no task with the specified Id, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, KErrServerBusy, if a backup or restore operation is taking place or any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the relevant schedule creator, or WriteDeviceData capability can sucessfully call this API.

DisableSchedule ( const TInt )

IMPORT_C TIntDisableSchedule(const TIntaScheduleHandle)const

Disables the specified schedule.

Parameters
aScheduleHandleThe Id that identifies the schedule.
Return Value
KErrNone if successful, KErrNotFound if there is no schedule with the specified Id, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, KErrServerBusy, if a backup or restore operation is taking place or any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

EditSchedule ( const TInt, const CArrayFixFlat< TScheduleEntryInfo2 > & )

IMPORT_C TIntEditSchedule(const TIntaScheduleHandle,
const CArrayFixFlat< TScheduleEntryInfo2 > &aEntryList
)

Changes a time based schedule.

Note that changing a schedule is implemented by supplying a replacement set of schedule entries.

See also: TScheduleEntryInfo2

Parameters
aScheduleHandleThe Id that identifies the schedule.
aEntryListThe set of schedule entries that will make up the new schedule.
Return Value
KErrNone if successful, KErrNotFound if there is no schedule with the specified Id, KErrArgument if the schedule is not a time based one, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, KErrServerBusy, if a backup or restore operation is taking place or any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

EditSchedule ( TInt, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTsTime & )

IMPORT_C TIntEditSchedule(TIntaScheduleHandle,
const CArrayFixFlat< TTaskSchedulerCondition > &aConditions,
const TTsTime &aDefaultRunTime
)

Changes a condition based schedule.

Note that changing a schedule is implemented by supplying a replacement set of schedule conditons and time.

Parameters
aScheduleHandleThe Id that identifies the schedule.
aConditionsAn array of system agent conditons that make up the schedule.
aDefaultRunTimeThe time at which the schedule with run if no conditions are met. If this is a local time based value, the schedule will remain at that local time regardless of timezone and DST changes (ie. it will float) If the value is UTC based, the schedule will remain at that UTC time (will not float).
Return Value
KErrNone if successful, KErrNotFound if there is no schedule with the specified Id, KErrArgument if the schedule is not a condition based one or if the publish and subscribe variables, defined by aConditions category and key values, do not exist or are not of integral type, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, KErrServerBusy, if a backup or restore operation is taking place, or any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

EditSchedule ( const TInt, const CArrayFixFlat< TScheduleEntryInfo > & )

IMPORT_C TIntEditSchedule(const TIntaScheduleHandle,
const CArrayFixFlat< TScheduleEntryInfo > &aEntryList
)
Deprecated

Changes a time based schedule.

Note that changing a schedule is implemented by supplying a replacement set of schedule entries.

See also: TScheduleEntryInfo

See note in CSch_Cli.h

Parameters
aScheduleHandleThe Id that identifies the schedule.
aEntryListThe set of schedule entries that will make up the new schedule. Start times of all entries are assumed to be local time based.
Return Value
KErrNone if successful, KErrNotFound if there is no schedule with the specified Id, KErrArgument if the schedule is not a time based one, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, KErrServerBusy, if a backup or restore operation is taking place or any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

EditSchedule ( TInt, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTime & )

IMPORT_C TIntEditSchedule(TIntaScheduleHandle,
const CArrayFixFlat< TTaskSchedulerCondition > &aConditions,
const TTime &aDefaultRunTime
)

Changes a condition based schedule.

Note that changing a schedule is implemented by supplying a replacement set of schedule conditons and time.

DeprecatedSee note in CSch_Cli.h
Parameters
aScheduleHandleThe Id that identifies the schedule.
aConditionsAn array of system agent conditons that make up the schedule.
aDefaultRunTimeThe time at which the schedule with run if no conditions are met. Note that this parameter is assumed to be local time based.
Return Value
KErrNone if successful, KErrNotFound if there is no schedule with the specified Id, KErrArgument if the schedule is not a condition based one or if the publish and subscribe variables, defined by aConditions category and key values, do not exist or are not of integral type, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, KErrServerBusy, if a backup or restore operation is taking place or any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

EnableSchedule ( const TInt )

IMPORT_C TIntEnableSchedule(const TIntaScheduleHandle)const

Enables the specified schedule.

Parameters
aScheduleHandleThe Id that identifies the schedule.
Return Value
KErrNone if successful. KErrNotFound if there is no schedule with the specified Id, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, KErrServerBusy, if a backup or restore operation is taking place or any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

GetScheduleL ( const TInt, TScheduleState2 &, CArrayFixFlat< TScheduleEntryInfo2 > &, CArrayFixFlat< TTaskInfo > &, TTsTime & )

IMPORT_C TIntGetScheduleL(const TIntaScheduleHandle,
TScheduleState2 &aState,
CArrayFixFlat< TScheduleEntryInfo2 > &aEntries,
CArrayFixFlat< TTaskInfo > &aTasks,
TTsTime &aDueTime
)

Gets information relating to a specified time based schedule.

See also: TScheduleEntryInfo2 TTaskInfo

Parameters
aScheduleHandleThe Id that identifies the schedule.
aStateOn return, the state of the specified schedule.
aEntriesOn return, a populated array of schedule entries that make up the schedule. Note that populating the array could cause this function to leave because of an out of memory condition.
aTasksOn return, a populated array of tasks associated with the schedule. Note that populating the array could cause this function to leave because of an out of memory condition.
aDueTimeOn return, the time that the schedule is next due. This value may be local time or UTC based,dependent on the type of time used for schedule entries. Comparisons used within the scheduler to find the next due time are UTC based.
Return Value
KErrNone if successful, KErrNotFound if there is no schedule with the specified Id, KErrArgument if the schedule is not a time based one, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, or any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

GetScheduleL ( TInt, TScheduleState2 &, CArrayFixFlat< TTaskSchedulerCondition > &, TTsTime &, CArrayFixFlat< TTaskInfo > & )

IMPORT_C TIntGetScheduleL(TIntaScheduleHandle,
TScheduleState2 &aState,
CArrayFixFlat< TTaskSchedulerCondition > &aConditions,
TTsTime &aDefaultRunTime,
CArrayFixFlat< TTaskInfo > &aTasks
)

Gets information relating to a specified condition based schedule.

See also: TTaskSchedulerCondition TTaskInfo

Parameters
aScheduleHandleThe Id that identifies the schedule.
aStateOn return, the state of the specified schedule.
aConditionsOn return, a populated array of schedule conditons that make up the schedule. Note that populating the array could cause this function to leave because of an out of memory condition.
aDefaultRunTimeOn return, the time at which the schedule with run if no conditions are met. If this is a local time based value, the schedule will remain at that local time regardless of timezone and DST changes (ie. it will float) If the value is UTC based, the schedule will remain at that UTC time (will not float).
aTasksOn return, a populated array of tasks associated with the schedule. Note that populating the array could cause this function to leave because of an out of memory condition.
Return Value
KErrNone if successful, KErrNotFound if there is no schedule with the specified Id, KErrArgument if the schedule is not a condition based one, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, or any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

GetScheduleL ( const TInt, TScheduleState &, CArrayFixFlat< TScheduleEntryInfo > &, CArrayFixFlat< TTaskInfo > &, TTime & )

IMPORT_C TIntGetScheduleL(const TIntaScheduleHandle,
TScheduleState &aState,
CArrayFixFlat< TScheduleEntryInfo > &aEntries,
CArrayFixFlat< TTaskInfo > &aTasks,
TTime &aDueTime
)
Deprecated

Gets information relating to a specified time based schedule.

See also: TScheduleEntryInfo TTaskInfo

See note in CSch_Cli.h

Parameters
aScheduleHandleThe Id that identifies the schedule.
aStateOn return, the state of the specified schedule. On return, aState will have a local time based iDueTime member, regardless of whether the schedule is UTC or local time based. If the schedule is UTC based, the due time will be converted to a local time based value before returning.
aEntriesOn return, a populated array of schedule entries that make up the schedule. All entry start times returned will be local time based, though they may be UTC or local time based within the scheduler. The scheduler will convert any UTC based times to local time before returning. Note that populating the array could cause this function to leave because of an out of memory condition.
aTasksOn return, a populated array of tasks associated with the schedule. Note that populating the array could cause this function to leave because of an out of memory condition.
aDueTimeOn return, the time that the schedule is next due. This value will be local time based, regardless of whether the schedule is UTC or local time based. If the schedule is UTC based, the due time will be converted to a local time based value before returning.
Return Value
KErrNone if successful, KErrNotFound if there is no schedule with the specified Id, KErrArgument if the schedule is not a time based one, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, or any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

GetScheduleL ( TInt, TScheduleState &, CArrayFixFlat< TTaskSchedulerCondition > &, TTime &, CArrayFixFlat< TTaskInfo > & )

IMPORT_C TIntGetScheduleL(TIntaScheduleHandle,
TScheduleState &aState,
CArrayFixFlat< TTaskSchedulerCondition > &aConditions,
TTime &aDefaultRunTime,
CArrayFixFlat< TTaskInfo > &aTasks
)
Deprecated

Gets information relating to a specified condition based schedule.

See also: TTaskSchedulerCondition TTaskInfo

See note in CSch_Cli.h

Parameters
aScheduleHandleThe Id that identifies the schedule.
aStateOn return, the state of the specified schedule. On return, aState will have a local time based iDueTime member, regardless of whether the schedule is UTC or local time based. If the schedule is UTC based, the due time will be converted to a local time based value before returning.
aConditionsOn return, a populated array of schedule conditons that make up the schedule. Note that populating the array could cause this function to leave because of an out of memory condition.
aDefaultRunTimeOn return, the time at which the schedule with run if no conditions are met. This value will be local time based, regardless of whether the schedule is UTC or local time based. If the schedule is UTC based, the due time will be converted to a local time based value before returning.
aTasksOn return, a populated array of tasks associated with the schedule. Note that populating the array could cause this function to leave because of an out of memory condition.
Return Value
KErrNone if successful, KErrNotFound if there is no schedule with the specified Id, KErrArgument if the schedule is not a condition based one, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, or any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

GetScheduleRefsL ( CArrayFixFlat< TSchedulerItemRef > &, const TScheduleFilter )

IMPORT_C TIntGetScheduleRefsL(CArrayFixFlat< TSchedulerItemRef > &aScheduleRefArray,
const TScheduleFilteraFilter
)

Gets a list of all schedules, or a subset of schedules.

See also: TSchedulerItemRef

Parameters
aScheduleRefArrayOn return, a populated array of schedule definitions. Note that populating the array could cause this function to leave because of an out of memory condition.
aFilterThe schedule filter.
Return Value
KErrNone if successful otherwise one of the other system wide error codes.
Capability
NoteA call to this API will only retrieve schedules created with the caller's SID. If the caller has WriteDeviceData capability all schedules will be retrieved.

GetScheduleTypeL ( TInt, TScheduleType & )

IMPORT_C TIntGetScheduleTypeL(TIntaScheduleHandle,
TScheduleType &aScheduleType
)

Gets the schedule type.

Parameters
aScheduleHandleThe Id that identifies the schedule
aScheduleTypeOn return the type of schedule relating to the handle.
Return Value
KErrNone if successful, KErrNotFound if there is no schedule with the specified Id, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, or any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

GetTaskDataSize ( const TInt, TInt & )

IMPORT_C TIntGetTaskDataSize(const TIntaTaskId,
TInt &aSize
)

Gets the size of the data to be passed to the task's program.

This function should be called before calling GetTaskInfoL() so that a descriptor of the correct size can be set up.

Parameters
aTaskIdThe Id that identifies the task.
aSizeThe size of the task's data.
Return Value
KErrNone if successful, KErrNotFound if there is no task with the specified Id, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, otherwise any of the other system wide error codes.
Capability
NoteOnly clients with the same SID as the relevant schedule creator, or WriteDeviceData capability can sucessfully call this API.

GetTaskInfoL ( const TInt, TTaskInfo &, TPtr &, TSchedulerItemRef &, TTsTime & )

IMPORT_C TIntGetTaskInfoL(const TIntaTaskId,
TTaskInfo &aTaskInfo,
TPtr &aTaskData,
TSchedulerItemRef &aRef,
TTsTime &aNextDue
)

Gets information relating to a specified task.

Parameters
aTaskIdThe Id that identifies the task.
aTaskInfoOn return, information about the task.
aTaskDataOn return, a pointer descriptor representing the data that is passed to the program to be executed. The caller must set up this pointer descriptor before calling the function. The required length of the descriptor can be found by calling GetTaskDataSize().
aRefOn return, the associated schedule definition.
aNextDueOn return, the time that the task is next due. This value may be local time or UTC based. Comparisons used to find the next due time are based on UTC.
Return Value
KErrNone, if successful. KErrNotFound, if there is no task with the specified Id, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability.
Capability
NoteOnly clients with the same SID as the relevant schedule creator, or WriteDeviceData capability can sucessfully call this API.

GetTaskInfoL ( const TInt, TTaskInfo &, TPtr &, TSchedulerItemRef &, TTime & )

IMPORT_C TIntGetTaskInfoL(const TIntaTaskId,
TTaskInfo &aTaskInfo,
TPtr &aTaskData,
TSchedulerItemRef &aRef,
TTime &aNextDue
)

Gets information relating to a specified task.

DeprecatedSee note in CSch_Cli.h
Parameters
aTaskIdThe Id that identifies the task.
aTaskInfoOn return, information about the task.
aTaskDataOn return, a pointer descriptor representing the data that is passed to the program to be executed. The caller must set up this pointer descriptor before calling the function. The required length of the descriptor can be found by calling GetTaskDataSize().
aRefOn return, the associated schedule definition.
aNextDueOn return, the time that the task is next due. This value will be local time based, regardless of whether the schedule is UTC or local time based. If the schedule is UTC based, the due time will be converted to a local time based value before returning.
Return Value
KErrNone, if successful. KErrNotFound, if there is no task with the specified Id, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability.
Capability
NoteOnly clients with the same SID as the relevant schedule creator, or WriteDeviceData capability can sucessfully call this API.

GetTaskRefsL ( CArrayFixFlat< TSchedulerItemRef > &, const TScheduleFilter, const TTaskFilter )

IMPORT_C TIntGetTaskRefsL(CArrayFixFlat< TSchedulerItemRef > &aTasks,
const TScheduleFilteraScheduleFilter,
const TTaskFilteraTaskFilter
)

Gets a list of all tasks, or a subset of tasks.

Note that if more than one client has supplied the same information when registering, then it is possible for a list of tasks to be returned, which the calling client has not scheduled.

See also: TSchedulerItemRef

Parameters
aTasksOn return, a populated array of schedule definitions. The schedule definitions are those whose associated tasks satisfy the selection criteria. Note that populating the array could cause this function to leave because of an out of memory condition.
aScheduleFilterThe schedule filter.
aTaskFilterThe task filter.
Return Value
KErrNone if successful otherwise one of the other system wide error codes.
Capability
NoteA call to this API will only retrieve tasks created with the caller's SID. If the caller has WriteDeviceData capability all tasks will be retrieved.

Register ( const TFileName &, const TInt )

IMPORT_C TIntRegister(const TFileName &aFileName,
const TIntaPriority
)

Registers a client with the Task Scheduler.

A client must register with the Task Scheduler before scheduling any tasks, but does not need to register just to create and edit schedules.

Parameters
aFileNameThe name and full path of a program that encapsulates the client-specific knowledge for implementing tasks. On the emulator, the program should be a DLL; on an ARM processor, it should be an executable.
aPriorityA priority value.
Return Value
KErrNone, if successful; otherwise one of the other system wide error codes.

ScheduleTask ( TTaskInfo &, HBufC &, const TInt )

IMPORT_C TIntScheduleTask(TTaskInfo &aTaskInfo,
HBufC &aTaskData,
const TIntaScheduleHandle
)

Adds a task to an existing persistent schedule.

Behaviour of execution after a Backup and Restore operation should be considered when adding tasks to a persistent schedule. Persistent schedules might be backed up when a one-off task might be pending, and become due and executed some time after the backup operation. When the backup is restored, the tasks might be executed again if they are still valid (restore done during the validation period for time-based schedules, or conditions satisfied after restore for condition-based schedules). Clients should refrain from creating tasks that might have undesired effects under these conditions (e.g. by incurring a cost to the user by sending an SMS twice).

Parameters
aTaskInfoInformation about the task to be added to the schedule. On return the task Id is written into this class.
aTaskDataData that is passed to the task on execution.
aScheduleHandleThe Id that identifies the schedule to be used.
Return Value
KErrNone if successful, KErrNotFound if there is no schedule with the specified Id, KErrArgument if a task with a repeat vale other than 0 is being tried to be assigned to a condition based schedule, KErrPermissionDenied if the client does not have the same SID as the schedules creator or has WriteDeviceData capability, KErrServerBusy, if a backup or restore operation is taking place or any of the other system wide error codes.
Panic Codes
CTaskScheduler0 The client has not registered. The client must register before adding tasks to the schedule.
Capability
NoteOnly clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

ScheduleTask ( TTaskInfo &, HBufC &, TSchedulerItemRef &, const CArrayFixFlat< TScheduleEntryInfo2 > & )

IMPORT_C TIntScheduleTask(TTaskInfo &aTaskInfo,
HBufC &aTaskData,
TSchedulerItemRef &aRef,
const CArrayFixFlat< TScheduleEntryInfo2 > &aEntryList
)

Creates a new, transient, time based schedule and adds a task to it.

Note that a transient schedule is destroyed when the task is destroyed or power is lost.

See also: TScheduleEntryInfo2

Parameters
aTaskInfoInformation about the task to be added to the transient schedule. On return the task Id is written into this class.
aTaskDataData that is passed to the task on execution.
aRefDefinition of the new transient schedule.
aEntryListThe set of schedule entries that make up the new transient schedule.
Return Value
KErrNone, if successful, or any of the other system wide error codes.
Panic Codes
CTaskScheduler0 The client has not registered. The client must register before adding tasks to the schedule.

ScheduleTask ( TTaskInfo &, HBufC &, TSchedulerItemRef &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTsTime & )

IMPORT_C TIntScheduleTask(TTaskInfo &aTaskInfo,
HBufC &aTaskData,
TSchedulerItemRef &aRef,
const CArrayFixFlat< TTaskSchedulerCondition > &aConditions,
const TTsTime &aDefaultRunTime
)

Creates a new, transient, condition based schedule and adds a task to it.

Note that a transient schedule is destroyed when the task is destroyed or power is lost.

Parameters
aTaskInfoInformation about the task to be added to the transient schedule. On return the task Id is written into this class.
aTaskDataData that is passed to the task on execution.
aRefDefinition of the new transient schedule.
aConditionsAn array of schedule conditons that make up the schedule.
aDefaultRunTimeThe time at which the schedule will run if no conditions are met. If this is a local time based value, the schedule will remain at that local time regardless of timezone and DST changes (ie. it will float) If the value is UTC based, the schedule will remain at that UTC time (will not float).
Return Value
KErrNone, if successful, KErrArgument if the publish and subscribe variables, defined by aConditions category and key values, do not exist or are not of integral type, or any of the other system wide error codes.
Panic Codes
CTaskScheduler0 The client has not registered. The client must register before adding tasks to the schedule.

ScheduleTask ( TTaskInfo &, HBufC &, TSchedulerItemRef &, const CArrayFixFlat< TScheduleEntryInfo > & )

IMPORT_C TIntScheduleTask(TTaskInfo &aTaskInfo,
HBufC &aTaskData,
TSchedulerItemRef &aRef,
const CArrayFixFlat< TScheduleEntryInfo > &aEntryList
)
Deprecated

Creates a new, transient, time based schedule and adds a task to it.

Note that a transient schedule is destroyed when the task is destroyed or power is lost.

See also: TScheduleEntryInfo

See note in CSch_Cli.h

Parameters
aTaskInfoInformation about the task to be added to the transient schedule. On return the task Id is written into this class.
aTaskDataData that is passed to the task on execution.
aRefDefinition of the new transient schedule.
aEntryListThe set of schedule entries that make up the new transient schedule. All entry start times are assumed to be local time based.
Return Value
KErrNone, if successful, otherwise one of the other system wide error codes.
Panic Codes
CTaskScheduler0 The client has not registered. The client must register before adding tasks to the schedule.

ScheduleTask ( TTaskInfo &, HBufC &, TSchedulerItemRef &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTime & )

IMPORT_C TIntScheduleTask(TTaskInfo &aTaskInfo,
HBufC &aTaskData,
TSchedulerItemRef &aRef,
const CArrayFixFlat< TTaskSchedulerCondition > &aConditions,
const TTime &aDefaultRunTime
)

Creates a new, transient, condition based schedule and adds a task to it.

Note that a transient schedule is destroyed when the task is destroyed or power is lost.

DeprecatedSee note in CSch_Cli.h
Parameters
aTaskInfoInformation about the task to be added to the transient schedule. On return the task Id is written into this class.
aTaskDataData that is passed to the task on execution.
aRefDefinition of the new transient schedule.
aConditionsAn array of schedule conditons that make up the schedule.
aDefaultRunTimeThe time at which the schedule with run if no conditions are met. aDefaultRunTime is assumed to be local time based.
Return Value
KErrNone, if successful, KErrArgument if the publish and subscribe variables, defined by aConditions category and key values, do not exist or are not of integral type, otherwise one of the other system wide error codes.
Panic Codes
CTaskScheduler0 The client has not registered. The client must register before adding tasks to the schedule.

Version ( )

IMPORT_C TVersionVersion()const

Gets the client side version number.

Return Value
The version number.

__DbgCheckHeap ( TInt )

IMPORT_C TInt__DbgCheckHeap(TIntaCount)

__DbgFailNext ( TInt )

IMPORT_C TInt__DbgFailNext(TIntaCount)

__DbgMarkEnd ( TInt )

IMPORT_C TInt__DbgMarkEnd(TIntaCount)

__DbgMarkHeap ( )

IMPORT_C TInt__DbgMarkHeap()

__DbgResetHeap ( )

IMPORT_C TInt__DbgResetHeap()

__FaultServer ( )

IMPORT_C TInt__FaultServer()