telephonyserverplugins/simatktsy/tests/inc/ccsatsetupcallfu.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 SetUpCall
       
    21 */
       
    22 
       
    23 #ifndef CCSATSETUPCALLFU_H
       
    24 #define CCSATSETUPCALLFU_H
       
    25 
       
    26 #include <test/tefunit.h>
       
    27 
       
    28 #include <etelmm.h>
       
    29 #include <etelmmcs.h>
       
    30 
       
    31 #include "ccsatcomponenttestbase.h"
       
    32 
       
    33 class CCSatSetUpCallFU : public CCSatComponentTestBase
       
    34 	{
       
    35 public:
       
    36 	// Create a suite of all the tests
       
    37 	static CTestSuite* CreateSuiteL(const TDesC& aName);
       
    38 
       
    39 public:
       
    40 	// Individual test steps
       
    41 
       
    42 	void TestNotifySetUpCallPCmd0001L();
       
    43 	void TestNotifySetUpCallPCmd0002L();
       
    44 	void TestNotifySetUpCallPCmd0004L();
       
    45 
       
    46 	void TestNotifySetUpCallPCmd0001bL();
       
    47 	void TestNotifySetUpCallPCmd0001cL();
       
    48 	void TestNotifySetUpCallPCmd0001dL();
       
    49 	void TestNotifySetUpCallPCmd0001eL();
       
    50 
       
    51 private:
       
    52 	
       
    53 	/**
       
    54 	 * data structure 
       
    55 	 */
       
    56 	struct TData
       
    57 		{
       
    58 		TUint8 iCommandType;
       
    59 		TInt   iCommandNumber; 
       
    60 		TUint8 iCommandQualifier;
       
    61 		TUint8 iSourceDevice;
       
    62 		TUint8 iDestinationDevice;
       
    63 		TUint8 iAddress;
       
    64 		RSat::TSatTelNumber iCallNumber;
       
    65 		RSat::TCcp iInfoTransferCap;
       
    66 		RSat::TSubAddress iSubAddress;
       
    67 
       
    68 		struct TDuration
       
    69 			{
       
    70 			TDuration() : iIfUse(EFalse) {}
       
    71 			TBool iIfUse;
       
    72 			TUint8 iUnit;
       
    73 			TUint8 iInterval;
       
    74 			} iDuration;
       
    75 
       
    76 		struct TIcon
       
    77 			{
       
    78 			TIcon() : iIfUse(EFalse) {}
       
    79 			TBool iIfUse;
       
    80 			TUint8 iQualifier;
       
    81 			TUint8 iIdentifier;
       
    82 			} iIcon1, iIcon2;
       
    83 			
       
    84 		struct TTextAttribute
       
    85 			{
       
    86 			enum TColour
       
    87 				{
       
    88 				EDarkGreenForeground    = 0x04,
       
    89 				EDarkGreenBackground    = 0x40,
       
    90 				EBrightYellowBackground = 0xB0,
       
    91 				EBrightYellowForeground = 0x0B
       
    92 				};
       
    93 			
       
    94 			enum TColourMode
       
    95 				{
       
    96 				EMode1 = EDarkGreenForeground | EBrightYellowBackground,
       
    97 				EMode2 = EBrightYellowForeground | EDarkGreenBackground
       
    98 				};
       
    99 			
       
   100 			enum TAlignment
       
   101 				{
       
   102 				ELeft   = 0x0,
       
   103 				ECenter = 0x1,
       
   104 				ERight  = 0x2
       
   105 				};
       
   106 			
       
   107 			enum TFontSize
       
   108 				{
       
   109 				ENormal = 0x0,
       
   110 				ELarge  = 0x4,
       
   111 				ESmall  = 0x8
       
   112 				};
       
   113 			
       
   114 			enum TStyle
       
   115 				{
       
   116 				EBond          = 0x10,
       
   117 				EItalic        = 0x20,
       
   118 				EUnderline     = 0x40,
       
   119 				EStrikethrough = 0x80
       
   120 				};
       
   121 			
       
   122 			TTextAttribute() : iIfUse(EFalse) {}
       
   123 			TBool iIfUse;
       
   124 			TUint8 iFormattingPosition;
       
   125 			TUint8 iFormattingLength;
       
   126 			TUint8 iFormattingMode;
       
   127 			TUint8 iColour;
       
   128 			} iTextAttribute1, iTextAttribute2;
       
   129 		};
       
   130 	
       
   131 	/**
       
   132 	 * prepare tlv data
       
   133 	 * @aTlvData - return tlv data
       
   134 	 * @aData - data structure
       
   135 	 * @aAlphaIdentifier - alpha identifier
       
   136 	 * @aSecondAlphaIdentifier - second alpha identifier
       
   137 	 */
       
   138 	void PrepareTlvData( TTlv& aTlvData,
       
   139 			             const TData& aData,
       
   140 			             const TDesC8& aAlphaIdentifier,
       
   141 			             const TDesC8& aSecondAlphaIdentifier);
       
   142 	
       
   143 	/**
       
   144 	 * call Set Up Call proactive command
       
   145 	 * @aSetupCallData - return data
       
   146 	 * @aData - data structure
       
   147 	 * @aAlphaIdentifier - alpha identifier
       
   148 	 * @aResultCode - possible error code
       
   149 	 * @aSecondAlphaIdentifier - second alpha identifier
       
   150 	 */
       
   151 	void ProactiveCommandCallL( RSat::TSetUpCallV6& aSetupCallData,
       
   152 			                    const TData& aData,
       
   153 			                    const TDesC8& aAlphaIdentifier,
       
   154 			                    TInt aResultCode = KErrNone,
       
   155 			                    const TDesC8& aSecondAlphaIdentifier = KNullDesC8 );
       
   156 	
       
   157 	/**
       
   158 	 * prepare expect data
       
   159 	 * @aCommandType - type of command
       
   160 	 */
       
   161 	void PrepareExpectDataL( TUint8 aCommandType );
       
   162 
       
   163 	/**
       
   164 	 * prepare complete data
       
   165 	 * @aData - data structure
       
   166 	 * @aAlphaIdentifier - alpha identifier
       
   167 	 * @aResultCode - possible error code
       
   168 	 * @aSecondAlphaIdentifier - second alpha identifier
       
   169 	 */
       
   170 	void PrepareCompleteDataL( const TData& aData,
       
   171 			                   const TDesC8& aAlphaIdentifier, 
       
   172 			                   TInt aResultCode = KErrNone,
       
   173 			                   const TDesC8& aSecondAlphaIdentifier = KNullDesC8);
       
   174 
       
   175 	/**
       
   176 	 * Variables of aSetupCallData class are compared with aCommandQualifier, aAlphaId,
       
   177 	 * aTypeOfNumber and aNumberPlan
       
   178 	 * @aSetupCallData - data
       
   179 	 * @aCommandQualifier - command qualifier
       
   180 	 * @aAlphaId - alpha identifier
       
   181 	 * @aNumberPlan - numbering plan
       
   182 	 */
       
   183 	void DataCompareL(const RSat::TSetUpCallV6& aSetupCallData,
       
   184 			                 const TUint8 aCommandQualifier,
       
   185 			                 const TDesC& aAlphaId,
       
   186 			                 const RSat::TTypeOfNumber aTypeOfNumber,
       
   187 			                 const RSat::TNumberingPlan aNumberPlan);
       
   188 
       
   189 	/**
       
   190 	 * auxiliary function for testing different text attribute in set up call
       
   191 	 * @aMode - formatting mode of text attribute
       
   192 	 * @aColour1 - colour1 of text attribute
       
   193 	 * @aColour2 - colour2 of text attribute
       
   194 	 */
       
   195 	void TestTextAttributeL( const TUint8 aMode, 
       
   196 			                 const TUint8 aColour1 = CCSatSetUpCallFU::TData::TTextAttribute::EMode1, 
       
   197 			                 const TUint8 aColour2 = CCSatSetUpCallFU::TData::TTextAttribute::EMode1 );
       
   198 
       
   199 	}; // class CCSatSetUpCallFU
       
   200 
       
   201 #endif // CCSATSETUPCALLFU_H
       
   202