fat: Greatly simplify and clean up dosfs_get_file_map().
[haiku.git] / src / preferences / network / InterfaceListItem.h
blob396afe82a34ed2aa91638f92bb1b1e8c802e3344
1 /*
2 * Copyright 2004-2015 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Alexander von Gluck, kallisti5@unixzen.com
7 * Philippe Houdoin
8 * Fredrik Modéen
9 * John Scipione, jscipione@gmail.com
11 #ifndef INTERFACE_LIST_ITEM_H
12 #define INTERFACE_LIST_ITEM_H
15 #include <ListItem.h>
16 #include <NetworkInterface.h>
17 #include <NetworkSettingsAddOn.h>
20 class BBitmap;
23 class InterfaceListItem : public BListItem,
24 public BNetworkKit::BNetworkConfigurationListener {
25 public:
26 InterfaceListItem(const char* name);
27 ~InterfaceListItem();
29 void DrawItem(BView* owner,
30 BRect bounds, bool complete);
31 void Update(BView* owner, const BFont* font);
33 inline const char* Name() const { return fInterface.Name(); }
35 virtual void ConfigurationUpdated(const BMessage& message);
37 private:
38 void _Init();
39 void _PopulateBitmaps(const char* mediaType);
40 void _UpdateState();
41 BBitmap* _StateIcon() const;
42 const char* _StateText() const;
44 private:
45 BBitmap* fIcon;
46 BBitmap* fIconOffline;
47 BBitmap* fIconPending;
48 BBitmap* fIconOnline;
50 BNetworkInterface fInterface;
51 // Hardware Interface
53 float fFirstLineOffset;
54 float fLineOffset;
56 BString fDeviceName;
57 bool fDisabled;
58 bool fHasLink;
59 bool fConnecting;
60 BString fSubtitle;
64 #endif // INTERFACE_LIST_ITEM_H