usbmgmt/usbmgr/usbman/server/INC/CUsbDeviceStateWatcher.h
changeset 0 c9bc50fca66e
equal deleted inserted replaced
-1:000000000000 0:c9bc50fca66e
       
     1 /**
       
     2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Talks directly to the USB Logical Device Driver (LDD) and 
       
    16 * watches any state changes
       
    17 * 
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 /**
       
    24  @file
       
    25 */
       
    26 
       
    27 #ifndef __CUSBDEVICESTATEWATCHER_H__
       
    28 #define __CUSBDEVICESTATEWATCHER_H__
       
    29 
       
    30 #include <e32def.h>
       
    31 
       
    32 class CUsbDevice;
       
    33 class RDevUsbcClient;
       
    34 
       
    35 /**
       
    36  * The CUsbDeviceStateWatcher class
       
    37  *
       
    38  * Talks directly to the USB Logical Device Driver (LDD) and 
       
    39  * watches any state changes
       
    40  */
       
    41 NONSHARABLE_CLASS(CUsbDeviceStateWatcher) : public CActive
       
    42 	{
       
    43 public:
       
    44 	static CUsbDeviceStateWatcher* NewL(CUsbDevice& aOwner, RDevUsbcClient& aLdd);
       
    45 	virtual ~CUsbDeviceStateWatcher();
       
    46 
       
    47 	inline CUsbDevice& Owner() const;
       
    48 
       
    49 	// From CActive
       
    50 	virtual void RunL();
       
    51 	virtual void DoCancel();
       
    52 
       
    53 	virtual void Start();
       
    54 
       
    55 protected:
       
    56 	CUsbDeviceStateWatcher(CUsbDevice& aOwner, RDevUsbcClient& aLdd);
       
    57 
       
    58 private:
       
    59 	CUsbDevice& iOwner;
       
    60 	RDevUsbcClient& iLdd;
       
    61 	TUint iState;
       
    62 	};
       
    63 
       
    64 #include "CUsbDeviceStateWatcher.inl"
       
    65 
       
    66 #endif
       
    67