46 |
46 |
47 /** |
47 /** |
48 This identifies the PTP vendor-extension version that are in use by this device |
48 This identifies the PTP vendor-extension version that are in use by this device |
49 */ |
49 */ |
50 static const TUint32 KMTPVendorExtensionId = 0x00000006; |
50 static const TUint32 KMTPVendorExtensionId = 0x00000006; |
|
51 static const TUint32 KMTPVendorExtensionId_Mac = 0xFFFFFFFF; |
51 |
52 |
52 /** |
53 /** |
53 This identifies, in hundredths, the version of the MTP standard that this device supports |
54 This identifies, in hundredths, the version of the MTP standard that this device supports |
54 */ |
55 */ |
55 static const TUint16 KMTPVersion = 100; // Currently 100 |
56 static const TUint16 KMTPVersion = 100; // Currently 100 |
124 void CMTPGetDeviceInfo::BuildDeviceInfoL() |
125 void CMTPGetDeviceInfo::BuildDeviceInfoL() |
125 { |
126 { |
126 __FLOG(_L8("BuildDeviceInfoL - Entry")); |
127 __FLOG(_L8("BuildDeviceInfoL - Entry")); |
127 CMTPDeviceDataStore& device(iDpSingletons.DeviceDataStore()); |
128 CMTPDeviceDataStore& device(iDpSingletons.DeviceDataStore()); |
128 iDeviceInfo->SetUint16L(CMTPTypeDeviceInfo::EStandardVersion, KMTPStandardVersion); |
129 iDeviceInfo->SetUint16L(CMTPTypeDeviceInfo::EStandardVersion, KMTPStandardVersion); |
129 iDeviceInfo->SetUint32L(CMTPTypeDeviceInfo::EMTPVendorExtensionID, KMTPVendorExtensionId); |
130 |
130 iDeviceInfo->SetUint16L(CMTPTypeDeviceInfo::EMTPVersion, KMTPVersion); |
131 if(iDpSingletons.DeviceDataStore().IsConnectMac()) |
131 iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EMTPExtensions, iDpSingletons.DeviceDataStore().MTPExtensions()); |
132 { |
|
133 __FLOG(_L8("Connect Mac = ETrue")); |
|
134 iDeviceInfo->SetUint32L(CMTPTypeDeviceInfo::EMTPVendorExtensionID, KMTPVendorExtensionId_Mac); |
|
135 iDeviceInfo->SetUint16L(CMTPTypeDeviceInfo::EMTPVersion, KMTPVersion); |
|
136 RBuf mtpExtensions; |
|
137 mtpExtensions.CleanupClosePushL(); |
|
138 mtpExtensions.CreateL(0); |
|
139 iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EMTPExtensions, mtpExtensions); |
|
140 CleanupStack::PopAndDestroy(&mtpExtensions); |
|
141 } |
|
142 else |
|
143 { |
|
144 __FLOG(_L8("Connect Mac = EFalse")); |
|
145 iDeviceInfo->SetUint32L(CMTPTypeDeviceInfo::EMTPVendorExtensionID, KMTPVendorExtensionId); |
|
146 iDeviceInfo->SetUint16L(CMTPTypeDeviceInfo::EMTPVersion, KMTPVersion); |
|
147 iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EMTPExtensions, iDpSingletons.DeviceDataStore().MTPExtensions()); |
|
148 } |
|
149 |
132 iDeviceInfo->SetUint16L(CMTPTypeDeviceInfo::EFunctionalMode, EMTPFunctionalModeStandard); |
150 iDeviceInfo->SetUint16L(CMTPTypeDeviceInfo::EFunctionalMode, EMTPFunctionalModeStandard); |
133 iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EManufacturer, device.Manufacturer()); |
151 iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EManufacturer, device.Manufacturer()); |
134 iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EModel, device.Model()); |
152 iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EModel, device.Model()); |
135 iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EDeviceVersion, device.DeviceVersion()); |
153 iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::EDeviceVersion, device.DeviceVersion()); |
136 iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::ESerialNumber, device.SerialNumber()); |
154 iDeviceInfo->SetStringL(CMTPTypeDeviceInfo::ESerialNumber, device.SerialNumber()); |