/*
Copyright (C) 2016 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __INOTIFY_H_
#define __INOTIFY_H_
#include <talloc.h>
#include <tevent.h>
void *pvt);
/*
* Set up an inotify watch for file at filename. When an inotify
* event is caught, it must match the "mask" parameter. The watch
* would then call snotify_cb_fn() and include the caught flags.
*
* If snotify_flags includes SNOTIFY_WATCH_DIR, also the parent directory
* of this file would be watched to cover cases where the file might not
* exist when the watch is created.
*
* If you wish to batch inotify requests to avoid hammering the caller
* with several successive requests, use the delay parameter. The function
* would then only send invoke the callback after the delay and the caught
* flags would be OR-ed. By default, the callback is invoked immediately.
*
* Use the pvt parameter to pass a private context to the function
*/
struct tevent_context *ev,
const char *filename,
const char *fn_name,
void *pvt);
#endif /* __INOTIFY_H_ */