-
Notifications
You must be signed in to change notification settings - Fork 0
/
systemd.h
57 lines (49 loc) · 1.69 KB
/
systemd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifdef WANT_SYSTEMD
/*
* systemd.h
*
* Copyright 2012 Werner Fink, 2012 SuSE Linux Products GmbH Nuernberg, Germany
*
* This source is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <dbus/dbus.h>
extern int systemd_get_tree(DBusConnection *bus);
extern DBusConnection * systemd_open_conn(void);
extern void systemd_close_conn(DBusConnection *bus);
extern void systemd_free(void);
/*
* Linked lists of services, targets and their allies.
*/
typedef struct sdserv __align sdserv_t;
typedef struct {
list_t a_list;
ushort flags;
sdserv_t *serv;
} __align ally_t;
struct sdserv {
list_t s_list;
list_t a_list;
char *unit;
char *name;
};
extern list_t sdservs;
#define SDREL_REQUIRES (1<<0) /* Requires/RequiresOverridable */
#define SDREL_REQUISITE (1<<1) /* Requisite/RequisiteOverridable */
#define SDREL_WANTS (1<<2) /* Wants */
#define SDREL_CONFLICTS (1<<3) /* Conflicts */
#define SDREL_BEFORE (1<<4) /* Before */
#define SDREL_AFTER (1<<5) /* After */
#endif /* WANT_SYSTEMD */