CScheduledTask Class Reference

#include <schtask.h>

Link against: schsvr.lib

class CScheduledTask : public CBase

Inherits from

  • CScheduledTask

    Detailed Description

    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

    Constructor & Destructor Documentation

    CScheduledTask ( TTaskInfo &, HBufC *, TScheduleType, const TSecurityInfo & )

    CScheduledTask(TTaskInfo &aInfo,
    HBufC *aData,
    TScheduleTypeaScheduleType,
    const TSecurityInfo &aSecurityInfo
    )

    ~CScheduledTask ( )

    ~CScheduledTask()

    Member Function Documentation

    Data ( )

    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.

    DecRepeat ( )

    voidDecRepeat()

    Decrement repeat counter only used by server

    Due ( )

    TBool Due()const

    Is this task due? only used by server

    ExternalizeL ( RWriteStream & )

    voidExternalizeL(RWriteStream &aStream)const

    externalize data to stream. only used by server

    Info ( )

    IMPORT_C const TTaskInfo &Info()const

    Gets the detailed information for the task.

    Returns: Detailed information about a task.

    NewLC ( RReadStream & )

    IMPORT_C CScheduledTask *NewLC(RReadStream &aStream)[static]

    Creates the object from the specified stream.

    ParameterDescription
    aStreamThe stream containing the external representation of this object.

    Returns: A new instance of a CScheduledTask object.

    Offset ( )

    TInt Offset()[static]

    queue offset only used by server

    OnDue ( const TTsTime & )

    voidOnDue(const TTsTime &aValidUntil)

    Mark task as being due.

    ParameterDescription
    aValidUntiltime 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

    Persists ( )

    TBool Persists()const

    Return flag that determines if task is transisent or persistent. only used by server

    Remove ( )

    voidRemove()

    Remove from queue only used by server

    ScheduleId ( )

    TInt ScheduleId()const

    Gets the schedulesID only used by server

    ScheduleType ( )

    IMPORT_C TScheduleTypeScheduleType()const

    Gets the schedules type.

    SecurityInfo ( )

    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.

    SetDue ( TBool )

    voidSetDue(TBoolaDue)

    Set due flag. only used by server

    SetPersists ( )

    voidSetPersists()

    Mark task as belonging to a persistent schedule. only used by server

    SetScheduleId ( TInt )

    voidSetScheduleId(TIntaScheduleId)

    Sets the schedules ID only used by server

    ValidUntil ( )

    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