-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathSEAforth24UserClient.h
88 lines (67 loc) · 2.33 KB
/
SEAforth24UserClient.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// (C) 2009 Wager Labs, SA
// Author: Joel Reymont
// Web: http://tinyco.de
#include <IOKit/IOUserClient.h>
#include "SEAforth24.h"
#define UserClientClassName com_wagerlabs_driver_SEAforth24UserClient
class UserClientClassName : public IOUserClient
{
OSDeclareDefaultStructors(com_wagerlabs_driver_SEAforth24UserClient)
protected:
DriverClassName* fProvider;
task_t fTask;
static const IOExternalMethodDispatch Methods[kNumberOfMethods];
public:
virtual void stop(IOService* provider);
virtual bool start(IOService* provider);
virtual bool initWithTask(task_t owningTask, void* securityToken, UInt32 type);
virtual IOReturn clientClose(void);
virtual IOReturn clientDied(void);
virtual bool willTerminate(IOService* provider, IOOptionBits options);
virtual bool didTerminate(IOService* provider, IOOptionBits options, bool* defer);
virtual bool terminate(IOOptionBits options = 0);
virtual bool finalize(IOOptionBits options);
protected:
virtual IOReturn closeUserClient(void);
virtual IOReturn openUserClient(void);
// KPI for supporting access from both 32-bit and 64-bit user processes beginning with Mac OS X 10.5.
virtual IOReturn externalMethod(
uint32_t selector,
IOExternalMethodArguments* arguments,
IOExternalMethodDispatch* dispatch,
OSObject* target,
void* reference
);
static IOReturn sOpenUserClient(
UserClientClassName* target,
void* reference,
IOExternalMethodArguments* arguments
);
static IOReturn sCloseUserClient(
UserClientClassName* target,
void* reference,
IOExternalMethodArguments* arguments
);
static IOReturn sInit(
UserClientClassName* target,
void* reference,
IOExternalMethodArguments* arguments
);
static IOReturn sRead(
UserClientClassName* target,
void* reference,
IOExternalMethodArguments* arguments
);
static IOReturn sWrite(
UserClientClassName* target,
void* reference,
IOExternalMethodArguments* arguments
);
virtual IOReturn S24IO(
vm_address_t buffer,
UInt32 size,
UInt16 bits,
UInt8 write_last,
IODirection direction
);
};