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