equal
deleted
inserted
replaced
13 // Description: |
13 // Description: |
14 // |
14 // |
15 |
15 |
16 #include <badesca.h> |
16 #include <badesca.h> |
17 #include <bautils.h> |
17 #include <bautils.h> |
18 #include <hal.h> |
|
19 #include <s32file.h> |
18 #include <s32file.h> |
20 #include <f32file.h> |
19 #include <f32file.h> |
21 #include <tz.h> |
20 #include <tz.h> |
22 #include <mtp/cmtptypestring.h> |
21 #include <mtp/cmtptypestring.h> |
23 #include <mtp/mtpdatatypeconstants.h> |
22 #include <mtp/mtpdatatypeconstants.h> |
24 #include <mtp/cmtpdataproviderplugin.h> |
23 #include <mtp/cmtpdataproviderplugin.h> |
25 #include <mtp/cmtptypefile.h> |
24 #include <mtp/cmtptypefile.h> |
|
25 #include <sysutil.h> |
26 |
26 |
27 #include "cmtpdataprovider.h" |
27 #include "cmtpdataprovider.h" |
28 #include "cmtpdataprovidercontroller.h" |
28 #include "cmtpdataprovidercontroller.h" |
29 #include "cmtpdevicedatastore.h" |
29 #include "cmtpdevicedatastore.h" |
30 #include "cmtpframeworkconfig.h" |
30 #include "cmtpframeworkconfig.h" |
392 Schedule(EEnumeratingDeviceVersion); |
392 Schedule(EEnumeratingDeviceVersion); |
393 break; |
393 break; |
394 |
394 |
395 case EEnumeratingDeviceVersion: |
395 case EEnumeratingDeviceVersion: |
396 { |
396 { |
397 TInt buildNo(0); |
397 HBufC* verBuf = HBufC::NewLC( KSysUtilVersionTextLength ); |
398 User::LeaveIfError(HAL::Get(HALData::EManufacturerSoftwareBuild, buildNo)); |
398 TPtr ver = verBuf->Des(); |
399 __FLOG_VA((_L8("EManufacturerSoftwareBuild = %d "), buildNo)); |
399 SysUtil::GetSWVersion( ver ); |
400 iDeviceVersion.Format(_L("%d"), buildNo); |
400 |
|
401 // parse sw fields and append to iDeviceVersion |
|
402 /* |
|
403 "010.007\n2010-03-08\nRM-596\nNokia" |
|
404 */ |
|
405 TChar separator('\n'); |
|
406 TInt pos = ver.Locate( separator ); |
|
407 if ( pos == KErrNotFound ) |
|
408 { |
|
409 iDeviceVersion.Append( ver ); |
|
410 } |
|
411 else |
|
412 { |
|
413 iDeviceVersion.Append( ver.Mid( 0, pos ) ); |
|
414 } |
|
415 CleanupStack::PopAndDestroy(verBuf); |
401 Schedule(EEnumeratingPhoneId); |
416 Schedule(EEnumeratingPhoneId); |
402 } |
417 } |
403 break; |
418 break; |
404 |
419 |
405 case EEnumeratingPhoneId: |
420 case EEnumeratingPhoneId: |
493 // 2. Synchronization partner name. |
508 // 2. Synchronization partner name. |
494 iSyncPartnerNameDefault = iSingletons.FrameworkConfig().ValueL(CMTPFrameworkConfig::ESynchronizationPartnerName); |
509 iSyncPartnerNameDefault = iSingletons.FrameworkConfig().ValueL(CMTPFrameworkConfig::ESynchronizationPartnerName); |
495 iSynchronisationPartner = CMTPTypeString::NewL(*iSyncPartnerNameDefault); |
510 iSynchronisationPartner = CMTPTypeString::NewL(*iSyncPartnerNameDefault); |
496 |
511 |
497 // 3. Device Version. |
512 // 3. Device Version. |
498 iDeviceVersion.CreateL(KMTPDefaultDeviceVersion); |
513 iDeviceVersion.CreateL(KSysUtilVersionTextLength); |
499 |
514 |
500 // 4. Manufacturer. |
515 // 4. Manufacturer. |
501 iPhoneIdV1.iManufacturer = KMTPDefaultManufacturer; |
516 iPhoneIdV1.iManufacturer = KMTPDefaultManufacturer; |
502 |
517 |
503 // 5. Model. |
518 // 5. Model. |