First public contribution.
5 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
7 * This component and the accompanying materials are made available
8 * under the terms of the License "Eclipse Public License v1.0"
9 * which accompanies this distribution, and is available
10 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
12 * Initial Contributors:
13 * Nokia Corporation - initial contribution.
26 #include "controlendpointreader.h"
27 #include "endpointwriter.h"
29 namespace NUnitTesting_USBDI
33 This class describes a processor for device directed requests and associated data
36 class CDeviceEndpoint0 : public CBase
42 @return a pointer to a new instance of control Ep0 reader
45 static CDeviceEndpoint0* NewL(MRequestHandler& aRequestHandler);
54 Starts this reader receiving device directed ep0 requests
55 @return KErrNone if successful or system wide error code
61 Stops this reader receiving device directed ep0 requests
62 @return KErrNone if successful or system wide error code
67 Send data back to the host through endpoint 0
68 @param aData the descriptor with the data to send back
70 void SendData(const TDesC8& aData);
73 Send data back to the host through endpoint 0 and do not return until completion
74 @param aData the descriptor with the data to send back
76 TInt SendDataSynchronous(const TDesC8& aData);
79 Access the reader object for this control endpoint 0
81 CControlEndpointReader& Reader();
86 Constructor, build a reader for control endpoint 0
95 void ConstructL(MRequestHandler& aRequestHandler);
100 The channel to the USB client driver
103 RDevUsbcClient iClientDriver;
106 The endpoint reader for endpoint 0
109 CControlEndpointReader* iEndpoint0Reader;
112 The endpoint writer for endpoint 0
115 CEndpointWriter* iEndpoint0Writer;