2 * Copyright (c) 2000-2003 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@
24 #ifndef _SCPREFERENCESINTERNAL_H
25 #define _SCPREFERENCESINTERNAL_H
27 #include <sys/types.h>
30 #include <CoreFoundation/CoreFoundation.h>
31 #include <CoreFoundation/CFRuntime.h>
32 #include <SystemConfiguration/SCPreferences.h>
33 #include <SystemConfiguration/SCDynamicStore.h>
36 #define PREFS_DEFAULT_DIR CFSTR("/Library/Preferences/SystemConfiguration")
37 #define PREFS_DEFAULT_CONFIG CFSTR("preferences.plist")
39 #define PREFS_DEFAULT_DIR_OLD CFSTR("/var/db/SystemConfiguration")
40 #define PREFS_DEFAULT_CONFIG_OLD CFSTR("preferences.xml")
42 #define PREFS_DEFAULT_USER_DIR CFSTR("Library/Preferences")
45 /* Define the per-preference-handle structure */
48 /* base CFType information */
57 /* per-user preference info */
61 /* configuration file path */
65 /* configuration file signature */
69 SCDynamicStoreRef session
;
71 /* configd session keys */
72 CFStringRef sessionKeyLock
;
73 CFStringRef sessionKeyCommit
;
74 CFStringRef sessionKeyApply
;
77 CFMutableDictionaryRef prefs
;
85 } SCPreferencesPrivate
, *SCPreferencesPrivateRef
;
88 /* Define signature data */
90 dev_t st_dev
; /* inode's device */
91 ino_t st_ino
; /* inode's number */
92 struct timespec st_mtimespec
; /* time of last data modification */
93 off_t st_size
; /* file size, in bytes */
94 } SCPSignatureData
, *SCPSignatureDataRef
;
100 __SCPreferencesCreate (CFAllocatorRef allocator
,
107 __SCPSignatureFromStatbuf (const struct stat
*statBuf
);
110 __SCPreferencesPath (CFAllocatorRef allocator
,
114 Boolean useNewPrefs
);
117 _SCPNotificationKey (CFAllocatorRef allocator
,
125 #endif /* _SCPREFERENCESINTERNAL_H */