1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __MSVSCHEDULEDENTRY_H__
17 #define __MSVSCHEDULEDENTRY_H__
19 #include <msvsenderroraction.h>
20 #include <msventryscheduledata.h>
23 Abstract base class which stores the schedule data and recipients of a message.
25 CMsvScheduledEntry does not force the Server MTM to store the message
26 recipients in a certain way. However, it is recommended that the Server MTM
27 derive its recipients class from CMsvRecipient, because the class already has
28 support for the number of retries to send a message to a recipient.
30 CMsvScheduledEntry stores the TMsvEntry to which it relates to provide quick
31 access to the scheduling-related index data without needing calls to
32 CMsvServerEntry::SetEntry().
33 However, CMsvScheduledEntry does not provide access to all the members of
34 the TMsvEntry. This is to stop the user of the CMsvScheduledEntry from
35 accessing the descriptor members of the TMsvEntry while the server entry is
36 not set to the TMsvEntry.
42 class CMsvScheduledEntry : public CBase
46 Tests if any of the recipients of this message can still be sent to.
54 @return True if at least one of the recipients has not been sent
57 virtual TBool CanSendToAnyRecipients(const CMsvSendErrorActions& aErrorActions, TMsvSendErrorAction& aAction) = 0;
60 Tests if any of the recipients of this message can still be sent to.
65 @return True if at least one of the recipients has not been sent
68 virtual TBool CanSendToAnyRecipients(const TMsvSendErrorAction& aAction) = 0;
71 Sets all the recipients' retries to zero.
73 virtual void RecipientsResetRetries() = 0;
76 Increases all the recipients' retries by one.
78 virtual void RecipientsIncreaseRetries() = 0;
81 Sets all the recipients' flags to sending failed.
83 virtual void RecipientsSetFailed() = 0;
86 Tests if all recipients of the message have been sent successfully.
88 @return True if all recipients have been sent successfully.
90 virtual TBool RecipientsAllSent() const = 0;
92 IMPORT_C virtual void StoreL(CMsvStore& aStore) const;
93 IMPORT_C virtual void RestoreL(CMsvStore& aStore);
96 Stores the recipients.
101 virtual void RecipientsStoreL(CMsvStore& aStore) const = 0;
104 Restores the recipients.
109 virtual void RecipientsRestoreL(CMsvStore& aStore) = 0;
111 inline const TTime& ScheduleDate() const;
112 inline void SetScheduleDate(const TTime& aDate);
114 inline const TBool Scheduled() const;
115 inline void SetScheduled(const TBool aScheduled);
117 inline const TInt SendingState() const;
118 inline void SetSendingState(TInt aState);
120 inline const TInt Error() const;
121 inline const TMsvId Id() const;
122 inline const TBool OffPeak() const;
124 inline void SetFailed(const TBool aFail);
125 inline const TBool Failed() const;
127 IMPORT_C TBool PendingConditions() const;
128 IMPORT_C void SetPendingConditions(TBool aPendingConditions);
130 inline const TUid Mtm() const;
132 IMPORT_C void Entry(TMsvEntry& aEntry) const;
136 IMPORT_C CMsvScheduledEntry(const TMsvEntry& aEntry);
140 /** Message schedule data. */
141 TMsvEntryScheduleData iData;
149 Dynamic array of CMsvScheduledEntry objects.
154 typedef CArrayPtrFlat<CMsvScheduledEntry> CMsvScheduledEntries;
156 #include <msvscheduledentry.inl>