~mdeslaur/upstart/apparmor-support

927 by Scott James Remnant
* init/events.h, init/event_operator.c, init/event_operator.h,
1
/* upstart
2
 *
1101 by Scott James Remnant
* COPYING: Change licence from GPL-2+ to GPL-3 only.
3
 * Copyright © 2009 Canonical Ltd.
1103 by Scott James Remnant
Restore author field
4
 * Author: Scott James Remnant <scott@netsplit.com>.
927 by Scott James Remnant
* init/events.h, init/event_operator.c, init/event_operator.h,
5
 *
1124 by Scott James Remnant
* COPYING: Change licence to version 2 of the GNU GPL.
6
 * This program is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License version 2, as
1101 by Scott James Remnant
* COPYING: Change licence from GPL-2+ to GPL-3 only.
8
 * published by the Free Software Foundation.
927 by Scott James Remnant
* init/events.h, init/event_operator.c, init/event_operator.h,
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
1124 by Scott James Remnant
* COPYING: Change licence to version 2 of the GNU GPL.
15
 * You should have received a copy of the GNU General Public License along
16
 * with this program; if not, write to the Free Software Foundation, Inc.,
17
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
927 by Scott James Remnant
* init/events.h, init/event_operator.c, init/event_operator.h,
18
 */
19
20
#ifndef INIT_EVENTS_H
21
#define INIT_EVENTS_H
22
23
/**
24
 * STARTUP_EVENT:
25
 *
26
 * Name of the event that we generate when init is first executed.
27
 **/
28
#ifndef DEBUG
29
#define STARTUP_EVENT "startup"
30
#else /* DEBUG */
31
#define STARTUP_EVENT "debug"
32
#endif
33
1427.3.1 by James Hunt
* dbus/com.ubuntu.Upstart.xml: Added 'EndSession' method.
34
/**
35
 * SESSION_END_EVENT:
36
 *
37
 * Name of the event Upstart emits to denote a Session Init
38
 * is shutting down.
39
 **/
40
#define SESSION_END_EVENT "session-end"
927 by Scott James Remnant
* init/events.h, init/event_operator.c, init/event_operator.h,
41
42
/**
43
 * CTRLALTDEL_EVENT:
44
 *
45
 * Name of the event that we generate when the Control-Alt-Delete key
46
 * combination is pressed.
47
 **/
48
#define CTRLALTDEL_EVENT "control-alt-delete"
49
50
/**
51
 * KBDREQUEST_EVENT:
52
 *
53
 * Name of the event that we generate when the Alt-UpArrow key combination
54
 * is pressed.
55
 **/
56
#define KBDREQUEST_EVENT "keyboard-request"
57
58
/**
59
 * PWRSTATUS_EVENT:
60
 *
61
 * Name of the event that we generate when we receive SIGPWR, indicating
62
 * that the power status has changed.
63
 **/
64
#define PWRSTATUS_EVENT "power-status-changed"
65
66
67
/**
68
 * JOB_STARTING_EVENT:
69
 *
70
 * Name of the event we generate when we're ready to start a job; the job
71
 * is not actually started until the handling of this event finishes.
72
 **/
73
#define JOB_STARTING_EVENT "starting"
74
75
/**
76
 * JOB_STARTED_EVENT:
77
 *
78
 * Name of the event we generate once a job has been started and is now
79
 * running.  This is not generated until the spawned pid is located (if
80
 * appropriate) and the post-start script has finished.
81
 **/
82
#define JOB_STARTED_EVENT "started"
83
84
/**
85
 * JOB_STOPPING_EVENT:
86
 *
87
 * Name of the event we generate when we're ready to stop a job, which
88
 * includes arguments and environment indicating whether the job failed.
89
 * This is run after the pre-stop script has finished without setting the
90
 * goal back to start.  The job is not actually stopped until the handling
91
 * of this event finishes.
92
 **/
93
#define JOB_STOPPING_EVENT "stopping"
94
95
/**
96
 * JOB_STOPPED_EVENT:
97
 *
98
 * Name of the event we generate once a job has been stopped and is now
99
 * waiting.
100
 **/
101
#define JOB_STOPPED_EVENT "stopped"
102
103
104
#endif /* INIT_EVENTS_H */