author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 2 |
// All rights reserved. |
williamr@2 | 3 |
// This component and the accompanying materials are made available |
williamr@2 | 4 |
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
williamr@2 | 5 |
// which accompanies this distribution, and is available |
williamr@2 | 6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
williamr@2 | 7 |
// |
williamr@2 | 8 |
// Initial Contributors: |
williamr@2 | 9 |
// Nokia Corporation - initial contribution. |
williamr@2 | 10 |
// |
williamr@2 | 11 |
// Contributors: |
williamr@2 | 12 |
// |
williamr@2 | 13 |
// Description: |
williamr@2 | 14 |
// |
williamr@2 | 15 |
|
williamr@2 | 16 |
#ifndef __MSVSCHEDULEDENTRY_H__ |
williamr@2 | 17 |
#define __MSVSCHEDULEDENTRY_H__ |
williamr@2 | 18 |
|
williamr@2 | 19 |
#include <msvsenderroraction.h> |
williamr@2 | 20 |
#include <msventryscheduledata.h> |
williamr@2 | 21 |
|
williamr@2 | 22 |
/** |
williamr@2 | 23 |
Abstract base class which stores the schedule data and recipients of a message. |
williamr@2 | 24 |
|
williamr@2 | 25 |
CMsvScheduledEntry does not force the Server MTM to store the message |
williamr@2 | 26 |
recipients in a certain way. However, it is recommended that the Server MTM |
williamr@2 | 27 |
derive its recipients class from CMsvRecipient, because the class already has |
williamr@2 | 28 |
support for the number of retries to send a message to a recipient. |
williamr@2 | 29 |
|
williamr@2 | 30 |
CMsvScheduledEntry stores the TMsvEntry to which it relates to provide quick |
williamr@2 | 31 |
access to the scheduling-related index data without needing calls to |
williamr@2 | 32 |
CMsvServerEntry::SetEntry(). |
williamr@2 | 33 |
However, CMsvScheduledEntry does not provide access to all the members of |
williamr@2 | 34 |
the TMsvEntry. This is to stop the user of the CMsvScheduledEntry from |
williamr@2 | 35 |
accessing the descriptor members of the TMsvEntry while the server entry is |
williamr@2 | 36 |
not set to the TMsvEntry. |
williamr@2 | 37 |
|
williamr@2 | 38 |
@publishedAll |
williamr@2 | 39 |
@released |
williamr@2 | 40 |
*/ |
williamr@2 | 41 |
|
williamr@2 | 42 |
class CMsvScheduledEntry : public CBase |
williamr@2 | 43 |
{ |
williamr@2 | 44 |
public: |
williamr@2 | 45 |
/** |
williamr@2 | 46 |
Tests if any of the recipients of this message can still be sent to. |
williamr@2 | 47 |
|
williamr@2 | 48 |
@param aErrorActions |
williamr@2 | 49 |
Error-actions |
williamr@2 | 50 |
|
williamr@2 | 51 |
@param aAction |
williamr@2 | 52 |
Default error-action |
williamr@2 | 53 |
|
williamr@2 | 54 |
@return True if at least one of the recipients has not been sent |
williamr@2 | 55 |
the message. |
williamr@2 | 56 |
*/ |
williamr@2 | 57 |
virtual TBool CanSendToAnyRecipients(const CMsvSendErrorActions& aErrorActions, TMsvSendErrorAction& aAction) = 0; |
williamr@2 | 58 |
|
williamr@2 | 59 |
/** |
williamr@2 | 60 |
Tests if any of the recipients of this message can still be sent to. |
williamr@2 | 61 |
|
williamr@2 | 62 |
@param aAction |
williamr@2 | 63 |
Default error-action |
williamr@2 | 64 |
|
williamr@2 | 65 |
@return True if at least one of the recipients has not been sent |
williamr@2 | 66 |
the message. |
williamr@2 | 67 |
*/ |
williamr@2 | 68 |
virtual TBool CanSendToAnyRecipients(const TMsvSendErrorAction& aAction) = 0; |
williamr@2 | 69 |
|
williamr@2 | 70 |
/** |
williamr@2 | 71 |
Sets all the recipients' retries to zero. |
williamr@2 | 72 |
*/ |
williamr@2 | 73 |
virtual void RecipientsResetRetries() = 0; |
williamr@2 | 74 |
|
williamr@2 | 75 |
/** |
williamr@2 | 76 |
Increases all the recipients' retries by one. |
williamr@2 | 77 |
*/ |
williamr@2 | 78 |
virtual void RecipientsIncreaseRetries() = 0; |
williamr@2 | 79 |
|
williamr@2 | 80 |
/** |
williamr@2 | 81 |
Sets all the recipients' flags to sending failed. |
williamr@2 | 82 |
*/ |
williamr@2 | 83 |
virtual void RecipientsSetFailed() = 0; |
williamr@2 | 84 |
|
williamr@2 | 85 |
/** |
williamr@2 | 86 |
Tests if all recipients of the message have been sent successfully. |
williamr@2 | 87 |
|
williamr@2 | 88 |
@return True if all recipients have been sent successfully. |
williamr@2 | 89 |
*/ |
williamr@2 | 90 |
virtual TBool RecipientsAllSent() const = 0; |
williamr@2 | 91 |
|
williamr@2 | 92 |
IMPORT_C virtual void StoreL(CMsvStore& aStore) const; |
williamr@2 | 93 |
IMPORT_C virtual void RestoreL(CMsvStore& aStore); |
williamr@2 | 94 |
|
williamr@2 | 95 |
/** |
williamr@2 | 96 |
Stores the recipients. |
williamr@2 | 97 |
|
williamr@2 | 98 |
@param aStore |
williamr@2 | 99 |
Store to write to. |
williamr@2 | 100 |
*/ |
williamr@2 | 101 |
virtual void RecipientsStoreL(CMsvStore& aStore) const = 0; |
williamr@2 | 102 |
|
williamr@2 | 103 |
/** |
williamr@2 | 104 |
Restores the recipients. |
williamr@2 | 105 |
|
williamr@2 | 106 |
@param aStore |
williamr@2 | 107 |
Store to read from. |
williamr@2 | 108 |
*/ |
williamr@2 | 109 |
virtual void RecipientsRestoreL(CMsvStore& aStore) = 0; |
williamr@2 | 110 |
|
williamr@2 | 111 |
inline const TTime& ScheduleDate() const; |
williamr@2 | 112 |
inline void SetScheduleDate(const TTime& aDate); |
williamr@2 | 113 |
|
williamr@2 | 114 |
inline const TBool Scheduled() const; |
williamr@2 | 115 |
inline void SetScheduled(const TBool aScheduled); |
williamr@2 | 116 |
|
williamr@2 | 117 |
inline const TInt SendingState() const; |
williamr@2 | 118 |
inline void SetSendingState(TInt aState); |
williamr@2 | 119 |
|
williamr@2 | 120 |
inline const TInt Error() const; |
williamr@2 | 121 |
inline const TMsvId Id() const; |
williamr@2 | 122 |
inline const TBool OffPeak() const; |
williamr@2 | 123 |
|
williamr@2 | 124 |
inline void SetFailed(const TBool aFail); |
williamr@2 | 125 |
inline const TBool Failed() const; |
williamr@2 | 126 |
|
williamr@2 | 127 |
IMPORT_C TBool PendingConditions() const; |
williamr@2 | 128 |
IMPORT_C void SetPendingConditions(TBool aPendingConditions); |
williamr@2 | 129 |
|
williamr@2 | 130 |
inline const TUid Mtm() const; |
williamr@2 | 131 |
|
williamr@2 | 132 |
IMPORT_C void Entry(TMsvEntry& aEntry) const; |
williamr@2 | 133 |
|
williamr@2 | 134 |
protected: |
williamr@2 | 135 |
|
williamr@2 | 136 |
IMPORT_C CMsvScheduledEntry(const TMsvEntry& aEntry); |
williamr@2 | 137 |
|
williamr@2 | 138 |
public: |
williamr@2 | 139 |
|
williamr@2 | 140 |
/** Message schedule data. */ |
williamr@2 | 141 |
TMsvEntryScheduleData iData; |
williamr@2 | 142 |
|
williamr@2 | 143 |
private: |
williamr@2 | 144 |
|
williamr@2 | 145 |
TMsvEntry iEntry; |
williamr@2 | 146 |
}; |
williamr@2 | 147 |
|
williamr@2 | 148 |
/** |
williamr@2 | 149 |
Dynamic array of CMsvScheduledEntry objects. |
williamr@2 | 150 |
|
williamr@2 | 151 |
@publishedAll |
williamr@2 | 152 |
@released |
williamr@2 | 153 |
*/ |
williamr@2 | 154 |
typedef CArrayPtrFlat<CMsvScheduledEntry> CMsvScheduledEntries; |
williamr@2 | 155 |
|
williamr@2 | 156 |
#include <msvscheduledentry.inl> |
williamr@2 | 157 |
|
williamr@2 | 158 |
#endif |