|
1 /* |
|
2 * Copyright (c) 2009-2010 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 * Declaration of embedded destination interface implementation |
|
16 * for "Embedded Destination" plugin |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef EMBEDDEDDESTINATION_PLUGIN_H |
|
21 #define EMBEDDEDDESTINATION_PLUGIN_H |
|
22 |
|
23 #include <cmpluginbaseeng.h> |
|
24 #include <cmpluginembdestinationdef.h> |
|
25 |
|
26 /** |
|
27 * CCmPluginEmbDestination defines the functionality of Embedded Destination(ED) |
|
28 * bearer support. |
|
29 * Most of the API is inherited from CCmPluginBaseEng class. |
|
30 */ |
|
31 NONSHARABLE_CLASS( CCmPluginEmbDestination ) : public CCmPluginBaseEng |
|
32 { |
|
33 public: // Constructors and destructor |
|
34 /** |
|
35 * Two phased constructor. |
|
36 * @return Returns the ED plugin object. |
|
37 */ |
|
38 static CCmPluginEmbDestination* NewL( TCmPluginInitParam* aInitParam ); |
|
39 |
|
40 /** |
|
41 * Destructor. |
|
42 */ |
|
43 virtual ~CCmPluginEmbDestination(); |
|
44 |
|
45 public: // From CCmPluginBaseEng |
|
46 /** |
|
47 * Creates a new instance of ED bearer plugin. The instance |
|
48 * created represents a bearer, not a particular ED. |
|
49 * @param aInitParam Initialization data. |
|
50 * @return Returns CCmPluginBaseEng type pointer which represents pure |
|
51 * bearer instance for the cmm server. |
|
52 */ |
|
53 virtual CCmPluginBaseEng* CreateInstanceL( |
|
54 TCmPluginInitParam& aInitParam ) const; |
|
55 |
|
56 /** |
|
57 * Following GetBearerInfoXXXL methods return the values of the |
|
58 * requested attributes. These values are ED specific |
|
59 * so they don't vary between EDs. |
|
60 * @param aAttribute An attribute identifier. |
|
61 * @return Returns the value requested. If not found leaves with |
|
62 * KErrNotFound error code. |
|
63 */ |
|
64 |
|
65 virtual TUint32 GetBearerInfoIntL( TUint32 aAttribute ) const; |
|
66 |
|
67 virtual TBool GetBearerInfoBoolL( TUint32 aAttribute ) const; |
|
68 |
|
69 virtual HBufC* GetBearerInfoStringL( TUint32 aAttribute ) const; |
|
70 |
|
71 virtual HBufC8* GetBearerInfoString8L( TUint32 aAttribute ) const; |
|
72 |
|
73 /** |
|
74 * Does not do anything. Embedded destination does not support this |
|
75 * functionality. |
|
76 * @return Returns always EFalse. |
|
77 */ |
|
78 virtual TBool CanHandleIapIdL( TUint32 aIapId ) const; |
|
79 |
|
80 /** |
|
81 * Does not do anything. Embedded destination does not support this |
|
82 * functionality. |
|
83 * @return Returns always EFalse. |
|
84 */ |
|
85 virtual TBool CanHandleIapIdL( |
|
86 CommsDat::CCDIAPRecord* aIapRecord ) const; |
|
87 |
|
88 public: // From CCmPluginBaseEng |
|
89 /** |
|
90 * Following methods do not do anything. Embedded destination does not |
|
91 * support these functionalities. |
|
92 */ |
|
93 virtual void PreparePluginToLoadRecordsL(); |
|
94 |
|
95 virtual void PreparePluginToUpdateRecordsL( |
|
96 RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray, |
|
97 RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ); |
|
98 |
|
99 virtual void CreateServiceRecordL(); |
|
100 |
|
101 void LoadServiceRecordL(); |
|
102 |
|
103 virtual TUint32 ServiceRecordId() const; |
|
104 |
|
105 virtual void ServiceRecordNameLC( HBufC* &aServiceName ); |
|
106 |
|
107 virtual void UpdateServiceRecordL( |
|
108 RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray, |
|
109 RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ); |
|
110 |
|
111 virtual void CreateBearerRecordsL(); |
|
112 |
|
113 virtual void LoadBearerRecordsL(); |
|
114 |
|
115 virtual void BearerRecordIdL( TUint32& aRecordId ); |
|
116 |
|
117 virtual void BearerRecordNameLC( HBufC*& aBearerName ); |
|
118 |
|
119 virtual void UpdateBearerRecordsL( |
|
120 RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray, |
|
121 RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ); |
|
122 |
|
123 void DeleteBearerRecordsL(); |
|
124 |
|
125 virtual void ResetBearerRecords(); |
|
126 |
|
127 virtual void GetBearerSpecificRecordsL( |
|
128 RPointerArray<CommsDat::CCDRecordBase>& aRecordArray ); |
|
129 |
|
130 /** |
|
131 * Following GetBearerXXXXAttribute methods get only the |
|
132 * fields in records in pointer arrays(parameters). |
|
133 * @param aAttribute Identifier of the requested value. |
|
134 * @param aGenRecordArray An array containing pointers to generic |
|
135 * records of the Connection Method. |
|
136 * @param aBearerSpecRecordArray An array containing pointers to bearer |
|
137 * specific records of the Connection Method. aAttribute |
|
138 * parameter should identify one field(integer, boolean string) |
|
139 * in one of these records. |
|
140 * @return Returns the requested value. In error case leaves with |
|
141 * system-wide error code. |
|
142 */ |
|
143 |
|
144 virtual TUint32 GetBearerIntAttributeL( |
|
145 TUint32 aAttribute, |
|
146 RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray, |
|
147 RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ); |
|
148 |
|
149 virtual TBool GetBearerBoolAttributeL( |
|
150 TUint32 aAttribute, |
|
151 RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray, |
|
152 RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ); |
|
153 |
|
154 virtual HBufC* GetBearerStringAttributeL( |
|
155 TUint32 aAttribute, |
|
156 RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray, |
|
157 RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ); |
|
158 |
|
159 virtual HBufC8* GetBearerString8AttributeL( |
|
160 TUint32 aAttribute, |
|
161 RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray, |
|
162 RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ); |
|
163 |
|
164 /** |
|
165 * Following SetBearerXXXXAttribute methods set only the |
|
166 * fields in records in pointer arrays(parameters). They are not |
|
167 * allowed to update the original records in plugins. |
|
168 * @param aAttribute Identifier of the field to set. |
|
169 * @param aValue The value to set. |
|
170 * @param aGenRecordArray An array containing pointers to generic |
|
171 * records of the Connection Method. |
|
172 * @param aBearerSpecRecordArray An array containing pointers to bearer |
|
173 * specific records of the Connection Method. aAttribute |
|
174 * parameter should identify one field(integer, boolean string) |
|
175 * in one of these records. |
|
176 * @return None. |
|
177 */ |
|
178 |
|
179 virtual void SetBearerIntAttributeL( |
|
180 TUint32 aAttribute, TUint32 aValue, |
|
181 RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray, |
|
182 RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ); |
|
183 |
|
184 virtual void SetBearerBoolAttributeL( |
|
185 TUint32 aAttribute, TBool aValue, |
|
186 RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray, |
|
187 RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ); |
|
188 |
|
189 virtual void SetBearerStringAttributeL( |
|
190 TUint32 aAttribute, const TDesC16& aValue, |
|
191 RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray, |
|
192 RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ); |
|
193 |
|
194 virtual void SetBearerString8AttributeL( |
|
195 TUint32 aAttribute, const TDesC8& aValue, |
|
196 RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray, |
|
197 RPointerArray<CommsDat::CCDRecordBase>& aBearerSpecRecordArray ); |
|
198 |
|
199 /** |
|
200 * Bearer is requested by the server if it uses CommsDat tables which |
|
201 * should be observed for possible changes to be able to keep the |
|
202 * data in memory in up to date. |
|
203 * @param aTableIdArray A reference to an array where to add those |
|
204 * table ids. |
|
205 */ |
|
206 virtual void GetBearerTableIdsToBeObservedL( |
|
207 RArray<TUint32>& aTableIdArray ) const; |
|
208 |
|
209 private: // From CCmPluginBaseEng |
|
210 |
|
211 /** |
|
212 * Following methods do not do anything. Embedded destination does not |
|
213 * support these functionalities. |
|
214 */ |
|
215 virtual void PrepareToCopyDataL( CCmPluginBaseEng* aCopyInstance ); |
|
216 |
|
217 CommsDat::CCDRecordBase* CopyServiceRecordL(); |
|
218 |
|
219 virtual void CopyBearerRecordsL( CCmPluginBaseEng* aCopyInstance ); |
|
220 |
|
221 private: // Constructors |
|
222 /** |
|
223 * Constructor. |
|
224 */ |
|
225 CCmPluginEmbDestination( TCmPluginInitParam* aInitParam ); |
|
226 |
|
227 /** |
|
228 * Second phase constructor. Leaves on failure. |
|
229 */ |
|
230 void ConstructL(); |
|
231 |
|
232 /** |
|
233 * Gets the protection level of this destination. |
|
234 * @param aProtLevel Parameter to return the protection level. |
|
235 */ |
|
236 void ProtectionLevelL( TUint32& aProtLevel ); |
|
237 |
|
238 /** |
|
239 * Gets the information if this destination is hidden or not. |
|
240 */ |
|
241 void IsHiddenL( TBool& aHidden ); |
|
242 |
|
243 private: |
|
244 /** |
|
245 * Element id of SNAP metadata record |
|
246 */ |
|
247 CommsDat::TMDBElementId iDestMetadataTableId; |
|
248 }; |
|
249 |
|
250 #endif // EMBEDDEDDESTINATION_PLUGIN_H |