SCPreferencesInternal.h [plain text]
#ifndef _SCPREFERENCESINTERNAL_H
#define _SCPREFERENCESINTERNAL_H
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <CoreFoundation/CoreFoundation.h>
#include <CoreFoundation/CFRuntime.h>
#include <SystemConfiguration/SCPreferences.h>
#include <SystemConfiguration/SCDynamicStore.h>
#if !TARGET_OS_IPHONE
#include <dispatch/dispatch.h>
#endif // !TARGET_OS_IPHONE
#define PREFS_DEFAULT_DIR CFSTR("/Library/Preferences/SystemConfiguration")
#define PREFS_DEFAULT_CONFIG CFSTR("preferences.plist")
#define PREFS_DEFAULT_DIR_OLD CFSTR("/var/db/SystemConfiguration")
#define PREFS_DEFAULT_CONFIG_OLD CFSTR("preferences.xml")
#define PREFS_DEFAULT_USER_DIR CFSTR("Library/Preferences")
typedef struct {
CFRuntimeBase cfBase;
pthread_mutex_t lock;
CFStringRef name;
CFStringRef prefsID;
char *path;
char *newPath;
Boolean locked;
int lockFD;
char *lockPath;
struct timeval lockTime;
CFDataRef signature;
SCDynamicStoreRef session;
CFStringRef sessionKeyCommit;
CFStringRef sessionKeyApply;
Boolean scheduled;
CFRunLoopSourceRef rls;
SCPreferencesCallBack rlsFunction;
SCPreferencesContext rlsContext;
CFMutableArrayRef rlList;
#if !TARGET_OS_IPHONE
dispatch_queue_t dispatchQueue; #endif // !TARGET_OS_IPHONE
CFMutableDictionaryRef prefs;
Boolean accessed;
Boolean changed;
Boolean isRoot;
CFDataRef authorizationData;
int helper;
} SCPreferencesPrivate, *SCPreferencesPrivateRef;
typedef struct {
int64_t st_dev;
uint64_t st_ino;
uint64_t tv_sec;
uint64_t tv_nsec;
off_t st_size;
} SCPSignatureData, *SCPSignatureDataRef;
__BEGIN_DECLS
Boolean
__SCPreferencesCreate_helper (SCPreferencesRef prefs);
void
__SCPreferencesAccess (SCPreferencesRef prefs);
Boolean
__SCPreferencesAddSession (SCPreferencesRef prefs);
CFDataRef
__SCPSignatureFromStatbuf (const struct stat *statBuf);
char *
__SCPreferencesPath (CFAllocatorRef allocator,
CFStringRef prefsID,
Boolean useNewPrefs);
CFStringRef
_SCPNotificationKey (CFAllocatorRef allocator,
CFStringRef prefsID,
int keyType);
__END_DECLS
#endif