|
1 // Copyright (c) 2006-2009 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 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef TMTPTYPERESPONSE_H |
|
23 #define TMTPTYPERESPONSE_H |
|
24 |
|
25 #include <mtp/tmtptypeflatbase.h> |
|
26 |
|
27 /** |
|
28 Defines the MTP operation response dataset. This dataset is stored in a |
|
29 contiguous flat buffer to optimise data transfer to/from the MTP transport |
|
30 layer. |
|
31 @publishedPartner |
|
32 @released |
|
33 */ |
|
34 class TMTPTypeResponse : public TMTPTypeFlatBase |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 MTP operation response dataset element identifiers. |
|
40 */ |
|
41 enum TElements |
|
42 { |
|
43 /** |
|
44 ResponseCode. |
|
45 */ |
|
46 EResponseCode, |
|
47 |
|
48 /** |
|
49 SessionID. |
|
50 */ |
|
51 EResponseSessionID, |
|
52 |
|
53 /** |
|
54 TransactionID |
|
55 */ |
|
56 EResponseTransactionID, |
|
57 |
|
58 /** |
|
59 Parameter 1. |
|
60 */ |
|
61 EResponseParameter1, |
|
62 |
|
63 /** |
|
64 Parameter 2. |
|
65 */ |
|
66 EResponseParameter2, |
|
67 |
|
68 /** |
|
69 Parameter 3. |
|
70 */ |
|
71 EResponseParameter3, |
|
72 |
|
73 /** |
|
74 Parameter 4. |
|
75 */ |
|
76 EResponseParameter4, |
|
77 |
|
78 /** |
|
79 Parameter 5. |
|
80 */ |
|
81 EResponseParameter5, |
|
82 |
|
83 /** |
|
84 The number of dataset elements. |
|
85 */ |
|
86 ENumElements, |
|
87 }; |
|
88 |
|
89 public: |
|
90 |
|
91 IMPORT_C TMTPTypeResponse(); |
|
92 IMPORT_C TMTPTypeResponse(const TMTPTypeResponse& aResponse); |
|
93 |
|
94 public: // From TMTPTypeFlatBase |
|
95 |
|
96 IMPORT_C TUint Type() const; |
|
97 |
|
98 private: // From TMTPTypeFlatBase |
|
99 |
|
100 IMPORT_C const TMTPTypeFlatBase::TElementInfo& ElementInfo(TInt aElementId) const; |
|
101 |
|
102 private: |
|
103 |
|
104 /** |
|
105 The dataset size in bytes. |
|
106 */ |
|
107 static const TInt KSize = 30; |
|
108 |
|
109 /** |
|
110 The dataset element metadata table content. |
|
111 */ |
|
112 static const TMTPTypeFlatBase::TElementInfo iElementMetaData[]; |
|
113 |
|
114 /** |
|
115 The dataset element metadata table. |
|
116 */ |
|
117 const TFixedArray<TElementInfo, ENumElements> iElementInfo; |
|
118 |
|
119 /** |
|
120 The data buffer. |
|
121 */ |
|
122 TBuf8<KSize> iBuffer; |
|
123 }; |
|
124 |
|
125 #endif // TMTPTYPERESPONSE_H |
|
126 |