Man page - iv_inotify_watch_init(3)
Packages contas this manual
- iv_fd_pump_init(3)
- iv_timer_register(3)
- iv_timer_unregister(3)
- iv_fd_pump(3)
- iv_wait_interest_register(3)
- iv_event_raw_post(3)
- iv_timer_registered(3)
- iv_signal_unregister(3)
- iv_thread(3)
- iv_signal(3)
- iv_inited(3)
- iv_tls_user_ptr(3)
- iv_event_raw_unregister(3)
- iv_popen_request_submit(3)
- iv_fd_set_handler_out(3)
- ivykis(3)
- iv_tls(3)
- iv_fd_unregister(3)
- iv_examples(3)
- iv_wait_interest_register_spawn(3)
- iv_invalidate_now(3)
- iv_work_pool_create(3)
- iv_inotify_watch_register(3)
- iv_inotify(3)
- iv_validate_now(3)
- iv_task_registered(3)
- iv_fatal(3)
- iv_event_raw_register(3)
- iv_thread_create(3)
- iv_quit(3)
- iv_task(3)
- iv_task_register(3)
- iv_fd_set_handler_in(3)
- iv_set_fatal_msg_handler(3)
- iv_event_post(3)
- iv_deinit(3)
- iv_init(3)
- iv_event_register(3)
- iv_fd(3)
- iv_fd_registered(3)
- iv_work_pool_submit_work(3)
- iv_time(3)
- iv_inotify_watch_unregister(3)
- iv_event_raw(3)
- iv_fd_pump_destroy(3)
- iv_fd_register_try(3)
- iv_signal_register(3)
- iv_inotify_unregister(3)
- iv_event(3)
- iv_thread_set_debug_state(3)
- iv_work_pool_put(3)
- iv_fd_pump_is_done(3)
- iv_fd_register(3)
- iv_inotify_register(3)
- iv_task_unregister(3)
- iv_timer(3)
- iv_event_unregister(3)
- iv_wait(3)
- iv_fd_pump_pump(3)
- iv_work(3)
- iv_fd_set_handler_err(3)
- iv_tls_user_register(3)
- iv_popen(3)
- iv_main(3)
- iv_wait_interest_unregister(3)
- iv_popen_request_close(3)
apt-get install libivykis-dev
Manual
| iv_inotify(3) | ivykis programmer's manual | iv_inotify(3) |
NAME
IV_INOTIFY_INIT, iv_inotify_register, iv_inotify_unregister, IV_INOTIFY_WATCH_INIT, iv_inotify_watch_register, iv_inotify_watch_unregister - ivykis inotify(7) wrapper
SYNOPSIS
#include <iv_inotify.h>
struct iv_inotify { };
void IV_INOTIFY_INIT(struct iv_inotify
*inotify);
int iv_inotify_register(struct iv_inotify *inotify);
void iv_inotify_unregister(struct iv_inotify *inotify);
struct iv_inotify_watch {
struct iv_inotify *inotify;
const char *pathname;
uint32_t mask;
void *cookie;
void (*handler)(void *, struct inotify_event *);
};
void IV_INOTIFY_WATCH_INIT(struct iv_inotify_watch
*watch);
int iv_inotify_watch_register(struct iv_inotify_watch
*watch);
int iv_inotify_watch_unregister(struct iv_inotify_watch
*watch);
DESCRIPTION
The iv_inotify_register function registers an iv_inotify instance with the iv_inotify(3) module. The inotify parameter is a pointer to the iv_inotify structure to be registered.
The iv_inotify_unregister function unregisters an iv_inotify instance from the iv_inotify(3) module. The inotify parameter is a pointer to the iv_inotify structure to be unregistered.
The iv_inotify_watch_register function adds a watch to the registered iv_inotify instance specified by the ->inotify member.
The iv_inotify_watch_unregister function removes a watch from the iv_inotify instance specified by the ->inotify member.
In the iv_inotify_watch structure used in these functions, the ->pathname and ->mask members correspond to the members of struct inotify_watch as described in inotify(7). ->handler is the event handler called when this watch triggers. The arguments to this handler function are the pointer stored in the ->cookie member of the iv_inotify_watch structure and a pointer to an inotify_event structure as described in inotify(7).
RETURN VALUE
iv_inotify_register and iv_inotify_watch_register return zero on success. On error, -1 is returned, and errno is set appropriately.
ERRORS
iv_inotify will return errors returned by inotify_init(3) and inotify_add_watch(3).
SEE ALSO
ivykis(3), inotify(7), inotify_init(3), inotify_add_watch(3), inotify_rm_watch(3)
| 2009-02-07 | ivykis |