21 #ifndef __EDELIB_DIRWATCH_H__
22 #define __EDELIB_DIRWATCH_H__
24 #include "edelib-global.h"
67 typedef void (DirWatchCallback)(
const char* dir,
const char* w,
int flags,
void* data);
187 bool init_backend(
void);
204 bool add_entry(
const char* dir,
int flags);
205 bool remove_entry(
const char* dir);
206 bool have_entry(
const char* dir);
207 void add_callback(DirWatchCallback* cb,
void* data);
208 void run_callback(
int fd);
228 static bool add(
const char* dir,
int flags);
239 static void callback(DirWatchCallback& cb,
void* data = 0);
@ DW_ATTRIB
In directory item's attributes changed.
Definition: DirWatch.h:37
@ DW_FAM
FAM/gamin.
Definition: DirWatch.h:48
@ DW_INOTIFY
inotify (linux kernel >= 2.6.13)
Definition: DirWatch.h:47
static void shutdown(void)
@ DW_REPORT_CREATE
A new item was created.
Definition: DirWatch.h:57
@ DW_REPORT_DELETE
Existing item was deleted.
Definition: DirWatch.h:60
static bool remove(const char *dir)
@ DW_REPORT_RENAME
Existing item was renamed.
Definition: DirWatch.h:59
DirWatchNotifier
Notifier type used by DirWatch.
Definition: DirWatch.h:45
@ DW_REPORT_MODIFY
Existing item was modified.
Definition: DirWatch.h:58
DirWatchReportFlags
Returned codes for received event.
Definition: DirWatch.h:55
DirWatchFlags
Flags telling to DirWatch what changes to monitor.
Definition: DirWatch.h:32
#define E_DISABLE_CLASS_COPY(klass)
Definition: edelib-global.h:161
@ DW_ACCESS
In directory item is accessed (read, ...)
Definition: DirWatch.h:35
static DirWatchNotifier notifier(void)
@ DW_NONE
None notifier; watching disabled.
Definition: DirWatch.h:46
static bool add(const char *dir, int flags)
Directory changes notifier.
Definition: DirWatch.h:180
@ DW_REPORT_NONE
Not figured out what happened.
Definition: DirWatch.h:56
@ DW_CREATE
In directory item created.
Definition: DirWatch.h:33
static void callback(DirWatchCallback &cb, void *data=0)