RScheduler Class Reference

class RScheduler : public RSessionBase

Client side interface to the Task Scheduler.

Inherits from

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()
Private Member Functions
TInt CreateSchedule(TSchedulerItemRef &, const CArrayFixFlat< TScheduleEntryInfo2 > &, const TScheduleSettings2 &)
TInt CreateSchedule(TSchedulerItemRef &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTsTime &, const TScheduleSettings2 &)
TInt GetScheduleDataL(const TInt, const TScheduleInfo &, CArrayFixFlat< TScheduleEntryInfo2 > &)
TInt GetScheduleDataL(const TInt, const TScheduleInfo &, CArrayFixFlat< TTaskSchedulerCondition > &, TTsTime &)
TInt GetScheduleInfo(const TInt, TScheduleInfo &, TTsTime &)
TInt GetTaskDataL(const TInt, const TScheduleInfo &, CArrayFixFlat< TTaskInfo > &)
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()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RScheduler()

IMPORT_CRScheduler()

Default constructor.

Member Functions Documentation

Connect()

IMPORT_C TIntConnect()

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

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.

capability
WriteDeviceData
TScheduleEntryInfo2

Parameters

TSchedulerItemRef & aRefDefinition of the new schedule. On return this contains a valid handle to the newly created schedule.
const CArrayFixFlat< TScheduleEntryInfo2 > & aEntryListThe set of schedule entries that make up the new schedule.

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.

capability
WriteDeviceData
TTaskSchedulerCondition

Parameters

TSchedulerItemRef & aRefDefinition of the new schedule. On return this contains a valid handle to the newly created schedule.
const CArrayFixFlat< TTaskSchedulerCondition > & aConditionsAn array of system agent conditons that make up the schedule.
const TTsTime & 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).

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

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

Creates a persistent time based schedule.

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

capability
WriteDeviceData
TScheduleEntryInfo See note in CSch_Cli.h

Parameters

TSchedulerItemRef & aRefDefinition of the new schedule. On return this contains a valid handle to the newly created schedule.
const CArrayFixFlat< TScheduleEntryInfo > & aEntryListThe set of schedule entries that make up the new schedule. Start times of all entries are assumed to be local time based.

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

IMPORT_C TIntCreatePersistentSchedule(TSchedulerItemRef &aRef,
const CArrayFixFlat< TTaskSchedulerCondition > &aConditions,
const TTime &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.

capability
WriteDeviceData
TTaskSchedulerCondition See note in CSch_Cli.h

Parameters

TSchedulerItemRef & aRefDefinition of the new schedule. On return this contains a valid handle to the newly created schedule.
const CArrayFixFlat< TTaskSchedulerCondition > & aConditionsAn array of system agent conditons that make up the schedule.
const TTime & 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.

CreateSchedule(TSchedulerItemRef &, const CArrayFixFlat< TScheduleEntryInfo2 > &, const TScheduleSettings2 &)

TInt CreateSchedule(TSchedulerItemRef &aRef,
const CArrayFixFlat< TScheduleEntryInfo2 > &aEntryList,
const TScheduleSettings2 &aSettings
)[private]

Parameters

TSchedulerItemRef & aRef
const CArrayFixFlat< TScheduleEntryInfo2 > & aEntryList
const TScheduleSettings2 & aSettings

CreateSchedule(TSchedulerItemRef &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTsTime &, const TScheduleSettings2 &)

TInt CreateSchedule(TSchedulerItemRef &aRef,
const CArrayFixFlat< TTaskSchedulerCondition > &aConditions,
const TTsTime &aDefaultRunTime,
const TScheduleSettings2 &aSettings
)[private]

Parameters

TSchedulerItemRef & aRef
const CArrayFixFlat< TTaskSchedulerCondition > & aConditions
const TTsTime & aDefaultRunTime
const TScheduleSettings2 & aSettings

DeleteSchedule(const TInt)

IMPORT_C TIntDeleteSchedule(const TIntaScheduleHandle)const

Deletes the specified schedule.

capability
Note Only clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.
Note that a schedule cannot be deleted if there are tasks associated with it; the tasks must be explicitly deleted first.

Parameters

const TInt aScheduleHandleThe Id that identifies the schedule.

DeleteTask(const TInt)

IMPORT_C TIntDeleteTask(const TIntaTaskId)const

Deletes the specified task.

capability
Note Only clients with the same SID as the relevant schedule creator, or WriteDeviceData capability can sucessfully call this API.

Parameters

const TInt aTaskIdThe Id that identifies the task.

DisableSchedule(const TInt)

IMPORT_C TIntDisableSchedule(const TIntaScheduleHandle)const

Disables the specified schedule.

capability
Note Only clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

Parameters

const TInt aScheduleHandleThe Id that identifies the schedule.

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.

capability
Note Only clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.
TScheduleEntryInfo2

Parameters

const TInt aScheduleHandleThe Id that identifies the schedule.
const CArrayFixFlat< TScheduleEntryInfo2 > & aEntryListThe set of schedule entries that will make up the new schedule.

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.

capability
Note Only clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

Parameters

TInt aScheduleHandleThe Id that identifies the schedule.
const CArrayFixFlat< TTaskSchedulerCondition > & aConditionsAn array of system agent conditons that make up the schedule.
const TTsTime & 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).

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

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

