1 | /* |
2 | * IDENTIFICATION: |
3 | * stub generated by bootstrap_cmds-133 |
4 | * OPTIONS: |
5 | * KernelUser |
6 | */ |
7 | #define __MIG_check__Reply__UNDRequest_subsystem__ 1 |
8 | |
9 | #include "UNDRequest.h" |
10 | |
11 | /* TODO: #include <mach/mach.h> */ |
12 | #ifdef __cplusplus |
13 | extern "C" { |
14 | #endif /* __cplusplus */ |
15 | extern void mach_msg_destroy(mach_msg_header_t *); |
16 | #ifdef __cplusplus |
17 | } |
18 | #endif /* __cplusplus */ |
19 | |
20 | #ifndef mig_internal |
21 | #define mig_internal static __inline__ |
22 | #endif /* mig_internal */ |
23 | |
24 | #ifndef mig_external |
25 | #define mig_external |
26 | #endif /* mig_external */ |
27 | |
28 | #if !defined(__MigTypeCheck) && defined(TypeCheck) |
29 | #define __MigTypeCheck TypeCheck /* Legacy setting */ |
30 | #endif /* !defined(__MigTypeCheck) */ |
31 | |
32 | #if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) |
33 | #define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ |
34 | #endif /* !defined(__MigKernelSpecificCode) */ |
35 | |
36 | #ifndef LimitCheck |
37 | #define LimitCheck 0 |
38 | #endif /* LimitCheck */ |
39 | |
40 | #ifndef min |
41 | #define min(a,b) ( ((a) < (b))? (a): (b) ) |
42 | #endif /* min */ |
43 | |
44 | #if !defined(_WALIGN_) |
45 | #define _WALIGN_(x) (((x) + 3) & ~3) |
46 | #endif /* !defined(_WALIGN_) */ |
47 | |
48 | #if !defined(_WALIGNSZ_) |
49 | #define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) |
50 | #endif /* !defined(_WALIGNSZ_) */ |
51 | |
52 | #ifndef UseStaticTemplates |
53 | #define UseStaticTemplates 0 |
54 | #endif /* UseStaticTemplates */ |
55 | |
56 | #ifndef MIG_SERVER_ROUTINE |
57 | #define MIG_SERVER_ROUTINE |
58 | #endif |
59 | |
60 | #ifndef __MachMsgErrorWithTimeout |
61 | #define __MachMsgErrorWithTimeout(_R_) { \ |
62 | switch (_R_) { \ |
63 | case MACH_SEND_INVALID_DATA: \ |
64 | case MACH_SEND_INVALID_DEST: \ |
65 | case MACH_SEND_INVALID_HEADER: \ |
66 | mig_put_reply_port(InP->Head.msgh_reply_port); \ |
67 | break; \ |
68 | case MACH_SEND_TIMED_OUT: \ |
69 | case MACH_RCV_TIMED_OUT: \ |
70 | default: \ |
71 | mig_dealloc_reply_port(InP->Head.msgh_reply_port); \ |
72 | } \ |
73 | } |
74 | #endif /* __MachMsgErrorWithTimeout */ |
75 | |
76 | #ifndef __MachMsgErrorWithoutTimeout |
77 | #define __MachMsgErrorWithoutTimeout(_R_) { \ |
78 | switch (_R_) { \ |
79 | case MACH_SEND_INVALID_DATA: \ |
80 | case MACH_SEND_INVALID_DEST: \ |
81 | case MACH_SEND_INVALID_HEADER: \ |
82 | mig_put_reply_port(InP->Head.msgh_reply_port); \ |
83 | break; \ |
84 | default: \ |
85 | mig_dealloc_reply_port(InP->Head.msgh_reply_port); \ |
86 | } \ |
87 | } |
88 | #endif /* __MachMsgErrorWithoutTimeout */ |
89 | |
90 | #ifndef __DeclareSendRpc |
91 | #define __DeclareSendRpc(_NUM_, _NAME_) |
92 | #endif /* __DeclareSendRpc */ |
93 | |
94 | #ifndef __BeforeSendRpc |
95 | #define __BeforeSendRpc(_NUM_, _NAME_) |
96 | #endif /* __BeforeSendRpc */ |
97 | |
98 | #ifndef __AfterSendRpc |
99 | #define __AfterSendRpc(_NUM_, _NAME_) |
100 | #endif /* __AfterSendRpc */ |
101 | |
102 | #ifndef __DeclareSendSimple |
103 | #define __DeclareSendSimple(_NUM_, _NAME_) |
104 | #endif /* __DeclareSendSimple */ |
105 | |
106 | #ifndef __BeforeSendSimple |
107 | #define __BeforeSendSimple(_NUM_, _NAME_) |
108 | #endif /* __BeforeSendSimple */ |
109 | |
110 | #ifndef __AfterSendSimple |
111 | #define __AfterSendSimple(_NUM_, _NAME_) |
112 | #endif /* __AfterSendSimple */ |
113 | |
114 | #define msgh_request_port msgh_remote_port |
115 | #define msgh_reply_port msgh_local_port |
116 | |
117 | |
118 | |
119 | /* SimpleRoutine UNDExecute_rpc */ |
120 | mig_external kern_return_t UNDExecute_rpc |
121 | ( |
122 | UNDServerRef server, |
123 | UNDPath executionPath, |
124 | int uid, |
125 | int gid |
126 | ) |
127 | { |
128 | |
129 | #ifdef __MigPackStructs |
130 | #pragma pack(push, 4) |
131 | #endif |
132 | typedef struct { |
133 | mach_msg_header_t Head; |
134 | NDR_record_t NDR; |
135 | mach_msg_type_number_t executionPathOffset; /* MiG doesn't use it */ |
136 | mach_msg_type_number_t executionPathCnt; |
137 | char executionPath[1024]; |
138 | int uid; |
139 | int gid; |
140 | } Request __attribute__((unused)); |
141 | #ifdef __MigPackStructs |
142 | #pragma pack(pop) |
143 | #endif |
144 | /* |
145 | * typedef struct { |
146 | * mach_msg_header_t Head; |
147 | * NDR_record_t NDR; |
148 | * kern_return_t RetCode; |
149 | * } mig_reply_error_t; |
150 | */ |
151 | |
152 | union UNDExecute_rpcMessU { |
153 | Request In; |
154 | } *Mess = (union UNDExecute_rpcMessU *) mig_user_allocate(size: sizeof(*Mess)); |
155 | |
156 | Request *InP = &Mess->In; |
157 | |
158 | mach_msg_return_t msg_result; |
159 | unsigned int msgh_size; |
160 | unsigned int msgh_size_delta; |
161 | |
162 | |
163 | #ifdef __MIG_check__Reply__UNDExecute_rpc_t__defined |
164 | kern_return_t check_result; |
165 | #endif /* __MIG_check__Reply__UNDExecute_rpc_t__defined */ |
166 | |
167 | __DeclareSendSimple(6000, "UNDExecute_rpc" ) |
168 | |
169 | InP->NDR = NDR_record; |
170 | |
171 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
172 | if (mig_strncpy_zerofill != NULL) { |
173 | InP->executionPathCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->executionPath, src: executionPath, len: 1024); |
174 | } else { |
175 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
176 | InP->executionPathCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->executionPath, src: executionPath, len: 1024); |
177 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
178 | } |
179 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
180 | InP->executionPathOffset = 0; |
181 | |
182 | msgh_size_delta = _WALIGN_(InP->executionPathCnt); |
183 | msgh_size = (mach_msg_size_t)(sizeof(Request) - 1024) + msgh_size_delta; |
184 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024); |
185 | |
186 | InP->uid = uid; |
187 | |
188 | InP->gid = gid; |
189 | |
190 | InP = &Mess->In; |
191 | InP->Head.msgh_reply_port = MACH_PORT_NULL; |
192 | InP->Head.msgh_bits = |
193 | MACH_MSGH_BITS(19, 0); |
194 | /* msgh_size passed as argument */ |
195 | InP->Head.msgh_request_port = server; |
196 | InP->Head.msgh_id = 6000; |
197 | InP->Head.msgh_reserved = 0; |
198 | |
199 | __BeforeSendSimple(6000, "UNDExecute_rpc" ) |
200 | #if __MigKernelSpecificCode |
201 | msg_result = mach_msg_send_from_kernel(msg: &InP->Head, send_size: msgh_size); |
202 | #else |
203 | msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); |
204 | #endif /* __MigKernelSpecificCode */ |
205 | __AfterSendSimple(6000, "UNDExecute_rpc" ) |
206 | { mig_user_deallocate(data: (char *) Mess, size: sizeof(*Mess)); return msg_result; } |
207 | } |
208 | |
209 | /* SimpleRoutine UNDDisplayNoticeFromBundle_rpc */ |
210 | mig_external kern_return_t UNDDisplayNoticeFromBundle_rpc |
211 | ( |
212 | UNDServerRef server, |
213 | mach_port_t reply, |
214 | UNDPath bundlePath, |
215 | UNDPath fileName, |
216 | UNDPath fileExtension, |
217 | UNDKey messageKey |
218 | ) |
219 | { |
220 | |
221 | #ifdef __MigPackStructs |
222 | #pragma pack(push, 4) |
223 | #endif |
224 | typedef struct { |
225 | mach_msg_header_t Head; |
226 | /* start of the kernel processed data */ |
227 | mach_msg_body_t msgh_body; |
228 | mach_msg_port_descriptor_t reply; |
229 | /* end of the kernel processed data */ |
230 | NDR_record_t NDR; |
231 | mach_msg_type_number_t bundlePathOffset; /* MiG doesn't use it */ |
232 | mach_msg_type_number_t bundlePathCnt; |
233 | char bundlePath[1024]; |
234 | mach_msg_type_number_t fileNameOffset; /* MiG doesn't use it */ |
235 | mach_msg_type_number_t fileNameCnt; |
236 | char fileName[1024]; |
237 | mach_msg_type_number_t fileExtensionOffset; /* MiG doesn't use it */ |
238 | mach_msg_type_number_t fileExtensionCnt; |
239 | char fileExtension[1024]; |
240 | mach_msg_type_number_t messageKeyOffset; /* MiG doesn't use it */ |
241 | mach_msg_type_number_t messageKeyCnt; |
242 | char messageKey[128]; |
243 | } Request __attribute__((unused)); |
244 | #ifdef __MigPackStructs |
245 | #pragma pack(pop) |
246 | #endif |
247 | /* |
248 | * typedef struct { |
249 | * mach_msg_header_t Head; |
250 | * NDR_record_t NDR; |
251 | * kern_return_t RetCode; |
252 | * } mig_reply_error_t; |
253 | */ |
254 | |
255 | union UNDDisplayNoticeFromBundle_rpcMessU { |
256 | Request In; |
257 | } *Mess = (union UNDDisplayNoticeFromBundle_rpcMessU *) mig_user_allocate(size: sizeof(*Mess)); |
258 | |
259 | Request *InP = &Mess->In; |
260 | |
261 | mach_msg_return_t msg_result; |
262 | unsigned int msgh_size; |
263 | unsigned int msgh_size_delta; |
264 | |
265 | |
266 | #ifdef __MIG_check__Reply__UNDDisplayNoticeFromBundle_rpc_t__defined |
267 | kern_return_t check_result; |
268 | #endif /* __MIG_check__Reply__UNDDisplayNoticeFromBundle_rpc_t__defined */ |
269 | |
270 | __DeclareSendSimple(6001, "UNDDisplayNoticeFromBundle_rpc" ) |
271 | |
272 | #if UseStaticTemplates |
273 | const static mach_msg_port_descriptor_t replyTemplate = { |
274 | /* name = */ MACH_PORT_NULL, |
275 | /* pad1 = */ 0, |
276 | /* pad2 = */ 0, |
277 | /* disp = */ 19, |
278 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
279 | }; |
280 | #endif /* UseStaticTemplates */ |
281 | |
282 | InP->msgh_body.msgh_descriptor_count = 1; |
283 | #if UseStaticTemplates |
284 | InP->reply = replyTemplate; |
285 | InP->reply.name = reply; |
286 | #else /* UseStaticTemplates */ |
287 | InP->reply.name = reply; |
288 | InP->reply.disposition = 19; |
289 | InP->reply.type = MACH_MSG_PORT_DESCRIPTOR; |
290 | #endif /* UseStaticTemplates */ |
291 | |
292 | InP->NDR = NDR_record; |
293 | |
294 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
295 | if (mig_strncpy_zerofill != NULL) { |
296 | InP->bundlePathCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->bundlePath, src: bundlePath, len: 1024); |
297 | } else { |
298 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
299 | InP->bundlePathCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->bundlePath, src: bundlePath, len: 1024); |
300 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
301 | } |
302 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
303 | InP->bundlePathOffset = 0; |
304 | |
305 | msgh_size_delta = _WALIGN_(InP->bundlePathCnt); |
306 | msgh_size = (mach_msg_size_t)(sizeof(Request) - 3200) + msgh_size_delta; |
307 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024); |
308 | |
309 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
310 | if (mig_strncpy_zerofill != NULL) { |
311 | InP->fileNameCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->fileName, src: fileName, len: 1024); |
312 | } else { |
313 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
314 | InP->fileNameCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->fileName, src: fileName, len: 1024); |
315 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
316 | } |
317 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
318 | InP->fileNameOffset = 0; |
319 | |
320 | msgh_size_delta = _WALIGN_(InP->fileNameCnt); |
321 | msgh_size += msgh_size_delta; |
322 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024); |
323 | |
324 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
325 | if (mig_strncpy_zerofill != NULL) { |
326 | InP->fileExtensionCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->fileExtension, src: fileExtension, len: 1024); |
327 | } else { |
328 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
329 | InP->fileExtensionCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->fileExtension, src: fileExtension, len: 1024); |
330 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
331 | } |
332 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
333 | InP->fileExtensionOffset = 0; |
334 | |
335 | msgh_size_delta = _WALIGN_(InP->fileExtensionCnt); |
336 | msgh_size += msgh_size_delta; |
337 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024); |
338 | |
339 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
340 | if (mig_strncpy_zerofill != NULL) { |
341 | InP->messageKeyCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->messageKey, src: messageKey, len: 128); |
342 | } else { |
343 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
344 | InP->messageKeyCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->messageKey, src: messageKey, len: 128); |
345 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
346 | } |
347 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
348 | InP->messageKeyOffset = 0; |
349 | |
350 | msgh_size += _WALIGN_(InP->messageKeyCnt); |
351 | InP = &Mess->In; |
352 | InP->Head.msgh_reply_port = MACH_PORT_NULL; |
353 | InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| |
354 | MACH_MSGH_BITS(19, 0); |
355 | /* msgh_size passed as argument */ |
356 | InP->Head.msgh_request_port = server; |
357 | InP->Head.msgh_id = 6001; |
358 | InP->Head.msgh_reserved = 0; |
359 | |
360 | __BeforeSendSimple(6001, "UNDDisplayNoticeFromBundle_rpc" ) |
361 | #if __MigKernelSpecificCode |
362 | msg_result = mach_msg_send_from_kernel(msg: &InP->Head, send_size: msgh_size); |
363 | #else |
364 | msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); |
365 | #endif /* __MigKernelSpecificCode */ |
366 | __AfterSendSimple(6001, "UNDDisplayNoticeFromBundle_rpc" ) |
367 | { mig_user_deallocate(data: (char *) Mess, size: sizeof(*Mess)); return msg_result; } |
368 | } |
369 | |
370 | /* SimpleRoutine UNDDisplayAlertFromBundle_rpc */ |
371 | mig_external kern_return_t UNDDisplayAlertFromBundle_rpc |
372 | ( |
373 | UNDServerRef server, |
374 | mach_port_t reply, |
375 | UNDPath bundlePath, |
376 | UNDKey fileName, |
377 | UNDKey fileExtension, |
378 | UNDKey messageKey |
379 | ) |
380 | { |
381 | |
382 | #ifdef __MigPackStructs |
383 | #pragma pack(push, 4) |
384 | #endif |
385 | typedef struct { |
386 | mach_msg_header_t Head; |
387 | /* start of the kernel processed data */ |
388 | mach_msg_body_t msgh_body; |
389 | mach_msg_port_descriptor_t reply; |
390 | /* end of the kernel processed data */ |
391 | NDR_record_t NDR; |
392 | mach_msg_type_number_t bundlePathOffset; /* MiG doesn't use it */ |
393 | mach_msg_type_number_t bundlePathCnt; |
394 | char bundlePath[1024]; |
395 | mach_msg_type_number_t fileNameOffset; /* MiG doesn't use it */ |
396 | mach_msg_type_number_t fileNameCnt; |
397 | char fileName[128]; |
398 | mach_msg_type_number_t fileExtensionOffset; /* MiG doesn't use it */ |
399 | mach_msg_type_number_t fileExtensionCnt; |
400 | char fileExtension[128]; |
401 | mach_msg_type_number_t messageKeyOffset; /* MiG doesn't use it */ |
402 | mach_msg_type_number_t messageKeyCnt; |
403 | char messageKey[128]; |
404 | } Request __attribute__((unused)); |
405 | #ifdef __MigPackStructs |
406 | #pragma pack(pop) |
407 | #endif |
408 | /* |
409 | * typedef struct { |
410 | * mach_msg_header_t Head; |
411 | * NDR_record_t NDR; |
412 | * kern_return_t RetCode; |
413 | * } mig_reply_error_t; |
414 | */ |
415 | |
416 | union UNDDisplayAlertFromBundle_rpcMessU { |
417 | Request In; |
418 | } *Mess = (union UNDDisplayAlertFromBundle_rpcMessU *) mig_user_allocate(size: sizeof(*Mess)); |
419 | |
420 | Request *InP = &Mess->In; |
421 | |
422 | mach_msg_return_t msg_result; |
423 | unsigned int msgh_size; |
424 | unsigned int msgh_size_delta; |
425 | |
426 | |
427 | #ifdef __MIG_check__Reply__UNDDisplayAlertFromBundle_rpc_t__defined |
428 | kern_return_t check_result; |
429 | #endif /* __MIG_check__Reply__UNDDisplayAlertFromBundle_rpc_t__defined */ |
430 | |
431 | __DeclareSendSimple(6002, "UNDDisplayAlertFromBundle_rpc" ) |
432 | |
433 | #if UseStaticTemplates |
434 | const static mach_msg_port_descriptor_t replyTemplate = { |
435 | /* name = */ MACH_PORT_NULL, |
436 | /* pad1 = */ 0, |
437 | /* pad2 = */ 0, |
438 | /* disp = */ 19, |
439 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
440 | }; |
441 | #endif /* UseStaticTemplates */ |
442 | |
443 | InP->msgh_body.msgh_descriptor_count = 1; |
444 | #if UseStaticTemplates |
445 | InP->reply = replyTemplate; |
446 | InP->reply.name = reply; |
447 | #else /* UseStaticTemplates */ |
448 | InP->reply.name = reply; |
449 | InP->reply.disposition = 19; |
450 | InP->reply.type = MACH_MSG_PORT_DESCRIPTOR; |
451 | #endif /* UseStaticTemplates */ |
452 | |
453 | InP->NDR = NDR_record; |
454 | |
455 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
456 | if (mig_strncpy_zerofill != NULL) { |
457 | InP->bundlePathCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->bundlePath, src: bundlePath, len: 1024); |
458 | } else { |
459 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
460 | InP->bundlePathCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->bundlePath, src: bundlePath, len: 1024); |
461 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
462 | } |
463 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
464 | InP->bundlePathOffset = 0; |
465 | |
466 | msgh_size_delta = _WALIGN_(InP->bundlePathCnt); |
467 | msgh_size = (mach_msg_size_t)(sizeof(Request) - 1408) + msgh_size_delta; |
468 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024); |
469 | |
470 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
471 | if (mig_strncpy_zerofill != NULL) { |
472 | InP->fileNameCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->fileName, src: fileName, len: 128); |
473 | } else { |
474 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
475 | InP->fileNameCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->fileName, src: fileName, len: 128); |
476 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
477 | } |
478 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
479 | InP->fileNameOffset = 0; |
480 | |
481 | msgh_size_delta = _WALIGN_(InP->fileNameCnt); |
482 | msgh_size += msgh_size_delta; |
483 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
484 | |
485 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
486 | if (mig_strncpy_zerofill != NULL) { |
487 | InP->fileExtensionCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->fileExtension, src: fileExtension, len: 128); |
488 | } else { |
489 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
490 | InP->fileExtensionCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->fileExtension, src: fileExtension, len: 128); |
491 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
492 | } |
493 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
494 | InP->fileExtensionOffset = 0; |
495 | |
496 | msgh_size_delta = _WALIGN_(InP->fileExtensionCnt); |
497 | msgh_size += msgh_size_delta; |
498 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
499 | |
500 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
501 | if (mig_strncpy_zerofill != NULL) { |
502 | InP->messageKeyCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->messageKey, src: messageKey, len: 128); |
503 | } else { |
504 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
505 | InP->messageKeyCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->messageKey, src: messageKey, len: 128); |
506 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
507 | } |
508 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
509 | InP->messageKeyOffset = 0; |
510 | |
511 | msgh_size += _WALIGN_(InP->messageKeyCnt); |
512 | InP = &Mess->In; |
513 | InP->Head.msgh_reply_port = MACH_PORT_NULL; |
514 | InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| |
515 | MACH_MSGH_BITS(19, 0); |
516 | /* msgh_size passed as argument */ |
517 | InP->Head.msgh_request_port = server; |
518 | InP->Head.msgh_id = 6002; |
519 | InP->Head.msgh_reserved = 0; |
520 | |
521 | __BeforeSendSimple(6002, "UNDDisplayAlertFromBundle_rpc" ) |
522 | #if __MigKernelSpecificCode |
523 | msg_result = mach_msg_send_from_kernel(msg: &InP->Head, send_size: msgh_size); |
524 | #else |
525 | msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); |
526 | #endif /* __MigKernelSpecificCode */ |
527 | __AfterSendSimple(6002, "UNDDisplayAlertFromBundle_rpc" ) |
528 | { mig_user_deallocate(data: (char *) Mess, size: sizeof(*Mess)); return msg_result; } |
529 | } |
530 | |
531 | /* SimpleRoutine UNDDisplayCustomFromBundle_rpc */ |
532 | mig_external kern_return_t UNDDisplayCustomFromBundle_rpc |
533 | ( |
534 | UNDServerRef server, |
535 | mach_port_t reply, |
536 | UNDPath bundlePath, |
537 | UNDKey fileName, |
538 | UNDKey fileExtension, |
539 | UNDKey messageKey, |
540 | UNDPath tokenKey |
541 | ) |
542 | { |
543 | |
544 | #ifdef __MigPackStructs |
545 | #pragma pack(push, 4) |
546 | #endif |
547 | typedef struct { |
548 | mach_msg_header_t Head; |
549 | /* start of the kernel processed data */ |
550 | mach_msg_body_t msgh_body; |
551 | mach_msg_port_descriptor_t reply; |
552 | /* end of the kernel processed data */ |
553 | NDR_record_t NDR; |
554 | mach_msg_type_number_t bundlePathOffset; /* MiG doesn't use it */ |
555 | mach_msg_type_number_t bundlePathCnt; |
556 | char bundlePath[1024]; |
557 | mach_msg_type_number_t fileNameOffset; /* MiG doesn't use it */ |
558 | mach_msg_type_number_t fileNameCnt; |
559 | char fileName[128]; |
560 | mach_msg_type_number_t fileExtensionOffset; /* MiG doesn't use it */ |
561 | mach_msg_type_number_t fileExtensionCnt; |
562 | char fileExtension[128]; |
563 | mach_msg_type_number_t messageKeyOffset; /* MiG doesn't use it */ |
564 | mach_msg_type_number_t messageKeyCnt; |
565 | char messageKey[128]; |
566 | mach_msg_type_number_t tokenKeyOffset; /* MiG doesn't use it */ |
567 | mach_msg_type_number_t tokenKeyCnt; |
568 | char tokenKey[1024]; |
569 | } Request __attribute__((unused)); |
570 | #ifdef __MigPackStructs |
571 | #pragma pack(pop) |
572 | #endif |
573 | /* |
574 | * typedef struct { |
575 | * mach_msg_header_t Head; |
576 | * NDR_record_t NDR; |
577 | * kern_return_t RetCode; |
578 | * } mig_reply_error_t; |
579 | */ |
580 | |
581 | union UNDDisplayCustomFromBundle_rpcMessU { |
582 | Request In; |
583 | } *Mess = (union UNDDisplayCustomFromBundle_rpcMessU *) mig_user_allocate(size: sizeof(*Mess)); |
584 | |
585 | Request *InP = &Mess->In; |
586 | |
587 | mach_msg_return_t msg_result; |
588 | unsigned int msgh_size; |
589 | unsigned int msgh_size_delta; |
590 | |
591 | |
592 | #ifdef __MIG_check__Reply__UNDDisplayCustomFromBundle_rpc_t__defined |
593 | kern_return_t check_result; |
594 | #endif /* __MIG_check__Reply__UNDDisplayCustomFromBundle_rpc_t__defined */ |
595 | |
596 | __DeclareSendSimple(6003, "UNDDisplayCustomFromBundle_rpc" ) |
597 | |
598 | #if UseStaticTemplates |
599 | const static mach_msg_port_descriptor_t replyTemplate = { |
600 | /* name = */ MACH_PORT_NULL, |
601 | /* pad1 = */ 0, |
602 | /* pad2 = */ 0, |
603 | /* disp = */ 19, |
604 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
605 | }; |
606 | #endif /* UseStaticTemplates */ |
607 | |
608 | InP->msgh_body.msgh_descriptor_count = 1; |
609 | #if UseStaticTemplates |
610 | InP->reply = replyTemplate; |
611 | InP->reply.name = reply; |
612 | #else /* UseStaticTemplates */ |
613 | InP->reply.name = reply; |
614 | InP->reply.disposition = 19; |
615 | InP->reply.type = MACH_MSG_PORT_DESCRIPTOR; |
616 | #endif /* UseStaticTemplates */ |
617 | |
618 | InP->NDR = NDR_record; |
619 | |
620 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
621 | if (mig_strncpy_zerofill != NULL) { |
622 | InP->bundlePathCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->bundlePath, src: bundlePath, len: 1024); |
623 | } else { |
624 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
625 | InP->bundlePathCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->bundlePath, src: bundlePath, len: 1024); |
626 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
627 | } |
628 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
629 | InP->bundlePathOffset = 0; |
630 | |
631 | msgh_size_delta = _WALIGN_(InP->bundlePathCnt); |
632 | msgh_size = (mach_msg_size_t)(sizeof(Request) - 2432) + msgh_size_delta; |
633 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024); |
634 | |
635 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
636 | if (mig_strncpy_zerofill != NULL) { |
637 | InP->fileNameCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->fileName, src: fileName, len: 128); |
638 | } else { |
639 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
640 | InP->fileNameCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->fileName, src: fileName, len: 128); |
641 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
642 | } |
643 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
644 | InP->fileNameOffset = 0; |
645 | |
646 | msgh_size_delta = _WALIGN_(InP->fileNameCnt); |
647 | msgh_size += msgh_size_delta; |
648 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
649 | |
650 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
651 | if (mig_strncpy_zerofill != NULL) { |
652 | InP->fileExtensionCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->fileExtension, src: fileExtension, len: 128); |
653 | } else { |
654 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
655 | InP->fileExtensionCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->fileExtension, src: fileExtension, len: 128); |
656 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
657 | } |
658 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
659 | InP->fileExtensionOffset = 0; |
660 | |
661 | msgh_size_delta = _WALIGN_(InP->fileExtensionCnt); |
662 | msgh_size += msgh_size_delta; |
663 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
664 | |
665 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
666 | if (mig_strncpy_zerofill != NULL) { |
667 | InP->messageKeyCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->messageKey, src: messageKey, len: 128); |
668 | } else { |
669 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
670 | InP->messageKeyCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->messageKey, src: messageKey, len: 128); |
671 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
672 | } |
673 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
674 | InP->messageKeyOffset = 0; |
675 | |
676 | msgh_size_delta = _WALIGN_(InP->messageKeyCnt); |
677 | msgh_size += msgh_size_delta; |
678 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
679 | |
680 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
681 | if (mig_strncpy_zerofill != NULL) { |
682 | InP->tokenKeyCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->tokenKey, src: tokenKey, len: 1024); |
683 | } else { |
684 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
685 | InP->tokenKeyCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->tokenKey, src: tokenKey, len: 1024); |
686 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
687 | } |
688 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
689 | InP->tokenKeyOffset = 0; |
690 | |
691 | msgh_size += _WALIGN_(InP->tokenKeyCnt); |
692 | InP = &Mess->In; |
693 | InP->Head.msgh_reply_port = MACH_PORT_NULL; |
694 | InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| |
695 | MACH_MSGH_BITS(19, 0); |
696 | /* msgh_size passed as argument */ |
697 | InP->Head.msgh_request_port = server; |
698 | InP->Head.msgh_id = 6003; |
699 | InP->Head.msgh_reserved = 0; |
700 | |
701 | __BeforeSendSimple(6003, "UNDDisplayCustomFromBundle_rpc" ) |
702 | #if __MigKernelSpecificCode |
703 | msg_result = mach_msg_send_from_kernel(msg: &InP->Head, send_size: msgh_size); |
704 | #else |
705 | msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); |
706 | #endif /* __MigKernelSpecificCode */ |
707 | __AfterSendSimple(6003, "UNDDisplayCustomFromBundle_rpc" ) |
708 | { mig_user_deallocate(data: (char *) Mess, size: sizeof(*Mess)); return msg_result; } |
709 | } |
710 | |
711 | /* SimpleRoutine UNDCancelNotification_rpc */ |
712 | mig_external kern_return_t UNDCancelNotification_rpc |
713 | ( |
714 | UNDServerRef server, |
715 | int userLandNotificationKey |
716 | ) |
717 | { |
718 | |
719 | #ifdef __MigPackStructs |
720 | #pragma pack(push, 4) |
721 | #endif |
722 | typedef struct { |
723 | mach_msg_header_t Head; |
724 | NDR_record_t NDR; |
725 | int userLandNotificationKey; |
726 | } Request __attribute__((unused)); |
727 | #ifdef __MigPackStructs |
728 | #pragma pack(pop) |
729 | #endif |
730 | /* |
731 | * typedef struct { |
732 | * mach_msg_header_t Head; |
733 | * NDR_record_t NDR; |
734 | * kern_return_t RetCode; |
735 | * } mig_reply_error_t; |
736 | */ |
737 | |
738 | union { |
739 | Request In; |
740 | } Mess; |
741 | |
742 | Request *InP = &Mess.In; |
743 | |
744 | mach_msg_return_t msg_result; |
745 | |
746 | #ifdef __MIG_check__Reply__UNDCancelNotification_rpc_t__defined |
747 | kern_return_t check_result; |
748 | #endif /* __MIG_check__Reply__UNDCancelNotification_rpc_t__defined */ |
749 | |
750 | __DeclareSendSimple(6005, "UNDCancelNotification_rpc" ) |
751 | |
752 | InP->NDR = NDR_record; |
753 | |
754 | InP->userLandNotificationKey = userLandNotificationKey; |
755 | |
756 | InP->Head.msgh_reply_port = MACH_PORT_NULL; |
757 | InP->Head.msgh_bits = |
758 | MACH_MSGH_BITS(19, 0); |
759 | /* msgh_size passed as argument */ |
760 | InP->Head.msgh_request_port = server; |
761 | InP->Head.msgh_id = 6005; |
762 | InP->Head.msgh_reserved = 0; |
763 | |
764 | __BeforeSendSimple(6005, "UNDCancelNotification_rpc" ) |
765 | #if __MigKernelSpecificCode |
766 | msg_result = mach_msg_send_from_kernel(msg: &InP->Head, send_size: (mach_msg_size_t)sizeof(Request)); |
767 | #else |
768 | msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); |
769 | #endif /* __MigKernelSpecificCode */ |
770 | __AfterSendSimple(6005, "UNDCancelNotification_rpc" ) |
771 | return msg_result; |
772 | } |
773 | |
774 | /* SimpleRoutine UNDDisplayNoticeSimple_rpc */ |
775 | mig_external kern_return_t UNDDisplayNoticeSimple_rpc |
776 | ( |
777 | UNDServerRef server, |
778 | int rpctimeout, |
779 | unsigned flags, |
780 | UNDLabel iconPath, |
781 | UNDLabel soundPath, |
782 | UNDLabel localizationPath, |
783 | UNDLabel , |
784 | UNDMessage message, |
785 | UNDLabel defaultButtonTitle |
786 | ) |
787 | { |
788 | |
789 | #ifdef __MigPackStructs |
790 | #pragma pack(push, 4) |
791 | #endif |
792 | typedef struct { |
793 | mach_msg_header_t Head; |
794 | NDR_record_t NDR; |
795 | int rpctimeout; |
796 | unsigned flags; |
797 | mach_msg_type_number_t iconPathOffset; /* MiG doesn't use it */ |
798 | mach_msg_type_number_t iconPathCnt; |
799 | char iconPath[128]; |
800 | mach_msg_type_number_t soundPathOffset; /* MiG doesn't use it */ |
801 | mach_msg_type_number_t soundPathCnt; |
802 | char soundPath[128]; |
803 | mach_msg_type_number_t localizationPathOffset; /* MiG doesn't use it */ |
804 | mach_msg_type_number_t localizationPathCnt; |
805 | char localizationPath[128]; |
806 | mach_msg_type_number_t ; /* MiG doesn't use it */ |
807 | mach_msg_type_number_t ; |
808 | char [128]; |
809 | mach_msg_type_number_t messageOffset; /* MiG doesn't use it */ |
810 | mach_msg_type_number_t messageCnt; |
811 | char message[1024]; |
812 | mach_msg_type_number_t defaultButtonTitleOffset; /* MiG doesn't use it */ |
813 | mach_msg_type_number_t defaultButtonTitleCnt; |
814 | char defaultButtonTitle[128]; |
815 | } Request __attribute__((unused)); |
816 | #ifdef __MigPackStructs |
817 | #pragma pack(pop) |
818 | #endif |
819 | /* |
820 | * typedef struct { |
821 | * mach_msg_header_t Head; |
822 | * NDR_record_t NDR; |
823 | * kern_return_t RetCode; |
824 | * } mig_reply_error_t; |
825 | */ |
826 | |
827 | union UNDDisplayNoticeSimple_rpcMessU { |
828 | Request In; |
829 | } *Mess = (union UNDDisplayNoticeSimple_rpcMessU *) mig_user_allocate(size: sizeof(*Mess)); |
830 | |
831 | Request *InP = &Mess->In; |
832 | |
833 | mach_msg_return_t msg_result; |
834 | unsigned int msgh_size; |
835 | unsigned int msgh_size_delta; |
836 | |
837 | |
838 | #ifdef __MIG_check__Reply__UNDDisplayNoticeSimple_rpc_t__defined |
839 | kern_return_t check_result; |
840 | #endif /* __MIG_check__Reply__UNDDisplayNoticeSimple_rpc_t__defined */ |
841 | |
842 | __DeclareSendSimple(6006, "UNDDisplayNoticeSimple_rpc" ) |
843 | |
844 | InP->NDR = NDR_record; |
845 | |
846 | InP->rpctimeout = rpctimeout; |
847 | |
848 | InP->flags = flags; |
849 | |
850 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
851 | if (mig_strncpy_zerofill != NULL) { |
852 | InP->iconPathCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->iconPath, src: iconPath, len: 128); |
853 | } else { |
854 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
855 | InP->iconPathCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->iconPath, src: iconPath, len: 128); |
856 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
857 | } |
858 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
859 | InP->iconPathOffset = 0; |
860 | |
861 | msgh_size_delta = _WALIGN_(InP->iconPathCnt); |
862 | msgh_size = (mach_msg_size_t)(sizeof(Request) - 1664) + msgh_size_delta; |
863 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
864 | |
865 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
866 | if (mig_strncpy_zerofill != NULL) { |
867 | InP->soundPathCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->soundPath, src: soundPath, len: 128); |
868 | } else { |
869 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
870 | InP->soundPathCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->soundPath, src: soundPath, len: 128); |
871 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
872 | } |
873 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
874 | InP->soundPathOffset = 0; |
875 | |
876 | msgh_size_delta = _WALIGN_(InP->soundPathCnt); |
877 | msgh_size += msgh_size_delta; |
878 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
879 | |
880 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
881 | if (mig_strncpy_zerofill != NULL) { |
882 | InP->localizationPathCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->localizationPath, src: localizationPath, len: 128); |
883 | } else { |
884 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
885 | InP->localizationPathCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->localizationPath, src: localizationPath, len: 128); |
886 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
887 | } |
888 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
889 | InP->localizationPathOffset = 0; |
890 | |
891 | msgh_size_delta = _WALIGN_(InP->localizationPathCnt); |
892 | msgh_size += msgh_size_delta; |
893 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
894 | |
895 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
896 | if (mig_strncpy_zerofill != NULL) { |
897 | InP->headerCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->header, src: header, len: 128); |
898 | } else { |
899 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
900 | InP->headerCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->header, src: header, len: 128); |
901 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
902 | } |
903 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
904 | InP->headerOffset = 0; |
905 | |
906 | msgh_size_delta = _WALIGN_(InP->headerCnt); |
907 | msgh_size += msgh_size_delta; |
908 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
909 | |
910 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
911 | if (mig_strncpy_zerofill != NULL) { |
912 | InP->messageCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->message, src: message, len: 1024); |
913 | } else { |
914 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
915 | InP->messageCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->message, src: message, len: 1024); |
916 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
917 | } |
918 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
919 | InP->messageOffset = 0; |
920 | |
921 | msgh_size_delta = _WALIGN_(InP->messageCnt); |
922 | msgh_size += msgh_size_delta; |
923 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024); |
924 | |
925 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
926 | if (mig_strncpy_zerofill != NULL) { |
927 | InP->defaultButtonTitleCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->defaultButtonTitle, src: defaultButtonTitle, len: 128); |
928 | } else { |
929 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
930 | InP->defaultButtonTitleCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->defaultButtonTitle, src: defaultButtonTitle, len: 128); |
931 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
932 | } |
933 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
934 | InP->defaultButtonTitleOffset = 0; |
935 | |
936 | msgh_size += _WALIGN_(InP->defaultButtonTitleCnt); |
937 | InP = &Mess->In; |
938 | InP->Head.msgh_reply_port = MACH_PORT_NULL; |
939 | InP->Head.msgh_bits = |
940 | MACH_MSGH_BITS(19, 0); |
941 | /* msgh_size passed as argument */ |
942 | InP->Head.msgh_request_port = server; |
943 | InP->Head.msgh_id = 6006; |
944 | InP->Head.msgh_reserved = 0; |
945 | |
946 | __BeforeSendSimple(6006, "UNDDisplayNoticeSimple_rpc" ) |
947 | #if __MigKernelSpecificCode |
948 | msg_result = mach_msg_send_from_kernel(msg: &InP->Head, send_size: msgh_size); |
949 | #else |
950 | msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); |
951 | #endif /* __MigKernelSpecificCode */ |
952 | __AfterSendSimple(6006, "UNDDisplayNoticeSimple_rpc" ) |
953 | { mig_user_deallocate(data: (char *) Mess, size: sizeof(*Mess)); return msg_result; } |
954 | } |
955 | |
956 | #if ( __MigTypeCheck ) |
957 | #if __MIG_check__Reply__UNDRequest_subsystem__ |
958 | #if !defined(__MIG_check__Reply__UNDDisplayAlertSimple_rpc_t__defined) |
959 | #define __MIG_check__Reply__UNDDisplayAlertSimple_rpc_t__defined |
960 | |
961 | mig_internal kern_return_t __MIG_check__Reply__UNDDisplayAlertSimple_rpc_t(__Reply__UNDDisplayAlertSimple_rpc_t *Out0P) |
962 | { |
963 | |
964 | typedef __Reply__UNDDisplayAlertSimple_rpc_t __Reply __attribute__((unused)); |
965 | #if __MigTypeCheck |
966 | unsigned int msgh_size; |
967 | #endif /* __MigTypeCheck */ |
968 | if (Out0P->Head.msgh_id != 6107) { |
969 | if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE) |
970 | { return MIG_SERVER_DIED; } |
971 | else |
972 | { return MIG_REPLY_MISMATCH; } |
973 | } |
974 | |
975 | #if __MigTypeCheck |
976 | msgh_size = Out0P->Head.msgh_size; |
977 | |
978 | if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
979 | ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) && |
980 | (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) || |
981 | Out0P->RetCode == KERN_SUCCESS))) |
982 | { return MIG_TYPE_ERROR ; } |
983 | #endif /* __MigTypeCheck */ |
984 | |
985 | #if __MigTypeCheck |
986 | if (Out0P->Head.msgh_request_port != MACH_PORT_NULL) { |
987 | return MIG_TYPE_ERROR; |
988 | } |
989 | #endif /* __MigTypeCheck */ |
990 | if (Out0P->RetCode != KERN_SUCCESS) { |
991 | return ((mig_reply_error_t *)Out0P)->RetCode; |
992 | } |
993 | |
994 | return MACH_MSG_SUCCESS; |
995 | } |
996 | #endif /* !defined(__MIG_check__Reply__UNDDisplayAlertSimple_rpc_t__defined) */ |
997 | #endif /* __MIG_check__Reply__UNDRequest_subsystem__ */ |
998 | #endif /* ( __MigTypeCheck ) */ |
999 | |
1000 | |
1001 | /* Routine UNDDisplayAlertSimple_rpc */ |
1002 | mig_external kern_return_t UNDDisplayAlertSimple_rpc |
1003 | ( |
1004 | UNDServerRef server, |
1005 | int rpctimeout, |
1006 | unsigned flags, |
1007 | UNDLabel iconPath, |
1008 | UNDLabel soundPath, |
1009 | UNDLabel localizationPath, |
1010 | UNDLabel , |
1011 | UNDMessage message, |
1012 | UNDLabel defaultButtonTitle, |
1013 | UNDLabel alternateButtonTitle, |
1014 | UNDLabel otherButtonTitle, |
1015 | unsigned *response |
1016 | ) |
1017 | { |
1018 | |
1019 | #ifdef __MigPackStructs |
1020 | #pragma pack(push, 4) |
1021 | #endif |
1022 | typedef struct { |
1023 | mach_msg_header_t Head; |
1024 | NDR_record_t NDR; |
1025 | int rpctimeout; |
1026 | unsigned flags; |
1027 | mach_msg_type_number_t iconPathOffset; /* MiG doesn't use it */ |
1028 | mach_msg_type_number_t iconPathCnt; |
1029 | char iconPath[128]; |
1030 | mach_msg_type_number_t soundPathOffset; /* MiG doesn't use it */ |
1031 | mach_msg_type_number_t soundPathCnt; |
1032 | char soundPath[128]; |
1033 | mach_msg_type_number_t localizationPathOffset; /* MiG doesn't use it */ |
1034 | mach_msg_type_number_t localizationPathCnt; |
1035 | char localizationPath[128]; |
1036 | mach_msg_type_number_t ; /* MiG doesn't use it */ |
1037 | mach_msg_type_number_t ; |
1038 | char [128]; |
1039 | mach_msg_type_number_t messageOffset; /* MiG doesn't use it */ |
1040 | mach_msg_type_number_t messageCnt; |
1041 | char message[1024]; |
1042 | mach_msg_type_number_t defaultButtonTitleOffset; /* MiG doesn't use it */ |
1043 | mach_msg_type_number_t defaultButtonTitleCnt; |
1044 | char defaultButtonTitle[128]; |
1045 | mach_msg_type_number_t alternateButtonTitleOffset; /* MiG doesn't use it */ |
1046 | mach_msg_type_number_t alternateButtonTitleCnt; |
1047 | char alternateButtonTitle[128]; |
1048 | mach_msg_type_number_t otherButtonTitleOffset; /* MiG doesn't use it */ |
1049 | mach_msg_type_number_t otherButtonTitleCnt; |
1050 | char otherButtonTitle[128]; |
1051 | } Request __attribute__((unused)); |
1052 | #ifdef __MigPackStructs |
1053 | #pragma pack(pop) |
1054 | #endif |
1055 | |
1056 | #ifdef __MigPackStructs |
1057 | #pragma pack(push, 4) |
1058 | #endif |
1059 | typedef struct { |
1060 | mach_msg_header_t Head; |
1061 | NDR_record_t NDR; |
1062 | kern_return_t RetCode; |
1063 | unsigned response; |
1064 | mach_msg_trailer_t trailer; |
1065 | } Reply __attribute__((unused)); |
1066 | #ifdef __MigPackStructs |
1067 | #pragma pack(pop) |
1068 | #endif |
1069 | |
1070 | #ifdef __MigPackStructs |
1071 | #pragma pack(push, 4) |
1072 | #endif |
1073 | typedef struct { |
1074 | mach_msg_header_t Head; |
1075 | NDR_record_t NDR; |
1076 | kern_return_t RetCode; |
1077 | unsigned response; |
1078 | } __Reply __attribute__((unused)); |
1079 | #ifdef __MigPackStructs |
1080 | #pragma pack(pop) |
1081 | #endif |
1082 | /* |
1083 | * typedef struct { |
1084 | * mach_msg_header_t Head; |
1085 | * NDR_record_t NDR; |
1086 | * kern_return_t RetCode; |
1087 | * } mig_reply_error_t; |
1088 | */ |
1089 | |
1090 | union UNDDisplayAlertSimple_rpcMessU { |
1091 | Request In; |
1092 | Reply Out; |
1093 | } *Mess = (union UNDDisplayAlertSimple_rpcMessU *) mig_user_allocate(size: sizeof(*Mess)); |
1094 | |
1095 | Request *InP = &Mess->In; |
1096 | Reply *Out0P = &Mess->Out; |
1097 | |
1098 | mach_msg_return_t msg_result; |
1099 | unsigned int msgh_size; |
1100 | unsigned int msgh_size_delta; |
1101 | |
1102 | |
1103 | #ifdef __MIG_check__Reply__UNDDisplayAlertSimple_rpc_t__defined |
1104 | kern_return_t check_result; |
1105 | #endif /* __MIG_check__Reply__UNDDisplayAlertSimple_rpc_t__defined */ |
1106 | |
1107 | __DeclareSendRpc(6007, "UNDDisplayAlertSimple_rpc" ) |
1108 | |
1109 | InP->NDR = NDR_record; |
1110 | |
1111 | InP->rpctimeout = rpctimeout; |
1112 | |
1113 | InP->flags = flags; |
1114 | |
1115 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1116 | if (mig_strncpy_zerofill != NULL) { |
1117 | InP->iconPathCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->iconPath, src: iconPath, len: 128); |
1118 | } else { |
1119 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1120 | InP->iconPathCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->iconPath, src: iconPath, len: 128); |
1121 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1122 | } |
1123 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1124 | InP->iconPathOffset = 0; |
1125 | |
1126 | msgh_size_delta = _WALIGN_(InP->iconPathCnt); |
1127 | msgh_size = (mach_msg_size_t)(sizeof(Request) - 1920) + msgh_size_delta; |
1128 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
1129 | |
1130 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1131 | if (mig_strncpy_zerofill != NULL) { |
1132 | InP->soundPathCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->soundPath, src: soundPath, len: 128); |
1133 | } else { |
1134 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1135 | InP->soundPathCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->soundPath, src: soundPath, len: 128); |
1136 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1137 | } |
1138 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1139 | InP->soundPathOffset = 0; |
1140 | |
1141 | msgh_size_delta = _WALIGN_(InP->soundPathCnt); |
1142 | msgh_size += msgh_size_delta; |
1143 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
1144 | |
1145 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1146 | if (mig_strncpy_zerofill != NULL) { |
1147 | InP->localizationPathCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->localizationPath, src: localizationPath, len: 128); |
1148 | } else { |
1149 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1150 | InP->localizationPathCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->localizationPath, src: localizationPath, len: 128); |
1151 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1152 | } |
1153 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1154 | InP->localizationPathOffset = 0; |
1155 | |
1156 | msgh_size_delta = _WALIGN_(InP->localizationPathCnt); |
1157 | msgh_size += msgh_size_delta; |
1158 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
1159 | |
1160 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1161 | if (mig_strncpy_zerofill != NULL) { |
1162 | InP->headerCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->header, src: header, len: 128); |
1163 | } else { |
1164 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1165 | InP->headerCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->header, src: header, len: 128); |
1166 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1167 | } |
1168 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1169 | InP->headerOffset = 0; |
1170 | |
1171 | msgh_size_delta = _WALIGN_(InP->headerCnt); |
1172 | msgh_size += msgh_size_delta; |
1173 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
1174 | |
1175 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1176 | if (mig_strncpy_zerofill != NULL) { |
1177 | InP->messageCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->message, src: message, len: 1024); |
1178 | } else { |
1179 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1180 | InP->messageCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->message, src: message, len: 1024); |
1181 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1182 | } |
1183 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1184 | InP->messageOffset = 0; |
1185 | |
1186 | msgh_size_delta = _WALIGN_(InP->messageCnt); |
1187 | msgh_size += msgh_size_delta; |
1188 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024); |
1189 | |
1190 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1191 | if (mig_strncpy_zerofill != NULL) { |
1192 | InP->defaultButtonTitleCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->defaultButtonTitle, src: defaultButtonTitle, len: 128); |
1193 | } else { |
1194 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1195 | InP->defaultButtonTitleCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->defaultButtonTitle, src: defaultButtonTitle, len: 128); |
1196 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1197 | } |
1198 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1199 | InP->defaultButtonTitleOffset = 0; |
1200 | |
1201 | msgh_size_delta = _WALIGN_(InP->defaultButtonTitleCnt); |
1202 | msgh_size += msgh_size_delta; |
1203 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
1204 | |
1205 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1206 | if (mig_strncpy_zerofill != NULL) { |
1207 | InP->alternateButtonTitleCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->alternateButtonTitle, src: alternateButtonTitle, len: 128); |
1208 | } else { |
1209 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1210 | InP->alternateButtonTitleCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->alternateButtonTitle, src: alternateButtonTitle, len: 128); |
1211 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1212 | } |
1213 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1214 | InP->alternateButtonTitleOffset = 0; |
1215 | |
1216 | msgh_size_delta = _WALIGN_(InP->alternateButtonTitleCnt); |
1217 | msgh_size += msgh_size_delta; |
1218 | InP = (Request *) ((pointer_t) InP + msgh_size_delta - 128); |
1219 | |
1220 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1221 | if (mig_strncpy_zerofill != NULL) { |
1222 | InP->otherButtonTitleCnt = (mach_msg_type_number_t) mig_strncpy_zerofill(dest: InP->otherButtonTitle, src: otherButtonTitle, len: 128); |
1223 | } else { |
1224 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1225 | InP->otherButtonTitleCnt = (mach_msg_type_number_t) mig_strncpy(dest: InP->otherButtonTitle, src: otherButtonTitle, len: 128); |
1226 | #ifdef USING_MIG_STRNCPY_ZEROFILL |
1227 | } |
1228 | #endif /* USING_MIG_STRNCPY_ZEROFILL */ |
1229 | InP->otherButtonTitleOffset = 0; |
1230 | |
1231 | msgh_size += _WALIGN_(InP->otherButtonTitleCnt); |
1232 | InP = &Mess->In; |
1233 | InP->Head.msgh_reply_port = mig_get_reply_port(); |
1234 | InP->Head.msgh_bits = |
1235 | MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE); |
1236 | /* msgh_size passed as argument */ |
1237 | InP->Head.msgh_request_port = server; |
1238 | InP->Head.msgh_id = 6007; |
1239 | InP->Head.msgh_reserved = 0; |
1240 | |
1241 | __BeforeSendRpc(6007, "UNDDisplayAlertSimple_rpc" ) |
1242 | #if (__MigKernelSpecificCode) || (_MIG_KERNELSPECIFIC_CODE_) |
1243 | msg_result = mach_msg_rpc_from_kernel(msg: &InP->Head, send_size: msgh_size, rcv_size: (mach_msg_size_t)sizeof(Reply)); |
1244 | #else |
1245 | msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, msgh_size, (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); |
1246 | #endif /* __MigKernelSpecificCode */ |
1247 | __AfterSendRpc(6007, "UNDDisplayAlertSimple_rpc" ) |
1248 | if (msg_result != MACH_MSG_SUCCESS) { |
1249 | __MachMsgErrorWithoutTimeout(msg_result); |
1250 | } |
1251 | if (msg_result != MACH_MSG_SUCCESS) { |
1252 | { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return msg_result; } |
1253 | } |
1254 | |
1255 | |
1256 | #if defined(__MIG_check__Reply__UNDDisplayAlertSimple_rpc_t__defined) |
1257 | check_result = __MIG_check__Reply__UNDDisplayAlertSimple_rpc_t(Out0P: (__Reply__UNDDisplayAlertSimple_rpc_t *)Out0P); |
1258 | if (check_result != MACH_MSG_SUCCESS) { |
1259 | #if __MigKernelSpecificCode |
1260 | mach_msg_destroy_from_kernel(msg: &Out0P->Head); |
1261 | #endif /* __MigKernelSpecificCode */ |
1262 | { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return check_result; } |
1263 | } |
1264 | #endif /* defined(__MIG_check__Reply__UNDDisplayAlertSimple_rpc_t__defined) */ |
1265 | |
1266 | *response = Out0P->response; |
1267 | |
1268 | { mig_user_deallocate(data: (char *) Mess, size: sizeof(*Mess)); return KERN_SUCCESS; } |
1269 | } |
1270 | |