2 * File: fce_api_internal.h
5 * Created on 1. Oktober 2010, 23:48
8 #ifndef _FCE_API_INTERNAL_H
9 #define _FCE_API_INTERNAL_H
13 #include <atalk/fce_api.h>
15 #define FCE_MAX_UDP_SOCKS 5 /* Allow a maximum of udp listeners for file change events */
16 #define FCE_SOCKET_RETRY_DELAY_S 600 /* Pause this time in s after socket was broken */
17 #define FCE_PACKET_VERSION 1
18 #define FCE_HISTORY_LEN 10 /* This is used to coalesce events */
19 #define MAX_COALESCE_TIME_MS 1000 /* Events oldeer than this are not coalesced */
21 #define FCE_COALESCE_CREATE (1 << 0)
22 #define FCE_COALESCE_DELETE (1 << 1)
23 #define FCE_COALESCE_ALL (FCE_COALESCE_CREATE | FCE_COALESCE_DELETE)
29 struct addrinfo addrinfo;
30 struct sockaddr_storage sockaddr;
31 time_t next_try_on_error; /* In case of error set next timestamp to retry */
37 char fce_h_path[MAXPATHLEN + 1];
38 struct timeval fce_h_tv;
41 struct fce_close_event {
43 char path[MAXPATHLEN + 1];
46 #define PACKET_HDR_LEN (sizeof(struct fce_packet) - FCE_MAX_PATH_LEN)
48 bool fce_handle_coalescation(int event, const char *path, fce_obj_t type);
49 void fce_initialize_history();
52 #endif /* _FCE_API_INTERNAL_H */