messagingfw/msgtestfw/TestActions/Drm/inc/CMtfTestActionSmtpSendEmail.h
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
equal deleted inserted replaced
60:9f5ae1728557 62:db3f5fa34ec7
       
     1 // Copyright (c) 2004-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 //! @file
       
    17 //! @internalComponent
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CMTFTESTACTIONSMTPSENDEMAIL_H
       
    22 #define CMTFTESTACTIONSMTPSENDEMAIL_H
       
    23 
       
    24 
       
    25 #include "CMtfSynchronousTestAction.h"
       
    26 #include <imsk.h>
       
    27 
       
    28 
       
    29 _LIT( KTestActionSmtpSendEmail,"SmtpSendEmail");
       
    30 
       
    31 class CMtfTestActionSmtpSendEmail : public CMtfTestAction
       
    32 {
       
    33 public:
       
    34 	static CMtfTestAction* NewL( CMtfTestCase& aTestCase,CMtfTestActionParameters* aActionParameters );
       
    35 	virtual void ExecuteActionL();
       
    36 	~CMtfTestActionSmtpSendEmail();
       
    37 
       
    38 protected:
       
    39 	void DoCancel();
       
    40 	void RunL();
       
    41 
       
    42 private:
       
    43 	enum TSmtpSendState
       
    44 	{
       
    45 		ESmtpNotConnected,
       
    46 		ESmtpConnecting,
       
    47 		ESmtpSendHELO,
       
    48 		ESmtpSendMailFrom,
       
    49 		ESmtpSendRcptTo,
       
    50 		ESmtpSendData,
       
    51 		ESmtpSendContent,
       
    52 		ESmtpSendEndData,
       
    53 		ESmtpSendLogout,
       
    54 		ESmtpReceiveReply
       
    55 	};
       
    56 
       
    57 	enum TSmtpReceiveState
       
    58 	{
       
    59 		ESmtpHeloReply,
       
    60 		ESmtpFromReply,
       
    61 		ESmtpRcptReply,
       
    62 		ESmtpDataReply,
       
    63 		ESmtpContentReply,
       
    64 		ESmtpLogoutReply
       
    65 	};
       
    66 		
       
    67 private:
       
    68 	CMtfTestActionSmtpSendEmail(CMtfTestCase& aTestCase);
       
    69 	
       
    70 private:
       
    71 	CImTextServerSession* iImSocket;
       
    72 	TInt iSendState;
       
    73 	TInt iRecvState;
       
    74 	RFs iFs;
       
    75 	RFile iFile;
       
    76 	HBufC* iSender;
       
    77 	HBufC* iRecipient;
       
    78 	CImIAPPreferences* iIapPrefs;
       
    79 };
       
    80 
       
    81 
       
    82 #endif  // CMTFTESTACTIONSMTPSENDEMAIL_H