xref: /haiku/src/servers/bluetooth/DeskbarReplicant.h (revision 1294543de9ac0eff000eaea1b18368c36435d08e)
1 /*
2  * Copyright 2009, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Michael Weirauch, dev@m-phasis.de
7  */
8 #ifndef DESKBAR_REPLICANT_H
9 #define DESKBAR_REPLICANT_H
10 
11 
12 #include <View.h>
13 
14 
15 extern const char* kDeskbarItemName;
16 
17 
18 class DeskbarReplicant : public BView {
19 	public:
20 		DeskbarReplicant(BRect frame, int32 resizingMode);
21 		DeskbarReplicant(BMessage* archive);
22 		virtual ~DeskbarReplicant();
23 
24 		static	DeskbarReplicant* Instantiate(BMessage* archive);
25 		virtual	status_t Archive(BMessage* archive, bool deep = true) const;
26 
27 		virtual	void	AttachedToWindow();
28 
29 		virtual	void	Draw(BRect updateRect);
30 
31 		virtual	void	MessageReceived(BMessage* message);
32 		virtual	void	MouseDown(BPoint where);
33 
34 	private:
35 		void			_Init();
36 		void			_OpenBluetoothPreferences();
37 
38 		void			_ShowBluetoothServerConsole();
39 		void			_QuitBluetoothServer();
40 
41 		void			_ShowErrorAlert(BString msg, status_t status);
42 
43 		BBitmap*		fIcon;
44 };
45 
46 #endif	// DESKBAR_REPLICANT_H
47