1 | #ifndef _UNDReply_server_ |
2 | #define _UNDReply_server_ |
3 | |
4 | /* Module UNDReply */ |
5 | |
6 | #include <string.h> |
7 | #include <mach/ndr.h> |
8 | #include <mach/boolean.h> |
9 | #include <mach/kern_return.h> |
10 | #include <mach/notify.h> |
11 | #include <mach/mach_types.h> |
12 | #include <mach/message.h> |
13 | #include <mach/mig_errors.h> |
14 | #include <mach/port.h> |
15 | |
16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ |
17 | |
18 | #if defined(__has_include) |
19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) |
20 | #ifndef USING_MIG_STRNCPY_ZEROFILL |
21 | #define USING_MIG_STRNCPY_ZEROFILL |
22 | #endif |
23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ |
24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ |
25 | #ifdef __cplusplus |
26 | extern "C" { |
27 | #endif |
28 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS_CSTRING_ATTR |
29 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS_CSTRING_COUNTEDBY_ATTR(C) __unsafe_indexable |
30 | #endif |
31 | extern int mig_strncpy_zerofill(char * dest, const char * src, int len) __attribute__((weak_import)); |
32 | #ifdef __cplusplus |
33 | } |
34 | #endif |
35 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ |
36 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ |
37 | #endif /* __has_include */ |
38 | |
39 | /* END MIG_STRNCPY_ZEROFILL CODE */ |
40 | |
41 | |
42 | #ifdef AUTOTEST |
43 | #ifndef FUNCTION_PTR_T |
44 | #define FUNCTION_PTR_T |
45 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); |
46 | typedef struct { |
47 | char * name; |
48 | function_ptr_t function; |
49 | } function_table_entry; |
50 | typedef function_table_entry *function_table_t; |
51 | #endif /* FUNCTION_PTR_T */ |
52 | #endif /* AUTOTEST */ |
53 | |
54 | #ifndef UNDReply_MSG_COUNT |
55 | #define UNDReply_MSG_COUNT 2 |
56 | #endif /* UNDReply_MSG_COUNT */ |
57 | |
58 | #include <Availability.h> |
59 | #include <mach/std_types.h> |
60 | #include <mach/mig.h> |
61 | #include <UserNotification/UNDTypes.h> |
62 | |
63 | #ifdef __BeforeMigServerHeader |
64 | __BeforeMigServerHeader |
65 | #endif /* __BeforeMigServerHeader */ |
66 | |
67 | #ifndef MIG_SERVER_ROUTINE |
68 | #define MIG_SERVER_ROUTINE |
69 | #endif |
70 | |
71 | |
72 | /* SimpleRoutine UNDAlertCompletedWithResult_rpc */ |
73 | #ifdef mig_external |
74 | mig_external |
75 | #else |
76 | extern |
77 | #endif /* mig_external */ |
78 | MIG_SERVER_ROUTINE |
79 | kern_return_t UNDAlertCompletedWithResult_rpc |
80 | ( |
81 | UNDReplyRef reply, |
82 | int result, |
83 | xmlData_t data, |
84 | mach_msg_type_number_t dataCnt |
85 | ); |
86 | |
87 | /* SimpleRoutine UNDNotificationCreated_rpc */ |
88 | #ifdef mig_external |
89 | mig_external |
90 | #else |
91 | extern |
92 | #endif /* mig_external */ |
93 | MIG_SERVER_ROUTINE |
94 | kern_return_t UNDNotificationCreated_rpc |
95 | ( |
96 | UNDReplyRef reply, |
97 | int userLandNotificationKey |
98 | ); |
99 | |
100 | #ifdef mig_external |
101 | mig_external |
102 | #else |
103 | extern |
104 | #endif /* mig_external */ |
105 | boolean_t UNDReply_server( |
106 | mach_msg_header_t *InHeadP, |
107 | void *InDataP, |
108 | mach_msg_max_trailer_t *InTrailerP, |
109 | mach_msg_header_t *OutHeadP, |
110 | void *OutDataP); |
111 | |
112 | #ifdef mig_external |
113 | mig_external |
114 | #else |
115 | extern |
116 | #endif /* mig_external */ |
117 | mig_kern_routine_t UNDReply_server_routine( |
118 | mach_msg_header_t *InHeadP); |
119 | |
120 | |
121 | /* Description of this kernel subsystem, for use in direct RPC */ |
122 | extern const struct UNDReply_subsystem { |
123 | mig_kern_server_routine_t kserver; /* Server routine */ |
124 | mach_msg_id_t start; /* Min routine number */ |
125 | mach_msg_id_t end; /* Max routine number + 1 */ |
126 | unsigned int maxsize; /* Max msg size */ |
127 | vm_address_t reserved; /* Reserved */ |
128 | struct kern_routine_descriptor /* Array of routine descriptors */ |
129 | kroutine[2]; |
130 | } UNDReply_subsystem; |
131 | |
132 | /* typedefs for all requests */ |
133 | |
134 | #ifndef __Request__UNDReply_subsystem__defined |
135 | #define __Request__UNDReply_subsystem__defined |
136 | |
137 | #ifdef __MigPackStructs |
138 | #pragma pack(push, 4) |
139 | #endif |
140 | typedef struct { |
141 | mach_msg_header_t Head; |
142 | /* start of the kernel processed data */ |
143 | mach_msg_body_t msgh_body; |
144 | mach_msg_ool_descriptor_t data; |
145 | /* end of the kernel processed data */ |
146 | NDR_record_t NDR; |
147 | int result; |
148 | mach_msg_type_number_t dataCnt; |
149 | } __Request__UNDAlertCompletedWithResult_rpc_t __attribute__((unused)); |
150 | #ifdef __MigPackStructs |
151 | #pragma pack(pop) |
152 | #endif |
153 | /* Struct for kernel processed data (Header + Descriptors) */ |
154 | #ifdef __MigPackStructs |
155 | #pragma pack(push, 4) |
156 | #endif |
157 | typedef struct { |
158 | mach_msg_header_t Head; |
159 | mach_msg_body_t msgh_body; |
160 | mach_msg_ool_descriptor_t data; |
161 | } __RequestKData__UNDAlertCompletedWithResult_rpc_t __attribute__((unused)); |
162 | #ifdef __MigPackStructs |
163 | #pragma pack(pop) |
164 | #endif |
165 | /* Struct for pure user data */ |
166 | #ifdef __MigPackStructs |
167 | #pragma pack(push, 4) |
168 | #endif |
169 | typedef struct { |
170 | NDR_record_t NDR; |
171 | int result; |
172 | mach_msg_type_number_t dataCnt; |
173 | char padding[0]; /* Avoid generating empty UData structs */ |
174 | } __RequestUData__UNDAlertCompletedWithResult_rpc_t __attribute__((unused)); |
175 | #ifdef __MigPackStructs |
176 | #pragma pack(pop) |
177 | #endif |
178 | |
179 | #ifdef __MigPackStructs |
180 | #pragma pack(push, 4) |
181 | #endif |
182 | typedef struct { |
183 | mach_msg_header_t Head; |
184 | NDR_record_t NDR; |
185 | int userLandNotificationKey; |
186 | } __Request__UNDNotificationCreated_rpc_t __attribute__((unused)); |
187 | #ifdef __MigPackStructs |
188 | #pragma pack(pop) |
189 | #endif |
190 | /* Struct for kernel processed data (Header + Descriptors) */ |
191 | #ifdef __MigPackStructs |
192 | #pragma pack(push, 4) |
193 | #endif |
194 | typedef struct { |
195 | mach_msg_header_t Head; |
196 | } __RequestKData__UNDNotificationCreated_rpc_t __attribute__((unused)); |
197 | #ifdef __MigPackStructs |
198 | #pragma pack(pop) |
199 | #endif |
200 | /* Struct for pure user data */ |
201 | #ifdef __MigPackStructs |
202 | #pragma pack(push, 4) |
203 | #endif |
204 | typedef struct { |
205 | NDR_record_t NDR; |
206 | int userLandNotificationKey; |
207 | char padding[0]; /* Avoid generating empty UData structs */ |
208 | } __RequestUData__UNDNotificationCreated_rpc_t __attribute__((unused)); |
209 | #ifdef __MigPackStructs |
210 | #pragma pack(pop) |
211 | #endif |
212 | #endif /* !__Request__UNDReply_subsystem__defined */ |
213 | |
214 | |
215 | /* union of all requests */ |
216 | |
217 | #ifndef __RequestUnion__UNDReply_subsystem__defined |
218 | #define __RequestUnion__UNDReply_subsystem__defined |
219 | union __RequestUnion__UNDReply_subsystem { |
220 | __Request__UNDAlertCompletedWithResult_rpc_t Request_UNDAlertCompletedWithResult_rpc; |
221 | __Request__UNDNotificationCreated_rpc_t Request_UNDNotificationCreated_rpc; |
222 | }; |
223 | #endif /* __RequestUnion__UNDReply_subsystem__defined */ |
224 | /* typedefs for all replies */ |
225 | |
226 | #ifndef __Reply__UNDReply_subsystem__defined |
227 | #define __Reply__UNDReply_subsystem__defined |
228 | |
229 | #ifdef __MigPackStructs |
230 | #pragma pack(push, 4) |
231 | #endif |
232 | typedef struct { |
233 | mach_msg_header_t Head; |
234 | NDR_record_t NDR; |
235 | kern_return_t RetCode; |
236 | } __Reply__UNDAlertCompletedWithResult_rpc_t __attribute__((unused)); |
237 | #ifdef __MigPackStructs |
238 | #pragma pack(pop) |
239 | #endif |
240 | /* Struct for kernel processed data (Header + Descriptors) */ |
241 | #ifdef __MigPackStructs |
242 | #pragma pack(push, 4) |
243 | #endif |
244 | typedef struct { |
245 | mach_msg_header_t Head; |
246 | } __ReplyKData__UNDAlertCompletedWithResult_rpc_t __attribute__((unused)); |
247 | #ifdef __MigPackStructs |
248 | #pragma pack(pop) |
249 | #endif |
250 | /* Struct for pure user data */ |
251 | #ifdef __MigPackStructs |
252 | #pragma pack(push, 4) |
253 | #endif |
254 | typedef struct { |
255 | NDR_record_t NDR; |
256 | kern_return_t RetCode; |
257 | char padding[0]; /* Avoid generating empty UData structs */ |
258 | } __ReplyUData__UNDAlertCompletedWithResult_rpc_t __attribute__((unused)); |
259 | #ifdef __MigPackStructs |
260 | #pragma pack(pop) |
261 | #endif |
262 | |
263 | #ifdef __MigPackStructs |
264 | #pragma pack(push, 4) |
265 | #endif |
266 | typedef struct { |
267 | mach_msg_header_t Head; |
268 | NDR_record_t NDR; |
269 | kern_return_t RetCode; |
270 | } __Reply__UNDNotificationCreated_rpc_t __attribute__((unused)); |
271 | #ifdef __MigPackStructs |
272 | #pragma pack(pop) |
273 | #endif |
274 | /* Struct for kernel processed data (Header + Descriptors) */ |
275 | #ifdef __MigPackStructs |
276 | #pragma pack(push, 4) |
277 | #endif |
278 | typedef struct { |
279 | mach_msg_header_t Head; |
280 | } __ReplyKData__UNDNotificationCreated_rpc_t __attribute__((unused)); |
281 | #ifdef __MigPackStructs |
282 | #pragma pack(pop) |
283 | #endif |
284 | /* Struct for pure user data */ |
285 | #ifdef __MigPackStructs |
286 | #pragma pack(push, 4) |
287 | #endif |
288 | typedef struct { |
289 | NDR_record_t NDR; |
290 | kern_return_t RetCode; |
291 | char padding[0]; /* Avoid generating empty UData structs */ |
292 | } __ReplyUData__UNDNotificationCreated_rpc_t __attribute__((unused)); |
293 | #ifdef __MigPackStructs |
294 | #pragma pack(pop) |
295 | #endif |
296 | #endif /* !__Reply__UNDReply_subsystem__defined */ |
297 | |
298 | |
299 | /* union of all replies */ |
300 | |
301 | #ifndef __ReplyUnion__UNDReply_subsystem__defined |
302 | #define __ReplyUnion__UNDReply_subsystem__defined |
303 | union __ReplyUnion__UNDReply_subsystem { |
304 | __Reply__UNDAlertCompletedWithResult_rpc_t Reply_UNDAlertCompletedWithResult_rpc; |
305 | __Reply__UNDNotificationCreated_rpc_t Reply_UNDNotificationCreated_rpc; |
306 | }; |
307 | #endif /* __ReplyUnion__UNDReply_subsystem__defined */ |
308 | |
309 | #ifndef subsystem_to_name_map_UNDReply |
310 | #define subsystem_to_name_map_UNDReply \ |
311 | { "UNDAlertCompletedWithResult_rpc", 6200 },\ |
312 | { "UNDNotificationCreated_rpc", 6201 } |
313 | #endif |
314 | |
315 | #ifdef __AfterMigServerHeader |
316 | __AfterMigServerHeader |
317 | #endif /* __AfterMigServerHeader */ |
318 | |
319 | #endif /* _UNDReply_server_ */ |
320 | |