2008-06-19 00:57:27 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
2009-08-31 23:21:50 +04:00
|
|
|
* All rights reserved. Distributed under the terms of the MIT License.
|
2008-06-19 00:57:27 +04:00
|
|
|
*/
|
2009-08-31 23:21:50 +04:00
|
|
|
#ifndef _PINCODE_REQUEST_WINDOW_H
|
|
|
|
#define _PINCODE_REQUEST_WINDOW_H
|
2008-06-19 00:57:27 +04:00
|
|
|
|
|
|
|
|
|
|
|
#include <View.h>
|
|
|
|
#include <Window.h>
|
|
|
|
|
|
|
|
#include <bluetooth/bluetooth.h>
|
2009-10-07 00:03:36 +04:00
|
|
|
#include <bluetooth/HCI/btHCI.h>
|
2008-06-19 00:57:27 +04:00
|
|
|
|
|
|
|
class BStringView;
|
|
|
|
class BButton;
|
2009-10-07 00:03:36 +04:00
|
|
|
class BTextControl;
|
2008-06-19 00:57:27 +04:00
|
|
|
|
2009-08-31 23:21:50 +04:00
|
|
|
namespace Bluetooth {
|
2008-06-19 00:57:27 +04:00
|
|
|
|
|
|
|
class RemoteDevice;
|
|
|
|
|
2009-10-07 00:03:36 +04:00
|
|
|
class PincodeWindow : public BWindow
|
2008-06-19 00:57:27 +04:00
|
|
|
{
|
2009-10-07 00:03:36 +04:00
|
|
|
public:
|
|
|
|
PincodeWindow(bdaddr_t address, hci_id hid);
|
|
|
|
PincodeWindow(RemoteDevice* rDevice);
|
|
|
|
virtual void MessageReceived(BMessage *msg);
|
|
|
|
virtual bool QuitRequested();
|
|
|
|
void SetBDaddr(const char* address);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void InitUI();
|
|
|
|
bdaddr_t fBdaddr;
|
|
|
|
hci_id fHid;
|
|
|
|
|
|
|
|
BStringView* fMessage;
|
|
|
|
BStringView* fRemoteInfo;
|
|
|
|
BButton* fAcceptButton;
|
|
|
|
BButton* fCancelButton;
|
|
|
|
BTextControl* fPincodeText;
|
2008-06-19 00:57:27 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2009-08-31 23:21:50 +04:00
|
|
|
#ifndef _BT_USE_EXPLICIT_NAMESPACE
|
2008-06-19 00:57:27 +04:00
|
|
|
using Bluetooth::PincodeWindow;
|
|
|
|
#endif
|
|
|
|
|
2009-08-31 23:21:50 +04:00
|
|
|
#endif
|