usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/inc/RequestHeader.h
equal
deleted
inserted
replaced
|
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 __REQUESTHEADER_H__ |
|
19 #define __REQUESTHEADER_H__ |
|
20 |
|
21 #include <e32std.h> |
|
22 |
|
23 const TUint KUsbRequestHdrSize = 8; ///< Size of the request header |
|
24 |
|
25 NONSHARABLE_CLASS(TUsbRequestHdr) ///< Class-specific header structure |
|
26 { |
|
27 public: |
|
28 TUint8 iRequestType; ///< Request type |
|
29 TUint8 iRequest; ///< Request number |
|
30 TUint16 iValue; ///< Request value |
|
31 TUint16 iIndex; ///< Request index |
|
32 TUint16 iLength; ///< Request length |
|
33 |
|
34 public: |
|
35 static TInt Decode(const TDesC8& aBuffer, TUsbRequestHdr& aTarget); |
|
36 const TDesC8& Des(); |
|
37 TBool IsDataResponseRequired() const; |
|
38 |
|
39 private: |
|
40 TBuf8<KUsbRequestHdrSize> iBuffer; |
|
41 }; |
|
42 |
|
43 #endif // __REQUESTHEADER_H__ |