]> git.saurik.com Git - apple/security.git/blob - cdsa/cdsa_utilities/mach_notify.h
Security-54.1.tar.gz
[apple/security.git] / cdsa / cdsa_utilities / mach_notify.h
1 /*
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18
19 #ifndef _notify_user_
20 #define _notify_user_
21
22 /* Module notify */
23
24 #include <string.h>
25 #include <mach/ndr.h>
26 #include <mach/boolean.h>
27 #include <mach/kern_return.h>
28 #include <mach/notify.h>
29 #include <mach/mach_types.h>
30 #include <mach/message.h>
31 #include <mach/mig_errors.h>
32 #include <mach/port.h>
33
34 #ifdef AUTOTEST
35 #ifndef FUNCTION_PTR_T
36 #define FUNCTION_PTR_T
37 typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
38 typedef struct {
39 char *name;
40 function_ptr_t function;
41 } function_table_entry;
42 typedef function_table_entry *function_table_t;
43 #endif /* FUNCTION_PTR_T */
44 #endif /* AUTOTEST */
45
46 #ifndef notify_MSG_COUNT
47 #define notify_MSG_COUNT 9
48 #endif /* notify_MSG_COUNT */
49
50 #include <mach/std_types.h>
51
52 #ifdef __BeforeMigUserHeader
53 __BeforeMigUserHeader
54 #endif /* __BeforeMigUserHeader */
55
56
57 /* SimpleRoutine mach_notify_port_deleted */
58 #ifdef mig_external
59 mig_external
60 #else
61 extern
62 #endif /* mig_external */
63 kern_return_t mach_notify_port_deleted
64 (
65 mach_port_t notify,
66 mach_port_name_t name
67 );
68
69 /* SimpleRoutine mach_notify_port_destroyed */
70 #ifdef mig_external
71 mig_external
72 #else
73 extern
74 #endif /* mig_external */
75 kern_return_t mach_notify_port_destroyed
76 (
77 mach_port_t notify,
78 mach_port_t rights,
79 mach_msg_type_name_t rightsPoly
80 );
81
82 /* SimpleRoutine mach_notify_no_senders */
83 #ifdef mig_external
84 mig_external
85 #else
86 extern
87 #endif /* mig_external */
88 kern_return_t mach_notify_no_senders
89 (
90 mach_port_t notify,
91 mach_port_mscount_t mscount
92 );
93
94 /* SimpleRoutine mach_notify_send_once */
95 #ifdef mig_external
96 mig_external
97 #else
98 extern
99 #endif /* mig_external */
100 kern_return_t mach_notify_send_once
101 (
102 mach_port_t notify
103 );
104
105 /* SimpleRoutine mach_notify_dead_name */
106 #ifdef mig_external
107 mig_external
108 #else
109 extern
110 #endif /* mig_external */
111 kern_return_t mach_notify_dead_name
112 (
113 mach_port_t notify,
114 mach_port_name_t name
115 );
116
117 #ifndef subsystem_to_name_map_notify
118 #define subsystem_to_name_map_notify \
119 { "mach_notify_port_deleted", 65 },\
120 { "mach_notify_port_destroyed", 69 },\
121 { "mach_notify_no_senders", 70 },\
122 { "mach_notify_send_once", 71 },\
123 { "mach_notify_dead_name", 72 }
124 #endif
125
126 #ifdef __AfterMigUserHeader
127 __AfterMigUserHeader
128 #endif /* __AfterMigUserHeader */
129
130 #endif /* _notify_user_ */