Gianluca Guida f4814901af Move even more includes to common/include.
This patch moves more includes (most of them, to tell the truth) to
common/include directory. This completes the list of includes needed
to compile current trunk with the new libc (but to do that you need
more patches in queue).

This patch also contains some modification (for compilation with new
headers) to the common includes under __NBSD_LIBC, the define used
in mk script to specialize compilation with new includes.
2011-03-03 16:39:02 +00:00

73 lines
2.0 KiB
C

#ifndef MINIX_LIBDEVMAN_H
#define MINIX_LIBDEVMAN_H
#include <minix/com.h>
#include <minix/ipc.h>
#include <minix/usb_ch9.h>
/* used for serializing */
struct devman_device_info {
int count;
int parent_dev_id;
unsigned name_offset;
unsigned subsystem_offset;
};
struct devman_device_info_entry {
unsigned type;
unsigned name_offset;
unsigned data_offset;
unsigned req_nr;
};
#ifndef DEVMAN_SERVER
struct devman_usb_bind_cb_data {
int dev_id;
int interface;
};
struct devman_usb_interface {
struct devman_dev *dev;
struct devman_usb_dev *usb_dev;
usb_interface_descriptor_t *desc;
/* used by the lib */
struct devman_usb_bind_cb_data cb_data;
};
struct devman_usb_dev {
struct devman_dev *dev;
int dev_id; /* The ID identifying the device
on server side */
usb_device_descriptor_t *desc;
int configuration; /* the configuration used for this
device */
char *manufacturer;
char *product;
char *serial;
int intf_count; /* the number of interfaces in the current
configuration */
struct devman_usb_interface interfaces[32];
/* used by the lib */
struct devman_usb_bind_cb_data cb_data;
};
typedef int (*devman_usb_bind_cb_t)(struct devman_usb_bind_cb_data *data, endpoint_t ep);
_PROTOTYPE( int devman_add_device, (struct devman_dev *dev));
_PROTOTYPE( int devman_del_device, (struct devman_dev *dev));
_PROTOTYPE( int devman_init, (void));
_PROTOTYPE( struct devman_usb_dev* devman_usb_device_new, (int dev_id));
_PROTOTYPE( int devman_usb_device_add, (struct devman_usb_dev *dev));
_PROTOTYPE( int devman_usb_device_remove, (struct devman_usb_dev *dev));
_PROTOTYPE( void devman_usb_device_delete, (struct devman_usb_dev *udev));
_PROTOTYPE( int devman_handle_msg, (message *m));
_PROTOTYPE( int devman_usb_init,(devman_usb_bind_cb_t bind_cb,
devman_usb_bind_cb_t unbind_cb));
#endif
#endif