]> git.saurik.com Git - apple/launchd.git/blame - launchd/src/launchd_core_logic.h
launchd-258.1.tar.gz
[apple/launchd.git] / launchd / src / launchd_core_logic.h
CommitLineData
ed34e3c3
A
1#ifndef __LAUNCHD_CORE_LOGIC__
2#define __LAUNCHD_CORE_LOGIC__
3/*
4 * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
5 *
6 * @APPLE_APACHE_LICENSE_HEADER_START@
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 *
20 * @APPLE_APACHE_LICENSE_HEADER_END@
21 */
22
5b0a4722
A
23#include "libbootstrap_public.h"
24#include "liblaunch_public.h"
ed34e3c3 25
5b0a4722
A
26typedef struct job_s *job_t;
27typedef struct jobmgr_s *jobmgr_t;
ed34e3c3 28
5b0a4722
A
29extern jobmgr_t root_jobmgr;
30extern mach_port_t inherited_bootstrap_port;
ed34e3c3 31
5b0a4722
A
32void jobmgr_init(bool);
33jobmgr_t jobmgr_shutdown(jobmgr_t jm);
34void jobmgr_dispatch_all_semaphores(jobmgr_t jm);
35jobmgr_t jobmgr_delete_anything_with_port(jobmgr_t jm, mach_port_t port);
ed34e3c3 36
ed34e3c3 37launch_data_t job_export_all(void);
ed34e3c3 38
5b0a4722
A
39job_t job_dispatch(job_t j, bool kickstart); /* returns j on success, NULL on job removal */
40job_t job_find(const char *label);
41job_t job_find_by_service_port(mach_port_t p);
42bool job_ack_port_destruction(mach_port_t p);
43bool job_is_anonymous(job_t j);
44launch_data_t job_export(job_t j);
45void job_stop(job_t j);
46void job_checkin(job_t j);
47void job_remove(job_t j);
48job_t job_import(launch_data_t pload);
49launch_data_t job_import_bulk(launch_data_t pload);
50job_t job_mig_intran(mach_port_t mp);
51void job_mig_destructor(job_t j);
52void job_ack_no_senders(job_t j);
53void job_log(job_t j, int pri, const char *msg, ...) __attribute__((format(printf, 3, 4)));
ed34e3c3
A
54
55#endif