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