2 * Copyright (c) 1998-2000 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 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
33 #ifndef _IOKIT_IOSERVICEPRIVATE_H
34 #define _IOKIT_IOSERVICEPRIVATE_H
36 // options for getExistingServices()
38 kIONotifyOnce
= 0x00000001
41 // masks for __state[1]
43 kIOServiceBusyStateMask
= 0x000000ff,
44 kIOServiceBusyMax
= 255,
45 kIOServiceNeedConfigState
= 0x80000000,
46 kIOServiceSynchronousState
= 0x40000000,
47 kIOServiceModuleStallState
= 0x20000000,
48 kIOServiceBusyWaiterState
= 0x10000000,
50 kIOServiceSyncPubState
= 0x08000000,
51 kIOServiceConfigState
= 0x04000000,
52 kIOServiceTermPhase2State
= 0x01000000,
53 kIOServiceTermPhase3State
= 0x00800000,
56 // options for terminate()
58 kIOServiceRecursing
= 0x00100000,
63 kIOServiceNotifyEnable
= 0x00000001,
64 kIOServiceNotifyWaiter
= 0x00000002
67 struct _IOServiceNotifierInvocation
73 class _IOServiceNotifier
: public IONotifier
75 friend class IOService
;
77 OSDeclareDefaultStructors(_IOServiceNotifier
)
80 OSOrderedSet
* whence
;
82 OSDictionary
* matching
;
83 IOServiceNotificationHandler handler
;
87 queue_head_t handlerInvocations
;
91 virtual void remove();
92 virtual bool disable();
93 virtual void enable( bool was
);
97 class _IOServiceInterestNotifier
: public IONotifier
99 friend class IOService
;
101 OSDeclareDefaultStructors(_IOServiceInterestNotifier
)
106 IOServiceInterestHandler handler
;
109 queue_head_t handlerInvocations
;
113 virtual void remove();
114 virtual bool disable();
115 virtual void enable( bool was
);
119 class _IOConfigThread
: public OSObject
121 friend class IOService
;
123 OSDeclareDefaultStructors(_IOConfigThread
)
130 static _IOConfigThread
* configThread( void );
131 static void main( _IOConfigThread
* self
);
135 #ifdef LESS_THREAD_CREATE
136 kMaxConfigThreads
= 4,
138 kMaxConfigThreads
= 32,
146 class _IOServiceJob
: public OSObject
148 friend class IOService
;
150 OSDeclareDefaultStructors(_IOServiceJob
)
155 IOOptionBits options
;
157 static _IOServiceJob
* startJob( IOService
* nub
, int type
,
158 IOOptionBits options
= 0 );
159 static void pingConfig( class _IOServiceJob
* job
);
163 class IOResources
: public IOService
165 friend class IOService
;
167 OSDeclareDefaultStructors(IOResources
)
170 static IOService
* resources( void );
171 virtual IOWorkLoop
* getWorkLoop( ) const;
172 virtual bool matchPropertyTable( OSDictionary
* table
);
173 virtual IOReturn
setProperties( OSObject
* properties
);
176 class _IOOpenServiceIterator
: public OSIterator
178 friend class IOService
;
180 OSDeclareDefaultStructors(_IOOpenServiceIterator
)
183 const IOService
* client
;
184 const IOService
* provider
;
188 static OSIterator
* iterator( OSIterator
* _iter
,
189 const IOService
* client
,
190 const IOService
* provider
);
192 virtual void reset();
193 virtual bool isValid();
194 virtual OSObject
* getNextObject();
197 #endif /* ! _IOKIT_IOSERVICEPRIVATE_H */