lsyncd/fsevents.c
Axel Kittenberger b077d2e713
2010-11-26 17:01:18 +00:00

59 lines
1.4 KiB
C

/**
* fsevents.c from Lsyncd - Live (Mirror) Syncing Demon
*
* License: GPLv2 (see COPYING) or any later version
*
* Authors: Axel Kittenberger <axkibe@gmail.com>
*
* -----------------------------------------------------------------------
*
* Event interface for MacOS 10(.5) /dev/fsevents interface.
*
* WARNING! AFAIK this interface is not strictly considered "public" API
* by Apple. Thus it might easily change between versions. Also its said,
* altough every event receiver has its own message queue, the OS X kernel
* only deletes a message after *all* registered receivers handled it. So
* one receiver blocking overflows all receivers. So spotlight might have
* to do more stuff, when Lsyncd might cause an overflow. Use at own risk.
*
* Special thanks go to Amit Singh and his fslogger demonstration that
* showed how apples /dev/fsevents can be used.
* http://osxbook.com/software/fslogger/
*/
#include "lsyncd.h"
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
static const luaL_reg lfseventslib[] = {
{NULL, NULL}
};
/**
* registers fsevents functions.
*/
extern void
register_fsevents(lua_State *L) {
lua_pushstring(L, "fsevents");
luaL_register(L, "fsevents", lfseventslib);
}
/**
* opens and initalizes fsevents.
*/
extern void
open_fsevents(lua_State *L) {
// TODO
}
/**
* closes fsevents
*/
extern void
close_fsevents() {
// TODO
}