2 * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
27 * Modification History
29 * June 1, 2001 Allan Nathanson <ajn@apple.com>
30 * - public API conversion
32 * June 2, 2000 Allan Nathanson <ajn@apple.com>
40 #include <sys/cdefs.h>
44 * keys in the "storeData" dictionary
48 * data associated with a key
50 #define kSCDData CFSTR("data")
52 * client session ids watching a key and, since we can possibly have
53 * multiple regex keys which reference the key, a count of active
56 #define kSCDWatchers CFSTR("watchers")
57 #define kSCDWatcherRefs CFSTR("watcherRefs")
59 * client session id for per-session keys.
61 #define kSCDSession CFSTR("session")
65 * keys in the "sessionData" dictionary
69 * the name of the calling application / plug-in
71 #define kSCDName CFSTR("name")
73 * keys which have changed since last call to SCDNotifierGetChanges()
75 #define kSCDChangedKeys CFSTR("changedKeys")
77 * keys which are to be removed when the session is closed
79 #define kSCDSessionKeys CFSTR("sessionKeys")
82 extern int storeLocked
;
83 extern CFMutableDictionaryRef storeData
;
84 extern CFMutableDictionaryRef sessionData
;
85 extern CFMutableDictionaryRef patternData
;
86 extern CFMutableSetRef changedKeys
;
87 extern CFMutableSetRef deferredRemovals
;
88 extern CFMutableSetRef removedSessionKeys
;
89 extern CFMutableSetRef needsNotification
;
91 extern CFMutableDictionaryRef storeData_s
;
92 extern CFMutableDictionaryRef patternData_s
;
93 extern CFMutableSetRef changedKeys_s
;
94 extern CFMutableSetRef deferredRemovals_s
;
95 extern CFMutableSetRef removedSessionKeys_s
;
101 __SCDynamicStoreOpen (SCDynamicStoreRef
*store
,
104 __SCDynamicStoreClose (SCDynamicStoreRef
*store
,
108 __SCDynamicStoreLock (SCDynamicStoreRef store
,
112 __SCDynamicStoreUnlock (SCDynamicStoreRef store
,
116 __SCDynamicStoreCopyKeyList (SCDynamicStoreRef store
,
119 CFArrayRef
*subKeys
);
122 __SCDynamicStoreAddValue (SCDynamicStoreRef store
,
127 __SCDynamicStoreAddTemporaryValue (SCDynamicStoreRef store
,
132 __SCDynamicStoreCopyValue (SCDynamicStoreRef store
,
138 __SCDynamicStoreCopyMultiple (SCDynamicStoreRef store
,
141 CFDictionaryRef
*values
);
144 __SCDynamicStoreSetValue (SCDynamicStoreRef store
,
150 __SCDynamicStoreSetMultiple (SCDynamicStoreRef store
,
151 CFDictionaryRef keysToSet
,
152 CFArrayRef keysToRemove
,
153 CFArrayRef keysToNotify
);
156 __SCDynamicStoreRemoveValue (SCDynamicStoreRef store
,
161 __SCDynamicStoreTouchValue (SCDynamicStoreRef store
,
165 __SCDynamicStoreNotifyValue (SCDynamicStoreRef store
,
170 __SCDynamicStoreSnapshot (SCDynamicStoreRef store
);
173 __SCDynamicStoreAddWatchedKey (SCDynamicStoreRef store
,
179 __SCDynamicStoreRemoveWatchedKey (SCDynamicStoreRef store
,
185 __SCDynamicStoreSetNotificationKeys (SCDynamicStoreRef store
,
187 CFArrayRef patterns
);
190 __SCDynamicStoreCopyNotifiedKeys (SCDynamicStoreRef store
,
191 CFArrayRef
*notifierKeys
);
194 __SCDynamicStoreNotifyMachPort (SCDynamicStoreRef store
,
199 __SCDynamicStoreNotifyFileDescriptor (SCDynamicStoreRef store
,
204 __SCDynamicStoreNotifySignal (SCDynamicStoreRef store
,
209 __SCDynamicStoreNotifyCancel (SCDynamicStoreRef store
);
212 _swapLockedStoreData ();
215 _addWatcher (CFNumberRef sessionNum
,
216 CFStringRef watchedKey
);
219 _removeWatcher (CFNumberRef sessionNum
,
220 CFStringRef watchedKey
);
224 #endif /* !_S_SCD_H */