~vorlon/ubuntu/raring/upstart/lp.1199778

« back to all changes in this revision

Viewing changes to init/events.h

  • Committer: Scott James Remnant
  • Date: 2008-04-29 22:58:36 UTC
  • Revision ID: scott@netsplit.com-20080429225836-o8hm5grz2vydc21y
* init/events.h, init/event_operator.c, init/event_operator.h,
init/tests/test_event_operator.c: Separate out the event operator
code and the list of events into separate source files.
* init/Makefile.am (init_SOURCES): Build and link event operator code
and use the lists of events.
(TESTS): Build and run the event operator test suite.
(test_event_operator_SOURCES, test_event_operator_LDFLAGS)
(test_event_operator_LDADD): Details for the event operator test
suite.
(test_process_LDADD, test_job_class_LDADD)
(test_job_process_LDADD, test_job_LDADD, test_event_LDADD)
(test_parse_job_LDADD, test_parse_conf_LDADD, test_conf_LDADD)
(test_control_LDADD): Link the event operator code.

Show diffs side-by-side

added added

removed removed

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