TScheduledTaskFile Class Reference

#include <schtask.h>

Link against: schsvr.lib

class TScheduledTaskFile
Public Member Functions
IMPORT_C TIntFileHandleIndex()
IMPORT_C TIntFsHandleIndex()

Detailed Description

Class used by registered programs to access the scheduled task file store.

When tasks are due, the Task Scheduler encapsulates task information within CScheduledTask objects, and externalises them to a direct file store.

This file store is located in the task scheduler's private data cage and thus cannot be accessed directly. Instead the task scheduler passes a shared RFs and RFile handle to the registered program.

The registered program can use the RFile::AdoptFromCreator API in conjunction with the APIs provided by this class to access the scheduled task file store as shown in the following example:

	RFile file;
	TInt error = file.AdoptFromCreator(TScheduledTaskFile::FsHandleIndex(),
											TScheduledTaskFile::FileHandleIndex());

See also: CScheduledTask RFile::AdoptFromCreator

Member Function Documentation

FileHandleIndex ( )

IMPORT_C TIntFileHandleIndex()[static]

Returns the index of the slot in the process environment data that contains the shared file (RFile) handle passed from the Task Scheduler.

See also: RFile::AdoptFromCreator

Returns: The index of the shared file handle

FsHandleIndex ( )

IMPORT_C TIntFsHandleIndex()[static]

Returns the index of the slot in the process environment data that contains the shared file server session (RFs) handle passed from the Task Scheduler.

See also: RFile::AdoptFromCreator

Returns: The index of the shared file server session handle