diff -r 7fdc9a71d314 -r 8ad140f3dd41 hti/HtiServicePlugins/HtiStifTfServicePlugin/src/HtiStifTfServicePlugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hti/HtiServicePlugins/HtiStifTfServicePlugin/src/HtiStifTfServicePlugin.cpp Wed Oct 13 16:17:58 2010 +0300 @@ -0,0 +1,131 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: Implements the ECom plugin for HTI STIF Test Framework control +* service. +* +*/ + + + +// INCLUDE FILES +#include +#include +#include + +#include "HtiStifTfServicePlugin.h" +#include "HtiStifTfIf.h" + +// EXTERNAL DATA STRUCTURES + +// EXTERNAL FUNCTION PROTOTYPES + +// CONSTANTS + +// MACROS + +// LOCAL CONSTANTS AND MACROS + +// MODULE DATA STRUCTURES + +// LOCAL FUNCTION PROTOTYPES + +// FORWARD DECLARATIONS + +// ============================= LOCAL FUNCTIONS =============================== + +// ============================ MEMBER FUNCTIONS =============================== + +// ----------------------------------------------------------------------------- +// CHtiStifTfServicePlugin::CHtiStifTfServicePlugin +// C++ default constructor can NOT contain any code, that might leave. +// ----------------------------------------------------------------------------- +// +CHtiStifTfServicePlugin::CHtiStifTfServicePlugin() + { + } + + +// ----------------------------------------------------------------------------- +// CHtiStifTfServicePlugin::ConstructL +// Symbian 2nd phase constructor can leave. +// ----------------------------------------------------------------------------- +// +void CHtiStifTfServicePlugin::ConstructL() + { + iStifTfInterface = CHtiStifTfIf::NewL( this ); + } + + +// ----------------------------------------------------------------------------- +// CHtiStifTfServicePlugin::NewL +// Two-phased constructor. +// ----------------------------------------------------------------------------- +// +CHtiStifTfServicePlugin* CHtiStifTfServicePlugin::NewL() + { + CHtiStifTfServicePlugin* self = new (ELeave) CHtiStifTfServicePlugin; + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + + +// Destructor +CHtiStifTfServicePlugin::~CHtiStifTfServicePlugin() + { + delete iStifTfInterface; + } + + +// ----------------------------------------------------------------------------- +// CHtiStifTfServicePlugin::ProcessMessageL +// Sends the message to be processed by the class implementing the STIF TF +// interface. +// ----------------------------------------------------------------------------- +// +void CHtiStifTfServicePlugin::ProcessMessageL( const TDesC8& aMessage, + THtiMessagePriority aPriority) + { + HTI_LOG_FUNC_IN( "CHtiStifTfServicePlugin::ProcessMessageL" ); + iStifTfInterface->SetDispatcher( iDispatcher ); + iStifTfInterface->ProcessMessageL( aMessage, aPriority ); + HTI_LOG_FUNC_OUT( "CHtiStifTfServicePlugin::ProcessMessageL" ); + } + + +// ----------------------------------------------------------------------------- +// CHtiStifTfServicePlugin::NotifyMemoryChange +// Just forwards the call to the HtiStifTwIf instance. +// ----------------------------------------------------------------------------- +// +void CHtiStifTfServicePlugin::NotifyMemoryChange( TInt aAvailableMemory ) + { + iStifTfInterface->NotifyMemoryChange( aAvailableMemory ); + } + + +// ----------------------------------------------------------------------------- +// CHtiStifTfServicePlugin::IsBusy +// ----------------------------------------------------------------------------- +// +TBool CHtiStifTfServicePlugin::IsBusy() + { + return iStifTfInterface->iIsBusy; + } + + +// ========================== OTHER EXPORTED FUNCTIONS ========================= + +// End of File