1#ifndef _UNDRequest_user_
2#define _UNDRequest_user_
3
4/* Module UNDRequest */
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
26extern "C" {
27#endif
28 extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
29#ifdef __cplusplus
30}
31#endif
32#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
33#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
34#endif /* __has_include */
35
36/* END MIG_STRNCPY_ZEROFILL CODE */
37
38#if (__MigKernelSpecificCode) || (_MIG_KERNEL_SPECIFIC_CODE_)
39#include <kern/ipc_mig.h>
40#endif /* __MigKernelSpecificCode */
41
42#ifdef AUTOTEST
43#ifndef FUNCTION_PTR_T
44#define FUNCTION_PTR_T
45typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
46typedef struct {
47 char *name;
48 function_ptr_t function;
49} function_table_entry;
50typedef function_table_entry *function_table_t;
51#endif /* FUNCTION_PTR_T */
52#endif /* AUTOTEST */
53
54#ifndef UNDRequest_MSG_COUNT
55#define UNDRequest_MSG_COUNT 8
56#endif /* UNDRequest_MSG_COUNT */
57
58#include <mach/std_types.h>
59#include <mach/mig.h>
60#include <UserNotification/UNDTypes.h>
61
62#ifdef __BeforeMigUserHeader
63__BeforeMigUserHeader
64#endif /* __BeforeMigUserHeader */
65
66#include <sys/cdefs.h>
67__BEGIN_DECLS
68
69
70/* SimpleRoutine UNDExecute_rpc */
71#ifdef mig_external
72mig_external
73#else
74extern
75#endif /* mig_external */
76kern_return_t UNDExecute_rpc
77(
78 UNDServerRef server,
79 UNDPath executionPath,
80 int uid,
81 int gid
82);
83
84/* SimpleRoutine UNDDisplayNoticeFromBundle_rpc */
85#ifdef mig_external
86mig_external
87#else
88extern
89#endif /* mig_external */
90kern_return_t UNDDisplayNoticeFromBundle_rpc
91(
92 UNDServerRef server,
93 mach_port_t reply,
94 UNDPath bundlePath,
95 UNDPath fileName,
96 UNDPath fileExtension,
97 UNDKey messageKey
98);
99
100/* SimpleRoutine UNDDisplayAlertFromBundle_rpc */
101#ifdef mig_external
102mig_external
103#else
104extern
105#endif /* mig_external */
106kern_return_t UNDDisplayAlertFromBundle_rpc
107(
108 UNDServerRef server,
109 mach_port_t reply,
110 UNDPath bundlePath,
111 UNDKey fileName,
112 UNDKey fileExtension,
113 UNDKey messageKey
114);
115
116/* SimpleRoutine UNDDisplayCustomFromBundle_rpc */
117#ifdef mig_external
118mig_external
119#else
120extern
121#endif /* mig_external */
122kern_return_t UNDDisplayCustomFromBundle_rpc
123(
124 UNDServerRef server,
125 mach_port_t reply,
126 UNDPath bundlePath,
127 UNDKey fileName,
128 UNDKey fileExtension,
129 UNDKey messageKey,
130 UNDPath tokenKey
131);
132
133/* SimpleRoutine UNDCancelNotification_rpc */
134#ifdef mig_external
135mig_external
136#else
137extern
138#endif /* mig_external */
139kern_return_t UNDCancelNotification_rpc
140(
141 UNDServerRef server,
142 int userLandNotificationKey
143);
144
145/* SimpleRoutine UNDDisplayNoticeSimple_rpc */
146#ifdef mig_external
147mig_external
148#else
149extern
150#endif /* mig_external */
151kern_return_t UNDDisplayNoticeSimple_rpc
152(
153 UNDServerRef server,
154 int rpctimeout,
155 unsigned flags,
156 UNDLabel iconPath,
157 UNDLabel soundPath,
158 UNDLabel localizationPath,
159 UNDLabel header,
160 UNDMessage message,
161 UNDLabel defaultButtonTitle
162);
163
164/* Routine UNDDisplayAlertSimple_rpc */
165#ifdef mig_external
166mig_external
167#else
168extern
169#endif /* mig_external */
170kern_return_t UNDDisplayAlertSimple_rpc
171(
172 UNDServerRef server,
173 int rpctimeout,
174 unsigned flags,
175 UNDLabel iconPath,
176 UNDLabel soundPath,
177 UNDLabel localizationPath,
178 UNDLabel header,
179 UNDMessage message,
180 UNDLabel defaultButtonTitle,
181 UNDLabel alternateButtonTitle,
182 UNDLabel otherButtonTitle,
183 unsigned *response
184);
185
186__END_DECLS
187
188/********************** Caution **************************/
189/* The following data types should be used to calculate */
190/* maximum message sizes only. The actual message may be */
191/* smaller, and the position of the arguments within the */
192/* message layout may vary from what is presented here. */
193/* For example, if any of the arguments are variable- */
194/* sized, and less than the maximum is sent, the data */
195/* will be packed tight in the actual message to reduce */
196/* the presence of holes. */
197/********************** Caution **************************/
198
199/* typedefs for all requests */
200
201#ifndef __Request__UNDRequest_subsystem__defined
202#define __Request__UNDRequest_subsystem__defined
203
204#ifdef __MigPackStructs
205#pragma pack(4)
206#endif
207 typedef struct {
208 mach_msg_header_t Head;
209 NDR_record_t NDR;
210 mach_msg_type_number_t executionPathOffset; /* MiG doesn't use it */
211 mach_msg_type_number_t executionPathCnt;
212 char executionPath[1024];
213 int uid;
214 int gid;
215 } __Request__UNDExecute_rpc_t __attribute__((unused));
216#ifdef __MigPackStructs
217#pragma pack()
218#endif
219
220#ifdef __MigPackStructs
221#pragma pack(4)
222#endif
223 typedef struct {
224 mach_msg_header_t Head;
225 /* start of the kernel processed data */
226 mach_msg_body_t msgh_body;
227 mach_msg_port_descriptor_t reply;
228 /* end of the kernel processed data */
229 NDR_record_t NDR;
230 mach_msg_type_number_t bundlePathOffset; /* MiG doesn't use it */
231 mach_msg_type_number_t bundlePathCnt;
232 char bundlePath[1024];
233 mach_msg_type_number_t fileNameOffset; /* MiG doesn't use it */
234 mach_msg_type_number_t fileNameCnt;
235 char fileName[1024];
236 mach_msg_type_number_t fileExtensionOffset; /* MiG doesn't use it */
237 mach_msg_type_number_t fileExtensionCnt;
238 char fileExtension[1024];
239 mach_msg_type_number_t messageKeyOffset; /* MiG doesn't use it */
240 mach_msg_type_number_t messageKeyCnt;
241 char messageKey[128];
242 } __Request__UNDDisplayNoticeFromBundle_rpc_t __attribute__((unused));
243#ifdef __MigPackStructs
244#pragma pack()
245#endif
246
247#ifdef __MigPackStructs
248#pragma pack(4)
249#endif
250 typedef struct {
251 mach_msg_header_t Head;
252 /* start of the kernel processed data */
253 mach_msg_body_t msgh_body;
254 mach_msg_port_descriptor_t reply;
255 /* end of the kernel processed data */
256 NDR_record_t NDR;
257 mach_msg_type_number_t bundlePathOffset; /* MiG doesn't use it */
258 mach_msg_type_number_t bundlePathCnt;
259 char bundlePath[1024];
260 mach_msg_type_number_t fileNameOffset; /* MiG doesn't use it */
261 mach_msg_type_number_t fileNameCnt;
262 char fileName[128];
263 mach_msg_type_number_t fileExtensionOffset; /* MiG doesn't use it */
264 mach_msg_type_number_t fileExtensionCnt;
265 char fileExtension[128];
266 mach_msg_type_number_t messageKeyOffset; /* MiG doesn't use it */
267 mach_msg_type_number_t messageKeyCnt;
268 char messageKey[128];
269 } __Request__UNDDisplayAlertFromBundle_rpc_t __attribute__((unused));
270#ifdef __MigPackStructs
271#pragma pack()
272#endif
273
274#ifdef __MigPackStructs
275#pragma pack(4)
276#endif
277 typedef struct {
278 mach_msg_header_t Head;
279 /* start of the kernel processed data */
280 mach_msg_body_t msgh_body;
281 mach_msg_port_descriptor_t reply;
282 /* end of the kernel processed data */
283 NDR_record_t NDR;
284 mach_msg_type_number_t bundlePathOffset; /* MiG doesn't use it */
285 mach_msg_type_number_t bundlePathCnt;
286 char bundlePath[1024];
287 mach_msg_type_number_t fileNameOffset; /* MiG doesn't use it */
288 mach_msg_type_number_t fileNameCnt;
289 char fileName[128];
290 mach_msg_type_number_t fileExtensionOffset; /* MiG doesn't use it */
291 mach_msg_type_number_t fileExtensionCnt;
292 char fileExtension[128];
293 mach_msg_type_number_t messageKeyOffset; /* MiG doesn't use it */
294 mach_msg_type_number_t messageKeyCnt;
295 char messageKey[128];
296 mach_msg_type_number_t tokenKeyOffset; /* MiG doesn't use it */
297 mach_msg_type_number_t tokenKeyCnt;
298 char tokenKey[1024];
299 } __Request__UNDDisplayCustomFromBundle_rpc_t __attribute__((unused));
300#ifdef __MigPackStructs
301#pragma pack()
302#endif
303
304#ifdef __MigPackStructs
305#pragma pack(4)
306#endif
307 typedef struct {
308 mach_msg_header_t Head;
309 NDR_record_t NDR;
310 int userLandNotificationKey;
311 } __Request__UNDCancelNotification_rpc_t __attribute__((unused));
312#ifdef __MigPackStructs
313#pragma pack()
314#endif
315
316#ifdef __MigPackStructs
317#pragma pack(4)
318#endif
319 typedef struct {
320 mach_msg_header_t Head;
321 NDR_record_t NDR;
322 int rpctimeout;
323 unsigned flags;
324 mach_msg_type_number_t iconPathOffset; /* MiG doesn't use it */
325 mach_msg_type_number_t iconPathCnt;
326 char iconPath[128];
327 mach_msg_type_number_t soundPathOffset; /* MiG doesn't use it */
328 mach_msg_type_number_t soundPathCnt;
329 char soundPath[128];
330 mach_msg_type_number_t localizationPathOffset; /* MiG doesn't use it */
331 mach_msg_type_number_t localizationPathCnt;
332 char localizationPath[128];
333 mach_msg_type_number_t headerOffset; /* MiG doesn't use it */
334 mach_msg_type_number_t headerCnt;
335 char header[128];
336 mach_msg_type_number_t messageOffset; /* MiG doesn't use it */
337 mach_msg_type_number_t messageCnt;
338 char message[1024];
339 mach_msg_type_number_t defaultButtonTitleOffset; /* MiG doesn't use it */
340 mach_msg_type_number_t defaultButtonTitleCnt;
341 char defaultButtonTitle[128];
342 } __Request__UNDDisplayNoticeSimple_rpc_t __attribute__((unused));
343#ifdef __MigPackStructs
344#pragma pack()
345#endif
346
347#ifdef __MigPackStructs
348#pragma pack(4)
349#endif
350 typedef struct {
351 mach_msg_header_t Head;
352 NDR_record_t NDR;
353 int rpctimeout;
354 unsigned flags;
355 mach_msg_type_number_t iconPathOffset; /* MiG doesn't use it */
356 mach_msg_type_number_t iconPathCnt;
357 char iconPath[128];
358 mach_msg_type_number_t soundPathOffset; /* MiG doesn't use it */
359 mach_msg_type_number_t soundPathCnt;
360 char soundPath[128];
361 mach_msg_type_number_t localizationPathOffset; /* MiG doesn't use it */
362 mach_msg_type_number_t localizationPathCnt;
363 char localizationPath[128];
364 mach_msg_type_number_t headerOffset; /* MiG doesn't use it */
365 mach_msg_type_number_t headerCnt;
366 char header[128];
367 mach_msg_type_number_t messageOffset; /* MiG doesn't use it */
368 mach_msg_type_number_t messageCnt;
369 char message[1024];
370 mach_msg_type_number_t defaultButtonTitleOffset; /* MiG doesn't use it */
371 mach_msg_type_number_t defaultButtonTitleCnt;
372 char defaultButtonTitle[128];
373 mach_msg_type_number_t alternateButtonTitleOffset; /* MiG doesn't use it */
374 mach_msg_type_number_t alternateButtonTitleCnt;
375 char alternateButtonTitle[128];
376 mach_msg_type_number_t otherButtonTitleOffset; /* MiG doesn't use it */
377 mach_msg_type_number_t otherButtonTitleCnt;
378 char otherButtonTitle[128];
379 } __Request__UNDDisplayAlertSimple_rpc_t __attribute__((unused));
380#ifdef __MigPackStructs
381#pragma pack()
382#endif
383#endif /* !__Request__UNDRequest_subsystem__defined */
384
385/* union of all requests */
386
387#ifndef __RequestUnion__UNDRequest_subsystem__defined
388#define __RequestUnion__UNDRequest_subsystem__defined
389union __RequestUnion__UNDRequest_subsystem {
390 __Request__UNDExecute_rpc_t Request_UNDExecute_rpc;
391 __Request__UNDDisplayNoticeFromBundle_rpc_t Request_UNDDisplayNoticeFromBundle_rpc;
392 __Request__UNDDisplayAlertFromBundle_rpc_t Request_UNDDisplayAlertFromBundle_rpc;
393 __Request__UNDDisplayCustomFromBundle_rpc_t Request_UNDDisplayCustomFromBundle_rpc;
394 __Request__UNDCancelNotification_rpc_t Request_UNDCancelNotification_rpc;
395 __Request__UNDDisplayNoticeSimple_rpc_t Request_UNDDisplayNoticeSimple_rpc;
396 __Request__UNDDisplayAlertSimple_rpc_t Request_UNDDisplayAlertSimple_rpc;
397};
398#endif /* !__RequestUnion__UNDRequest_subsystem__defined */
399/* typedefs for all replies */
400
401#ifndef __Reply__UNDRequest_subsystem__defined
402#define __Reply__UNDRequest_subsystem__defined
403
404#ifdef __MigPackStructs
405#pragma pack(4)
406#endif
407 typedef struct {
408 mach_msg_header_t Head;
409 NDR_record_t NDR;
410 kern_return_t RetCode;
411 } __Reply__UNDExecute_rpc_t __attribute__((unused));
412#ifdef __MigPackStructs
413#pragma pack()
414#endif
415
416#ifdef __MigPackStructs
417#pragma pack(4)
418#endif
419 typedef struct {
420 mach_msg_header_t Head;
421 NDR_record_t NDR;
422 kern_return_t RetCode;
423 } __Reply__UNDDisplayNoticeFromBundle_rpc_t __attribute__((unused));
424#ifdef __MigPackStructs
425#pragma pack()
426#endif
427
428#ifdef __MigPackStructs
429#pragma pack(4)
430#endif
431 typedef struct {
432 mach_msg_header_t Head;
433 NDR_record_t NDR;
434 kern_return_t RetCode;
435 } __Reply__UNDDisplayAlertFromBundle_rpc_t __attribute__((unused));
436#ifdef __MigPackStructs
437#pragma pack()
438#endif
439
440#ifdef __MigPackStructs
441#pragma pack(4)
442#endif
443 typedef struct {
444 mach_msg_header_t Head;
445 NDR_record_t NDR;
446 kern_return_t RetCode;
447 } __Reply__UNDDisplayCustomFromBundle_rpc_t __attribute__((unused));
448#ifdef __MigPackStructs
449#pragma pack()
450#endif
451
452#ifdef __MigPackStructs
453#pragma pack(4)
454#endif
455 typedef struct {
456 mach_msg_header_t Head;
457 NDR_record_t NDR;
458 kern_return_t RetCode;
459 } __Reply__UNDCancelNotification_rpc_t __attribute__((unused));
460#ifdef __MigPackStructs
461#pragma pack()
462#endif
463
464#ifdef __MigPackStructs
465#pragma pack(4)
466#endif
467 typedef struct {
468 mach_msg_header_t Head;
469 NDR_record_t NDR;
470 kern_return_t RetCode;
471 } __Reply__UNDDisplayNoticeSimple_rpc_t __attribute__((unused));
472#ifdef __MigPackStructs
473#pragma pack()
474#endif
475
476#ifdef __MigPackStructs
477#pragma pack(4)
478#endif
479 typedef struct {
480 mach_msg_header_t Head;
481 NDR_record_t NDR;
482 kern_return_t RetCode;
483 unsigned response;
484 } __Reply__UNDDisplayAlertSimple_rpc_t __attribute__((unused));
485#ifdef __MigPackStructs
486#pragma pack()
487#endif
488#endif /* !__Reply__UNDRequest_subsystem__defined */
489
490/* union of all replies */
491
492#ifndef __ReplyUnion__UNDRequest_subsystem__defined
493#define __ReplyUnion__UNDRequest_subsystem__defined
494union __ReplyUnion__UNDRequest_subsystem {
495 __Reply__UNDExecute_rpc_t Reply_UNDExecute_rpc;
496 __Reply__UNDDisplayNoticeFromBundle_rpc_t Reply_UNDDisplayNoticeFromBundle_rpc;
497 __Reply__UNDDisplayAlertFromBundle_rpc_t Reply_UNDDisplayAlertFromBundle_rpc;
498 __Reply__UNDDisplayCustomFromBundle_rpc_t Reply_UNDDisplayCustomFromBundle_rpc;
499 __Reply__UNDCancelNotification_rpc_t Reply_UNDCancelNotification_rpc;
500 __Reply__UNDDisplayNoticeSimple_rpc_t Reply_UNDDisplayNoticeSimple_rpc;
501 __Reply__UNDDisplayAlertSimple_rpc_t Reply_UNDDisplayAlertSimple_rpc;
502};
503#endif /* !__RequestUnion__UNDRequest_subsystem__defined */
504
505#ifndef subsystem_to_name_map_UNDRequest
506#define subsystem_to_name_map_UNDRequest \
507 { "UNDExecute_rpc", 6000 },\
508 { "UNDDisplayNoticeFromBundle_rpc", 6001 },\
509 { "UNDDisplayAlertFromBundle_rpc", 6002 },\
510 { "UNDDisplayCustomFromBundle_rpc", 6003 },\
511 { "UNDCancelNotification_rpc", 6005 },\
512 { "UNDDisplayNoticeSimple_rpc", 6006 },\
513 { "UNDDisplayAlertSimple_rpc", 6007 }
514#endif
515
516#ifdef __AfterMigUserHeader
517__AfterMigUserHeader
518#endif /* __AfterMigUserHeader */
519
520#endif /* _UNDRequest_user_ */
521