- Add inquiry fields for the RemoteDevice, to store the information retrieved .
- Update those fields at discovering git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25006 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -54,6 +54,11 @@ class RemoteDevice {
|
|||||||
bdaddr_t fBdaddr;
|
bdaddr_t fBdaddr;
|
||||||
LocalDevice* fDiscovererLocalDevice;
|
LocalDevice* fDiscovererLocalDevice;
|
||||||
|
|
||||||
|
uint8 fPageRepetitionMode;
|
||||||
|
uint8 fScanPeriodMode;
|
||||||
|
uint8 fScanMode;
|
||||||
|
uint16 fClockOffset;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,12 @@ DiscoveryListener::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
if (bdaddrUtils::Compare( (bdaddr_t*) &inquiryInfo->bdaddr, &b1 )) {
|
if (bdaddrUtils::Compare( (bdaddr_t*) &inquiryInfo->bdaddr, &b1 )) {
|
||||||
|
|
||||||
|
// update these values
|
||||||
|
fRemoteDevicesList.ItemAt(index)->fPageRepetitionMode = inquiryInfo->pscan_rep_mode;
|
||||||
|
fRemoteDevicesList.ItemAt(index)->fScanPeriodMode = inquiryInfo->pscan_period_mode;
|
||||||
|
fRemoteDevicesList.ItemAt(index)->fScanMode = inquiryInfo->pscan_mode;
|
||||||
|
fRemoteDevicesList.ItemAt(index)->fClockOffset = inquiryInfo->clock_offset;
|
||||||
|
|
||||||
duplicatedFound = true;
|
duplicatedFound = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -92,10 +98,16 @@ DiscoveryListener::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
if (!duplicatedFound) {
|
if (!duplicatedFound) {
|
||||||
|
|
||||||
// DeviceClass(inquiryInfo->dev_class[0] | inquiryInfo->dev_class[1]<<8 | inquiryInfo->dev_class[2]<<16 )
|
// TODO: DeviceClass(inquiryInfo->dev_class[0] | inquiryInfo->dev_class[1]<<8 | inquiryInfo->dev_class[2]<<16 )
|
||||||
rd = new RemoteDevice(inquiryInfo->bdaddr);
|
rd = new RemoteDevice(inquiryInfo->bdaddr);
|
||||||
fRemoteDevicesList.AddItem(rd);
|
fRemoteDevicesList.AddItem(rd);
|
||||||
|
// keep all inquiry reported data
|
||||||
rd->SetLocalDeviceOwner(fLocalDevice);
|
rd->SetLocalDeviceOwner(fLocalDevice);
|
||||||
|
rd->fPageRepetitionMode = inquiryInfo->pscan_rep_mode;
|
||||||
|
rd->fScanPeriodMode = inquiryInfo->pscan_period_mode;
|
||||||
|
rd->fScanMode = inquiryInfo->pscan_mode;
|
||||||
|
rd->fClockOffset = inquiryInfo->clock_offset;
|
||||||
|
|
||||||
DeviceDiscovered( rd, DeviceClass(inquiryInfo->dev_class[0] |
|
DeviceDiscovered( rd, DeviceClass(inquiryInfo->dev_class[0] |
|
||||||
inquiryInfo->dev_class[1]<<8 |
|
inquiryInfo->dev_class[1]<<8 |
|
||||||
inquiryInfo->dev_class[2]<<16 ));
|
inquiryInfo->dev_class[2]<<16 ));
|
||||||
|
|||||||
Reference in New Issue
Block a user