2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
30 #ifndef _IOKIT_IOSERVICEPRIVATE_H
31 #define _IOKIT_IOSERVICEPRIVATE_H
33 // options for getExistingServices()
35 kIONotifyOnce
= 0x00000001
38 // masks for __state[1]
40 kIOServiceBusyStateMask
= 0x000000ff,
41 kIOServiceBusyMax
= 255,
42 kIOServiceTerminatedState
= 0x80000000,
43 kIOServiceConfigState
= 0x40000000,
44 kIOServiceSynchronousState
= 0x20000000,
47 // options for terminate()
49 kIOServiceRecursing
= 0x00100000,
55 kIOServiceNotifyEnable
= 0x00000001,
56 kIOServiceNotifyWaiter
= 0x00000002
59 struct _IOServiceNotifierInvocation
65 class _IOServiceNotifier
: public IONotifier
69 OSDeclareDefaultStructors(_IOServiceNotifier
)
72 OSOrderedSet
* whence
;
74 OSDictionary
* matching
;
75 IOServiceNotificationHandler handler
;
79 queue_head_t handlerInvocations
;
83 virtual void remove();
84 virtual bool disable();
85 virtual void enable( bool was
);
89 class _IOServiceInterestNotifier
: public IONotifier
93 OSDeclareDefaultStructors(_IOServiceInterestNotifier
)
98 IOServiceInterestHandler handler
;
101 queue_head_t handlerInvocations
;
105 virtual void remove();
106 virtual bool disable();
107 virtual void enable( bool was
);
111 class _IOConfigThread
: public OSObject
115 OSDeclareDefaultStructors(_IOConfigThread
)
122 static _IOConfigThread
* configThread( void );
123 static void main( _IOConfigThread
* self
);
127 #ifdef LESS_THREAD_CREATE
128 kMaxConfigThreads
= 4,
130 kMaxConfigThreads
= 32,
139 class _IOServiceJob
: public OSObject
143 OSDeclareDefaultStructors(_IOServiceJob
)
148 IOOptionBits options
;
150 static _IOServiceJob
* startJob( IOService
* nub
, int type
,
151 IOOptionBits options
= 0 );
152 static void pingConfig( class _IOServiceJob
* job
);
156 class IOResources
: public IOService
160 OSDeclareDefaultStructors(IOResources
)
163 static IOService
* resources( void );
164 virtual IOWorkLoop
* getWorkLoop( ) const;
165 virtual bool matchPropertyTable( OSDictionary
* table
);
168 class _IOOpenServiceIterator
: public OSIterator
172 OSDeclareDefaultStructors(_IOOpenServiceIterator
)
175 const IOService
* client
;
176 const IOService
* provider
;
180 static OSIterator
* iterator( OSIterator
* _iter
,
181 const IOService
* client
,
182 const IOService
* provider
);
184 virtual void reset();
185 virtual bool isValid();
186 virtual OSObject
* getNextObject();
189 #endif /* ! _IOKIT_IOSERVICEPRIVATE_H */