ipc_msg.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. /*
  2. * Copyright (c) 2005 MontaVista Software, Inc.
  3. *
  4. * All rights reserved.
  5. *
  6. * Author: Steven Dake (sdake@mvista.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_MESSAGEGET = 12,
  53. MESSAGE_REQ_MSG_MESSAGECANCEL = 13,
  54. MESSAGE_REQ_MSG_MESSAGESENDRECEIVE = 14,
  55. MESSAGE_REQ_MSG_MESSAGEREPLY = 15
  56. };
  57. enum res_lib_msg_queue_types {
  58. MESSAGE_RES_MSG_QUEUEOPEN = 0,
  59. MESSAGE_RES_MSG_QUEUEOPENASYNC = 2,
  60. MESSAGE_RES_MSG_QUEUECLOSE = 3,
  61. MESSAGE_RES_MSG_QUEUESTATUSGET = 4,
  62. MESSAGE_RES_MSG_QUEUEUNLINK = 5,
  63. MESSAGE_RES_MSG_QUEUEGROUPCREATE = 6,
  64. MESSAGE_RES_MSG_QUEUEGROUPINSERT = 7,
  65. MESSAGE_RES_MSG_QUEUEGROUPREMOVE = 8,
  66. MESSAGE_RES_MSG_QUEUEGROUPDELETE = 9,
  67. MESSAGE_RES_MSG_QUEUEGROUPTRACK = 10,
  68. MESSAGE_RES_MSG_QUEUEGROUPTRACKSTOP = 11,
  69. MESSAGE_RES_MSG_MESSAGESEND = 12,
  70. MESSAGE_RES_MSG_MESSAGESENDASYNC = 13,
  71. MESSAGE_RES_MSG_MESSAGEGET = 14,
  72. MESSAGE_RES_MSG_MESSAGECANCEL = 15,
  73. MESSAGE_RES_MSG_MESSAGESENDRECEIVE = 16,
  74. MESSAGE_RES_MSG_MESSAGEREPLY = 17,
  75. MESSAGE_RES_MSG_MESSAGEREPLYASYNC = 18
  76. };
  77. struct req_lib_msg_queueopen {
  78. struct req_header header;
  79. SaInvocationT invocation;
  80. SaNameT queueName;
  81. SaMsgQueueCreationAttributesT creationAttributes;
  82. int creationAttributesSet;
  83. SaMsgQueueOpenFlagsT openFlags;
  84. SaMsgQueueHandleT queueHandle;
  85. SaTimeT timeout;
  86. int async_call;
  87. };
  88. struct res_lib_msg_queueopen {
  89. struct res_header header;
  90. SaMsgQueueHandleT queueHandle;
  91. struct message_source source;
  92. };
  93. struct res_lib_msg_queueopenasync {
  94. struct res_header header;
  95. SaInvocationT invocation;
  96. SaMsgQueueHandleT queueHandle;
  97. struct message_source source;
  98. };
  99. struct req_lib_msg_queueclose {
  100. struct req_header header;
  101. SaNameT queueName;
  102. SaMsgQueueHandleT queueHandle;
  103. };
  104. struct res_lib_msg_queueclose {
  105. struct res_header header;
  106. };
  107. struct req_lib_msg_queuestatusget {
  108. struct req_header header;
  109. SaNameT queueName;
  110. };
  111. struct res_lib_msg_queuestatusget {
  112. struct res_header header;
  113. SaMsgQueueStatusT queueStatus;
  114. };
  115. struct req_lib_msg_queueunlink {
  116. struct req_header header;
  117. SaNameT queueName;
  118. };
  119. struct res_lib_msg_queueunlink {
  120. struct res_header header;
  121. };
  122. struct req_lib_msg_queuegroupcreate {
  123. struct req_header header;
  124. SaNameT queueGroupName;
  125. SaMsgQueueGroupPolicyT queueGroupPolicy;
  126. };
  127. struct res_lib_msg_queuegroupcreate {
  128. struct res_header header;
  129. };
  130. struct req_lib_msg_queuegroupinsert {
  131. struct req_header header;
  132. SaNameT queueGroupName;
  133. SaNameT queueName;
  134. };
  135. struct res_lib_msg_queuegroupinsert {
  136. struct res_header header;
  137. };
  138. struct req_lib_msg_queuegroupremove {
  139. struct req_header header;
  140. SaNameT queueGroupName;
  141. SaNameT queueName;
  142. };
  143. struct res_lib_msg_queuegroupremove {
  144. struct res_header header;
  145. };
  146. struct req_lib_msg_queuegroupdelete {
  147. struct req_header header;
  148. SaNameT queueGroupName;
  149. };
  150. struct res_lib_msg_queuegroupdelete {
  151. struct res_header header;
  152. };
  153. struct req_lib_msg_queuegrouptrack {
  154. struct req_header header;
  155. SaNameT queueGroupName;
  156. SaUint8T trackFlags;
  157. };
  158. struct res_lib_msg_queuegrouptrack {
  159. struct res_header header;
  160. };
  161. struct req_lib_msg_queuegrouptrackstop {
  162. struct req_header header;
  163. SaNameT queueGroupName;
  164. };
  165. struct res_lib_msg_queuegrouptrackstop {
  166. struct res_header header;
  167. };
  168. struct req_lib_msg_messagesend {
  169. struct req_header header;
  170. SaInvocationT invocation;
  171. SaNameT destination;
  172. SaMsgMessageT message;
  173. SaTimeT timeout;
  174. SaMsgAckFlagsT ackFlags;
  175. int async_call;
  176. };
  177. struct res_lib_msg_messagesend {
  178. struct res_header header;
  179. };
  180. struct res_lib_msg_messagesendasync {
  181. struct res_header header;
  182. };
  183. struct req_lib_msg_messageget {
  184. struct req_header header;
  185. SaNameT queueName;
  186. SaTimeT timeout;
  187. };
  188. struct res_lib_msg_messageget {
  189. struct res_header header;
  190. SaTimeT sendTime;
  191. SaMsgSenderIdT senderId;
  192. SaMsgMessageT message;
  193. };
  194. struct req_lib_msg_messagecancel {
  195. struct req_header header;
  196. SaNameT queueName;
  197. };
  198. struct res_lib_msg_messagecancel {
  199. struct res_header header;
  200. };
  201. struct req_lib_msg_messagesendreceive {
  202. struct req_header header;
  203. SaNameT destination;
  204. SaTimeT timeout;
  205. SaNameT queueName;
  206. SaMsgMessageT sendMessage;
  207. };
  208. struct res_lib_msg_messagesendreceive {
  209. struct res_header header;
  210. SaTimeT replySendTime;
  211. SaMsgMessageT receiveMessage;
  212. };
  213. struct req_lib_msg_messagereply {
  214. struct req_header header;
  215. SaInvocationT invocation;
  216. SaNameT queueName;
  217. SaNameT senderId;
  218. SaMsgMessageT replyMessage;
  219. SaTimeT timeout;
  220. SaMsgAckFlagsT ackFlags;
  221. int async_call;
  222. };
  223. struct res_lib_msg_messagereply {
  224. struct res_header header;
  225. };
  226. struct res_lib_msg_messagereplyasync {
  227. struct res_header header;
  228. };
  229. #endif /* IPC_MSG_H_DEFINED */