SCDynamicStoreInternal.h [plain text]
#ifndef _SCDYNAMICSTOREINTERNAL_H
#define _SCDYNAMICSTOREINTERNAL_H
#include <os/availability.h>
#include <TargetConditionals.h>
#include <sys/cdefs.h>
#include <dispatch/dispatch.h>
#include <sys/types.h>
#include <mach/mach.h>
#include <pthread.h>
#include <regex.h>
#include <os/log.h>
#include <CoreFoundation/CoreFoundation.h>
#include <CoreFoundation/CFRuntime.h>
#ifndef SC_LOG_HANDLE
#define SC_LOG_HANDLE __log_SCDynamicStore
#endif // SC_LOG_HANDLE
#include <SystemConfiguration/SystemConfiguration.h>
#include <SystemConfiguration/SCPrivate.h>
#include <SystemConfiguration/SCValidation.h>
typedef enum {
NotifierNotRegistered = 0,
Using_NotifierWait,
Using_NotifierInformViaMachPort,
Using_NotifierInformViaFD,
Using_NotifierInformViaRunLoop,
Using_NotifierInformViaDispatch
} __SCDynamicStoreNotificationStatus;
typedef struct {
CFRuntimeBase cfBase;
CFStringRef name;
CFDictionaryRef options;
mach_port_t server;
Boolean serverNullSession;
Boolean useSessionKeys;
__SCDynamicStoreNotificationStatus notifyStatus;
CFMutableArrayRef rlList;
CFRunLoopSourceRef rls;
SCDynamicStoreCallBack rlsFunction;
SCDynamicStoreContext rlsContext;
CFMachPortRef rlsNotifyPort;
CFRunLoopSourceRef rlsNotifyRLS;
dispatch_group_t dispatchGroup;
dispatch_queue_t dispatchQueue;
dispatch_source_t dispatchSource;
SCDynamicStoreDisconnectCallBack disconnectFunction;
Boolean disconnectForceCallBack;
CFMutableArrayRef keys;
CFMutableArrayRef patterns;
mach_port_t notifyPort;
mach_msg_id_t notifyPortIdentifier;
int notifyFile;
int notifyFileIdentifier;
Boolean cache_active;
CFMutableDictionaryRef cached_keys;
CFMutableDictionaryRef cached_set;
CFMutableArrayRef cached_removals;
CFMutableArrayRef cached_notifys;
} SCDynamicStorePrivate, *SCDynamicStorePrivateRef;
__BEGIN_DECLS
__private_extern__
os_log_t
__log_SCDynamicStore (void);
SCDynamicStorePrivateRef
__SCDynamicStoreCreatePrivate (CFAllocatorRef allocator,
const CFStringRef name,
SCDynamicStoreCallBack callout,
SCDynamicStoreContext *context);
__private_extern__
SCDynamicStoreRef
__SCDynamicStoreNullSession (void);
__private_extern__
Boolean
__SCDynamicStoreCheckRetryAndHandleError(SCDynamicStoreRef store,
kern_return_t status,
int *sc_status,
const char *func);
__private_extern__
Boolean
__SCDynamicStoreReconnectNotifications (SCDynamicStoreRef store);
__END_DECLS
#endif