RScheduler Class Reference

class RScheduler : public RSessionBase

Client side interface to the Task Scheduler.

Inherits from

Public Member Functions
RScheduler ()
IMPORT_C TInt Connect ()
IMPORT_C TInt CreatePersistentSchedule ( TSchedulerItemRef &, const CArrayFixFlat < TScheduleEntryInfo2 > &)
IMPORT_C TInt CreatePersistentSchedule ( TSchedulerItemRef &, const CArrayFixFlat < TTaskSchedulerCondition > &, const TTsTime &)
IMPORT_C TInt CreatePersistentSchedule ( TSchedulerItemRef &, const CArrayFixFlat < TScheduleEntryInfo > &)
IMPORT_C TInt CreatePersistentSchedule ( TSchedulerItemRef &, const CArrayFixFlat < TTaskSchedulerCondition > &, const TTime &)
IMPORT_C TInt DeleteSchedule (const TInt )
IMPORT_C TInt DeleteTask (const TInt )
IMPORT_C TInt DisableSchedule (const TInt )
IMPORT_C TInt EditSchedule (const TInt , const CArrayFixFlat < TScheduleEntryInfo2 > &)
IMPORT_C TInt EditSchedule ( TInt , const CArrayFixFlat < TTaskSchedulerCondition > &, const TTsTime &)
IMPORT_C TInt EditSchedule (const TInt , const CArrayFixFlat < TScheduleEntryInfo > &)
IMPORT_C TInt EditSchedule ( TInt , const CArrayFixFlat < TTaskSchedulerCondition > &, const TTime &)
IMPORT_C TInt EnableSchedule (const TInt )
IMPORT_C TInt GetScheduleL (const TInt , TScheduleState2 &, CArrayFixFlat < TScheduleEntryInfo2 > &, CArrayFixFlat < TTaskInfo > &, TTsTime &)
IMPORT_C TInt GetScheduleL ( TInt , TScheduleState2 &, CArrayFixFlat < TTaskSchedulerCondition > &, TTsTime &, CArrayFixFlat < TTaskInfo > &)
IMPORT_C TInt GetScheduleL (const TInt , TScheduleState &, CArrayFixFlat < TScheduleEntryInfo > &, CArrayFixFlat < TTaskInfo > &, TTime &)
IMPORT_C TInt GetScheduleL ( TInt , TScheduleState &, CArrayFixFlat < TTaskSchedulerCondition > &, TTime &, CArrayFixFlat < TTaskInfo > &)
IMPORT_C TInt GetScheduleRefsL ( CArrayFixFlat < TSchedulerItemRef > &, const TScheduleFilter )
IMPORT_C TInt GetScheduleTypeL ( TInt , TScheduleType &)
IMPORT_C TInt GetTaskDataSize (const TInt , TInt &)
IMPORT_C TInt GetTaskInfoL (const TInt , TTaskInfo &, TPtr &, TSchedulerItemRef &, TTsTime &)
IMPORT_C TInt GetTaskInfoL (const TInt , TTaskInfo &, TPtr &, TSchedulerItemRef &, TTime &)
IMPORT_C TInt GetTaskRefsL ( CArrayFixFlat < TSchedulerItemRef > &, const TScheduleFilter , const TTaskFilter )
IMPORT_C TInt Register (const TFileName &, const TInt )
IMPORT_C TInt ScheduleTask ( TTaskInfo &, HBufC &, const TInt )
IMPORT_C TInt ScheduleTask ( TTaskInfo &, HBufC &, TSchedulerItemRef &, const CArrayFixFlat < TScheduleEntryInfo2 > &)
IMPORT_C TInt ScheduleTask ( TTaskInfo &, HBufC &, TSchedulerItemRef &, const CArrayFixFlat < TTaskSchedulerCondition > &, const TTsTime &)
IMPORT_C TInt ScheduleTask ( TTaskInfo &, HBufC &, TSchedulerItemRef &, const CArrayFixFlat < TScheduleEntryInfo > &)
IMPORT_C TInt ScheduleTask ( TTaskInfo &, HBufC &, TSchedulerItemRef &, const CArrayFixFlat < TTaskSchedulerCondition > &, const TTime &)
IMPORT_C TVersion Version ()
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_C RScheduler ( )

Default constructor.

Member Functions Documentation

Connect()

IMPORT_C TInt Connect ( )

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

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

