]> git.saurik.com Git - apple/launchd.git/blame - launchd/src/SystemStarterIPC.h
launchd-106.tar.gz
[apple/launchd.git] / launchd / src / SystemStarterIPC.h
CommitLineData
e91b9f68
A
1/**
2 * SystemStarterIPC.h - System Starter IPC definitions
3 * Wilfredo Sanchez | wsanchez@opensource.apple.com
4 * Kevin Van Vechten | kevinvv@uclink4.berkeley.edu
5 **
6 * Copyright (c) 1999-2001 Apple Computer, Inc. All rights reserved.
7 *
8 * @APPLE_LICENSE_HEADER_START@
9 *
10 * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
11 * Reserved. This file contains Original Code and/or Modifications of
12 * Original Code as defined in and that are subject to the Apple Public
13 * Source License Version 1.1 (the "License"). You may not use this file
14 * except in compliance with the License. Please obtain a copy of the
15 * License at http://www.apple.com/publicsource and read it before using
16 * this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
23 * License for the specific language governing rights and limitations
24 * under the License.
25 *
26 * @APPLE_LICENSE_HEADER_END@
27 **
28 * Definitions used for IPC communications with SystemStarter.
29 * SystemStarter listens on a CFMessagePort with the name defined by
30 * kSystemStarterMessagePort. The messageID of each message should
31 * be set to the kIPCProtocolVersion constant. The contents of each
32 * message should be an XML plist containing a dictionary using
33 * the keys defined in this file.
34 **/
35
36#ifndef _SYSTEM_STARTER_IPC_H
37#define _SYSTEM_STARTER_IPC_H
38
39#include <CoreFoundation/CFString.h>
40#include <mach/message.h>
41
42/* Compatible with inline CFMessagePort messages. */
43typedef struct SystemStarterIPCMessage {
44 mach_msg_header_t aHeader;
45 mach_msg_body_t aBody;
46 SInt32 aProtocol;
47 SInt32 aByteLength;
48 /* Data follows. */
49} SystemStarterIPCMessage;
50
51/* Name of the CFMessagePort SystemStarter listens on. */
52#define kSystemStarterMessagePort "com.apple.SystemStarter"
53
54/* kIPCProtocolVersion should be passed as the messageID of the CFMessage. */
55#define kIPCProtocolVersion 0
56
57/* kIPCTypeKey should be provided for all messages. */
58#define kIPCMessageKey CFSTR("Message")
59
60/* Messages are one of the following types: */
61#define kIPCConsoleMessage CFSTR("ConsoleMessage")
62#define kIPCStatusMessage CFSTR("StatusMessage")
63#define kIPCQueryMessage CFSTR("QueryMessage")
64#define kIPCLoadDisplayBundleMessage CFSTR("LoadDisplayBundle")
65#define kIPCUnloadDisplayBundleMessage CFSTR("UnloadDisplayBundle")
66
67/* kIPCServiceNameKey identifies a startup item by one of the services it provides. */
68#define kIPCServiceNameKey CFSTR("ServiceName")
69
70/* kIPCProcessIDKey identifies a running startup item by its process id. */
71#define kIPCProcessIDKey CFSTR("ProcessID")
72
73/* kIPCConsoleMessageKey contains the non-localized string to
74 * display for messages of type kIPCTypeConsoleMessage.
75 */
76#define kIPCConsoleMessageKey CFSTR("ConsoleMessage")
77
78/* kIPCStatus key contains a boolean value. True for success, false for failure. */
79#define kIPCStatusKey CFSTR("StatusKey")
80
81/* kIPCDisplayBundlePathKey contains a string path to the display bundle
82 SystemStarter should attempt to load. */
83#define kIPCDisplayBundlePathKey CFSTR("DisplayBundlePath")
84
85/* kIPCConfigNamegKey contains the name of a config setting to query */
86#define kIPCConfigSettingKey CFSTR("ConfigSetting")
87
88/* Some config settings */
89#define kIPCConfigSettingVerboseFlag CFSTR("VerboseFlag")
90#define kIPCConfigSettingNetworkUp CFSTR("NetworkUp")
91
92#endif /* _SYSTEM_STARTER_IPC_H */