]>
git.saurik.com Git - apple/launchd.git/blob - liblaunch/launch_internal.h
aa6576f8e2772a9866e92d1d3f30d80304b38b0f
2 * Copyright (c) 2007 Apple Computer, Inc. All rights reserved.
4 * @APPLE_APACHE_LICENSE_HEADER_START@
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 * @APPLE_APACHE_LICENSE_HEADER_END@
21 #ifndef __LAUNCH_INTERNAL_H__
22 #define __LAUNCH_INTERNAL_H__
26 #pragma GCC visibility push(default)
28 #define LAUNCHD_DB_PREFIX "/private/var/db/launchd.db"
29 #define LAUNCHD_LOG_PREFIX "/private/var/log"
31 typedef struct _launch
*launch_t
;
33 launch_t
launchd_fdopen(int, int);
34 int launchd_getfd(launch_t
);
35 void launchd_close(launch_t
, __typeof__(close
) closefunc
);
37 launch_data_t
launch_data_new_errno(int);
38 bool launch_data_set_errno(launch_data_t
, int);
40 int launchd_msg_send(launch_t
, launch_data_t
);
41 int launchd_msg_recv(launch_t
, void (*)(launch_data_t
, void *), void *);
43 size_t launch_data_pack(launch_data_t d
, void *where
, size_t len
, int *fd_where
, size_t *fdslotsleft
);
44 launch_data_t
launch_data_unpack(void *data
, size_t data_size
, int *fds
, size_t fd_cnt
, size_t *data_offset
, size_t *fdoffset
);
46 #pragma GCC visibility pop
48 #endif /* __LAUNCH_INTERNAL_H__*/