-I bet for now is the last public class DiscoveryListener:BLooper\n-Fix RemoteDevice... friendship
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22679 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
||||||
|
*
|
||||||
|
* All rights reserved. Distributed under the terms of the MIT License.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _DISCOVERY_LISTENER_H
|
||||||
|
#define _DISCOVERY_LISTENER_H
|
||||||
|
|
||||||
|
#include <Looper.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define B_BT_INQUIRY_COMPLETED 0x01 // HCI_EVENT_X check specs
|
||||||
|
#define B_BT_INQUIRY_TERMINATED 0x02 // HCI_EVENT_X
|
||||||
|
#define B_BT_INQUIRY_ERROR 0x03 // HCI_EVENT_X
|
||||||
|
|
||||||
|
|
||||||
|
namespace Bluetooth {
|
||||||
|
|
||||||
|
class RemoteDevice;
|
||||||
|
class DeviceClass;
|
||||||
|
|
||||||
|
|
||||||
|
class DiscoveryListener : BLooper {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
static const int INQUIRY_COMPLETED = B_BT_INQUIRY_COMPLETED;
|
||||||
|
static const int INQUIRY_TERMINATED = B_BT_INQUIRY_TERMINATED;
|
||||||
|
static const int INQUIRY_ERROR = B_BT_INQUIRY_ERROR;
|
||||||
|
|
||||||
|
static const int SERVICE_SEARCH_COMPLETED = 0x01;
|
||||||
|
static const int SERVICE_SEARCH_TERMINATED = 0x02;
|
||||||
|
static const int SERVICE_SEARCH_ERROR = 0x03;
|
||||||
|
static const int SERVICE_SEARCH_NO_RECORDS = 0x04;
|
||||||
|
static const int SERVICE_SEARCH_DEVICE_NOT_REACHABLE = 0x06;
|
||||||
|
|
||||||
|
virtual void DeviceDiscovered(RemoteDevice btDevice, DeviceClass cod);
|
||||||
|
/*
|
||||||
|
virtual void servicesDiscovered(int transID, ServiceRecord[] servRecord);
|
||||||
|
virtual void serviceSearchCompleted(int transID, int respCode);
|
||||||
|
*/
|
||||||
|
virtual void InquiryCompleted(int discType);
|
||||||
|
|
||||||
|
private:
|
||||||
|
DiscoveryListener();
|
||||||
|
void MessageReceived(BMessage* msg);
|
||||||
|
|
||||||
|
|
||||||
|
friend class RemoteDevice;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -43,6 +43,9 @@ class RemoteDevice {
|
|||||||
protected:
|
protected:
|
||||||
RemoteDevice(BString address);
|
RemoteDevice(BString address);
|
||||||
|
|
||||||
|
/* Instances of this class only will be done by Discovery[Listener|Agent] TODO */
|
||||||
|
friend class DiscoveryListener;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user