1/* 2 * Copyright 2014-2019 Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Adrien Destugues, pulkomandy@pulkomandy.tk 7 * Rob Gill, rrobgill@protonmail.com 8 */ 9#ifndef HOSTNAME_VIEW_H 10#define HOSTNAME_VIEW_H 11 12 13#include <NetworkSettingsAddOn.h> 14#include <StringList.h> 15#include <View.h> 16 17 18using namespace BNetworkKit; 19 20class BButton; 21class BTextControl; 22 23 24class HostnameView : public BView { 25public: 26 HostnameView(BNetworkSettingsItem* item); 27 ~HostnameView(); 28 29 status_t Revert(); 30 bool IsRevertable() const; 31 32 virtual void AttachedToWindow(); 33 virtual void MessageReceived(BMessage* message); 34 35private: 36 status_t _LoadHostname(); 37 status_t _SaveHostname(); 38 39private: 40 BNetworkSettingsItem* 41 fItem; 42 BTextControl* fHostname; 43 44 BButton* fApplyButton; 45}; 46 47 48#endif // HOSTNAME_VIEW_H 49