CMsvScheduleSend Class Reference

class CMsvScheduleSend : public CBase

Provides a Server MTM's interface to the Task Scheduler for messaging scheduling.

Server MTM's must provide a derived class that implements GetMessageL() to provide a factory for MTM-specific scheduling CMsvScheduledEntry-based objects.

Inherits from

Public Member Functions
~CMsvScheduleSend()
CMsvSysAgentActions &AgentActions()
IMPORT_C voidCheckScheduleL(const CMsvEntrySelection &)
IMPORT_C voidConnectAndRegisterL(RScheduler &, const CMsvScheduleSettings &)
IMPORT_C voidCreateScheduleL(RScheduler &, const CMsvScheduleSettings &, const TTime &, const TTimeIntervalMinutes &, TSchedulerItemRef &)
IMPORT_C voidCreateScheduleL(RScheduler &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTime &, TSchedulerItemRef &)
IMPORT_C voidDeleteScheduleL(const CMsvEntrySelection &)
IMPORT_C voidFindScheduleL(RScheduler &, const TTime &, TSchedulerItemRef &)
IMPORT_C voidFindScheduleL(RScheduler &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTime &, TSchedulerItemRef &)
IMPORT_C voidLoadScheduleSettingsL(CRepository &)
CMsvOffPeakTimes &OffPeakTimes()
IMPORT_C voidReScheduleL(const CMsvEntrySelection &, const TMsvSchedulePackage &, const TMsvSendErrorAction *)
IMPORT_C voidRoundUpToMinute(TTime &)
IMPORT_C voidScheduleEntryL(RScheduler &, const TSchedulerItemRef &, const TMsvSchedulePackage &, TTaskInfo &)
IMPORT_C voidScheduleL(const CMsvEntrySelection &, const TMsvSchedulePackage &)
CMsvScheduleSettings &ScheduleSettings()
CMsvSendErrorActions &SendErrorActions()
IMPORT_C voidSendingCompleteL(TMsvEntry &, const TBool)
IMPORT_C voidSendingCompleteL(const CMsvEntrySelection &)
IMPORT_C voidUpdateEntryAfterSchedule(const TSchedulerItemRef &, const TTaskInfo &, const TTime &, TInt, TMsvEntry &, TMsvEntryScheduleData &)
Protected Member Functions
CMsvScheduleSend(CMsvServerEntry &)
IMPORT_C voidConstructL()
CMsvScheduledEntry *GetMessageL(const TMsvId)
Private Member Functions
voidConnectAndRegisterL()
voidCreateScheduleL(const TTime &, const TTimeIntervalMinutes &, const CArrayFixFlat< TTaskSchedulerCondition > &, TBool, TSchedulerItemRef &)
voidDeleteScheduleForEntryL(CMsvScheduledEntry &)
voidDoReScheduleL(CMsvScheduledEntries &)
voidDoScheduleL(CMsvScheduledEntries &, const TInt, const TTime &, TBool)
voidFLog(TRefByValue< const TDesC >, ...)
voidFLog(TRefByValue< const TDesC8 >, ...)
voidFindScheduleL(const TTime &, const CArrayFixFlat< TTaskSchedulerCondition > &, TBool, TSchedulerItemRef &)
TMsvId GetMessageIdForTaskL(TInt)
voidGetMessagesL(const CMsvEntrySelection &)
TBool GetNextRetry(CMsvScheduledEntry &, const TMsvSendErrorAction &, TTimeIntervalSeconds &)
voidGetOffPeakL(TTime, TTime &, TTimeIntervalMinutes &)
voidPopulateScheduleConditionsL(CArrayFixFlat< TTaskSchedulerCondition > &)
voidResetScheduleInfoForEntryL(CMsvScheduledEntry &, const TBool)
voidScheduleEntryL(CMsvScheduledEntry &, const TInt, const TTime &, const TSchedulerItemRef &, TBool)
voidSendingCompleteL(CMsvScheduledEntry &, const TBool)
TBool SetMessageStartTime(CMsvScheduledEntry &, const TTime &, const TMsvSendErrorAction *)
voidSortByDateAndPendingConditionsL(CMsvScheduledEntries &)
TBool TaskAndMessageMatchL(const CMsvScheduledEntry &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Member Enumerations
enumanonymous { EDefaultTaskPriority = 1, EDefaultTaskRepeat = 0 }
Protected Attributes
CMsvSysAgentActions *iAgentActions
CMsvSendErrorActions *iErrorActions
CMsvOffPeakTimes *iOffPeakTimes
TMsvSchedulePackage iPackage
TBool iRegistered
CMsvScheduledEntries *iSchEntries
CArrayFixFlat< TScheduleEntryInfo2 > *iSchEntryInfo
CArrayFixFlat< TTaskInfo > *iSchTaskInfo
RScheduler iScheduler
CMsvServerEntry &iServerEntry
CMsvScheduleSettings *iSettings

Constructor & Destructor Documentation

CMsvScheduleSend(CMsvServerEntry &)

IMPORT_CCMsvScheduleSend(CMsvServerEntry &aServerEntry)[protected]

Parameters

CMsvServerEntry & aServerEntry

~CMsvScheduleSend()

IMPORT_C~CMsvScheduleSend()

Member Functions Documentation

AgentActions()

CMsvSysAgentActions &AgentActions()const [inline]

Gets System Agent conditions that must be satisfied before a sending attempt.

System Agent conditions

CheckScheduleL(const CMsvEntrySelection &)

IMPORT_C voidCheckScheduleL(const CMsvEntrySelection &aSelection)

Parameters

const CMsvEntrySelection & aSelection

ConnectAndRegisterL(RScheduler &, const CMsvScheduleSettings &)

IMPORT_C voidConnectAndRegisterL(RScheduler &aScheduler,
const CMsvScheduleSettings &aSettings
)[static]

Parameters

RScheduler & aScheduler
const CMsvScheduleSettings & aSettings

ConnectAndRegisterL()

voidConnectAndRegisterL()[private]

ConstructL()

IMPORT_C voidConstructL()[protected, virtual]

CreateScheduleL(RScheduler &, const CMsvScheduleSettings &, const TTime &, const TTimeIntervalMinutes &, TSchedulerItemRef &)

IMPORT_C voidCreateScheduleL(RScheduler &aScheduler,
const CMsvScheduleSettings &aSettings,
const TTime &aStartTime,
const TTimeIntervalMinutes &aValidityPeriod,
TSchedulerItemRef &aRef
)[static]

Parameters

RScheduler & aScheduler
const CMsvScheduleSettings & aSettings
const TTime & aStartTime
const TTimeIntervalMinutes & aValidityPeriod
TSchedulerItemRef & aRef

CreateScheduleL(RScheduler &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTime &, TSchedulerItemRef &)

IMPORT_C voidCreateScheduleL(RScheduler &aScheduler,
const CArrayFixFlat< TTaskSchedulerCondition > &aConditions,
const TTime &aTimeout,
TSchedulerItemRef &aRef
)[static]

Parameters

RScheduler & aScheduler
const CArrayFixFlat< TTaskSchedulerCondition > & aConditions
const TTime & aTimeout
TSchedulerItemRef & aRef

CreateScheduleL(const TTime &, const TTimeIntervalMinutes &, const CArrayFixFlat< TTaskSchedulerCondition > &, TBool, TSchedulerItemRef &)

voidCreateScheduleL(const TTime &aStartTime,
const TTimeIntervalMinutes &aValidityPeriod,
const CArrayFixFlat< TTaskSchedulerCondition > &aSchConditions,
TBoolaPendingConditions,
TSchedulerItemRef &aRef
)[private]

Parameters

const TTime & aStartTime
const TTimeIntervalMinutes & aValidityPeriod
const CArrayFixFlat< TTaskSchedulerCondition > & aSchConditions
TBool aPendingConditions
TSchedulerItemRef & aRef

DeleteScheduleForEntryL(CMsvScheduledEntry &)

voidDeleteScheduleForEntryL(CMsvScheduledEntry &aMessage)[private]

Parameters

CMsvScheduledEntry & aMessage

DeleteScheduleL(const CMsvEntrySelection &)

IMPORT_C voidDeleteScheduleL(const CMsvEntrySelection &aSelection)

Parameters

const CMsvEntrySelection & aSelection

DoReScheduleL(CMsvScheduledEntries &)

voidDoReScheduleL(CMsvScheduledEntries &aSchEntries)[private]

Parameters

CMsvScheduledEntries & aSchEntries

DoScheduleL(CMsvScheduledEntries &, const TInt, const TTime &, TBool)

voidDoScheduleL(CMsvScheduledEntries &aSchEntries,
const TIntaFinalState,
const TTime &aTime,
TBoolaPendingConditions
)[private]

Parameters

CMsvScheduledEntries & aSchEntries
const TInt aFinalState
const TTime & aTime
TBool aPendingConditions

FLog(TRefByValue< const TDesC >, ...)

voidFLog(TRefByValue< const TDesC >aFormat,
...
)[private]

Parameters

TRefByValue< const TDesC > aFormat
...

FLog(TRefByValue< const TDesC8 >, ...)

voidFLog(TRefByValue< const TDesC8 >aFormat,
...
)[private]

Parameters

TRefByValue< const TDesC8 > aFormat
...

FindScheduleL(RScheduler &, const TTime &, TSchedulerItemRef &)

IMPORT_C voidFindScheduleL(RScheduler &aScheduler,
const TTime &aStartTime,
TSchedulerItemRef &aRef
)[static]

Parameters

RScheduler & aScheduler
const TTime & aStartTime
TSchedulerItemRef & aRef

FindScheduleL(RScheduler &, const CArrayFixFlat< TTaskSchedulerCondition > &, const TTime &, TSchedulerItemRef &)

IMPORT_C voidFindScheduleL(RScheduler &aScheduler,
const CArrayFixFlat< TTaskSchedulerCondition > &aConditions,
const TTime &aTimeout,
TSchedulerItemRef &aRef
)[static]

Parameters

RScheduler & aScheduler
const CArrayFixFlat< TTaskSchedulerCondition > & aConditions
const TTime & aTimeout
TSchedulerItemRef & aRef

FindScheduleL(const TTime &, const CArrayFixFlat< TTaskSchedulerCondition > &, TBool, TSchedulerItemRef &)

voidFindScheduleL(const TTime &aTime,
const CArrayFixFlat< TTaskSchedulerCondition > &aSchConditions,
TBoolaPendingConditions,
TSchedulerItemRef &aRef
)[private]

Parameters

const TTime & aTime
const CArrayFixFlat< TTaskSchedulerCondition > & aSchConditions
TBool aPendingConditions
TSchedulerItemRef & aRef

GetMessageIdForTaskL(TInt)

TMsvId GetMessageIdForTaskL(TIntaTaskId)[private]

Parameters

TInt aTaskId

GetMessageL(const TMsvId)

CMsvScheduledEntry *GetMessageL(const TMsvIdaId)const [protected, pure virtual]

Gets the schedule data and recipients of a message.

Recipient information is MTM-specific, so the server MTM must provide a derived class that implements CMsvScheduledEntry, and return objects of that type from this function.

The message's schedule data.

Parameters

const TMsvId aIdThe message ID.

GetMessagesL(const CMsvEntrySelection &)

voidGetMessagesL(const CMsvEntrySelection &aSelection)[private]

Parameters

const CMsvEntrySelection & aSelection

GetNextRetry(CMsvScheduledEntry &, const TMsvSendErrorAction &, TTimeIntervalSeconds &)

TBool GetNextRetry(CMsvScheduledEntry &aMessage,
const TMsvSendErrorAction &aErrorAction,
TTimeIntervalSeconds &aInterval
)const [private]

Parameters

CMsvScheduledEntry & aMessage
const TMsvSendErrorAction & aErrorAction
TTimeIntervalSeconds & aInterval

GetOffPeakL(TTime, TTime &, TTimeIntervalMinutes &)

voidGetOffPeakL(TTimeaFromTime,
TTime &aStartTime,
TTimeIntervalMinutes &aValidityPeriod
)const [private]

Parameters

TTime aFromTime
TTime & aStartTime
TTimeIntervalMinutes & aValidityPeriod

LoadScheduleSettingsL(CRepository &)

IMPORT_C voidLoadScheduleSettingsL(CRepository &aRepository)

Parameters

CRepository & aRepository

OffPeakTimes()

CMsvOffPeakTimes &OffPeakTimes()const [inline]

Gets off-peak times settings.

Off-peak times settings

PopulateScheduleConditionsL(CArrayFixFlat< TTaskSchedulerCondition > &)

voidPopulateScheduleConditionsL(CArrayFixFlat< TTaskSchedulerCondition > &aSchConditions)[private]

Parameters

CArrayFixFlat< TTaskSchedulerCondition > & aSchConditions

ReScheduleL(const CMsvEntrySelection &, const TMsvSchedulePackage &, const TMsvSendErrorAction *)

IMPORT_C voidReScheduleL(const CMsvEntrySelection &aSelection,
const TMsvSchedulePackage &aPackage,
const TMsvSendErrorAction *aErrorAction = NULL
)

Parameters

const CMsvEntrySelection & aSelection
const TMsvSchedulePackage & aPackage
const TMsvSendErrorAction * aErrorAction = NULL

ResetScheduleInfoForEntryL(CMsvScheduledEntry &, const TBool)

voidResetScheduleInfoForEntryL(CMsvScheduledEntry &aMessage,
const TBoolaChangeEntry
)[private]

Parameters

CMsvScheduledEntry & aMessage
const TBool aChangeEntry

RoundUpToMinute(TTime &)

IMPORT_C voidRoundUpToMinute(TTime &aTime)[static]

Parameters

TTime & aTime

ScheduleEntryL(RScheduler &, const TSchedulerItemRef &, const TMsvSchedulePackage &, TTaskInfo &)

IMPORT_C voidScheduleEntryL(RScheduler &aScheduler,
const TSchedulerItemRef &aRef,
const TMsvSchedulePackage &aPackage,
TTaskInfo &aInfo
)[static]

Parameters

RScheduler & aScheduler
const TSchedulerItemRef & aRef
const TMsvSchedulePackage & aPackage
TTaskInfo & aInfo

ScheduleEntryL(CMsvScheduledEntry &, const TInt, const TTime &, const TSchedulerItemRef &, TBool)

voidScheduleEntryL(CMsvScheduledEntry &aMessage,
const TIntaFinalState,
const TTime &aStartTime,
const TSchedulerItemRef &aRef,
TBoolaPendingConditions
)[private]

Parameters

CMsvScheduledEntry & aMessage
const TInt aFinalState
const TTime & aStartTime
const TSchedulerItemRef & aRef
TBool aPendingConditions

ScheduleL(const CMsvEntrySelection &, const TMsvSchedulePackage &)

IMPORT_C voidScheduleL(const CMsvEntrySelection &aSelection,
const TMsvSchedulePackage &aPackage
)

Parameters

const CMsvEntrySelection & aSelection
const TMsvSchedulePackage & aPackage

ScheduleSettings()

CMsvScheduleSettings &ScheduleSettings()const [inline]

Gets scheduler settings.

Scheduler settings

SendErrorActions()

CMsvSendErrorActions &SendErrorActions()const [inline]

Gets action-on-sending-error settings.

Action-on-sending-error settings

SendingCompleteL(TMsvEntry &, const TBool)

IMPORT_C voidSendingCompleteL(TMsvEntry &aEntry,
const TBoolaChangeEntry = EFalse
)

Parameters

TMsvEntry & aEntry
const TBool aChangeEntry = EFalse

SendingCompleteL(const CMsvEntrySelection &)

IMPORT_C voidSendingCompleteL(const CMsvEntrySelection &aSelection)

Parameters

const CMsvEntrySelection & aSelection

SendingCompleteL(CMsvScheduledEntry &, const TBool)

voidSendingCompleteL(CMsvScheduledEntry &aScheduledEntry,
const TBoolaChangeEntry
)[private]

Parameters

CMsvScheduledEntry & aScheduledEntry
const TBool aChangeEntry

SetMessageStartTime(CMsvScheduledEntry &, const TTime &, const TMsvSendErrorAction *)

TBool SetMessageStartTime(CMsvScheduledEntry &aMessage,
const TTime &aFromTime,
const TMsvSendErrorAction *aErrorAction = NULL
)[private]

Parameters

CMsvScheduledEntry & aMessage
const TTime & aFromTime
const TMsvSendErrorAction * aErrorAction = NULL

SortByDateAndPendingConditionsL(CMsvScheduledEntries &)

voidSortByDateAndPendingConditionsL(CMsvScheduledEntries &aScheduledEntries)[private]

Parameters

CMsvScheduledEntries & aScheduledEntries

TaskAndMessageMatchL(const CMsvScheduledEntry &)

TBool TaskAndMessageMatchL(const CMsvScheduledEntry &aMessage)[private]

Parameters

const CMsvScheduledEntry & aMessage

UpdateEntryAfterSchedule(const TSchedulerItemRef &, const TTaskInfo &, const TTime &, TInt, TMsvEntry &, TMsvEntryScheduleData &)

IMPORT_C voidUpdateEntryAfterSchedule(const TSchedulerItemRef &aRef,
const TTaskInfo &aInfo,
const TTime &aTime,
TIntaFinalState,
TMsvEntry &aEntry,
TMsvEntryScheduleData &aData
)[static]

Parameters

const TSchedulerItemRef & aRef
const TTaskInfo & aInfo
const TTime & aTime
TInt aFinalState
TMsvEntry & aEntry
TMsvEntryScheduleData & aData

Member Enumerations Documentation

Enum anonymous

Enumerators

EDefaultTaskPriority = 1
EDefaultTaskRepeat = 0

Member Data Documentation

CMsvSysAgentActions * iAgentActions

CMsvSysAgentActions *iAgentActions[protected]

The System Agent conditions that must be satisfied before a sending attempt.

CMsvSendErrorActions * iErrorActions

CMsvSendErrorActions *iErrorActions[protected]

The Server MTM specific actions to take when particular errors occur during message sending.

CMsvOffPeakTimes * iOffPeakTimes

CMsvOffPeakTimes *iOffPeakTimes[protected]

The Server MTM specific off peak time periods.

TMsvSchedulePackage iPackage

TMsvSchedulePackage iPackage[protected]

Scheduling options.

TBool iRegistered

TBool iRegistered[protected]

Indicates if this has been registered with the Task Scheduler.

Initially set to EFalse.

CMsvScheduledEntries * iSchEntries

CMsvScheduledEntries *iSchEntries[protected]

Array of message schedule data.

CArrayFixFlat< TScheduleEntryInfo2 > * iSchEntryInfo

CArrayFixFlat< TScheduleEntryInfo2 > *iSchEntryInfo[protected]

Array of schedule entry data.

CArrayFixFlat< TTaskInfo > * iSchTaskInfo

CArrayFixFlat< TTaskInfo > *iSchTaskInfo[protected]

Array of schedule task data.

RScheduler iScheduler

RScheduler iScheduler[protected]

Provides an interface to the Task Scheduler.

CMsvServerEntry & iServerEntry

CMsvServerEntry &iServerEntry[protected]

The CMsvServerEntry of the server MTM.

CMsvScheduleSettings * iSettings

CMsvScheduleSettings *iSettings[protected]

The Server MTM specific scheduled message sending settings.