2 * Copyright (c) 2000, 2001, 2003, 2004, 2006, 2009, 2011 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
25 * Modification History
27 * June 1, 2001 Allan Nathanson <ajn@apple.com>
28 * - public API conversion
30 * June 2, 2000 Allan Nathanson <ajn@apple.com>
38 #include <sys/cdefs.h>
42 * keys in the "storeData" dictionary
46 * data associated with a key
48 #define kSCDData CFSTR("data")
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
54 #define kSCDWatchers CFSTR("watchers")
55 #define kSCDWatcherRefs CFSTR("watcherRefs")
57 * client session id for per-session keys.
59 #define kSCDSession CFSTR("session")
63 * keys in the "sessionData" dictionary
67 * the name of the calling application / plug-in
69 #define kSCDName CFSTR("name")
71 * keys which have changed since last call to SCDNotifierGetChanges()
73 #define kSCDChangedKeys CFSTR("changedKeys")
75 * keys which are to be removed when the session is closed
77 #define kSCDSessionKeys CFSTR("sessionKeys")
80 extern CFMutableDictionaryRef storeData
;
81 extern CFMutableDictionaryRef sessionData
;
82 extern CFMutableDictionaryRef patternData
;
83 extern CFMutableSetRef changedKeys
;
84 extern CFMutableSetRef deferredRemovals
;
85 extern CFMutableSetRef removedSessionKeys
;
86 extern CFMutableSetRef needsNotification
;
92 __SCDynamicStoreOpen (SCDynamicStoreRef
*store
,
95 __SCDynamicStoreClose (SCDynamicStoreRef
*store
);
98 __SCDynamicStorePush (void);
101 __SCDynamicStoreCopyKeyList (SCDynamicStoreRef store
,
104 CFArrayRef
*subKeys
);
107 __SCDynamicStoreAddValue (SCDynamicStoreRef store
,
112 __SCDynamicStoreCopyValue (SCDynamicStoreRef store
,
118 __SCDynamicStoreCopyMultiple (SCDynamicStoreRef store
,
121 CFDictionaryRef
*values
);
124 __SCDynamicStoreSetValue (SCDynamicStoreRef store
,
130 __SCDynamicStoreSetMultiple (SCDynamicStoreRef store
,
131 CFDictionaryRef keysToSet
,
132 CFArrayRef keysToRemove
,
133 CFArrayRef keysToNotify
);
136 __SCDynamicStoreRemoveValue (SCDynamicStoreRef store
,
141 __SCDynamicStoreNotifyValue (SCDynamicStoreRef store
,
146 __SCDynamicStoreSnapshot (SCDynamicStoreRef store
);
149 __SCDynamicStoreAddWatchedKey (SCDynamicStoreRef store
,
155 __SCDynamicStoreRemoveWatchedKey (SCDynamicStoreRef store
,
161 __SCDynamicStoreSetNotificationKeys (SCDynamicStoreRef store
,
163 CFArrayRef patterns
);
166 __SCDynamicStoreCopyNotifiedKeys (SCDynamicStoreRef store
,
167 CFArrayRef
*notifierKeys
);
170 __SCDynamicStoreNotifyMachPort (SCDynamicStoreRef store
,
175 __SCDynamicStoreNotifyFileDescriptor (SCDynamicStoreRef store
,
180 __SCDynamicStoreNotifySignal (SCDynamicStoreRef store
,
185 __SCDynamicStoreNotifyCancel (SCDynamicStoreRef store
);
188 _addWatcher (CFNumberRef sessionNum
,
189 CFStringRef watchedKey
);
192 _removeWatcher (CFNumberRef sessionNum
,
193 CFStringRef watchedKey
);
196 pushNotifications (FILE *_configd_trace
);
200 #endif /* !_S_SCD_H */