xref: /haiku/src/preferences/network/InterfaceView.h (revision 386b6f15e6dfe92396855702984dad51973ab8fc)
1 /*
2  * Copyright 2004-2015 Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Axel Dörfler, <axeld@pinc-software.de>
7  *		Alexander von Gluck, kallisti5@unixzen.com
8  *		John Scipione, jscipione@gmail.com
9  */
10 #ifndef INTERFACE_VIEW_H
11 #define INTERFACE_VIEW_H
12 
13 
14 #include <GroupView.h>
15 #include <NetworkInterface.h>
16 
17 
18 class BButton;
19 class BMenuField;
20 class BMessage;
21 class BStringView;
22 
23 
24 class InterfaceView : public BGroupView {
25 public:
26 								InterfaceView();
27 	virtual						~InterfaceView();
28 
29 			void				SetTo(const char* name);
30 
31 	virtual	void				MessageReceived(BMessage* message);
32 	virtual void				AttachedToWindow();
33 	virtual	void				Pulse();
34 
35 private:
36 			status_t			_Update(bool updateWirelessNetworks = true);
37 			void				_EnableFields(bool enabled);
38 
39 private:
40 			BNetworkInterface	fInterface;
41 			int					fPulseCount;
42 
43 			BStringView*		fStatusField;
44 			BStringView*		fMacAddressField;
45 			BStringView*		fLinkSpeedField;
46 			BStringView*		fLinkTxField;
47 			BStringView*		fLinkRxField;
48 
49 			BMenuField*			fNetworkMenuField;
50 
51 			BButton*			fToggleButton;
52 			BButton*			fRenegotiateButton;
53 };
54 
55 
56 #endif // INTERFACE_HARDWARE_VIEW_H
57 
58