|
1 /* |
|
2 * Copyright (c) 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: Configuration implementation of this SSY |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <sensrvsensorchannels.h> |
|
20 #include <sensrvchanneldatatypes.h> |
|
21 #include <sensrvtypes.h> |
|
22 #include <f32file.h> |
|
23 #include <gmxmldocument.h> |
|
24 #include <gmxmlelement.h> |
|
25 |
|
26 #include "ssyreferencecontrol.h" |
|
27 #include "ssyreferenceconfig.h" |
|
28 #include "ssyreferencetrace.h" |
|
29 |
|
30 |
|
31 // ======== CONSTANTS ======= |
|
32 _LIT( KSsyReferenceCfgFileOrig, "Z:\\private\\1020507E\\reference\\SsyReferenceConfig.xml" ); |
|
33 _LIT( KSsyReferenceCfgFileExt, "C:\\ssyreference\\SsyReferenceConfig.xml" ); |
|
34 |
|
35 // Config file definitions |
|
36 |
|
37 // Maximum attribute lenghth |
|
38 const TInt KSsyRefMaxAttribLength = 20; |
|
39 |
|
40 // TAG DEFINITIONS |
|
41 _LIT( KSsyRefRootTag, "SsyReferenceConfig" ); // Ssy general information tag |
|
42 _LIT( KSsyRefGeneralInfoTag, "SsyGeneralInformation" ); // Ssy general information tag |
|
43 _LIT( KSsyRefChannelInfoGroupTag, "ChannelInformationGroup" ); // Channel information group tag |
|
44 _LIT( KSsyRefChannelItemTag, "ChannelItem" ); // Channel item tag |
|
45 _LIT( KSsyRefChannelDataTag, "ChannelData" ); // Channel data tag |
|
46 _LIT( KSsyRefChannelDataItemTag, "ChannelDataItem" ); // Channel data item tag |
|
47 |
|
48 _LIT( KSsyRefProperties, "Properties" ); // Properties tag |
|
49 _LIT( KSsyRefPropertyItem, "PropertyItem" ); // PropertyItem tag |
|
50 |
|
51 // Data item definitions |
|
52 _LIT( KSsyRefAxisDataItemTag, "SsyRefChannelDataAxis" ); // SsyRefChannelDataAxis data item tag |
|
53 _LIT( KSsyRefXAxis, "XAxis" ); // XAxis from SsyRefChannelDataAxis |
|
54 _LIT( KSsyRefYAxis, "YAxis" ); // YAxis from SsyRefChannelDataAxis |
|
55 _LIT( KSsyRefZAxis, "ZAxis" ); // ZAxis from SsyRefChannelDataAxis |
|
56 |
|
57 _LIT( KSsyRefTappingDataItemTag, "SsyRefChannelDataTapping" ); // SsyRefChannelDataTapping data item tag |
|
58 _LIT( KSsyRefDirection, "Direction" ); // Direction from SsyRefChannelDataTapping |
|
59 |
|
60 _LIT( KSsyRefProximityDataItemTag, "SsyRefChannelDataProximity" ); // SsyRefChannelDataProximity data item tag |
|
61 _LIT( KSsyRefProximityState, "ProximityState" ); // ProximityStatus from SsyRefChannelDataProximity |
|
62 |
|
63 _LIT( KSsyRefAmbientLightDataItemTag, "SsyRefChannelDataAmbientLight" ); // SsyRefChannelDataAmbientLight data item tag |
|
64 _LIT( KSsyRefAmbientLightState, "AmbientLightState" ); // AmbientLightStatus from SsyRefChannelDataAmbientLight |
|
65 |
|
66 _LIT( KSsyRefMagneticAxisDataItemTag, "SsyRefChannelDataMagneticAxis" ); // SsyRefChannelDataMagneticAxis data item tag |
|
67 _LIT( KSsyRefXAxisCalib, "XAxisCalib" ); // XAxis from SsyRefChannelDataMagneticAxis |
|
68 _LIT( KSsyRefYAxisCalib, "YAxisCalib" ); // YAxis from SsyRefChannelDataMagneticAxis |
|
69 _LIT( KSsyRefZAxisCalib, "ZAxisCalib" ); // ZAxis from SsyRefChannelDataMagneticAxis |
|
70 |
|
71 // ATTRIBUTE DEFINITIONS |
|
72 _LIT( KSsyRefChannelCount, "ChannelCount" ); // Channel count from ChannelInformationGroup |
|
73 _LIT( KSsyRefChannelId, "ChannelId" ); // Channel ID from ChannelItem |
|
74 _LIT( KSsyRefContextType, "ContextType" ); // Context type from ChannelItem |
|
75 _LIT( KSsyRefQuantity, "Quantity" ); // Quantity from ChannelItem |
|
76 _LIT( KSsyRefChannelType, "ChannelType" ); // ChannelType from ChannelItem |
|
77 _LIT( KSsyRefLocation, "Location" ); // Location from ChannelItem |
|
78 _LIT( KSsyRefVendorId, "Vendor" ); // Vendor from ChannelItem |
|
79 |
|
80 |
|
81 // Channel data item specific attribute definitions |
|
82 _LIT( KSsyRefStartInterval, "StartIntervalMs" ); // StartInterval from ChannelData |
|
83 _LIT( KSsyRefDataItemCount, "count" ); // count from ChannelDataItem |
|
84 _LIT( KSsyRefDataTypeID, "DataTypeId" ); // DataTypeId from ChannelDataItem |
|
85 _LIT( KSsyRefInterval, "IntervalMs" ); // IntervalMs from ChannelDataItem |
|
86 |
|
87 // Property spesific attributes |
|
88 _LIT( KSsyRefPropertyId, "PropertyId" ); // PropertyId from PropertyItem |
|
89 _LIT( KSsyRefArrayIndex, "ArrayIndex" ); // ArrayIndex from PropertyItem |
|
90 _LIT( KSsyRefItemIndex, "ItemIndex" ); // ItemIndex from PropertyItem |
|
91 _LIT( KSsyRefPropertyValue, "PropertyValue" ); // PropertyValue from PorpertyItem |
|
92 _LIT( KSsyRefPropertyType, "PropertyType" ); // PropertyType from PropertyItem |
|
93 _LIT( KSsyRefMaxValue, "MaxValue" ); // MaxValue from PropertyItem |
|
94 _LIT( KSsyRefMinValue, "MinValue" ); // MinValue from PorpertyItem |
|
95 _LIT( KSsyRefReadOnly, "ReadOnly" ); // ReadOnly from PropertyItem |
|
96 |
|
97 |
|
98 // ======== MEMBER FUNCTIONS ======== |
|
99 |
|
100 // --------------------------------------------------------------------------- |
|
101 // CSsyReferenceConfig C++ constructor |
|
102 // --------------------------------------------------------------------------- |
|
103 // |
|
104 CSsyReferenceConfig::CSsyReferenceConfig() : |
|
105 CActive( EPriorityMuchLess ) |
|
106 { |
|
107 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::CSsyReferenceConfig()" ) ) ); |
|
108 CActiveScheduler::Add( this ); |
|
109 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::CSsyReferenceConfig() - return" ) ) ); |
|
110 } |
|
111 |
|
112 |
|
113 // --------------------------------------------------------------------------- |
|
114 // Symbian 2nd phase constructor |
|
115 // --------------------------------------------------------------------------- |
|
116 // |
|
117 void CSsyReferenceConfig::ConstructL() |
|
118 { |
|
119 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ConstructL()" ) ) ); |
|
120 // Create config file parser |
|
121 iConfigParser = CMDXMLParser::NewL( this ); |
|
122 |
|
123 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ConstructL() - return" ) ) ); |
|
124 } |
|
125 |
|
126 |
|
127 // --------------------------------------------------------------------------- |
|
128 // CSsyReferenceConfig::NewL |
|
129 // --------------------------------------------------------------------------- |
|
130 // |
|
131 CSsyReferenceConfig* CSsyReferenceConfig::NewL() |
|
132 { |
|
133 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::NewL()" ) ) ); |
|
134 CSsyReferenceConfig* self = new ( ELeave ) CSsyReferenceConfig(); |
|
135 CleanupStack::PushL( self ); |
|
136 self->ConstructL(); |
|
137 CleanupStack::Pop( self ); |
|
138 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::NewL() - return" ) ) ); |
|
139 return self; |
|
140 } |
|
141 |
|
142 // --------------------------------------------------------------------------- |
|
143 // Destructor |
|
144 // --------------------------------------------------------------------------- |
|
145 // |
|
146 CSsyReferenceConfig::~CSsyReferenceConfig() |
|
147 { |
|
148 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::~CSsyReferenceConfig()" ) ) ); |
|
149 |
|
150 if ( iConfigParser ) |
|
151 { |
|
152 delete iConfigParser; |
|
153 iConfigParser = NULL; |
|
154 } |
|
155 |
|
156 if ( iGenralInfoElement ) |
|
157 { |
|
158 delete iGenralInfoElement; |
|
159 iGenralInfoElement = NULL; |
|
160 } |
|
161 |
|
162 if ( iChannelGroupElement ) |
|
163 { |
|
164 delete iChannelGroupElement; |
|
165 iChannelGroupElement = NULL; |
|
166 } |
|
167 |
|
168 if ( iSsyReferenceConfig ) |
|
169 { |
|
170 delete iSsyReferenceConfig; |
|
171 iSsyReferenceConfig = NULL; |
|
172 } |
|
173 |
|
174 if ( iConfigFile ) |
|
175 { |
|
176 delete iConfigFile; |
|
177 iConfigFile = NULL; |
|
178 } |
|
179 |
|
180 iChannelPairArray.Reset(); |
|
181 |
|
182 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::~CSsyReferenceConfig() - return" ) ) ); |
|
183 } |
|
184 |
|
185 // --------------------------------------------------------------------------- |
|
186 // CSsyReferenceConfig::InitConfig |
|
187 // --------------------------------------------------------------------------- |
|
188 // |
|
189 void CSsyReferenceConfig::InitConfigL() |
|
190 { |
|
191 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::InitConfig()" ) ) ); |
|
192 |
|
193 // Open config file |
|
194 RFs fileSession; |
|
195 User::LeaveIfError( fileSession.Connect() ); |
|
196 |
|
197 // Locate extrenal file... |
|
198 RFile file; |
|
199 TInt err( file.Open( fileSession, KSsyReferenceCfgFileExt, EFileRead ) ); |
|
200 file.Close(); |
|
201 |
|
202 // Check is external file found |
|
203 if ( KErrNone == err ) |
|
204 { |
|
205 // Use SSY with external configuration |
|
206 iConfigParser->ParseFile( fileSession, KSsyReferenceCfgFileExt ); |
|
207 } |
|
208 else |
|
209 { |
|
210 // Use SSY with original configuration |
|
211 |
|
212 // Start parsing file and wait notification to ParseFileCompleteL |
|
213 // XML Parser takes ownership of the RFs and closes it when file is parsed |
|
214 iConfigParser->ParseFile( fileSession, KSsyReferenceCfgFileOrig ); |
|
215 } |
|
216 |
|
217 iConfigFileParsed = EFalse; |
|
218 |
|
219 // This active object has very low priority since XML parser uses Active objects also, |
|
220 // so it is mandatory to let XML parser to complete sooner than this active object |
|
221 IssueRequest(); |
|
222 iSchedulerWait.Start(); // Blocks until file is parsed |
|
223 |
|
224 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::InitConfig() - return" ) ) ); |
|
225 } |
|
226 |
|
227 // --------------------------------------------------------------------------- |
|
228 // CSsyReferenceConfig::IssueRequest |
|
229 // --------------------------------------------------------------------------- |
|
230 // |
|
231 void CSsyReferenceConfig::IssueRequest( TInt aError ) |
|
232 { |
|
233 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::IssueRequest()" ) ) ); |
|
234 // Provides synchronous function calls to be handled as asynchronous |
|
235 if ( !IsActive() ) |
|
236 { |
|
237 SetActive(); |
|
238 TRequestStatus *s = &iStatus; |
|
239 User::RequestComplete( s, aError ); |
|
240 } |
|
241 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::IssueRequest() - return" ) ) ); |
|
242 } |
|
243 |
|
244 // --------------------------------------------------------------------------- |
|
245 // CSsyReferenceConfig::RunL |
|
246 // --------------------------------------------------------------------------- |
|
247 // |
|
248 void CSsyReferenceConfig::RunL() |
|
249 { |
|
250 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::RunL() - %i" ), iStatus.Int() ) ); |
|
251 |
|
252 if ( iConfigFileParsed ) |
|
253 { |
|
254 // Stop blocking |
|
255 iSchedulerWait.AsyncStop(); |
|
256 } |
|
257 else |
|
258 { |
|
259 // Continue RunL loop |
|
260 IssueRequest(); |
|
261 } |
|
262 |
|
263 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::RunL() - return" ) ) ); |
|
264 } |
|
265 |
|
266 // --------------------------------------------------------------------------- |
|
267 // CSsyReferenceConfig::DoCancel |
|
268 // --------------------------------------------------------------------------- |
|
269 // |
|
270 void CSsyReferenceConfig::DoCancel() |
|
271 { |
|
272 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::DoCancel()" ) ) ); |
|
273 |
|
274 // Stop blocking |
|
275 iSchedulerWait.AsyncStop(); |
|
276 |
|
277 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::DoCancel() - return" ) ) ); |
|
278 } |
|
279 |
|
280 // --------------------------------------------------------------------------- |
|
281 // CSsyReferenceConfig::RunError |
|
282 // --------------------------------------------------------------------------- |
|
283 // |
|
284 TInt CSsyReferenceConfig::RunError( TInt /*aError*/ ) |
|
285 { |
|
286 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::RunError()" ) ) ); |
|
287 |
|
288 // Handle possible errors here and return KErrNone to prevent SSY from panic |
|
289 |
|
290 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::RunError() - return" ) ) ); |
|
291 return KErrNone; |
|
292 } |
|
293 |
|
294 // --------------------------------------------------------------------------- |
|
295 // CSsyReferenceConfig::ParseFileCompleteL |
|
296 // --------------------------------------------------------------------------- |
|
297 // |
|
298 void CSsyReferenceConfig::ParseFileCompleteL() |
|
299 { |
|
300 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ParseFileCompleteL()" ) ) ); |
|
301 |
|
302 ERROR_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ParseFileCompleteL(): parse error=%d", iConfigParser->Error() ) ) ); |
|
303 |
|
304 // if the parser fails with KErrNoMemory, increase the default heap size for SSY's (key 3) in the repository 1020507E.txt exported by this component |
|
305 __ASSERT_DEBUG( iConfigParser->ErrorSeverity() != EXMLFatal, User::Invariant() ); // OK to continue if not a fatal error |
|
306 |
|
307 // First get document |
|
308 iConfigFile = iConfigParser->DetachXMLDoc(); |
|
309 // Then get document element |
|
310 CMDXMLElement* documentElement = iConfigFile->DocumentElement(); |
|
311 // Get root element, 'SsyReferenceConfig' |
|
312 iSsyReferenceConfig = documentElement->FirstChildOfType( KSsyRefRootTag ); |
|
313 // Get gereral information element |
|
314 iGenralInfoElement = iSsyReferenceConfig->FirstChildOfType( KSsyRefGeneralInfoTag ); |
|
315 // Get channel information group element |
|
316 iChannelGroupElement = iSsyReferenceConfig->FirstChildOfType( KSsyRefChannelInfoGroupTag ); |
|
317 // Get channel count |
|
318 iChannelCount = GetAttributeIntValue( *iChannelGroupElement, KSsyRefChannelCount ); |
|
319 |
|
320 // No need to delete documentElement, it is owned by iConfigFile. |
|
321 documentElement = NULL; |
|
322 iConfigFileParsed = ETrue; |
|
323 |
|
324 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ParseFileCompleteL() - return" ) ) ); |
|
325 } |
|
326 |
|
327 // --------------------------------------------------------------------------- |
|
328 // CSsyReferenceConfig::GetAttributeIntValue |
|
329 // --------------------------------------------------------------------------- |
|
330 // |
|
331 TInt CSsyReferenceConfig::GetAttributeIntValue( CMDXMLElement& aElement, const TDesC& aAttrib ) |
|
332 { |
|
333 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeIntValue()" ) ) ); |
|
334 COMPONENT_TRACE( ( _L( " Element: %s", aElement.NodeName() ) ) ); |
|
335 COMPONENT_TRACE( ( _L( " Attribute: %s", aAttrib ) ) ); |
|
336 |
|
337 TInt intValue( 0 ); |
|
338 |
|
339 // Check availability |
|
340 if ( aElement.IsAttributeSpecified( aAttrib ) ) |
|
341 { |
|
342 // Buffer to where to read value |
|
343 TBufC<KSsyRefMaxAttribLength> buffer( KNullDesC ); |
|
344 TPtrC ptr( buffer ); |
|
345 |
|
346 // Read attribute value |
|
347 aElement.GetAttribute( aAttrib, ptr ); |
|
348 |
|
349 // Cast literal value into TInt |
|
350 TLex lexValue( ptr ); |
|
351 lexValue.Val( intValue ); |
|
352 } |
|
353 |
|
354 COMPONENT_TRACE( ( _L( " IntValue: %i", intValue ) ) ); |
|
355 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeIntValue() - return" ) ) ); |
|
356 return intValue; |
|
357 } |
|
358 |
|
359 // --------------------------------------------------------------------------- |
|
360 // CSsyReferenceConfig::GetAttributeStrValue |
|
361 // --------------------------------------------------------------------------- |
|
362 // |
|
363 void CSsyReferenceConfig::GetAttributeStrValue( CMDXMLElement& aElement, const TDesC& aAttrib, TDes8& aTarget ) |
|
364 { |
|
365 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeStrValue()" ) ) ); |
|
366 COMPONENT_TRACE( ( _L( " Element: %s", aElement.NodeName() ) ) ); |
|
367 COMPONENT_TRACE( ( _L( " Attribute: %s", aAttrib ) ) ); |
|
368 |
|
369 // Check availability |
|
370 if ( aElement.IsAttributeSpecified( aAttrib ) ) |
|
371 { |
|
372 // Buffer to where to read value |
|
373 TBufC<KSsyRefMaxAttribLength> buffer( KNullDesC ); |
|
374 TPtrC ptr( buffer ); |
|
375 |
|
376 // Read attribute value |
|
377 aElement.GetAttribute( aAttrib, ptr ); |
|
378 |
|
379 // Copy string from 16-bit descriptor to 8-bit descriptor |
|
380 aTarget.Copy( ptr ); |
|
381 } |
|
382 |
|
383 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeStrValue() - return" ) ) ); |
|
384 } |
|
385 |
|
386 // --------------------------------------------------------------------------- |
|
387 // CSsyReferenceConfig::GetAttributeHexValue |
|
388 // --------------------------------------------------------------------------- |
|
389 // |
|
390 TUint CSsyReferenceConfig::GetAttributeHexValue( CMDXMLElement& aElement, const TDesC& aAttrib ) |
|
391 { |
|
392 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeHexValue()" ) ) ); |
|
393 COMPONENT_TRACE( ( _L( " Element: %s", aElement.NodeName() ) ) ); |
|
394 COMPONENT_TRACE( ( _L( " Attribute: %s", aAttrib ) ) ); |
|
395 |
|
396 TUint32 hexValue( 0 ); |
|
397 |
|
398 // Check availability |
|
399 if ( aElement.IsAttributeSpecified( aAttrib ) ) |
|
400 { |
|
401 // Buffer to where to read value |
|
402 TBufC<KSsyRefMaxAttribLength> buffer( KNullDesC ); |
|
403 TPtrC ptr( buffer ); |
|
404 |
|
405 // Read attribute value |
|
406 aElement.GetAttribute( aAttrib, ptr ); |
|
407 |
|
408 // Get bounded value and cast it into TUint32 (hex) |
|
409 TRadix radix( EHex ); |
|
410 TUint limit( 0xFFFFFFFF ); |
|
411 |
|
412 // Append string into Lex and skip first two characters, 0x |
|
413 TLex lexValue( ptr ); |
|
414 lexValue.Inc( 2 ); |
|
415 |
|
416 // Read value |
|
417 lexValue.BoundedVal( hexValue, radix, limit ); |
|
418 } |
|
419 |
|
420 COMPONENT_TRACE( ( _L( " HexValue: %x", hexValue ) ) ); |
|
421 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeHexValue() - return" ) ) ); |
|
422 return hexValue; |
|
423 } |
|
424 |
|
425 // --------------------------------------------------------------------------- |
|
426 // CSsyReferenceConfig::GetAttributeRealValue |
|
427 // --------------------------------------------------------------------------- |
|
428 // |
|
429 TReal CSsyReferenceConfig::GetAttributeRealValue( CMDXMLElement& aElement, const TDesC& aAttrib ) |
|
430 { |
|
431 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeRealValue()" ) ) ); |
|
432 COMPONENT_TRACE( ( _L( " Element: %s", aElement.NodeName() ) ) ); |
|
433 COMPONENT_TRACE( ( _L( " Attribute: %s", aAttrib ) ) ); |
|
434 |
|
435 TReal realValue( 0 ); |
|
436 |
|
437 // Check availability |
|
438 if ( aElement.IsAttributeSpecified( aAttrib ) ) |
|
439 { |
|
440 |
|
441 // Buffer to where to read value |
|
442 TBufC<KSsyRefMaxAttribLength> buffer( KNullDesC ); |
|
443 TPtrC ptr( buffer ); |
|
444 |
|
445 // Read attribute value |
|
446 aElement.GetAttribute( aAttrib, ptr ); |
|
447 |
|
448 // Cast literal value into TReal |
|
449 TLex lexValue( ptr ); |
|
450 lexValue.Val( realValue ); |
|
451 } |
|
452 |
|
453 COMPONENT_TRACE( ( _L( " IntValue: %i", realValue ) ) ); |
|
454 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeRealValue() - return" ) ) ); |
|
455 return realValue; |
|
456 } |
|
457 |
|
458 // --------------------------------------------------------------------------- |
|
459 // CSsyReferenceConfig::ChannelCount |
|
460 // --------------------------------------------------------------------------- |
|
461 // |
|
462 TInt CSsyReferenceConfig::ChannelCount() |
|
463 { |
|
464 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ChannelCount() - %i" ), iChannelCount ) ); |
|
465 return iChannelCount; |
|
466 } |
|
467 |
|
468 // --------------------------------------------------------------------------- |
|
469 // CSsyReferenceConfig::GenerateChannels |
|
470 // --------------------------------------------------------------------------- |
|
471 // |
|
472 void CSsyReferenceConfig::GenerateChannels( RSensrvChannelInfoList& aChannelList ) |
|
473 { |
|
474 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GenerateChannels()" ) ) ); |
|
475 |
|
476 // Initialize channel pair array |
|
477 TSsyRefChannelIdArray tempArray( iChannelCount ); |
|
478 iChannelPairArray = tempArray; |
|
479 |
|
480 // Go through Channel group element and get all information |
|
481 TSensrvChannelInfo channelInfo; |
|
482 CMDXMLElement* channelElement = iChannelGroupElement->FirstChildOfType( KSsyRefChannelItemTag ); |
|
483 |
|
484 while( channelElement ) |
|
485 { |
|
486 // check is element correct type of node |
|
487 if ( channelElement->NodeType() == CMDXMLNode::EElementNode ) |
|
488 { |
|
489 // read channel identifier |
|
490 iChannelPairArray.Append( TSsyRefChannelIdPair( GetAttributeIntValue( *channelElement, KSsyRefChannelId ) ) ); |
|
491 |
|
492 // Read attributes |
|
493 channelInfo.iContextType = ( TSensrvContextType ) GetAttributeIntValue( *channelElement, KSsyRefContextType ); |
|
494 channelInfo.iQuantity = ( TSensrvQuantity ) GetAttributeIntValue( *channelElement, KSsyRefQuantity ); |
|
495 channelInfo.iChannelType = ( TSensrvChannelTypeId ) GetAttributeHexValue( *channelElement, KSsyRefChannelType ); |
|
496 GetAttributeStrValue( *channelElement, KSsyRefLocation, channelInfo.iLocation ); |
|
497 GetAttributeStrValue( *channelElement, KSsyRefVendorId, channelInfo.iVendorId ); |
|
498 channelInfo.iChannelDataTypeId = ( TSensrvChannelDataTypeId ) GetAttributeHexValue( *channelElement, KSsyRefDataTypeID ); |
|
499 |
|
500 // Calculate data item size based on channel type |
|
501 switch ( channelInfo.iChannelType ) |
|
502 { |
|
503 case KSensrvChannelTypeIdAccelerometerXYZAxisData: |
|
504 { |
|
505 channelInfo.iDataItemSize = KSsyRefAxisDataItemSize; |
|
506 break; |
|
507 } |
|
508 case KSensrvChannelTypeIdProximityMonitor: |
|
509 { |
|
510 channelInfo.iDataItemSize = KSsyRefProximityDataItemSize; |
|
511 break; |
|
512 } |
|
513 case KSensrvChannelTypeIdAmbientLightData: |
|
514 { |
|
515 channelInfo.iDataItemSize = KSsyRefAmbientLightDataItemSize; |
|
516 break; |
|
517 } |
|
518 case KSensrvChannelTypeIdAccelerometerWakeupData: |
|
519 case KSensrvChannelTypeIdAccelerometerDoubleTappingData: |
|
520 { |
|
521 channelInfo.iDataItemSize = KSsyRefTappingDataItemSize; |
|
522 break; |
|
523 } |
|
524 case KSensrvChannelTypeIdMagnetometerXYZAxisData: |
|
525 { |
|
526 channelInfo.iDataItemSize = KSsyRefMagneticAxisDataItemSize; |
|
527 break; |
|
528 } |
|
529 default: |
|
530 { |
|
531 channelInfo.iDataItemSize = 0; |
|
532 break; |
|
533 } |
|
534 } |
|
535 |
|
536 // Append channel info to list |
|
537 aChannelList.Append( channelInfo ); |
|
538 } |
|
539 channelElement = static_cast<CMDXMLElement*>( channelElement->NextSibling() ); |
|
540 } |
|
541 |
|
542 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GenerateChannels() - return" ) ) ); |
|
543 } |
|
544 |
|
545 // --------------------------------------------------------------------------- |
|
546 // CSsyReferenceConfig::GetChannelDataInformation |
|
547 // --------------------------------------------------------------------------- |
|
548 // |
|
549 void CSsyReferenceConfig::GetChannelDataInformationL( |
|
550 const TInt aSrvChannelId, |
|
551 TSsyRefDataItemArray& aDataItemList, |
|
552 TInt& aStartInterval ) |
|
553 { |
|
554 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetChannelDataInformation()" ) ) ); |
|
555 |
|
556 // First, get correct config channel element corresponding to aSrvChannelId |
|
557 CMDXMLElement* channelElement = ChannelElement( aSrvChannelId ); |
|
558 |
|
559 if ( channelElement ) |
|
560 { |
|
561 // Channel element found, get channel data group element |
|
562 CMDXMLElement* groupElement = channelElement->FirstChildOfType( KSsyRefChannelDataTag ); |
|
563 |
|
564 if ( groupElement ) |
|
565 { |
|
566 // Get start interval |
|
567 aStartInterval = GetAttributeIntValue( *groupElement, KSsyRefStartInterval ); |
|
568 |
|
569 // First, loop channel data items to get total count |
|
570 CMDXMLElement* dataItemElement = groupElement->FirstChildOfType( KSsyRefChannelDataItemTag ); |
|
571 |
|
572 // Take channel data item type at this point. One channel can produce only one type of |
|
573 // channel data item |
|
574 TUint channelType( GetAttributeHexValue( *dataItemElement, KSsyRefDataTypeID ) ); |
|
575 |
|
576 TInt channelItemCount( 0 ); // Total number of data items |
|
577 TInt definitionCount( 0 ); // Total number of different definitions |
|
578 |
|
579 // Go through elements and get counters |
|
580 while ( dataItemElement ) |
|
581 { |
|
582 definitionCount++; |
|
583 channelItemCount = channelItemCount + GetAttributeIntValue( *dataItemElement, KSsyRefDataItemCount ); |
|
584 // This will return NULL if no next sibling found |
|
585 dataItemElement = static_cast<CMDXMLElement*>( dataItemElement->NextSibling() ); |
|
586 } |
|
587 |
|
588 // Now, start all over to get item information |
|
589 dataItemElement = groupElement->FirstChildOfType( KSsyRefChannelDataItemTag ); |
|
590 |
|
591 // Create temp array now that we know the data item count |
|
592 TSsyRefDataItemArray tempArray( channelItemCount ); |
|
593 |
|
594 for ( TInt i = 0; i < definitionCount; i++ ) |
|
595 { |
|
596 // Check element type |
|
597 if ( dataItemElement->NodeType() == CMDXMLNode::EElementNode ) |
|
598 { |
|
599 // First we get interval and count from channel item |
|
600 TInt interval( GetAttributeIntValue( *dataItemElement, KSsyRefInterval ) ); |
|
601 TInt countOfType( GetAttributeIntValue( *dataItemElement, KSsyRefDataItemCount ) ); |
|
602 |
|
603 // Read next child values to corresponding data type class |
|
604 switch ( channelType ) |
|
605 { |
|
606 case TSensrvAccelerometerAxisData::KDataTypeId: |
|
607 { |
|
608 CMDXMLElement* axisDataElement = dataItemElement->FirstChildOfType( KSsyRefAxisDataItemTag ); |
|
609 TInt axisX( GetAttributeIntValue( *axisDataElement, KSsyRefXAxis ) ); |
|
610 TInt axisY( GetAttributeIntValue( *axisDataElement, KSsyRefYAxis ) ); |
|
611 TInt axisZ( GetAttributeIntValue( *axisDataElement, KSsyRefZAxis ) ); |
|
612 |
|
613 // Create channel data type item |
|
614 TSsyRefChannelDataAxis channelData( axisX, axisY, axisZ, interval ); |
|
615 // add items into array |
|
616 for ( TInt k = 0; k < countOfType; k++ ) |
|
617 { |
|
618 tempArray.Append( channelData ); |
|
619 } |
|
620 break; |
|
621 } |
|
622 case TSensrvTappingData::KDataTypeId: |
|
623 { |
|
624 CMDXMLElement* tappingDataElement = dataItemElement->FirstChildOfType( KSsyRefTappingDataItemTag ); |
|
625 TInt direction( GetAttributeHexValue( *tappingDataElement, KSsyRefDirection ) ); |
|
626 |
|
627 // Create channel data type item |
|
628 TSsyRefChannelDataTapping channelData( direction, interval ); |
|
629 // add items into array |
|
630 for ( TInt k = 0; k < countOfType; k++ ) |
|
631 { |
|
632 tempArray.Append( channelData ); |
|
633 } |
|
634 break; |
|
635 } |
|
636 case TSensrvProximityData::KDataTypeId: |
|
637 { |
|
638 CMDXMLElement* proximityDataElement = dataItemElement->FirstChildOfType( KSsyRefProximityDataItemTag ); |
|
639 TInt state( GetAttributeIntValue( *proximityDataElement, KSsyRefProximityState ) ); |
|
640 |
|
641 // Create channel data type item |
|
642 TSsyRefChannelDataProximity channelData( state, interval ); |
|
643 // add items into array |
|
644 for ( TInt k = 0; k < countOfType; k++ ) |
|
645 { |
|
646 tempArray.Append( channelData ); |
|
647 } |
|
648 break; |
|
649 } |
|
650 case TSensrvAmbientLightData::KDataTypeId: |
|
651 { |
|
652 CMDXMLElement* ambientLightDataElement = dataItemElement->FirstChildOfType( KSsyRefAmbientLightDataItemTag ); |
|
653 TInt state( GetAttributeIntValue( *ambientLightDataElement, KSsyRefAmbientLightState ) ); |
|
654 |
|
655 // Create channel data type item |
|
656 TSsyRefChannelDataAmbientLight channelData( state, interval ); |
|
657 // add items into array |
|
658 for ( TInt k = 0; k < countOfType; k++ ) |
|
659 { |
|
660 tempArray.Append( channelData ); |
|
661 } |
|
662 break; |
|
663 } |
|
664 case TSensrvMagnetometerAxisData::KDataTypeId: |
|
665 { |
|
666 CMDXMLElement* axisDataElement = dataItemElement->FirstChildOfType( KSsyRefMagneticAxisDataItemTag ); |
|
667 TInt axisX( GetAttributeIntValue( *axisDataElement, KSsyRefXAxis ) ); |
|
668 TInt axisY( GetAttributeIntValue( *axisDataElement, KSsyRefYAxis ) ); |
|
669 TInt axisZ( GetAttributeIntValue( *axisDataElement, KSsyRefZAxis ) ); |
|
670 TInt axisXCalib( GetAttributeIntValue( *axisDataElement, KSsyRefXAxisCalib ) ); |
|
671 TInt axisYCalib( GetAttributeIntValue( *axisDataElement, KSsyRefYAxisCalib ) ); |
|
672 TInt axisZCalib( GetAttributeIntValue( *axisDataElement, KSsyRefZAxisCalib ) ); |
|
673 |
|
674 // Create channel data type item |
|
675 TSsyRefChannelDataMagneticAxis channelData( axisX, axisY, axisZ, |
|
676 axisXCalib, axisYCalib, axisZCalib, interval ); |
|
677 // add items into array |
|
678 for ( TInt k = 0; k < countOfType; k++ ) |
|
679 { |
|
680 tempArray.Append( channelData ); |
|
681 } |
|
682 break; |
|
683 } |
|
684 default: |
|
685 { |
|
686 // Other data items are not supported |
|
687 User::Leave( KErrGeneral ); |
|
688 } |
|
689 } |
|
690 } |
|
691 |
|
692 // Get next channel data item element |
|
693 dataItemElement = static_cast<CMDXMLElement*>( dataItemElement->NextSibling() ); |
|
694 } |
|
695 |
|
696 // Compress temp array in case there were comments |
|
697 tempArray.Compress(); |
|
698 |
|
699 // copy information to param array |
|
700 aDataItemList = tempArray; |
|
701 } |
|
702 else |
|
703 { |
|
704 User::Leave( KErrNotFound ); |
|
705 } |
|
706 } |
|
707 else |
|
708 { |
|
709 User::Leave( KErrNotFound ); |
|
710 } |
|
711 |
|
712 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetChannelDataInformation() - return" ) ) ); |
|
713 } |
|
714 |
|
715 // --------------------------------------------------------------------------- |
|
716 // CSsyReferenceConfig::GetElementPropertiesL |
|
717 // --------------------------------------------------------------------------- |
|
718 // |
|
719 void CSsyReferenceConfig::GetElementPropertiesL( |
|
720 CMDXMLElement& aElement, |
|
721 RSensrvPropertyList& aPropertyList ) |
|
722 { |
|
723 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetElementPropertiesL()" ) ) ); |
|
724 |
|
725 // First we need 'Properties' element |
|
726 CMDXMLElement* properties = aElement.FirstChildOfType( KSsyRefProperties ); |
|
727 |
|
728 if ( !properties ) |
|
729 { |
|
730 // Wrong element... or properties are not defined |
|
731 User::Leave( KErrNotFound ); |
|
732 } |
|
733 |
|
734 // Get first property get started |
|
735 CMDXMLElement* propertyItem = properties->FirstChildOfType( KSsyRefPropertyItem ); |
|
736 TInt propertyCount( 0 ); |
|
737 |
|
738 // Loop properties to get count of properties |
|
739 while ( propertyItem ) |
|
740 { |
|
741 propertyCount++; |
|
742 propertyItem = static_cast<CMDXMLElement*>( propertyItem->NextSibling() ); // returns NULL if next not found |
|
743 } |
|
744 |
|
745 if ( !propertyCount ) |
|
746 { |
|
747 // Check that there are properties |
|
748 User::Leave( KErrNotFound ); |
|
749 } |
|
750 |
|
751 // Temporary property list now that we know the property count |
|
752 RSensrvPropertyList tempList( propertyCount ); |
|
753 |
|
754 // Start loop again from the start and read each property |
|
755 propertyItem = properties->FirstChildOfType( KSsyRefPropertyItem ); |
|
756 for ( TInt i = 0; i < propertyCount; i++ ) |
|
757 { |
|
758 // Check element type |
|
759 if ( propertyItem->NodeType() == CMDXMLNode::EElementNode ) |
|
760 { |
|
761 // Read property values |
|
762 const TSensrvPropertyId propertyId( ( TSensrvPropertyId )GetAttributeHexValue( *propertyItem, KSsyRefPropertyId ) ); |
|
763 const TInt itemIndex( GetAttributeIntValue( *propertyItem, KSsyRefItemIndex ) ); |
|
764 const TBool readOnly( ( TBool )GetAttributeIntValue( *propertyItem, KSsyRefReadOnly ) ); |
|
765 const TSensrvPropertyType propertyType( ( TSensrvPropertyType ) GetAttributeIntValue( *propertyItem, KSsyRefPropertyType ) ); |
|
766 |
|
767 // Array index must be handled in different way as it is not mandatory. Little modification is needed as it may not exist in XML file |
|
768 TInt arrayIndex( ESensrvSingleProperty ); |
|
769 |
|
770 // Extra check is needed, otherwise this value is always '0' when it should be 'ESensrvSingleProperty' by default |
|
771 if ( propertyItem->IsAttributeSpecified( KSsyRefArrayIndex ) ) |
|
772 { |
|
773 // Attribute exists, now we can read the value |
|
774 arrayIndex = GetAttributeIntValue( *propertyItem, KSsyRefArrayIndex ); |
|
775 } |
|
776 |
|
777 // Resolve type, get correct type value and append property into list |
|
778 switch ( propertyType ) |
|
779 { |
|
780 case ESensrvIntProperty: |
|
781 { |
|
782 const TInt intValue( GetAttributeIntValue( *propertyItem, KSsyRefPropertyValue ) ); |
|
783 const TInt maxValue( GetAttributeIntValue( *propertyItem, KSsyRefMaxValue ) ); |
|
784 const TInt minValue( GetAttributeIntValue( *propertyItem, KSsyRefMinValue ) ); |
|
785 TSensrvProperty property( propertyId, itemIndex, intValue, maxValue, minValue, readOnly, propertyType ); |
|
786 property.SetArrayIndex( arrayIndex ); |
|
787 tempList.Append( property ); |
|
788 break; |
|
789 } |
|
790 case ESensrvRealProperty: |
|
791 { |
|
792 const TReal intValue( GetAttributeRealValue( *propertyItem, KSsyRefPropertyValue ) ); |
|
793 const TReal maxValue( GetAttributeRealValue( *propertyItem, KSsyRefMaxValue ) ); |
|
794 const TReal minValue( GetAttributeRealValue( *propertyItem, KSsyRefMinValue ) ); |
|
795 TSensrvProperty property( propertyId, itemIndex, intValue, maxValue, minValue, readOnly, propertyType ); |
|
796 property.SetArrayIndex( arrayIndex ); |
|
797 tempList.Append( property ); |
|
798 break; |
|
799 } |
|
800 case ESensrvBufferProperty: |
|
801 { |
|
802 TBuf8<KSensrvPropertyTextBufferSize> desValue; |
|
803 GetAttributeStrValue( *propertyItem, KSsyRefPropertyValue, desValue ); |
|
804 TSensrvProperty property( propertyId, itemIndex, desValue, readOnly, propertyType ); |
|
805 property.SetArrayIndex( arrayIndex ); |
|
806 tempList.Append( property ); |
|
807 break; |
|
808 } |
|
809 default: |
|
810 { |
|
811 // Unknown property type -> leave |
|
812 User::Leave( KErrArgument ); |
|
813 } |
|
814 } |
|
815 } |
|
816 |
|
817 // Next property |
|
818 propertyItem = static_cast<CMDXMLElement*>( propertyItem->NextSibling() ); // returns NULL if next not found |
|
819 } |
|
820 |
|
821 // Compress temp list in case there were comment nodes |
|
822 tempList.Compress(); |
|
823 |
|
824 // copy temp list to parameter list |
|
825 aPropertyList = tempList; |
|
826 |
|
827 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetElementPropertiesL() - return" ) ) ); |
|
828 } |
|
829 |
|
830 // --------------------------------------------------------------------------- |
|
831 // CSsyReferenceConfig::ChannelElement |
|
832 // --------------------------------------------------------------------------- |
|
833 // |
|
834 CMDXMLElement* CSsyReferenceConfig::ChannelElement( const TInt aSrvChannelId ) |
|
835 { |
|
836 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ChannelElement()" ) ) ); |
|
837 |
|
838 const TInt configId( ConfigChannelId( aSrvChannelId ) ); |
|
839 TBool channelFound( EFalse ); |
|
840 |
|
841 // Loop channel group and match configId for the channel ID in element |
|
842 CMDXMLElement* channelItemElement = iChannelGroupElement->FirstChildOfType( KSsyRefChannelItemTag ); |
|
843 |
|
844 for ( TInt i = 0; i < iChannelCount || !channelFound; i++ ) |
|
845 { |
|
846 TInt channelId( GetAttributeIntValue( *channelItemElement, KSsyRefChannelId ) ); |
|
847 if ( configId == channelId ) |
|
848 { |
|
849 // Channel found, no need to loop |
|
850 channelFound = ETrue; |
|
851 } |
|
852 else |
|
853 { |
|
854 // Take next channel |
|
855 channelItemElement = static_cast<CMDXMLElement*>( channelItemElement->NextSibling() ); |
|
856 } |
|
857 } |
|
858 |
|
859 // If not found, return NULL |
|
860 if ( !channelFound ) |
|
861 { |
|
862 channelItemElement = NULL; |
|
863 } |
|
864 |
|
865 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ChannelElement() - return" ) ) ); |
|
866 return channelItemElement; |
|
867 } |
|
868 |
|
869 // --------------------------------------------------------------------------- |
|
870 // CSsyReferenceConfig::UpdateChannelIds |
|
871 // --------------------------------------------------------------------------- |
|
872 // |
|
873 void CSsyReferenceConfig::UpdateChannelIds( RSensrvChannelInfoList aChannelList ) |
|
874 { |
|
875 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::UpdateChannelIds()" ) ) ); |
|
876 |
|
877 |
|
878 if ( ChannelCount() == aChannelList.Count() ) |
|
879 { |
|
880 for ( TInt i = 0; i < aChannelList.Count(); i++ ) |
|
881 { |
|
882 iChannelPairArray[i].SetServerId( aChannelList[i].iChannelId ); |
|
883 } |
|
884 } |
|
885 |
|
886 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::UpdateChannelIds() - return" ) ) ); |
|
887 } |
|
888 |
|
889 // --------------------------------------------------------------------------- |
|
890 // CSsyReferenceConfig::ConfigChannelId |
|
891 // --------------------------------------------------------------------------- |
|
892 // |
|
893 TInt CSsyReferenceConfig::ConfigChannelId( const TInt aSrvChannelId ) const |
|
894 { |
|
895 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ConfigChannelId()" ) ) ); |
|
896 TInt returnValue( 0 ); |
|
897 |
|
898 for ( TInt i = 0; i < iChannelPairArray.Count(); i++ ) |
|
899 { |
|
900 if ( iChannelPairArray[i].ServerId() == aSrvChannelId ) |
|
901 { |
|
902 returnValue = iChannelPairArray[i].ConfigId(); |
|
903 } |
|
904 } |
|
905 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ConfigChannelId() - return" ) ) ); |
|
906 return returnValue; |
|
907 } |
|
908 |
|
909 // --------------------------------------------------------------------------- |
|
910 // CSsyReferenceConfig::GetSensorPropertiesL |
|
911 // --------------------------------------------------------------------------- |
|
912 // |
|
913 void CSsyReferenceConfig::GetSensorPropertiesL( RSensrvPropertyList& aPropertyList ) |
|
914 { |
|
915 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetSensorPropertiesL()" ) ) ); |
|
916 |
|
917 // We already have SsyGeneralInformation element, read properties from that |
|
918 GetElementPropertiesL( *iGenralInfoElement, aPropertyList ); |
|
919 |
|
920 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetSensorPropertiesL() - return" ) ) ); |
|
921 } |
|
922 |
|
923 // --------------------------------------------------------------------------- |
|
924 // CSsyReferenceConfig::GetChannelPropertiesL |
|
925 // --------------------------------------------------------------------------- |
|
926 // |
|
927 void CSsyReferenceConfig::GetChannelPropertiesL( |
|
928 const TInt aSrvChannelId, |
|
929 RSensrvPropertyList& aPropertyList ) |
|
930 { |
|
931 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetChannelPropertiesL()" ) ) ); |
|
932 |
|
933 // Get channel element first |
|
934 CMDXMLElement* channelElement = ChannelElement( aSrvChannelId ); |
|
935 |
|
936 if ( !channelElement ) |
|
937 { |
|
938 // Leave, channel element is not found |
|
939 User::Leave( KErrNotFound ); |
|
940 } |
|
941 |
|
942 // Get properties of this channel element |
|
943 GetElementPropertiesL( *channelElement, aPropertyList ); |
|
944 |
|
945 COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetChannelPropertiesL() - return" ) ) ); |
|
946 } |
|
947 |
|
948 // End of file |