tastytea
1a6dd5fae7
# # Previous commits: #d452daa
2020-11-13 # # Previous commits: #73648eb
2020-11-13 #a028edd
2020-03-21 #0cbf498
2020-03-21 #e6478b1
2020-03-12 #73648eb
2020-11-13 #a028edd
2020-03-21 #0cbf498
2020-03-21
236 lines
36 KiB
HTML
236 lines
36 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.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>mastodonpp: include/connection.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
|
|
 <span id="projectnumber">0.5.7</span>
|
|
</div>
|
|
<div id="projectbrief">C++ wrapper for the Mastodon and Pleroma APIs.</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_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">connection.hpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/* This file is part of mastodonpp.</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright © 2020 tastytea <tastytea@tastytea.de></span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <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> <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> <span class="comment"> * the Free Software Foundation, version 3.</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> *</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <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> <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> <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> <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> <span class="comment"> *</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <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> <span class="comment"> * along with this program. If not, see <http://www.gnu.org/licenses/>.</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>  </div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#ifndef MASTODONPP_CONNECTION_HPP</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#define MASTODONPP_CONNECTION_HPP</span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  </div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "api.hpp"</span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "curl_wrapper.hpp"</span></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include "instance.hpp"</span></div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include "types.hpp"</span></div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  </div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <string></span></div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <string_view></span></div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <variant></span></div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <vector></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="keyword">namespace </span><a class="code" href="namespacemastodonpp.html">mastodonpp</a></div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> {</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  </div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">using</span> std::string;</div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">using</span> std::string_view;</div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">using</span> std::variant;</div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">using</span> std::vector;</div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  </div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208"> 43</a></span> <span class="keyword">using</span> <a class="code" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">endpoint_variant</a> = variant<API::endpoint_type, string_view>;</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structmastodonpp_1_1event__type.html"> 52</a></span> <span class="keyword">struct </span><a class="code" href="structmastodonpp_1_1event__type.html">event_type</a></div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> {</div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structmastodonpp_1_1event__type.html#a193361ac6ffafb474bbc493273a028ce"> 62</a></span>  <span class="keywordtype">string</span> <a class="code" href="structmastodonpp_1_1event__type.html#a193361ac6ffafb474bbc493273a028ce">type</a>;</div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  </div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="structmastodonpp_1_1event__type.html#af72ad0a57a762c57f0d4e5d650c5d65c"> 65</a></span>  <span class="keywordtype">string</span> <a class="code" href="structmastodonpp_1_1event__type.html#af72ad0a57a762c57f0d4e5d650c5d65c">data</a>;</div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> };</div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  </div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classmastodonpp_1_1Connection.html"> 78</a></span> <span class="keyword">class </span><a class="code" href="classmastodonpp_1_1Connection.html">Connection</a> : <span class="keyword">public</span> <a class="code" href="classmastodonpp_1_1CURLWrapper.html">CURLWrapper</a></div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> {</div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classmastodonpp_1_1Connection.html#ae6fc153679431f14ee98778bbc477cda"> 88</a></span>  <span class="keyword">explicit</span> <a class="code" href="classmastodonpp_1_1Connection.html#ae6fc153679431f14ee98778bbc477cda">Connection</a>(<span class="keyword">const</span> <a class="code" href="classmastodonpp_1_1Instance.html">Instance</a> &instance)</div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  : _instance{instance}</div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  , _baseuri{instance.<a class="code" href="classmastodonpp_1_1Instance.html#a859540ec79ea97c0f76185d9036127bb">get_baseuri</a>()}</div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  {</div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  _instance.<a class="code" href="classmastodonpp_1_1Instance.html#a921c4b83815c0d98dea983a9409c00ac">copy_connection_properties</a>(*<span class="keyword">this</span>);</div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  }</div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  </div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="classmastodonpp_1_1Connection.html#ae6fc153679431f14ee98778bbc477cda">Connection</a>(<span class="keyword">const</span> <a class="code" href="classmastodonpp_1_1Connection.html#ae6fc153679431f14ee98778bbc477cda">Connection</a> &other) = <span class="keywordflow">default</span>;</div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  </div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <a class="code" href="classmastodonpp_1_1Connection.html#ae6fc153679431f14ee98778bbc477cda">Connection</a>(<a class="code" href="classmastodonpp_1_1Connection.html#ae6fc153679431f14ee98778bbc477cda">Connection</a> &&other) noexcept = <span class="keyword">delete</span>;</div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  </div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <a class="code" href="classmastodonpp_1_1Connection.html#a3697f021a84f5cbdd62c9a6fba5eab6a">~Connection</a>() noexcept override = default;</div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  </div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <a class="code" href="classmastodonpp_1_1Connection.html#ae6fc153679431f14ee98778bbc477cda">Connection</a> &operator=(const <a class="code" href="classmastodonpp_1_1Connection.html#ae6fc153679431f14ee98778bbc477cda">Connection</a> &other) = delete;</div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  </div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <a class="code" href="classmastodonpp_1_1Connection.html#ae6fc153679431f14ee98778bbc477cda">Connection</a> &operator=(<a class="code" href="classmastodonpp_1_1Connection.html#ae6fc153679431f14ee98778bbc477cda">Connection</a> &&other) noexcept = delete;</div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  </div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  [[nodiscard]] answer_type <a class="code" href="classmastodonpp_1_1Connection.html#ade24a99769313ee15c406d97e9543cba">get</a>(const <a class="code" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">endpoint_variant</a> &endpoint,</div>
|
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  const <a class="code" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> &parameters);</div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  </div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="classmastodonpp_1_1Connection.html#a60034eabe75bd3afade110a171c66d05"> 147</a></span>  [[nodiscard]] inline <a class="code" href="structmastodonpp_1_1answer__type.html">answer_type</a> <a class="code" href="classmastodonpp_1_1Connection.html#ade24a99769313ee15c406d97e9543cba">get</a>(const <a class="code" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">endpoint_variant</a> &endpoint)</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="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1Connection.html#ade24a99769313ee15c406d97e9543cba">get</a>(endpoint, {});</div>
|
|
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  }</div>
|
|
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  </div>
|
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  [[nodiscard]] <a class="code" href="structmastodonpp_1_1answer__type.html">answer_type</a> <a class="code" href="classmastodonpp_1_1Connection.html#ad7cebeeef7c285ff4666dc6850f20164">post</a>(<span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">endpoint_variant</a> &endpoint,</div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> &parameters);</div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  </div>
|
|
<div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="classmastodonpp_1_1Connection.html#af27eb5d94f5a0e39a703988fdcc54173"> 182</a></span>  [[nodiscard]] <span class="keyword">inline</span> <a class="code" href="structmastodonpp_1_1answer__type.html">answer_type</a> <a class="code" href="classmastodonpp_1_1Connection.html#af27eb5d94f5a0e39a703988fdcc54173">post</a>(<span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">endpoint_variant</a> &endpoint)</div>
|
|
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  {</div>
|
|
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1Connection.html#ad7cebeeef7c285ff4666dc6850f20164">post</a>(endpoint, {});</div>
|
|
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  }</div>
|
|
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  </div>
|
|
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  [[nodiscard]] <a class="code" href="structmastodonpp_1_1answer__type.html">answer_type</a> <a class="code" href="classmastodonpp_1_1Connection.html#a10f838c74d2ccc83f64f29e2aad2f157">patch</a>(<span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">endpoint_variant</a> &endpoint,</div>
|
|
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> &parameters);</div>
|
|
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  </div>
|
|
<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="classmastodonpp_1_1Connection.html#a3f1e0440b68a44cf678bfdbe33295197"> 206</a></span>  [[nodiscard]] <span class="keyword">inline</span> <a class="code" href="structmastodonpp_1_1answer__type.html">answer_type</a> <a class="code" href="classmastodonpp_1_1Connection.html#a3f1e0440b68a44cf678bfdbe33295197">patch</a>(<span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">endpoint_variant</a> &endpoint)</div>
|
|
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  {</div>
|
|
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1Connection.html#a10f838c74d2ccc83f64f29e2aad2f157">patch</a>(endpoint, {});</div>
|
|
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  }</div>
|
|
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  </div>
|
|
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  [[nodiscard]] <a class="code" href="structmastodonpp_1_1answer__type.html">answer_type</a> <a class="code" href="classmastodonpp_1_1Connection.html#ac5afc2e5d419c8bee3a8994ce0a940aa">put</a>(<span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">endpoint_variant</a> &endpoint,</div>
|
|
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> &parameters);</div>
|
|
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  </div>
|
|
<div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="classmastodonpp_1_1Connection.html#ad05ff1b33460bfedf0b46f4e5e755399"> 230</a></span>  [[nodiscard]] <span class="keyword">inline</span> <a class="code" href="structmastodonpp_1_1answer__type.html">answer_type</a> <a class="code" href="classmastodonpp_1_1Connection.html#ad05ff1b33460bfedf0b46f4e5e755399">put</a>(<span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">endpoint_variant</a> &endpoint)</div>
|
|
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  {</div>
|
|
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1Connection.html#ac5afc2e5d419c8bee3a8994ce0a940aa">put</a>(endpoint, {});</div>
|
|
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  }</div>
|
|
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  </div>
|
|
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  [[nodiscard]] <a class="code" href="structmastodonpp_1_1answer__type.html">answer_type</a> <a class="code" href="classmastodonpp_1_1Connection.html#a095f752558410fab3dee6782e03a0fdb">del</a>(<span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">endpoint_variant</a> &endpoint,</div>
|
|
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6">parametermap</a> &parameters);</div>
|
|
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  </div>
|
|
<div class="line"><a name="l00254"></a><span class="lineno"><a class="line" href="classmastodonpp_1_1Connection.html#a2e89f60fdf4096ff8c8251e61ab59d13"> 254</a></span>  [[nodiscard]] <span class="keyword">inline</span> <a class="code" href="structmastodonpp_1_1answer__type.html">answer_type</a> <a class="code" href="classmastodonpp_1_1Connection.html#a2e89f60fdf4096ff8c8251e61ab59d13">del</a>(<span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">endpoint_variant</a> &endpoint)</div>
|
|
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  {</div>
|
|
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="keywordflow">return</span> <a class="code" href="classmastodonpp_1_1Connection.html#a095f752558410fab3dee6782e03a0fdb">del</a>(endpoint, {});</div>
|
|
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  }</div>
|
|
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  </div>
|
|
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="keywordtype">string</span> <a class="code" href="classmastodonpp_1_1Connection.html#a06f537c75c7fe9a7510e11af1008e028">get_new_stream_contents</a>();</div>
|
|
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  </div>
|
|
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  vector<event_type> <a class="code" href="classmastodonpp_1_1Connection.html#a7e4a50fb73aa50b027d9a0822cfde318">get_new_events</a>();</div>
|
|
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  </div>
|
|
<div class="line"><a name="l00280"></a><span class="lineno"><a class="line" href="classmastodonpp_1_1Connection.html#a8cf6ab350bb359650925d1c582fe9f60"> 280</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmastodonpp_1_1Connection.html#a8cf6ab350bb359650925d1c582fe9f60">cancel_stream</a>()</div>
|
|
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  {</div>
|
|
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <a class="code" href="classmastodonpp_1_1CURLWrapper.html#a892a4fc3d048798fa8e2584545b91861">CURLWrapper::cancel_stream</a>();</div>
|
|
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  }</div>
|
|
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  </div>
|
|
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span> <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="keyword">const</span> <a class="code" href="classmastodonpp_1_1Instance.html">Instance</a> &_instance;</div>
|
|
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  <span class="keyword">const</span> string_view _baseuri;</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>  [[nodiscard]] <span class="keywordtype">string</span></div>
|
|
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  endpoint_to_uri(<span class="keyword">const</span> <a class="code" href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">endpoint_variant</a> &endpoint) <span class="keyword">const</span>;</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>  </div>
|
|
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span> } <span class="comment">// namespace mastodonpp</span></div>
|
|
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  </div>
|
|
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span> <span class="preprocessor">#endif // MASTODONPP_CONNECTION_HPP</span></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_ade24a99769313ee15c406d97e9543cba"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#ade24a99769313ee15c406d97e9543cba">mastodonpp::Connection::get</a></div><div class="ttdeci">answer_type get(const endpoint_variant &endpoint, const parametermap &parameters)</div><div class="ttdoc">Make a HTTP GET call with parameters.</div><div class="ttdef"><b>Definition:</b> connection.cpp:34</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Instance_html_a921c4b83815c0d98dea983a9409c00ac"><div class="ttname"><a href="classmastodonpp_1_1Instance.html#a921c4b83815c0d98dea983a9409c00ac">mastodonpp::Instance::copy_connection_properties</a></div><div class="ttdeci">void copy_connection_properties(CURLWrapper &curlwrapper) const</div><div class="ttdoc">Set the properties of the connection of the calling class up.</div><div class="ttdef"><b>Definition:</b> instance.hpp:90</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_ae6fc153679431f14ee98778bbc477cda"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#ae6fc153679431f14ee98778bbc477cda">mastodonpp::Connection::Connection</a></div><div class="ttdeci">Connection(const Instance &instance)</div><div class="ttdoc">Construct a new Connection object.</div><div class="ttdef"><b>Definition:</b> connection.hpp:88</div></div>
|
|
<div class="ttc" id="astructmastodonpp_1_1event__type_html_a193361ac6ffafb474bbc493273a028ce"><div class="ttname"><a href="structmastodonpp_1_1event__type.html#a193361ac6ffafb474bbc493273a028ce">mastodonpp::event_type::type</a></div><div class="ttdeci">string type</div><div class="ttdoc">The type of the event.</div><div class="ttdef"><b>Definition:</b> connection.hpp:62</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_af27eb5d94f5a0e39a703988fdcc54173"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#af27eb5d94f5a0e39a703988fdcc54173">mastodonpp::Connection::post</a></div><div class="ttdeci">answer_type post(const endpoint_variant &endpoint)</div><div class="ttdoc">Make a HTTP POST call.</div><div class="ttdef"><b>Definition:</b> connection.hpp:182</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< string_view, variant< string_view, vector< string_view > >> parametermap</div><div class="ttdoc">std::map of parameters for API calls.</div><div class="ttdef"><b>Definition:</b> types.hpp:64</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_ad05ff1b33460bfedf0b46f4e5e755399"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#ad05ff1b33460bfedf0b46f4e5e755399">mastodonpp::Connection::put</a></div><div class="ttdeci">answer_type put(const endpoint_variant &endpoint)</div><div class="ttdoc">Make a HTTP PUT call.</div><div class="ttdef"><b>Definition:</b> connection.hpp:230</div></div>
|
|
<div class="ttc" id="astructmastodonpp_1_1event__type_html_af72ad0a57a762c57f0d4e5d650c5d65c"><div class="ttname"><a href="structmastodonpp_1_1event__type.html#af72ad0a57a762c57f0d4e5d650c5d65c">mastodonpp::event_type::data</a></div><div class="ttdeci">string data</div><div class="ttdoc">The payload.</div><div class="ttdef"><b>Definition:</b> connection.hpp:65</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Instance_html_a859540ec79ea97c0f76185d9036127bb"><div class="ttname"><a href="classmastodonpp_1_1Instance.html#a859540ec79ea97c0f76185d9036127bb">mastodonpp::Instance::get_baseuri</a></div><div class="ttdeci">string_view get_baseuri() const noexcept</div><div class="ttdoc">Returns the base URI.</div><div class="ttdef"><b>Definition:</b> instance.hpp:113</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> api.hpp:24</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_a3f1e0440b68a44cf678bfdbe33295197"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#a3f1e0440b68a44cf678bfdbe33295197">mastodonpp::Connection::patch</a></div><div class="ttdeci">answer_type patch(const endpoint_variant &endpoint)</div><div class="ttdoc">Make a HTTP PATCH call.</div><div class="ttdef"><b>Definition:</b> connection.hpp:206</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_ac5afc2e5d419c8bee3a8994ce0a940aa"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#ac5afc2e5d419c8bee3a8994ce0a940aa">mastodonpp::Connection::put</a></div><div class="ttdeci">answer_type put(const endpoint_variant &endpoint, const parametermap &parameters)</div><div class="ttdoc">Make a HTTP PUT call with parameters.</div><div class="ttdef"><b>Definition:</b> connection.cpp:55</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_a7e4a50fb73aa50b027d9a0822cfde318"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#a7e4a50fb73aa50b027d9a0822cfde318">mastodonpp::Connection::get_new_events</a></div><div class="ttdeci">vector< event_type > get_new_events()</div><div class="ttdoc">Get new stream events.</div><div class="ttdef"><b>Definition:</b> connection.cpp:79</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_a3697f021a84f5cbdd62c9a6fba5eab6a"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#a3697f021a84f5cbdd62c9a6fba5eab6a">mastodonpp::Connection::~Connection</a></div><div class="ttdeci">~Connection() noexcept override=default</div><div class="ttdoc">Destructor.</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_a2e89f60fdf4096ff8c8251e61ab59d13"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#a2e89f60fdf4096ff8c8251e61ab59d13">mastodonpp::Connection::del</a></div><div class="ttdeci">answer_type del(const endpoint_variant &endpoint)</div><div class="ttdoc">Make a HTTP DELETE call.</div><div class="ttdef"><b>Definition:</b> connection.hpp:254</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_a8cf6ab350bb359650925d1c582fe9f60"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#a8cf6ab350bb359650925d1c582fe9f60">mastodonpp::Connection::cancel_stream</a></div><div class="ttdeci">void cancel_stream()</div><div class="ttdoc">Cancel the stream.</div><div class="ttdef"><b>Definition:</b> connection.hpp:280</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_a095f752558410fab3dee6782e03a0fdb"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#a095f752558410fab3dee6782e03a0fdb">mastodonpp::Connection::del</a></div><div class="ttdeci">answer_type del(const endpoint_variant &endpoint, const parametermap &parameters)</div><div class="ttdoc">Make a HTTP DELETE call with parameters.</div><div class="ttdef"><b>Definition:</b> connection.cpp:62</div></div>
|
|
<div class="ttc" id="astructmastodonpp_1_1event__type_html"><div class="ttname"><a href="structmastodonpp_1_1event__type.html">mastodonpp::event_type</a></div><div class="ttdoc">A stream event.</div><div class="ttdef"><b>Definition:</b> connection.hpp:52</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> types.hpp:79</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_a10f838c74d2ccc83f64f29e2aad2f157"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#a10f838c74d2ccc83f64f29e2aad2f157">mastodonpp::Connection::patch</a></div><div class="ttdeci">answer_type patch(const endpoint_variant &endpoint, const parametermap &parameters)</div><div class="ttdoc">Make a HTTP PATCH call with parameters.</div><div class="ttdef"><b>Definition:</b> connection.cpp:48</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Instance_html"><div class="ttname"><a href="classmastodonpp_1_1Instance.html">mastodonpp::Instance</a></div><div class="ttdoc">Holds the access data of an instance.</div><div class="ttdef"><b>Definition:</b> instance.hpp:48</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_ad7cebeeef7c285ff4666dc6850f20164"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#ad7cebeeef7c285ff4666dc6850f20164">mastodonpp::Connection::post</a></div><div class="ttdeci">answer_type post(const endpoint_variant &endpoint, const parametermap &parameters)</div><div class="ttdoc">Make a HTTP POST call with parameters.</div><div class="ttdef"><b>Definition:</b> connection.cpp:41</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html"><div class="ttname"><a href="classmastodonpp_1_1Connection.html">mastodonpp::Connection</a></div><div class="ttdoc">Represents a connection to an instance. Used for requests.</div><div class="ttdef"><b>Definition:</b> connection.hpp:78</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:57</div></div>
|
|
<div class="ttc" id="anamespacemastodonpp_html_ad5d7bf6713e986f130ec200963e0f208"><div class="ttname"><a href="namespacemastodonpp.html#ad5d7bf6713e986f130ec200963e0f208">mastodonpp::endpoint_variant</a></div><div class="ttdeci">variant< API::endpoint_type, string_view > endpoint_variant</div><div class="ttdoc">An endpoint. Either API::endpoint_type or std::string_view.</div><div class="ttdef"><b>Definition:</b> connection.hpp:43</div></div>
|
|
<div class="ttc" id="aclassmastodonpp_1_1Connection_html_a06f537c75c7fe9a7510e11af1008e028"><div class="ttname"><a href="classmastodonpp_1_1Connection.html#a06f537c75c7fe9a7510e11af1008e028">mastodonpp::Connection::get_new_stream_contents</a></div><div class="ttdeci">string get_new_stream_contents()</div><div class="ttdoc">Copy new stream contents and delete the “original”.</div><div class="ttdef"><b>Definition:</b> connection.cpp:69</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.hpp:209</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>
|