messagingappbase/smsmtm/servermtm/inc/SMSSSEND.H
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
child 37 518b245aa84c
child 79 2981cb3aa489
equal deleted inserted replaced
23:238255e8b033 25:84d9eb65b26f
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __SMSSSEND_H__
       
    17 #define __SMSSSEND_H__
       
    18 
       
    19 #include <msvstd.h> 
       
    20 #include "smssactive.h"
       
    21 
       
    22 class CSmsHeader;
       
    23 class TSmsProgress;
       
    24 class CSmsRecipientSend;
       
    25 class CSmsEventLogger;
       
    26 
       
    27 class CSmsSend : public CSmssActive
       
    28 /**
       
    29 @internalComponent
       
    30 @released
       
    31 */
       
    32 	{
       
    33 public:
       
    34 		
       
    35 	static CSmsSend* NewL(TSmsProgress& aProgress, CMsvServerEntry& aServerEntry, RFs& aFs, CSmsHeader& aHeader, CRichText& aRichText, TMsvEntry& aEntry);
       
    36 	~CSmsSend();
       
    37 
       
    38 	void Start(TRequestStatus& aStatus, const TMsvId aMsvId, CSmsRecipientSend* aRecipientSend);
       
    39 
       
    40 private:
       
    41 	CSmsSend(TSmsProgress& aProgress,CMsvServerEntry& aServerEntry, RFs& aFs, CSmsHeader& aHeader, CRichText& aRichText, TMsvEntry& aEntry);
       
    42 	void OpenEntryL(const TMsvId aMsvId);
       
    43 	void SendNextRecipientL();
       
    44 	void UpdateAfterRecipientSentL(const TInt aError);
       
    45 	void UpdateEntryAfterAllSentL();
       
    46 
       
    47 private:	// method from CSmssActive
       
    48 
       
    49 	virtual void DoRunL();			
       
    50 	virtual void DoSmssCancel();
       
    51 	virtual void DoComplete(TInt& aStatus);
       
    52 
       
    53 private:
       
    54 
       
    55 	TMsvId iSmsServiceId;
       
    56 	TSmsProgress& iProgress;
       
    57 	TMsvEntry& iEntry;
       
    58 	CSmsHeader& iSmsHeader;
       
    59 	CRichText& iRichText;
       
    60 
       
    61 	enum TSmsSendState
       
    62 		{
       
    63 		ESmsSendWaiting,
       
    64 		ESmsSendOpeningEntry,
       
    65 		ESmsSendSendingEntry,
       
    66 		ESmsSendUpdatingRecipient
       
    67 		} iState;
       
    68 
       
    69 	CSmsRecipientSend* iRecipientSend;
       
    70 	CSmsEventLogger* iLogger;
       
    71 	TBool iDeliveryReports;	
       
    72 	TInt iSentRecipients;
       
    73 	TInt iLastSentIndex;
       
    74 	// Contains Failed status of a Recipient in a list of recipients.
       
    75 	TInt iRecipientFailedStatus ;
       
    76 
       
    77 	};
       
    78 
       
    79 #endif	// __SMSSSEND_H__