]>
Commit | Line | Data |
---|---|---|
e91b9f68 A |
1 | /* |
2 | * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
6 | * This file contains Original Code and/or Modifications of Original Code | |
7 | * as defined in and that are subject to the Apple Public Source License | |
8 | * Version 2.0 (the 'License'). You may not use this file except in | |
9 | * compliance with the License. Please obtain a copy of the License at | |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
11 | * file. | |
12 | * | |
13 | * The Original Code and all software distributed under the License are | |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
18 | * Please see the License for the specific language governing rights and | |
19 | * limitations under the License. | |
20 | * | |
21 | * @APPLE_LICENSE_HEADER_END@ | |
22 | */ | |
23 | #ifndef _LAUNCH_PRIV_H_ | |
24 | #define _LAUNCH_PRIV_H_ | |
25 | ||
26 | #define LAUNCH_KEY_GETUSERENVIRONMENT "GetUserEnvironment" | |
27 | #define LAUNCH_KEY_SETUSERENVIRONMENT "SetUserEnvironment" | |
28 | #define LAUNCH_KEY_UNSETUSERENVIRONMENT "UnsetUserEnvironment" | |
29 | #define LAUNCH_KEY_SETSTDOUT "SetStandardOut" | |
30 | #define LAUNCH_KEY_SETSTDERR "SetStandardError" | |
31 | #define LAUNCH_KEY_SHUTDOWN "Shutdown" | |
32 | #define LAUNCH_KEY_GETRESOURCELIMITS "GetResourceLimits" | |
33 | #define LAUNCH_KEY_SETRESOURCELIMITS "SetResourceLimits" | |
34 | #define LAUNCH_KEY_RELOADTTYS "ReloadTTYS" | |
35 | #define LAUNCH_KEY_SETLOGMASK "SetLogMask" | |
36 | #define LAUNCH_KEY_GETLOGMASK "GetLogMask" | |
37 | #define LAUNCH_KEY_SETUMASK "SetUmask" | |
38 | #define LAUNCH_KEY_GETUMASK "GetUmask" | |
39 | #define LAUNCH_KEY_GETRUSAGESELF "GetResourceUsageSelf" | |
40 | #define LAUNCH_KEY_GETRUSAGECHILDREN "GetResourceUsageChildren" | |
41 | ||
42 | #define LAUNCHD_SOCKET_ENV "LAUNCHD_SOCKET" | |
43 | #define LAUNCHD_SOCK_PREFIX "/var/launchd" | |
44 | #define LAUNCHD_TRUSTED_FD_ENV "__LAUNCHD_FD" | |
45 | #define LAUNCHD_ASYNC_MSG_KEY "_AsyncMessage" | |
46 | #define LAUNCH_KEY_BATCHCONTROL "BatchControl" | |
47 | #define LAUNCH_KEY_BATCHQUERY "BatchQuery" | |
48 | ||
49 | typedef struct _launch *launch_t; | |
50 | ||
51 | launch_t launchd_fdopen(int); | |
52 | int launchd_getfd(launch_t); | |
53 | void launchd_close(launch_t); | |
54 | ||
55 | launch_data_t launch_data_new_errno(int); | |
56 | bool launch_data_set_errno(launch_data_t, int); | |
57 | ||
58 | int launchd_msg_send(launch_t, launch_data_t); | |
59 | int launchd_msg_recv(launch_t, void (*)(launch_data_t, void *), void *); | |
60 | ||
61 | /* batch jobs will be implicity re-enabled when the last application who | |
62 | * disabled them exits */ | |
63 | void launchd_batch_enable(bool); | |
64 | bool launchd_batch_query(void); | |
65 | ||
66 | #endif |