usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/inc/ActiveReader.h
changeset 0 c9bc50fca66e
child 48 21625e5de155
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 *
       
    16 */
       
    17 
       
    18 #ifndef __ACTIVEREADER_H__
       
    19 #define __ACTIVEREADER_H__
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <d32usbc.h>
       
    23 
       
    24 class RDevUsbcClient;
       
    25 class MReadObserver;
       
    26 
       
    27 NONSHARABLE_CLASS(CActiveReader) : public CActive
       
    28 /**
       
    29  * Active object to post read requests on the LDD.
       
    30  */
       
    31 	{
       
    32 public: 									  
       
    33 	static CActiveReader* NewL(MReadObserver& aParent, RDevUsbcClient& aLdd, TEndpointNumber aEndpoint);
       
    34 	~CActiveReader();
       
    35 
       
    36 public:
       
    37 	void Read(TDes8& aDes, TInt aLen);
       
    38 
       
    39 private:
       
    40 	CActiveReader(MReadObserver& aParent, RDevUsbcClient& aLdd, TEndpointNumber aEndpoint);
       
    41 
       
    42 private: // from CActive
       
    43 	virtual void DoCancel();
       
    44 	virtual void RunL();
       
    45 
       
    46 private: // unowned
       
    47 	MReadObserver& iParent;
       
    48 	RDevUsbcClient& iLdd;
       
    49 
       
    50 private: // owned
       
    51 	TEndpointNumber iEndpoint;
       
    52 	};
       
    53 
       
    54 #endif // __ACTIVEREADER_H__