diff -r 28479eeba3fb -r 83036355c0f3 bthci/hci2implementations/hctls/usb_original/hctl/inc/devicestatemanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bthci/hci2implementations/hctls/usb_original/hctl/inc/devicestatemanager.h Thu Oct 14 11:30:12 2010 +0100 @@ -0,0 +1,74 @@ +// Copyright (c) 2007-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: +// + +/** +@file +@internalComponent +*/ + +#ifndef DEVICESTATEMANAGER_H +#define DEVICESTATEMANAGER_H + +#include + +class RUsbInterface; + +NONSHARABLE_CLASS(CInterfaceStateManager) + : public CActive + { +public: + static CInterfaceStateManager* NewL(RUsbInterface& aInterface); + ~CInterfaceStateManager(); + + void Suspend(); + void Resume(); + +private: + CInterfaceStateManager(RUsbInterface& aInterface); + + void RequestSuspend(); + +private: // from CActive + void DoCancel(); + void RunL(); + +private: + RUsbInterface& iInterface; + }; + + +/** +This is the class to control the state of the USB Device. +*/ +NONSHARABLE_CLASS(CDeviceStateManager) + : public CBase + { +public: + static CDeviceStateManager* NewL(RUsbInterface& aAclInterface, RUsbInterface& aScoInterface); + ~CDeviceStateManager(); + + void Suspend(); + void Resume(); + +private: + CDeviceStateManager(); + void ConstructL(RUsbInterface& aAclInterface, RUsbInterface& aScoInterface); + +private: + CInterfaceStateManager* iAclManager; + CInterfaceStateManager* iScoManager; + }; + +#endif // DEVICESTATEMANAGER_H