-
Notifications
You must be signed in to change notification settings - Fork 4
/
rpc_8h_source.html
399 lines (397 loc) · 62 KB
/
rpc_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libevent: event2/rpc.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libevent
 <span id="projectnumber">2.2.1</span>
</div>
<div id="projectbrief">Event notification library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_db160b4728e6067cf5f9cc14ec42c79d.html">event2</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">rpc.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="rpc_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2006-2007 Niels Provos <[email protected]></span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * modification, are permitted provided that the following conditions</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * are met:</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * 1. Redistributions of source code must retain the above copyright</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * notice, this list of conditions and the following disclaimer.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * notice, this list of conditions and the following disclaimer in the</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * documentation and/or other materials provided with the distribution.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * 3. The name of the author may not be used to endorse or promote products</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * derived from this software without specific prior written permission.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#ifndef EVENT2_RPC_H_INCLUDED_</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#define EVENT2_RPC_H_INCLUDED_</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  </div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment">/* For int types. */</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <<a class="code" href="util_8h.html">event2/util.h</a>></span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include <event2/visibility.h></span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  </div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  </div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="rpc_8h.html#a1a924e89c7a0c5eddc63cf9bf569fae6"> 80</a></span> <span class="preprocessor">#define EVTAG_HAS(msg, member) \</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="preprocessor"> ((msg)->member##_set == 1)</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  </div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="preprocessor">#ifndef EVENT2_RPC_COMPAT_H_INCLUDED_</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  </div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="rpc_8h.html#a8063c9f0927da79cc9e53600a77eecc6"> 92</a></span> <span class="preprocessor">#define EVTAG_ASSIGN(msg, member, value) \</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="preprocessor"> (*(msg)->base->member##_assign)((msg), (value))</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  </div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="rpc_8h.html#af420133e56a545bef6cba6f878d403d7"> 102</a></span> <span class="preprocessor">#define EVTAG_ASSIGN_WITH_LEN(msg, member, value, len) \</span></div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="preprocessor"> (*(msg)->base->member##_assign)((msg), (value), (len))</span></div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  </div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="rpc_8h.html#aef6e54053208c090c43d05c9b2259fb9"> 112</a></span> <span class="preprocessor">#define EVTAG_GET(msg, member, pvalue) \</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="preprocessor"> (*(msg)->base->member##_get)((msg), (pvalue))</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  </div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="rpc_8h.html#ae0b73ea41cb7f06976fd69a8f1be6219"> 123</a></span> <span class="preprocessor">#define EVTAG_GET_WITH_LEN(msg, member, pvalue, plen) \</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="preprocessor"> (*(msg)->base->member##_get)((msg), (pvalue), (plen))</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  </div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="preprocessor">#endif </span><span class="comment">/* EVENT2_RPC_COMPAT_H_INCLUDED_ */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  </div>
<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="rpc_8h.html#a796d8c44ee666b13ecbae36b0897820b"> 131</a></span> <span class="preprocessor">#define EVTAG_ARRAY_ADD_VALUE(msg, member, value) \</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="preprocessor"> (*(msg)->base->member##_add)((msg), (value))</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  </div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="rpc_8h.html#a8bd4b0f338823bffee3ead3885ea6791"> 136</a></span> <span class="preprocessor">#define EVTAG_ARRAY_ADD(msg, member) \</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> <span class="preprocessor"> (*(msg)->base->member##_add)(msg)</span></div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  </div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="rpc_8h.html#a1b955ffe442d49fdfe17c76a6e758880"> 141</a></span> <span class="preprocessor">#define EVTAG_ARRAY_GET(msg, member, offset, pvalue) \</span></div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="preprocessor"> (*(msg)->base->member##_get)((msg), (offset), (pvalue))</span></div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  </div>
<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="rpc_8h.html#ab4a0a6a9f8fbe20ced71eaebd297168b"> 146</a></span> <span class="preprocessor">#define EVTAG_ARRAY_LEN(msg, member) ((msg)->member##_length)</span></div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  </div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  </div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span> <span class="keyword">struct </span><a class="code" href="structevbuffer.html">evbuffer</a>;</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <span class="keyword">struct </span><a class="code" href="structevent__base.html">event_base</a>;</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span> <span class="keyword">struct </span>evrpc_req_generic;</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <span class="keyword">struct </span>evrpc_request_wrapper;</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span> <span class="keyword">struct </span>evrpc;</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  </div>
<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="rpc_8h.html#ae9eff66229e154543551a936c59dd8fa"> 159</a></span> <span class="preprocessor">#define EVRPC_STRUCT(rpcname) struct evrpc_req__##rpcname</span></div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  </div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span> <span class="keyword">struct </span>evhttp_request;</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span> <span class="keyword">struct </span>evrpc_status;</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span> <span class="keyword">struct </span>evrpc_hook_meta;</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  </div>
<div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="rpc_8h.html#aa526799df545537b2dc67358b0dfaa15"> 176</a></span> <span class="preprocessor">#define EVRPC_HEADER(rpcname, reqstruct, rplystruct) \</span></div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span> <span class="preprocessor">EVRPC_STRUCT(rpcname) { \</span></div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span> <span class="preprocessor"> struct evrpc_hook_meta *hook_meta; \</span></div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> <span class="preprocessor"> struct reqstruct* request; \</span></div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span> <span class="preprocessor"> struct rplystruct* reply; \</span></div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span> <span class="preprocessor"> struct evrpc* rpc; \</span></div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <span class="preprocessor"> struct evhttp_request* http_req; \</span></div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span> <span class="preprocessor"> struct evbuffer* rpc_data; \</span></div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span> <span class="preprocessor">}; \</span></div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span> <span class="preprocessor">EVENT2_EXPORT_SYMBOL \</span></div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span> <span class="preprocessor">int evrpc_send_request_##rpcname(struct evrpc_pool *, \</span></div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span> <span class="preprocessor"> struct reqstruct *, struct rplystruct *, \</span></div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span> <span class="preprocessor"> void (*)(struct evrpc_status *, \</span></div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span> <span class="preprocessor"> struct reqstruct *, struct rplystruct *, void *cbarg), \</span></div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span> <span class="preprocessor"> void *);</span></div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  </div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span> <span class="keyword">struct </span>evrpc_pool;</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  </div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span> <span class="keyword">struct </span>evrpc_request_wrapper *<a class="code" href="rpc_8h.html#a6a8bc24b989e67a6739fc11118ba0b3f">evrpc_make_request_ctx</a>(</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keyword">struct</span> evrpc_pool *pool, <span class="keywordtype">void</span> *request, <span class="keywordtype">void</span> *reply,</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *rpcname,</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keywordtype">void</span> (*req_marshal)(<span class="keyword">struct</span> <a class="code" href="structevbuffer.html">evbuffer</a>*, <span class="keywordtype">void</span> *),</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keywordtype">void</span> (*rpl_clear)(<span class="keywordtype">void</span> *),</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="keywordtype">int</span> (*rpl_unmarshal)(<span class="keywordtype">void</span> *, <span class="keyword">struct</span> <a class="code" href="structevbuffer.html">evbuffer</a> *),</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keywordtype">void</span> (*cb)(<span class="keyword">struct</span> evrpc_status *, <span class="keywordtype">void</span> *, <span class="keywordtype">void</span> *, <span class="keywordtype">void</span> *),</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="keywordtype">void</span> *cbarg);</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  </div>
<div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="rpc_8h.html#ad7694fa8f1b5995a9d43bef1da170fad"> 219</a></span> <span class="preprocessor">#define EVRPC_MAKE_CTX(rpcname, reqstruct, rplystruct, \</span></div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span> <span class="preprocessor"> pool, request, reply, cb, cbarg) \</span></div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span> <span class="preprocessor"> evrpc_make_request_ctx(pool, request, reply, \</span></div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span> <span class="preprocessor"> #rpcname, \</span></div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span> <span class="preprocessor"> (void (*)(struct evbuffer *, void *))reqstruct##_marshal, \</span></div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span> <span class="preprocessor"> (void (*)(void *))rplystruct##_clear, \</span></div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span> <span class="preprocessor"> (int (*)(void *, struct evbuffer *))rplystruct##_unmarshal, \</span></div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span> <span class="preprocessor"> (void (*)(struct evrpc_status *, void *, void *, void *))cb, \</span></div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span> <span class="preprocessor"> cbarg)</span></div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  </div>
<div class="line"><a name="l00239"></a><span class="lineno"><a class="line" href="rpc_8h.html#af7abcafae087e3c4dce6a4cd85346114"> 239</a></span> <span class="preprocessor">#define EVRPC_GENERATE(rpcname, reqstruct, rplystruct) \</span></div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span> <span class="preprocessor"> int evrpc_send_request_##rpcname(struct evrpc_pool *pool, \</span></div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span> <span class="preprocessor"> struct reqstruct *request, struct rplystruct *reply, \</span></div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span> <span class="preprocessor"> void (*cb)(struct evrpc_status *, \</span></div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span> <span class="preprocessor"> struct reqstruct *, struct rplystruct *, void *cbarg), \</span></div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span> <span class="preprocessor"> void *cbarg) { \</span></div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span> <span class="preprocessor"> return evrpc_send_request_generic(pool, request, reply, \</span></div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span> <span class="preprocessor"> (void (*)(struct evrpc_status *, void *, void *, void *))cb, \</span></div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span> <span class="preprocessor"> cbarg, \</span></div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span> <span class="preprocessor"> #rpcname, \</span></div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span> <span class="preprocessor"> (void (*)(struct evbuffer *, void *))reqstruct##_marshal, \</span></div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span> <span class="preprocessor"> (void (*)(void *))rplystruct##_clear, \</span></div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span> <span class="preprocessor"> (int (*)(void *, struct evbuffer *))rplystruct##_unmarshal); \</span></div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span> <span class="preprocessor">}</span></div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  </div>
<div class="line"><a name="l00263"></a><span class="lineno"><a class="line" href="rpc_8h.html#af78e1869994ee9597a9a0785d25fbf0b"> 263</a></span> <span class="preprocessor">#define EVRPC_REQUEST_HTTP(rpc_req) (rpc_req)->http_req</span></div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  </div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span> <span class="keywordtype">void</span> <a class="code" href="rpc_8h.html#a7c74b9d6cd83891ed8f03435892a0e5d">evrpc_request_done</a>(<span class="keyword">struct</span> evrpc_req_generic *req);</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  </div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span> <span class="keywordtype">void</span> *<a class="code" href="rpc_8h.html#abb47f45ebbc9c6322f3d57dc0bc9dd0d">evrpc_get_request</a>(<span class="keyword">struct</span> evrpc_req_generic *req);</div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span> <span class="keywordtype">void</span> *evrpc_get_reply(<span class="keyword">struct</span> evrpc_req_generic *req);</div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  </div>
<div class="line"><a name="l00283"></a><span class="lineno"><a class="line" href="rpc_8h.html#a36d6ba276baf3c95df69db35a2ef1527"> 283</a></span> <span class="preprocessor">#define EVRPC_REQUEST_DONE(rpc_req) do { \</span></div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span> <span class="preprocessor"> struct evrpc_req_generic *req_ = (struct evrpc_req_generic *)(rpc_req); \</span></div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span> <span class="preprocessor"> evrpc_request_done(req_); \</span></div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span> <span class="preprocessor">} while (0)</span></div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  </div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  </div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span> <span class="keyword">struct </span>evrpc_base;</div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span> <span class="keyword">struct </span>evhttp;</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  </div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span> <span class="comment">/* functions to start up the rpc system */</span></div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  </div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span> <span class="keyword">struct </span>evrpc_base *<a class="code" href="rpc_8h.html#ac86c02abb0baa97c82efe94a72ae8178">evrpc_init</a>(<span class="keyword">struct</span> evhttp *server);</div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  </div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span> <span class="keywordtype">void</span> <a class="code" href="rpc_8h.html#aefeb82c78c1a6e2338d32cfcb02297c6">evrpc_free</a>(<span class="keyword">struct</span> evrpc_base *base);</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  </div>
<div class="line"><a name="l00330"></a><span class="lineno"><a class="line" href="rpc_8h.html#abb204281e2555a1e91ff3885747d0533"> 330</a></span> <span class="preprocessor">#define EVRPC_REGISTER(base, name, request, reply, callback, cbarg) \</span></div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span> <span class="preprocessor"> evrpc_register_generic(base, #name, \</span></div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span> <span class="preprocessor"> (void (*)(struct evrpc_req_generic *, void *))callback, cbarg, \</span></div>
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span> <span class="preprocessor"> (void *(*)(void *))request##_new_with_arg, NULL, \</span></div>
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span> <span class="preprocessor"> (void (*)(void *))request##_free, \</span></div>
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span> <span class="preprocessor"> (int (*)(void *, struct evbuffer *))request##_unmarshal, \</span></div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span> <span class="preprocessor"> (void *(*)(void *))reply##_new_with_arg, NULL, \</span></div>
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span> <span class="preprocessor"> (void (*)(void *))reply##_free, \</span></div>
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span> <span class="preprocessor"> (int (*)(void *))reply##_complete, \</span></div>
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span> <span class="preprocessor"> (void (*)(struct evbuffer *, void *))reply##_marshal)</span></div>
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  </div>
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span> <span class="keywordtype">int</span> <a class="code" href="rpc_8h.html#ab8687528c294762984a097ecf4575713">evrpc_register_rpc</a>(<span class="keyword">struct</span> evrpc_base *, <span class="keyword">struct</span> evrpc *,</div>
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  <span class="keywordtype">void</span> (*)(<span class="keyword">struct</span> evrpc_req_generic*, <span class="keywordtype">void</span> *), <span class="keywordtype">void</span> *);</div>
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  </div>
<div class="line"><a name="l00360"></a><span class="lineno"><a class="line" href="rpc_8h.html#ab646cdf50e026accddcd9fe23b35837b"> 360</a></span> <span class="preprocessor">#define EVRPC_UNREGISTER(base, name) evrpc_unregister_rpc((base), #name)</span></div>
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  </div>
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span> <span class="keywordtype">int</span> evrpc_unregister_rpc(<span class="keyword">struct</span> evrpc_base *base, <span class="keyword">const</span> <span class="keywordtype">char</span> *name);</div>
<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  </div>
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span> <span class="comment">/*</span></div>
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span> <span class="comment"> * Client-side RPC support</span></div>
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  </div>
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span> <span class="keyword">struct </span>evhttp_connection;</div>
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span> <span class="keyword">struct </span>evrpc_status;</div>
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  </div>
<div class="line"><a name="l00387"></a><span class="lineno"><a class="line" href="rpc_8h.html#aff0efcd7cb8b966256b5127960bd2c81"> 387</a></span> <span class="preprocessor">#define EVRPC_MAKE_REQUEST(name, pool, request, reply, cb, cbarg) \</span></div>
<div class="line"><a name="l00388"></a><span class="lineno"> 388</span> <span class="preprocessor"> evrpc_send_request_##name((pool), (request), (reply), (cb), (cbarg))</span></div>
<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  </div>
<div class="line"><a name="l00401"></a><span class="lineno"> 401</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00402"></a><span class="lineno"> 402</span> <span class="keywordtype">int</span> <a class="code" href="rpc_8h.html#a1e45aa64f32b7a0a780b914b4a7b83c5">evrpc_make_request</a>(<span class="keyword">struct</span> evrpc_request_wrapper *ctx);</div>
<div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  </div>
<div class="line"><a name="l00415"></a><span class="lineno"> 415</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00416"></a><span class="lineno"> 416</span> <span class="keyword">struct </span>evrpc_pool *<a class="code" href="rpc_8h.html#a3098d4fd0966fe525d86f0f717771389">evrpc_pool_new</a>(<span class="keyword">struct</span> <a class="code" href="structevent__base.html">event_base</a> *base);</div>
<div class="line"><a name="l00422"></a><span class="lineno"> 422</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00423"></a><span class="lineno"> 423</span> <span class="keywordtype">void</span> <a class="code" href="rpc_8h.html#ab8579f465aee520bb8ac1b208d1d8d95">evrpc_pool_free</a>(<span class="keyword">struct</span> evrpc_pool *pool);</div>
<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  </div>
<div class="line"><a name="l00433"></a><span class="lineno"> 433</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00434"></a><span class="lineno"> 434</span> <span class="keywordtype">void</span> <a class="code" href="rpc_8h.html#a9e3bedffaef59f2ccc1c0003ce05da8c">evrpc_pool_add_connection</a>(<span class="keyword">struct</span> evrpc_pool *pool,</div>
<div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="keyword">struct</span> evhttp_connection *evcon);</div>
<div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  </div>
<div class="line"><a name="l00445"></a><span class="lineno"> 445</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00446"></a><span class="lineno"> 446</span> <span class="keywordtype">void</span> <a class="code" href="rpc_8h.html#a6272b6b974e4abe27ccb1273ba37b100">evrpc_pool_remove_connection</a>(<span class="keyword">struct</span> evrpc_pool *pool,</div>
<div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  <span class="keyword">struct</span> evhttp_connection *evcon);</div>
<div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  </div>
<div class="line"><a name="l00464"></a><span class="lineno"> 464</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00465"></a><span class="lineno"> 465</span> <span class="keywordtype">void</span> <a class="code" href="rpc_8h.html#a0164fb784c8b8907e30861f2fee89c44">evrpc_pool_set_timeout</a>(<span class="keyword">struct</span> evrpc_pool *pool, <span class="keywordtype">int</span> timeout_in_secs);</div>
<div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  </div>
<div class="line"><a name="l00472"></a><span class="lineno"><a class="line" href="rpc_8h.html#a66eff7ea6bdd17e53fde6c4d9dc1835b"> 472</a></span> <span class="keyword">enum</span> <a class="code" href="rpc_8h.html#a66eff7ea6bdd17e53fde6c4d9dc1835b">EVRPC_HOOK_TYPE</a> {</div>
<div class="line"><a name="l00473"></a><span class="lineno"><a class="line" href="rpc_8h.html#a66eff7ea6bdd17e53fde6c4d9dc1835ba2a62d2e1147edb5b460c1abb17be9734"> 473</a></span>  <a class="code" href="rpc_8h.html#a66eff7ea6bdd17e53fde6c4d9dc1835ba2a62d2e1147edb5b460c1abb17be9734">EVRPC_INPUT</a>, </div>
<div class="line"><a name="l00474"></a><span class="lineno"><a class="line" href="rpc_8h.html#a66eff7ea6bdd17e53fde6c4d9dc1835bad63587ff3a66808e422f1ca48c9db85e"> 474</a></span>  <a class="code" href="rpc_8h.html#a66eff7ea6bdd17e53fde6c4d9dc1835bad63587ff3a66808e422f1ca48c9db85e">EVRPC_OUTPUT</a> </div>
<div class="line"><a name="l00475"></a><span class="lineno"> 475</span> };</div>
<div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  </div>
<div class="line"><a name="l00477"></a><span class="lineno"> 477</span> <span class="preprocessor">#ifndef _WIN32</span></div>
<div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  </div>
<div class="line"><a name="l00480"></a><span class="lineno"><a class="line" href="rpc_8h.html#a1bb283bd7893b9855e2f23013891fc82"> 480</a></span> <span class="preprocessor">#define INPUT EVRPC_INPUT</span></div>
<div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  </div>
<div class="line"><a name="l00483"></a><span class="lineno"><a class="line" href="rpc_8h.html#a61a3c9a18380aafb6e430e79bf596557"> 483</a></span> <span class="preprocessor">#define OUTPUT EVRPC_OUTPUT</span></div>
<div class="line"><a name="l00484"></a><span class="lineno"> 484</span> <span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  </div>
<div class="line"><a name="l00490"></a><span class="lineno"><a class="line" href="rpc_8h.html#a9c37f133ebc96b2bd66c472079b1338b"> 490</a></span> <span class="keyword">enum</span> <a class="code" href="rpc_8h.html#a9c37f133ebc96b2bd66c472079b1338b">EVRPC_HOOK_RESULT</a> {</div>
<div class="line"><a name="l00491"></a><span class="lineno"><a class="line" href="rpc_8h.html#a9c37f133ebc96b2bd66c472079b1338ba61de2cad490f408aa9ecc3427cfb6233"> 491</a></span>  <a class="code" href="rpc_8h.html#a9c37f133ebc96b2bd66c472079b1338ba61de2cad490f408aa9ecc3427cfb6233">EVRPC_TERMINATE</a> = -1, </div>
<div class="line"><a name="l00492"></a><span class="lineno"><a class="line" href="rpc_8h.html#a9c37f133ebc96b2bd66c472079b1338ba4f92aee79d3413c4940eeb578ee33643"> 492</a></span>  <a class="code" href="rpc_8h.html#a9c37f133ebc96b2bd66c472079b1338ba4f92aee79d3413c4940eeb578ee33643">EVRPC_CONTINUE</a> = 0, </div>
<div class="line"><a name="l00493"></a><span class="lineno"><a class="line" href="rpc_8h.html#a9c37f133ebc96b2bd66c472079b1338baff86ced7cf446eec75868ba64d956b9c"> 493</a></span>  <a class="code" href="rpc_8h.html#a9c37f133ebc96b2bd66c472079b1338baff86ced7cf446eec75868ba64d956b9c">EVRPC_PAUSE</a> = 1 </div>
<div class="line"><a name="l00494"></a><span class="lineno"> 494</span> };</div>
<div class="line"><a name="l00495"></a><span class="lineno"> 495</span>  </div>
<div class="line"><a name="l00512"></a><span class="lineno"> 512</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00513"></a><span class="lineno"> 513</span> <span class="keywordtype">void</span> *<a class="code" href="rpc_8h.html#a5d82ac478904ddadeba9af7e695b254d">evrpc_add_hook</a>(<span class="keywordtype">void</span> *vbase,</div>
<div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  <span class="keyword">enum</span> <a class="code" href="rpc_8h.html#a66eff7ea6bdd17e53fde6c4d9dc1835b">EVRPC_HOOK_TYPE</a> hook_type,</div>
<div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  <span class="keywordtype">int</span> (*cb)(<span class="keywordtype">void</span> *, <span class="keyword">struct</span> evhttp_request *, <span class="keyword">struct</span> <a class="code" href="structevbuffer.html">evbuffer</a> *, <span class="keywordtype">void</span> *),</div>
<div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  <span class="keywordtype">void</span> *cb_arg);</div>
<div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  </div>
<div class="line"><a name="l00526"></a><span class="lineno"> 526</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00527"></a><span class="lineno"> 527</span> <span class="keywordtype">int</span> <a class="code" href="rpc_8h.html#ab77b039cae7b4f94bfff18382bef981f">evrpc_remove_hook</a>(<span class="keywordtype">void</span> *vbase,</div>
<div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  <span class="keyword">enum</span> <a class="code" href="rpc_8h.html#a66eff7ea6bdd17e53fde6c4d9dc1835b">EVRPC_HOOK_TYPE</a> hook_type,</div>
<div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  <span class="keywordtype">void</span> *handle);</div>
<div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  </div>
<div class="line"><a name="l00536"></a><span class="lineno"> 536</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00537"></a><span class="lineno"> 537</span> <span class="keywordtype">int</span> <a class="code" href="rpc_8h.html#a8e7a8aabcd4e216d1e32254bfba33472">evrpc_resume_request</a>(<span class="keywordtype">void</span> *vbase, <span class="keywordtype">void</span> *ctx, <span class="keyword">enum</span> <a class="code" href="rpc_8h.html#a9c37f133ebc96b2bd66c472079b1338b">EVRPC_HOOK_RESULT</a> res);</div>
<div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  </div>
<div class="line"><a name="l00551"></a><span class="lineno"> 551</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00552"></a><span class="lineno"> 552</span> <span class="keywordtype">int</span> <a class="code" href="rpc_8h.html#afddaba85bd35b7a99ff69daa73b9a98d">evrpc_hook_add_meta</a>(<span class="keywordtype">void</span> *ctx, <span class="keyword">const</span> <span class="keywordtype">char</span> *key,</div>
<div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  <span class="keyword">const</span> <span class="keywordtype">void</span> *data, <span class="keywordtype">size_t</span> data_size);</div>
<div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  </div>
<div class="line"><a name="l00565"></a><span class="lineno"> 565</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00566"></a><span class="lineno"> 566</span> <span class="keywordtype">int</span> <a class="code" href="rpc_8h.html#a5e6215f4f22ab5bc5d72159143cefcea">evrpc_hook_find_meta</a>(<span class="keywordtype">void</span> *ctx, <span class="keyword">const</span> <span class="keywordtype">char</span> *key,</div>
<div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  <span class="keywordtype">void</span> **data, <span class="keywordtype">size_t</span> *data_size);</div>
<div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  </div>
<div class="line"><a name="l00576"></a><span class="lineno"> 576</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00577"></a><span class="lineno"> 577</span> <span class="keyword">struct </span>evhttp_connection *<a class="code" href="rpc_8h.html#afb04e638c158bd3fe3a0e73000e39f10">evrpc_hook_get_connection</a>(<span class="keywordtype">void</span> *ctx);</div>
<div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  </div>
<div class="line"><a name="l00586"></a><span class="lineno"> 586</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00587"></a><span class="lineno"> 587</span> <span class="keywordtype">int</span> <a class="code" href="rpc_8h.html#a99dc1ab2f6775a743dac96cdf2d5ace0">evrpc_send_request_generic</a>(<span class="keyword">struct</span> evrpc_pool *pool,</div>
<div class="line"><a name="l00588"></a><span class="lineno"> 588</span>  <span class="keywordtype">void</span> *request, <span class="keywordtype">void</span> *reply,</div>
<div class="line"><a name="l00589"></a><span class="lineno"> 589</span>  <span class="keywordtype">void</span> (*cb)(<span class="keyword">struct</span> evrpc_status *, <span class="keywordtype">void</span> *, <span class="keywordtype">void</span> *, <span class="keywordtype">void</span> *),</div>
<div class="line"><a name="l00590"></a><span class="lineno"> 590</span>  <span class="keywordtype">void</span> *cb_arg,</div>
<div class="line"><a name="l00591"></a><span class="lineno"> 591</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *rpcname,</div>
<div class="line"><a name="l00592"></a><span class="lineno"> 592</span>  <span class="keywordtype">void</span> (*req_marshal)(<span class="keyword">struct</span> <a class="code" href="structevbuffer.html">evbuffer</a> *, <span class="keywordtype">void</span> *),</div>
<div class="line"><a name="l00593"></a><span class="lineno"> 593</span>  <span class="keywordtype">void</span> (*rpl_clear)(<span class="keywordtype">void</span> *),</div>
<div class="line"><a name="l00594"></a><span class="lineno"> 594</span>  <span class="keywordtype">int</span> (*rpl_unmarshal)(<span class="keywordtype">void</span> *, <span class="keyword">struct</span> <a class="code" href="structevbuffer.html">evbuffer</a> *));</div>
<div class="line"><a name="l00595"></a><span class="lineno"> 595</span>  </div>
<div class="line"><a name="l00603"></a><span class="lineno"> 603</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00604"></a><span class="lineno"> 604</span> <span class="keywordtype">int</span> <a class="code" href="rpc_8h.html#aad265540d04241d80f60847718db5913">evrpc_register_generic</a>(<span class="keyword">struct</span> evrpc_base *base, <span class="keyword">const</span> <span class="keywordtype">char</span> *name,</div>
<div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  <span class="keywordtype">void</span> (*callback)(<span class="keyword">struct</span> evrpc_req_generic *, <span class="keywordtype">void</span> *), <span class="keywordtype">void</span> *cbarg,</div>
<div class="line"><a name="l00606"></a><span class="lineno"> 606</span>  <span class="keywordtype">void</span> *(*req_new)(<span class="keywordtype">void</span> *), <span class="keywordtype">void</span> *req_new_arg, <span class="keywordtype">void</span> (*req_free)(<span class="keywordtype">void</span> *),</div>
<div class="line"><a name="l00607"></a><span class="lineno"> 607</span>  <span class="keywordtype">int</span> (*req_unmarshal)(<span class="keywordtype">void</span> *, <span class="keyword">struct</span> <a class="code" href="structevbuffer.html">evbuffer</a> *),</div>
<div class="line"><a name="l00608"></a><span class="lineno"> 608</span>  <span class="keywordtype">void</span> *(*rpl_new)(<span class="keywordtype">void</span> *), <span class="keywordtype">void</span> *rpl_new_arg, <span class="keywordtype">void</span> (*rpl_free)(<span class="keywordtype">void</span> *),</div>
<div class="line"><a name="l00609"></a><span class="lineno"> 609</span>  <span class="keywordtype">int</span> (*rpl_complete)(<span class="keywordtype">void</span> *),</div>
<div class="line"><a name="l00610"></a><span class="lineno"> 610</span>  <span class="keywordtype">void</span> (*rpl_marshal)(<span class="keyword">struct</span> <a class="code" href="structevbuffer.html">evbuffer</a> *, <span class="keywordtype">void</span> *));</div>
<div class="line"><a name="l00611"></a><span class="lineno"> 611</span>  </div>
<div class="line"><a name="l00613"></a><span class="lineno"> 613</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00614"></a><span class="lineno"> 614</span> <span class="keyword">struct </span>evrpc_pool* <a class="code" href="rpc_8h.html#af6dd0d42ecc04297df768300e5f24b31">evrpc_request_get_pool</a>(<span class="keyword">struct</span> evrpc_request_wrapper *ctx);</div>
<div class="line"><a name="l00615"></a><span class="lineno"> 615</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00616"></a><span class="lineno"> 616</span> <span class="keywordtype">void</span> evrpc_request_set_pool(<span class="keyword">struct</span> evrpc_request_wrapper *ctx,</div>
<div class="line"><a name="l00617"></a><span class="lineno"> 617</span>  <span class="keyword">struct</span> evrpc_pool *pool);</div>
<div class="line"><a name="l00618"></a><span class="lineno"> 618</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00619"></a><span class="lineno"> 619</span> <span class="keywordtype">void</span> evrpc_request_set_cb(<span class="keyword">struct</span> evrpc_request_wrapper *ctx,</div>
<div class="line"><a name="l00620"></a><span class="lineno"> 620</span>  <span class="keywordtype">void</span> (*cb)(<span class="keyword">struct</span> evrpc_status*, <span class="keywordtype">void</span> *request, <span class="keywordtype">void</span> *reply, <span class="keywordtype">void</span> *arg),</div>
<div class="line"><a name="l00621"></a><span class="lineno"> 621</span>  <span class="keywordtype">void</span> *cb_arg);</div>
<div class="line"><a name="l00622"></a><span class="lineno"> 622</span>  </div>
<div class="line"><a name="l00623"></a><span class="lineno"> 623</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00624"></a><span class="lineno"> 624</span> }</div>
<div class="line"><a name="l00625"></a><span class="lineno"> 625</span> <span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00626"></a><span class="lineno"> 626</span>  </div>
<div class="line"><a name="l00627"></a><span class="lineno"> 627</span> <span class="preprocessor">#endif </span><span class="comment">/* EVENT2_RPC_H_INCLUDED_ */</span><span class="preprocessor"></span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="arpc_8h_html_a9c37f133ebc96b2bd66c472079b1338ba61de2cad490f408aa9ecc3427cfb6233"><div class="ttname"><a href="rpc_8h.html#a9c37f133ebc96b2bd66c472079b1338ba61de2cad490f408aa9ecc3427cfb6233">EVRPC_TERMINATE</a></div><div class="ttdeci">@ EVRPC_TERMINATE</div><div class="ttdoc">indicates the rpc should be terminated</div><div class="ttdef"><b>Definition:</b> rpc.h:491</div></div>
<div class="ttc" id="arpc_8h_html_a7c74b9d6cd83891ed8f03435892a0e5d"><div class="ttname"><a href="rpc_8h.html#a7c74b9d6cd83891ed8f03435892a0e5d">evrpc_request_done</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL void evrpc_request_done(struct evrpc_req_generic *req)</div><div class="ttdoc">completes the server response to an rpc request</div></div>
<div class="ttc" id="arpc_8h_html_a0164fb784c8b8907e30861f2fee89c44"><div class="ttname"><a href="rpc_8h.html#a0164fb784c8b8907e30861f2fee89c44">evrpc_pool_set_timeout</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL void evrpc_pool_set_timeout(struct evrpc_pool *pool, int timeout_in_secs)</div><div class="ttdoc">Sets the timeout in secs after which a request has to complete.</div></div>
<div class="ttc" id="arpc_8h_html_a66eff7ea6bdd17e53fde6c4d9dc1835ba2a62d2e1147edb5b460c1abb17be9734"><div class="ttname"><a href="rpc_8h.html#a66eff7ea6bdd17e53fde6c4d9dc1835ba2a62d2e1147edb5b460c1abb17be9734">EVRPC_INPUT</a></div><div class="ttdeci">@ EVRPC_INPUT</div><div class="ttdoc">apply the function to an input hook</div><div class="ttdef"><b>Definition:</b> rpc.h:473</div></div>
<div class="ttc" id="arpc_8h_html_a6a8bc24b989e67a6739fc11118ba0b3f"><div class="ttname"><a href="rpc_8h.html#a6a8bc24b989e67a6739fc11118ba0b3f">evrpc_make_request_ctx</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL struct evrpc_request_wrapper * evrpc_make_request_ctx(struct evrpc_pool *pool, void *request, void *reply, const char *rpcname, void(*req_marshal)(struct evbuffer *, void *), void(*rpl_clear)(void *), int(*rpl_unmarshal)(void *, struct evbuffer *), void(*cb)(struct evrpc_status *, void *, void *, void *), void *cbarg)</div><div class="ttdoc">use EVRPC_GENERATE instead</div></div>
<div class="ttc" id="astructevent__base_html"><div class="ttname"><a href="structevent__base.html">event_base</a></div><div class="ttdoc">Structure to hold information and state for a Libevent dispatch loop.</div><div class="ttdef"><b>Definition:</b> event.h:219</div></div>
<div class="ttc" id="arpc_8h_html_a5e6215f4f22ab5bc5d72159143cefcea"><div class="ttname"><a href="rpc_8h.html#a5e6215f4f22ab5bc5d72159143cefcea">evrpc_hook_find_meta</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evrpc_hook_find_meta(void *ctx, const char *key, void **data, size_t *data_size)</div><div class="ttdoc">retrieves meta data previously associated</div></div>
<div class="ttc" id="arpc_8h_html_a9c37f133ebc96b2bd66c472079b1338b"><div class="ttname"><a href="rpc_8h.html#a9c37f133ebc96b2bd66c472079b1338b">EVRPC_HOOK_RESULT</a></div><div class="ttdeci">EVRPC_HOOK_RESULT</div><div class="ttdoc">Return value from hook processing functions.</div><div class="ttdef"><b>Definition:</b> rpc.h:490</div></div>
<div class="ttc" id="arpc_8h_html_a9c37f133ebc96b2bd66c472079b1338ba4f92aee79d3413c4940eeb578ee33643"><div class="ttname"><a href="rpc_8h.html#a9c37f133ebc96b2bd66c472079b1338ba4f92aee79d3413c4940eeb578ee33643">EVRPC_CONTINUE</a></div><div class="ttdeci">@ EVRPC_CONTINUE</div><div class="ttdoc">continue processing the rpc</div><div class="ttdef"><b>Definition:</b> rpc.h:492</div></div>
<div class="ttc" id="arpc_8h_html_ab77b039cae7b4f94bfff18382bef981f"><div class="ttname"><a href="rpc_8h.html#ab77b039cae7b4f94bfff18382bef981f">evrpc_remove_hook</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evrpc_remove_hook(void *vbase, enum EVRPC_HOOK_TYPE hook_type, void *handle)</div><div class="ttdoc">removes a previously added hook</div></div>
<div class="ttc" id="arpc_8h_html_a6272b6b974e4abe27ccb1273ba37b100"><div class="ttname"><a href="rpc_8h.html#a6272b6b974e4abe27ccb1273ba37b100">evrpc_pool_remove_connection</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL void evrpc_pool_remove_connection(struct evrpc_pool *pool, struct evhttp_connection *evcon)</div><div class="ttdoc">Removes a connection from the pool.</div></div>
<div class="ttc" id="arpc_8h_html_aad265540d04241d80f60847718db5913"><div class="ttname"><a href="rpc_8h.html#aad265540d04241d80f60847718db5913">evrpc_register_generic</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evrpc_register_generic(struct evrpc_base *base, const char *name, void(*callback)(struct evrpc_req_generic *, void *), void *cbarg, void *(*req_new)(void *), void *req_new_arg, void(*req_free)(void *), int(*req_unmarshal)(void *, struct evbuffer *), void *(*rpl_new)(void *), void *rpl_new_arg, void(*rpl_free)(void *), int(*rpl_complete)(void *), void(*rpl_marshal)(struct evbuffer *, void *))</div><div class="ttdoc">Function for registering a generic RPC with the RPC base.</div></div>
<div class="ttc" id="arpc_8h_html_a5d82ac478904ddadeba9af7e695b254d"><div class="ttname"><a href="rpc_8h.html#a5d82ac478904ddadeba9af7e695b254d">evrpc_add_hook</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL void * evrpc_add_hook(void *vbase, enum EVRPC_HOOK_TYPE hook_type, int(*cb)(void *, struct evhttp_request *, struct evbuffer *, void *), void *cb_arg)</div><div class="ttdoc">adds a processing hook to either an rpc base or rpc pool</div></div>
<div class="ttc" id="arpc_8h_html_ab8579f465aee520bb8ac1b208d1d8d95"><div class="ttname"><a href="rpc_8h.html#ab8579f465aee520bb8ac1b208d1d8d95">evrpc_pool_free</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL void evrpc_pool_free(struct evrpc_pool *pool)</div><div class="ttdoc">frees an rpc connection pool</div></div>
<div class="ttc" id="arpc_8h_html_afddaba85bd35b7a99ff69daa73b9a98d"><div class="ttname"><a href="rpc_8h.html#afddaba85bd35b7a99ff69daa73b9a98d">evrpc_hook_add_meta</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evrpc_hook_add_meta(void *ctx, const char *key, const void *data, size_t data_size)</div><div class="ttdoc">adds meta data to request</div></div>
<div class="ttc" id="astructevbuffer_html"><div class="ttname"><a href="structevbuffer.html">evbuffer</a></div><div class="ttdoc">An evbuffer is an opaque data type for efficiently buffering data to be sent or received on the netwo...</div><div class="ttdef"><b>Definition:</b> buffer.h:97</div></div>
<div class="ttc" id="arpc_8h_html_a3098d4fd0966fe525d86f0f717771389"><div class="ttname"><a href="rpc_8h.html#a3098d4fd0966fe525d86f0f717771389">evrpc_pool_new</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL struct evrpc_pool * evrpc_pool_new(struct event_base *base)</div><div class="ttdoc">creates an rpc connection pool</div></div>
<div class="ttc" id="arpc_8h_html_a1e45aa64f32b7a0a780b914b4a7b83c5"><div class="ttname"><a href="rpc_8h.html#a1e45aa64f32b7a0a780b914b4a7b83c5">evrpc_make_request</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evrpc_make_request(struct evrpc_request_wrapper *ctx)</div><div class="ttdoc">Makes an RPC request based on the provided context.</div></div>
<div class="ttc" id="arpc_8h_html_af6dd0d42ecc04297df768300e5f24b31"><div class="ttname"><a href="rpc_8h.html#af6dd0d42ecc04297df768300e5f24b31">evrpc_request_get_pool</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL struct evrpc_pool * evrpc_request_get_pool(struct evrpc_request_wrapper *ctx)</div><div class="ttdoc">accessors for obscure and undocumented functionality</div></div>
<div class="ttc" id="arpc_8h_html_aefeb82c78c1a6e2338d32cfcb02297c6"><div class="ttname"><a href="rpc_8h.html#aefeb82c78c1a6e2338d32cfcb02297c6">evrpc_free</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL void evrpc_free(struct evrpc_base *base)</div><div class="ttdoc">Frees the evrpc base.</div></div>
<div class="ttc" id="arpc_8h_html_a8e7a8aabcd4e216d1e32254bfba33472"><div class="ttname"><a href="rpc_8h.html#a8e7a8aabcd4e216d1e32254bfba33472">evrpc_resume_request</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evrpc_resume_request(void *vbase, void *ctx, enum EVRPC_HOOK_RESULT res)</div><div class="ttdoc">resume a paused request</div></div>
<div class="ttc" id="arpc_8h_html_a66eff7ea6bdd17e53fde6c4d9dc1835bad63587ff3a66808e422f1ca48c9db85e"><div class="ttname"><a href="rpc_8h.html#a66eff7ea6bdd17e53fde6c4d9dc1835bad63587ff3a66808e422f1ca48c9db85e">EVRPC_OUTPUT</a></div><div class="ttdeci">@ EVRPC_OUTPUT</div><div class="ttdoc">apply the function to an output hook</div><div class="ttdef"><b>Definition:</b> rpc.h:474</div></div>
<div class="ttc" id="arpc_8h_html_a99dc1ab2f6775a743dac96cdf2d5ace0"><div class="ttname"><a href="rpc_8h.html#a99dc1ab2f6775a743dac96cdf2d5ace0">evrpc_send_request_generic</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evrpc_send_request_generic(struct evrpc_pool *pool, void *request, void *reply, void(*cb)(struct evrpc_status *, void *, void *, void *), void *cb_arg, const char *rpcname, void(*req_marshal)(struct evbuffer *, void *), void(*rpl_clear)(void *), int(*rpl_unmarshal)(void *, struct evbuffer *))</div><div class="ttdoc">Function for sending a generic RPC request.</div></div>
<div class="ttc" id="arpc_8h_html_a9c37f133ebc96b2bd66c472079b1338baff86ced7cf446eec75868ba64d956b9c"><div class="ttname"><a href="rpc_8h.html#a9c37f133ebc96b2bd66c472079b1338baff86ced7cf446eec75868ba64d956b9c">EVRPC_PAUSE</a></div><div class="ttdeci">@ EVRPC_PAUSE</div><div class="ttdoc">pause processing request until resumed</div><div class="ttdef"><b>Definition:</b> rpc.h:493</div></div>
<div class="ttc" id="arpc_8h_html_afb04e638c158bd3fe3a0e73000e39f10"><div class="ttname"><a href="rpc_8h.html#afb04e638c158bd3fe3a0e73000e39f10">evrpc_hook_get_connection</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL struct evhttp_connection * evrpc_hook_get_connection(void *ctx)</div><div class="ttdoc">returns the connection object associated with the request</div></div>
<div class="ttc" id="arpc_8h_html_ac86c02abb0baa97c82efe94a72ae8178"><div class="ttname"><a href="rpc_8h.html#ac86c02abb0baa97c82efe94a72ae8178">evrpc_init</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL struct evrpc_base * evrpc_init(struct evhttp *server)</div><div class="ttdoc">Creates a new rpc base from which RPC requests can be received.</div></div>
<div class="ttc" id="arpc_8h_html_a9e3bedffaef59f2ccc1c0003ce05da8c"><div class="ttname"><a href="rpc_8h.html#a9e3bedffaef59f2ccc1c0003ce05da8c">evrpc_pool_add_connection</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL void evrpc_pool_add_connection(struct evrpc_pool *pool, struct evhttp_connection *evcon)</div><div class="ttdoc">Adds a connection over which rpc can be dispatched to the pool.</div></div>
<div class="ttc" id="arpc_8h_html_abb47f45ebbc9c6322f3d57dc0bc9dd0d"><div class="ttname"><a href="rpc_8h.html#abb47f45ebbc9c6322f3d57dc0bc9dd0d">evrpc_get_request</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL void * evrpc_get_request(struct evrpc_req_generic *req)</div><div class="ttdoc">accessors for request and reply</div></div>
<div class="ttc" id="arpc_8h_html_ab8687528c294762984a097ecf4575713"><div class="ttname"><a href="rpc_8h.html#ab8687528c294762984a097ecf4575713">evrpc_register_rpc</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evrpc_register_rpc(struct evrpc_base *, struct evrpc *, void(*)(struct evrpc_req_generic *, void *), void *)</div><div class="ttdoc">Low level function for registering an RPC with a server.</div></div>
<div class="ttc" id="autil_8h_html"><div class="ttname"><a href="util_8h.html">util.h</a></div><div class="ttdoc">Common convenience functions for cross-platform portability and related socket manipulations.</div></div>
<div class="ttc" id="arpc_8h_html_a66eff7ea6bdd17e53fde6c4d9dc1835b"><div class="ttname"><a href="rpc_8h.html#a66eff7ea6bdd17e53fde6c4d9dc1835b">EVRPC_HOOK_TYPE</a></div><div class="ttdeci">EVRPC_HOOK_TYPE</div><div class="ttdoc">Hooks for changing the input and output of RPCs; this can be used to implement compression,...</div><div class="ttdef"><b>Definition:</b> rpc.h:472</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>