|
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 |
|
23 #ifndef CMTPTYPESERVICEPROP_H_ |
|
24 #define CMTPTYPESERVICEPROP_H_ |
|
25 |
|
26 #include <e32std.h> |
|
27 #include <mtp/cmtptypecompoundbase.h> |
|
28 #include <mtp/cmtptypelist.h> |
|
29 #include <mtp/cmtptypeserviceproplist.h> |
|
30 |
|
31 class CMTPTypeString; |
|
32 class CMTPTypeServicePropertyElement; |
|
33 |
|
34 class CMTPTypeServicePropertyList : public CMTPTypeList |
|
35 { |
|
36 public: |
|
37 |
|
38 IMPORT_C static CMTPTypeServicePropertyList* NewL(); |
|
39 IMPORT_C static CMTPTypeServicePropertyList* NewLC(); |
|
40 |
|
41 IMPORT_C virtual ~CMTPTypeServicePropertyList(); |
|
42 |
|
43 IMPORT_C void AppendL(CMTPTypeServicePropertyElement* aElement); |
|
44 |
|
45 IMPORT_C CMTPTypeServicePropertyElement& ElementL(TUint aIndex) const; |
|
46 |
|
47 private: |
|
48 |
|
49 CMTPTypeServicePropertyList(); |
|
50 void ConstructL(); |
|
51 |
|
52 }; |
|
53 |
|
54 class CMTPTypeServicePropertyElement : public CMTPTypeCompoundBase |
|
55 { |
|
56 public: |
|
57 |
|
58 enum TMTPServicePropertyElement |
|
59 { |
|
60 EPropertyCode, |
|
61 ENameSpace, |
|
62 EPkeyID, |
|
63 EPorpertyName, |
|
64 ENumElements |
|
65 }; |
|
66 |
|
67 public: |
|
68 |
|
69 IMPORT_C static CMTPTypeServicePropertyElement* NewL(); |
|
70 IMPORT_C static CMTPTypeServicePropertyElement* NewLC(); |
|
71 IMPORT_C static CMTPTypeServicePropertyElement* NewL(const TUint16 aPropertyCode, const TMTPTypeGuid& aNameSpace,const TUint32 aPKeyID, const TDesC& aPropertyName); |
|
72 IMPORT_C static CMTPTypeServicePropertyElement* NewLC(const TUint16 aPropertyCode, const TMTPTypeGuid& aNameSpace,const TUint32 aPKeyID, const TDesC& aPropertyName); |
|
73 |
|
74 IMPORT_C virtual ~CMTPTypeServicePropertyElement(); |
|
75 |
|
76 public: // From CMTPTypeCompoundBase |
|
77 |
|
78 IMPORT_C TUint Type() const; |
|
79 |
|
80 private: // From CMTPTypeCompoundBase |
|
81 |
|
82 const TElementInfo& ElementInfo(TInt aElementId) const; |
|
83 |
|
84 private: |
|
85 |
|
86 CMTPTypeServicePropertyElement(); |
|
87 void ConstructL(); |
|
88 |
|
89 void ConstructL(const TUint16 aPropertyCode, const TMTPTypeGuid& aNameSpace,const TUint32 aPKeyID, const TDesC& aPropertyName); |
|
90 MMTPType* NewFlatChunkL(); |
|
91 |
|
92 private: |
|
93 |
|
94 |
|
95 /** |
|
96 Data chunk identifiers. |
|
97 */ |
|
98 enum TChunkIds |
|
99 { |
|
100 /** |
|
101 The flat data chunk ID. |
|
102 */ |
|
103 EIdFlatChunk, |
|
104 |
|
105 |
|
106 EIdServicePropNameChunk, |
|
107 /** |
|
108 The number of data chunks. |
|
109 */ |
|
110 EIdNumChunks |
|
111 }; |
|
112 |
|
113 |
|
114 /** |
|
115 The dataset element metadata table content. |
|
116 */ |
|
117 static const CMTPTypeCompoundBase::TElementInfo iElementMetaData[]; |
|
118 |
|
119 /** |
|
120 The dataset element metadata table. |
|
121 */ |
|
122 const TFixedArray<TElementInfo, ENumElements> iElementInfo; |
|
123 |
|
124 /** |
|
125 The flat data chunk comprising elements EStorageType to EFreeSpaceInObjects. |
|
126 */ |
|
127 RMTPTypeCompoundFlatChunk iChunkFlat; |
|
128 |
|
129 /** |
|
130 The MTP string type data chunks (EStorageDescription, and EVolumeIdentifier). |
|
131 */ |
|
132 CMTPTypeString* iChunkString; |
|
133 }; |
|
134 |
|
135 #endif /*CMTPTYPESERVICEPROP_H_*/ |