Root/
Source at commit 1445 created 12 years 11 months ago. By jrcs, Revert "Print the multiboot_magic" Only used for debugging purpose | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 1998-2001 Apple Computer, Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_LICENSE_HEADER_START@␊ |
5 | * ␊ |
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.␊ |
11 | * ␊ |
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␊ |
18 | * under the License.␊ |
19 | * ␊ |
20 | * @APPLE_LICENSE_HEADER_END@␊ |
21 | */␊ |
22 | #ifndef _IOKIT_IOFWASYNCSTREAMLISTENER_H␊ |
23 | #define _IOKIT_IOFWASYNCSTREAMLISTENER_H␊ |
24 | ␊ |
25 | #include <IOKit/firewire/IOFireWireLink.h>␊ |
26 | #include <IOKit/firewire/IOFWCommand.h>␊ |
27 | #include <IOKit/IOBufferMemoryDescriptor.h>␊ |
28 | #include <IOKit/firewire/IOFWDCLProgram.h>␊ |
29 | ␊ |
30 | class IOFWAsyncStreamReceiver;␊ |
31 | class IOFWAsyncStreamReceivePort;␊ |
32 | ␊ |
33 | /*! @class IOFWAsyncStreamListener␊ |
34 | */␊ |
35 | class IOFWAsyncStreamListener : public OSObject␊ |
36 | {␊ |
37 | OSDeclareDefaultStructors(IOFWAsyncStreamListener)␊ |
38 | ␊ |
39 | friend class IOFWAsyncStreamReceiver;␊ |
40 | friend class IOFireWireController;␊ |
41 | ␊ |
42 | public:␊ |
43 | ␊ |
44 | /*!␉@function initAll␊ |
45 | ␉@abstract Creates an AsyncStream client for an Isoch channel.␊ |
46 | ␉@param control␉Points to IOFireWireController.␊ |
47 | ␉@param channel␉Isoch channel for listening.␊ |
48 | ␉@param proc␉␉Callback on packet reception.␊ |
49 | ␉@param obj Client's callback object.␊ |
50 | ␉@result returns true on success, else false.␉*/␉␊ |
51 | ␉bool initAll( IOFireWireController *control, UInt32 channel, FWAsyncStreamReceiveCallback proc, void *refcon );␊ |
52 | ␊ |
53 | /*!␉@function setListenerHandler␊ |
54 | ␉@abstract Set the callback that should be called to handle incoming async stream packets␊ |
55 | ␉@param inReceiver The callback to set.␊ |
56 | ␉@result Returns the callback that was previously set or nil for none.*/␊ |
57 | ␉const FWAsyncStreamReceiveCallback setListenerHandler( FWAsyncStreamReceiveCallback inReceiver );␊ |
58 | ␊ |
59 | /*!␉@function TurnOffNotification␊ |
60 | ␉@abstract Turns off client callback notification.␊ |
61 | ␉@result none.␉*/␉␊ |
62 | ␉inline void TurnOffNotification() { fNotify = false; };␊ |
63 | ␊ |
64 | /*!␉@function TurnOnNotification␊ |
65 | ␉@abstract Turns on client callback notification.␊ |
66 | ␉@result none.␉*/␉␊ |
67 | ␉inline void TurnOnNotification() { fNotify = true; };␊ |
68 | ␊ |
69 | /*!␉@function IsNotificationOn␊ |
70 | ␉@abstract checks the notification state.␊ |
71 | ␉@result true if ON, else false␉*/␉␊ |
72 | ␉inline bool IsNotificationOn() { return fNotify; };␊ |
73 | ␊ |
74 | /*!␉@function setFlags␊ |
75 | ␉@abstract set flags for the listener.␊ |
76 | ␉@param flags indicate performance metrics.␊ |
77 | ␉@result none.␉*/␉␊ |
78 | ␉void setFlags( UInt32 flags );␊ |
79 | ␉␊ |
80 | /*!␉@function getFlags␊ |
81 | ␉@abstract get the flags of listener.␊ |
82 | ␉@param none.␊ |
83 | ␉@result flags.␉*/␉␊ |
84 | ␉UInt32 getFlags();␊ |
85 | ␊ |
86 | /*!␉@function getRefCon␊ |
87 | ␉@abstract get the refcon specific to this listener.␊ |
88 | ␉@param none.␊ |
89 | ␉@result fRefCon refcon passed during initialization. */␉␊ |
90 | ␉inline void* getRefCon() { return fRefCon; };␊ |
91 | ␉␊ |
92 | /*!␉@function getOverrunCounter␊ |
93 | ␉@abstract get overrun counter from the DCL program.␊ |
94 | ␉@param none.␊ |
95 | ␉@result returns the counter value.␉*/␉␊ |
96 | ␉UInt32 getOverrunCounter();␊ |
97 | ␉␊ |
98 | protected:␊ |
99 | ␊ |
100 | ␉FWAsyncStreamReceiveCallback␉fClientProc; ␊ |
101 | ␉void␉␉␉␉␉␉␉*fRefCon;␊ |
102 | ␉IOFWAsyncStreamReceiver␉␉␉*fReceiver;␊ |
103 | ␉bool␉␉␉␉␉␉␉ fNotify;␊ |
104 | ␉UInt32␉␉␉␉␉␉␉ fFlags;␊ |
105 | ␉IOFireWireController␉␉␉*fControl;␊ |
106 | ␊ |
107 | /*! @struct ExpansionData␊ |
108 | @discussion This structure will be used to expand the capablilties of the class in the future.␊ |
109 | */ ␊ |
110 | struct ExpansionData { };␊ |
111 | ␊ |
112 | /*! @var reserved␊ |
113 | Reserved for future use. (Internal use only) */␊ |
114 | ExpansionData *reserved;␊ |
115 | ␊ |
116 | virtual void␉␉free();␊ |
117 | ␊ |
118 | private:␊ |
119 | /*!␉function getReceiver␊ |
120 | ␉abstract Returns the Async Stream receiver object which tracks multiple␊ |
121 | ␉ IOFWAsyncStreamListeners for the same Isoc channel. */␉␊ |
122 | ␉inline IOFWAsyncStreamReceiver *getReceiver() { return fReceiver; };␊ |
123 | ␊ |
124 | /*!␉function invokeClients␊ |
125 | ␉abstract Invokes client's callback function with fRefCon.␉*/␉␊ |
126 | ␉void invokeClients( UInt8 *buffer );␊ |
127 | ␉␊ |
128 | OSMetaClassDeclareReservedUnused(IOFWAsyncStreamListener, 0);␊ |
129 | OSMetaClassDeclareReservedUnused(IOFWAsyncStreamListener, 1);␊ |
130 | };␊ |
131 | #endif // _IOKIT_IOFWASYNCSTREAMLISTENER_H␊ |
132 | ␊ |
133 |