SystemStarterIPC.h
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_APACHE_LICENSE_HEADER_START@ 9 * 10 * Licensed under the Apache License, Version 2.0 (the "License"); 11 * you may not use this file except in compliance with the License. 12 * You may obtain a copy of the License at 13 * 14 * http://www.apache.org/licenses/LICENSE-2.0 15 * 16 * Unless required by applicable law or agreed to in writing, software 17 * distributed under the License is distributed on an "AS IS" BASIS, 18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 * See the License for the specific language governing permissions and 20 * limitations under the License. 21 * 22 * @APPLE_APACHE_LICENSE_HEADER_END@ 23 ** 24 * Definitions used for IPC communications with SystemStarter. 25 * SystemStarter listens on a CFMessagePort with the name defined by 26 * kSystemStarterMessagePort. The messageID of each message should 27 * be set to the kIPCProtocolVersion constant. The contents of each 28 * message should be an XML plist containing a dictionary using 29 * the keys defined in this file. 30 **/ 31 32 #ifndef _SYSTEM_STARTER_IPC_H 33 #define _SYSTEM_STARTER_IPC_H 34 35 #include <CoreFoundation/CFString.h> 36 #include <mach/message.h> 37 38 /* Compatible with inline CFMessagePort messages. */ 39 typedef struct SystemStarterIPCMessage { 40 mach_msg_header_t aHeader; 41 mach_msg_body_t aBody; 42 SInt32 aProtocol; 43 SInt32 aByteLength; 44 /* Data follows. */ 45 } SystemStarterIPCMessage; 46 47 /* Name of the CFMessagePort SystemStarter listens on. */ 48 #define kSystemStarterMessagePort "com.apple.SystemStarter" 49 50 /* kIPCProtocolVersion should be passed as the messageID of the CFMessage. */ 51 #define kIPCProtocolVersion 0 52 53 /* kIPCTypeKey should be provided for all messages. */ 54 #define kIPCMessageKey CFSTR("Message") 55 56 /* Messages are one of the following types: */ 57 #define kIPCConsoleMessage CFSTR("ConsoleMessage") 58 #define kIPCStatusMessage CFSTR("StatusMessage") 59 #define kIPCQueryMessage CFSTR("QueryMessage") 60 #define kIPCLoadDisplayBundleMessage CFSTR("LoadDisplayBundle") 61 #define kIPCUnloadDisplayBundleMessage CFSTR("UnloadDisplayBundle") 62 63 /* kIPCServiceNameKey identifies a startup item by one of the services it provides. */ 64 #define kIPCServiceNameKey CFSTR("ServiceName") 65 66 /* kIPCProcessIDKey identifies a running startup item by its process id. */ 67 #define kIPCProcessIDKey CFSTR("ProcessID") 68 69 /* kIPCConsoleMessageKey contains the non-localized string to 70 * display for messages of type kIPCTypeConsoleMessage. 71 */ 72 #define kIPCConsoleMessageKey CFSTR("ConsoleMessage") 73 74 /* kIPCStatus key contains a boolean value. True for success, false for failure. */ 75 #define kIPCStatusKey CFSTR("StatusKey") 76 77 /* kIPCDisplayBundlePathKey contains a string path to the display bundle 78 SystemStarter should attempt to load. */ 79 #define kIPCDisplayBundlePathKey CFSTR("DisplayBundlePath") 80 81 /* kIPCConfigNamegKey contains the name of a config setting to query */ 82 #define kIPCConfigSettingKey CFSTR("ConfigSetting") 83 84 /* Some config settings */ 85 #define kIPCConfigSettingVerboseFlag CFSTR("VerboseFlag") 86 #define kIPCConfigSettingNetworkUp CFSTR("NetworkUp") 87 88 #endif /* _SYSTEM_STARTER_IPC_H */