adaptationlayer/tsy/simatktsy_dll/internal/test/simatktsy_testtool/simatk/src/commandgetchannelstatus.cpp
/*
* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: GetChannelStatus specific test class. Inherits CCommandBase.
*
*/
// INCLUDE FILES
#include <stifparser.h>
#include "commandgetchannelstatus.h"
// -----------------------------------------------------------------------------
// CCommandGetChannelStatus::CCommandGetChannelStatus
// C++ default constructor can NOT contain any code, that
// might leave.
// -----------------------------------------------------------------------------
//
CCommandGetChannelStatus::CCommandGetChannelStatus
(
const TSatIpc aIpc,
const RSat& aSat,
CStifItemParser& aParser,
CStifLogger& aLog
) : CSatCommandBase ( aIpc, aSat, aParser, aLog, RSat::EGetChannelStatus ),
iDataPckg( iData ),
iRspPckg( iRsp )
{
}
// -----------------------------------------------------------------------------
// CCommandGetChannelStatus::~CCommandGetChannelStatus
// Destructor
// -----------------------------------------------------------------------------
//
CCommandGetChannelStatus::~CCommandGetChannelStatus()
{
}
// -----------------------------------------------------------------------------
// CCommandGetChannelStatus::NotifySat
// Send a notify request to Etel and clear internal data
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
TInt CCommandGetChannelStatus::NotifySat
(
TRequestStatus& aSimAtkStatus
)
{
TInt ret( KErrNone );
// Clear the packages
Init( iData );
Init( iRsp );
iSat.NotifyGetChannelStatusPCmd( aSimAtkStatus, iDataPckg );
return ret;
}
// -----------------------------------------------------------------------------
// CCommandGetChannelStatus::CheckData
// Verifies the validity of received command
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
TInt CCommandGetChannelStatus::CheckData()
{
iLog.Log( _L( "CCommandGetChannelStatus::CheckData" ) );
TInt ret( KErrNone );
// None
return ret;
}
// -----------------------------------------------------------------------------
// CCommandGetChannelStatus::SendResponse
// Creates terminal response according to scripted parameters
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
TInt CCommandGetChannelStatus::SendResponse()
{
iLog.Log( _L( "CCommandGetChannelStatus::SendResponse" ) );
TInt ret( KErrNone );
// General result
SetGeneralResult( iRsp.iGeneralResult );
// Additional info & type
SetAdditionalInfo( iRsp.iInfoType, iRsp.iAdditionalInfo );
if ( KErrNone == ret )
{
ret = CSatCommandBase::SendResponse( iRspPckg );
}
return ret;
}
// End of File