#include <schtask.h>
class CScheduledTask : public CBase |
Public Member Functions | |
---|---|
CScheduledTask(TTaskInfo &, HBufC *, TScheduleType, const TSecurityInfo &) | |
~CScheduledTask() | |
IMPORT_C const HBufC & | Data() |
void | DecRepeat() |
TBool | Due() |
void | ExternalizeL(RWriteStream &) |
IMPORT_C const TTaskInfo & | Info() |
IMPORT_C CScheduledTask * | NewLC(RReadStream &) |
TInt | Offset() |
void | OnDue(const TTsTime &) |
TBool | Persists() |
void | Remove() |
TInt | ScheduleId() |
IMPORT_C TScheduleType | ScheduleType() |
IMPORT_C const TSecurityInfo & | SecurityInfo() |
void | SetDue(TBool) |
void | SetPersists() |
void | SetScheduleId(TInt) |
IMPORT_C const TTsTime & | ValidUntil() |
The representation of a scheduled task that is passed to registered programs.
When tasks are due, the Task Scheduler encapsulates task information within CScheduledTask objects, and externalises them to a direct file store.
The root stream of the direct file store contains a 32 bit value, followed by the external representations of one or more CScheduledTask objects. The 32 bit value is interpreted as a TInt32 and contains the number of CScheduledTask objects that follow in the stream.
The registered program can create successive CScheduledTask objects from this stream using the static NewLC() function.
See also: TScheduledTaskFile RStoreReadStream
CScheduledTask | ( | TTaskInfo & | aInfo, |
HBufC * | aData, | ||
TScheduleType | aScheduleType, | ||
const TSecurityInfo & | aSecurityInfo | ||
) |
IMPORT_C const HBufC & | Data | ( | ) | const |
Gets a reference to the data to be passed to the program on execution.
Returns: A reference to the descriptor containing the data.
void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
externalize data to stream. only used by server
IMPORT_C const TTaskInfo & | Info | ( | ) | const |
Gets the detailed information for the task.
Returns: Detailed information about a task.
IMPORT_C CScheduledTask * | NewLC | ( | RReadStream & | aStream | ) | [static] |
Creates the object from the specified stream.
Parameter | Description |
---|---|
aStream | The stream containing the external representation of this object. |
Returns: A new instance of a CScheduledTask object.
void | OnDue | ( | const TTsTime & | aValidUntil | ) |
Mark task as being due.
Parameter | Description |
---|---|
aValidUntil | time this task will be valid until. This information will be passed to the registered executable, so they may check whether the task should still be executed. only used by server |
TBool | Persists | ( | ) | const |
Return flag that determines if task is transisent or persistent. only used by server
IMPORT_C const TSecurityInfo & | SecurityInfo | ( | ) | const |
Gets the security information for this scheduled task. This information is the securityID, VenforID and capabilities of the client who created the schedule responsible for invoking this task.
void | SetPersists | ( | ) |
Mark task as belonging to a persistent schedule. only used by server
IMPORT_C const TTsTime & | ValidUntil | ( | ) | const |
Gets the time when the task stops being valid.
If the executing program determines that this time is in the past, then it should not run the task.
Returns: The time when the task stops being valid