|
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 @internalComponent |
|
19 */ |
|
20 |
|
21 #include <mtp/cmtptypedevicepropdesc.h> |
|
22 #include <mtp/mmtpdataproviderframework.h> |
|
23 #include <mtp/mtpdatatypeconstants.h> |
|
24 #include <mtp/mtpprotocolconstants.h> |
|
25 #include <mtp/tmtptyperequest.h> |
|
26 #include <mtp/mmtpframeworkconfig.h> |
|
27 #include <centralrepository.h> |
|
28 |
|
29 #include "cmtpdevicedatastore.h" |
|
30 #include "cmtpgetdevicepropdesc.h" |
|
31 #include "mtpdevicedpconst.h" |
|
32 #include "mtpdevdppanic.h" |
|
33 #include "cmtpdevicedpconfigmgr.h" |
|
34 |
|
35 // Class constants. |
|
36 __FLOG_STMT(_LIT8(KComponent,"GetDevicePropDesc");) |
|
37 |
|
38 /** |
|
39 Two-phase constructor. |
|
40 @param aPlugin The data provider plugin |
|
41 @param aFramework The data provider framework |
|
42 @param aConnection The connection from which the request comes |
|
43 @return a pointer to the created request processor object |
|
44 */ |
|
45 MMTPRequestProcessor* CMTPGetDevicePropDesc::NewL(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection) |
|
46 { |
|
47 CMTPGetDevicePropDesc* self = new (ELeave) CMTPGetDevicePropDesc(aFramework, aConnection); |
|
48 CleanupStack::PushL(self); |
|
49 self->ConstructL(); |
|
50 CleanupStack::Pop(self); |
|
51 return self; |
|
52 } |
|
53 |
|
54 /** |
|
55 Destructor. |
|
56 */ |
|
57 CMTPGetDevicePropDesc::~CMTPGetDevicePropDesc() |
|
58 { |
|
59 __FLOG(_L8("~CMTPGetDevicePropDesc - Entry")); |
|
60 delete iData; |
|
61 delete iPropDesc; |
|
62 delete iRepository; |
|
63 iDpSingletons.Close(); |
|
64 __FLOG(_L8("~CMTPGetDevicePropDesc - Exit")); |
|
65 __FLOG_CLOSE; |
|
66 } |
|
67 |
|
68 /** |
|
69 Constructor. |
|
70 */ |
|
71 CMTPGetDevicePropDesc::CMTPGetDevicePropDesc(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection) : |
|
72 CMTPRequestProcessor(aFramework, aConnection, 0, NULL) |
|
73 { |
|
74 } |
|
75 |
|
76 /** |
|
77 GetDevicePropDesc request validator. |
|
78 @return EMTPRespCodeOK if request is verified, otherwise one of the error response codes |
|
79 */ |
|
80 TMTPResponseCode CMTPGetDevicePropDesc::CheckRequestL() |
|
81 { |
|
82 __FLOG(_L8("CheckRequestL - Entry")); |
|
83 TMTPResponseCode respCode(EMTPRespCodeDevicePropNotSupported); |
|
84 iPropCode = Request().Uint32(TMTPTypeRequest::ERequestParameter1); |
|
85 const TInt count = sizeof(KMTPDeviceDpSupportedProperties) / sizeof(KMTPDeviceDpSupportedProperties[0]); |
|
86 for (TUint i(0); ((respCode != EMTPRespCodeOK) && (i < count)); i++) |
|
87 { |
|
88 if (iPropCode == KMTPDeviceDpSupportedProperties[i]) |
|
89 { |
|
90 respCode = EMTPRespCodeOK; |
|
91 } |
|
92 } |
|
93 if((respCode != EMTPRespCodeOK) && iDpSingletons.DeviceDataStore().ExtnDevicePropDp())//2113 |
|
94 { |
|
95 respCode = EMTPRespCodeOK; |
|
96 } |
|
97 __FLOG(_L8("CheckRequestL - Exit")); |
|
98 return respCode; |
|
99 } |
|
100 |
|
101 /** |
|
102 GetDevicePropDesc request handler. |
|
103 */ |
|
104 void CMTPGetDevicePropDesc::ServiceL() |
|
105 { |
|
106 __FLOG(_L8("ServiceL - Entry")); |
|
107 iPropCode = Request().Uint32(TMTPTypeRequest::ERequestParameter1); |
|
108 //before performing any operation will check the properties are supported or |
|
109 //not if not then return EMTPRespCodeDevicePropNotSupported |
|
110 const CMTPTypeArray *mtpArray = &(iDpSingletons.DeviceDataStore().GetSupportedDeviceProperties()); |
|
111 RArray <TUint> supportedArray; |
|
112 mtpArray->Array(supportedArray); |
|
113 __FLOG_VA((_L8("No of elements in supported property array = %d "), supportedArray.Count())); |
|
114 if(KErrNotFound == supportedArray.Find(iPropCode)) |
|
115 { |
|
116 SendResponseL(EMTPRespCodeDevicePropNotSupported); |
|
117 __FLOG(_L8("CMTPGetDevicePropDesc::EMTPRespCodeDevicePropNotSupported ")); |
|
118 } |
|
119 else |
|
120 { |
|
121 switch (iPropCode) |
|
122 { |
|
123 case EMTPDevicePropCodeBatteryLevel: |
|
124 if (iDpSingletons.DeviceDataStore().RequestPending()) |
|
125 { |
|
126 // BatteryLevel already pending - return busy code |
|
127 SendResponseL(EMTPRespCodeDeviceBusy); |
|
128 } |
|
129 else |
|
130 { |
|
131 iDpSingletons.DeviceDataStore().BatteryLevelL(iStatus, iBatteryLevelValue); |
|
132 SetActive(); |
|
133 } |
|
134 break; |
|
135 |
|
136 case EMTPDevicePropCodeSynchronizationPartner: |
|
137 ServiceSynchronisationPartnerL(); |
|
138 break; |
|
139 |
|
140 case EMTPDevicePropCodeDeviceFriendlyName: |
|
141 ServiceDeviceFriendlyNameL(); |
|
142 break; |
|
143 |
|
144 case EMTPDevicePropCodeSessionInitiatorVersionInfo: |
|
145 ServiceSessionInitiatorVersionInfoL(); |
|
146 break; |
|
147 |
|
148 case EMTPDevicePropCodePerceivedDeviceType: |
|
149 ServicePerceivedDeviceTypeL(); |
|
150 break; |
|
151 |
|
152 case EMTPDevicePropCodeDateTime: |
|
153 ServiceDateTimeL(); |
|
154 break; |
|
155 |
|
156 case EMTPDevicePropCodeDeviceIcon: |
|
157 ServiceDeviceIconL(); |
|
158 break; |
|
159 |
|
160 case EMTPDevicePropCodeSupportedFormatsOrdered: |
|
161 ServiceSupportedFormatsOrderedL(); |
|
162 break; |
|
163 |
|
164 case EMTPDevicePropCodeFunctionalID: |
|
165 ServiceFunctionalIDL(); |
|
166 break; |
|
167 case EMTPDevicePropCodeModelID: |
|
168 ServiceModelIDL(); |
|
169 break; |
|
170 case EMTPDevicePropCodeUseDeviceStage: |
|
171 ServiceUseDeviceStageL(); |
|
172 break; |
|
173 |
|
174 default: |
|
175 if(iDpSingletons.DeviceDataStore().ExtnDevicePropDp()) |
|
176 { |
|
177 HandleExtnServiceL(iPropCode, iDpSingletons.DeviceDataStore().ExtnDevicePropDp()); |
|
178 } |
|
179 else |
|
180 SendResponseL(EMTPRespCodeDevicePropNotSupported); |
|
181 break; |
|
182 } |
|
183 } |
|
184 supportedArray.Close(); |
|
185 __FLOG(_L8("ServiceL - Exit")); |
|
186 } |
|
187 |
|
188 |
|
189 void CMTPGetDevicePropDesc::HandleExtnServiceL(TInt aPropCode, MExtnDevicePropDp* aExtnDevplugin ) |
|
190 { |
|
191 //call plugin ->desc |
|
192 MMTPType* mtptype; |
|
193 if(KErrNone == aExtnDevplugin->GetDevPropertyDescL((TMTPDevicePropertyCode)aPropCode, &mtptype)) |
|
194 { |
|
195 SendDataL(*mtptype); |
|
196 } |
|
197 else |
|
198 { |
|
199 SendResponseL(EMTPRespCodeDevicePropNotSupported); |
|
200 } |
|
201 |
|
202 |
|
203 } |
|
204 void CMTPGetDevicePropDesc::DoCancel() |
|
205 { |
|
206 __FLOG(_L8("DoCancel - Entry")); |
|
207 if (iPropCode == EMTPDevicePropCodeBatteryLevel) |
|
208 { |
|
209 iDpSingletons.DeviceDataStore().Cancel(); |
|
210 } |
|
211 __FLOG(_L8("DoCancel - Exit")); |
|
212 } |
|
213 |
|
214 void CMTPGetDevicePropDesc::RunL() |
|
215 { |
|
216 __FLOG(_L8("RunL - Entry")); |
|
217 if (iPropCode == EMTPDevicePropCodeBatteryLevel) |
|
218 { |
|
219 ServiceBatteryLevelL(); |
|
220 } |
|
221 else |
|
222 { |
|
223 __DEBUG_ONLY(Panic(EMTPDevDpUnknownDeviceProperty)); |
|
224 } |
|
225 __FLOG(_L8("RunL - Exit")); |
|
226 } |
|
227 |
|
228 /** |
|
229 Second-phase constructor. |
|
230 */ |
|
231 void CMTPGetDevicePropDesc::ConstructL() |
|
232 { |
|
233 __FLOG_OPEN(KMTPSubsystem, KComponent); |
|
234 __FLOG(_L8("CMTPGetDevicePropDesc: ConstructL - Entry")); |
|
235 iDpSingletons.OpenL(iFramework); |
|
236 const TUint32 KUidMTPRepositoryValue(0x10282FCC); |
|
237 const TUid KUidMTPRepository = {KUidMTPRepositoryValue}; |
|
238 iRepository = CRepository::NewL(KUidMTPRepository); |
|
239 __FLOG(_L8("CMTPGetDevicePropDesc: ConstructL - Exit")); |
|
240 } |
|
241 |
|
242 /** |
|
243 Services the battery level property. |
|
244 */ |
|
245 void CMTPGetDevicePropDesc::ServiceBatteryLevelL() |
|
246 { |
|
247 __FLOG(_L8("ServiceBatteryLevelL - Entry")); |
|
248 CMTPTypeDevicePropDescRangeForm* form = CMTPTypeDevicePropDescRangeForm::NewLC(EMTPTypeUINT8); |
|
249 form->SetUint8L(CMTPTypeDevicePropDescRangeForm::EMinimumValue, 0); |
|
250 form->SetUint8L(CMTPTypeDevicePropDescRangeForm::EMaximumValue, 100); |
|
251 form->SetUint8L(CMTPTypeDevicePropDescRangeForm::EStepSize, 10); |
|
252 |
|
253 delete iPropDesc; |
|
254 iPropDesc = NULL; |
|
255 iPropDesc = CMTPTypeDevicePropDesc::NewL(EMTPDevicePropCodeBatteryLevel, *form); |
|
256 iPropDesc->SetUint8L(CMTPTypeDevicePropDesc::EFactoryDefaultValue, 0); |
|
257 iPropDesc->SetUint8L(CMTPTypeDevicePropDesc::ECurrentValue, iBatteryLevelValue); |
|
258 CleanupStack::PopAndDestroy(form); |
|
259 |
|
260 SendDataL(*iPropDesc); |
|
261 __FLOG(_L8("ServiceBatteryLevelL - Exit")); |
|
262 } |
|
263 |
|
264 /** |
|
265 Services the device friendly name property. |
|
266 */ |
|
267 void CMTPGetDevicePropDesc::ServiceDeviceFriendlyNameL() |
|
268 { |
|
269 __FLOG(_L8("ServiceDeviceFriendlyNameL - Entry")); |
|
270 delete iPropDesc; |
|
271 iPropDesc = NULL; |
|
272 iPropDesc = CMTPTypeDevicePropDesc::NewL(EMTPDevicePropCodeDeviceFriendlyName); |
|
273 |
|
274 CMTPDeviceDataStore& device(iDpSingletons.DeviceDataStore()); |
|
275 iPropDesc->SetStringL(CMTPTypeDevicePropDesc::EFactoryDefaultValue, device.DeviceFriendlyNameDefault()); |
|
276 iPropDesc->SetStringL(CMTPTypeDevicePropDesc::ECurrentValue, device.DeviceFriendlyName()); |
|
277 |
|
278 SendDataL(*iPropDesc); |
|
279 __FLOG(_L8("ServiceDeviceFriendlyNameL - Exit")); |
|
280 } |
|
281 |
|
282 /** |
|
283 Services the synchronisation partner property. |
|
284 */ |
|
285 void CMTPGetDevicePropDesc::ServiceSynchronisationPartnerL() |
|
286 { |
|
287 __FLOG(_L8("ServiceSynchronisationPartnerL - Entry")); |
|
288 delete iPropDesc; |
|
289 iPropDesc = NULL; |
|
290 iPropDesc = CMTPTypeDevicePropDesc::NewL(EMTPDevicePropCodeSynchronizationPartner); |
|
291 |
|
292 CMTPDeviceDataStore& device(iDpSingletons.DeviceDataStore()); |
|
293 iPropDesc->SetStringL(CMTPTypeDevicePropDesc::EFactoryDefaultValue, device.SynchronisationPartnerDefault()); |
|
294 iPropDesc->SetStringL(CMTPTypeDevicePropDesc::ECurrentValue, device.SynchronisationPartner()); |
|
295 |
|
296 SendDataL(*iPropDesc); |
|
297 __FLOG(_L8("ServiceSynchronisationPartnerL - Exit")); |
|
298 } |
|
299 |
|
300 /** |
|
301 *Services the synchronisation partner property. |
|
302 */ |
|
303 void CMTPGetDevicePropDesc::ServiceSessionInitiatorVersionInfoL() |
|
304 { |
|
305 __FLOG(_L8("ServiceSessionInitiatorVersionInfoL - Entry")); |
|
306 delete iPropDesc; |
|
307 iPropDesc = NULL; |
|
308 // this property is of type set or get |
|
309 iPropDesc = CMTPTypeDevicePropDesc::NewL(EMTPDevicePropCodeSessionInitiatorVersionInfo, 0x01/*set/get*/, 0x00, NULL); |
|
310 CMTPDeviceDataStore& device(iDpSingletons.DeviceDataStore()); |
|
311 iPropDesc->SetStringL(CMTPTypeDevicePropDesc::EFactoryDefaultValue, device.SessionInitiatorVersionInfoDefault()); |
|
312 iPropDesc->SetStringL(CMTPTypeDevicePropDesc::ECurrentValue, device.SessionInitiatorVersionInfo()); |
|
313 SendDataL(*iPropDesc); |
|
314 __FLOG(_L8("ServiceSessionInitiatorVersionInfoL - Exit")); |
|
315 } |
|
316 |
|
317 /** |
|
318 *Services the Service Perceived Device Type. |
|
319 */ |
|
320 void CMTPGetDevicePropDesc::ServicePerceivedDeviceTypeL() |
|
321 { |
|
322 __FLOG(_L8("ServicePerceivedDeviceType - Entry")); |
|
323 delete iPropDesc; |
|
324 iPropDesc = NULL; |
|
325 iPropDesc = CMTPTypeDevicePropDesc::NewL(EMTPDevicePropCodePerceivedDeviceType, 0x00/*get only*/, 0x00, NULL); |
|
326 CMTPDeviceDataStore& device(iDpSingletons.DeviceDataStore()); |
|
327 iPropDesc->SetUint32L(CMTPTypeDevicePropDesc::EFactoryDefaultValue, device.PerceivedDeviceTypeDefault()); |
|
328 iPropDesc->SetUint32L(CMTPTypeDevicePropDesc::ECurrentValue, device.PerceivedDeviceType()); |
|
329 SendDataL(*iPropDesc); |
|
330 __FLOG(_L8("ServicePerceivedDeviceType - Exit")); |
|
331 } |
|
332 |
|
333 /** |
|
334 Services the Date Time property. |
|
335 */ |
|
336 void CMTPGetDevicePropDesc::ServiceDateTimeL() |
|
337 { |
|
338 __FLOG(_L8("ServicePerceivedDeviceType - Entry")); |
|
339 delete iPropDesc; |
|
340 iPropDesc = NULL; |
|
341 iPropDesc = CMTPTypeDevicePropDesc::NewL(EMTPDevicePropCodeDateTime, 0x01/*get/set*/, 0x00, NULL); |
|
342 CMTPDeviceDataStore& device(iDpSingletons.DeviceDataStore()); |
|
343 iPropDesc->SetStringL(CMTPTypeDevicePropDesc::EFactoryDefaultValue, device.DateTimeL()); |
|
344 iPropDesc->SetStringL(CMTPTypeDevicePropDesc::ECurrentValue, device.DateTimeL()); |
|
345 SendDataL(*iPropDesc); |
|
346 __FLOG(_L8("ServicePerceivedDeviceType - Exit")); |
|
347 } |
|
348 |
|
349 /** |
|
350 Services the Date Time property. |
|
351 */ |
|
352 void CMTPGetDevicePropDesc::ServiceDeviceIconL() |
|
353 { |
|
354 __FLOG(_L8("ServiceDeviceIcon - Entry")); |
|
355 delete iPropDesc; |
|
356 iPropDesc = NULL; |
|
357 iPropDesc = CMTPTypeDevicePropDesc::NewL(EMTPDevicePropCodeDeviceIcon, 0x00, 0x00, NULL); |
|
358 CMTPDeviceDataStore& device(iDpSingletons.DeviceDataStore()); |
|
359 //need to think of which one to be used for default. |
|
360 iPropDesc->SetL(CMTPTypeDevicePropDesc::EFactoryDefaultValue, device.DeviceIcon()); |
|
361 iPropDesc->SetL(CMTPTypeDevicePropDesc::ECurrentValue, device.DeviceIcon()); |
|
362 SendDataL(*iPropDesc); |
|
363 __FLOG(_L8("ServiceDeviceIcon- Exit")); |
|
364 } |
|
365 |
|
366 /* |
|
367 *Service Supported format ordered. |
|
368 */ |
|
369 void CMTPGetDevicePropDesc::ServiceSupportedFormatsOrderedL() |
|
370 { |
|
371 __FLOG(_L8("ServiceSupportedFormatsOrdered - Entry")); |
|
372 delete iPropDesc; |
|
373 iPropDesc = NULL; |
|
374 iPropDesc = CMTPTypeDevicePropDesc::NewL(EMTPDevicePropCodeSupportedFormatsOrdered, 0x00, 0x00, NULL); |
|
375 iPropDesc->SetUint8L(CMTPTypeDevicePropDesc::EFactoryDefaultValue, (TUint8)FORMAT_UNORDERED); |
|
376 iPropDesc->SetUint8L(CMTPTypeDevicePropDesc::ECurrentValue, GetFormatOrdered()); |
|
377 SendDataL(*iPropDesc); |
|
378 __FLOG(_L8("ServiceSupportedFormatsOrdered - Exit")); |
|
379 } |
|
380 |
|
381 /* |
|
382 *Service Supported FuntionalID. |
|
383 */ |
|
384 void CMTPGetDevicePropDesc::ServiceFunctionalIDL() |
|
385 { |
|
386 __FLOG(_L8("ServiceFuntionalIDL - Entry")); |
|
387 delete iPropDesc; |
|
388 iPropDesc = NULL; |
|
389 iPropDesc = CMTPTypeDevicePropDesc::NewL(EMTPDevicePropCodeFunctionalID, 1, 0, NULL); |
|
390 |
|
391 delete iData; |
|
392 iData = GetGUIDL( MMTPFrameworkConfig::EDeviceDefaultFuncationalID ); |
|
393 iPropDesc->SetL(CMTPTypeDevicePropDesc::EFactoryDefaultValue, *iData); |
|
394 delete iData; |
|
395 iData = GetGUIDL(MMTPFrameworkConfig::EDeviceCurrentFuncationalID); |
|
396 iPropDesc->SetL(CMTPTypeDevicePropDesc::ECurrentValue, *iData); |
|
397 |
|
398 SendDataL(*iPropDesc); |
|
399 __FLOG(_L8("ServiceFuntionalIDL - Exit")); |
|
400 } |
|
401 |
|
402 /* |
|
403 *Service Supported ModelID. |
|
404 */ |
|
405 void CMTPGetDevicePropDesc::ServiceModelIDL() |
|
406 { |
|
407 __FLOG(_L8("ServiceModelIDL - Entry")); |
|
408 delete iPropDesc; |
|
409 iPropDesc = NULL; |
|
410 iPropDesc = CMTPTypeDevicePropDesc::NewL(EMTPDevicePropCodeModelID, 0, 0, NULL); |
|
411 |
|
412 delete iData; |
|
413 iData = GetGUIDL(MMTPFrameworkConfig::EDeviceDefaultModelID); |
|
414 iPropDesc->SetL(CMTPTypeDevicePropDesc::EFactoryDefaultValue, *iData); |
|
415 |
|
416 delete iData; |
|
417 iData = GetGUIDL(MMTPFrameworkConfig::EDeviceCurrentModelID); |
|
418 iPropDesc->SetL(CMTPTypeDevicePropDesc::ECurrentValue, *iData); |
|
419 |
|
420 SendDataL(*iPropDesc); |
|
421 __FLOG(_L8("ServiceModelIDL - Exit")); |
|
422 } |
|
423 |
|
424 /* |
|
425 *Service Supported UseDeviceStage. |
|
426 */ |
|
427 void CMTPGetDevicePropDesc::ServiceUseDeviceStageL() |
|
428 { |
|
429 __FLOG(_L8("ServiceUseDeviceStageL - Entry")); |
|
430 delete iPropDesc; |
|
431 iPropDesc = NULL; |
|
432 iPropDesc = CMTPTypeDevicePropDesc::NewL(EMTPDevicePropCodeUseDeviceStage, 0, 0, NULL); |
|
433 |
|
434 TMTPTypeUint8 *data = new (ELeave)TMTPTypeUint8(1); |
|
435 iPropDesc->SetL(CMTPTypeDevicePropDesc::EFactoryDefaultValue, *data); |
|
436 iPropDesc->SetL(CMTPTypeDevicePropDesc::ECurrentValue, *data); |
|
437 |
|
438 delete data; |
|
439 |
|
440 SendDataL(*iPropDesc); |
|
441 __FLOG(_L8("ServiceUseDeviceStageL - Exit")); |
|
442 } |
|
443 |
|
444 /* |
|
445 *This method to set the supported format order. |
|
446 *this value will be set by getdevice info based on the formats present in the |
|
447 *mtpdevicedp_config.rss file. |
|
448 */ |
|
449 TUint8 CMTPGetDevicePropDesc::GetFormatOrdered() |
|
450 { |
|
451 TUint8 formatOrdered; |
|
452 RArray<TUint> orderedFormats(8); |
|
453 CleanupClosePushL(orderedFormats); |
|
454 TRAPD(error,iDpSingletons.ConfigMgr().GetRssConfigInfoArrayL(orderedFormats, EDevDpFormats)); |
|
455 if(error!=KErrNone) |
|
456 { |
|
457 __FLOG_VA((_L8("GetRssConfigArray returned with %d"), error)); |
|
458 } |
|
459 if(orderedFormats.Count() > 0) |
|
460 { |
|
461 formatOrdered = (TUint8)FORMAT_ORDERED; |
|
462 } |
|
463 else |
|
464 { |
|
465 formatOrdered = (TUint8)FORMAT_UNORDERED; |
|
466 } |
|
467 CleanupStack::PopAndDestroy(&orderedFormats); |
|
468 return formatOrdered; |
|
469 } |
|
470 |
|
471 TMTPTypeGuid* CMTPGetDevicePropDesc::GetGUIDL(const TUint aKey) |
|
472 { |
|
473 |
|
474 TBuf8<KMTPTypeUINT128Size> ptr; |
|
475 |
|
476 iRepository->Get(aKey,ptr); |
|
477 |
|
478 TMTPTypeGuid* ret = new (ELeave) TMTPTypeGuid( ptr ); |
|
479 |
|
480 return ret; |
|
481 } |
|
482 |
|
483 void CMTPGetDevicePropDesc::SaveGUID( const TUint aKey, TMTPTypeGuid& aValue ) |
|
484 { |
|
485 TPtrC8 ptr; |
|
486 if ( KMTPChunkSequenceCompletion == aValue.FirstReadChunk(ptr) ) |
|
487 { |
|
488 iRepository->Set(aKey,ptr); |
|
489 } |
|
490 } |
|
491 |