- Run the Looper

- Create Agent from the LocalDevice
- Fix constructors



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24977 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Ruiz Dorantes 2008-04-15 22:31:54 +00:00
parent be79ee53e1
commit 078958f502
3 changed files with 13 additions and 16 deletions

View File

@ -9,15 +9,13 @@
#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/bluetoothserver_p.h>
#include <bluetooth/CommandManager.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 <CommandManager.h>
#include "KitSupport.h" #include "KitSupport.h"
@ -128,9 +126,9 @@ DiscoveryAgent::SetLocalDeviceOwner(LocalDevice* ld)
fLocalDevice = ld; fLocalDevice = ld;
} }
DiscoveryAgent::DiscoveryAgent() DiscoveryAgent::DiscoveryAgent(LocalDevice* ld)
{ {
fLocalDevice = NULL; fLocalDevice = ld;
} }

View File

@ -21,24 +21,22 @@ 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)
{ {
} }
@ -120,7 +118,8 @@ DiscoveryListener::MessageReceived(BMessage* message)
DiscoveryListener::DiscoveryListener() : BLooper() DiscoveryListener::DiscoveryListener() : BLooper()
{ {
// TODO: Make a better handling of the running not running state
Run();
} }

View File

@ -113,8 +113,8 @@ LocalDevice::GetLocalDeviceCount()
DiscoveryAgent* DiscoveryAgent*
LocalDevice::GetDiscoveryAgent() LocalDevice::GetDiscoveryAgent()
{ {
/* TODO: Study a singleton here */
return NULL; return new DiscoveryAgent(this);
} }