1/* iig(DriverKit-286) generated from IOUserServer.iig */
2
3/* IOUserServer.iig:1-36 */
4/*
5 * Copyright (c) 2019-2019 Apple Inc. All rights reserved.
6 *
7 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
8 *
9 * This file contains Original Code and/or Modifications of Original Code
10 * as defined in and that are subject to the Apple Public Source License
11 * Version 2.0 (the 'License'). You may not use this file except in
12 * compliance with the License. The rights granted to you under the License
13 * may not be used to create, or enable the creation or redistribution of,
14 * unlawful or unlicensed copies of an Apple operating system, or to
15 * circumvent, violate, or enable the circumvention or violation of, any
16 * terms of an Apple operating system software license agreement.
17 *
18 * Please obtain a copy of the License at
19 * http://www.opensource.apple.com/apsl/ and read it before using this file.
20 *
21 * The Original Code and all software distributed under the License are
22 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
23 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
24 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
26 * Please see the License for the specific language governing rights and
27 * limitations under the License.
28 *
29 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
30 */
31
32#ifndef _IOKIT_UIOUSERSERVER_H
33#define _IOKIT_UIOUSERSERVER_H
34
35#include <DriverKit/OSObject.h> /* .iig include */
36#include <DriverKit/OSAction.h> /* .iig include */
37#include <DriverKit/IOService.h> /* .iig include */
38
39
40/* source class IOUserServer IOUserServer.iig:37-67 */
41
42#if __DOCUMENTATION__
43#define KERNEL IIG_KERNEL
44
45/*!
46*/
47
48class KERNEL IOUserServer : public IOService
49{
50public:
51 static kern_return_t
52 Create(
53 const char name[64],
54 uint64_t tag,
55 uint64_t options,
56 OSString * bundleID,
57 IOUserServer ** server);
58
59 virtual bool
60 init() override;
61
62 virtual void
63 free() override;
64
65 virtual kern_return_t
66 Exit(const char reason[1024]) LOCAL;
67
68 virtual kern_return_t
69 LoadModule(const char path[1024]) LOCAL;
70
71 virtual kern_return_t
72 RegisterService() override;
73};
74
75#undef KERNEL
76#else /* __DOCUMENTATION__ */
77
78/* generated class IOUserServer IOUserServer.iig:37-67 */
79
80#define IOUserServer_Create_ID 0xc1dbaee5e75e22b9ULL
81#define IOUserServer_Exit_ID 0xe949d58832ebe980ULL
82#define IOUserServer_LoadModule_ID 0xd96f074a91a53982ULL
83
84#define IOUserServer_Create_Args \
85 const char * name, \
86 uint64_t tag, \
87 uint64_t options, \
88 OSString * bundleID, \
89 IOUserServer ** server
90
91#define IOUserServer_Exit_Args \
92 const char * reason
93
94#define IOUserServer_LoadModule_Args \
95 const char * path
96
97#define IOUserServer_RegisterService_Args \
98
99
100#define IOUserServer_Methods \
101\
102public:\
103\
104 virtual kern_return_t\
105 Dispatch(const IORPC rpc) APPLE_KEXT_OVERRIDE;\
106\
107 static kern_return_t\
108 _Dispatch(IOUserServer * self, const IORPC rpc);\
109\
110 static kern_return_t\
111 Create(\
112 const char * name,\
113 uint64_t tag,\
114 uint64_t options,\
115 OSString * bundleID,\
116 IOUserServer ** server);\
117\
118 kern_return_t\
119 Exit(\
120 const char * reason,\
121 OSDispatchMethod supermethod = NULL);\
122\
123 kern_return_t\
124 LoadModule(\
125 const char * path,\
126 OSDispatchMethod supermethod = NULL);\
127\
128\
129protected:\
130 /* _Impl methods */\
131\
132 kern_return_t\
133 Exit_Impl(IOUserServer_Exit_Args);\
134\
135 kern_return_t\
136 LoadModule_Impl(IOUserServer_LoadModule_Args);\
137\
138\
139public:\
140 /* _Invoke methods */\
141\
142 typedef kern_return_t (*Create_Handler)(IOUserServer_Create_Args);\
143 static kern_return_t\
144 Create_Invoke(const IORPC rpc,\
145 Create_Handler func);\
146\
147 typedef kern_return_t (*Exit_Handler)(OSMetaClassBase * target, IOUserServer_Exit_Args);\
148 static kern_return_t\
149 Exit_Invoke(const IORPC rpc,\
150 OSMetaClassBase * target,\
151 Exit_Handler func);\
152\
153 typedef kern_return_t (*LoadModule_Handler)(OSMetaClassBase * target, IOUserServer_LoadModule_Args);\
154 static kern_return_t\
155 LoadModule_Invoke(const IORPC rpc,\
156 OSMetaClassBase * target,\
157 LoadModule_Handler func);\
158\
159
160
161#define IOUserServer_KernelMethods \
162\
163protected:\
164 /* _Impl methods */\
165\
166 static kern_return_t\
167 Create_Impl(IOUserServer_Create_Args);\
168\
169 kern_return_t\
170 RegisterService_Impl(IOService_RegisterService_Args);\
171\
172
173
174#define IOUserServer_VirtualMethods \
175\
176public:\
177\
178 virtual bool\
179 init(\
180) APPLE_KEXT_OVERRIDE;\
181\
182 virtual void\
183 free(\
184) APPLE_KEXT_OVERRIDE;\
185\
186
187
188#if !KERNEL
189
190extern OSMetaClass * gIOUserServerMetaClass;
191extern const OSClassLoadInformation IOUserServer_Class;
192
193class IOUserServerMetaClass : public OSMetaClass
194{
195public:
196 virtual kern_return_t
197 New(OSObject * instance) override;
198 virtual kern_return_t
199 Dispatch(const IORPC rpc) override;
200};
201
202#endif /* !KERNEL */
203
204#if !KERNEL
205
206class IOUserServerInterface : public OSInterface
207{
208public:
209};
210
211struct IOUserServer_IVars;
212struct IOUserServer_LocalIVars;
213
214class IOUserServer : public IOService, public IOUserServerInterface
215{
216#if !KERNEL
217 friend class IOUserServerMetaClass;
218#endif /* !KERNEL */
219
220#if !KERNEL
221public:
222#ifdef IOUserServer_DECLARE_IVARS
223IOUserServer_DECLARE_IVARS
224#else /* IOUserServer_DECLARE_IVARS */
225 union
226 {
227 IOUserServer_IVars * ivars;
228 IOUserServer_LocalIVars * lvars;
229 };
230#endif /* IOUserServer_DECLARE_IVARS */
231#endif /* !KERNEL */
232
233#if !KERNEL
234 static OSMetaClass *
235 sGetMetaClass() { return gIOUserServerMetaClass; };
236#endif /* KERNEL */
237
238 using super = IOService;
239
240#if !KERNEL
241 IOUserServer_Methods
242 IOUserServer_VirtualMethods
243#endif /* !KERNEL */
244
245};
246#endif /* !KERNEL */
247
248
249#endif /* !__DOCUMENTATION__ */
250
251/* IOUserServer.iig:69- */
252
253#endif /* ! _IOKIT_UIOUSERSERVER_H */
254