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

View File

@ -23,7 +23,6 @@ void
DiscoveryListener::DeviceDiscovered(RemoteDevice* btDevice, DeviceClass cod)
{
}
@ -34,7 +33,6 @@ DiscoveryListener::InquiryStarted(status_t status)
}
void
DiscoveryListener::InquiryCompleted(int discType)
{
@ -120,7 +118,8 @@ DiscoveryListener::MessageReceived(BMessage* message)
DiscoveryListener::DiscoveryListener() : BLooper()
{
// TODO: Make a better handling of the running not running state
Run();
}

View File

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