2 * Copyright 2004-2015 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Alexander von Gluck, kallisti5@unixzen.com
7 * John Scipione, jscipione@gmail.com
9 #ifndef INTERFACE_ADDRESS_VIEW_H
10 #define INTERFACE_ADDRESS_VIEW_H
13 #include <GroupView.h>
14 #include <NetworkInterface.h>
15 #include <NetworkSettings.h>
16 #include <NetworkSettingsAddOn.h>
25 class IPAddressControl
;
28 using namespace BNetworkKit
;
31 class InterfaceAddressView
: public BGroupView
{
33 InterfaceAddressView(int family
,
34 const char* interface
,
35 BNetworkSettings
& settings
);
36 virtual ~InterfaceAddressView();
38 virtual void AttachedToWindow();
39 virtual void MessageReceived(BMessage
* message
);
42 bool IsRevertable() const;
44 void ConfigurationUpdated(const BMessage
& message
);
47 void _EnableFields(bool enable
);
49 void _SetModeField(uint32 mode
);
50 void _UpdateSettings();
53 void _ConfigureAddress(
54 BNetworkInterfaceAddressSettings
& address
);
55 void _SetAddress(BNetworkAddress
& address
,
60 BNetworkInterface fInterface
;
61 BNetworkSettings
& fSettings
;
64 BMessage fOriginalSettings
;
66 BPopUpMenu
* fModePopUpMenu
;
67 BMenuField
* fModeField
;
68 IPAddressControl
* fAddressField
;
69 IPAddressControl
* fNetmaskField
;
70 IPAddressControl
* fGatewayField
;
71 BButton
* fApplyButton
;
75 #endif // INTERFACE_ADDRESS_VIEW_H