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@
26 #ifndef _SCPREFERENCESINTERNAL_H
27 #define _SCPREFERENCESINTERNAL_H
29 #include <sys/types.h>
32 #include <CoreFoundation/CoreFoundation.h>
33 #include <CoreFoundation/CFRuntime.h>
34 #include <SystemConfiguration/SCPreferences.h>
35 #include <SystemConfiguration/SCDynamicStore.h>
38 #define PREFS_DEFAULT_DIR CFSTR("/Library/Preferences/SystemConfiguration")
39 #define PREFS_DEFAULT_CONFIG CFSTR("preferences.plist")
41 #define PREFS_DEFAULT_DIR_OLD CFSTR("/var/db/SystemConfiguration")
42 #define PREFS_DEFAULT_CONFIG_OLD CFSTR("preferences.xml")
44 #define PREFS_DEFAULT_USER_DIR CFSTR("Library/Preferences")
47 /* Define the per-preference-handle structure */
50 /* base CFType information */
59 /* per-user preference info */
63 /* configuration file path */
67 /* configuration file signature */
71 SCDynamicStoreRef session
;
73 /* configd session keys */
74 CFStringRef sessionKeyLock
;
75 CFStringRef sessionKeyCommit
;
76 CFStringRef sessionKeyApply
;
79 CFMutableDictionaryRef prefs
;
87 } SCPreferencesPrivate
, *SCPreferencesPrivateRef
;
90 /* Define signature data */
92 dev_t st_dev
; /* inode's device */
93 ino_t st_ino
; /* inode's number */
94 struct timespec st_mtimespec
; /* time of last data modification */
95 off_t st_size
; /* file size, in bytes */
96 } SCPSignatureData
, *SCPSignatureDataRef
;
102 __SCPreferencesCreate (CFAllocatorRef allocator
,
109 __SCPSignatureFromStatbuf (const struct stat
*statBuf
);
112 __SCPreferencesPath (CFAllocatorRef allocator
,
116 Boolean useNewPrefs
);
119 _SCPNotificationKey (CFAllocatorRef allocator
,
127 #endif /* _SCPREFERENCESINTERNAL_H */