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 void CheckScheduleL (const CMsvEntrySelection &)
IMPORT_C void ConnectAndRegisterL ( RScheduler &, const CMsvScheduleSettings &)
IMPORT_C void CreateScheduleL ( RScheduler &, const CMsvScheduleSettings &, const TTime &, const TTimeIntervalMinutes &, TSchedulerItemRef &)
IMPORT_C void CreateScheduleL ( RScheduler &, const CArrayFixFlat < TTaskSchedulerCondition > &, const TTime &, TSchedulerItemRef &)
IMPORT_C void DeleteScheduleL (const CMsvEntrySelection &)
IMPORT_C void FindScheduleL ( RScheduler &, const TTime &, TSchedulerItemRef &)
IMPORT_C void FindScheduleL ( RScheduler &, const CArrayFixFlat < TTaskSchedulerCondition > &, const TTime &, TSchedulerItemRef &)
IMPORT_C void LoadScheduleSettingsL ( CRepository &)
CMsvOffPeakTimes & OffPeakTimes ()
IMPORT_C void ReScheduleL (const CMsvEntrySelection &, const TMsvSchedulePackage &, const TMsvSendErrorAction *)
IMPORT_C void RoundUpToMinute ( TTime &)
IMPORT_C void ScheduleEntryL ( RScheduler &, const TSchedulerItemRef &, const TMsvSchedulePackage &, TTaskInfo &)
IMPORT_C void ScheduleL (const CMsvEntrySelection &, const TMsvSchedulePackage &)
CMsvScheduleSettings & ScheduleSettings ()
CMsvSendErrorActions & SendErrorActions ()
IMPORT_C void SendingCompleteL ( TMsvEntry &, const TBool )
IMPORT_C void SendingCompleteL (const CMsvEntrySelection &)
IMPORT_C void UpdateEntryAfterSchedule (const TSchedulerItemRef &, const TTaskInfo &, const TTime &, TInt , TMsvEntry &, TMsvEntryScheduleData &)
Protected Member Functions
CMsvScheduleSend ( CMsvServerEntry &)
IMPORT_C void ConstructL ()
CMsvScheduledEntry * GetMessageL (const TMsvId )
Private Member Functions
void ConnectAndRegisterL ()
void CreateScheduleL (const TTime &, const TTimeIntervalMinutes &, const CArrayFixFlat < TTaskSchedulerCondition > &, TBool , TSchedulerItemRef &)
void DeleteScheduleForEntryL ( CMsvScheduledEntry &)
void DoReScheduleL ( CMsvScheduledEntries &)
void DoScheduleL ( CMsvScheduledEntries &, const TInt , const TTime &, TBool )
void FLog ( TRefByValue < const TDesC >, ...)
void FLog ( TRefByValue < const TDesC8 >, ...)
void FindScheduleL (const TTime &, const CArrayFixFlat < TTaskSchedulerCondition > &, TBool , TSchedulerItemRef &)
TMsvId GetMessageIdForTaskL ( TInt )
void GetMessagesL (const CMsvEntrySelection &)
TBool GetNextRetry ( CMsvScheduledEntry &, const TMsvSendErrorAction &, TTimeIntervalSeconds &)
void GetOffPeakL ( TTime , TTime &, TTimeIntervalMinutes &)
void PopulateScheduleConditionsL ( CArrayFixFlat < TTaskSchedulerCondition > &)
void ResetScheduleInfoForEntryL ( CMsvScheduledEntry &, const TBool )
void ScheduleEntryL ( CMsvScheduledEntry &, const TInt , const TTime &, const TSchedulerItemRef &, TBool )
void SendingCompleteL ( CMsvScheduledEntry &, const TBool )
TBool SetMessageStartTime ( CMsvScheduledEntry &, const TTime &, const TMsvSendErrorAction *)
void SortByDateAndPendingConditionsL ( 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
enum anonymous { 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_C CMsvScheduleSend ( CMsvServerEntry & aServerEntry ) [protected]

Constructor.

Parameters

CMsvServerEntry & aServerEntry The 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 void CheckScheduleL ( 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 & aSelection Array of message IDs that need to be checked against the task scheduler.

ConnectAndRegisterL(RScheduler &, const CMsvScheduleSettings &)

IMPORT_C void ConnectAndRegisterL ( 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 & aScheduler Handle to the scheduler to connect to.
const CMsvScheduleSettings & aSettings Schedule settings.

ConnectAndRegisterL()

void ConnectAndRegisterL ( ) [private]

ConstructL()

IMPORT_C void ConstructL ( ) [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 void CreateScheduleL ( 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 & aScheduler Handle to scheduler to update.
const CMsvScheduleSettings & aSettings Scheduler settings.
const TTime & aStartTime Schedule start time.
const TTimeIntervalMinutes & aValidityPeriod Schedule validity period.
TSchedulerItemRef & aRef On return, the new schedule.

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

IMPORT_C void CreateScheduleL ( 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 & aScheduler Handle to scheduler to update.
const CArrayFixFlat < TTaskSchedulerCondition > & aConditions The set of System Agent conditions that are required to be met to trigger the schedule.
const TTime & aTimeout The timeout value for the schedule.
TSchedulerItemRef & aRef On return, the new schedule.

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

void CreateScheduleL ( const TTime & aStartTime,
const TTimeIntervalMinutes & aValidityPeriod,
const CArrayFixFlat < TTaskSchedulerCondition > & aSchConditions,
TBool aPendingConditions,
TSchedulerItemRef & aRef
) [private]

Parameters

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

DeleteScheduleForEntryL(CMsvScheduledEntry &)

void DeleteScheduleForEntryL ( CMsvScheduledEntry & aMessage ) [private]

Parameters

CMsvScheduledEntry & aMessage

DeleteScheduleL(const CMsvEntrySelection &)

IMPORT_C void DeleteScheduleL ( 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 & aSelection Array of message IDs that need to be deleted from the task scheduler.

DoReScheduleL(CMsvScheduledEntries &)

void DoReScheduleL ( CMsvScheduledEntries & aSchEntries ) [private]

Parameters

CMsvScheduledEntries & aSchEntries

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

void DoScheduleL ( CMsvScheduledEntries & aSchEntries,
const TInt aFinalState,
const TTime & aTime,
TBool aPendingConditions
) [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 & aSchEntries An array with the messages to be scheduled.
const TInt aFinalState The sending state to set to the messages to if the message is successfully scheduled.
const TTime & aTime For conditions-scheduled messages this is the timeout, for time-scheduled messages this is the scheduled time.
TBool aPendingConditions A flag indicating whether the schedule should be pending conditions.

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

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

Parameters

TRefByValue < const TDesC > aFormat
...

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

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

Parameters

TRefByValue < const TDesC8 > aFormat
...

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

IMPORT_C void FindScheduleL ( 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 & aScheduler Handle to the scheduler.
const TTime & aStartTime Schedule start time.
TSchedulerItemRef & aRef On return, the schedule item.

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

IMPORT_C void FindScheduleL ( 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 & aScheduler Handle to the scheduler.
const CArrayFixFlat < TTaskSchedulerCondition > & aConditions The set of System Agent conditions that are required to be met to trigger the schedule.
const TTime & aTimeout The timeout value for the schedule.
TSchedulerItemRef & aRef On return, the schedule item.

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

void FindScheduleL ( const TTime & aTime,
const CArrayFixFlat < TTaskSchedulerCondition > & aSchConditions,
TBool aPendingConditions,
TSchedulerItemRef & aRef
) [private]

Parameters

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

GetMessageIdForTaskL(TInt)

TMsvId GetMessageIdForTaskL ( TInt aTaskId ) [private]

Parameters

TInt aTaskId

GetMessageL(const TMsvId)

CMsvScheduledEntry * GetMessageL ( const TMsvId aId ) 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 aId The message ID.

GetMessagesL(const CMsvEntrySelection &)

void GetMessagesL ( 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 & aMessage The message to be re-scheduled.
const TMsvSendErrorAction & aErrorAction The error action that determines the re-schedule behaviour.
TTimeIntervalSeconds & aInterval An 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 &)

void GetOffPeakL ( TTime aFromTime,
TTime & aStartTime,
TTimeIntervalMinutes & aValidityPeriod
) const [private]

Parameters

TTime aFromTime
TTime & aStartTime
TTimeIntervalMinutes & aValidityPeriod

LoadScheduleSettingsL(CRepository &)

IMPORT_C void LoadScheduleSettingsL ( CRepository & aRepository )

Loads schedule settings from CenRep

Parameters

CRepository & aRepository CenRep repository to load settings from

OffPeakTimes()

CMsvOffPeakTimes & OffPeakTimes ( ) const [inline]

Gets off-peak times settings.

PopulateScheduleConditionsL(CArrayFixFlat< TTaskSchedulerCondition > &)

void PopulateScheduleConditionsL ( CArrayFixFlat < TTaskSchedulerCondition > & aSchConditions ) [private]

Parameters

CArrayFixFlat < TTaskSchedulerCondition > & aSchConditions

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

IMPORT_C void ReScheduleL ( 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 & aSelection Array 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 & aPackage Scheduling options.
const TMsvSendErrorAction * aErrorAction = NULL The 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)

void ResetScheduleInfoForEntryL ( CMsvScheduledEntry & aMessage,
const TBool aChangeEntry
) [private]

Parameters

CMsvScheduledEntry & aMessage
const TBool aChangeEntry

RoundUpToMinute(TTime &)

IMPORT_C void RoundUpToMinute ( TTime & aTime ) [static]

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

Parameters

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

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

IMPORT_C void ScheduleEntryL ( 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 & aScheduler Scheduler to access.
const TSchedulerItemRef & aRef Id of the schedule.
const TMsvSchedulePackage & aPackage Scheduler settings.
TTaskInfo & aInfo Information about the entry to be added to the schedule.

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

void ScheduleEntryL ( CMsvScheduledEntry & aMessage,
const TInt aFinalState,
const TTime & aStartTime,
const TSchedulerItemRef & aRef,
TBool aPendingConditions
) [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 & aMessage The message to be scheduled.
const TInt aFinalState The sending state to set to the messages to if the message is successfully scheduled.
const TTime & aStartTime
const TSchedulerItemRef & aRef The ID of the schedule to add this task to.
TBool aPendingConditions A flag indicating whether this message is schedule for conditions.

ScheduleL(const CMsvEntrySelection &, const TMsvSchedulePackage &)

IMPORT_C void ScheduleL ( 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 & aSelection Array 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 & aPackage Scheduling 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 void SendingCompleteL ( TMsvEntry & aEntry,
const TBool aChangeEntry = 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 & aEntry The 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 = EFalse If aChangeEntry is ETrue then SendingCompleteL() will call CMsvServerEntry::ChangeEntry() to update the message on the message server.

SendingCompleteL(const CMsvEntrySelection &)

IMPORT_C void SendingCompleteL ( 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 & aSelection Messages that were either successfully sent or which failed all the attempts to send.

SendingCompleteL(CMsvScheduledEntry &, const TBool)

void SendingCompleteL ( CMsvScheduledEntry & aScheduledEntry,
const TBool aChangeEntry
) [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 & aMessage The message to be re-scheduled.
const TTime & aFromTime The current time. Used to calculate the absolute schedule time once the interval has been established.
const TMsvSendErrorAction * aErrorAction = NULL The error action applied to the message. This can be NULL in which case the error action is obtained from iErrorActions.

SortByDateAndPendingConditionsL(CMsvScheduledEntries &)

void SortByDateAndPendingConditionsL ( 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 & aScheduledEntries The 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 void UpdateEntryAfterSchedule ( const TSchedulerItemRef & aRef,
const TTaskInfo & aInfo,
const TTime & aTime,
TInt aFinalState,
TMsvEntry & aEntry,
TMsvEntryScheduleData & aData
) [static]

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

Parameters

const TSchedulerItemRef & aRef Scheduler item.
const TTaskInfo & aInfo Scheduler task information.
const TTime & aTime Schedule start time.
TInt aFinalState Sending state flag.
TMsvEntry & aEntry On return, updated index entry.
TMsvEntryScheduleData & aData On 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.