OpenMAMA
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
publisher.h
Go to the documentation of this file.
1 /* $Id$
2  *
3  * OpenMAMA: The open middleware agnostic messaging API
4  * Copyright (C) 2011 NYSE Technologies, Inc.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  */
21 
22 #ifndef MAMA_PUBLISHER_H__
23 #define MAMA_PUBLISHER_H__
24 
25 #if defined( __cplusplus )
26 extern "C"
27 {
28 #endif /* defined( __cplusplus ) */
29 
52 typedef void (MAMACALLTYPE *mamaThrottledSendCompleteCb) (
53  mamaPublisher publisher,
56  void* closure);
57 
58 
71 MAMAExpDLL
72 extern mama_status
74  mamaTransport tport,
75  const char* symbol,
76  const char* source,
77  const char* root);
78 
85 MAMAExpDLL
86 extern mama_status
88  mamaMsg msg);
89 
102 MAMAExpDLL
103 extern mama_status
105  mamaMsg msg,
106  mamaThrottledSendCompleteCb sendCompleteCb,
107  void* closure);
108 
109 
110 /*
111  * Send a p2p message from the specified inbox using the throttle.
112  * The lifecycle of the message sent is controlled by the user of the API. The
113  * callback indicates when the API is no longer using the message and can be
114  * destroyed/reused by the application.
115  *
116  * @param publisher The mamaPublisher from which to send the message.
117  * @param inbox The mamaInbox which will process any response to the sent message.
118  * @param msg The mamaMsg to send.
119  * @param sendCompleteCb The callback which will be invoked when the message
120  * is sent from the throttle queue.
121  * @param closure User supplied data returned when the callback is invoked.
122  */
123 MAMAExpDLL
124 extern mama_status
126  mamaInbox inbox,
127  mamaMsg msg,
128  mamaThrottledSendCompleteCb sendCompleteCb,
129  void* closure);
130 
131 /*
132  * Send a p2p message from the specified inbox.
133  *
134  * @param publisher The mamaPublisher from which to send the message
135  * @param inbox The mamaInbox which will process any response to the sent
136  * message.
137  * @param msg The mamaMsg to send.
138  */
139 MAMAExpDLL
140 extern mama_status
142  mamaInbox inbox,
143  mamaMsg msg);
144 
154 MAMAExpDLL
155 extern mama_status
157  mamaMsgReply replyAddress,
158  mamaMsg reply);
159 
160 
169 MAMAExpDLL
170 extern mama_status
172  mamaMsg request,
173  mamaMsg reply);
174 
180 MAMAExpDLL
181 extern mama_status
183 
184 #if defined( __cplusplus )
185 }
186 #endif /* defined( __cplusplus ) */
187 
188 #endif /* MAMA_PUBLISHER_H_*/


© 2012 Linux Foundation