syslog-ng source
directory-monitor-factory.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Balabit
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 2 as published
6  * by the Free Software Foundation, or (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * As an additional exemption you are allowed to compile & link against the
18  * OpenSSL libraries as published by the OpenSSL project. See the file
19  * COPYING for details.
20  *
21  */
22 #ifndef MODULES_AFFILE_DIRECTORY_MONITOR_FACTORY_H_
23 #define MODULES_AFFILE_DIRECTORY_MONITOR_FACTORY_H_
24 
25 #include "directory-monitor.h"
26 
27 typedef DirectoryMonitor *(*DirectoryMonitorConstructor)(const gchar *dir, guint recheck_time);
28 
29 typedef enum
30 {
37 
38 typedef struct _DirectoryMonitorOptions
39 {
40  const gchar *dir;
41  guint monitor_freq;
44 
47 
48 DirectoryMonitor *create_directory_monitor(DirectoryMonitorOptions *options);
49 
50 #endif /* MODULES_AFFILE_DIRECTORY_MONITOR_FACTORY_H_ */
MonitorMethod
Definition: directory-monitor-factory.h:30
@ MM_UNKNOWN
Definition: directory-monitor-factory.h:35
@ MM_KQUEUE
Definition: directory-monitor-factory.h:34
@ MM_INOTIFY
Definition: directory-monitor-factory.h:33
@ MM_AUTO
Definition: directory-monitor-factory.h:31
@ MM_POLL
Definition: directory-monitor-factory.h:32
DirectoryMonitorConstructor directory_monitor_factory_get_constructor(DirectoryMonitorOptions *options)
Definition: directory-monitor-factory.c:71
MonitorMethod directory_monitor_factory_get_monitor_method(const gchar *method_name)
Definition: directory-monitor-factory.c:45
DirectoryMonitor * create_directory_monitor(DirectoryMonitorOptions *options)
Definition: directory-monitor-factory.c:98
DirectoryMonitor *(* DirectoryMonitorConstructor)(const gchar *dir, guint recheck_time)
Definition: directory-monitor-factory.h:27
Definition: directory-monitor-factory.h:39
guint monitor_freq
Definition: directory-monitor-factory.h:41
const gchar * dir
Definition: directory-monitor-factory.h:40
MonitorMethod method
Definition: directory-monitor-factory.h:42