]> git.saurik.com Git - apple/configd.git/blob - configd.tproj/configd_server.h
configd-963.250.1.tar.gz
[apple/configd.git] / configd.tproj / configd_server.h
1 /*
2 * Copyright (c) 2000-2006, 2008, 2011, 2015, 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 __BEGIN_DECLS
43
44 void configdCallback (CFMachPortRef port,
45 void *msg,
46 CFIndex size,
47 void *info);
48
49 void server_init (void);
50
51 int server_shutdown (void);
52
53 void server_loop (void);
54
55 kern_return_t _snapshot (mach_port_t server,
56 int *sc_status,
57 audit_token_t audit_token);
58
59 kern_return_t _configopen (mach_port_t server,
60 xmlData_t nameRef,
61 mach_msg_type_number_t nameLen,
62 xmlData_t optionsRef,
63 mach_msg_type_number_t optionsLen,
64 mach_port_t *newServer,
65 int *sc_status,
66 audit_token_t audit_token);
67
68 kern_return_t _configlist (mach_port_t server,
69 xmlData_t keyRef,
70 mach_msg_type_number_t keyLen,
71 int isRegex,
72 xmlDataOut_t *listRef,
73 mach_msg_type_number_t *listLen,
74 int *sc_status,
75 audit_token_t audit_token);
76
77 kern_return_t _configadd (mach_port_t server,
78 xmlData_t keyRef,
79 mach_msg_type_number_t keyLen,
80 xmlData_t dataRef,
81 mach_msg_type_number_t dataLen,
82 int *newInstance, // no longer used
83 int *sc_status,
84 audit_token_t audit_token);
85
86 kern_return_t _configadd_s (mach_port_t server,
87 xmlData_t keyRef,
88 mach_msg_type_number_t keyLen,
89 xmlData_t dataRef,
90 mach_msg_type_number_t dataLen,
91 int *newInstance, // no longer used
92 int *sc_status);
93
94 kern_return_t _configget (mach_port_t server,
95 xmlData_t keyRef,
96 mach_msg_type_number_t keyLen,
97 xmlDataOut_t *dataRef,
98 mach_msg_type_number_t *dataLen,
99 int *newInstance, // no longer used
100 int *sc_status,
101 audit_token_t audit_token);
102
103 kern_return_t _configset (mach_port_t server,
104 xmlData_t keyRef,
105 mach_msg_type_number_t keyLen,
106 xmlData_t dataRef,
107 mach_msg_type_number_t dataLen,
108 int *newInstance, // no longer used
109 int *sc_status,
110 audit_token_t audit_token);
111
112 kern_return_t _configremove (mach_port_t server,
113 xmlData_t keyRef,
114 mach_msg_type_number_t keyLen,
115 int *sc_status,
116 audit_token_t audit_token);
117
118 kern_return_t _confignotify (mach_port_t server,
119 xmlData_t keyRef,
120 mach_msg_type_number_t keyLen,
121 int *sc_status,
122 audit_token_t audit_token);
123
124 kern_return_t _configget_m (mach_port_t server,
125 xmlData_t keysRef,
126 mach_msg_type_number_t keysLen,
127 xmlData_t patternsRef,
128 mach_msg_type_number_t patternsLen,
129 xmlDataOut_t *dataRef,
130 mach_msg_type_number_t *dataLen,
131 int *sc_status,
132 audit_token_t audit_token);
133
134 kern_return_t _configset_m (mach_port_t server,
135 xmlData_t dataRef,
136 mach_msg_type_number_t dataLen,
137 xmlData_t removeRef,
138 mach_msg_type_number_t removeLen,
139 xmlData_t notifyRef,
140 mach_msg_type_number_t notifyLen,
141 int *sc_status,
142 audit_token_t audit_token);
143
144 kern_return_t _notifyadd (mach_port_t server,
145 xmlData_t keyRef,
146 mach_msg_type_number_t keyLen,
147 int isRegex,
148 int *status);
149
150 kern_return_t _notifyremove (mach_port_t server,
151 xmlData_t keyRef,
152 mach_msg_type_number_t keyLen,
153 int isRegex,
154 int *status);
155
156 kern_return_t _notifychanges (mach_port_t server,
157 xmlDataOut_t *listRef,
158 mach_msg_type_number_t *listLen,
159 int *status);
160
161 kern_return_t _notifyviaport (mach_port_t server,
162 mach_port_t port,
163 mach_msg_id_t msgid,
164 int *status);
165
166 kern_return_t _notifyviafd (mach_port_t server,
167 fileport_t fileport,
168 int identifier,
169 int *status);
170
171 kern_return_t _notifyviasignal
172 (mach_port_t server,
173 task_t task,
174 int signal,
175 int *status);
176
177 kern_return_t _notifycancel (mach_port_t server,
178 int *sc_status);
179
180 kern_return_t _notifyset (mach_port_t server,
181 xmlData_t keysRef,
182 mach_msg_type_number_t keysLen,
183 xmlData_t patternsRef,
184 mach_msg_type_number_t patternsLen,
185 int *sc_status);
186
187 __END_DECLS
188
189 #endif /* !_S_CONFIGD_SERVER_H */