Changes a time based schedule.

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

capability
Note Only clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.
TScheduleEntryInfo See note in CSch_Cli.h

Parameters

const TInt aScheduleHandleThe Id that identifies the schedule.
const CArrayFixFlat< TScheduleEntryInfo > & aEntryListThe set of schedule entries that will make up the new schedule. Start times of all entries are assumed to be local time based.

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.

capability
Note Only clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.
See note in CSch_Cli.h

Parameters

TInt aScheduleHandleThe Id that identifies the schedule.
const CArrayFixFlat< TTaskSchedulerCondition > & aConditionsAn array of system agent conditons that make up the schedule.
const TTime & aDefaultRunTimeThe time at which the schedule with run if no conditions are met. Note that this parameter is assumed to be local time based.

EnableSchedule(const TInt)

IMPORT_C TIntEnableSchedule(const TIntaScheduleHandle)const

Enables the specified schedule.

capability
Note Only clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

Parameters

const TInt aScheduleHandleThe Id that identifies the schedule.

GetScheduleDataL(const TInt, const TScheduleInfo &, CArrayFixFlat< TScheduleEntryInfo2 > &)

TInt GetScheduleDataL(const TIntaScheduleHandle,
const TScheduleInfo &aInfo,
CArrayFixFlat< TScheduleEntryInfo2 > &aEntries
)[private]

Parameters

const TInt aScheduleHandle
const TScheduleInfo & aInfo
CArrayFixFlat< TScheduleEntryInfo2 > & aEntries

GetScheduleDataL(const TInt, const TScheduleInfo &, CArrayFixFlat< TTaskSchedulerCondition > &, TTsTime &)

TInt GetScheduleDataL(const TIntaScheduleHandle,
const TScheduleInfo &aInfo,
CArrayFixFlat< TTaskSchedulerCondition > &aConditions,
TTsTime &aDefaultRunTime
)[private]

Parameters

const TInt aScheduleHandle
const TScheduleInfo & aInfo
CArrayFixFlat< TTaskSchedulerCondition > & aConditions
TTsTime & aDefaultRunTime

GetScheduleInfo(const TInt, TScheduleInfo &, TTsTime &)

TInt GetScheduleInfo(const TIntaScheduleHandle,
TScheduleInfo &aInfo,
TTsTime &aNextDue
)[private]

Parameters

const TInt aScheduleHandle
TScheduleInfo & aInfo
TTsTime & aNextDue

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.

