Implement pairing with a remote bluetooth device

- Fix PincodeWindow to send the pincode commands dissapear after clicking 
- Improve the debug output of bluetooth_server
- Handle all needed events for the pairing
- Simple request could send and receive the event before adding the request to the events wanted list. Inverted the order of this sequence.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26614 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Ruiz Dorantes
2008-07-24 20:50:49 +00:00
parent e54b6bb39a
commit 3205e523cd
9 changed files with 240 additions and 90 deletions
+11 -3
View File
@@ -17,13 +17,15 @@
#include <stdio.h>
#include <stdlib.h>
namespace Bluetooth {
class RemoteDevice;
class ConnectionView
: public BView
{
public:
ConnectionView(BRect frame, const char *name, uint32 resizeMask, uint32 flags);
ConnectionView(BRect frame, const char *name);
~ConnectionView();
virtual void MessageReceived(BMessage *message);
void Draw(BRect update);
@@ -35,8 +37,7 @@ private:
};
class ConnectionIncoming
: public BWindow
class ConnectionIncoming : public BWindow
{
public:
ConnectionIncoming(RemoteDevice* rDevice);
@@ -48,4 +49,11 @@ private:
ConnectionView* _ConnectionView;
};
}
#ifndef _BT_USE_EXPLICIT_NAMESPACE
using Bluetooth::ConnectionIncoming;
#endif
#endif
+3 -3
View File
@@ -41,15 +41,15 @@ class PincodeView : public BView
class PincodeWindow : public BWindow
{
public:
PincodeWindow(RemoteDevice* rDevice);
PincodeWindow(bdaddr_t address, hci_id hid);
virtual void MessageReceived(BMessage *msg);
virtual bool QuitRequested();
private:
PincodeView* fView;
bdaddr_t bdaddr;
RemoteDevice* fRemoteDevice;
BMessenger* fMessenger;
bdaddr_t fBdaddr;
hci_id fHid;
};
}