]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCPreferencesPrivate.h
configd-53.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / SCPreferencesPrivate.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22
23 #ifndef _SCPREFERENCESPRIVATE_H
24 #define _SCPREFERENCESPRIVATE_H
25
26 #include <CoreFoundation/CoreFoundation.h>
27 #include <SystemConfiguration/SCPreferences.h>
28
29
30 /*!
31 @enum SCPreferencesKeyType
32 @discussion Used with the SCDynamicStoreKeyCreatePreferences() function
33 to describe the resulting CFStringRef argument.
34 @constant kSCPreferencesKeyLock Key used when exclusive access to the
35 stored preferences is obtained or released.
36 @constant kSCPreferencesKeyCommit Key used when new preferences are
37 committed to the store
38 @constant kSCPreferencesKeyApply Key used when new preferences are
39 to be applied to the active system configuration.
40 */
41 typedef enum {
42 kSCPreferencesKeyLock = 1,
43 kSCPreferencesKeyCommit = 2,
44 kSCPreferencesKeyApply = 3,
45 } SCPreferencesKeyType;
46
47
48 __BEGIN_DECLS
49
50 /*!
51 @function SCDynamicStoreKeyCreatePreferences
52 @discussion Creates a key that can be used by the SCDynamicStoreSetNotificationKeys()
53 function to receive notifications of changes to the saved
54 preferences.
55 @param allocator ...
56 @param prefsID A string that identifies the name of the
57 group of preferences to be accessed/updated.
58 @param keyType A kSCPreferencesKeyType indicating the type a notification
59 key to be returned.
60 @result A notification string for the specified preference identifier.
61 */
62 CFStringRef
63 SCDynamicStoreKeyCreatePreferences (CFAllocatorRef allocator,
64 CFStringRef prefsID,
65 int keyType);
66
67 SCPreferencesRef
68 SCUserPreferencesCreate (CFAllocatorRef allocator,
69 CFStringRef name,
70 CFStringRef prefsID,
71 CFStringRef user);
72
73 CFStringRef
74 SCDynamicStoreKeyCreateUserPreferences (CFAllocatorRef allocator,
75 CFStringRef prefsID,
76 CFStringRef user,
77 int keyType);
78
79 __END_DECLS
80
81 #endif /* _SCPREFERENCESPRIVATE_H */