1 /* 2 * Copyright 2007-2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com 3 * 4 * All rights reserved. Distributed under the terms of the MIT License. 5 * 6 */ 7 8 #ifndef _PINCODE_REQUEST_WINDOW_H 9 #define _PINCODE_REQUEST_WINDOW_H 10 11 12 #include <View.h> 13 #include <Window.h> 14 15 #include <bluetooth/bluetooth.h> 16 17 class BStringView; 18 class BButton; 19 class BTextControls; 20 21 namespace Bluetooth { 22 23 class RemoteDevice; 24 25 class PincodeView : public BView 26 { 27 public: 28 /* Constructors & Destructor*/ 29 PincodeView(BRect rect); 30 31 void SetBDaddr(const char* address); 32 33 BStringView* fMessage; 34 BStringView* fRemoteInfo; 35 BButton* fAcceptButton; 36 BButton* fCancelButton; 37 BTextControl* fPincodeText; 38 39 }; 40 41 class PincodeWindow : public BWindow 42 { 43 public: 44 PincodeWindow(bdaddr_t address, hci_id hid); 45 virtual void MessageReceived(BMessage *msg); 46 virtual bool QuitRequested(); 47 48 private: 49 PincodeView* fView; 50 bdaddr_t bdaddr; 51 bdaddr_t fBdaddr; 52 hci_id fHid; 53 }; 54 55 } 56 57 #ifndef _BT_USE_EXPLICIT_NAMESPACE 58 using Bluetooth::PincodeWindow; 59 #endif 60 61 #endif