telephonyserverplugins/simatktsy/tests/inc/ccsatopenchannelfu.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2008-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 // functional unit of the SAT.
       
    15 //
       
    16 
       
    17 
       
    18 
       
    19 /**
       
    20  @file The TEFUnit header file which tests the OpenChannel
       
    21 */
       
    22 
       
    23 #ifndef CCSATOPENCHANNELFU_H
       
    24 #define CCSATOPENCHANNELFU_H
       
    25 
       
    26 #include <test/tefunit.h>
       
    27 
       
    28 #include <etelmm.h>
       
    29 #include <etelmmcs.h>
       
    30 
       
    31 #include "ccsatcomponenttestbase.h"
       
    32 
       
    33 _LIT8(KNoAlpha, "KNoAlpha");
       
    34 
       
    35 
       
    36 class CCSatOpenChannelFU : public CCSatComponentTestBase
       
    37 	{
       
    38 public:
       
    39 	// Create a suite of all the tests
       
    40 	static CTestSuite* CreateSuiteL(const TDesC& aName);
       
    41 
       
    42 public:
       
    43 	// Individual test steps
       
    44 
       
    45 	void TestNotifyOpenChannelPCmd0001L();
       
    46 	void TestNotifyOpenChannelPCmd0002L();
       
    47 	void TestNotifyOpenChannelPCmd0004L();
       
    48 	void TestNotifyOpenChannelPCmd0001bL();
       
    49 	void TestNotifyOpenChannelPCmd0001cL();
       
    50 	void TestNotifyOpenChannelPCmd0001dL();
       
    51 	
       
    52 private:
       
    53    /**
       
    54     * prepare tlv buffer for OpenChannel proactive command 
       
    55     * @param aTlv - tlv buffer to prepare
       
    56     * @param aCmdNum - command number
       
    57     * @param aCmdQualifier - type of refresh command
       
    58     * @param aTon - TON and NPI bitmask
       
    59     * @param aNum - address number
       
    60     * @param aBearer - berarer type 
       
    61     * @param aBufSize - buffer size
       
    62     * @param aNetworkAccessName - network access name 
       
    63     * @param aAlpha - alpha identifier
       
    64     * @param  aUdpTcp - Udp or Tcp param (default Udp) 
       
    65     */   	
       
    66 	static void PrepareTlv(TTlv& aTlv, TUint8 aCmdQualifier, TUint8 aTon, 
       
    67 			const TDesC8& aNum, TUint8 aBearer, const TDesC8& aNetworkAccessName = KNullDesC8,
       
    68 			const TDesC8& aAlpha = KNoAlpha, TUint8 aUdpTcp = 0x01, TBool aIPv4 = ETrue); 
       
    69 	
       
    70    /**
       
    71     * prepare mock for processing of proactive command
       
    72     * @param aTlvDsc - tlv buffer to send
       
    73     * @param aRes - result for request completion
       
    74     */   	
       
    75 	void PrepareAndCompleteDispatchL(TPtrC8 aTlvDsc, TInt aRes = KErrNone);
       
    76    /**
       
    77     * prepare mock for dispatch of sat notification  
       
    78     */   	
       
    79 	void PrepareDispatchL(void);
       
    80 
       
    81 	/**
       
    82 	 * Tests all possible "TERMINAL RESPONSE" cases. 
       
    83 	 * API should return KErrNone for all valid responses and KErrCorrupt 
       
    84 	 * for those that can not be used with "Open channel" command  
       
    85 	 */
       
    86 	void DoTestTerminalResponseL();
       
    87 	
       
    88 	RSat::TOpenCsChannelV2 iOpenCsChannel;
       
    89 	void CCSatOpenChannelFU::ReinitChannel(RSat::TOpenCsChannelV2 &aChannel);
       
    90 	}; // class CCSatChannelFU
       
    91 
       
    92 #endif // CCSATOPENCHANNELFU_H
       
    93