Root/
Source at commit 1460 created 12 years 10 months ago. By azimutz, rsync contents of the theme's folder, not the folder it self. | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 2001-2006 Apple Computer, Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_LICENSE_HEADER_START@␊ |
5 | * ␊ |
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. Please obtain a copy of the License at␊ |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this␊ |
11 | * file.␊ |
12 | * ␊ |
13 | * The Original Code and all software distributed under the License are␊ |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
18 | * Please see the License for the specific language governing rights and␊ |
19 | * limitations under the License.␊ |
20 | * ␊ |
21 | * @APPLE_LICENSE_HEADER_END@␊ |
22 | */␊ |
23 | ␊ |
24 | #ifndef _IOKIT_IOUSBWORKLOOP_H␊ |
25 | #define _IOKIT_IOUSBWORKLOOP_H␊ |
26 | ␊ |
27 | #include <IOKit/IOWorkLoop.h>␊ |
28 | ␊ |
29 | /*!␊ |
30 | @class IOUSBWorkLoop␊ |
31 | @abstract Subclass of IOWorkloop that allows the USB stack to more finely control sleep and wake.␊ |
32 | */␊ |
33 | class IOUSBWorkLoop : public IOWorkLoop␊ |
34 | { ␊ |
35 | OSDeclareDefaultStructors(IOUSBWorkLoop)␊ |
36 | ␊ |
37 | protected:␊ |
38 | void *␉␉␉fSleepToken;␊ |
39 | #ifndef __OPEN_SOURCE__␊ |
40 | ␉lck_grp_t *␉␉fLockGroup;␊ |
41 | #endif␊ |
42 | ␉bool init ( const char * controllerLocation );␊ |
43 | ␉void free ( void );␊ |
44 | ␉␊ |
45 | // Overrides to check for sleeping␊ |
46 | virtual void closeGate();␊ |
47 | virtual bool tryCloseGate();␊ |
48 | ␊ |
49 | public:␊ |
50 | // Create a workloop␊ |
51 | static IOUSBWorkLoop * workLoop(const char * controllerLocation);␊ |
52 | ␊ |
53 | // Put workloop to sleep (Must have gate closed, opens gate if successful)␊ |
54 | virtual IOReturn sleep(void *token);␊ |
55 | ␊ |
56 | // Wake workloop up (closes gate if successful)␊ |
57 | virtual IOReturn wake(void *token);␊ |
58 | ␊ |
59 | void CloseGate(void);␊ |
60 | void OpenGate(void);␊ |
61 | };␊ |
62 | ␊ |
63 | #endif /* ! _IOKIT_IOUSBWORKLOOP_H */␊ |
64 | ␊ |
65 |