adaptationlayer/tsy/simatktsy_dll/internal/test/simatktsy_testtool/simatk/src/commandgetchannelstatus.cpp
changeset 0 63b37f68c1ce
equal deleted inserted replaced
-1:000000000000 0:63b37f68c1ce
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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:   GetChannelStatus specific test class. Inherits CCommandBase.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include <stifparser.h>
       
    22 #include "commandgetchannelstatus.h"
       
    23 
       
    24 
       
    25 // -----------------------------------------------------------------------------
       
    26 // CCommandGetChannelStatus::CCommandGetChannelStatus
       
    27 // C++ default constructor can NOT contain any code, that
       
    28 // might leave.
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 CCommandGetChannelStatus::CCommandGetChannelStatus
       
    32         (
       
    33         const TSatIpc       aIpc,
       
    34         const RSat&         aSat,
       
    35         CStifItemParser&    aParser,
       
    36         CStifLogger&        aLog
       
    37         ) : CSatCommandBase ( aIpc, aSat, aParser, aLog, RSat::EGetChannelStatus ),
       
    38         iDataPckg( iData ),
       
    39         iRspPckg( iRsp )
       
    40     {
       
    41     }
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // CCommandGetChannelStatus::~CCommandGetChannelStatus
       
    45 // Destructor
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 CCommandGetChannelStatus::~CCommandGetChannelStatus()
       
    49     {
       
    50     }
       
    51 
       
    52 // -----------------------------------------------------------------------------
       
    53 // CCommandGetChannelStatus::NotifySat
       
    54 // Send a notify request to Etel and clear internal data
       
    55 // (other items were commented in a header).
       
    56 // -----------------------------------------------------------------------------       
       
    57 //
       
    58 TInt CCommandGetChannelStatus::NotifySat
       
    59         (
       
    60         TRequestStatus& aSimAtkStatus
       
    61         )
       
    62     {
       
    63     TInt ret( KErrNone );
       
    64     
       
    65     // Clear the packages
       
    66     Init( iData );
       
    67     Init( iRsp );
       
    68 
       
    69     iSat.NotifyGetChannelStatusPCmd( aSimAtkStatus, iDataPckg );
       
    70     
       
    71     return ret;
       
    72     }
       
    73 
       
    74 // -----------------------------------------------------------------------------
       
    75 // CCommandGetChannelStatus::CheckData
       
    76 // Verifies the validity of received command
       
    77 // (other items were commented in a header).
       
    78 // -----------------------------------------------------------------------------       
       
    79 //
       
    80 TInt CCommandGetChannelStatus::CheckData()
       
    81     {
       
    82     iLog.Log( _L( "CCommandGetChannelStatus::CheckData" ) );    
       
    83     
       
    84     TInt ret( KErrNone );
       
    85     
       
    86     // None
       
    87 
       
    88     return ret;
       
    89     }
       
    90  
       
    91 
       
    92 // -----------------------------------------------------------------------------
       
    93 // CCommandGetChannelStatus::SendResponse
       
    94 // Creates terminal response according to scripted parameters
       
    95 // (other items were commented in a header).
       
    96 // -----------------------------------------------------------------------------       
       
    97 //
       
    98 TInt CCommandGetChannelStatus::SendResponse()
       
    99     {
       
   100     iLog.Log( _L( "CCommandGetChannelStatus::SendResponse" ) );    
       
   101     
       
   102     TInt ret( KErrNone );
       
   103 
       
   104     // General result
       
   105     SetGeneralResult( iRsp.iGeneralResult );
       
   106     
       
   107     // Additional info & type
       
   108     SetAdditionalInfo( iRsp.iInfoType, iRsp.iAdditionalInfo );
       
   109     
       
   110     if ( KErrNone == ret )
       
   111         {
       
   112         ret = CSatCommandBase::SendResponse( iRspPckg );
       
   113         }
       
   114 
       
   115     return ret;
       
   116     }
       
   117 
       
   118 
       
   119 // End of File