diff -r 703a2b94c06c -r dde4619868dc usbengines/usbotgwatcher/tsrc/UsbOtgWatcherTest/src/mockcusbidpinobserver.cpp --- a/usbengines/usbotgwatcher/tsrc/UsbOtgWatcherTest/src/mockcusbidpinobserver.cpp Wed Sep 15 13:20:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2010 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: -* -*/ - -#include -#include - -#include "stifassertmacros.h" -#include "mockcusbidpinobserver.h" - -#include "debug.h" -#include "panic.h" - -// --------------------------------------------------------------------------- -// ?description_if_needed -// --------------------------------------------------------------------------- -// -CUsbIdPinObserver::CUsbIdPinObserver() : iIdPinOn(EFalse) - { - } - - -// --------------------------------------------------------------------------- -// ?description_if_needed -// --------------------------------------------------------------------------- -// -void CUsbIdPinObserver::ConstructL() - { - iWait = new ( ELeave )CActiveSchedulerWait(); - } - -CUsbIdPinObserver* CUsbIdPinObserver::NewL() - { - LOG( "[USBOTGWATCHER]\tMockCUsbIdPinObserver::NewL" ); - - CUsbIdPinObserver* self = new( ELeave ) CUsbIdPinObserver(); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// ?description_if_needed -// --------------------------------------------------------------------------- -// -CUsbIdPinObserver::~CUsbIdPinObserver() - { - LOG( ( "[USBOTGWATCHER]\tMockCUsbIdPinObserver::~CUsbIdPinObserver" ) ); - } - -// --------------------------------------------------------------------------- -// ?description_if_needed -// --------------------------------------------------------------------------- -// -CUsbIdPinObserver::TState CUsbIdPinObserver::IdPin() /* const! But for some reason RProperty::Get is not const! */ - { - // not found in Symbian docs clear definition of this property. Verification is needed - return (0 == iIdPinOn? EIdPinOff : EIdPinOn); - } - - -void CUsbIdPinObserver::SubscribeL(MUsbIdPinObserver& aObserver) - { - //iLog->Log(_L("[USBOTGWATCHER] >>MockCUsbIdPinObserver::SubscribeL")); - LOG(("[USBOTGWATCHER]\tMockCUsbIdPinObserver::SubscribeL")); - STIF_ASSERT_NOT_NULL(&aObserver); - - iObserver = &aObserver; - - //iLog->Log(_L("[USBOTGWATCHER] <IdPinOnL(); - LOG(("[USBOTGWATCHER] <IdPinOffL(); - }