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]

Constructor.

Parameters

CMsvServerEntry & aServerEntryThe CMsvServerEntry of the server MTM of which this CMsvScheduleSend object is a member.

~CMsvScheduleSend()

IMPORT_C~CMsvScheduleSend()

Destructor.

Member Functions Documentation

AgentActions()

CMsvSysAgentActions &AgentActions()const [inline]

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

CheckScheduleL(const CMsvEntrySelection &)

IMPORT_C voidCheckScheduleL(const CMsvEntrySelection &aSelection)

Verifies that the schedule information stored in specified messages is the same as that on the task scheduler.

panic
ScheduleSend-DLL 0 The array of message IDs is empty. Debug build only.

Parameters

const CMsvEntrySelection & aSelectionArray of message IDs that need to be checked against the task scheduler.

ConnectAndRegisterL(RScheduler &, const CMsvScheduleSettings &)

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

Connects to and registers with the task scheduler.

leave
Any error code RScheduler::Connect() returned an error.
leave
Any error code RFs::Connect() returned an error.
leave
KErrPathNotFound The .EXE file to be called by the Task Scheduler when messages are due to be sent cannot be found. The filename is part of the schedule settings.
leave
Any error code RScheduler::Register() returned an error.

Parameters

RScheduler & aSchedulerHandle to the scheduler to connect to.
const CMsvScheduleSettings & aSettingsSchedule settings.

ConnectAndRegisterL()

voidConnectAndRegisterL()[private]

ConstructL()

IMPORT_C voidConstructL()[protected, virtual]

Second phase constructor.

This constructor creates instances of the following classes: CMsvScheduleSettings, CMsvOffPeakTimes, CMsvSendErrorActions, CMsvSysAgentActions and CMsvScheduledEntries.

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]

Creates a new schedule on the task scheduler with which each message can be associated.

The schedule is triggered by a start time being reached.

RScheduler::CreatePersistentSchedule

Parameters

RScheduler & aSchedulerHandle to scheduler to update.
const CMsvScheduleSettings & aSettingsScheduler settings.
const TTime & aStartTimeSchedule start time.
const TTimeIntervalMinutes & aValidityPeriodSchedule validity period.
TSchedulerItemRef & aRefOn return, the new schedule.

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

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

Creates a new schedule on the task scheduler with which each message can be associated.

The schedule is triggered by either a set of conditions being met or a timeout being reached.

RScheduler::CreatePersistentSchedule TSysAgentCondition

Parameters

RScheduler & aSchedulerHandle to scheduler to update.
const CArrayFixFlat< TTaskSchedulerCondition > & aConditionsThe set of System Agent conditions that are required to be met to trigger the schedule.
const TTime & aTimeoutThe timeout value for the schedule.
TSchedulerItemRef & aRefOn return, the new schedule.

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)

Delete the schedules for the specified messages from the task scheduler.

The messages themselves are not deleted.

leave
Any error code Unable to connect and register with the scheduler.
leave
Any error code but KErrLocked and KErrNotFound The method overloading CMsvScheduledEntry::GetMessageL() left with an error, i.e. the scheduling info of one of the messages from the selection could not be retrieved from the message server.
leave
Any error code Unable to reset the previous scheduling info for a message.

Parameters

const CMsvEntrySelection & aSelectionArray of message IDs that need to be deleted from the task scheduler.

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]

Does the actual scheduling of the supplied messages.

This function is called by ScheduleL() and DoReScheduleL(). The supplied messages are assumed to have the values for the following data - MTM UID, off-peak flag, schedule date and pending conditions flag. In debug mode, if these info is matching in all the messages then a panic will occur.

Parameters

CMsvScheduledEntries & aSchEntriesAn array with the messages to be scheduled.
const TInt aFinalStateThe sending state to set to the messages to if the message is successfully scheduled.
const TTime & aTimeFor conditions-scheduled messages this is the timeout, for time-scheduled messages this is the scheduled time.
TBool aPendingConditionsA flag indicating whether the schedule should be pending conditions.

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]

Searches the scheduler for an existing schedule item with a schedule time that matches with time supplied.

RScheduler::GetScheduleL()
leave
KErrNotFound No schedule found matching the schedule time.

Parameters

RScheduler & aSchedulerHandle to the scheduler.
const TTime & aStartTimeSchedule start time.
TSchedulerItemRef & aRefOn return, the schedule item.

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

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

Searches the scheduler for an existing conditions schedule item with a set of pending conditions and timeout value that matches with those supplied.

