jack2 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

195 lines
4.7KB

  1. #ifndef _JackRPCClient_user_
  2. #define _JackRPCClient_user_
  3. /* Module JackRPCClient */
  4. #include <string.h>
  5. #include <mach/ndr.h>
  6. #include <mach/boolean.h>
  7. #include <mach/kern_return.h>
  8. #include <mach/notify.h>
  9. #include <mach/mach_types.h>
  10. #include <mach/message.h>
  11. #include <mach/mig_errors.h>
  12. #include <mach/port.h>
  13. #ifdef AUTOTEST
  14. #ifndef FUNCTION_PTR_T
  15. #define FUNCTION_PTR_T
  16. typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
  17. typedef struct {
  18. char *name;
  19. function_ptr_t function;
  20. } function_table_entry;
  21. typedef function_table_entry *function_table_t;
  22. #endif /* FUNCTION_PTR_T */
  23. #endif /* AUTOTEST */
  24. #ifndef JackRPCClient_MSG_COUNT
  25. #define JackRPCClient_MSG_COUNT 2
  26. #endif /* JackRPCClient_MSG_COUNT */
  27. #include <mach/std_types.h>
  28. #include <mach/mig.h>
  29. #include <mach/mig.h>
  30. #include <mach/mach_types.h>
  31. #include "Jackdefs.h"
  32. #ifdef __BeforeMigUserHeader
  33. __BeforeMigUserHeader
  34. #endif /* __BeforeMigUserHeader */
  35. #include <sys/cdefs.h>
  36. __BEGIN_DECLS
  37. /* Routine rpc_jack_client_sync_notify */
  38. #ifdef mig_external
  39. mig_external
  40. #else
  41. extern
  42. #endif /* mig_external */
  43. kern_return_t rpc_jack_client_sync_notify
  44. (
  45. mach_port_t client_port,
  46. int refnum,
  47. client_name_t client_name,
  48. int notify,
  49. message_t message,
  50. int value1,
  51. int value2,
  52. int *result
  53. );
  54. /* SimpleRoutine rpc_jack_client_async_notify */
  55. #ifdef mig_external
  56. mig_external
  57. #else
  58. extern
  59. #endif /* mig_external */
  60. kern_return_t rpc_jack_client_async_notify
  61. (
  62. mach_port_t client_port,
  63. int refnum,
  64. client_name_t client_name,
  65. int notify,
  66. message_t message,
  67. int value1,
  68. int value2
  69. );
  70. __END_DECLS
  71. /********************** Caution **************************/
  72. /* The following data types should be used to calculate */
  73. /* maximum message sizes only. The actual message may be */
  74. /* smaller, and the position of the arguments within the */
  75. /* message layout may vary from what is presented here. */
  76. /* For example, if any of the arguments are variable- */
  77. /* sized, and less than the maximum is sent, the data */
  78. /* will be packed tight in the actual message to reduce */
  79. /* the presence of holes. */
  80. /********************** Caution **************************/
  81. /* typedefs for all requests */
  82. #ifndef __Request__JackRPCClient_subsystem__defined
  83. #define __Request__JackRPCClient_subsystem__defined
  84. #ifdef __MigPackStructs
  85. #pragma pack(4)
  86. #endif
  87. typedef struct {
  88. mach_msg_header_t Head;
  89. NDR_record_t NDR;
  90. int refnum;
  91. client_name_t client_name;
  92. int notify;
  93. message_t message;
  94. int value1;
  95. int value2;
  96. } __Request__rpc_jack_client_sync_notify_t;
  97. #ifdef __MigPackStructs
  98. #pragma pack()
  99. #endif
  100. #ifdef __MigPackStructs
  101. #pragma pack(4)
  102. #endif
  103. typedef struct {
  104. mach_msg_header_t Head;
  105. NDR_record_t NDR;
  106. int refnum;
  107. client_name_t client_name;
  108. int notify;
  109. message_t message;
  110. int value1;
  111. int value2;
  112. } __Request__rpc_jack_client_async_notify_t;
  113. #ifdef __MigPackStructs
  114. #pragma pack()
  115. #endif
  116. #endif /* !__Request__JackRPCClient_subsystem__defined */
  117. /* union of all requests */
  118. #ifndef __RequestUnion__JackRPCClient_subsystem__defined
  119. #define __RequestUnion__JackRPCClient_subsystem__defined
  120. union __RequestUnion__JackRPCClient_subsystem {
  121. __Request__rpc_jack_client_sync_notify_t Request_rpc_jack_client_sync_notify;
  122. __Request__rpc_jack_client_async_notify_t Request_rpc_jack_client_async_notify;
  123. };
  124. #endif /* !__RequestUnion__JackRPCClient_subsystem__defined */
  125. /* typedefs for all replies */
  126. #ifndef __Reply__JackRPCClient_subsystem__defined
  127. #define __Reply__JackRPCClient_subsystem__defined
  128. #ifdef __MigPackStructs
  129. #pragma pack(4)
  130. #endif
  131. typedef struct {
  132. mach_msg_header_t Head;
  133. NDR_record_t NDR;
  134. kern_return_t RetCode;
  135. int result;
  136. } __Reply__rpc_jack_client_sync_notify_t;
  137. #ifdef __MigPackStructs
  138. #pragma pack()
  139. #endif
  140. #ifdef __MigPackStructs
  141. #pragma pack(4)
  142. #endif
  143. typedef struct {
  144. mach_msg_header_t Head;
  145. NDR_record_t NDR;
  146. kern_return_t RetCode;
  147. } __Reply__rpc_jack_client_async_notify_t;
  148. #ifdef __MigPackStructs
  149. #pragma pack()
  150. #endif
  151. #endif /* !__Reply__JackRPCClient_subsystem__defined */
  152. /* union of all replies */
  153. #ifndef __ReplyUnion__JackRPCClient_subsystem__defined
  154. #define __ReplyUnion__JackRPCClient_subsystem__defined
  155. union __ReplyUnion__JackRPCClient_subsystem {
  156. __Reply__rpc_jack_client_sync_notify_t Reply_rpc_jack_client_sync_notify;
  157. __Reply__rpc_jack_client_async_notify_t Reply_rpc_jack_client_async_notify;
  158. };
  159. #endif /* !__RequestUnion__JackRPCClient_subsystem__defined */
  160. #ifndef subsystem_to_name_map_JackRPCClient
  161. #define subsystem_to_name_map_JackRPCClient \
  162. { "rpc_jack_client_sync_notify", 1000 },\
  163. { "rpc_jack_client_async_notify", 1001 }
  164. #endif
  165. #ifdef __AfterMigUserHeader
  166. __AfterMigUserHeader
  167. #endif /* __AfterMigUserHeader */
  168. #endif /* _JackRPCClient_user_ */