]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/dbus.h
virt: detect LXC+libvirt containers
[thirdparty/systemd.git] / src / dbus.h
CommitLineData
03467c88 1/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
ea430986
LP
2
3#ifndef foodbushfoo
4#define foodbushfoo
5
a7334b09
LP
6/***
7 This file is part of systemd.
8
9 Copyright 2010 Lennart Poettering
10
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
23***/
24
ea430986
LP
25#include <dbus/dbus.h>
26
27#include "manager.h"
28
3996fbe2 29int bus_init(Manager *m, bool try_bus_connect);
5e8d1c9a 30void bus_done(Manager *m);
ea430986 31
c1e1601e 32unsigned bus_dispatch(Manager *m);
ea430986
LP
33
34void bus_watch_event(Manager *m, Watch *w, int events);
35void bus_timeout_event(Manager *m, Watch *w, int events);
36
4139c1b2
LP
37int bus_query_pid(Manager *m, const char *name);
38
5e8d1c9a 39int bus_broadcast(Manager *m, DBusMessage *message);
ea430986 40
a567261a
LP
41bool bus_has_subscriber(Manager *m);
42bool bus_connection_has_subscriber(Manager *m, DBusConnection *c);
43
b23de6af
LP
44int bus_fdset_add_all(Manager *m, FDSet *fds);
45
18fa6b27
LP
46void bus_broadcast_finished(Manager *m, usec_t kernel_usec, usec_t initrd_usec, usec_t userspace_usec, usec_t total_usec);
47
a567261a
LP
48#define BUS_CONNECTION_SUBSCRIBED(m, c) dbus_connection_get_data((c), (m)->subscribed_data_slot)
49#define BUS_PENDING_CALL_NAME(m, p) dbus_pending_call_get_data((p), (m)->name_data_slot)
50
4288f619
LP
51extern const char * const bus_interface_table[];
52
ea430986 53#endif