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
9 * John Scipione, jscipione@gmail.com
11 #ifndef INTERFACE_LIST_ITEM_H
12 #define INTERFACE_LIST_ITEM_H
16 #include <NetworkInterface.h>
17 #include <NetworkSettingsAddOn.h>
20 enum BNetworkInterfaceType
{
21 B_NETWORK_INTERFACE_TYPE_WIFI
= 'wifi',
22 B_NETWORK_INTERFACE_TYPE_ETHERNET
= 'ethr',
23 B_NETWORK_INTERFACE_TYPE_DIAL_UP
= 'dial',
24 B_NETWORK_INTERFACE_TYPE_VPN
= 'nvpn',
25 B_NETWORK_INTERFACE_TYPE_OTHER
= 'othe',
32 class InterfaceListItem
: public BListItem
,
33 public BNetworkKit::BNetworkConfigurationListener
{
35 InterfaceListItem(const char* name
,
36 BNetworkInterfaceType type
);
39 void DrawItem(BView
* owner
,
40 BRect bounds
, bool complete
);
41 void Update(BView
* owner
, const BFont
* font
);
43 inline const char* Name() const { return fInterface
.Name(); }
45 virtual void ConfigurationUpdated(const BMessage
& message
);
49 void _PopulateBitmaps(const char* mediaType
);
51 BBitmap
* _StateIcon() const;
52 const char* _StateText() const;
55 BNetworkInterfaceType fType
;
58 BBitmap
* fIconOffline
;
59 BBitmap
* fIconPending
;
62 BNetworkInterface fInterface
;
65 float fFirstLineOffset
;
76 #endif // INTERFACE_LIST_ITEM_H