2008-06-19 00:57:27 +04:00
|
|
|
/*
|
2021-03-31 22:58:20 +03:00
|
|
|
* Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
|
2021-03-27 15:57:27 +03:00
|
|
|
* Copyright 2021, Haiku, Inc.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Oliver Ruiz Dorantes <oliver.ruiz.dorantes@gmail.com>
|
|
|
|
* Tri-Edge AI <triedgeai@gmail.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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
|
|
|
|
2021-03-27 15:57:27 +03:00
|
|
|
#include <BluetoothIconView.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
|
|
|
|
2021-03-27 15:57:27 +03:00
|
|
|
namespace Bluetooth {
|
2008-06-19 00:57:27 +04:00
|
|
|
|
|
|
|
class RemoteDevice;
|
|
|
|
|
2021-03-27 15:57:27 +03:00
|
|
|
class PincodeWindow : public BWindow {
|
2009-10-07 00:03:36 +04:00
|
|
|
public:
|
|
|
|
PincodeWindow(bdaddr_t address, hci_id hid);
|
|
|
|
PincodeWindow(RemoteDevice* rDevice);
|
2021-03-27 15:57:27 +03:00
|
|
|
virtual void MessageReceived(BMessage* msg);
|
2009-10-07 00:03:36 +04:00
|
|
|
virtual bool QuitRequested();
|
2016-02-14 16:07:21 +03:00
|
|
|
void SetBDaddr(BString address);
|
2009-10-07 00:03:36 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
void InitUI();
|
|
|
|
bdaddr_t fBdaddr;
|
|
|
|
hci_id fHid;
|
|
|
|
|
|
|
|
BStringView* fMessage;
|
|
|
|
BStringView* fRemoteInfo;
|
|
|
|
BButton* fAcceptButton;
|
|
|
|
BButton* fCancelButton;
|
|
|
|
BTextControl* fPincodeText;
|
2021-03-27 15:57:27 +03:00
|
|
|
|
|
|
|
BluetoothIconView* fIcon;
|
|
|
|
BStringView* fMessage2;
|
|
|
|
BStringView* fDeviceLabel;
|
|
|
|
BStringView* fDeviceText;
|
|
|
|
BStringView* fAddressLabel;
|
|
|
|
BStringView* fAddressText;
|
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
|
|
|
|
|
2021-03-27 15:57:27 +03:00
|
|
|
#endif /* _PINCODE_REQUEST_WINDOW_H_ */
|