summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_file/ecore_file_private.h
blob: 531c59330ed9f127868cbf2fc7e0a949f10b5fdf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS  64
#endif

#ifndef __FreeBSD__
#include <features.h>
#endif
#include "ecore_private.h"
#include "Ecore.h"
#include "Ecore_File.h"

/* ecore_file_monitor */
int ecore_file_monitor_init(void);
int ecore_file_monitor_shutdown(void);

#define ECORE_FILE_MONITOR(x) ((Ecore_File_Monitor *)(x))

struct _Ecore_File_Monitor
{
   Ecore_List2 __list_data;
   void (*func) (void *data,
		 Ecore_File_Monitor *ecore_file_monitor,
		 Ecore_File_Event event,
		 const char *path);

   char               *path;
   void               *data;
   Ecore_List2        *files;
};

#ifdef HAVE_INOTIFY
int                 ecore_file_monitor_inotify_init(void);
int                 ecore_file_monitor_inotify_shutdown(void);
Ecore_File_Monitor *ecore_file_monitor_inotify_add(const char *path,
							void (*func) (void *data,
								      Ecore_File_Monitor *ecore_file_monitor,
								      Ecore_File_Event event,
								      const char *path),
							void *data);
void                ecore_file_monitor_inotify_del(Ecore_File_Monitor *ecore_file_monitor);
#endif

#ifdef HAVE_FAM
int                 ecore_file_monitor_fam_init(void);
int                 ecore_file_monitor_fam_shutdown(void);
Ecore_File_Monitor *ecore_file_monitor_fam_add(const char *path,
						    void (*func) (void *data,
								  Ecore_File_Monitor *ecore_file_monitor,
								  Ecore_File_Event event,
								  const char *path),
						    void *data);
void                ecore_file_monitor_fam_del(Ecore_File_Monitor *ecore_file_monitor);
#endif

#ifdef HAVE_POLL
int                 ecore_file_monitor_poll_init(void);
int                 ecore_file_monitor_poll_shutdown(void);
Ecore_File_Monitor *ecore_file_monitor_poll_add(const char *path,
						void (*func) (void *data,
							      Ecore_File_Monitor *ecore_file_monitor,
							      Ecore_File_Event event,
							      const char *path),
						void *data);
void                ecore_file_monitor_poll_del(Ecore_File_Monitor *ecore_file_monitor);

/* ecore_file_path */
int ecore_file_path_init(void);
int ecore_file_path_shutdown(void);

/* ecore_file_download */
int ecore_file_download_init(void);
int ecore_file_download_shutdown(void);

#endif