2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 3 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #ifndef __NOTIFYD_PRIVATE_H__
17 #define __NOTIFYD_PRIVATE_H__
20 #include "lib/util/server_id.h"
25 * Representation of a watcher for a path
27 * This will be stored in the db.
29 struct notifyd_watcher
{
31 * This is an intersections of the filter the watcher is listening for.
34 uint32_t subdir_filter
;
37 * Those are inout variables passed to the sys_watcher. The sys_watcher
38 * will remove the bits it can't handle.
41 uint32_t sys_subdir_filter
;
43 /* The handle for inotify/fam etc. */
48 * Representation of a notifyd instance
50 * This will be stored in the db.
52 struct notifyd_instance
{
53 struct server_id client
;
54 struct notify_instance instance
;
58 * Parse an entry in the notifyd_context->entries database
61 bool notifyd_parse_entry(uint8_t *data
,
63 struct notifyd_watcher
*watcher
,
64 struct notifyd_instance
**instances
,
65 size_t *num_instances
);