netatalk 4.4.3
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
fce_api.h File Reference

API calls for file change event api. More...

`#include <atalk/globals.h>`

Go to the source code of this file.

## Data Structures
struct | fce_packet

## Macros
#define | FCE_PACKET_VERSION 2
#define | FCE_FILE_MODIFY 1
#define | FCE_FILE_DELETE 2
#define | FCE_DIR_DELETE 3
#define | FCE_FILE_CREATE 4
#define | FCE_DIR_CREATE 5
#define | FCE_FILE_MOVE 6
#define | FCE_DIR_MOVE 7
#define | FCE_LOGIN 8
#define | FCE_LOGOUT 9
#define | FCE_FIRST_EVENT FCE_FILE_MODIFY
#define | FCE_LAST_EVENT FCE_LOGOUT
#define | FCE_CONN_START 42
#define | FCE_CONN_BROKEN 99
#define | FCE_PACKET_MAGIC "at_fcapi"
#define | FCE_EV_INFO_PID (1 << 0)
#define | FCE_EV_INFO_USER (1 << 1)
#define | FCE_EV_INFO_SRCPATH (1 << 2)
#define | FCE_DEFAULT_PORT 12250
#define | FCE_DEFAULT_PORT_STRING "12250"

## Typedefs
typedef uint32_t | fce_ev_t

## Functions
void | fce_pending_events (const AFPObj *obj)
int | fce_register (const AFPObj *obj, fce_ev_t event, const char *path, const char *oldpath)
int | fce_add_udp_socket (const char *target)
| Extern connect to afpd parameter.
int | fce_set_coalesce (const char *coalesce_opt)
| Set event coalescation to reduce number of events sent over UDP.
int | fce_set_events (const char *events)

## Detailed Description

API calls for file change event api.

Author
  : mw

Created on 1. Oktober 2010, 21:35

## Macro Definition Documentation

## ◆ FCE_CONN_BROKEN

#define FCE_CONN_BROKEN 99

## ◆ FCE_CONN_START

#define FCE_CONN_START 42

## ◆ FCE_DEFAULT_PORT

#define FCE_DEFAULT_PORT 12250

## ◆ FCE_DEFAULT_PORT_STRING

#define FCE_DEFAULT_PORT_STRING "12250"

## ◆ FCE_DIR_CREATE

#define FCE_DIR_CREATE 5

## ◆ FCE_DIR_DELETE

#define FCE_DIR_DELETE 3

## ◆ FCE_DIR_MOVE

#define FCE_DIR_MOVE 7

## ◆ FCE_EV_INFO_PID

#define FCE_EV_INFO_PID (1 << 0)

## ◆ FCE_EV_INFO_SRCPATH

#define FCE_EV_INFO_SRCPATH (1 << 2)

## ◆ FCE_EV_INFO_USER

#define FCE_EV_INFO_USER (1 << 1)

## ◆ FCE_FILE_CREATE

#define FCE_FILE_CREATE 4

## ◆ FCE_FILE_DELETE

#define FCE_FILE_DELETE 2

## ◆ FCE_FILE_MODIFY

#define FCE_FILE_MODIFY 1

## ◆ FCE_FILE_MOVE

#define FCE_FILE_MOVE 6

## ◆ FCE_FIRST_EVENT

#define FCE_FIRST_EVENT FCE_FILE_MODIFY

## ◆ FCE_LAST_EVENT

#define FCE_LAST_EVENT FCE_LOGOUT

## ◆ FCE_LOGIN

#define FCE_LOGIN 8

## ◆ FCE_LOGOUT

#define FCE_LOGOUT 9

## ◆ FCE_PACKET_MAGIC

#define FCE_PACKET_MAGIC "at_fcapi"

fce_packet.fce_magic

## ◆ FCE_PACKET_VERSION

#define FCE_PACKET_VERSION 2

## Typedef Documentation

## ◆ fce_ev_t

typedef uint32_t fce_ev_t

## Function Documentation

## ◆ fce_add_udp_socket()

int fce_add_udp_socket | ( | const char * | target | ) |

Extern connect to afpd parameter.

IP or IP:Port

Note
  can be called multiple times for multiple listeners (up to MAX_UDP_SOCKS times)

## ◆ fce_pending_events()

void fce_pending_events | ( | const AFPObj * | obj | ) |

API-Calls for file change api, called from outside (file.c directory.c ofork.c filedir.c)

## ◆ fce_register()

int fce_register | ( | const AFPObj * | obj,
|  | fce_ev_t | event,
|  | const char * | path,
|  | const char * | oldpath )

Dispatcher for all incoming file change events

## ◆ fce_set_coalesce()

int fce_set_coalesce | ( | const char * | opt | ) |

Set event coalescation to reduce number of events sent over UDP.

all|delete|create

Note
  supports event types all|delete|create

## ◆ fce_set_events()

int fce_set_events | ( | const char * | events | ) |

fmod,fdel,ddel,fcre,dcre