RScheduler::GetScheduleL
leave
KErrNotFound No schedule found matching the schedule conditions and timeout.

Parameters

RScheduler & aSchedulerHandle to the scheduler.
const CArrayFixFlat< TTaskSchedulerCondition > & aConditionsThe set of System Agent conditions that are required to be met to trigger the schedule.
const TTime & aTimeoutThe timeout value for the schedule.
TSchedulerItemRef & aRefOn return, the schedule item.

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.

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]

Determines whether the message should be sent and if so the time interval (in seconds) that must elapse before aMessage should be sent.

The time interval is determined by the error action supplied. In the case of an error action of ESendActionRetryConditionMet, the time interval indicates how long the message can be pending conditions to be met before the message is failed.

The actual time period is defined in the iSettings object. This will be either iPendingConditionsTimeout, iShortInterval, iLongInterval or an element of iVariableIntervals.

If the message should be sent then a value of ETrue is returned. A value of EFalse is returned if the message should not be sent. In this case the output argument aInterval is not valid.

Parameters

CMsvScheduledEntry & aMessageThe message to be re-scheduled.
const TMsvSendErrorAction & aErrorActionThe error action that determines the re-schedule behaviour.
TTimeIntervalSeconds & aIntervalAn output argument that holds the time interval to when the message should be re-sent or when the message should be failed.

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)

Loads schedule settings from CenRep

Parameters

CRepository & aRepositoryCenRep repository to load settings from

OffPeakTimes()

CMsvOffPeakTimes &OffPeakTimes()const [inline]

Gets 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
)

Determines when the messages should be re-scheduled on the task scheduler, then schedules the messages at the new time(s).

Messages that are successfully re-scheduled are updated. The pending conditions flag indicates whether the message has been schedule for a set of conditions being met (or a timeout occuring) or scheduled for a specified time/date.

NOTE - conditions scheduling is only supoprted from 8.1 onwards.

In the case of time-scheduling, the date field is the scheduled time/date. In the case of conditions-scheduling, the date field reflects the timeout value.

There are several cases when messages are not re-scheduled. If all recipients have been sent to - in this case the message's sending state set to KMsvSendStateSent. If, more commonly, the message's maximum number of re-tries has been exceeded or the error action was ESendActionFail then the message is not changed.

panic
ScheduleSend-DLL 0 The array of message IDs is empty. Debug build only.

Parameters

const CMsvEntrySelection & aSelectionArray of message IDs that need to be re-scheduled. This array cannot be empty. All the messages identified must belong to the same MTM. It is not a precondition that each message has already been scheduled on the task scheduler.
const TMsvSchedulePackage & aPackageScheduling options.
const TMsvSendErrorAction * aErrorAction = NULLThe specific action to take with the messages. If this argument is omitted, then ReScheduleL() uses the iError member of each TMsvEntry to find the related TMsvSendErrorAction in iErrorActions.

ResetScheduleInfoForEntryL(CMsvScheduledEntry &, const TBool)

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

Parameters

CMsvScheduledEntry & aMessage
const TBool aChangeEntry

RoundUpToMinute(TTime &)

IMPORT_C voidRoundUpToMinute(TTime &aTime)[static]

Utility function that rounds a specified time up to the nearest minute.

Parameters

TTime & aTimeOn return, the passed value rounded up to the nearest minute.

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

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

Adds an entry to an existing schedule.

RScheduler::ScheduleTask()
leave
KErrNotFound No existing schedule with the specified Id.

Parameters

RScheduler & aSchedulerScheduler to access.
const TSchedulerItemRef & aRefId of the schedule.
const TMsvSchedulePackage & aPackageScheduler settings.
TTaskInfo & aInfoInformation about the entry to be added to the schedule.

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

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

Schedules aMessage on the schedule referred to by aRef.

Updates the message entry and the schedule data using the utility function UpdateEntryAfterSchedule().

CMsvScheduleSend::UpdateEntryAfterSchedule

Parameters

CMsvScheduledEntry & aMessageThe message to be scheduled.
const TInt aFinalStateThe sending state to set to the messages to if the message is successfully scheduled.
const TTime & aStartTime
const TSchedulerItemRef & aRefThe ID of the schedule to add this task to.
TBool aPendingConditionsA flag indicating whether this message is schedule for conditions.

ScheduleL(const CMsvEntrySelection &, const TMsvSchedulePackage &)

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

Schedules messages on the task scheduler.

Messages that are successfully scheduled have their sending state set to KMsvSendStateScheduled.