IMPORT_C TInt CreatePersistentSchedule ( 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 & aRef Definition of the new schedule. On return this contains a valid handle to the newly created schedule.
const CArrayFixFlat < TScheduleEntryInfo2 > & aEntryList The set of schedule entries that make up the new schedule.

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

IMPORT_C TInt CreatePersistentSchedule ( 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 & aRef Definition of the new schedule. On return this contains a valid handle to the newly created schedule.
const CArrayFixFlat < TTaskSchedulerCondition > & aConditions An array of system agent conditons that make up the schedule.
const TTsTime & aDefaultRunTime 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).

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

IMPORT_C TInt CreatePersistentSchedule ( 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 & aRef Definition of the new schedule. On return this contains a valid handle to the newly created schedule.
const CArrayFixFlat < TScheduleEntryInfo > & aEntryList The 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 TInt CreatePersistentSchedule ( 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 & aRef Definition of the new schedule. On return this contains a valid handle to the newly created schedule.
const CArrayFixFlat < TTaskSchedulerCondition > & aConditions An array of system agent conditons that make up the schedule.
const TTime & aDefaultRunTime The 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 TInt DeleteSchedule ( const TInt aScheduleHandle ) 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 aScheduleHandle The Id that identifies the schedule.

DeleteTask(const TInt)

IMPORT_C TInt DeleteTask ( const TInt aTaskId ) 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 aTaskId The Id that identifies the task.

DisableSchedule(const TInt)

IMPORT_C TInt DisableSchedule ( const TInt aScheduleHandle ) 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 aScheduleHandle The Id that identifies the schedule.

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

IMPORT_C TInt EditSchedule ( const TInt aScheduleHandle,
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 aScheduleHandle The Id that identifies the schedule.
const CArrayFixFlat < TScheduleEntryInfo2 > & aEntryList The set of schedule entries that will make up the new schedule.

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

IMPORT_C TInt EditSchedule ( TInt aScheduleHandle,
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 aScheduleHandle The Id that identifies the schedule.
const CArrayFixFlat < TTaskSchedulerCondition > & aConditions An array of system agent conditons that make up the schedule.
const TTsTime & aDefaultRunTime 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).

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

IMPORT_C TInt EditSchedule ( const TInt aScheduleHandle,
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 aScheduleHandle The Id that identifies the schedule.
const CArrayFixFlat < TScheduleEntryInfo > & aEntryList The 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 TInt EditSchedule ( TInt aScheduleHandle,
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 aScheduleHandle The Id that identifies the schedule.
const CArrayFixFlat < TTaskSchedulerCondition > & aConditions An array of system agent conditons that make up the schedule.
const TTime & aDefaultRunTime The 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 TInt EnableSchedule ( const TInt aScheduleHandle ) 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 aScheduleHandle The Id that identifies the schedule.

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

TInt GetScheduleDataL ( const TInt aScheduleHandle,
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 TInt aScheduleHandle,
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 TInt aScheduleHandle,
TScheduleInfo & aInfo,
TTsTime & aNextDue
) [private]

Parameters

const TInt aScheduleHandle
TScheduleInfo & aInfo
TTsTime & aNextDue

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

IMPORT_C TInt GetScheduleL ( const TInt aScheduleHandle,
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 aScheduleHandle The Id that identifies the schedule.
TScheduleState2 & aState On return, the state of the specified schedule.
CArrayFixFlat < TScheduleEntryInfo2 > & aEntries On 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 > & aTasks On 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 & aDueTime On 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 TInt GetScheduleL ( TInt aScheduleHandle,
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 aScheduleHandle The Id that identifies the schedule.
TScheduleState2 & aState On return, the state of the specified schedule.
CArrayFixFlat < TTaskSchedulerCondition > & aConditions On 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 & aDefaultRunTime On 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 > & aTasks On 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 TInt GetScheduleL ( const TInt aScheduleHandle,
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 aScheduleHandle The Id that identifies the schedule.
TScheduleState & aState On 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 > & aEntries On 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 > & aTasks On 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 & aDueTime On 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 TInt GetScheduleL ( TInt aScheduleHandle,
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 TTaskInfo See note in CSch_Cli.h

Parameters

TInt aScheduleHandle The Id that identifies the schedule.
TScheduleState & aState On 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 > & aConditions On 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 & aDefaultRunTime On 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 > & aTasks On 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 TInt GetScheduleRefsL ( CArrayFixFlat < TSchedulerItemRef > & aScheduleRefArray,
const TScheduleFilter aFilter
)

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 > & aScheduleRefArray On 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 aFilter The schedule filter.

GetScheduleTypeL(TInt, TScheduleType &)

IMPORT_C TInt GetScheduleTypeL ( TInt aScheduleHandle,
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 aScheduleHandle The Id that identifies the schedule
TScheduleType & aScheduleType On return the type of schedule relating to the handle.

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

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

Parameters

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

GetTaskDataSize(const TInt, TInt &)

IMPORT_C TInt GetTaskDataSize ( const TInt aTaskId,
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 aTaskId The Id that identifies the task.
TInt & aSize The size of the task's data.

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

IMPORT_C TInt GetTaskInfoL ( const TInt aTaskId,
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 aTaskId The Id that identifies the task.
TTaskInfo & aTaskInfo On return, information about the task.
TPtr & aTaskData On 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 & aRef On return, the associated schedule definition.
TTsTime & aNextDue On 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 TInt GetTaskInfoL ( const TInt aTaskId,
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 aTaskId The Id that identifies the task.
TTaskInfo & aTaskInfo On return, information about the task.
TPtr & aTaskData On 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 & aRef On return, the associated schedule definition.
TTime & aNextDue On 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 TInt GetTaskRefsL ( CArrayFixFlat < TSchedulerItemRef > & aTasks,
const TScheduleFilter aScheduleFilter,
const TTaskFilter aTaskFilter
)

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 > & aTasks On 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 aScheduleFilter The schedule filter.
const TTaskFilter aTaskFilter The task filter.

Register(const TFileName &, const TInt)

IMPORT_C TInt Register ( const TFileName & aFileName,
const TInt aPriority
)

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 & aFileName The 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 aPriority A priority value.

ScheduleTask(TTaskInfo &, HBufC &, const TInt)

IMPORT_C TInt ScheduleTask ( TTaskInfo & aTaskInfo,
HBufC & aTaskData,
const TInt aScheduleHandle
)

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 & aTaskInfo Information about the task to be added to the schedule. On return the task Id is written into this class.
HBufC & aTaskData Data that is passed to the task on execution.
const TInt aScheduleHandle The Id that identifies the schedule to be used.

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

IMPORT_C TInt ScheduleTask ( 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 & aTaskInfo Information about the task to be added to the transient schedule. On return the task Id is written into this class.
HBufC & aTaskData Data that is passed to the task on execution.
TSchedulerItemRef & aRef Definition of the new transient schedule.
const CArrayFixFlat < TScheduleEntryInfo2 > & aEntryList The set of schedule entries that make up the new transient schedule.

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

IMPORT_C TInt ScheduleTask ( 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 & aTaskInfo Information about the task to be added to the transient schedule. On return the task Id is written into this class.
HBufC & aTaskData Data that is passed to the task on execution.
TSchedulerItemRef & aRef Definition of the new transient schedule.
const CArrayFixFlat < TTaskSchedulerCondition > & aConditions An array of schedule conditons that make up the schedule.
const TTsTime & aDefaultRunTime The 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 TInt ScheduleTask ( 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 & aTaskInfo Information about the task to be added to the transient schedule. On return the task Id is written into this class.
HBufC & aTaskData Data that is passed to the task on execution.
TSchedulerItemRef & aRef Definition of the new transient schedule.
const CArrayFixFlat < TScheduleEntryInfo > & aEntryList The 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 TInt ScheduleTask ( 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 & aTaskInfo Information about the task to be added to the transient schedule. On return the task Id is written into this class.
HBufC & aTaskData Data that is passed to the task on execution.
TSchedulerItemRef & aRef Definition of the new transient schedule.
const CArrayFixFlat < TTaskSchedulerCondition > & aConditions An array of schedule conditons that make up the schedule.
const TTime & aDefaultRunTime The time at which the schedule with run if no conditions are met. aDefaultRunTime is assumed to be local time based.

Version()

IMPORT_C TVersion Version ( ) const

Gets the client side version number.

__DbgCheckHeap(TInt)

IMPORT_C TInt __DbgCheckHeap ( TInt aCount )

Parameters

TInt aCount

__DbgFailNext(TInt)

IMPORT_C TInt __DbgFailNext ( TInt aCount )

Parameters

TInt aCount

__DbgMarkEnd(TInt)

IMPORT_C TInt __DbgMarkEnd ( TInt aCount )

Parameters

TInt aCount

__DbgMarkHeap()

IMPORT_C TInt __DbgMarkHeap ( )

__DbgResetHeap()

IMPORT_C TInt __DbgResetHeap ( )

__FaultServer()

IMPORT_C TInt __FaultServer ( )