capability
Note Only clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.
TScheduleEntryInfo2 TTaskInfo

Parameters

const TInt aScheduleHandleThe Id that identifies the schedule.
TScheduleState2 & aStateOn return, the state of the specified schedule.
CArrayFixFlat< TScheduleEntryInfo2 > & 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.
CArrayFixFlat< TTaskInfo > & 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.
TTsTime & 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.

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.

capability
Note Only clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.
TTaskSchedulerCondition TTaskInfo

Parameters

TInt aScheduleHandleThe Id that identifies the schedule.
TScheduleState2 & aStateOn return, the state of the specified schedule.
CArrayFixFlat< TTaskSchedulerCondition > & 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.
TTsTime & 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).
CArrayFixFlat< TTaskInfo > & 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.

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

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

Gets information relating to a specified time based schedule.

capability
Note Only clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.
TScheduleEntryInfo TTaskInfo See note in CSch_Cli.h

Parameters

const TInt aScheduleHandleThe Id that identifies the schedule.
TScheduleState & 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.
CArrayFixFlat< TScheduleEntryInfo > & 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.
CArrayFixFlat< TTaskInfo > & 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.
TTime & 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.

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

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

Gets information relating to a specified condition based schedule.

capability
Note Only clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.
TTaskSchedulerCondition TTaskInfoSee note in CSch_Cli.h

Parameters

TInt aScheduleHandleThe Id that identifies the schedule.
TScheduleState & 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.
CArrayFixFlat< TTaskSchedulerCondition > & 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.
TTime & 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.
CArrayFixFlat< TTaskInfo > & 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.

GetScheduleRefsL(CArrayFixFlat< TSchedulerItemRef > &, const TScheduleFilter)

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

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

capability
Note A 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.
TSchedulerItemRef

Parameters

CArrayFixFlat< TSchedulerItemRef > & 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.
const TScheduleFilter aFilterThe schedule filter.

GetScheduleTypeL(TInt, TScheduleType &)

IMPORT_C TIntGetScheduleTypeL(TIntaScheduleHandle,
TScheduleType &aScheduleType
)

Gets the schedule type.

capability
Note Only clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.

Parameters

TInt aScheduleHandleThe Id that identifies the schedule
TScheduleType & aScheduleTypeOn return the type of schedule relating to the handle.

GetTaskDataL(const TInt, const TScheduleInfo &, CArrayFixFlat< TTaskInfo > &)

TInt GetTaskDataL(const TIntaScheduleHandle,
const TScheduleInfo &aInfo,
CArrayFixFlat< TTaskInfo > &aTasks
)[private]

Parameters

const TInt aScheduleHandle
const TScheduleInfo & aInfo
CArrayFixFlat< TTaskInfo > & aTasks

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.

capability
Note Only clients with the same SID as the relevant schedule creator, or WriteDeviceData capability can sucessfully call this API.

Parameters

const TInt aTaskIdThe Id that identifies the task.
TInt & aSizeThe size of the task's data.

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.

capability
Note Only clients with the same SID as the relevant schedule creator, or WriteDeviceData capability can sucessfully call this API.

Parameters

const TInt aTaskIdThe Id that identifies the task.
TTaskInfo & aTaskInfoOn return, information about the task.
TPtr & 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().
TSchedulerItemRef & aRefOn return, the associated schedule definition.
TTsTime & 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.

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.

capability
Note Only clients with the same SID as the relevant schedule creator, or WriteDeviceData capability can sucessfully call this API.
See note in CSch_Cli.h

Parameters

const TInt aTaskIdThe Id that identifies the task.
TTaskInfo & aTaskInfoOn return, information about the task.
TPtr & 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().
TSchedulerItemRef & aRefOn return, the associated schedule definition.
TTime & 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.

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.

capability
Note A 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.
TSchedulerItemRef

Parameters

