| 1 | /* |
| 2 | * IDENTIFICATION: |
| 3 | * stub generated Tue Apr 9 11:33:39 2019 |
| 4 | * with a MiG generated by bootstrap_cmds-96.20.2.200.4 |
| 5 | * OPTIONS: |
| 6 | * KernelServer |
| 7 | */ |
| 8 | |
| 9 | /* Module UNDReply */ |
| 10 | |
| 11 | #define __MIG_check__Request__UNDReply_subsystem__ 1 |
| 12 | |
| 13 | #include "UNDReplyServer.h" |
| 14 | |
| 15 | #ifndef mig_internal |
| 16 | #define mig_internal static __inline__ |
| 17 | #endif /* mig_internal */ |
| 18 | |
| 19 | #ifndef mig_external |
| 20 | #define mig_external |
| 21 | #endif /* mig_external */ |
| 22 | |
| 23 | #if !defined(__MigTypeCheck) && defined(TypeCheck) |
| 24 | #define __MigTypeCheck TypeCheck /* Legacy setting */ |
| 25 | #endif /* !defined(__MigTypeCheck) */ |
| 26 | |
| 27 | #if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) |
| 28 | #define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ |
| 29 | #endif /* !defined(__MigKernelSpecificCode) */ |
| 30 | |
| 31 | #ifndef LimitCheck |
| 32 | #define LimitCheck 0 |
| 33 | #endif /* LimitCheck */ |
| 34 | |
| 35 | #ifndef min |
| 36 | #define min(a,b) ( ((a) < (b))? (a): (b) ) |
| 37 | #endif /* min */ |
| 38 | |
| 39 | #if !defined(_WALIGN_) |
| 40 | #define _WALIGN_(x) (((x) + 3) & ~3) |
| 41 | #endif /* !defined(_WALIGN_) */ |
| 42 | |
| 43 | #if !defined(_WALIGNSZ_) |
| 44 | #define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) |
| 45 | #endif /* !defined(_WALIGNSZ_) */ |
| 46 | |
| 47 | #ifndef UseStaticTemplates |
| 48 | #define UseStaticTemplates 0 |
| 49 | #endif /* UseStaticTemplates */ |
| 50 | |
| 51 | #ifndef __DeclareRcvRpc |
| 52 | #define __DeclareRcvRpc(_NUM_, _NAME_) |
| 53 | #endif /* __DeclareRcvRpc */ |
| 54 | |
| 55 | #ifndef __BeforeRcvRpc |
| 56 | #define __BeforeRcvRpc(_NUM_, _NAME_) |
| 57 | #endif /* __BeforeRcvRpc */ |
| 58 | |
| 59 | #ifndef __AfterRcvRpc |
| 60 | #define __AfterRcvRpc(_NUM_, _NAME_) |
| 61 | #endif /* __AfterRcvRpc */ |
| 62 | |
| 63 | #ifndef __DeclareRcvSimple |
| 64 | #define __DeclareRcvSimple(_NUM_, _NAME_) |
| 65 | #endif /* __DeclareRcvSimple */ |
| 66 | |
| 67 | #ifndef __BeforeRcvSimple |
| 68 | #define __BeforeRcvSimple(_NUM_, _NAME_) |
| 69 | #endif /* __BeforeRcvSimple */ |
| 70 | |
| 71 | #ifndef __AfterRcvSimple |
| 72 | #define __AfterRcvSimple(_NUM_, _NAME_) |
| 73 | #endif /* __AfterRcvSimple */ |
| 74 | |
| 75 | #define novalue void |
| 76 | |
| 77 | #if __MigKernelSpecificCode |
| 78 | #define msgh_request_port msgh_remote_port |
| 79 | #define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_REMOTE(bits) |
| 80 | #define msgh_reply_port msgh_local_port |
| 81 | #define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_LOCAL(bits) |
| 82 | #else |
| 83 | #define msgh_request_port msgh_local_port |
| 84 | #define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits) |
| 85 | #define msgh_reply_port msgh_remote_port |
| 86 | #define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits) |
| 87 | #endif /* __MigKernelSpecificCode */ |
| 88 | |
| 89 | #define MIG_RETURN_ERROR(X, code) {\ |
| 90 | ((mig_reply_error_t *)X)->RetCode = code;\ |
| 91 | ((mig_reply_error_t *)X)->NDR = NDR_record;\ |
| 92 | return;\ |
| 93 | } |
| 94 | |
| 95 | /* Forward Declarations */ |
| 96 | |
| 97 | |
| 98 | mig_internal novalue _XUNDAlertCompletedWithResult_rpc |
| 99 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 100 | |
| 101 | mig_internal novalue _XUNDNotificationCreated_rpc |
| 102 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 103 | |
| 104 | |
| 105 | #if ( __MigTypeCheck ) |
| 106 | #if __MIG_check__Request__UNDReply_subsystem__ |
| 107 | #if !defined(__MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined) |
| 108 | #define __MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined |
| 109 | |
| 110 | mig_internal kern_return_t __MIG_check__Request__UNDAlertCompletedWithResult_rpc_t(__attribute__((__unused__)) __Request__UNDAlertCompletedWithResult_rpc_t *In0P) |
| 111 | { |
| 112 | |
| 113 | typedef __Request__UNDAlertCompletedWithResult_rpc_t __Request; |
| 114 | #if __MigTypeCheck |
| 115 | if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 116 | (In0P->msgh_body.msgh_descriptor_count != 1) || |
| 117 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 118 | return MIG_BAD_ARGUMENTS; |
| 119 | #endif /* __MigTypeCheck */ |
| 120 | |
| 121 | #if __MigTypeCheck |
| 122 | if (In0P->data.type != MACH_MSG_OOL_DESCRIPTOR) |
| 123 | return MIG_TYPE_ERROR; |
| 124 | #endif /* __MigTypeCheck */ |
| 125 | |
| 126 | #if __MigTypeCheck |
| 127 | if (In0P->data.size != In0P->dataCnt) |
| 128 | return MIG_TYPE_ERROR; |
| 129 | #endif /* __MigTypeCheck */ |
| 130 | |
| 131 | return MACH_MSG_SUCCESS; |
| 132 | } |
| 133 | #endif /* !defined(__MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined) */ |
| 134 | #endif /* __MIG_check__Request__UNDReply_subsystem__ */ |
| 135 | #endif /* ( __MigTypeCheck ) */ |
| 136 | |
| 137 | |
| 138 | /* SimpleRoutine UNDAlertCompletedWithResult_rpc */ |
| 139 | mig_internal novalue _XUNDAlertCompletedWithResult_rpc |
| 140 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 141 | { |
| 142 | |
| 143 | #ifdef __MigPackStructs |
| 144 | #pragma pack(4) |
| 145 | #endif |
| 146 | typedef struct { |
| 147 | mach_msg_header_t Head; |
| 148 | /* start of the kernel processed data */ |
| 149 | mach_msg_body_t msgh_body; |
| 150 | mach_msg_ool_descriptor_t data; |
| 151 | /* end of the kernel processed data */ |
| 152 | NDR_record_t NDR; |
| 153 | int result; |
| 154 | mach_msg_type_number_t dataCnt; |
| 155 | mach_msg_trailer_t trailer; |
| 156 | } Request __attribute__((unused)); |
| 157 | #ifdef __MigPackStructs |
| 158 | #pragma pack() |
| 159 | #endif |
| 160 | typedef __Request__UNDAlertCompletedWithResult_rpc_t __Request; |
| 161 | typedef __Reply__UNDAlertCompletedWithResult_rpc_t Reply __attribute__((unused)); |
| 162 | |
| 163 | /* |
| 164 | * typedef struct { |
| 165 | * mach_msg_header_t Head; |
| 166 | * NDR_record_t NDR; |
| 167 | * kern_return_t RetCode; |
| 168 | * } mig_reply_error_t; |
| 169 | */ |
| 170 | |
| 171 | Request *In0P = (Request *) InHeadP; |
| 172 | Reply *OutP = (Reply *) OutHeadP; |
| 173 | #ifdef __MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined |
| 174 | kern_return_t check_result; |
| 175 | #endif /* __MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined */ |
| 176 | |
| 177 | #if __MigKernelSpecificCode |
| 178 | #else |
| 179 | #endif /* __MigKernelSpecificCode */ |
| 180 | __DeclareRcvSimple(6200, "UNDAlertCompletedWithResult_rpc" ) |
| 181 | __BeforeRcvSimple(6200, "UNDAlertCompletedWithResult_rpc" ) |
| 182 | |
| 183 | #if defined(__MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined) |
| 184 | check_result = __MIG_check__Request__UNDAlertCompletedWithResult_rpc_t((__Request *)In0P); |
| 185 | if (check_result != MACH_MSG_SUCCESS) |
| 186 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 187 | #endif /* defined(__MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined) */ |
| 188 | |
| 189 | OutP->RetCode = UNDAlertCompletedWithResult_rpc(convert_port_to_UNDReply(In0P->Head.msgh_request_port), In0P->result, (xmlData_t)(In0P->data.address), In0P->data.size); |
| 190 | #if __MigKernelSpecificCode |
| 191 | #endif /* __MigKernelSpecificCode */ |
| 192 | __AfterRcvSimple(6200, "UNDAlertCompletedWithResult_rpc" ) |
| 193 | } |
| 194 | |
| 195 | #if ( __MigTypeCheck ) |
| 196 | #if __MIG_check__Request__UNDReply_subsystem__ |
| 197 | #if !defined(__MIG_check__Request__UNDNotificationCreated_rpc_t__defined) |
| 198 | #define __MIG_check__Request__UNDNotificationCreated_rpc_t__defined |
| 199 | |
| 200 | mig_internal kern_return_t __MIG_check__Request__UNDNotificationCreated_rpc_t(__attribute__((__unused__)) __Request__UNDNotificationCreated_rpc_t *In0P) |
| 201 | { |
| 202 | |
| 203 | typedef __Request__UNDNotificationCreated_rpc_t __Request; |
| 204 | #if __MigTypeCheck |
| 205 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 206 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 207 | return MIG_BAD_ARGUMENTS; |
| 208 | #endif /* __MigTypeCheck */ |
| 209 | |
| 210 | return MACH_MSG_SUCCESS; |
| 211 | } |
| 212 | #endif /* !defined(__MIG_check__Request__UNDNotificationCreated_rpc_t__defined) */ |
| 213 | #endif /* __MIG_check__Request__UNDReply_subsystem__ */ |
| 214 | #endif /* ( __MigTypeCheck ) */ |
| 215 | |
| 216 | |
| 217 | /* SimpleRoutine UNDNotificationCreated_rpc */ |
| 218 | mig_internal novalue _XUNDNotificationCreated_rpc |
| 219 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 220 | { |
| 221 | |
| 222 | #ifdef __MigPackStructs |
| 223 | #pragma pack(4) |
| 224 | #endif |
| 225 | typedef struct { |
| 226 | mach_msg_header_t Head; |
| 227 | NDR_record_t NDR; |
| 228 | int userLandNotificationKey; |
| 229 | mach_msg_trailer_t trailer; |
| 230 | } Request __attribute__((unused)); |
| 231 | #ifdef __MigPackStructs |
| 232 | #pragma pack() |
| 233 | #endif |
| 234 | typedef __Request__UNDNotificationCreated_rpc_t __Request; |
| 235 | typedef __Reply__UNDNotificationCreated_rpc_t Reply __attribute__((unused)); |
| 236 | |
| 237 | /* |
| 238 | * typedef struct { |
| 239 | * mach_msg_header_t Head; |
| 240 | * NDR_record_t NDR; |
| 241 | * kern_return_t RetCode; |
| 242 | * } mig_reply_error_t; |
| 243 | */ |
| 244 | |
| 245 | Request *In0P = (Request *) InHeadP; |
| 246 | Reply *OutP = (Reply *) OutHeadP; |
| 247 | #ifdef __MIG_check__Request__UNDNotificationCreated_rpc_t__defined |
| 248 | kern_return_t check_result; |
| 249 | #endif /* __MIG_check__Request__UNDNotificationCreated_rpc_t__defined */ |
| 250 | |
| 251 | #if __MigKernelSpecificCode |
| 252 | #else |
| 253 | #endif /* __MigKernelSpecificCode */ |
| 254 | __DeclareRcvSimple(6201, "UNDNotificationCreated_rpc" ) |
| 255 | __BeforeRcvSimple(6201, "UNDNotificationCreated_rpc" ) |
| 256 | |
| 257 | #if defined(__MIG_check__Request__UNDNotificationCreated_rpc_t__defined) |
| 258 | check_result = __MIG_check__Request__UNDNotificationCreated_rpc_t((__Request *)In0P); |
| 259 | if (check_result != MACH_MSG_SUCCESS) |
| 260 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 261 | #endif /* defined(__MIG_check__Request__UNDNotificationCreated_rpc_t__defined) */ |
| 262 | |
| 263 | OutP->RetCode = UNDNotificationCreated_rpc(convert_port_to_UNDReply(In0P->Head.msgh_request_port), In0P->userLandNotificationKey); |
| 264 | #if __MigKernelSpecificCode |
| 265 | #endif /* __MigKernelSpecificCode */ |
| 266 | __AfterRcvSimple(6201, "UNDNotificationCreated_rpc" ) |
| 267 | } |
| 268 | |
| 269 | |
| 270 | |
| 271 | /* Description of this subsystem, for use in direct RPC */ |
| 272 | const struct UNDReply_subsystem UNDReply_subsystem = { |
| 273 | UNDReply_server_routine, |
| 274 | 6200, |
| 275 | 6202, |
| 276 | (mach_msg_size_t)sizeof(union __ReplyUnion__UNDReply_subsystem), |
| 277 | (vm_address_t)0, |
| 278 | { |
| 279 | { (mig_impl_routine_t) 0, |
| 280 | (mig_stub_routine_t) _XUNDAlertCompletedWithResult_rpc, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__UNDAlertCompletedWithResult_rpc_t)}, |
| 281 | { (mig_impl_routine_t) 0, |
| 282 | (mig_stub_routine_t) _XUNDNotificationCreated_rpc, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__UNDNotificationCreated_rpc_t)}, |
| 283 | } |
| 284 | }; |
| 285 | |
| 286 | mig_external boolean_t UNDReply_server |
| 287 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 288 | { |
| 289 | /* |
| 290 | * typedef struct { |
| 291 | * mach_msg_header_t Head; |
| 292 | * NDR_record_t NDR; |
| 293 | * kern_return_t RetCode; |
| 294 | * } mig_reply_error_t; |
| 295 | */ |
| 296 | |
| 297 | register mig_routine_t routine; |
| 298 | |
| 299 | OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0); |
| 300 | OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port; |
| 301 | /* Minimal size: routine() will update it if different */ |
| 302 | OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); |
| 303 | OutHeadP->msgh_local_port = MACH_PORT_NULL; |
| 304 | OutHeadP->msgh_id = InHeadP->msgh_id + 100; |
| 305 | OutHeadP->msgh_reserved = 0; |
| 306 | |
| 307 | if ((InHeadP->msgh_id > 6201) || (InHeadP->msgh_id < 6200) || |
| 308 | ((routine = UNDReply_subsystem.routine[InHeadP->msgh_id - 6200].stub_routine) == 0)) { |
| 309 | ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record; |
| 310 | ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID; |
| 311 | return FALSE; |
| 312 | } |
| 313 | (*routine) (InHeadP, OutHeadP); |
| 314 | return TRUE; |
| 315 | } |
| 316 | |
| 317 | mig_external mig_routine_t UNDReply_server_routine |
| 318 | (mach_msg_header_t *InHeadP) |
| 319 | { |
| 320 | register int msgh_id; |
| 321 | |
| 322 | msgh_id = InHeadP->msgh_id - 6200; |
| 323 | |
| 324 | if ((msgh_id > 1) || (msgh_id < 0)) |
| 325 | return 0; |
| 326 | |
| 327 | return UNDReply_subsystem.routine[msgh_id].stub_routine; |
| 328 | } |
| 329 | |