|
1 /* |
|
2 * Copyright (c) 2002-2006 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: Class definition of CDmAdDdf. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __DMADDDF_H__ |
|
21 #define __DMADDDF_H__ |
|
22 |
|
23 #include <smldmadapter.h> |
|
24 #include "dmadddfapi.h" |
|
25 #include "dmadcallback.h" |
|
26 #include "DmAdStore.h" |
|
27 #include "version.h" |
|
28 |
|
29 //------------------------------------------------------------------------------------------------ |
|
30 // DDF version |
|
31 //------------------------------------------------------------------------------------------------ |
|
32 _LIT8(KDmAdDdfVersion, "1.0"); |
|
33 |
|
34 //------------------------------------------------------------------------------------------------ |
|
35 // ./NokiaIPSecVPN Type property |
|
36 //------------------------------------------------------------------------------------------------ |
|
37 _LIT8(KDmAdNokiaIpSecVpnRootTypeProperty, "com.nokia.devman/1.0/ipsecvpn"); |
|
38 |
|
39 //------------------------------------------------------------------------------------------------ |
|
40 // ./NokiaIPSecVPN/General/ClientVersion - see version.h |
|
41 //------------------------------------------------------------------------------------------------ |
|
42 //_LIT8(KDmAdClientVersion, "0.0"); |
|
43 |
|
44 //------------------------------------------------------------------------------------------------ |
|
45 // URIs |
|
46 //------------------------------------------------------------------------------------------------ |
|
47 _LIT8(KDmAdOwnAdUriForGetLuidAllocLFix, "NokiaIPSecVPN/Policy"); // URI not object group level? |
|
48 |
|
49 //------- root ----------------- |
|
50 _LIT8(KDmAdNodeNokiaIpSecVpn, "NokiaIPSecVPN"); |
|
51 |
|
52 //------- common ----------------- |
|
53 _LIT8(KDmAdNodeRt, ""); |
|
54 _LIT8(KDmAdNodeGeneral, "General"); |
|
55 |
|
56 _LIT8(KDmAdLeafClientVersion, "ClientVersion"); |
|
57 _LIT8(KDmAdLeafEventLog, "EventLog"); |
|
58 _LIT8(KDmAdLeafName, "Name"); |
|
59 _LIT8(KDmAdLeafId, "ID"); |
|
60 _LIT8(KDmAdLeafContent, "Content"); |
|
61 |
|
62 //------- AP ----------------- |
|
63 _LIT8(KDmAdNodeAp, "AP"); |
|
64 _LIT8(KDmAdNodePolicyRef, "PolicyRef"); |
|
65 _LIT8(KDmAdLeafConRef, "ConRef"); |
|
66 _LIT8(KDmAdLeafThisRef, "ThisRef"); |
|
67 _LIT8(KDmAdLeafUri, "URI"); |
|
68 |
|
69 //------- Policy ----------------- |
|
70 _LIT8(KDmAdNodePolicy, "Policy"); |
|
71 _LIT8(KDmAdLeafVersion, "Version"); |
|
72 _LIT8(KDmAdLeafDescription, "Description"); |
|
73 _LIT8(KDmAdLeafIssuer, "Issuer"); |
|
74 _LIT8(KDmAdLeafContact, "Contact"); |
|
75 |
|
76 //------------------------------------------------------------------------------------------------ |
|
77 // URI descriptions |
|
78 //------------------------------------------------------------------------------------------------ |
|
79 //------- root ----------------- |
|
80 _LIT8(KDmAdDescNodeNokiaIpSecVpn, "NokiaIPSecVPN"); |
|
81 |
|
82 //------- common ----------------- |
|
83 _LIT8(KDmAdDescNodeRt, "Placeholder for one set of settings"); |
|
84 _LIT8(KDmAdDescNodeGeneral, "General"); |
|
85 |
|
86 _LIT8(KDmAdDescLeafClientVersion, "ClientVersion"); |
|
87 _LIT8(KDmAdDescLeafEventLog, "EventLog"); |
|
88 _LIT8(KDmAdDescLeafName, "Name"); |
|
89 _LIT8(KDmAdDescLeafId, "ID"); |
|
90 _LIT8(KDmAdDescLeafContent, "Content"); |
|
91 |
|
92 //------- AP ----------------- |
|
93 _LIT8(KDmAdDescNodeAp, "AP"); |
|
94 _LIT8(KDmAdDescNodePolicyRef, "PolicyRef"); |
|
95 _LIT8(KDmAdDescLeafConRef, "ConRef"); |
|
96 _LIT8(KDmAdDescLeafThisRef, "ThisRef"); |
|
97 _LIT8(KDmAdDescLeafUri, "URI"); |
|
98 |
|
99 //------- Policy ----------------- |
|
100 _LIT8(KDmAdDescNodePolicy, "Policy"); |
|
101 _LIT8(KDmAdDescLeafVersion, "Version"); |
|
102 _LIT8(KDmAdDescLeafDescription, "Description"); |
|
103 _LIT8(KDmAdDescLeafIssuer, "Issuer"); |
|
104 _LIT8(KDmAdDescLeafContact, "Contact"); |
|
105 |
|
106 //------------------------------------------------------------------------------------------------ |
|
107 // ChildURIListL constants |
|
108 //------------------------------------------------------------------------------------------------ |
|
109 _LIT8(KDmAdListOfNokiaIpSecVpnChildren, "General/AP/Policy"); |
|
110 |
|
111 _LIT8(KDmAdListOfPolicyXChildren, "Name/ID/Version/Description/Issuer/Contact/Content"); |
|
112 _LIT8(KDmAdListOfApXChildren, "Name/ThisRef/PolicyRef/ConRef"); |
|
113 |
|
114 _LIT8(KDmAdListOfPolicyRefChildren, "ID/URI"); |
|
115 |
|
116 _LIT8(KDmAdListOfIpSecVpnGeneralChildren, "ClientVersion/EventLog"); |
|
117 |
|
118 |
|
119 |
|
120 //------------------------------------------------------------------------------------------------ |
|
121 // FetchLink URIs |
|
122 //------------------------------------------------------------------------------------------------ |
|
123 _LIT8(KDmAdFetchLinkAp, "AP"); |
|
124 _LIT8(KDmAdFetchLinkSnap, "BearerManagementSNAP"); |
|
125 _LIT8(KDmAdFetchLinkPolicy, "NokiaIPSecVPN/Policy"); |
|
126 |
|
127 //------------------------------------------------------------------------------------------------ |
|
128 // TDFFormat - EBool |
|
129 //------------------------------------------------------------------------------------------------ |
|
130 _LIT8(KDmAdDfFormatBoolTrue, "True" ); |
|
131 _LIT8(KDmAdDfFormatBoolFalse, "False" ); |
|
132 |
|
133 //------------------------------------------------------------------------------------------------ |
|
134 // CDmAdDdf |
|
135 //------------------------------------------------------------------------------------------------ |
|
136 class CDmAdDdf : public CBase, public MDmAdDdfApi |
|
137 { |
|
138 public: |
|
139 static CDmAdDdf* NewL(MDmAdCallBack* aDmAdCallBack, CDmAdStore* aStore); |
|
140 static CDmAdDdf* NewLC(MDmAdCallBack* aDmAdCallBack, CDmAdStore* aStore); |
|
141 ~CDmAdDdf(); |
|
142 |
|
143 void BuildDDFVersionL(CBufBase& aDDFVersion); |
|
144 void BuildDDFStructureL(MSmlDmDDFObject& aDDF); |
|
145 |
|
146 void NotRtNodeAddNodeObjectL(const TDesC8& aUri, const TDesC8& aParentLuid, TInt aStatusRef); |
|
147 void NotRtNodeUpdateLeafObjectL(const TDesC8& aUri, const TDesC8& aLuid, const TDesC8& aObject, const TDesC8& aType, TInt aStatusRef); |
|
148 TInt NotRtNodeFetchLeafObjectLC(const TDesC8& aUri, const TDesC8& /*aLuid*/, const TDesC8& /*aType*/, CBufBase*& aObject); |
|
149 void NotRtNodeDeleteObjectL(const TDesC8& aUri, const TDesC8& aLuid, TInt aStatusRef); |
|
150 |
|
151 TBool IsNodeRtNodeL(const TDesC8& aUri); |
|
152 TBool IsLeafUnderRtNodeL(const TDesC8& aUri); |
|
153 TPtrC8 RtNodeUriForLeafL(const TDesC8& aLeafUri); |
|
154 TBool IsTopLevelRtNode(const TDesC8& aUri); |
|
155 HBufC8* ParentRtNodeUriForRtNodeLC(const TDesC8& aUri); |
|
156 void BuildChildUriListLC(const TDesC8& aUri, const TDesC8& aParentLuid, const CArrayFix<TSmlDmMappingInfo>& aPreviousUriSegmentList, CBufBase*& aCurrentList); |
|
157 |
|
158 private: |
|
159 CDmAdDdf(MDmAdCallBack* aDmAdCallBack, CDmAdStore* aStore); |
|
160 void ConstructL(void); |
|
161 |
|
162 private: |
|
163 MDmAdCallBack* iCallBack; |
|
164 CDmAdStore* iStore; |
|
165 }; |
|
166 |
|
167 #endif |