xref: /haiku/src/apps/debugger/user_interface/gui/connection_config/ConnectionConfigView.h (revision eede6646dd548b5fe56d9305f1d6fb2b650e26c3)
1*eede6646SRene Gollent /*
2*eede6646SRene Gollent  * Copyright 2016, Rene Gollent, rene@gollent.com.
3*eede6646SRene Gollent  * Distributed under the terms of the MIT License.
4*eede6646SRene Gollent  */
5*eede6646SRene Gollent #ifndef CONNECTION_CONFIG_VIEW_H
6*eede6646SRene Gollent #define CONNECTION_CONFIG_VIEW_H
7*eede6646SRene Gollent 
8*eede6646SRene Gollent #include <View.h>
9*eede6646SRene Gollent 
10*eede6646SRene Gollent 
11*eede6646SRene Gollent class Settings;
12*eede6646SRene Gollent class TargetHostInterfaceInfo;
13*eede6646SRene Gollent 
14*eede6646SRene Gollent 
15*eede6646SRene Gollent class ConnectionConfigView : public BView {
16*eede6646SRene Gollent public:
17*eede6646SRene Gollent 	class Listener;
18*eede6646SRene Gollent 								ConnectionConfigView(const char* name);
19*eede6646SRene Gollent 	virtual						~ConnectionConfigView();
20*eede6646SRene Gollent 
21*eede6646SRene Gollent 			status_t			Init(TargetHostInterfaceInfo* info,
22*eede6646SRene Gollent 									Listener* listener);
23*eede6646SRene Gollent 
24*eede6646SRene Gollent protected:
InterfaceInfo()25*eede6646SRene Gollent 			TargetHostInterfaceInfo* InterfaceInfo() const
26*eede6646SRene Gollent 									{ return fInfo; }
27*eede6646SRene Gollent 			void				NotifyConfigurationChanged(Settings* settings);
28*eede6646SRene Gollent 
29*eede6646SRene Gollent 	virtual	status_t			InitSpecific() = 0;
30*eede6646SRene Gollent 
31*eede6646SRene Gollent private:
32*eede6646SRene Gollent 			TargetHostInterfaceInfo* fInfo;
33*eede6646SRene Gollent 			Listener* fListener;
34*eede6646SRene Gollent };
35*eede6646SRene Gollent 
36*eede6646SRene Gollent 
37*eede6646SRene Gollent class ConnectionConfigView::Listener {
38*eede6646SRene Gollent public:
39*eede6646SRene Gollent 	virtual						~Listener();
40*eede6646SRene Gollent 
41*eede6646SRene Gollent 	virtual	void				ConfigurationChanged(Settings* settings) = 0;
42*eede6646SRene Gollent };
43*eede6646SRene Gollent 
44*eede6646SRene Gollent 
45*eede6646SRene Gollent #endif	// CONNECTION_CONFIG_VIEW_H
46