mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdeviceinfo.cpp
branchRCL_3
changeset 12 8b094906a049
parent 0 d0791faffa3f
child 27 81da3301b632
child 29 3ae5cb0b4c02
--- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdeviceinfo.cpp	Fri Mar 12 15:46:41 2010 +0200
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdeviceinfo.cpp	Mon Mar 15 12:43:12 2010 +0200
@@ -48,6 +48,7 @@
 This identifies the PTP vendor-extension version that are in use by this device
 */
 static const TUint32 KMTPVendorExtensionId = 0x00000006;
+static const TUint32 KMTPVendorExtensionId_Mac = 0xFFFFFFFF;
 
 /**
 This identifies, in hundredths, the version of the MTP standard that this device supports
@@ -126,9 +127,26 @@
     __FLOG(_L8("BuildDeviceInfoL - Entry")); 
     CMTPDeviceDataStore& device(iDpSingletons.DeviceDataStore());
     iDeviceInfo->SetUint16L(CMTPTypeDeviceInfo::EStandardVersion, KMTPStandardVersion);
-    iDeviceInfo->SetUint32L(CMTPTypeDeviceInfo::EMTPVendorExtensionID, KMTPVendorExtensionId);
-    iDeviceInfo->SetUint16L(CMTPTypeDeviceInfo::EMTPVersion, KMTPVersion);
-    iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EMTPExtensions, iDpSingletons.DeviceDataStore().MTPExtensions());    
+    
+    if(iDpSingletons.DeviceDataStore().IsConnectMac())
+        {
+        __FLOG(_L8("Connect Mac = ETrue"));         
+        iDeviceInfo->SetUint32L(CMTPTypeDeviceInfo::EMTPVendorExtensionID, KMTPVendorExtensionId_Mac);
+        iDeviceInfo->SetUint16L(CMTPTypeDeviceInfo::EMTPVersion, KMTPVersion);        
+        RBuf  mtpExtensions;
+        mtpExtensions.CleanupClosePushL();
+        mtpExtensions.CreateL(0);
+        iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EMTPExtensions, mtpExtensions);
+        CleanupStack::PopAndDestroy(&mtpExtensions);
+        }
+    else
+        {
+        __FLOG(_L8("Connect Mac = EFalse")); 
+        iDeviceInfo->SetUint32L(CMTPTypeDeviceInfo::EMTPVendorExtensionID, KMTPVendorExtensionId);
+        iDeviceInfo->SetUint16L(CMTPTypeDeviceInfo::EMTPVersion, KMTPVersion);        
+        iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EMTPExtensions, iDpSingletons.DeviceDataStore().MTPExtensions());  
+        }
+    
     iDeviceInfo->SetUint16L(CMTPTypeDeviceInfo::EFunctionalMode, EMTPFunctionalModeStandard);    
     iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EManufacturer, device.Manufacturer());
     iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EModel, device.Model());