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

« back to all changes in this revision

Viewing changes to upstart/message.h

  • Committer: Scott James Remnant
  • Date: 2007-03-11 13:33:36 UTC
  • Revision ID: scott@netsplit.com-20070311133336-3v0y4d924o7326zd
* upstart/message.h: Add messages for querying the version of the
init daemon and changing the log priority.
* upstart/message.c (upstart_message_newv)
(upstart_message_handle): Marshal the new messages.
* upstart/tests/test_message.c (test_new, my_handler) 
(test_handle): Test the marshalling of the new messages,

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 * UpstartMsgHandler for more details.
49
49
 **/
50
50
typedef enum upstart_message_type {
51
 
        /* General messages */
52
 
        UPSTART_NO_OP,
 
51
        /* General messages.
 
52
         *
 
53
         * Clients or the server may send UPSTART_NO_OP at any time, without
 
54
         * any effect or reply.
 
55
         *
 
56
         * Clients may send UPSTART_VERSION_QUERY and receive an
 
57
         * UPSTART_VERSION message in reply.
 
58
         *
 
59
         * Clients may send UPSTART_LOG_PRIORITY, without any reply.
 
60
         */
 
61
        UPSTART_NO_OP              = 0x0000,
 
62
        UPSTART_VERSION_QUERY      = 0x0001,
 
63
        UPSTART_LOG_PRIORITY       = 0x0002,
 
64
        UPSTART_VERSION            = 0x0010,
53
65
 
54
66
        /* Job requests and responses.
55
67
         *
151
163
 * @type is received from another process @pid.  The function will be called
152
164
 * with additional arguments that vary based on @type as follows:
153
165
 *
 
166
 * UPSTART_NO_OP:
 
167
 * No arguments.
 
168
 *
 
169
 * UPSTART_VERSION_QUERY:
 
170
 * No arguments.
 
171
 *
 
172
 * UPSTART_LOG_PRIORITY:
 
173
 * @priority: new log priority (unsigned).
 
174
 *
 
175
 * UPSTART_VERSION:
 
176
 * @version: full name and version of init daemon (char *).
 
177
 *
 
178
 *
154
179
 * UPSTART_JOB_FIND:
155
180
 * @pattern: pattern to seek or NULL (char *).
156
181
 *