]> git.saurik.com Git - apple/configd.git/blob - configd.tproj/configd_server.h
configd-1109.40.9.tar.gz
[apple/configd.git] / configd.tproj / configd_server.h
1 /*
2 * Copyright (c) 2000-2006, 2008, 2011. 2015, 2018-2019 Apple 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
24 /*
25 * Modification History
26 *
27 * June 1, 2001 Allan Nathanson <ajn@apple.com>
28 * - public API conversion
29 *
30 * March 24, 2000 Allan Nathanson <ajn@apple.com>
31 * - initial revision
32 */
33
34 #ifndef _S_CONFIGD_SERVER_H
35 #define _S_CONFIGD_SERVER_H
36
37 #include <sys/cdefs.h>
38 #include <sys/fileport.h>
39 #include <mach/mach.h>
40 #include <CoreFoundation/CoreFoundation.h>
41
42 #define DISPATCH_MACH_SPI 1
43 #import <dispatch/private.h>
44
45 __BEGIN_DECLS
46
47 void server_mach_channel_handler
48 (void *context, // serverSessionRef
49 dispatch_mach_reason_t reason,
50 dispatch_mach_msg_t message,
51 mach_error_t error);
52
53 void server_init (void);
54
55 dispatch_workloop_t server_queue (void);
56
57 kern_return_t _snapshot (mach_port_t server,
58 int *sc_status,
59 audit_token_t audit_token);
60
61 kern_return_t _configopen (mach_port_t server,
62 xmlData_t nameRef,
63 mach_msg_type_number_t nameLen,
64 xmlData_t optionsRef,
65 mach_msg_type_number_t optionsLen,
66 mach_port_t *newServer,
67 int *sc_status,
68 audit_token_t audit_token);
69
70 kern_return_t _configlist (mach_port_t server,
71 xmlData_t keyRef,
72 mach_msg_type_number_t keyLen,
73 int isRegex,
74 xmlDataOut_t *listRef,
75 mach_msg_type_number_t *listLen,
76 int *sc_status,
77 audit_token_t audit_token);
78
79 kern_return_t _configadd (mach_port_t server,
80 xmlData_t keyRef,
81 mach_msg_type_number_t keyLen,
82 xmlData_t dataRef,
83 mach_msg_type_number_t dataLen,
84 int *newInstance, // no longer used
85 int *sc_status,
86 audit_token_t audit_token);
87
88 kern_return_t _configadd_s (mach_port_t server,
89 xmlData_t keyRef,
90 mach_msg_type_number_t keyLen,
91 xmlData_t dataRef,
92 mach_msg_type_number_t dataLen,
93 int *newInstance, // no longer used
94 int *sc_status);
95
96 kern_return_t _configget (mach_port_t server,
97 xmlData_t keyRef,
98 mach_msg_type_number_t keyLen,
99 xmlDataOut_t *dataRef,
100 mach_msg_type_number_t *dataLen,
101 int *newInstance, // no longer used
102 int *sc_status,
103 audit_token_t audit_token);
104
105 kern_return_t _configset (mach_port_t server,
106 xmlData_t keyRef,
107 mach_msg_type_number_t keyLen,
108 xmlData_t dataRef,
109 mach_msg_type_number_t dataLen,
110 int *newInstance, // no longer used
111 int *sc_status,
112 audit_token_t audit_token);
113
114 kern_return_t _configremove (mach_port_t server,
115 xmlData_t keyRef,
116 mach_msg_type_number_t keyLen,
117 int *sc_status,
118 audit_token_t audit_token);
119
120 kern_return_t _confignotify (mach_port_t server,
121 xmlData_t keyRef,
122 mach_msg_type_number_t keyLen,
123 int *sc_status,
124 audit_token_t audit_token);
125
126 kern_return_t _configget_m (mach_port_t server,
127 xmlData_t keysRef,
128 mach_msg_type_number_t keysLen,
129 xmlData_t patternsRef,
130 mach_msg_type_number_t patternsLen,
131 xmlDataOut_t *dataRef,
132 mach_msg_type_number_t *dataLen,
133 int *sc_status,
134 audit_token_t audit_token);
135
136 kern_return_t _configset_m (mach_port_t server,
137 xmlData_t dataRef,
138 mach_msg_type_number_t dataLen,
139 xmlData_t removeRef,
140 mach_msg_type_number_t removeLen,
141 xmlData_t notifyRef,
142 mach_msg_type_number_t notifyLen,
143 int *sc_status,
144 audit_token_t audit_token);
145
146 kern_return_t _notifyadd (mach_port_t server,
147 xmlData_t keyRef,
148 mach_msg_type_number_t keyLen,
149 int isRegex,
150 int *status);
151
152 kern_return_t _notifyremove (mach_port_t server,
153 xmlData_t keyRef,
154 mach_msg_type_number_t keyLen,
155 int isRegex,
156 int *status);
157
158 kern_return_t _notifychanges (mach_port_t server,
159 xmlDataOut_t *listRef,
160 mach_msg_type_number_t *listLen,
161 int *status);
162
163 kern_return_t _notifyviaport (mach_port_t server,
164 mach_port_t port,
165 mach_msg_id_t msgid,
166 int *status);
167
168 kern_return_t _notifyviafd (mach_port_t server,
169 fileport_t fileport,
170 int identifier,
171 int *status);
172
173 kern_return_t _notifycancel (mach_port_t server,
174 int *sc_status);
175
176 kern_return_t _notifyset (mach_port_t server,
177 xmlData_t keysRef,
178 mach_msg_type_number_t keysLen,
179 xmlData_t patternsRef,
180 mach_msg_type_number_t patternsLen,
181 int *sc_status);
182
183 __END_DECLS
184
185 #endif /* !_S_CONFIGD_SERVER_H */