mastodonpp/docs/curl__wrapper_8hpp_source.html
2020-01-09 18:51:18 +01:00

226 lines
28 KiB
HTML

<!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.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>mastodonpp: include/curl_wrapper.hpp 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">mastodonpp
&#160;<span id="projectnumber">0.0.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;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&amp;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_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">curl_wrapper.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/* This file is part of mastodonpp.</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Copyright © 2020 tastytea &lt;tastytea@tastytea.de&gt;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * This program is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * it under the terms of the GNU Affero General Public License as published by</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * the Free Software Foundation, version 3.</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * This program is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * GNU Affero General Public License for more details.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * You should have received a copy of the GNU Affero General Public License</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#ifndef MASTODONPP_CURL_WRAPPER_HPP</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#define MASTODONPP_CURL_WRAPPER_HPP</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &quot;answer.hpp&quot;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &quot;curl/curl.h&quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; </div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;map&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;mutex&gt;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &lt;string_view&gt;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &lt;variant&gt;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacemastodonpp.html">mastodonpp</a></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;{</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="keyword">using</span> std::map;</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="keyword">using</span> std::mutex;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="keyword">using</span> std::string;</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">using</span> std::string_view;</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="keyword">using</span> std::variant;</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="keyword">using</span> std::vector;</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100"> 46</a></span>&#160;<span class="keyword">enum class</span> <a class="code" href="namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100">http_method</a></div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;{</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; GET,</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; POST,</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; PATCH,</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; PUT,</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; DELETE</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;};</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6"> 69</a></span>&#160;<span class="keyword">using</span> <a class="code" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> = map&lt;string_view, variant&lt;string_view, vector&lt;string_view&gt;&gt;&gt;;</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classmastodonpp_1_1CURLWrapper.html"> 80</a></span>&#160;<span class="keyword">class </span><a class="code" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;{</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <a class="code" href="classmastodonpp_1_1CURLWrapper.html#a736572303fbec7a307514e611e6a468c">CURLWrapper</a>();</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; </div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <a class="code" href="classmastodonpp_1_1CURLWrapper.html#a736572303fbec7a307514e611e6a468c">CURLWrapper</a>(<span class="keyword">const</span> <a class="code" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a> &amp;other) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <a class="code" href="classmastodonpp_1_1CURLWrapper.html#a736572303fbec7a307514e611e6a468c">CURLWrapper</a>(<a class="code" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a> &amp;&amp;other) noexcept = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; </div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keyword">virtual</span> <a class="code" href="classmastodonpp_1_1CURLWrapper.html#a350f7061c9cb54cb5992ae983db3fc19">~CURLWrapper</a>() noexcept;</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; </div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <a class="code" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a>&amp; <a class="code" href="classmastodonpp_1_1CURLWrapper.html#a5f29b7f4d0b58f70bc96f362cdaa4d0a">operator=</a>(<span class="keyword">const</span> <a class="code" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a> &amp;other) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <a class="code" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a>&amp; <a class="code" href="classmastodonpp_1_1CURLWrapper.html#a5f29b7f4d0b58f70bc96f362cdaa4d0a">operator=</a>(<a class="code" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a> &amp;&amp;other) noexcept = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="classmastodonpp_1_1CURLWrapper.html#a2b7aaf03245a0730eeb464802168aded"> 127</a></span>&#160; <span class="keyword">inline</span> CURL *<a class="code" href="classmastodonpp_1_1CURLWrapper.html#a2b7aaf03245a0730eeb464802168aded">get_curl_easy_handle</a>()</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; {</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="keywordflow">return</span> _connection;</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; }</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmastodonpp_1_1CURLWrapper.html#a1564a42794ef7a9d170b725063ef504d">set_proxy</a>(string_view proxy);</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; </div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmastodonpp_1_1CURLWrapper.html#a892a4fc3d048798fa8e2584545b91861">cancel_stream</a>();</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; </div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="classmastodonpp_1_1CURLWrapper.html#aeb3171d955832b8062dc02b4ac67d195"> 165</a></span>&#160; mutex <a class="code" href="classmastodonpp_1_1CURLWrapper.html#aeb3171d955832b8062dc02b4ac67d195">buffer_mutex</a>;</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; </div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; [[nodiscard]]</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <a class="code" href="structmastodonpp_1_1answer__type.html">answer_type</a> <a class="code" href="classmastodonpp_1_1CURLWrapper.html#adc8808c3fad5397176f6755b09ee0be6">make_request</a>(<span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100">http_method</a> &amp;method, <span class="keywordtype">string</span> uri,</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> &amp;parameters);</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; </div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; [[nodiscard]]</div>
<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="classmastodonpp_1_1CURLWrapper.html#a04b3919cfb38716c5a032337e442db95"> 186</a></span>&#160; <span class="keywordtype">string</span> &amp;<a class="code" href="classmastodonpp_1_1CURLWrapper.html#a04b3919cfb38716c5a032337e442db95">get_buffer</a>()</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; {</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="keywordflow">return</span> _curl_buffer_body;</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; }</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; </div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; CURL *_connection;</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; <span class="keywordtype">char</span> _curl_buffer_error[CURL_ERROR_SIZE];</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keywordtype">string</span> _curl_buffer_headers;</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <span class="keywordtype">string</span> _curl_buffer_body;</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <span class="keywordtype">bool</span> _stream_cancelled;</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; </div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <span class="keywordtype">size_t</span> writer_body(<span class="keywordtype">char</span> *data, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> nmemb);</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; </div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">size_t</span> writer_body_wrapper(<span class="keywordtype">char</span> *data, <span class="keywordtype">size_t</span> sz,</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; <span class="keywordtype">size_t</span> nmemb, <span class="keywordtype">void</span> *f)</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; {</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <span class="keywordflow">return</span> static_cast&lt;CURLWrapper*&gt;(f)-&gt;writer_body(data, sz, nmemb);</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; }</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; </div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <span class="keywordtype">size_t</span> writer_header(<span class="keywordtype">char</span> *data, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> nmemb);</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; </div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">size_t</span> writer_header_wrapper(<span class="keywordtype">char</span> *data, <span class="keywordtype">size_t</span> sz,</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; <span class="keywordtype">size_t</span> nmemb, <span class="keywordtype">void</span> *f)</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; {</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; <span class="keywordflow">return</span> static_cast&lt;CURLWrapper*&gt;(f)-&gt;writer_header(data, sz, nmemb);</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; }</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; </div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; <span class="keywordtype">int</span> progress(<span class="keywordtype">void</span> *clientp, curl_off_t dltotal, curl_off_t dlnow,</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; curl_off_t ultotal, curl_off_t ulnow);</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; </div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> progress_wrapper(<span class="keywordtype">void</span> *f, <span class="keywordtype">void</span> *clientp,</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; curl_off_t dltotal, curl_off_t dlnow,</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; curl_off_t ultotal, curl_off_t ulnow)</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; {</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <span class="keywordflow">return</span> static_cast&lt;CURLWrapper*&gt;(f)-&gt;progress(clientp, dltotal, dlnow,</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; ultotal, ulnow);</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; }</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; </div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; <span class="keywordtype">void</span> setup_curl();</div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; </div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; <span class="keywordtype">void</span> add_parameters_to_uri(<span class="keywordtype">string</span> &amp;uri, <span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> &amp;parameters);</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160;};</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; </div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160;} <span class="comment">// namespace mastodonpp</span></div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; </div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160;<span class="preprocessor">#endif // MASTODONPP_CURL_WRAPPER_HPP</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="anamespacemastodonpp_html_a7d60fc71ad0fb1fbd467b37fe1f1f100"><div class="ttname"><a href="namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100">mastodonpp::http_method</a></div><div class="ttdeci">http_method</div><div class="ttdoc">The HTTP method.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.hpp:46</div></div>
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html_a736572303fbec7a307514e611e6a468c"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html#a736572303fbec7a307514e611e6a468c">mastodonpp::CURLWrapper::CURLWrapper</a></div><div class="ttdeci">CURLWrapper()</div><div class="ttdoc">Initializes curl and sets up connection.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.cpp:42</div></div>
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html_a2b7aaf03245a0730eeb464802168aded"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html#a2b7aaf03245a0730eeb464802168aded">mastodonpp::CURLWrapper::get_curl_easy_handle</a></div><div class="ttdeci">CURL * get_curl_easy_handle()</div><div class="ttdoc">Returns pointer to the CURL easy handle.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.hpp:127</div></div>
<div class="ttc" id="anamespacemastodonpp_html_af8b3b89118adeccc71c54dfd36c987f6"><div class="ttname"><a href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">mastodonpp::parametermap</a></div><div class="ttdeci">map&lt; string_view, variant&lt; string_view, vector&lt; string_view &gt; &gt;&gt; parametermap</div><div class="ttdoc">std::map of parameters for API calls.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.hpp:69</div></div>
<div class="ttc" id="anamespacemastodonpp_html"><div class="ttname"><a href="namespacemastodonpp.html">mastodonpp</a></div><div class="ttdoc">C++ wrapper for the Mastodon API.</div><div class="ttdef"><b>Definition:</b> answer.cpp:22</div></div>
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html_aeb3171d955832b8062dc02b4ac67d195"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html#aeb3171d955832b8062dc02b4ac67d195">mastodonpp::CURLWrapper::buffer_mutex</a></div><div class="ttdeci">mutex buffer_mutex</div><div class="ttdoc">Mutex for get_buffer a.k.a. _curl_buffer_body.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.hpp:165</div></div>
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html_a04b3919cfb38716c5a032337e442db95"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html#a04b3919cfb38716c5a032337e442db95">mastodonpp::CURLWrapper::get_buffer</a></div><div class="ttdeci">string &amp; get_buffer()</div><div class="ttdoc">Returns a reference to the buffer libcurl writes into.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.hpp:186</div></div>
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html_a1564a42794ef7a9d170b725063ef504d"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html#a1564a42794ef7a9d170b725063ef504d">mastodonpp::CURLWrapper::set_proxy</a></div><div class="ttdeci">void set_proxy(string_view proxy)</div><div class="ttdoc">Set the proxy to use.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.cpp:68</div></div>
<div class="ttc" id="astructmastodonpp_1_1answer__type_html"><div class="ttname"><a href="structmastodonpp_1_1answer__type.html">mastodonpp::answer_type</a></div><div class="ttdoc">Return type for Requests.</div><div class="ttdef"><b>Definition:</b> answer.hpp:40</div></div>
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html_a5f29b7f4d0b58f70bc96f362cdaa4d0a"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html#a5f29b7f4d0b58f70bc96f362cdaa4d0a">mastodonpp::CURLWrapper::operator=</a></div><div class="ttdeci">CURLWrapper &amp; operator=(const CURLWrapper &amp;other)=delete</div><div class="ttdoc">Copy assignment operator.</div></div>
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html">mastodonpp::CURLWrapper</a></div><div class="ttdoc">Handles the details of network connections.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.hpp:80</div></div>
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html_adc8808c3fad5397176f6755b09ee0be6"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html#adc8808c3fad5397176f6755b09ee0be6">mastodonpp::CURLWrapper::make_request</a></div><div class="ttdeci">answer_type make_request(const http_method &amp;method, string uri, const parametermap &amp;parameters)</div><div class="ttdoc">Make a HTTP request.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.cpp:83</div></div>
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html_a350f7061c9cb54cb5992ae983db3fc19"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html#a350f7061c9cb54cb5992ae983db3fc19">mastodonpp::CURLWrapper::~CURLWrapper</a></div><div class="ttdeci">virtual ~CURLWrapper() noexcept</div><div class="ttdoc">Cleans up curl and connection.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.cpp:56</div></div>
<div class="ttc" id="aclassmastodonpp_1_1CURLWrapper_html_a892a4fc3d048798fa8e2584545b91861"><div class="ttname"><a href="classmastodonpp_1_1CURLWrapper.html#a892a4fc3d048798fa8e2584545b91861">mastodonpp::CURLWrapper::cancel_stream</a></div><div class="ttdeci">void cancel_stream()</div><div class="ttdoc">Cancel the stream.</div><div class="ttdef"><b>Definition:</b> curl_wrapper.cpp:78</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>