ipc_msg.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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. SaUint8T bufferFlag;
  160. };
  161. struct res_lib_msg_queuegrouptrack {
  162. mar_res_header_t header;
  163. SaNameT queueGroupName;
  164. SaUint32T numberOfMembers;
  165. SaMsgQueueGroupNotificationBufferT notificationBuffer;
  166. };
  167. struct req_lib_msg_queuegrouptrackstop {
  168. mar_req_header_t header;
  169. SaNameT queueGroupName;
  170. };
  171. struct res_lib_msg_queuegrouptrackstop {
  172. mar_res_header_t header;
  173. };
  174. struct req_lib_msg_messagesend {
  175. mar_req_header_t header;
  176. SaInvocationT invocation;
  177. SaNameT destination;
  178. SaMsgMessageT message;
  179. SaTimeT timeout;
  180. SaMsgAckFlagsT ackFlags;
  181. int async_call;
  182. };
  183. struct res_lib_msg_messagesend {
  184. mar_res_header_t header;
  185. mar_message_source_t source;
  186. };
  187. struct res_lib_msg_messagesendasync {
  188. mar_res_header_t header;
  189. mar_message_source_t source;
  190. SaInvocationT invocation;
  191. };
  192. struct req_lib_msg_messageget {
  193. mar_req_header_t header;
  194. SaNameT queueName;
  195. SaTimeT timeout;
  196. };
  197. struct res_lib_msg_messageget {
  198. mar_res_header_t header;
  199. mar_message_source_t source;
  200. SaTimeT sendTime;
  201. SaMsgSenderIdT senderId;
  202. SaMsgMessageT message;
  203. };
  204. struct req_lib_msg_messagecancel {
  205. mar_req_header_t header;
  206. SaNameT queueName;
  207. };
  208. struct res_lib_msg_messagecancel {
  209. mar_res_header_t header;
  210. };
  211. struct req_lib_msg_messagesendreceive {
  212. mar_req_header_t header;
  213. SaNameT destination;
  214. SaTimeT timeout;
  215. SaNameT queueName;
  216. SaMsgMessageT sendMessage;
  217. };
  218. struct res_lib_msg_messagesendreceive {
  219. mar_res_header_t header;
  220. SaTimeT replySendTime;
  221. SaMsgMessageT receiveMessage;
  222. };
  223. struct req_lib_msg_messagereply {
  224. mar_req_header_t header;
  225. SaInvocationT invocation;
  226. SaNameT queueName;
  227. SaNameT senderId;
  228. SaMsgMessageT replyMessage;
  229. SaTimeT timeout;
  230. SaMsgAckFlagsT ackFlags;
  231. int async_call;
  232. };
  233. struct res_lib_msg_messagereply {
  234. mar_res_header_t header;
  235. };
  236. struct res_lib_msg_messagereplyasync {
  237. mar_res_header_t header;
  238. };
  239. #endif /* IPC_MSG_H_DEFINED */