leave
Any error code but KErrLocked and KErrNotFound The method overloading CMsvScheduledEntry::GetMessageL() left with an error, i.e. the scheduling info of one of the messages from the selection could not be retrieved from the message server.
leave
Any error code Unable to reset the previous scheduling info for a message.
panic
ScheduleSend-DLL 0 The array of message IDs is empty. Debug build only.
panic
ScheduleSend-DLL 1 At least one of the selected messages is scheduled for a different time as the others. Debug build only.
panic
ScheduleSend-DLL 2 At least one of the selected messages does not belong to the same MTM. Debug build only.
panic
ScheduleSend-DLL 3 At least one of the selected messages does not have the same off-peak settings as the others. Debug build only.

Parameters

const CMsvEntrySelection & aSelectionArray of message IDs that need to be scheduled. This array cannot be empty. All the messages identified in the selection must belong to the same MTM; be scheduled for the same time; have the same setting for their OffPeak() flag; have the scheduled time stored in the iDate member of their corresponding TMsvEntry.
const TMsvSchedulePackage & aPackageScheduling options

ScheduleSettings()

CMsvScheduleSettings &ScheduleSettings()const [inline]

Gets scheduler settings.

SendErrorActions()

CMsvSendErrorActions &SendErrorActions()const [inline]

Gets action-on-sending-error settings.

SendingCompleteL(TMsvEntry &, const TBool)

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

Tells the scheduler that sending is complete.

This function must be called when a message that had previously been scheduled is either sent or has failed. This function:

1. Deletes the TMsvEntryScheduleData associated with the message

2. Sets the Scheduled flag to EFalse

3. If required, calls ChangeEntry() on the message server entry

Note: SendingCompleteL() does not change the sending state of each message, nor delete each message from the task scheduler.

panic
ScheduleSend-DLL 24 The server entry is not set to the correct entry. Debug build only.

Parameters

TMsvEntry & aEntryThe message which was either successfully sent or which failed (all the attempts) to send. It is not a precondition that the message has already been scheduled on the task scheduler.
const TBool aChangeEntry = EFalseIf aChangeEntry is ETrue then SendingCompleteL() will call CMsvServerEntry::ChangeEntry() to update the message on the message server.

SendingCompleteL(const CMsvEntrySelection &)

IMPORT_C voidSendingCompleteL(const CMsvEntrySelection &aSelection)

Tells the scheduler that sending is complete.

This method sets the messages's scheduled flag to false, resets the schedule data associated with each message and the number of retries for each recipient and stores the data and recipients in a stream associated with the TMsvEntry.

Parameters

const CMsvEntrySelection & aSelectionMessages that were either successfully sent or which failed all the attempts to send.

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]

Determines the schedule time for a message.

The schedule time is determined by the error action. If no error action is supplied, then the error action is obtained from the iErrorActions. This is a list of error codes associated with an error action. The error code with which the message failed to be sent is used to determine the error action from this list.

This function also increments the number of re-tries that the message has undergone.

A value of ETrue is returned if the message can be sent or a value of EFalse if the message cannot be sent.

If the message can be sent, then its schedule date and pending conditions flag are updated.

CMsvScheduleSend::ReScheduleL().

Parameters

CMsvScheduledEntry & aMessageThe message to be re-scheduled.
const TTime & aFromTimeThe current time. Used to calculate the absolute schedule time once the interval has been established.
const TMsvSendErrorAction * aErrorAction = NULLThe error action applied to the message. This can be NULL in which case the error action is obtained from iErrorActions.

SortByDateAndPendingConditionsL(CMsvScheduledEntries &)

voidSortByDateAndPendingConditionsL(CMsvScheduledEntries &aScheduledEntries)[private]

Sorts the supplied array of messages.

The messages are sorted by their schedule date (held in the iEntry.iDate member of CMsvScheduledEntry). Messages with the same schedule time are then further sorted by if they to be scheduled for pending conditions.

Parameters

CMsvScheduledEntries & aScheduledEntriesThe input/output parameter that holds the messages to be sorted. This will contain the sorted list once the function completes.

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]

Utility function that updates message index entry fields to reflect the message's scheduling.

Parameters

const TSchedulerItemRef & aRefScheduler item.
const TTaskInfo & aInfoScheduler task information.
const TTime & aTimeSchedule start time.
TInt aFinalStateSending state flag.
TMsvEntry & aEntryOn return, updated index entry.
TMsvEntryScheduleData & aDataOn return, populated messaging scheduling data.

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.