2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
23 #ifndef _SCPREFERENCESINTERNAL_H
24 #define _SCPREFERENCESINTERNAL_H
26 #include <sys/types.h>
29 #include <CoreFoundation/CoreFoundation.h>
30 #include <CoreFoundation/CFRuntime.h>
31 #include <SystemConfiguration/SCPreferences.h>
32 #include <SystemConfiguration/SCDynamicStore.h>
35 #define PREFS_DEFAULT_DIR CFSTR("/var/db/SystemConfiguration")
36 #define PREFS_DEFAULT_CONFIG CFSTR("preferences.xml")
38 #define PREFS_DEFAULT_USER_DIR CFSTR("Library/Preferences")
41 /* Define the per-preference-handle structure */
44 /* base CFType information */
53 /* per-user preference info */
57 /* configuration file path */
60 /* configuration file signature */
64 SCDynamicStoreRef session
;
66 /* configd session keys */
67 CFStringRef sessionKeyLock
;
68 CFStringRef sessionKeyCommit
;
69 CFStringRef sessionKeyApply
;
72 CFMutableDictionaryRef prefs
;
80 } SCPreferencesPrivate
, *SCPreferencesPrivateRef
;
83 /* Define signature data */
85 dev_t st_dev
; /* inode's device */
86 ino_t st_ino
; /* inode's number */
87 struct timespec st_mtimespec
; /* time of last data modification */
88 off_t st_size
; /* file size, in bytes */
89 } SCPSignatureData
, *SCPSignatureDataRef
;
95 __SCPreferencesCreate (CFAllocatorRef allocator
,
102 __SCPSignatureFromStatbuf (const struct stat
*statBuf
);
105 __SCPreferencesPath (CFAllocatorRef allocator
,
111 _SCPNotificationKey (CFAllocatorRef allocator
,
119 #endif /* _SCPREFERENCESINTERNAL_H */