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 | 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 | |
39 | #ifdef AUTOTEST |
40 | #ifndef FUNCTION_PTR_T |
41 | #define FUNCTION_PTR_T |
42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); |
43 | typedef struct { |
44 | char *name; |
45 | function_ptr_t function; |
46 | } function_table_entry; |
47 | typedef function_table_entry *function_table_t; |
48 | #endif /* FUNCTION_PTR_T */ |
49 | #endif /* AUTOTEST */ |
50 | |
51 | #ifndef UNDReply_MSG_COUNT |
52 | #define UNDReply_MSG_COUNT 2 |
53 | #endif /* UNDReply_MSG_COUNT */ |
54 | |
55 | #include <mach/std_types.h> |
56 | #include <mach/mig.h> |
57 | #include <UserNotification/UNDTypes.h> |
58 | |
59 | #ifdef __BeforeMigServerHeader |
60 | __BeforeMigServerHeader |
61 | #endif /* __BeforeMigServerHeader */ |
62 | |
63 | |
64 | /* SimpleRoutine UNDAlertCompletedWithResult_rpc */ |
65 | #ifdef mig_external |
66 | mig_external |
67 | #else |
68 | extern |
69 | #endif /* mig_external */ |
70 | kern_return_t UNDAlertCompletedWithResult_rpc |
71 | ( |
72 | UNDReplyRef reply, |
73 | int result, |
74 | xmlData_t data, |
75 | mach_msg_type_number_t dataCnt |
76 | ); |
77 | |
78 | /* SimpleRoutine UNDNotificationCreated_rpc */ |
79 | #ifdef mig_external |
80 | mig_external |
81 | #else |
82 | extern |
83 | #endif /* mig_external */ |
84 | kern_return_t UNDNotificationCreated_rpc |
85 | ( |
86 | UNDReplyRef reply, |
87 | int userLandNotificationKey |
88 | ); |
89 | |
90 | #ifdef mig_external |
91 | mig_external |
92 | #else |
93 | extern |
94 | #endif /* mig_external */ |
95 | boolean_t UNDReply_server( |
96 | mach_msg_header_t *InHeadP, |
97 | mach_msg_header_t *OutHeadP); |
98 | |
99 | #ifdef mig_external |
100 | mig_external |
101 | #else |
102 | extern |
103 | #endif /* mig_external */ |
104 | mig_routine_t UNDReply_server_routine( |
105 | mach_msg_header_t *InHeadP); |
106 | |
107 | |
108 | /* Description of this subsystem, for use in direct RPC */ |
109 | extern const struct UNDReply_subsystem { |
110 | mig_server_routine_t server; /* Server routine */ |
111 | mach_msg_id_t start; /* Min routine number */ |
112 | mach_msg_id_t end; /* Max routine number + 1 */ |
113 | unsigned int maxsize; /* Max msg size */ |
114 | vm_address_t reserved; /* Reserved */ |
115 | struct routine_descriptor /*Array of routine descriptors */ |
116 | routine[2]; |
117 | } UNDReply_subsystem; |
118 | |
119 | /* typedefs for all requests */ |
120 | |
121 | #ifndef __Request__UNDReply_subsystem__defined |
122 | #define __Request__UNDReply_subsystem__defined |
123 | |
124 | #ifdef __MigPackStructs |
125 | #pragma pack(4) |
126 | #endif |
127 | typedef struct { |
128 | mach_msg_header_t Head; |
129 | /* start of the kernel processed data */ |
130 | mach_msg_body_t msgh_body; |
131 | mach_msg_ool_descriptor_t data; |
132 | /* end of the kernel processed data */ |
133 | NDR_record_t NDR; |
134 | int result; |
135 | mach_msg_type_number_t dataCnt; |
136 | } __Request__UNDAlertCompletedWithResult_rpc_t __attribute__((unused)); |
137 | #ifdef __MigPackStructs |
138 | #pragma pack() |
139 | #endif |
140 | |
141 | #ifdef __MigPackStructs |
142 | #pragma pack(4) |
143 | #endif |
144 | typedef struct { |
145 | mach_msg_header_t Head; |
146 | NDR_record_t NDR; |
147 | int userLandNotificationKey; |
148 | } __Request__UNDNotificationCreated_rpc_t __attribute__((unused)); |
149 | #ifdef __MigPackStructs |
150 | #pragma pack() |
151 | #endif |
152 | #endif /* !__Request__UNDReply_subsystem__defined */ |
153 | |
154 | |
155 | /* union of all requests */ |
156 | |
157 | #ifndef __RequestUnion__UNDReply_subsystem__defined |
158 | #define __RequestUnion__UNDReply_subsystem__defined |
159 | union __RequestUnion__UNDReply_subsystem { |
160 | __Request__UNDAlertCompletedWithResult_rpc_t Request_UNDAlertCompletedWithResult_rpc; |
161 | __Request__UNDNotificationCreated_rpc_t Request_UNDNotificationCreated_rpc; |
162 | }; |
163 | #endif /* __RequestUnion__UNDReply_subsystem__defined */ |
164 | /* typedefs for all replies */ |
165 | |
166 | #ifndef __Reply__UNDReply_subsystem__defined |
167 | #define __Reply__UNDReply_subsystem__defined |
168 | |
169 | #ifdef __MigPackStructs |
170 | #pragma pack(4) |
171 | #endif |
172 | typedef struct { |
173 | mach_msg_header_t Head; |
174 | NDR_record_t NDR; |
175 | kern_return_t RetCode; |
176 | } __Reply__UNDAlertCompletedWithResult_rpc_t __attribute__((unused)); |
177 | #ifdef __MigPackStructs |
178 | #pragma pack() |
179 | #endif |
180 | |
181 | #ifdef __MigPackStructs |
182 | #pragma pack(4) |
183 | #endif |
184 | typedef struct { |
185 | mach_msg_header_t Head; |
186 | NDR_record_t NDR; |
187 | kern_return_t RetCode; |
188 | } __Reply__UNDNotificationCreated_rpc_t __attribute__((unused)); |
189 | #ifdef __MigPackStructs |
190 | #pragma pack() |
191 | #endif |
192 | #endif /* !__Reply__UNDReply_subsystem__defined */ |
193 | |
194 | |
195 | /* union of all replies */ |
196 | |
197 | #ifndef __ReplyUnion__UNDReply_subsystem__defined |
198 | #define __ReplyUnion__UNDReply_subsystem__defined |
199 | union __ReplyUnion__UNDReply_subsystem { |
200 | __Reply__UNDAlertCompletedWithResult_rpc_t Reply_UNDAlertCompletedWithResult_rpc; |
201 | __Reply__UNDNotificationCreated_rpc_t Reply_UNDNotificationCreated_rpc; |
202 | }; |
203 | #endif /* __RequestUnion__UNDReply_subsystem__defined */ |
204 | |
205 | #ifndef subsystem_to_name_map_UNDReply |
206 | #define subsystem_to_name_map_UNDReply \ |
207 | { "UNDAlertCompletedWithResult_rpc", 6200 },\ |
208 | { "UNDNotificationCreated_rpc", 6201 } |
209 | #endif |
210 | |
211 | #ifdef __AfterMigServerHeader |
212 | __AfterMigServerHeader |
213 | #endif /* __AfterMigServerHeader */ |
214 | |
215 | #endif /* _UNDReply_server_ */ |
216 | |