bthci/hci2implementations/hctls/usb_original/hctl/inc/devicestatemanager.h
changeset 27 83036355c0f3
equal deleted inserted replaced
4:28479eeba3fb 27:83036355c0f3
       
     1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // 
       
    15 
       
    16 /**
       
    17 @file
       
    18 @internalComponent
       
    19 */
       
    20 
       
    21 #ifndef DEVICESTATEMANAGER_H
       
    22 #define DEVICESTATEMANAGER_H
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 class RUsbInterface;
       
    27 
       
    28 NONSHARABLE_CLASS(CInterfaceStateManager)
       
    29 	: public CActive
       
    30 	{
       
    31 public:
       
    32 	static CInterfaceStateManager* NewL(RUsbInterface& aInterface);
       
    33 	~CInterfaceStateManager();
       
    34 	
       
    35 	void Suspend();
       
    36 	void Resume();
       
    37 	
       
    38 private:
       
    39 	CInterfaceStateManager(RUsbInterface& aInterface);
       
    40 	
       
    41 	void RequestSuspend();
       
    42 	
       
    43 private: // from CActive
       
    44 	void DoCancel();
       
    45 	void RunL();
       
    46 	
       
    47 private:
       
    48 	RUsbInterface& iInterface;
       
    49 	};
       
    50 
       
    51 
       
    52 /**
       
    53 This is the class to control the state of the USB Device.
       
    54 */
       
    55 NONSHARABLE_CLASS(CDeviceStateManager) 
       
    56 	: public CBase
       
    57 	{
       
    58 public:
       
    59 	static CDeviceStateManager* NewL(RUsbInterface& aAclInterface, RUsbInterface& aScoInterface);
       
    60 	~CDeviceStateManager();
       
    61 	
       
    62 	void Suspend();
       
    63 	void Resume();
       
    64 	
       
    65 private:
       
    66 	CDeviceStateManager();
       
    67 	void ConstructL(RUsbInterface& aAclInterface, RUsbInterface& aScoInterface);
       
    68 	
       
    69 private:
       
    70 	CInterfaceStateManager* iAclManager;
       
    71 	CInterfaceStateManager* iScoManager;
       
    72 	};
       
    73 
       
    74 #endif // DEVICESTATEMANAGER_H