2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_OSREFERENCE_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
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
31 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
38 #ifndef _IOKIT_IOSERVICEPRIVATE_H
39 #define _IOKIT_IOSERVICEPRIVATE_H
41 // options for getExistingServices()
43 kIONotifyOnce
= 0x00000001,
44 kIOServiceExistingSet
= 0x00000002
47 // masks for __state[1]
49 kIOServiceBusyStateMask
= 0x000000ff,
50 kIOServiceBusyMax
= 255,
51 kIOServiceNeedConfigState
= 0x80000000,
52 kIOServiceSynchronousState
= 0x40000000,
53 kIOServiceModuleStallState
= 0x20000000,
54 kIOServiceBusyWaiterState
= 0x10000000,
56 kIOServiceSyncPubState
= 0x08000000,
57 kIOServiceConfigState
= 0x04000000,
58 kIOServiceTermPhase2State
= 0x01000000,
59 kIOServiceTermPhase3State
= 0x00800000,
62 // options for terminate()
64 kIOServiceRecursing
= 0x00100000,
69 kIOServiceNotifyEnable
= 0x00000001,
70 kIOServiceNotifyWaiter
= 0x00000002
73 struct _IOServiceNotifierInvocation
79 class _IOServiceNotifier
: public IONotifier
81 friend class IOService
;
83 OSDeclareDefaultStructors(_IOServiceNotifier
)
86 OSOrderedSet
* whence
;
88 OSDictionary
* matching
;
89 IOServiceNotificationHandler handler
;
93 queue_head_t handlerInvocations
;
97 virtual void remove();
98 virtual bool disable();
99 virtual void enable( bool was
);
103 class _IOServiceInterestNotifier
: public IONotifier
105 friend class IOService
;
107 OSDeclareDefaultStructors(_IOServiceInterestNotifier
)
112 IOServiceInterestHandler handler
;
115 queue_head_t handlerInvocations
;
119 virtual void remove();
120 virtual bool disable();
121 virtual void enable( bool was
);
125 class _IOConfigThread
: public OSObject
127 friend class IOService
;
129 OSDeclareDefaultStructors(_IOConfigThread
)
134 static void configThread( void );
135 static void main( _IOConfigThread
* self
);
139 #ifdef LESS_THREAD_CREATE
140 kMaxConfigThreads
= 4,
142 kMaxConfigThreads
= 32,
150 class _IOServiceJob
: public OSObject
152 friend class IOService
;
154 OSDeclareDefaultStructors(_IOServiceJob
)
159 IOOptionBits options
;
161 static _IOServiceJob
* startJob( IOService
* nub
, int type
,
162 IOOptionBits options
= 0 );
163 static void pingConfig( class _IOServiceJob
* job
);
167 class IOResources
: public IOService
169 friend class IOService
;
171 OSDeclareDefaultStructors(IOResources
)
174 static IOService
* resources( void );
175 virtual IOWorkLoop
* getWorkLoop( ) const;
176 virtual bool matchPropertyTable( OSDictionary
* table
);
177 virtual IOReturn
setProperties( OSObject
* properties
);
180 class _IOOpenServiceIterator
: public OSIterator
182 friend class IOService
;
184 OSDeclareDefaultStructors(_IOOpenServiceIterator
)
187 const IOService
* client
;
188 const IOService
* provider
;
192 static OSIterator
* iterator( OSIterator
* _iter
,
193 const IOService
* client
,
194 const IOService
* provider
);
196 virtual void reset();
197 virtual bool isValid();
198 virtual OSObject
* getNextObject();
201 extern const OSSymbol
* gIOConsoleUsersKey
;
202 extern const OSSymbol
* gIOConsoleSessionUIDKey
;
204 #endif /* ! _IOKIT_IOSERVICEPRIVATE_H */