- 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:
parent
b5a945d648
commit
fae5a1d349
@ -53,6 +53,11 @@ class RemoteDevice {
|
||||
|
||||
bdaddr_t fBdaddr;
|
||||
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 )) {
|
||||
|
||||
// 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;
|
||||
break;
|
||||
}
|
||||
@ -92,10 +98,16 @@ DiscoveryListener::MessageReceived(BMessage* message)
|
||||
|
||||
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);
|
||||
fRemoteDevicesList.AddItem(rd);
|
||||
// keep all inquiry reported data
|
||||
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] |
|
||||
inquiryInfo->dev_class[1]<<8 |
|
||||
inquiryInfo->dev_class[2]<<16 ));
|
||||
|
Loading…
Reference in New Issue
Block a user