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 _SCDYNAMICSTOREINTERNAL_H
25 #define _SCDYNAMICSTOREINTERNAL_H
27 #include <sys/cdefs.h>
28 #include <sys/types.h>
29 #include <mach/mach.h>
32 #include <CoreFoundation/CoreFoundation.h>
33 #include <CoreFoundation/CFRuntime.h>
34 #include <SystemConfiguration/SCDynamicStore.h>
37 /* Define the status of any registered notification. */
39 NotifierNotRegistered
= 0,
41 Using_NotifierInformViaCallback
,
42 Using_NotifierInformViaMachPort
,
43 Using_NotifierInformViaFD
,
44 Using_NotifierInformViaSignal
,
45 Using_NotifierInformViaRunLoop
46 } __SCDynamicStoreNotificationStatus
;
51 /* base CFType information */
54 /* server side of the "configd" session */
57 /* per-session flags */
59 Boolean useSessionKeys
;
61 /* current status of notification requests */
62 __SCDynamicStoreNotificationStatus notifyStatus
;
64 /* "client" information associated with SCDynamicStoreCreateRunLoopSource() */
66 CFRunLoopSourceRef rls
;
67 SCDynamicStoreCallBack rlsFunction
;
68 SCDynamicStoreContext rlsContext
;
70 /* "client" information associated with SCDynamicStoreNotifyCallback() */
71 SCDynamicStoreCallBack_v1 callbackFunction
;
72 void *callbackArgument
;
73 CFMachPortRef callbackPort
;
74 CFRunLoopSourceRef callbackRLS
;
76 /* "server" SCDynamicStoreKeys being watched */
78 CFMutableSetRef patterns
;
80 /* "server" information associated with SCDynamicStoreNotifyMachPort() */
81 mach_port_t notifyPort
;
82 mach_msg_id_t notifyPortIdentifier
;
84 /* "server" information associated with SCDynamicStoreNotifyFileDescriptor() */
86 int notifyFileIdentifier
;
88 /* "server" information associated with SCDynamicStoreNotifySignal() */
90 task_t notifySignalTask
;
92 } SCDynamicStorePrivate
, *SCDynamicStorePrivateRef
;
97 SCDynamicStorePrivateRef
98 __SCDynamicStoreCreatePrivate (CFAllocatorRef allocator
,
99 const CFStringRef name
,
100 SCDynamicStoreCallBack callout
,
101 SCDynamicStoreContext
*context
);
104 __showMachPortStatus ();
107 __showMachPortReferences (mach_port_t port
);
111 #endif /* _SCDYNAMICSTOREINTERNAL_H */