|
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 CMTPTYPEOBJECT_H |
|
23 #define CMTPTYPEOBJECT_H |
|
24 |
|
25 #include <e32std.h> |
|
26 #include <mtp/cmtptypecompoundbase.h> |
|
27 |
|
28 class CMTPTypeString; |
|
29 |
|
30 /** |
|
31 Defines the MTP ObjectInfo dataset. The ObjectInfo dataset describes the core |
|
32 properties of an MTP data object, and is generated in response to a |
|
33 GetObjectInfo operation request. |
|
34 @publishedPartner |
|
35 @released |
|
36 */ |
|
37 class CMTPTypeObjectInfo : public CMTPTypeCompoundBase |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 MTP ObjectInfo dataset element identifiers. |
|
43 */ |
|
44 enum TMTPObjectInfoElement |
|
45 { |
|
46 /** |
|
47 StorageID. |
|
48 */ |
|
49 EStorageID, |
|
50 |
|
51 /** |
|
52 Object Format. |
|
53 */ |
|
54 EObjectFormat, |
|
55 |
|
56 /** |
|
57 Protection Status. |
|
58 */ |
|
59 EProtectionStatus, |
|
60 |
|
61 /** |
|
62 Object Compressed Size. |
|
63 */ |
|
64 EObjectCompressedSize, |
|
65 |
|
66 /** |
|
67 Thumb Format. |
|
68 */ |
|
69 EThumbFormat, |
|
70 |
|
71 /** |
|
72 Thumb Compressed Size. |
|
73 */ |
|
74 EThumbCompressedSize, |
|
75 |
|
76 /** |
|
77 Thumb Pix Width. |
|
78 */ |
|
79 EThumbPixWidth, |
|
80 |
|
81 /** |
|
82 Thumb Pix Height. |
|
83 */ |
|
84 EThumbPixHeight, |
|
85 |
|
86 /** |
|
87 Image Pix Width. |
|
88 */ |
|
89 EImagePixWidth, |
|
90 |
|
91 /** |
|
92 Image Pix Height. |
|
93 */ |
|
94 EImagePixHeight, |
|
95 |
|
96 /** |
|
97 Image Bit Depth. |
|
98 */ |
|
99 EImageBitDepth, |
|
100 |
|
101 /** |
|
102 Parent Object. |
|
103 */ |
|
104 EParentObject, |
|
105 |
|
106 /** |
|
107 Association Type. |
|
108 */ |
|
109 EAssociationType, |
|
110 |
|
111 /** |
|
112 Association Description. |
|
113 */ |
|
114 EAssociationDescription, |
|
115 |
|
116 /** |
|
117 Sequence Number. |
|
118 */ |
|
119 ESequenceNumber, |
|
120 |
|
121 /** |
|
122 Filename. |
|
123 */ |
|
124 EFilename, |
|
125 |
|
126 /** |
|
127 Date Created. |
|
128 */ |
|
129 EDateCreated, |
|
130 |
|
131 /** |
|
132 Date Modified. |
|
133 */ |
|
134 EDateModified, |
|
135 |
|
136 /** |
|
137 Keywords. |
|
138 */ |
|
139 EKeywords, |
|
140 |
|
141 /** |
|
142 The number of dataset elements. |
|
143 */ |
|
144 ENumElements, |
|
145 }; |
|
146 |
|
147 public: |
|
148 |
|
149 IMPORT_C static CMTPTypeObjectInfo* NewL(); |
|
150 IMPORT_C static CMTPTypeObjectInfo* NewLC(); |
|
151 |
|
152 IMPORT_C virtual ~CMTPTypeObjectInfo(); |
|
153 |
|
154 public: // From MMTPType |
|
155 |
|
156 IMPORT_C TUint Type() const; |
|
157 |
|
158 private: // From CMTPTypeCompoundBase |
|
159 |
|
160 const TElementInfo& ElementInfo(TInt aElementId) const; |
|
161 |
|
162 private: |
|
163 |
|
164 CMTPTypeObjectInfo(); |
|
165 void ConstructL(); |
|
166 |
|
167 MMTPType* NewFlatChunkL(const TElementInfo& aElementInfo); |
|
168 MMTPType* NewStringChunkL(const TElementInfo& aElementInfo); |
|
169 |
|
170 private: |
|
171 |
|
172 /** |
|
173 Data chunk identifiers. |
|
174 */ |
|
175 enum TChunkIds |
|
176 { |
|
177 /** |
|
178 The first flat data chunk ID. |
|
179 */ |
|
180 EIdFlat1Chunk, |
|
181 |
|
182 /** |
|
183 The EFilename element data chunk ID. |
|
184 */ |
|
185 EIdFilenameChunk, |
|
186 |
|
187 /** |
|
188 The EDateCreated element data chunk ID. |
|
189 */ |
|
190 EIdDateCreatedChunk, |
|
191 |
|
192 /** |
|
193 The EDateModified element data chunk ID. |
|
194 */ |
|
195 EIdDateModifiedChunk, |
|
196 |
|
197 /** |
|
198 The EKeywords element data chunk ID. |
|
199 */ |
|
200 EIdKeywordsChunk, |
|
201 |
|
202 /** |
|
203 The number of data chunks. |
|
204 */ |
|
205 EIdNumChunks |
|
206 }; |
|
207 |
|
208 /** |
|
209 The dataset element metadata table content. |
|
210 */ |
|
211 static const CMTPTypeCompoundBase::TElementInfo iElementMetaData[]; |
|
212 |
|
213 /** |
|
214 The dataset element metadata table. |
|
215 */ |
|
216 const TFixedArray<TElementInfo, ENumElements> iElementInfo; |
|
217 |
|
218 /** |
|
219 The size in bytes of the flat data chunk. |
|
220 */ |
|
221 static const TUint KFlatChunkSize; |
|
222 |
|
223 /** |
|
224 The flat data chunk comprising elements EStorageID to EParentObject. |
|
225 */ |
|
226 RMTPTypeCompoundFlatChunk iChunkFlat; |
|
227 |
|
228 /** |
|
229 MTP string type data chunks (EFilename, EDateCreated, EDateModified, and |
|
230 EKeywords). |
|
231 */ |
|
232 RPointerArray<CMTPTypeString> iChunksString; |
|
233 }; |
|
234 |
|
235 #endif // CMTPTYPEOBJECT_H |