summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_file/ecore_file_private.h
diff options
context:
space:
mode:
authorsebastid <sebastid>2005-03-30 06:35:12 +0000
committersebastid <sebastid@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2005-03-30 06:35:12 +0000
commit40ec35d38dcbf577489f43bc3988b27914bfbdc6 (patch)
treeeda2e33882f343f394581af1e7fb8d4078f916bd /legacy/ecore/src/lib/ecore_file/ecore_file_private.h
parent78939419b3f675f60ab1972fdf8c3a5232941115 (diff)
Inotify monitoring almost works now. Since inotify seems to be the
future, I changed the interface of monitoring to be more like inotify. SVN revision: 13984
Diffstat (limited to 'legacy/ecore/src/lib/ecore_file/ecore_file_private.h')
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file_private.h55
1 files changed, 37 insertions, 18 deletions
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file_private.h b/legacy/ecore/src/lib/ecore_file/ecore_file_private.h
index c076bf2793..5559c743fb 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file_private.h
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file_private.h
@@ -4,12 +4,6 @@
4#include <stdio.h> 4#include <stdio.h>
5#include <string.h> 5#include <string.h>
6 6
7#include <dirent.h>
8#include <sys/types.h>
9#include <sys/stat.h>
10#include <unistd.h>
11#include <limits.h>
12
13#include "config.h" 7#include "config.h"
14 8
15#include "Ecore.h" 9#include "Ecore.h"
@@ -18,27 +12,52 @@
18int ecore_file_monitor_init(void); 12int ecore_file_monitor_init(void);
19int ecore_file_monitor_shutdown(void); 13int ecore_file_monitor_shutdown(void);
20 14
15#define ECORE_FILE_MONITOR(x) ((Ecore_File_Monitor *)(x))
16
21struct _Ecore_File_Monitor 17struct _Ecore_File_Monitor
22{ 18{
23 void (*func) (void *data, 19 void (*func) (void *data,
24 Ecore_File_Monitor *ecore_file_monitor, 20 Ecore_File_Monitor *ecore_file_monitor,
25 Ecore_File_Type type,
26 Ecore_File_Event event, 21 Ecore_File_Event event,
27 const char *path); 22 const char *path);
28 23
29 char *path; 24 char *path;
30 Ecore_File_Type type;
31 void *data; 25 void *data;
32 Evas_List *files; 26 Evas_List *files;
33#ifdef HAVE_POLL
34 int mtime;
35 unsigned char deleted;
36#endif
37}; 27};
38 28
39/* 29#ifdef HAVE_INOTIFY
40#define HAVE_POLL 30EAPI int ecore_file_monitor_inotify_init(void);
41#define HAVE_FAM 31EAPI int ecore_file_monitor_inotify_shutdown(void);
42#define HAVE_DNOTIFY 32EAPI Ecore_File_Monitor *ecore_file_monitor_inotify_add(const char *path,
43#define HAVE_INOTIFY 33 void (*func) (void *data,
44*/ 34 Ecore_File_Monitor *ecore_file_monitor,
35 Ecore_File_Event event,
36 const char *path),
37 void *data);
38EAPI void ecore_file_monitor_inotify_del(Ecore_File_Monitor *ecore_file_monitor);
39#endif
40
41#ifdef HAVE_FAM
42EAPI int ecore_file_monitor_fam_init(void);
43EAPI int ecore_file_monitor_fam_shutdown(void);
44EAPI Ecore_File_Monitor *ecore_file_monitor_fam_add(const char *path,
45 void (*func) (void *data,
46 Ecore_File_Monitor *ecore_file_monitor,
47 Ecore_File_Event event,
48 const char *path),
49 void *data);
50EAPI void ecore_file_monitor_fam_del(Ecore_File_Monitor *ecore_file_monitor);
51#endif
52
53#ifdef HAVE_POLL
54EAPI int ecore_file_monitor_poll_init(void);
55EAPI int ecore_file_monitor_poll_shutdown(void);
56EAPI Ecore_File_Monitor *ecore_file_monitor_poll_add(const char *path,
57 void (*func) (void *data,
58 Ecore_File_Monitor *ecore_file_monitor,
59 Ecore_File_Event event,
60 const char *path),
61 void *data);
62EAPI void ecore_file_monitor_poll_del(Ecore_File_Monitor *ecore_file_monitor);
63#endif