#include <mw/schedulebaseservermtm.h>
class CScheduleBaseServerMtm : public CBaseServerMtm |
Protected Attributes | |
---|---|
RFs | iFs |
TRequestStatus * | iReport |
RResourceFile | iResourceFile |
CMsvScheduleSend * | iScheduleSend |
Protected Member Functions | |
---|---|
CScheduleBaseServerMtm(CRegisteredMtmDll &, CMsvServerEntry *) | |
~CScheduleBaseServerMtm() | |
virtual IMPORT_C void | CheckScheduleL(const CMsvEntrySelection &, const TDesC8 &, TRequestStatus &) |
virtual IMPORT_C void | ConstructL() |
virtual IMPORT_C void | DeleteScheduleL(const CMsvEntrySelection &, const TDesC8 &, TRequestStatus &) |
IMPORT_C void | LoadResourceFileL(const TDesC &) |
pure virtual void | LoadResourceFileL() |
IMPORT_C void | LoadScheduleSettingsL(CRepository &, TBool, TInt) |
pure virtual void | PopulateSchedulePackage(const TDesC8 &, const TBool, TMsvSchedulePackage &) |
IMPORT_C void | Queue(TRequestStatus &) |
virtual IMPORT_C void | ScheduleL(CMsvEntrySelection &, const TBool, const TDesC8 &, TRequestStatus &) |
virtual IMPORT_C void | SendScheduledL(CMsvEntrySelection &, const TBool, const TDesC8 &, TRequestStatus &) |
Inherited Attributes | |
---|---|
CActive::iStatus | |
CBaseServerMtm::iServerEntry |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Base class for Server MTMs that support scheduling.
It contains pure virtual functions which must be implemented by the Server MTM. These functions are not required for interoperability with any other classes, however they are essential functionality that must be implemented by a Server MTM that support scheduling.
CScheduleBaseServerMtm uses a class derived from CMsvScheduleSend to interface with the task scheduler.
See also: CMsvScheduleSend
IMPORT_C | CScheduleBaseServerMtm | ( | CRegisteredMtmDll & | aRegisteredMtmDll, |
CMsvServerEntry * | aServerEntry | |||
) | [protected] |
Constructor.
Parameter | Description |
---|---|
aRegisteredMtmDll | Registration data for the MTM DLL |
aServerEntry | Context on which to operate |
IMPORT_C | ~CScheduleBaseServerMtm | ( | ) | [protected] |
Destructor.
The derived class destructor should delete the iScheduleSend member.
IMPORT_C void | CheckScheduleL | ( | const CMsvEntrySelection & | aSelection, |
const TDesC8 & | aParameter, | |||
TRequestStatus & | aStatus | |||
) | [protected, virtual] |
Verifies that the schedule information stored in specified messages is the same as that on the task scheduler.
See also: CMsvScheduleSend::CheckScheduleL()
Parameter | Description |
---|---|
aSelection | Array of message IDs that need to be checked against the task scheduler |
aParameter | Unused |
aStatus | Asynchronous status word |
IMPORT_C void | ConstructL | ( | ) | [protected, virtual] |
Second phase constructor.
This calls LoadResourceFileL().
The derived class second phase constructor should call this function. It should also construct the iScheduleSend member.
IMPORT_C void | DeleteScheduleL | ( | const CMsvEntrySelection & | aSelection, |
const TDesC8 & | aParameter, | |||
TRequestStatus & | aStatus | |||
) | [protected, virtual] |
Deletes the schedules for the specified messages from the task scheduler.
The messages themselves are not deleted.
See also: CMsvScheduleSend::DeleteScheduleL()
Parameter | Description |
---|---|
aSelection | Array of message IDs that need to be deleted from the task scheduler |
aParameter | Unused |
aStatus | Asynchronous status word |
IMPORT_C void | LoadResourceFileL | ( | const TDesC & | aResFileName | ) | [protected] |
Loads the specified resource file.
A utility function that can be used from the pure virtual LoadResourceFileL().
It leaves if the resource file reader cannot be opened.
Parameter | Description |
---|---|
aResFileName | Resource file name |
void | LoadResourceFileL | ( | ) | [protected, pure virtual] |
Loads the resource file (if any) for the MTM.
IMPORT_C void | LoadScheduleSettingsL | ( | CRepository & | aRepository, |
TBool | aRestoreErrorsFromResource = EFalse, | |||
TInt | aErrorsResourceId = 0 | |||
) | [protected] |
Loads all the schedule settings either from CenRep or a resource file.
See also: CMsvScheduleSend::RestoreL CMsvSendErrorActions::RestoreFromResourceL()
Parameter | Description |
---|---|
aRepository | CenRep repository to load settings from |
aRestoreErrorsFromResource | Whether to read error handling information (a SEND_ERROR_ACTIONS struct) from a resource file |
aErrorsResourceId | Resource ID of the error handling resource struct |
void | PopulateSchedulePackage | ( | const TDesC8 & | aParameter, |
const TBool | aMove, | |||
TMsvSchedulePackage & | aPackage | |||
) | const [protected, pure virtual] |
Populates a TMsvSchedulePackage object with scheduling information.
Parameter | Description |
---|---|
aParameter | Parameter information for the package |
aMove | Flag that signals whether a move or copy is required |
aPackage | On return, a populated object |
IMPORT_C void | Queue | ( | TRequestStatus & | aStatus | ) | [protected] |
Specifies an asynchronous status word to be completed when an asynchronous MTM operation completes.
This provides a form of observer functionality. It sets the the iReport member.
Parameter | Description |
---|---|
aStatus | Asynchronous status word to use |
IMPORT_C void | ScheduleL | ( | CMsvEntrySelection & | aSelection, |
const TBool | aMove, | |||
const TDesC8 & | aParameter, | |||
TRequestStatus & | aStatus | |||
) | [protected, virtual] |
Schedules a message.
The functions should schedule a message using CMsvScheduleSend::ScheduleL(). Make sure RestoreScheduleSettingsL() is called before CMsvScheduleSend::ScheduleL().
Parameter | Description |
---|---|
aSelection | The selection of messages that need to be scheduled |
aMove | Whether to perform a Move (ETrue) or a Copy (EFalse) when sending has completed |
aParameter | The parameter (MTM-specific) that is required when sending the messages |
aStatus | Asynchronous status word |
IMPORT_C void | SendScheduledL | ( | CMsvEntrySelection & | aSelection, |
const TBool | aMove, | |||
const TDesC8 & | aParameter, | |||
TRequestStatus & | aStatus | |||
) | [protected, virtual] |
Sends messages now that were previously scheduled.
The messages are sent immediately, overriding the scheduling.
Parameter | Description |
---|---|
aSelection | The selection of messages that were previously scheduled and now need to be sent |
aMove | Whether to perform a Move (ETrue) or a Copy (EFalse) when sending has completed |
aParameter | The parameter (MTM-specific) that is required when sending the messages |
aStatus | Asynchronous status word |