2 * Copyright (c) 2000, 2001, 2003, 2004, 2006 Apple Computer, 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 int storeLocked
;
81 extern CFMutableDictionaryRef storeData
;
82 extern CFMutableDictionaryRef sessionData
;
83 extern CFMutableDictionaryRef patternData
;
84 extern CFMutableSetRef changedKeys
;
85 extern CFMutableSetRef deferredRemovals
;
86 extern CFMutableSetRef removedSessionKeys
;
87 extern CFMutableSetRef needsNotification
;
89 extern CFMutableDictionaryRef storeData_s
;
90 extern CFMutableDictionaryRef patternData_s
;
91 extern CFMutableSetRef changedKeys_s
;
92 extern CFMutableSetRef deferredRemovals_s
;
93 extern CFMutableSetRef removedSessionKeys_s
;
99 __SCDynamicStoreOpen (SCDynamicStoreRef
*store
,
102 __SCDynamicStoreClose (SCDynamicStoreRef
*store
,
106 __SCDynamicStoreLock (SCDynamicStoreRef store
,
110 __SCDynamicStoreUnlock (SCDynamicStoreRef store
,
114 __SCDynamicStoreCopyKeyList (SCDynamicStoreRef store
,
117 CFArrayRef
*subKeys
);
120 __SCDynamicStoreAddValue (SCDynamicStoreRef store
,
126 __SCDynamicStoreCopyValue (SCDynamicStoreRef store
,
132 __SCDynamicStoreCopyMultiple (SCDynamicStoreRef store
,
135 CFDictionaryRef
*values
);
138 __SCDynamicStoreSetValue (SCDynamicStoreRef store
,
144 __SCDynamicStoreSetMultiple (SCDynamicStoreRef store
,
145 CFDictionaryRef keysToSet
,
146 CFArrayRef keysToRemove
,
147 CFArrayRef keysToNotify
);
150 __SCDynamicStoreRemoveValue (SCDynamicStoreRef store
,
155 __SCDynamicStoreTouchValue (SCDynamicStoreRef store
,
159 __SCDynamicStoreNotifyValue (SCDynamicStoreRef store
,
164 __SCDynamicStoreSnapshot (SCDynamicStoreRef store
);
167 __SCDynamicStoreAddWatchedKey (SCDynamicStoreRef store
,
173 __SCDynamicStoreRemoveWatchedKey (SCDynamicStoreRef store
,
179 __SCDynamicStoreSetNotificationKeys (SCDynamicStoreRef store
,
181 CFArrayRef patterns
);
184 __SCDynamicStoreCopyNotifiedKeys (SCDynamicStoreRef store
,
185 CFArrayRef
*notifierKeys
);
188 __SCDynamicStoreNotifyMachPort (SCDynamicStoreRef store
,
193 __SCDynamicStoreNotifyFileDescriptor (SCDynamicStoreRef store
,
198 __SCDynamicStoreNotifySignal (SCDynamicStoreRef store
,
203 __SCDynamicStoreNotifyCancel (SCDynamicStoreRef store
);
206 _swapLockedStoreData (void);
209 _addWatcher (CFNumberRef sessionNum
,
210 CFStringRef watchedKey
);
213 _removeWatcher (CFNumberRef sessionNum
,
214 CFStringRef watchedKey
);
217 pushNotifications (void);
221 #endif /* !_S_SCD_H */