ipc_msg.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. /*
  2. * Copyright (c) 2005 MontaVista Software, Inc.
  3. *
  4. * All rights reserved.
  5. *
  6. * Author: Steven Dake (sdake@redhat.com)
  7. *
  8. * This software licensed under BSD license, the text of which follows:
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions are met:
  12. *
  13. * - Redistributions of source code must retain the above copyright notice,
  14. * this list of conditions and the following disclaimer.
  15. * - Redistributions in binary form must reproduce the above copyright notice,
  16. * this list of conditions and the following disclaimer in the documentation
  17. * and/or other materials provided with the distribution.
  18. * - Neither the name of the MontaVista Software, Inc. nor the names of its
  19. * contributors may be used to endorse or promote products derived from this
  20. * software without specific prior written permission.
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  23. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  24. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  25. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  26. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  27. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  28. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  29. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  30. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  31. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  32. * THE POSSIBILITY OF SUCH DAMAGE.
  33. */
  34. #ifndef IPC_MSG_H_DEFINED
  35. #define IPC_MSG_H_DEFINED
  36. #include "saAis.h"
  37. #include "saMsg.h"
  38. #include "ipc_gen.h"
  39. enum req_lib_msg_queue_types {
  40. MESSAGE_REQ_MSG_QUEUEOPEN = 0,
  41. MESSAGE_REQ_MSG_QUEUEOPENASYNC = 1,
  42. MESSAGE_REQ_MSG_QUEUECLOSE = 2,
  43. MESSAGE_REQ_MSG_QUEUESTATUSGET = 3,
  44. MESSAGE_REQ_MSG_QUEUEUNLINK = 4,
  45. MESSAGE_REQ_MSG_QUEUEGROUPCREATE = 5,
  46. MESSAGE_REQ_MSG_QUEUEGROUPINSERT = 6,
  47. MESSAGE_REQ_MSG_QUEUEGROUPREMOVE = 7,
  48. MESSAGE_REQ_MSG_QUEUEGROUPDELETE = 8,
  49. MESSAGE_REQ_MSG_QUEUEGROUPTRACK = 9,
  50. MESSAGE_REQ_MSG_QUEUEGROUPTRACKSTOP = 10,
  51. MESSAGE_REQ_MSG_MESSAGESEND = 11,
  52. MESSAGE_REQ_MSG_MESSAGESENDASYNC = 12,
  53. MESSAGE_REQ_MSG_MESSAGEGET = 13,
  54. MESSAGE_REQ_MSG_MESSAGECANCEL = 14,
  55. MESSAGE_REQ_MSG_MESSAGESENDRECEIVE = 15,
  56. MESSAGE_REQ_MSG_MESSAGEREPLY = 16,
  57. MESSAGE_REQ_MSG_MESSAGEREPLYASYNC = 17
  58. };
  59. enum res_lib_msg_queue_types {
  60. MESSAGE_RES_MSG_QUEUEOPEN = 0,
  61. MESSAGE_RES_MSG_QUEUEOPENASYNC = 1,
  62. MESSAGE_RES_MSG_QUEUECLOSE = 2,
  63. MESSAGE_RES_MSG_QUEUESTATUSGET = 3,
  64. MESSAGE_RES_MSG_QUEUEUNLINK = 4,
  65. MESSAGE_RES_MSG_QUEUEGROUPCREATE = 5,
  66. MESSAGE_RES_MSG_QUEUEGROUPINSERT = 6,
  67. MESSAGE_RES_MSG_QUEUEGROUPREMOVE = 7,
  68. MESSAGE_RES_MSG_QUEUEGROUPDELETE = 8,
  69. MESSAGE_RES_MSG_QUEUEGROUPTRACK = 9,
  70. MESSAGE_RES_MSG_QUEUEGROUPTRACKSTOP = 10,
  71. MESSAGE_RES_MSG_MESSAGESEND = 11,
  72. MESSAGE_RES_MSG_MESSAGESENDASYNC = 12,
  73. MESSAGE_RES_MSG_MESSAGEGET = 13,
  74. MESSAGE_RES_MSG_MESSAGECANCEL = 14,
  75. MESSAGE_RES_MSG_MESSAGESENDRECEIVE = 15,
  76. MESSAGE_RES_MSG_MESSAGEREPLY = 16,
  77. MESSAGE_RES_MSG_MESSAGEREPLYASYNC = 17
  78. };
  79. struct req_lib_msg_queueopen {
  80. mar_req_header_t header;
  81. SaInvocationT invocation;
  82. SaNameT queueName;
  83. SaMsgQueueCreationAttributesT creationAttributes;
  84. int creationAttributesSet;
  85. SaMsgQueueOpenFlagsT openFlags;
  86. SaMsgQueueHandleT queueHandle;
  87. SaTimeT timeout;
  88. int async_call;
  89. };
  90. struct res_lib_msg_queueopen {
  91. mar_res_header_t header;
  92. mar_message_source_t source;
  93. SaMsgQueueHandleT queueHandle;
  94. };
  95. struct res_lib_msg_queueopenasync {
  96. mar_res_header_t header;
  97. mar_message_source_t source;
  98. SaInvocationT invocation;
  99. SaMsgQueueHandleT queueHandle;
  100. };
  101. struct req_lib_msg_queueclose {
  102. mar_req_header_t header;
  103. SaNameT queueName;
  104. SaMsgQueueHandleT queueHandle;
  105. };
  106. struct res_lib_msg_queueclose {
  107. mar_res_header_t header;
  108. };
  109. struct req_lib_msg_queuestatusget {
  110. mar_req_header_t header;
  111. SaNameT queueName;
  112. };
  113. struct res_lib_msg_queuestatusget {
  114. mar_res_header_t header;
  115. SaMsgQueueStatusT queueStatus;
  116. };
  117. struct req_lib_msg_queueunlink {
  118. mar_req_header_t header;
  119. SaNameT queueName;
  120. };
  121. struct res_lib_msg_queueunlink {
  122. mar_res_header_t header;
  123. };
  124. struct req_lib_msg_queuegroupcreate {
  125. mar_req_header_t header;
  126. SaNameT queueGroupName;
  127. SaMsgQueueGroupPolicyT queueGroupPolicy;
  128. };
  129. struct res_lib_msg_queuegroupcreate {
  130. mar_res_header_t header;
  131. };
  132. struct req_lib_msg_queuegroupinsert {
  133. mar_req_header_t header;
  134. SaNameT queueGroupName;
  135. SaNameT queueName;
  136. };
  137. struct res_lib_msg_queuegroupinsert {
  138. mar_res_header_t header;
  139. };
  140. struct req_lib_msg_queuegroupremove {
  141. mar_req_header_t header;
  142. SaNameT queueGroupName;
  143. SaNameT queueName;
  144. };
  145. struct res_lib_msg_queuegroupremove {
  146. mar_res_header_t header;
  147. };
  148. struct req_lib_msg_queuegroupdelete {
  149. mar_req_header_t header;
  150. SaNameT queueGroupName;
  151. };
  152. struct res_lib_msg_queuegroupdelete {
  153. mar_res_header_t header;
  154. };
  155. struct req_lib_msg_queuegrouptrack {
  156. mar_req_header_t header;
  157. SaNameT queueGroupName;
  158. SaUint8T trackFlags;
  159. };
  160. struct res_lib_msg_queuegrouptrack {
  161. mar_res_header_t header;
  162. };
  163. struct req_lib_msg_queuegrouptrackstop {
  164. mar_req_header_t header;
  165. SaNameT queueGroupName;
  166. };
  167. struct res_lib_msg_queuegrouptrackstop {
  168. mar_res_header_t header;
  169. };
  170. struct req_lib_msg_messagesend {
  171. mar_req_header_t header;
  172. SaInvocationT invocation;
  173. SaNameT destination;
  174. SaMsgMessageT message;
  175. SaTimeT timeout;
  176. SaMsgAckFlagsT ackFlags;
  177. int async_call;
  178. };
  179. struct res_lib_msg_messagesend {
  180. mar_res_header_t header;
  181. mar_message_source_t source;
  182. };
  183. struct res_lib_msg_messagesendasync {
  184. mar_res_header_t header;
  185. mar_message_source_t source;
  186. SaInvocationT invocation;
  187. };
  188. struct req_lib_msg_messageget {
  189. mar_req_header_t header;
  190. SaNameT queueName;
  191. SaTimeT timeout;
  192. };
  193. struct res_lib_msg_messageget {
  194. mar_res_header_t header;
  195. mar_message_source_t source;
  196. SaTimeT sendTime;
  197. SaMsgSenderIdT senderId;
  198. SaMsgMessageT message;
  199. };
  200. struct req_lib_msg_messagecancel {
  201. mar_req_header_t header;
  202. SaNameT queueName;
  203. };
  204. struct res_lib_msg_messagecancel {
  205. mar_res_header_t header;
  206. };
  207. struct req_lib_msg_messagesendreceive {
  208. mar_req_header_t header;
  209. SaNameT destination;
  210. SaTimeT timeout;
  211. SaNameT queueName;
  212. SaMsgMessageT sendMessage;
  213. };
  214. struct res_lib_msg_messagesendreceive {
  215. mar_res_header_t header;
  216. SaTimeT replySendTime;
  217. SaMsgMessageT receiveMessage;
  218. };
  219. struct req_lib_msg_messagereply {
  220. mar_req_header_t header;
  221. SaInvocationT invocation;
  222. SaNameT queueName;
  223. SaNameT senderId;
  224. SaMsgMessageT replyMessage;
  225. SaTimeT timeout;
  226. SaMsgAckFlagsT ackFlags;
  227. int async_call;
  228. };
  229. struct res_lib_msg_messagereply {
  230. mar_res_header_t header;
  231. };
  232. struct res_lib_msg_messagereplyasync {
  233. mar_res_header_t header;
  234. };
  235. #endif /* IPC_MSG_H_DEFINED */