diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-24 21:39:29 -0700 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-24 21:39:29 -0700 |
commit | c8e32461ccc2227da53f98ccd11bcb50d70929bd (patch) | |
tree | df812dc9c5b34d524ad908b5c5705d9aa66e203e /udev/lib/libudev.h | |
parent | 03198b93038d3ea87d1699a1e982c235ff824275 (diff) |
libudev: add userdata pointer
Diffstat (limited to 'udev/lib/libudev.h')
-rw-r--r-- | udev/lib/libudev.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/udev/lib/libudev.h b/udev/lib/libudev.h index 4d5fd93efc..e71f6b217a 100644 --- a/udev/lib/libudev.h +++ b/udev/lib/libudev.h @@ -29,6 +29,10 @@ #endif struct udev; +struct udev_device; +struct udev_monitor; + +/* library context */ extern struct udev *udev_new(void); extern struct udev *udev_ref(struct udev *udev); extern void udev_unref(struct udev *udev); @@ -40,11 +44,15 @@ extern int udev_get_log_priority(struct udev *udev); extern void udev_set_log_priority(struct udev *udev, int priority); extern const char *udev_get_sys_path(struct udev *udev); extern const char *udev_get_dev_path(struct udev *udev); +extern void *udev_get_userdata(struct udev *udev); +extern void udev_set_userdata(struct udev *udev, void *userdata); + +/* selinux glue */ extern void udev_selinux_resetfscreatecon(struct udev *udev); extern void udev_selinux_setfscreatecon(struct udev *udev, const char *file, unsigned int mode); extern void udev_selinux_lsetfilecon(struct udev *udev, const char *file, unsigned int mode); -struct udev_device; +/* sys devices */ extern struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char *syspath); extern struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum); extern struct udev_device *udev_device_get_parent(struct udev_device *udev_device); @@ -70,11 +78,12 @@ extern const char *udev_device_get_action(struct udev_device *udev_device); extern unsigned long long int udev_device_get_seqnum(struct udev_device *udev_device); extern const char *udev_device_get_attr_value(struct udev_device *udev_device, const char *attr); +/* sys enumeration */ extern int udev_enumerate_devices(struct udev *udev, const char *subsystem, int (*cb)(struct udev_device *udev_device, void *data), void *data); -struct udev_monitor; +/* udev and kernel device events */ extern struct udev_monitor *udev_monitor_new_from_socket(struct udev *udev, const char *socket_path); extern struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev); extern int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor); |