1 /* 2 * Copyright 2014-2015 Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Adrien Destugues, pulkomandy@pulkomandy.tk 7 */ 8 #ifndef DNS_SETTINGS_VIEW_H 9 #define DNS_SETTINGS_VIEW_H 10 11 12 #include <NetworkSettingsAddOn.h> 13 #include <StringList.h> 14 #include <View.h> 15 16 17 using namespace BNetworkKit; 18 19 class BButton; 20 class BListView; 21 class BTextControl; 22 23 24 class DNSSettingsView : public BView { 25 public: 26 DNSSettingsView(BNetworkSettingsItem* item); 27 ~DNSSettingsView(); 28 29 status_t Revert(); 30 bool IsRevertable() const; 31 32 virtual void AttachedToWindow(); 33 virtual void MessageReceived(BMessage* message); 34 35 private: 36 status_t _LoadDNSConfiguration(); 37 status_t _SaveDNSConfiguration(); 38 39 private: 40 BNetworkSettingsItem* 41 fItem; 42 BListView* fServerListView; 43 BStringList fRevertList; 44 BTextControl* fTextControl; 45 BTextControl* fDomain; 46 47 BButton* fAddButton; 48 BButton* fRemoveButton; 49 BButton* fUpButton; 50 BButton* fDownButton; 51 BButton* fApplyButton; 52 }; 53 54 55 #endif // DNS_SETTINGS_VIEW_H 56