]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/journal-remote/journal-remote.h
tree-wide: use coccinelle to patch a lot of code to use mfree()
[thirdparty/systemd.git] / src / journal-remote / journal-remote.h
CommitLineData
a812a881
ZJS
1/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3/***
4 This file is part of systemd.
5
6 Copyright 2014 Zbigniew Jędrzejewski-Szmek
7
8 systemd is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 2.1 of the License, or
11 (at your option) any later version.
12
13 systemd is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 along with systemd; If not, see <http://www.gnu.org/licenses/>.
20***/
21
22#pragma once
23
9ff48d09
ZJS
24
25#include "sd-event.h"
26#include "hashmap.h"
27#include "microhttpd-util.h"
28
29#include "journal-remote-parse.h"
a812a881
ZJS
30#include "journal-remote-write.h"
31
32typedef struct MHDDaemonWrapper MHDDaemonWrapper;
9ff48d09 33
a812a881 34struct MHDDaemonWrapper {
9ff48d09
ZJS
35 uint64_t fd;
36 struct MHD_Daemon *daemon;
37
38 sd_event_source *event;
a812a881 39};
9ff48d09 40
a812a881 41struct RemoteServer {
9ff48d09
ZJS
42 RemoteSource **sources;
43 size_t sources_size;
44 size_t active;
45
46 sd_event *events;
47 sd_event_source *sigterm_event, *sigint_event, *listen_event;
48
49 Hashmap *writers;
50 Writer *_single_writer;
51 uint64_t event_count;
52
53 bool check_trust;
54 Hashmap *daemons;
a812a881 55};