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