summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-remote.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-02 00:15:37 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-15 22:34:41 -0400
commit9ff48d0982fcb97923955685fe9fa4e0e67cb238 (patch)
treeb26c25523cf45bfd1659565d2d902c24e8168724 /src/journal-remote/journal-remote.h
parenta83f403760cb63b1bf7787e9ff325ffb6d891d39 (diff)
journal-remote: rework fd and writer reference handling
Diffstat (limited to 'src/journal-remote/journal-remote.h')
-rw-r--r--src/journal-remote/journal-remote.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/journal-remote/journal-remote.h b/src/journal-remote/journal-remote.h
new file mode 100644
index 0000000000..0422cea082
--- /dev/null
+++ b/src/journal-remote/journal-remote.h
@@ -0,0 +1,30 @@
+#include <inttypes.h>
+
+#include "sd-event.h"
+#include "hashmap.h"
+#include "microhttpd-util.h"
+
+#include "journal-remote-parse.h"
+
+typedef struct MHDDaemonWrapper {
+ uint64_t fd;
+ struct MHD_Daemon *daemon;
+
+ sd_event_source *event;
+} MHDDaemonWrapper;
+
+typedef struct RemoteServer {
+ RemoteSource **sources;
+ size_t sources_size;
+ size_t active;
+
+ sd_event *events;
+ sd_event_source *sigterm_event, *sigint_event, *listen_event;
+
+ Hashmap *writers;
+ Writer *_single_writer;
+ uint64_t event_count;
+
+ bool check_trust;
+ Hashmap *daemons;
+} RemoteServer;