2 * Copyright (c) 2000, 2001, 2003, 2004, 2006, 2009, 2011, 2015, 2016, 2018, 2019 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")
62 extern CFMutableDictionaryRef storeData
;
63 extern CFMutableDictionaryRef patternData
;
64 extern CFMutableSetRef changedKeys
;
65 extern CFMutableSetRef deferredRemovals
;
66 extern CFMutableSetRef removedSessionKeys
;
67 extern CFMutableSetRef needsNotification
;
73 __SCDynamicStoreOpen (SCDynamicStoreRef
*store
,
76 __SCDynamicStoreClose (SCDynamicStoreRef
*store
);
79 __SCDynamicStorePush (void);
82 __SCDynamicStoreCopyKeyList (SCDynamicStoreRef store
,
88 __SCDynamicStoreAddValue (SCDynamicStoreRef store
,
93 __SCDynamicStoreCopyValue (SCDynamicStoreRef store
,
99 __SCDynamicStoreCopyMultiple (SCDynamicStoreRef store
,
102 CFDictionaryRef
*values
);
105 __SCDynamicStoreSetValue (SCDynamicStoreRef store
,
111 __SCDynamicStoreSetMultiple (SCDynamicStoreRef store
,
112 CFDictionaryRef keysToSet
,
113 CFArrayRef keysToRemove
,
114 CFArrayRef keysToNotify
);
117 __SCDynamicStoreRemoveValue (SCDynamicStoreRef store
,
122 __SCDynamicStoreNotifyValue (SCDynamicStoreRef store
,
127 __SCDynamicStoreSnapshot (SCDynamicStoreRef store
);
130 __SCDynamicStoreAddWatchedKey (SCDynamicStoreRef store
,
136 __SCDynamicStoreRemoveWatchedKey (SCDynamicStoreRef store
,
142 __SCDynamicStoreSetNotificationKeys (SCDynamicStoreRef store
,
144 CFArrayRef patterns
);
147 __SCDynamicStoreCopyNotifiedKeys (SCDynamicStoreRef store
,
148 CFArrayRef
*notifierKeys
);
151 __SCDynamicStoreNotifyMachPort (SCDynamicStoreRef store
,
156 __SCDynamicStoreNotifyFileDescriptor (SCDynamicStoreRef store
);
159 __SCDynamicStoreNotifyCancel (SCDynamicStoreRef store
);
162 _addWatcher (CFNumberRef sessionNum
,
163 CFStringRef watchedKey
);
166 _removeWatcher (CFNumberRef sessionNum
,
167 CFStringRef watchedKey
);
170 pushNotifications (void);
174 #endif /* !_S_SCD_H */