fat: Greatly simplify and clean up dosfs_get_file_map().
[haiku.git] / src / preferences / network / ServiceListItem.h
blob34bde09ebad2850d8c1a8eaca1e6118d671dedb3
1 /*
2 * Copyright 2015 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Axel Dörfler, <axeld@pinc-software.de>
7 */
8 #ifndef SERVICE_LIST_ITEM_H
9 #define SERVICE_LIST_ITEM_H
12 #include <ListItem.h>
13 #include <NetworkSettings.h>
14 #include <NetworkSettingsAddOn.h>
17 using namespace BNetworkKit;
20 class ServiceListItem : public BListItem,
21 public BNetworkKit::BNetworkSettingsListener {
22 public:
23 ServiceListItem(const char* name,
24 const char* label,
25 const BNetworkSettings& settings);
26 virtual ~ServiceListItem();
28 const char* Label() const { return fLabel; }
30 virtual void DrawItem(BView* owner,
31 BRect bounds, bool complete);
32 virtual void Update(BView* owner, const BFont* font);
34 inline const char* Name() const { return fName; }
36 virtual void SettingsUpdated(uint32 type);
38 protected:
39 virtual bool IsEnabled();
41 private:
42 const char* fName;
43 const char* fLabel;
44 const BNetworkSettings&
45 fSettings;
47 BView* fOwner;
48 float fLineOffset;
49 bool fEnabled;
53 #endif // SERVICE_LIST_ITEM_H