Root/
Source at commit 2351 created 10 years 5 months ago. By ifabio, more info from dmi tables | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 2007 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 | ␊ |
23 | #ifndef _IOFWPHYPACKETLISTENER_H_␊ |
24 | #define _IOFWPHYPACKETLISTENER_H_␊ |
25 | ␊ |
26 | #include <libkern/c++/OSObject.h>␊ |
27 | ␊ |
28 | class IOFireWireController;␊ |
29 | ␊ |
30 | // Callback when phy packet is received␊ |
31 | typedef void (*FWPHYPacketCallback)( void *refcon, UInt32 data1, UInt32 data2 );␊ |
32 | ␊ |
33 | /*! @class IOFWPHYPacketListener␊ |
34 | */␊ |
35 | ␊ |
36 | class IOFWPHYPacketListener : public OSObject␊ |
37 | {␊ |
38 | ␉OSDeclareDefaultStructors( IOFWPHYPacketListener );␊ |
39 | ␊ |
40 | ␉friend class IOFireWireController;␊ |
41 | ␉␊ |
42 | protected:␊ |
43 | ␉␊ |
44 | ␉IOFireWireController *␉␉fControl;␊ |
45 | ␉FWPHYPacketCallback␉␉␉fCallback;␊ |
46 | ␉void *␉␉␉␉␉␉fRefCon;␊ |
47 | ␊ |
48 | ␉static IOFWPHYPacketListener * createWithController( IOFireWireController * controller );␊ |
49 | ␊ |
50 | virtual bool initWithController( IOFireWireController * control );␊ |
51 | virtual void free( void );␊ |
52 | ␊ |
53 | public:␊ |
54 | ␊ |
55 | ␉virtual IOReturn activate( void );␊ |
56 | ␉virtual void deactivate( void );␊ |
57 | ␊ |
58 | ␉virtual void setCallback( FWPHYPacketCallback callback );␊ |
59 | ␉virtual void setRefCon( void * refcon );␊ |
60 | ␉virtual void * getRefCon( void );␊ |
61 | ␊ |
62 | protected:␊ |
63 | ␉virtual void processPHYPacket( UInt32 data1, UInt32 data2 );␊ |
64 | ␊ |
65 | OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 0 );␊ |
66 | OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 1 );␊ |
67 | OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 2 );␊ |
68 | OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 3 );␊ |
69 | OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 4 );␊ |
70 | OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 5 );␊ |
71 | OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 6 );␊ |
72 | OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 7 );␊ |
73 | OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 8 );␊ |
74 | OSMetaClassDeclareReservedUnused( IOFWPHYPacketListener, 9 );␊ |
75 | };␊ |
76 | ␊ |
77 | #endif |