buildverification/smoketest/messaging/Inc/TestMessCreateSMS.h
changeset 15 5b5908ec640f
parent 13 3a35f7917fa6
child 17 03d9ade4748d
equal deleted inserted replaced
13:3a35f7917fa6 15:5b5908ec640f
     1 // Copyright (c) 2002-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 // This contains CTestMessCreateSMS. This class creates the sms message 
       
    15 // for GSM or CDMA. For CDMA mtm, it uses utility classes to create 
       
    16 // the respective GSM or CDMA sms message
       
    17 // 
       
    18 //
       
    19 
       
    20 #if (!defined __TEST_MESS_CREATE_SMS_H__)
       
    21 #define __TEST_MESS_CREATE_SMS_H__
       
    22 
       
    23 //Epoc include
       
    24 #include <test/smoketestactive.h>
       
    25 #include <sendas2.h>
       
    26 #include <csendasaccounts.h>
       
    27 #include <csendasmessagetypes.h>
       
    28 
       
    29 #include "TestMessBase.h"
       
    30 #include "TestMessCreateSmsUtilBase.h"
       
    31 
       
    32 /**
       
    33  This class creates the sms message for GSM or CDMA. For CDMA mtm, it 
       
    34  uses utility classes to create the respective GSM or CDMA sms message
       
    35 */
       
    36 class CTestMessCreateSMS : public CTestMessBase
       
    37 ,	private MTestActiveCallback
       
    38 	{
       
    39 public:
       
    40 	CTestMessCreateSMS();
       
    41 
       
    42 	virtual	TVerdict	doTestStepPreambleL();
       
    43 	virtual	TVerdict	doTestStepL();
       
    44 
       
    45 protected:
       
    46 	virtual void		AddMtmCapabilitiesL(RSendAs& aSendAs);
       
    47 	virtual void		PrepareSendAsL(RSendAsMessage& aSendAs);
       
    48 	virtual void		PrepareHeaderL(CTestMessCreateSmsUtilBase& aCreateUtil, CSmsHeader& aSmsHeader);
       
    49 	void				ConCatMessageTextL(CSmsHeader& aHeader);
       
    50 	void				CreateSmsL(const TMsvId aMsvId, TTimeIntervalMinutes aScheduledTime);
       
    51 
       
    52 private:
       
    53 	virtual void	RunL() { CActiveScheduler::Stop(); }
       
    54 	/**
       
    55 	* Method from which CTestActive informs the user DoCancel call
       
    56 	*/
       
    57 	virtual void	DoCancel() { }
       
    58 
       
    59 private:
       
    60 	TBool							iSimInDatabase;
       
    61 	RMobilePhone::TMobileAddress	iSimPhoneNumber;
       
    62 	};
       
    63 
       
    64 #endif /* __TEST_MESS_CREATE_SMS_H__ */