adaptationlayer/tsy/nokiatsy_dll/internal/test/nokiatsy_test_tool/wim/inc/wim.h
changeset 4 510c70acdbf6
parent 3 1972d8c2e329
child 5 8ccc39f9d787
equal deleted inserted replaced
3:1972d8c2e329 4:510c70acdbf6
     1 /*
       
     2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   Specifick class for WIM tests
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef WIM_H
       
    22 #define WIM_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include "core.h"
       
    26 #include "ctsy/serviceapi/cmmgsmphonestorageutility.h"
       
    27 #include "etelmm.h"
       
    28 
       
    29 #include <stiflogger.h>
       
    30 #include <testscripterinternal.h>
       
    31 #include <stiftestmodule.h>
       
    32 
       
    33 #if ( NCP_COMMON_S60_VERSION_SUPPORT == S60_VERSION_32 )
       
    34 #include <mmmmesshandlerbase.h>
       
    35 #else
       
    36 #include <ctsy/rmmcustomapi.h>
       
    37 #endif
       
    38 
       
    39 
       
    40 // CONSTANTS
       
    41 
       
    42 // MACROS
       
    43 // Logging path
       
    44 _LIT( KSSLogPath, "\\logs\\testframework\\WIM\\" ); 
       
    45 // Log file
       
    46 _LIT( KSSLogFile, "WIM.txt" ); 
       
    47 
       
    48 _LIT(KIscControlTestCaseFileWIM, "nokiatsy_wim.xml");
       
    49 
       
    50 // FORWARD DECLARATIONS
       
    51 class TDataPackage;
       
    52 class CMmDataPackage;
       
    53 class CMessageRouterBase;
       
    54 class CCore;
       
    55 class CWIM;
       
    56 
       
    57 
       
    58 // CLASS DECLARATION
       
    59 class CWIM : public CCore
       
    60     {
       
    61     public:  // Constructors and destructor
       
    62         
       
    63         /**
       
    64         * Two-phased constructor.
       
    65         */
       
    66         static CWIM* NewL( CTestModuleIf& aTestModuleIf );
       
    67         
       
    68         /**
       
    69         * Destructor.
       
    70         */
       
    71         virtual ~CWIM();
       
    72         
       
    73 
       
    74     public: // New functions
       
    75 
       
    76     public: // Functions from base classes
       
    77 		
       
    78 		
       
    79 		 /**
       
    80         * RunIscTestCase
       
    81         * @param aItem Script line containing parameters.
       
    82         * @return Symbian OS error code.
       
    83         */
       
    84         virtual TInt RunIscTestCase( CStifItemParser& aItem );
       
    85 
       
    86         /**
       
    87         * SyncIscTestCase
       
    88         * @param aItem Script line containing parameters.
       
    89         * @return Symbian OS error code.
       
    90         */
       
    91         virtual TInt SyncIscTestCase( CStifItemParser& aItem );
       
    92 		
       
    93 		
       
    94         /**
       
    95         * From CScriptBase Runs a script line.
       
    96         * @since Series60_ver 2.8
       
    97         * @param aItem Script line containing method name and parameters
       
    98         * @return Symbian OS error code
       
    99         */
       
   100         virtual TInt RunMethodL( CStifItemParser& aItem );
       
   101 
       
   102         /**
       
   103         * Completes a request or notification via the specific Tsy object,
       
   104     	* based on IPC number and data package
       
   105     	* @since Series60_ver 2.8
       
   106         * @param aIpc: IPC number
       
   107         *        aDataPackage: Data package
       
   108         *        aResult: result
       
   109         * @return None
       
   110         */
       
   111         IMPORT_C virtual void RouteCompletion( TInt aIpc, 
       
   112             CMmDataPackage* /*aDataPackage*/, TInt aResult );
       
   113 
       
   114       
       
   115     protected:  // New functions
       
   116 
       
   117        
       
   118     
       
   119         /**
       
   120         * Power SIM on
       
   121         * @since Series60_ver 3.0
       
   122         * @param aItem Script line containing method name and parameters
       
   123         * @return Symbian OS error code.
       
   124         */
       
   125         TInt PoweringSimOn( CStifItemParser& aItem );
       
   126         
       
   127         /**
       
   128         * Complete PoweringSimOn
       
   129         * @since Series60_ver 3.0
       
   130         * @param aResult
       
   131         * @return None
       
   132         */
       
   133         void CompletePoweringSimOn( TInt aResult );
       
   134         
       
   135         /**
       
   136         * Power SIM off
       
   137         * @since Series60_ver 3.0
       
   138         * @param aItem Script line containing method name and parameters
       
   139         * @return Symbian OS error code.
       
   140         */
       
   141         TInt PoweringSimOff( CStifItemParser& aItem );
       
   142         
       
   143         /**
       
   144         * Complete PoweringSimOff
       
   145         * @since Series60_ver 3.0
       
   146         * @param aResult
       
   147         * @return None
       
   148         */
       
   149         void CompletePoweringSimOff( TInt aResult );
       
   150         
       
   151         /**
       
   152         * SIM warm reset
       
   153         * @since Series60_ver 3.0
       
   154         * @param aItem Script line containing method name and parameters
       
   155         * @return Symbian OS error code.
       
   156         */
       
   157         TInt SIMWarmReset( CStifItemParser& aItem );
       
   158         
       
   159         /**
       
   160         * Complete SIMWarmReset
       
   161         * @since Series60_ver 3.0
       
   162         * @param aResult
       
   163         * @return None
       
   164         */
       
   165         void CompleteSIMWarmReset( TInt aResult );
       
   166         
       
   167                
       
   168         /**
       
   169         * Get answer to reset status
       
   170         * @since Series60_ver 3.0
       
   171         * @param aItem Script line containing method name and parameters
       
   172         * @return Symbian OS error code.
       
   173         */
       
   174         TInt GetAnswerToResetStatus( CStifItemParser& aItem );
       
   175         
       
   176         /**
       
   177         * Complete GetAnswerToResetStatus
       
   178         * @since Series60_ver 3.0
       
   179         * @param aResult
       
   180         * @return None
       
   181         */
       
   182         void CompleteGetAnswerToResetStatus( TInt aResult, CMmDataPackage* aDataPackage );
       
   183         
       
   184         /**
       
   185         * Get SIM card reader status
       
   186         * @since Series60_ver 3.0
       
   187         * @param aItem Script line containing method name and parameters
       
   188         * @return Symbian OS error code.
       
   189         */
       
   190         TInt GetSIMCardReaderStatus( CStifItemParser& aItem );
       
   191         
       
   192         /**
       
   193         * Complete GetSIMCardReaderStatus
       
   194         * @since Series60_ver 3.0
       
   195         * @param aResult
       
   196         * @return None
       
   197         */
       
   198         void CompleteGetSIMCardReaderStatus( TInt aResult, CMmDataPackage* aDataPackage );
       
   199         
       
   200         /**
       
   201         * Send Application Data Unit (APDU)
       
   202         * @since Series60_ver 3.0
       
   203         * @param aItem Script line containing method name and parameters
       
   204         * @return Symbian OS error code.
       
   205         */
       
   206         TInt SendAPDU( CStifItemParser& aItem );
       
   207         
       
   208         /**
       
   209         * Complete SendAPDU
       
   210         * @since Series60_ver 3.0
       
   211         * @param aResult
       
   212         * @return None
       
   213         */
       
   214         void CompleteSendAPDU( TInt aResult, CMmDataPackage* aDataPackage );
       
   215         
       
   216         /**
       
   217         * Send Application Data Unit (APDU) request
       
   218         * @since Series60_ver 3.0
       
   219         * @param aItem Script line containing method name and parameters
       
   220         * @return Symbian OS error code.
       
   221         */
       
   222         TInt SendAPDURequest( CStifItemParser& aItem );
       
   223         
       
   224         /**
       
   225         * Complete SendAPDURequest request
       
   226         * @since Series60_ver 3.0
       
   227         * @param aResult
       
   228         * @return None
       
   229         */
       
   230         void CompleteSendAPDURequest( TInt aResult, CMmDataPackage* aDataPackage );
       
   231         
       
   232         
       
   233         
       
   234     protected:  // Functions from base classes
       
   235         
       
   236 
       
   237     private:
       
   238 		
       
   239         /**
       
   240         * C++ default constructor.
       
   241         */
       
   242         CWIM( CTestModuleIf& aTestModuleIf );
       
   243 
       
   244         /**
       
   245         * By default Symbian 2nd phase constructor is private.
       
   246         */
       
   247         void ConstructL();
       
   248     
       
   249         /**
       
   250         * Frees all resources allocated from test methods.
       
   251         * @since Series60_ver 2.8
       
   252         */
       
   253         void Delete();
       
   254         
       
   255         /**
       
   256         * Test methods are listed below. 
       
   257         */
       
   258         
       
   259     
       
   260 
       
   261 
       
   262     public:     // Data
       
   263     
       
   264     protected:  // Data
       
   265 
       
   266     private:    // Data
       
   267     
       
   268     TBuf8<255>                    iAnswerToResetStatus;
       
   269     TBuf8<255>                    iSIMCardReaderStatus;
       
   270     TBuf8<255>                    iInfo;
       
   271     TBuf8<255>                    iData;
       
   272     
       
   273     RMmCustomAPI::TApduParameters iParams;
       
   274         
       
   275     /**
       
   276     * Pointer to logger
       
   277     */
       
   278     CStifLogger* iWIMLog;
       
   279        
       
   280 		
       
   281     public:     // Friend classes
       
   282         //?friend_class_declaration;
       
   283     protected:  // Friend classes
       
   284         //?friend_class_declaration;
       
   285     private:    // Friend classes
       
   286         //?friend_class_declaration;
       
   287 
       
   288     };
       
   289     
       
   290 
       
   291    
       
   292    
       
   293 #endif      // WIM_H
       
   294             
       
   295 // End of File