Fix JamFile / style
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30337 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -4,5 +4,5 @@ UsePrivateHeaders bluetooth ;
|
|||||||
|
|
||||||
Addon ResetLocalDevice :
|
Addon ResetLocalDevice :
|
||||||
ResetLocalDevice.cpp
|
ResetLocalDevice.cpp
|
||||||
: be
|
: be libbluetooth.so
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
#include <CommandManager.h>
|
#include <CommandManager.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ResetLocalDeviceAddOn::ResetLocalDeviceAddOn()
|
ResetLocalDeviceAddOn::ResetLocalDeviceAddOn()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -43,27 +42,27 @@ ResetLocalDeviceAddOn::GetActionDescription()
|
|||||||
status_t
|
status_t
|
||||||
ResetLocalDeviceAddOn::TakeAction(LocalDevice* lDevice)
|
ResetLocalDeviceAddOn::TakeAction(LocalDevice* lDevice)
|
||||||
{
|
{
|
||||||
int8 bt_status = BT_ERROR;
|
int8 btStatus = BT_ERROR;
|
||||||
|
|
||||||
BMessenger* fMessenger = new BMessenger(BLUETOOTH_SIGNATURE);
|
BMessenger* fMessenger = new BMessenger(BLUETOOTH_SIGNATURE);
|
||||||
|
|
||||||
if (fMessenger == NULL || !fMessenger->IsValid())
|
if (fMessenger == NULL || !fMessenger->IsValid())
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
BluetoothCommand<> Reset(OGF_CONTROL_BASEBAND, OCF_RESET);
|
BluetoothCommand<> Reset(OGF_CONTROL_BASEBAND, OCF_RESET);
|
||||||
|
|
||||||
BMessage request(BT_MSG_HANDLE_SIMPLE_REQUEST);
|
BMessage request(BT_MSG_HANDLE_SIMPLE_REQUEST);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
request.AddInt32("hci_id", lDevice->GetID());
|
request.AddInt32("hci_id", lDevice->ID());
|
||||||
request.AddData("raw command", B_ANY_TYPE, Reset.Data(), Reset.Size());
|
request.AddData("raw command", B_ANY_TYPE, Reset.Data(), Reset.Size());
|
||||||
request.AddInt16("eventExpected", HCI_EVENT_CMD_COMPLETE);
|
request.AddInt16("eventExpected", HCI_EVENT_CMD_COMPLETE);
|
||||||
request.AddInt16("opcodeExpected", PACK_OPCODE(OGF_CONTROL_BASEBAND, OCF_RESET));
|
request.AddInt16("opcodeExpected", PACK_OPCODE(OGF_CONTROL_BASEBAND, OCF_RESET));
|
||||||
|
|
||||||
if (fMessenger->SendMessage(&request, &reply) == B_OK)
|
|
||||||
reply.FindInt8("status", &bt_status);
|
|
||||||
|
|
||||||
return bt_status;
|
if (fMessenger->SendMessage(&request, &reply) == B_OK)
|
||||||
|
reply.FindInt8("status", &btStatus);
|
||||||
|
|
||||||
|
return btStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user