src/inotify_source.h File Reference

#include <glib.h>

Go to the source code of this file.

Typedefs

typedef void(* mpd_inotify_callback_t )(int wd, unsigned mask, const char *name, void *ctx)

Functions

struct mpd_inotify_source * mpd_inotify_source_new (mpd_inotify_callback_t callback, void *callback_ctx, GError **error_r)
 Creates a new inotify source and registers it in the GLib main loop.
void mpd_inotify_source_free (struct mpd_inotify_source *source)
int mpd_inotify_source_add (struct mpd_inotify_source *source, const char *path_fs, unsigned mask, GError **error_r)
 Adds a path to the notify list.
void mpd_inotify_source_rm (struct mpd_inotify_source *source, unsigned wd)
 Removes a path from the notify list.

Typedef Documentation

typedef void(* mpd_inotify_callback_t)(int wd, unsigned mask, const char *name, void *ctx)

Definition at line 25 of file inotify_source.h.


Function Documentation

int mpd_inotify_source_add ( struct mpd_inotify_source *  source,
const char *  path_fs,
unsigned  mask,
GError **  error_r 
)

Adds a path to the notify list.

Returns:
a watch descriptor or -1 on error
void mpd_inotify_source_free ( struct mpd_inotify_source *  source  ) 
struct mpd_inotify_source* mpd_inotify_source_new ( mpd_inotify_callback_t  callback,
void *  callback_ctx,
GError **  error_r 
) [read]

Creates a new inotify source and registers it in the GLib main loop.

Parameters:
a callback invoked for events received from the kernel
void mpd_inotify_source_rm ( struct mpd_inotify_source *  source,
unsigned  wd 
)

Removes a path from the notify list.

Parameters:
wd the watch descriptor returned by mpd_inotify_source_add()

Generated on 9 Aug 2013 for MPD by  doxygen 1.6.1