]> git.saurik.com Git - apple/configd.git/blame - configd.tproj/_SCD.h
configd-204.tar.gz
[apple/configd.git] / configd.tproj / _SCD.h
CommitLineData
5958d7c0 1/*
edebe297 2 * Copyright (c) 2000, 2001, 2003, 2004, 2006 Apple Computer, Inc. All rights reserved.
5958d7c0
A
3 *
4 * @APPLE_LICENSE_HEADER_START@
009ee3c6 5 *
009ee3c6
A
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
5958d7c0
A
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
009ee3c6
A
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 *
5958d7c0
A
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
0fae82ee
A
24/*
25 * Modification History
26 *
27 * June 1, 2001 Allan Nathanson <ajn@apple.com>
28 * - public API conversion
29 *
dbf6a266 30 * June 2, 2000 Allan Nathanson <ajn@apple.com>
0fae82ee
A
31 * - initial revision
32 */
33
5958d7c0
A
34
35#ifndef _S_SCD_H
36#define _S_SCD_H
37
38#include <sys/cdefs.h>
39
40
41/*
0fae82ee 42 * keys in the "storeData" dictionary
5958d7c0
A
43 */
44
45/*
46 * data associated with a key
47 */
48#define kSCDData CFSTR("data")
5958d7c0
A
49/*
50 * client session ids watching a key and, since we can possibly have
51 * multiple regex keys which reference the key, a count of active
52 * references
53 */
54#define kSCDWatchers CFSTR("watchers")
55#define kSCDWatcherRefs CFSTR("watcherRefs")
56/*
57 * client session id for per-session keys.
58 */
59#define kSCDSession CFSTR("session")
60
61
62/*
63 * keys in the "sessionData" dictionary
64 */
65
66/*
67 * the name of the calling application / plug-in
68 */
69#define kSCDName CFSTR("name")
70/*
71 * keys which have changed since last call to SCDNotifierGetChanges()
72 */
73#define kSCDChangedKeys CFSTR("changedKeys")
5958d7c0
A
74/*
75 * keys which are to be removed when the session is closed
76 */
77#define kSCDSessionKeys CFSTR("sessionKeys")
78
79
0fae82ee
A
80extern int storeLocked;
81extern CFMutableDictionaryRef storeData;
5958d7c0 82extern CFMutableDictionaryRef sessionData;
009ee3c6 83extern CFMutableDictionaryRef patternData;
5958d7c0
A
84extern CFMutableSetRef changedKeys;
85extern CFMutableSetRef deferredRemovals;
86extern CFMutableSetRef removedSessionKeys;
87extern CFMutableSetRef needsNotification;
88
0fae82ee 89extern CFMutableDictionaryRef storeData_s;
009ee3c6 90extern CFMutableDictionaryRef patternData_s;
5958d7c0
A
91extern CFMutableSetRef changedKeys_s;
92extern CFMutableSetRef deferredRemovals_s;
93extern CFMutableSetRef removedSessionKeys_s;
94
5958d7c0
A
95
96__BEGIN_DECLS
97
0fae82ee
A
98int
99__SCDynamicStoreOpen (SCDynamicStoreRef *store,
100 CFStringRef name);
101int
009ee3c6
A
102__SCDynamicStoreClose (SCDynamicStoreRef *store,
103 Boolean internal);
0fae82ee
A
104
105int
106__SCDynamicStoreLock (SCDynamicStoreRef store,
107 Boolean recursive);
108
109int
110__SCDynamicStoreUnlock (SCDynamicStoreRef store,
111 Boolean recursive);
112
113int
114__SCDynamicStoreCopyKeyList (SCDynamicStoreRef store,
115 CFStringRef prefix,
116 Boolean isRegex,
117 CFArrayRef *subKeys);
118
119int
120__SCDynamicStoreAddValue (SCDynamicStoreRef store,
121 CFStringRef key,
dbf6a266
A
122 CFDataRef value,
123 Boolean internal);
0fae82ee
A
124
125int
126__SCDynamicStoreCopyValue (SCDynamicStoreRef store,
127 CFStringRef key,
009ee3c6
A
128 CFDataRef *value,
129 Boolean internal);
130
131int
132__SCDynamicStoreCopyMultiple (SCDynamicStoreRef store,
133 CFArrayRef keys,
134 CFArrayRef patterns,
135 CFDictionaryRef *values);
0fae82ee
A
136
137int
138__SCDynamicStoreSetValue (SCDynamicStoreRef store,
139 CFStringRef key,
009ee3c6
A
140 CFDataRef value,
141 Boolean internal);
142
143int
144__SCDynamicStoreSetMultiple (SCDynamicStoreRef store,
145 CFDictionaryRef keysToSet,
146 CFArrayRef keysToRemove,
147 CFArrayRef keysToNotify);
0fae82ee
A
148
149int
150__SCDynamicStoreRemoveValue (SCDynamicStoreRef store,
009ee3c6
A
151 CFStringRef key,
152 Boolean internal);
0fae82ee
A
153
154int
155__SCDynamicStoreTouchValue (SCDynamicStoreRef store,
156 CFStringRef key);
157
158int
159__SCDynamicStoreNotifyValue (SCDynamicStoreRef store,
009ee3c6
A
160 CFStringRef key,
161 Boolean internal);
0fae82ee
A
162
163int
164__SCDynamicStoreSnapshot (SCDynamicStoreRef store);
165
166int
167__SCDynamicStoreAddWatchedKey (SCDynamicStoreRef store,
168 CFStringRef key,
009ee3c6
A
169 Boolean isRegex,
170 Boolean internal);
0fae82ee
A
171
172int
173__SCDynamicStoreRemoveWatchedKey (SCDynamicStoreRef store,
174 CFStringRef key,
009ee3c6
A
175 Boolean isRegex,
176 Boolean internal);
177
178int
179__SCDynamicStoreSetNotificationKeys (SCDynamicStoreRef store,
180 CFArrayRef keys,
181 CFArrayRef patterns);
0fae82ee
A
182
183int
184__SCDynamicStoreCopyNotifiedKeys (SCDynamicStoreRef store,
185 CFArrayRef *notifierKeys);
186
187int
188__SCDynamicStoreNotifyMachPort (SCDynamicStoreRef store,
189 mach_msg_id_t msgid,
190 mach_port_t *port);
191
192int
193__SCDynamicStoreNotifyFileDescriptor (SCDynamicStoreRef store,
194 int32_t identifier,
195 int *fd);
196
197int
198__SCDynamicStoreNotifySignal (SCDynamicStoreRef store,
199 pid_t pid,
200 int sig);
201
202int
203__SCDynamicStoreNotifyCancel (SCDynamicStoreRef store);
204
205void
edebe297 206_swapLockedStoreData (void);
0fae82ee
A
207
208void
209_addWatcher (CFNumberRef sessionNum,
210 CFStringRef watchedKey);
211
0fae82ee
A
212void
213_removeWatcher (CFNumberRef sessionNum,
214 CFStringRef watchedKey);
215
dbf6a266 216void
edebe297 217pushNotifications (void);
dbf6a266 218
5958d7c0
A
219__END_DECLS
220
221#endif /* !_S_SCD_H */