BPicture: Fix archive constructor.
[haiku.git] / src / add-ons / kernel / drivers / input / usb_hid / DeviceList.h
blob821cb1775290242390d1b15d3cc789825b65263b
1 /*
2 Generic device list for use in drivers.
3 Copyright (C) 2008 Michael Lotz <mmlr@mlotz.ch>
4 Distributed under the terms of the MIT license.
5 */
6 #ifndef _DEVICE_LIST_H_
7 #define _DEVICE_LIST_H_
9 #include <OS.h>
11 struct device_list_entry;
13 class DeviceList {
14 public:
15 DeviceList();
16 ~DeviceList();
18 status_t AddDevice(const char *name, void *device);
19 status_t RemoveDevice(const char *name, void *device = NULL);
20 void * FindDevice(const char *name, void *device = NULL);
22 int32 CountDevices(const char *baseName = NULL);
23 void * DeviceAt(int32 index);
25 const char ** PublishDevices();
27 private:
28 void _FreePublishList();
30 device_list_entry * fDeviceList;
31 int32 fDeviceCount;
32 char ** fPublishList;
35 #endif // _DEVICE_LIST_H_