]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCPreferencesPrivate.h
configd-84.1.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / SCPreferencesPrivate.h
1 /*
2 * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
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
13 * file.
14 *
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.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25
26 #ifndef _SCPREFERENCESPRIVATE_H
27 #define _SCPREFERENCESPRIVATE_H
28
29 #include <CoreFoundation/CoreFoundation.h>
30 #include <SystemConfiguration/SCPreferences.h>
31
32
33 /*!
34 @enum SCPreferencesKeyType
35 @discussion Used with the SCDynamicStoreKeyCreatePreferences() function
36 to describe the resulting CFStringRef argument.
37 @constant kSCPreferencesKeyLock Key used when exclusive access to the
38 stored preferences is obtained or released.
39 @constant kSCPreferencesKeyCommit Key used when new preferences are
40 committed to the store
41 @constant kSCPreferencesKeyApply Key used when new preferences are
42 to be applied to the active system configuration.
43 */
44 enum {
45 kSCPreferencesKeyLock = 1,
46 kSCPreferencesKeyCommit = 2,
47 kSCPreferencesKeyApply = 3
48 };
49 typedef int32_t SCPreferencesKeyType;
50
51 __BEGIN_DECLS
52
53 /*!
54 @function SCDynamicStoreKeyCreatePreferences
55 @discussion Creates a key that can be used by the SCDynamicStoreSetNotificationKeys()
56 function to receive notifications of changes to the saved
57 preferences.
58 @param allocator ...
59 @param prefsID A string that identifies the name of the
60 group of preferences to be accessed/updated.
61 @param keyType A kSCPreferencesKeyType indicating the type a notification
62 key to be returned.
63 @result A notification string for the specified preference identifier.
64 */
65 CFStringRef
66 SCDynamicStoreKeyCreatePreferences (
67 CFAllocatorRef allocator,
68 CFStringRef prefsID,
69 SCPreferencesKeyType keyType
70 );
71
72 SCPreferencesRef
73 SCUserPreferencesCreate (
74 CFAllocatorRef allocator,
75 CFStringRef name,
76 CFStringRef prefsID,
77 CFStringRef user
78 );
79
80 CFStringRef
81 SCDynamicStoreKeyCreateUserPreferences (
82 CFAllocatorRef allocator,
83 CFStringRef prefsID,
84 CFStringRef user,
85 SCPreferencesKeyType keyType
86 );
87
88 __END_DECLS
89
90 #endif /* _SCPREFERENCESPRIVATE_H */