That should've been eol-style :/
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26194 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,138 +1,138 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
* Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
||||||
*
|
*
|
||||||
* All rights reserved. Distributed under the terms of the MIT License.
|
* All rights reserved. Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bluetooth/DiscoveryAgent.h>
|
#include <bluetooth/DiscoveryAgent.h>
|
||||||
#include <bluetooth/DiscoveryListener.h>
|
#include <bluetooth/DiscoveryListener.h>
|
||||||
#include <bluetooth/RemoteDevice.h>
|
#include <bluetooth/RemoteDevice.h>
|
||||||
#include <bluetooth/LocalDevice.h>
|
#include <bluetooth/LocalDevice.h>
|
||||||
#include <bluetooth/bluetooth_error.h>
|
#include <bluetooth/bluetooth_error.h>
|
||||||
#include <bluetooth/HCI/btHCI_command.h>
|
#include <bluetooth/HCI/btHCI_command.h>
|
||||||
#include <bluetooth/HCI/btHCI_event.h>
|
#include <bluetooth/HCI/btHCI_event.h>
|
||||||
|
|
||||||
#include <bluetoothserver_p.h>
|
#include <bluetoothserver_p.h>
|
||||||
#include <CommandManager.h>
|
#include <CommandManager.h>
|
||||||
|
|
||||||
|
|
||||||
#include "KitSupport.h"
|
#include "KitSupport.h"
|
||||||
|
|
||||||
namespace Bluetooth {
|
namespace Bluetooth {
|
||||||
|
|
||||||
|
|
||||||
RemoteDevicesList
|
RemoteDevicesList
|
||||||
DiscoveryAgent::RetrieveDevices(int option)
|
DiscoveryAgent::RetrieveDevices(int option)
|
||||||
{
|
{
|
||||||
/* No inquiry process initiated */
|
/* No inquiry process initiated */
|
||||||
if (fLastUsedListener == NULL)
|
if (fLastUsedListener == NULL)
|
||||||
return NULL; // xxx: Fix me
|
return NULL; // xxx: Fix me
|
||||||
|
|
||||||
return fLastUsedListener->GetRemoteDevicesList();
|
return fLastUsedListener->GetRemoteDevicesList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
DiscoveryAgent::StartInquiry(int accessCode, DiscoveryListener* listener)
|
DiscoveryAgent::StartInquiry(int accessCode, DiscoveryListener* listener)
|
||||||
{
|
{
|
||||||
return StartInquiry(accessCode, listener, BT_DEFAULT_INQUIRY_TIME);
|
return StartInquiry(accessCode, listener, BT_DEFAULT_INQUIRY_TIME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
DiscoveryAgent::StartInquiry(uint32 accessCode, DiscoveryListener* listener, bigtime_t secs)
|
DiscoveryAgent::StartInquiry(uint32 accessCode, DiscoveryListener* listener, bigtime_t secs)
|
||||||
{
|
{
|
||||||
BMessenger* btsm = NULL;
|
BMessenger* btsm = NULL;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
if ((btsm = _RetrieveBluetoothMessenger()) == NULL)
|
if ((btsm = _RetrieveBluetoothMessenger()) == NULL)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
if (secs < 1 || secs > 61 )
|
if (secs < 1 || secs > 61 )
|
||||||
return B_TIMED_OUT;
|
return B_TIMED_OUT;
|
||||||
|
|
||||||
void* startInquiryCommand = NULL;
|
void* startInquiryCommand = NULL;
|
||||||
|
|
||||||
// keep the listener whats the current listener for our inquiry state
|
// keep the listener whats the current listener for our inquiry state
|
||||||
fLastUsedListener = listener;
|
fLastUsedListener = listener;
|
||||||
|
|
||||||
// Inform the listener who is gonna be its owner LocalDevice
|
// Inform the listener who is gonna be its owner LocalDevice
|
||||||
// and its discovered devices
|
// and its discovered devices
|
||||||
listener->SetLocalDeviceOwner(fLocalDevice);
|
listener->SetLocalDeviceOwner(fLocalDevice);
|
||||||
|
|
||||||
/* Issue inquiry command */
|
/* Issue inquiry command */
|
||||||
BMessage request(BT_MSG_HANDLE_SIMPLE_REQUEST);
|
BMessage request(BT_MSG_HANDLE_SIMPLE_REQUEST);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
request.AddInt32("hci_id", fLocalDevice->GetID());
|
request.AddInt32("hci_id", fLocalDevice->GetID());
|
||||||
|
|
||||||
startInquiryCommand = buildInquiry(accessCode, secs, BT_MAX_RESPONSES, &size);
|
startInquiryCommand = buildInquiry(accessCode, secs, BT_MAX_RESPONSES, &size);
|
||||||
|
|
||||||
// For stating the inquiry
|
// For stating the inquiry
|
||||||
request.AddData("raw command", B_ANY_TYPE, startInquiryCommand, size);
|
request.AddData("raw command", B_ANY_TYPE, startInquiryCommand, size);
|
||||||
request.AddInt16("eventExpected", HCI_EVENT_CMD_STATUS);
|
request.AddInt16("eventExpected", HCI_EVENT_CMD_STATUS);
|
||||||
request.AddInt16("opcodeExpected", PACK_OPCODE(OGF_LINK_CONTROL, OCF_INQUIRY));
|
request.AddInt16("opcodeExpected", PACK_OPCODE(OGF_LINK_CONTROL, OCF_INQUIRY));
|
||||||
|
|
||||||
// For getting each discovered message
|
// For getting each discovered message
|
||||||
request.AddInt16("eventExpected", HCI_EVENT_INQUIRY_RESULT);
|
request.AddInt16("eventExpected", HCI_EVENT_INQUIRY_RESULT);
|
||||||
|
|
||||||
// For finishing each discovered message
|
// For finishing each discovered message
|
||||||
request.AddInt16("eventExpected", HCI_EVENT_INQUIRY_COMPLETE);
|
request.AddInt16("eventExpected", HCI_EVENT_INQUIRY_COMPLETE);
|
||||||
|
|
||||||
|
|
||||||
if (btsm->SendMessage(&request, listener) == B_OK)
|
if (btsm->SendMessage(&request, listener) == B_OK)
|
||||||
{
|
{
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
DiscoveryAgent::CancelInquiry(DiscoveryListener* listener)
|
DiscoveryAgent::CancelInquiry(DiscoveryListener* listener)
|
||||||
{
|
{
|
||||||
BMessenger* btsm = NULL; //TODO: this should be a member field
|
BMessenger* btsm = NULL; //TODO: this should be a member field
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
if ((btsm = _RetrieveBluetoothMessenger()) == NULL)
|
if ((btsm = _RetrieveBluetoothMessenger()) == NULL)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
void* cancelInquiryCommand = NULL;
|
void* cancelInquiryCommand = NULL;
|
||||||
int8 bt_status = BT_ERROR;
|
int8 bt_status = BT_ERROR;
|
||||||
|
|
||||||
/* Issue inquiry command */
|
/* Issue inquiry command */
|
||||||
BMessage request(BT_MSG_HANDLE_SIMPLE_REQUEST);
|
BMessage request(BT_MSG_HANDLE_SIMPLE_REQUEST);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
request.AddInt32("hci_id", fLocalDevice->GetID());
|
request.AddInt32("hci_id", fLocalDevice->GetID());
|
||||||
|
|
||||||
cancelInquiryCommand = buildInquiryCancel(&size);
|
cancelInquiryCommand = buildInquiryCancel(&size);
|
||||||
request.AddData("raw command", B_ANY_TYPE, cancelInquiryCommand, size);
|
request.AddData("raw command", B_ANY_TYPE, cancelInquiryCommand, size);
|
||||||
request.AddInt16("eventExpected", HCI_EVENT_CMD_STATUS);
|
request.AddInt16("eventExpected", HCI_EVENT_CMD_STATUS);
|
||||||
request.AddInt16("opcodeExpected", PACK_OPCODE(OGF_LINK_CONTROL, OCF_INQUIRY_CANCEL));
|
request.AddInt16("opcodeExpected", PACK_OPCODE(OGF_LINK_CONTROL, OCF_INQUIRY_CANCEL));
|
||||||
|
|
||||||
if (btsm->SendMessage(&request, &reply) == B_OK) {
|
if (btsm->SendMessage(&request, &reply) == B_OK) {
|
||||||
if (reply.FindInt8("status", &bt_status ) == B_OK ) {
|
if (reply.FindInt8("status", &bt_status ) == B_OK ) {
|
||||||
return bt_status;
|
return bt_status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DiscoveryAgent::SetLocalDeviceOwner(LocalDevice* ld)
|
DiscoveryAgent::SetLocalDeviceOwner(LocalDevice* ld)
|
||||||
{
|
{
|
||||||
fLocalDevice = ld;
|
fLocalDevice = ld;
|
||||||
}
|
}
|
||||||
|
|
||||||
DiscoveryAgent::DiscoveryAgent(LocalDevice* ld)
|
DiscoveryAgent::DiscoveryAgent(LocalDevice* ld)
|
||||||
{
|
{
|
||||||
fLocalDevice = ld;
|
fLocalDevice = ld;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,161 +1,161 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
||||||
*
|
*
|
||||||
* All rights reserved. Distributed under the terms of the MIT License.
|
* All rights reserved. Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bluetooth/DiscoveryAgent.h>
|
#include <bluetooth/DiscoveryAgent.h>
|
||||||
#include <bluetooth/DiscoveryListener.h>
|
#include <bluetooth/DiscoveryListener.h>
|
||||||
#include <bluetooth/RemoteDevice.h>
|
#include <bluetooth/RemoteDevice.h>
|
||||||
#include <bluetooth/DeviceClass.h>
|
#include <bluetooth/DeviceClass.h>
|
||||||
#include <bluetooth/bdaddrUtils.h>
|
#include <bluetooth/bdaddrUtils.h>
|
||||||
|
|
||||||
#include <bluetooth/HCI/btHCI_event.h>
|
#include <bluetooth/HCI/btHCI_event.h>
|
||||||
|
|
||||||
#include <bluetoothserver_p.h>
|
#include <bluetoothserver_p.h>
|
||||||
|
|
||||||
#include <Message.h>
|
#include <Message.h>
|
||||||
|
|
||||||
namespace Bluetooth {
|
namespace Bluetooth {
|
||||||
|
|
||||||
|
|
||||||
/* hooks */
|
/* hooks */
|
||||||
void
|
void
|
||||||
DiscoveryListener::DeviceDiscovered(RemoteDevice* btDevice, DeviceClass cod)
|
DiscoveryListener::DeviceDiscovered(RemoteDevice* btDevice, DeviceClass cod)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DiscoveryListener::InquiryStarted(status_t status)
|
DiscoveryListener::InquiryStarted(status_t status)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DiscoveryListener::InquiryCompleted(int discType)
|
DiscoveryListener::InquiryCompleted(int discType)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* private */
|
/* private */
|
||||||
|
|
||||||
/* A LocalDevice is always referenced in any request to the
|
/* A LocalDevice is always referenced in any request to the
|
||||||
Bluetooth server therefore is going to be needed in any */
|
Bluetooth server therefore is going to be needed in any */
|
||||||
void
|
void
|
||||||
DiscoveryListener::SetLocalDeviceOwner(LocalDevice* ld)
|
DiscoveryListener::SetLocalDeviceOwner(LocalDevice* ld)
|
||||||
{
|
{
|
||||||
fLocalDevice = ld;
|
fLocalDevice = ld;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RemoteDevicesList
|
RemoteDevicesList
|
||||||
DiscoveryListener::GetRemoteDevicesList(void)
|
DiscoveryListener::GetRemoteDevicesList(void)
|
||||||
{
|
{
|
||||||
return fRemoteDevicesList;
|
return fRemoteDevicesList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DiscoveryListener::MessageReceived(BMessage* message)
|
DiscoveryListener::MessageReceived(BMessage* message)
|
||||||
{
|
{
|
||||||
int8 status;
|
int8 status;
|
||||||
|
|
||||||
switch (message->what)
|
switch (message->what)
|
||||||
{
|
{
|
||||||
case BT_MSG_INQUIRY_DEVICE:
|
case BT_MSG_INQUIRY_DEVICE:
|
||||||
{
|
{
|
||||||
const struct inquiry_info* inquiryInfo;
|
const struct inquiry_info* inquiryInfo;
|
||||||
ssize_t size;
|
ssize_t size;
|
||||||
RemoteDevice* rd = NULL;
|
RemoteDevice* rd = NULL;
|
||||||
bool duplicatedFound = false;
|
bool duplicatedFound = false;
|
||||||
|
|
||||||
if (message->FindData("info", B_ANY_TYPE, 0, (const void**)&inquiryInfo, &size) == B_OK )
|
if (message->FindData("info", B_ANY_TYPE, 0, (const void**)&inquiryInfo, &size) == B_OK )
|
||||||
{
|
{
|
||||||
|
|
||||||
// Skip duplicated replies
|
// Skip duplicated replies
|
||||||
for (int32 index = 0 ; index < fRemoteDevicesList.CountItems(); index++) {
|
for (int32 index = 0 ; index < fRemoteDevicesList.CountItems(); index++) {
|
||||||
|
|
||||||
bdaddr_t b1 = fRemoteDevicesList.ItemAt(index)->GetBluetoothAddress();
|
bdaddr_t b1 = fRemoteDevicesList.ItemAt(index)->GetBluetoothAddress();
|
||||||
|
|
||||||
if (bdaddrUtils::Compare( (bdaddr_t*) &inquiryInfo->bdaddr, &b1 )) {
|
if (bdaddrUtils::Compare( (bdaddr_t*) &inquiryInfo->bdaddr, &b1 )) {
|
||||||
|
|
||||||
// update these values
|
// update these values
|
||||||
fRemoteDevicesList.ItemAt(index)->fPageRepetitionMode = inquiryInfo->pscan_rep_mode;
|
fRemoteDevicesList.ItemAt(index)->fPageRepetitionMode = inquiryInfo->pscan_rep_mode;
|
||||||
fRemoteDevicesList.ItemAt(index)->fScanPeriodMode = inquiryInfo->pscan_period_mode;
|
fRemoteDevicesList.ItemAt(index)->fScanPeriodMode = inquiryInfo->pscan_period_mode;
|
||||||
fRemoteDevicesList.ItemAt(index)->fScanMode = inquiryInfo->pscan_mode;
|
fRemoteDevicesList.ItemAt(index)->fScanMode = inquiryInfo->pscan_mode;
|
||||||
fRemoteDevicesList.ItemAt(index)->fClockOffset = inquiryInfo->clock_offset;
|
fRemoteDevicesList.ItemAt(index)->fClockOffset = inquiryInfo->clock_offset;
|
||||||
|
|
||||||
duplicatedFound = true;
|
duplicatedFound = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!duplicatedFound) {
|
if (!duplicatedFound) {
|
||||||
|
|
||||||
// TODO: 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
|
// keep all inquiry reported data
|
||||||
rd->SetLocalDeviceOwner(fLocalDevice);
|
rd->SetLocalDeviceOwner(fLocalDevice);
|
||||||
rd->fPageRepetitionMode = inquiryInfo->pscan_rep_mode;
|
rd->fPageRepetitionMode = inquiryInfo->pscan_rep_mode;
|
||||||
rd->fScanPeriodMode = inquiryInfo->pscan_period_mode;
|
rd->fScanPeriodMode = inquiryInfo->pscan_period_mode;
|
||||||
rd->fScanMode = inquiryInfo->pscan_mode;
|
rd->fScanMode = inquiryInfo->pscan_mode;
|
||||||
rd->fClockOffset = inquiryInfo->clock_offset;
|
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 ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BT_MSG_INQUIRY_STARTED:
|
case BT_MSG_INQUIRY_STARTED:
|
||||||
if (message->FindInt8("status", &status) == B_OK){
|
if (message->FindInt8("status", &status) == B_OK){
|
||||||
fRemoteDevicesList.MakeEmpty();
|
fRemoteDevicesList.MakeEmpty();
|
||||||
InquiryStarted(status);
|
InquiryStarted(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BT_MSG_INQUIRY_COMPLETED:
|
case BT_MSG_INQUIRY_COMPLETED:
|
||||||
|
|
||||||
InquiryCompleted(BT_INQUIRY_COMPLETED);
|
InquiryCompleted(BT_INQUIRY_COMPLETED);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case BT_MSG_INQUIRY_TERMINATED: /* inquiry was cancelled */
|
case BT_MSG_INQUIRY_TERMINATED: /* inquiry was cancelled */
|
||||||
|
|
||||||
InquiryCompleted(BT_INQUIRY_TERMINATED);
|
InquiryCompleted(BT_INQUIRY_TERMINATED);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case BT_MSG_INQUIRY_ERROR:
|
case BT_MSG_INQUIRY_ERROR:
|
||||||
|
|
||||||
InquiryCompleted(BT_INQUIRY_ERROR);
|
InquiryCompleted(BT_INQUIRY_ERROR);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
BLooper::MessageReceived(message);
|
BLooper::MessageReceived(message);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DiscoveryListener::DiscoveryListener() : BLooper() , fRemoteDevicesList(BT_MAX_RESPONSES)
|
DiscoveryListener::DiscoveryListener() : BLooper() , fRemoteDevicesList(BT_MAX_RESPONSES)
|
||||||
{
|
{
|
||||||
// TODO: Make a better handling of the running not running state
|
// TODO: Make a better handling of the running not running state
|
||||||
Run();
|
Run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+265
-265
@@ -1,265 +1,265 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
||||||
*
|
*
|
||||||
* All rights reserved. Distributed under the terms of the MIT License.
|
* All rights reserved. Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <bluetooth/bluetooth_error.h>
|
#include <bluetooth/bluetooth_error.h>
|
||||||
|
|
||||||
#include <bluetooth/HCI/btHCI_command.h>
|
#include <bluetooth/HCI/btHCI_command.h>
|
||||||
#include <bluetooth/HCI/btHCI_event.h>
|
#include <bluetooth/HCI/btHCI_event.h>
|
||||||
|
|
||||||
#include <bluetooth/LocalDevice.h>
|
#include <bluetooth/LocalDevice.h>
|
||||||
#include <bluetooth/RemoteDevice.h>
|
#include <bluetooth/RemoteDevice.h>
|
||||||
#include <bluetooth/DeviceClass.h>
|
#include <bluetooth/DeviceClass.h>
|
||||||
#include <bluetooth/DiscoveryAgent.h>
|
#include <bluetooth/DiscoveryAgent.h>
|
||||||
|
|
||||||
#include <bluetooth/bdaddrUtils.h>
|
#include <bluetooth/bdaddrUtils.h>
|
||||||
#include <bluetoothserver_p.h>
|
#include <bluetoothserver_p.h>
|
||||||
#include <CommandManager.h>
|
#include <CommandManager.h>
|
||||||
|
|
||||||
#include "KitSupport.h"
|
#include "KitSupport.h"
|
||||||
|
|
||||||
/* TODO: remove me */
|
/* TODO: remove me */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
namespace Bluetooth {
|
namespace Bluetooth {
|
||||||
|
|
||||||
BMessenger* LocalDevice::sfMessenger = NULL;
|
BMessenger* LocalDevice::sfMessenger = NULL;
|
||||||
|
|
||||||
|
|
||||||
LocalDevice*
|
LocalDevice*
|
||||||
LocalDevice::RequestLocalDeviceID(BMessage* request)
|
LocalDevice::RequestLocalDeviceID(BMessage* request)
|
||||||
{
|
{
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
hci_id hid;
|
hci_id hid;
|
||||||
|
|
||||||
if (sfMessenger->SendMessage(request, &reply) == B_OK &&
|
if (sfMessenger->SendMessage(request, &reply) == B_OK &&
|
||||||
reply.FindInt32("hci_id", &hid) == B_OK ){
|
reply.FindInt32("hci_id", &hid) == B_OK ){
|
||||||
|
|
||||||
if (hid >= 0) {
|
if (hid >= 0) {
|
||||||
return new LocalDevice(hid);
|
return new LocalDevice(hid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#pragma -
|
#pragma -
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
LocalDevice*
|
LocalDevice*
|
||||||
LocalDevice::GetLocalDevice()
|
LocalDevice::GetLocalDevice()
|
||||||
{
|
{
|
||||||
if ((sfMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
if ((sfMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
BMessage request(BT_MSG_ACQUIRE_LOCAL_DEVICE);
|
BMessage request(BT_MSG_ACQUIRE_LOCAL_DEVICE);
|
||||||
|
|
||||||
return RequestLocalDeviceID(&request);
|
return RequestLocalDeviceID(&request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LocalDevice*
|
LocalDevice*
|
||||||
LocalDevice::GetLocalDevice(hci_id hid)
|
LocalDevice::GetLocalDevice(hci_id hid)
|
||||||
{
|
{
|
||||||
if ((sfMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
if ((sfMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
BMessage request(BT_MSG_ACQUIRE_LOCAL_DEVICE);
|
BMessage request(BT_MSG_ACQUIRE_LOCAL_DEVICE);
|
||||||
request.AddInt32("hci_id", hid);
|
request.AddInt32("hci_id", hid);
|
||||||
|
|
||||||
return RequestLocalDeviceID(&request);
|
return RequestLocalDeviceID(&request);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LocalDevice*
|
LocalDevice*
|
||||||
LocalDevice::GetLocalDevice(bdaddr_t bdaddr)
|
LocalDevice::GetLocalDevice(bdaddr_t bdaddr)
|
||||||
{
|
{
|
||||||
if ((sfMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
if ((sfMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
BMessage request(BT_MSG_ACQUIRE_LOCAL_DEVICE);
|
BMessage request(BT_MSG_ACQUIRE_LOCAL_DEVICE);
|
||||||
request.AddData("bdaddr", B_ANY_TYPE, &bdaddr, sizeof(bdaddr_t));
|
request.AddData("bdaddr", B_ANY_TYPE, &bdaddr, sizeof(bdaddr_t));
|
||||||
|
|
||||||
|
|
||||||
return RequestLocalDeviceID(&request);
|
return RequestLocalDeviceID(&request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32
|
uint32
|
||||||
LocalDevice::GetLocalDeviceCount()
|
LocalDevice::GetLocalDeviceCount()
|
||||||
{
|
{
|
||||||
if ((sfMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
if ((sfMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
BMessage request(BT_MSG_COUNT_LOCAL_DEVICES);
|
BMessage request(BT_MSG_COUNT_LOCAL_DEVICES);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
if (sfMessenger->SendMessage(&request, &reply) == B_OK)
|
if (sfMessenger->SendMessage(&request, &reply) == B_OK)
|
||||||
return reply.FindInt32("count");
|
return reply.FindInt32("count");
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DiscoveryAgent*
|
DiscoveryAgent*
|
||||||
LocalDevice::GetDiscoveryAgent()
|
LocalDevice::GetDiscoveryAgent()
|
||||||
{
|
{
|
||||||
/* TODO: Study a singleton here */
|
/* TODO: Study a singleton here */
|
||||||
return new DiscoveryAgent(this);
|
return new DiscoveryAgent(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BString
|
BString
|
||||||
LocalDevice::GetProperty(const char* property)
|
LocalDevice::GetProperty(const char* property)
|
||||||
{
|
{
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
LocalDevice::GetProperty(const char* property, uint32* value)
|
LocalDevice::GetProperty(const char* property, uint32* value)
|
||||||
{
|
{
|
||||||
|
|
||||||
*value = 0;
|
*value = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
LocalDevice::GetDiscoverable()
|
LocalDevice::GetDiscoverable()
|
||||||
{
|
{
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
LocalDevice::SetDiscoverable(int mode)
|
LocalDevice::SetDiscoverable(int mode)
|
||||||
{
|
{
|
||||||
if ((fMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
if ((fMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
BMessage request(BT_MSG_HANDLE_SIMPLE_REQUEST);
|
BMessage request(BT_MSG_HANDLE_SIMPLE_REQUEST);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
size_t size;
|
size_t size;
|
||||||
int8 bt_status = BT_ERROR;
|
int8 bt_status = BT_ERROR;
|
||||||
|
|
||||||
|
|
||||||
request.AddInt32("hci_id", hid);
|
request.AddInt32("hci_id", hid);
|
||||||
|
|
||||||
|
|
||||||
void* command = buildWriteScan(mode, &size);
|
void* command = buildWriteScan(mode, &size);
|
||||||
|
|
||||||
if (command == NULL) {
|
if (command == NULL) {
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
request.AddData("raw command", B_ANY_TYPE, command, size);
|
request.AddData("raw command", B_ANY_TYPE, command, size);
|
||||||
request.AddInt16("eventExpected", HCI_EVENT_CMD_COMPLETE);
|
request.AddInt16("eventExpected", HCI_EVENT_CMD_COMPLETE);
|
||||||
request.AddInt16("opcodeExpected", PACK_OPCODE(OGF_CONTROL_BASEBAND, OCF_WRITE_SCAN_ENABLE));
|
request.AddInt16("opcodeExpected", PACK_OPCODE(OGF_CONTROL_BASEBAND, OCF_WRITE_SCAN_ENABLE));
|
||||||
|
|
||||||
if (fMessenger->SendMessage(&request, &reply) == B_OK) {
|
if (fMessenger->SendMessage(&request, &reply) == B_OK) {
|
||||||
if (reply.FindInt8("status", &bt_status ) == B_OK ) {
|
if (reply.FindInt8("status", &bt_status ) == B_OK ) {
|
||||||
return bt_status;
|
return bt_status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bdaddr_t
|
bdaddr_t
|
||||||
LocalDevice::GetBluetoothAddress()
|
LocalDevice::GetBluetoothAddress()
|
||||||
{
|
{
|
||||||
if ((fMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
if ((fMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
||||||
return bdaddrUtils::NullAddress();
|
return bdaddrUtils::NullAddress();
|
||||||
|
|
||||||
const bdaddr_t* bdaddr;
|
const bdaddr_t* bdaddr;
|
||||||
BMessage request(BT_MSG_GET_ADDRESS);
|
BMessage request(BT_MSG_GET_ADDRESS);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
ssize_t size;
|
ssize_t size;
|
||||||
|
|
||||||
/* ADD ID */
|
/* ADD ID */
|
||||||
request.AddInt32("hci_id", hid);
|
request.AddInt32("hci_id", hid);
|
||||||
|
|
||||||
if (fMessenger->SendMessage(&request, &reply) == B_OK) {
|
if (fMessenger->SendMessage(&request, &reply) == B_OK) {
|
||||||
|
|
||||||
if (reply.FindData("bdaddr", B_ANY_TYPE, 0, (const void**)&bdaddr, &size) == B_OK ){
|
if (reply.FindData("bdaddr", B_ANY_TYPE, 0, (const void**)&bdaddr, &size) == B_OK ){
|
||||||
|
|
||||||
return *bdaddr;
|
return *bdaddr;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return bdaddrUtils::NullAddress();
|
return bdaddrUtils::NullAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return bdaddrUtils::NullAddress();
|
return bdaddrUtils::NullAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BString
|
BString
|
||||||
LocalDevice::GetFriendlyName()
|
LocalDevice::GetFriendlyName()
|
||||||
{
|
{
|
||||||
if ((fMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
if ((fMessenger = _RetrieveBluetoothMessenger()) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
BString friendlyname;
|
BString friendlyname;
|
||||||
BMessage request(BT_MSG_GET_FRIENDLY_NAME);
|
BMessage request(BT_MSG_GET_FRIENDLY_NAME);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
/* ADD ID */
|
/* ADD ID */
|
||||||
request.AddInt32("hci_id", hid);
|
request.AddInt32("hci_id", hid);
|
||||||
|
|
||||||
if (fMessenger->SendMessage(&request, &reply) == B_OK &&
|
if (fMessenger->SendMessage(&request, &reply) == B_OK &&
|
||||||
reply.FindString("friendlyname", &friendlyname) == B_OK ){
|
reply.FindString("friendlyname", &friendlyname) == B_OK ){
|
||||||
|
|
||||||
return friendlyname;
|
return friendlyname;
|
||||||
}
|
}
|
||||||
|
|
||||||
return BString("Unknown");
|
return BString("Unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DeviceClass
|
DeviceClass
|
||||||
LocalDevice::GetDeviceClass()
|
LocalDevice::GetDeviceClass()
|
||||||
{
|
{
|
||||||
|
|
||||||
return DeviceClass(0);
|
return DeviceClass(0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ServiceRecord
|
ServiceRecord
|
||||||
LocalDevice::getRecord(Connection notifier) {
|
LocalDevice::getRecord(Connection notifier) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
LocalDevice::updateRecord(ServiceRecord srvRecord) {
|
LocalDevice::updateRecord(ServiceRecord srvRecord) {
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
LocalDevice::LocalDevice(hci_id hid) : hid(hid)
|
LocalDevice::LocalDevice(hci_id hid) : hid(hid)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+187
-187
@@ -1,187 +1,187 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
* Copyright 2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
||||||
*
|
*
|
||||||
* All rights reserved. Distributed under the terms of the MIT License.
|
* All rights reserved. Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <bluetooth/DiscoveryAgent.h>
|
#include <bluetooth/DiscoveryAgent.h>
|
||||||
#include <bluetooth/DiscoveryListener.h>
|
#include <bluetooth/DiscoveryListener.h>
|
||||||
#include <bluetooth/bdaddrUtils.h>
|
#include <bluetooth/bdaddrUtils.h>
|
||||||
#include <bluetooth/LocalDevice.h>
|
#include <bluetooth/LocalDevice.h>
|
||||||
|
|
||||||
#include <bluetooth/RemoteDevice.h>
|
#include <bluetooth/RemoteDevice.h>
|
||||||
|
|
||||||
#include <bluetoothserver_p.h>
|
#include <bluetoothserver_p.h>
|
||||||
#include <bluetooth/HCI/btHCI_command.h>
|
#include <bluetooth/HCI/btHCI_command.h>
|
||||||
#include <bluetooth/HCI/btHCI_event.h>
|
#include <bluetooth/HCI/btHCI_event.h>
|
||||||
#include <CommandManager.h>
|
#include <CommandManager.h>
|
||||||
|
|
||||||
#include "KitSupport.h"
|
#include "KitSupport.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace Bluetooth {
|
namespace Bluetooth {
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RemoteDevice::IsTrustedDevice(void)
|
RemoteDevice::IsTrustedDevice(void)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BString
|
BString
|
||||||
RemoteDevice::GetFriendlyName(bool alwaysAsk)
|
RemoteDevice::GetFriendlyName(bool alwaysAsk)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!alwaysAsk) {
|
if (!alwaysAsk) {
|
||||||
// Check if the name is already retrieved
|
// Check if the name is already retrieved
|
||||||
return BString("Not implemented");
|
return BString("Not implemented");
|
||||||
|
|
||||||
// TODO: Check if It is known from a KnownDevicesList
|
// TODO: Check if It is known from a KnownDevicesList
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fDiscovererLocalDevice == NULL)
|
if (fDiscovererLocalDevice == NULL)
|
||||||
return BString("#NoOwnerError#Not Valid name");
|
return BString("#NoOwnerError#Not Valid name");
|
||||||
|
|
||||||
BMessenger* btsm = NULL;
|
BMessenger* btsm = NULL;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
if ((btsm = _RetrieveBluetoothMessenger()) == NULL)
|
if ((btsm = _RetrieveBluetoothMessenger()) == NULL)
|
||||||
return BString("#ServerNotReady#Not Valid name");
|
return BString("#ServerNotReady#Not Valid name");
|
||||||
|
|
||||||
void* remoteNameCommand = NULL;
|
void* remoteNameCommand = NULL;
|
||||||
|
|
||||||
/* Issue inquiry command */
|
/* Issue inquiry command */
|
||||||
BMessage request(BT_MSG_HANDLE_SIMPLE_REQUEST);
|
BMessage request(BT_MSG_HANDLE_SIMPLE_REQUEST);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
request.AddInt32("hci_id", fDiscovererLocalDevice->GetID());
|
request.AddInt32("hci_id", fDiscovererLocalDevice->GetID());
|
||||||
|
|
||||||
// Fill the request
|
// Fill the request
|
||||||
remoteNameCommand = buildRemoteNameRequest(fBdaddr, fPageRepetitionMode, fClockOffset, &size); // Fill correctily
|
remoteNameCommand = buildRemoteNameRequest(fBdaddr, fPageRepetitionMode, fClockOffset, &size); // Fill correctily
|
||||||
|
|
||||||
request.AddData("raw command", B_ANY_TYPE, remoteNameCommand, size);
|
request.AddData("raw command", B_ANY_TYPE, remoteNameCommand, size);
|
||||||
|
|
||||||
request.AddInt16("eventExpected", HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE);
|
request.AddInt16("eventExpected", HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE);
|
||||||
//request.AddInt16("opcodeExpected", PACK_OPCODE(OGF_LINK_CONTROL, OCF_REMOTE_NAME_REQUEST));
|
//request.AddInt16("opcodeExpected", PACK_OPCODE(OGF_LINK_CONTROL, OCF_REMOTE_NAME_REQUEST));
|
||||||
|
|
||||||
if (btsm->SendMessage(&request, &reply) == B_OK)
|
if (btsm->SendMessage(&request, &reply) == B_OK)
|
||||||
{
|
{
|
||||||
BString name;
|
BString name;
|
||||||
int8 status;
|
int8 status;
|
||||||
|
|
||||||
if (reply.FindInt8("status", &status) == B_OK &&
|
if (reply.FindInt8("status", &status) == B_OK &&
|
||||||
reply.FindString("friendlyname", &name) == B_OK ) {
|
reply.FindString("friendlyname", &name) == B_OK ) {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return BString("#NotCompletedRequestr#Not Valid name");
|
return BString("#NotCompletedRequestr#Not Valid name");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BString
|
BString
|
||||||
RemoteDevice::GetFriendlyName()
|
RemoteDevice::GetFriendlyName()
|
||||||
{
|
{
|
||||||
return GetFriendlyName(true);
|
return GetFriendlyName(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bdaddr_t
|
bdaddr_t
|
||||||
RemoteDevice::GetBluetoothAddress()
|
RemoteDevice::GetBluetoothAddress()
|
||||||
{
|
{
|
||||||
return fBdaddr;
|
return fBdaddr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RemoteDevice::Equals(RemoteDevice* obj)
|
RemoteDevice::Equals(RemoteDevice* obj)
|
||||||
{
|
{
|
||||||
bdaddr_t ba = obj->GetBluetoothAddress();
|
bdaddr_t ba = obj->GetBluetoothAddress();
|
||||||
|
|
||||||
return bdaddrUtils::Compare(&fBdaddr, &ba);
|
return bdaddrUtils::Compare(&fBdaddr, &ba);
|
||||||
}
|
}
|
||||||
|
|
||||||
// static RemoteDevice* GetRemoteDevice(Connection conn);
|
// static RemoteDevice* GetRemoteDevice(Connection conn);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RemoteDevice::Authenticate()
|
RemoteDevice::Authenticate()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// bool Authorize(Connection conn);
|
// bool Authorize(Connection conn);
|
||||||
// bool Encrypt(Connection conn, bool on);
|
// bool Encrypt(Connection conn, bool on);
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RemoteDevice::IsAuthenticated()
|
RemoteDevice::IsAuthenticated()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// bool IsAuthorized(Connection conn);
|
// bool IsAuthorized(Connection conn);
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RemoteDevice::IsEncrypted()
|
RemoteDevice::IsEncrypted()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalDevice*
|
LocalDevice*
|
||||||
RemoteDevice::GetLocalDeviceOwner()
|
RemoteDevice::GetLocalDeviceOwner()
|
||||||
{
|
{
|
||||||
return fDiscovererLocalDevice;
|
return fDiscovererLocalDevice;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Private */
|
/* Private */
|
||||||
void
|
void
|
||||||
RemoteDevice::SetLocalDeviceOwner(LocalDevice* ld)
|
RemoteDevice::SetLocalDeviceOwner(LocalDevice* ld)
|
||||||
{
|
{
|
||||||
fDiscovererLocalDevice = ld;
|
fDiscovererLocalDevice = ld;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Constructor */
|
/* Constructor */
|
||||||
RemoteDevice::RemoteDevice(bdaddr_t address)
|
RemoteDevice::RemoteDevice(bdaddr_t address)
|
||||||
{
|
{
|
||||||
fBdaddr = address;
|
fBdaddr = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RemoteDevice::RemoteDevice(BString address)
|
RemoteDevice::RemoteDevice(BString address)
|
||||||
{
|
{
|
||||||
/* TODO */
|
/* TODO */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BString
|
BString
|
||||||
RemoteDevice::GetProperty(const char* property) /* Throwing */
|
RemoteDevice::GetProperty(const char* property) /* Throwing */
|
||||||
{
|
{
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RemoteDevice::GetProperty(const char* property, uint32* value) /* Throwing */
|
RemoteDevice::GetProperty(const char* property, uint32* value) /* Throwing */
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DeviceClass
|
DeviceClass
|
||||||
RemoteDevice::GetDeviceClass()
|
RemoteDevice::GetDeviceClass()
|
||||||
{
|
{
|
||||||
return fDeviceClass;
|
return fDeviceClass;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user