messagingfw/msgsrvnstore/server/inc/MSVRCPT.H
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 1998-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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #if !defined(__MSVRCPT_H__)
       
    17 #define __MSVRCPT_H__
       
    18 
       
    19 class RWriteStream;
       
    20 
       
    21 //**********************************
       
    22 // CMsvRecipient
       
    23 //**********************************
       
    24 //
       
    25 // Base class for  multiple recipients
       
    26 //
       
    27 
       
    28 class CMsvRecipient : public CBase
       
    29 /** Base class for information relating to a message recipient. 
       
    30 @publishedAll
       
    31 @released
       
    32 */
       
    33 	{
       
    34 public:
       
    35 	/** Message sending status for a recipient. 
       
    36 @publishedAll
       
    37 @released
       
    38 */
       
    39 	enum TRecipientStatus 
       
    40 							{	
       
    41 	/** Message is not sent. */
       
    42 							ENotYetSent=0,
       
    43 	/** Message has been sent. */
       
    44 							ESentSuccessfully=1,
       
    45 	/** Message sending failed. */
       
    46 				 			EFailedToSend=2};
       
    47 	IMPORT_C virtual void InternalizeL(RReadStream& aStream);
       
    48 	IMPORT_C virtual void ExternalizeL(RWriteStream& aStream) const;
       
    49 	inline TRecipientStatus Status() const;
       
    50 	inline void SetStatus(TRecipientStatus aStatus);
       
    51 	inline TInt Error() const;
       
    52 	inline void SetError(TInt aError);
       
    53 	inline const TTime& Time() const;
       
    54 	inline TTime& Time();
       
    55 	inline TInt Retries() const;
       
    56 	inline void IncreaseRetries();
       
    57 	inline void ResetRetries();
       
    58 #if (defined SYMBIAN_MESSAGESTORE_HEADER_BODY_USING_SQLDB)	
       
    59 	inline void SetRetries(TInt aRetries);
       
    60 	inline void SetTimeValue(TInt64 aTime);
       
    61 #endif
       
    62 protected:
       
    63 	IMPORT_C CMsvRecipient();
       
    64 private:
       
    65 	TRecipientStatus iStatus;
       
    66 	TInt   iError;
       
    67 	TInt   iRetries;
       
    68 	TTime	 iTime;
       
    69 	};
       
    70 
       
    71 #include <msvrcpt.inl>
       
    72 
       
    73 #endif