CArrayFixFlat< TSchedulerItemRef > & 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.
const TScheduleFilter aScheduleFilterThe schedule filter.
const TTaskFilter aTaskFilterThe task filter.

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

const TFileName & 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.
const TInt aPriorityA priority value.

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).

capability
Note Only clients with the same SID as the schedule creator, or WriteDeviceData capability can sucessfully call this API.
panic
CTaskScheduler 0 The client has not registered. The client must register before adding tasks to the schedule.

Parameters

TTaskInfo & aTaskInfoInformation about the task to be added to the schedule. On return the task Id is written into this class.
HBufC & aTaskDataData that is passed to the task on execution.
const TInt aScheduleHandleThe Id that identifies the schedule to be used.

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.

panic
CTaskScheduler 0 The client has not registered. The client must register before adding tasks to the schedule.
TScheduleEntryInfo2

Parameters

TTaskInfo & aTaskInfoInformation about the task to be added to the transient schedule. On return the task Id is written into this class.
HBufC & aTaskDataData that is passed to the task on execution.
TSchedulerItemRef & aRefDefinition of the new transient schedule.
const CArrayFixFlat< TScheduleEntryInfo2 > & aEntryListThe set of schedule entries that make up the new transient 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.

panic
CTaskScheduler 0 The client has not registered. The client must register before adding tasks to the schedule.

Parameters

TTaskInfo & aTaskInfoInformation about the task to be added to the transient schedule. On return the task Id is written into this class.
HBufC & aTaskDataData that is passed to the task on execution.
TSchedulerItemRef & aRefDefinition of the new transient schedule.
const CArrayFixFlat< TTaskSchedulerCondition > & aConditionsAn array of schedule conditons that make up the schedule.
const TTsTime & 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).

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

IMPORT_C TIntScheduleTask(TTaskInfo &aTaskInfo,
HBufC &aTaskData,
TSchedulerItemRef &aRef,
const CArrayFixFlat< TScheduleEntryInfo > &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.

panic
CTaskScheduler 0 The client has not registered. The client must register before adding tasks to the schedule.
TScheduleEntryInfo See note in CSch_Cli.h

Parameters

TTaskInfo & aTaskInfoInformation about the task to be added to the transient schedule. On return the task Id is written into this class.
HBufC & aTaskDataData that is passed to the task on execution.
TSchedulerItemRef & aRefDefinition of the new transient schedule.
const CArrayFixFlat< TScheduleEntryInfo > & aEntryListThe set of schedule entries that make up the new transient schedule. All entry start times are assumed to be local time based.

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.

panic
CTaskScheduler 0 The client has not registered. The client must register before adding tasks to the schedule.
See note in CSch_Cli.h

Parameters

TTaskInfo & aTaskInfoInformation about the task to be added to the transient schedule. On return the task Id is written into this class.
HBufC & aTaskDataData that is passed to the task on execution.
TSchedulerItemRef & aRefDefinition of the new transient schedule.
const CArrayFixFlat< TTaskSchedulerCondition > & aConditionsAn array of schedule conditons that make up the schedule.
const TTime & aDefaultRunTimeThe time at which the schedule with run if no conditions are met. aDefaultRunTime is assumed to be local time based.

Version()

IMPORT_C TVersionVersion()const

Gets the client side version number.

__DbgCheckHeap(TInt)

IMPORT_C TInt__DbgCheckHeap(TIntaCount)

Parameters

TInt aCount

__DbgFailNext(TInt)

IMPORT_C TInt__DbgFailNext(TIntaCount)

Parameters

TInt aCount

__DbgMarkEnd(TInt)

IMPORT_C TInt__DbgMarkEnd(TIntaCount)

Parameters

TInt aCount

__DbgMarkHeap()

IMPORT_C TInt__DbgMarkHeap()

__DbgResetHeap()

IMPORT_C TInt__DbgResetHeap()

__FaultServer()

IMPORT_C TInt__FaultServer()