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 _SCDYNAMICSTOREINTERNAL_H
27 #define _SCDYNAMICSTOREINTERNAL_H
29 #include <sys/cdefs.h>
30 #include <sys/types.h>
31 #include <mach/mach.h>
34 #include <CoreFoundation/CoreFoundation.h>
35 #include <CoreFoundation/CFRuntime.h>
36 #include <SystemConfiguration/SCDynamicStore.h>
39 /* Define the status of any registered notification. */
41 NotifierNotRegistered
= 0,
43 Using_NotifierInformViaCallback
,
44 Using_NotifierInformViaMachPort
,
45 Using_NotifierInformViaFD
,
46 Using_NotifierInformViaSignal
,
47 Using_NotifierInformViaRunLoop
48 } __SCDynamicStoreNotificationStatus
;
53 /* base CFType information */
56 /* server side of the "configd" session */
59 /* per-session flags */
62 /* SCDynamicStoreKeys being watched */
64 CFMutableSetRef patterns
;
66 /* current status of notification requests */
67 __SCDynamicStoreNotificationStatus notifyStatus
;
69 /* "client" information associated with SCDynamicStoreCreateRunLoopSource() */
71 CFRunLoopSourceRef rls
;
72 SCDynamicStoreCallBack rlsFunction
;
73 SCDynamicStoreContext rlsContext
;
75 /* "client" information associated with SCDynamicStoreNotifyCallback() */
76 SCDynamicStoreCallBack_v1 callbackFunction
;
77 void *callbackArgument
;
78 CFMachPortRef callbackPort
;
79 CFRunLoopRef callbackRunLoop
;
80 CFRunLoopSourceRef callbackRunLoopSource
;
82 /* "server" information associated with SCDynamicStoreNotifyMachPort() */
83 mach_port_t notifyPort
;
84 mach_msg_id_t notifyPortIdentifier
;
86 /* "server" information associated with SCDynamicStoreNotifyFileDescriptor() */
88 int notifyFileIdentifier
;
90 /* "server" information associated with SCDynamicStoreNotifySignal() */
92 task_t notifySignalTask
;
94 } SCDynamicStorePrivate
, *SCDynamicStorePrivateRef
;
99 SCDynamicStorePrivateRef
100 __SCDynamicStoreCreatePrivate (CFAllocatorRef allocator
,
101 const CFStringRef name
,
102 SCDynamicStoreCallBack callout
,
103 SCDynamicStoreContext
*context
);
106 __showMachPortStatus ();
109 __showMachPortReferences (mach_port_t port
);
113 #endif /* _SCDYNAMICSTOREINTERNAL_H */