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