]> arthur.barton.de Git - netatalk.git/blob - etc/afpd/fce_api_internal.h
Allow enabling/disabling notifications on a per event type basis
[netatalk.git] / etc / afpd / fce_api_internal.h
1 /* \r
2  * File:   fce_api_internal.h\r
3  * Author: mw\r
4  *\r
5  * Created on 1. Oktober 2010, 23:48\r
6  */\r
7 \r
8 #ifndef _FCE_API_INTERNAL_H\r
9 #define _FCE_API_INTERNAL_H\r
10 \r
11 #define FCE_MAX_PATH_LEN 1024\r
12 #define FCE_MAX_UDP_SOCKS 5     /* Allow a maximum of udp listeners for file change events */\r
13 #define FCE_SOCKET_RETRY_DELAY_S 600 /* Pause this time in s after socket was broken */\r
14 #define FCE_PACKET_VERSION  1\r
15 #define FCE_HISTORY_LEN 10  /* This is used to coalesce events */\r
16 #define MAX_COALESCE_TIME_MS 1000  /* Events oldeer than this are not coalesced */\r
17 \r
18 struct udp_entry\r
19 {\r
20     int sock;\r
21     char *addr;\r
22     char *port;\r
23     struct addrinfo addrinfo;\r
24     time_t next_try_on_error;      /* In case of error set next timestamp to retry */\r
25 };\r
26 \r
27 struct fce_history\r
28 {\r
29     unsigned char mode;\r
30         int is_dir;\r
31         char path[MAXPATHLEN + 1];\r
32         struct timeval tv;\r
33 };\r
34 \r
35 #define PACKET_HDR_LEN (sizeof(struct fce_packet) - FCE_MAX_PATH_LEN)\r
36 \r
37 int fce_handle_coalescation( char *path, int is_dir, int mode );\r
38 void fce_initialize_history();\r
39 \r
40 \r
41 #endif  /* _FCE_API_INTERNAL_H */\r
42 \r