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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
/* upstart
*
* Copyright © 2009 Canonical Ltd.
* Author: Scott James Remnant <scott@netsplit.com>.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2, as
* published by the Free Software Foundation.
*
* 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.
*/
#ifndef INIT_CONTROL_H
#define INIT_CONTROL_H
#include <dbus/dbus.h>
#include <nih/macros.h>
#include <nih-dbus/dbus_connection.h>
#include <nih-dbus/dbus_message.h>
NIH_BEGIN_EXTERN
extern DBusServer *control_server;
extern DBusConnection *control_bus;
extern NihList *control_conns;
void control_init (void);
int control_server_open (void)
__attribute__ ((warn_unused_result));
void control_server_close (void);
int control_bus_open (void)
__attribute__ ((warn_unused_result));
void control_bus_close (void);
int control_reload_configuration (void *data, NihDBusMessage *message)
__attribute__ ((warn_unused_result));
int control_get_job_by_name (void *data, NihDBusMessage *message,
const char *name, char **job)
__attribute__ ((warn_unused_result));
int control_get_all_jobs (void *data, NihDBusMessage *message,
char ***jobs)
__attribute__ ((warn_unused_result));
int control_emit_event (void *data, NihDBusMessage *message,
const char *name, char * const *env,
int wait)
__attribute__ ((warn_unused_result));
int control_get_version (void *data, NihDBusMessage *message,
char **version)
__attribute__ ((warn_unused_result));
int control_get_log_priority (void *data, NihDBusMessage *message,
char **log_priority)
__attribute__ ((warn_unused_result));
int control_set_log_priority (void *data, NihDBusMessage *message,
const char *log_priority)
__attribute__ ((warn_unused_result));
NIH_END_EXTERN
#endif /* INIT_CONTROL_H */
|