1 /* 2 * Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com 3 * Copyright 2021, Haiku, Inc. 4 * Distributed under the terms of the MIT License. 5 * 6 * Authors: 7 * Oliver Ruiz Dorantes <oliver.ruiz.dorantes@gmail.com> 8 * Tri-Edge AI <triedgeai@gmail.com> 9 */ 10 11 #ifndef _PINCODE_REQUEST_WINDOW_H_ 12 #define _PINCODE_REQUEST_WINDOW_H_ 13 14 15 #include <View.h> 16 #include <Window.h> 17 18 #include <bluetooth/bluetooth.h> 19 #include <bluetooth/HCI/btHCI.h> 20 21 #include <BluetoothIconView.h> 22 23 class BStringView; 24 class BButton; 25 class BTextControl; 26 27 namespace Bluetooth { 28 29 class RemoteDevice; 30 31 class PincodeWindow : public BWindow { 32 public: 33 PincodeWindow(bdaddr_t address, hci_id hid); 34 PincodeWindow(RemoteDevice* rDevice); 35 virtual void MessageReceived(BMessage* msg); 36 virtual bool QuitRequested(); 37 void SetBDaddr(BString address); 38 39 private: 40 void InitUI(); 41 bdaddr_t fBdaddr; 42 hci_id fHid; 43 44 BStringView* fMessage; 45 BStringView* fRemoteInfo; 46 BButton* fAcceptButton; 47 BButton* fCancelButton; 48 BTextControl* fPincodeText; 49 50 BluetoothIconView* fIcon; 51 BStringView* fMessage2; 52 BStringView* fDeviceLabel; 53 BStringView* fDeviceText; 54 BStringView* fAddressLabel; 55 BStringView* fAddressText; 56 }; 57 58 } 59 60 #ifndef _BT_USE_EXPLICIT_NAMESPACE 61 using Bluetooth::PincodeWindow; 62 #endif 63 64 #endif /* _PINCODE_REQUEST_WINDOW_H_ */ 65