2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_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. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
29 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
36 #ifndef _IOKIT_IOSERVICEPRIVATE_H
37 #define _IOKIT_IOSERVICEPRIVATE_H
39 // options for getExistingServices()
41 kIONotifyOnce
= 0x00000001,
42 kIOServiceExistingSet
= 0x00000002
45 // masks for __state[1]
47 kIOServiceBusyStateMask
= 0x000000ff,
48 kIOServiceBusyMax
= 255,
49 kIOServiceNeedConfigState
= 0x80000000,
50 kIOServiceSynchronousState
= 0x40000000,
51 kIOServiceModuleStallState
= 0x20000000,
52 kIOServiceBusyWaiterState
= 0x10000000,
54 kIOServiceSyncPubState
= 0x08000000,
55 kIOServiceConfigState
= 0x04000000,
56 kIOServiceTermPhase2State
= 0x01000000,
57 kIOServiceTermPhase3State
= 0x00800000,
60 // options for terminate()
62 kIOServiceRecursing
= 0x00100000,
67 kIOServiceNotifyEnable
= 0x00000001,
68 kIOServiceNotifyWaiter
= 0x00000002
71 struct _IOServiceNotifierInvocation
77 class _IOServiceNotifier
: public IONotifier
79 friend class IOService
;
81 OSDeclareDefaultStructors(_IOServiceNotifier
)
84 OSOrderedSet
* whence
;
86 OSDictionary
* matching
;
87 IOServiceNotificationHandler handler
;
91 queue_head_t handlerInvocations
;
95 virtual void remove();
96 virtual bool disable();
97 virtual void enable( bool was
);
101 class _IOServiceInterestNotifier
: public IONotifier
103 friend class IOService
;
105 OSDeclareDefaultStructors(_IOServiceInterestNotifier
)
110 IOServiceInterestHandler handler
;
113 queue_head_t handlerInvocations
;
117 virtual void remove();
118 virtual bool disable();
119 virtual void enable( bool was
);
123 class _IOConfigThread
: public OSObject
125 friend class IOService
;
127 OSDeclareDefaultStructors(_IOConfigThread
)
132 static void configThread( void );
133 static void main( _IOConfigThread
* self
);
137 kMaxConfigThreads
= CONFIG_MAX_THREADS
,
144 class _IOServiceJob
: public OSObject
146 friend class IOService
;
148 OSDeclareDefaultStructors(_IOServiceJob
)
153 IOOptionBits options
;
155 static _IOServiceJob
* startJob( IOService
* nub
, int type
,
156 IOOptionBits options
= 0 );
157 static void pingConfig( class _IOServiceJob
* job
);
161 class IOResources
: public IOService
163 friend class IOService
;
165 OSDeclareDefaultStructors(IOResources
)
168 static IOService
* resources( void );
169 virtual IOWorkLoop
* getWorkLoop( ) const;
170 virtual bool matchPropertyTable( OSDictionary
* table
);
171 virtual IOReturn
setProperties( OSObject
* properties
);
174 class _IOOpenServiceIterator
: public OSIterator
176 friend class IOService
;
178 OSDeclareDefaultStructors(_IOOpenServiceIterator
)
181 const IOService
* client
;
182 const IOService
* provider
;
186 static OSIterator
* iterator( OSIterator
* _iter
,
187 const IOService
* client
,
188 const IOService
* provider
);
190 virtual void reset();
191 virtual bool isValid();
192 virtual OSObject
* getNextObject();
195 extern const OSSymbol
* gIOConsoleUsersKey
;
196 extern const OSSymbol
* gIOConsoleSessionUIDKey
;
197 extern const OSSymbol
* gIOConsoleSessionOnConsoleKey
;
198 extern const OSSymbol
* gIOConsoleSessionSecureInputPIDKey
;
200 #endif /* ! _IOKIT_IOSERVICEPRIVATE_H */