adaptationlayer/tsy/simatktsy_dll/internal/test/simatktsy_testtool/simatk/inc/commandrefresh.h
changeset 4 510c70acdbf6
parent 3 1972d8c2e329
child 5 8ccc39f9d787
equal deleted inserted replaced
3:1972d8c2e329 4:510c70acdbf6
     1 /*
       
     2 * Copyright (c) 2002-2005 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:   CommandRefresh specific test class. Inherits CCommandBase.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef COMMANDRefresh_H
       
    21 #define COMMANDRefresh_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "satcommandbase.h"
       
    25 
       
    26 
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 *  Class provides functionality to verify the validity Refresh
       
    32 *  proactive command and to create an ETel response for it.
       
    33 *  @lib SimAtk.dll
       
    34 */
       
    35 NONSHARABLE_CLASS( CCommandRefresh ) : public CSatCommandBase
       
    36     {
       
    37     
       
    38     public:  // Constructors and destructor
       
    39         
       
    40         /**
       
    41         * Constructor.
       
    42         */     
       
    43         CCommandRefresh( const TSatIpc aIpc, const RSat& aSat,
       
    44             CStifItemParser& aParser, CStifLogger& aLog );
       
    45         
       
    46        /**
       
    47         * Destructor.
       
    48         */
       
    49         ~CCommandRefresh();
       
    50 
       
    51     public: // Implemented pure virtual methods from CSatBase
       
    52 
       
    53         /**
       
    54         * Method requests notifications from Etel and
       
    55         * and resets the internal data structure.
       
    56         * @param aSimAtkStatus Reference to active object's request status
       
    57         * @return KErrNone
       
    58         */
       
    59         TInt NotifySat( TRequestStatus& aSimAtkStatus );
       
    60         
       
    61         /**
       
    62         * Method verifies the validity of received data by compaing
       
    63         * them against scripted parameters.
       
    64         * @return KErrNone if date was valid or KErrCorrupt if received data
       
    65         *   and script did not match.
       
    66         */
       
    67         TInt CheckData();
       
    68         
       
    69     public: // Implemented pure virtual methods from CCommandBase
       
    70     
       
    71         /**
       
    72         * Constructs response packet for Etel from scripted
       
    73         * parameters.
       
    74         * @return KErrNone or KErrCorrupt if parsing failed or mandatory
       
    75         *   parameters were missing.
       
    76         */
       
    77         TInt SendResponse();
       
    78         
       
    79 
       
    80     private: // New methods
       
    81         
       
    82         /**
       
    83         * Method verifies the validity of received data by comparing
       
    84         * them against scripted parameters.
       
    85         * @param aItem reference to Parser class holding parameter data
       
    86         * @param aLog Reference to logger
       
    87         * @param aData Refresh data to be verified
       
    88         * @return KErrNone if date was valid or KErrCorrupt if received data
       
    89         *   and script did not match.
       
    90         */
       
    91         static TInt VerifyRefreshPackage( CStifItemParser& aItem, 
       
    92             CStifLogger& aLog, const RSat::TRefreshV2& aData );
       
    93 
       
    94         
       
    95     private:  // Data
       
    96       
       
    97         // Proactive command data and package
       
    98         RSat::TRefreshV2                    iData;
       
    99         RSat::TRefreshV2Pckg                iDataPckg;
       
   100 
       
   101         // Response data and package
       
   102         RSat::TRefreshRspV1                 iRsp;
       
   103         RSat::TRefreshRspV1Pckg             iRspPckg;
       
   104     };
       
   105 
       
   106 #endif      // COMMANDRefresh_H
       
   107             
       
   108 // End of File