This repository has been archived on 2020-05-10. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon-cpp/docs/return__types_8hpp_source.html

69 lines
16 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.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>mastodon-cpp: src/return_types.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="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">mastodon-cpp
&#160;<span id="projectnumber">0.110.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<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('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">return_types.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 mastodon-cpp.</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Copyright © 2019 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 MASTODON_CPP_RETURN_TYPES_HPP</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#define MASTODON_CPP_RETURN_TYPES_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 &lt;cstdint&gt;</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &quot;types.hpp&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="keyword">using</span> std::uint8_t;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="keyword">using</span> std::uint16_t;</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="keyword">using</span> std::string;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceMastodon.html">Mastodon</a></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;{</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="structMastodon_1_1return__base.html"> 35</a></span>&#160; <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structMastodon_1_1return__base.html">return_base</a></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; {</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structMastodon_1_1return__base.html#a12cebffae19249cac4c9e4ae9f95391a"> 42</a></span>&#160; uint8_t <a class="code" href="structMastodon_1_1return__base.html#a12cebffae19249cac4c9e4ae9f95391a">error_code</a> = 0;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="structMastodon_1_1return__base.html#ab902d5ecac698fadbdcabcd99d0ce754"> 49</a></span>&#160; <span class="keywordtype">string</span> <a class="code" href="structMastodon_1_1return__base.html#ab902d5ecac698fadbdcabcd99d0ce754">error_message</a>;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structMastodon_1_1return__base.html#af62546b8b4bb03899ddbec770065e0b6"> 56</a></span>&#160; uint16_t <a class="code" href="structMastodon_1_1return__base.html#af62546b8b4bb03899ddbec770065e0b6">http_error_code</a> = 0;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keyword">operator</span> bool() <span class="keyword">const</span>;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keyword">operator</span> uint8_t() <span class="keyword">const</span>;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; } <a class="code" href="namespaceMastodon.html#ac21d21d7706ccde099779da540cbb6c9">return_base</a>;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="structMastodon_1_1return__call.html"> 93</a></span>&#160; <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structMastodon_1_1return__call.html">return_call</a> : <a class="code" href="structMastodon_1_1return__base.html">return_base</a></div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; {</div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="structMastodon_1_1return__call.html#a8d9ac799e26fc5ff54592083a8a83404"> 100</a></span>&#160; <span class="keywordtype">string</span> <a class="code" href="structMastodon_1_1return__call.html#a8d9ac799e26fc5ff54592083a8a83404">answer</a>;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <a class="code" href="structMastodon_1_1return__call.html">return_call</a>();</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <a class="code" href="structMastodon_1_1return__call.html">return_call</a>(<span class="keyword">const</span> uint8_t ec, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;em,</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="keyword">const</span> uint16_t hec, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;a);</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <a class="code" href="structMastodon_1_1return__call.html">return_call</a>(<span class="keyword">const</span> error ec, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;em,</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keyword">const</span> uint16_t hec, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;a);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keyword">operator</span> <span class="keyword">const</span> string() <span class="keyword">const</span>;</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keyword">friend</span> std::ostream &amp;<a class="code" href="structMastodon_1_1return__call.html#a9a83900af66c00acd9c26da38de17af8">operator &lt;&lt;</a>(std::ostream &amp;out,</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="keyword">const</span> <a class="code" href="structMastodon_1_1return__call.html">return_call</a> &amp;ret);</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; } <a class="code" href="namespaceMastodon.html#ade2bfe3f2cb66b2cb6ddfe24d05bcb19">return_call</a>;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;}</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;<span class="preprocessor">#endif // MASTODON_CPP_RETURN_TYPES_HPP</span></div><div class="ttc" id="namespaceMastodon_html_ade2bfe3f2cb66b2cb6ddfe24d05bcb19"><div class="ttname"><a href="namespaceMastodon.html#ade2bfe3f2cb66b2cb6ddfe24d05bcb19">Mastodon::return_call</a></div><div class="ttdeci">Mastodon::return_call return_call</div><div class="ttdoc">Return type for API calls.</div></div>
<div class="ttc" id="structMastodon_1_1return__call_html"><div class="ttname"><a href="structMastodon_1_1return__call.html">Mastodon::return_call</a></div><div class="ttdoc">Return type for API calls.</div><div class="ttdef"><b>Definition:</b> return_types.hpp:93</div></div>
<div class="ttc" id="structMastodon_1_1return__call_html_a8d9ac799e26fc5ff54592083a8a83404"><div class="ttname"><a href="structMastodon_1_1return__call.html#a8d9ac799e26fc5ff54592083a8a83404">Mastodon::return_call::answer</a></div><div class="ttdeci">string answer</div><div class="ttdoc">The response from the server.</div><div class="ttdef"><b>Definition:</b> return_types.hpp:100</div></div>
<div class="ttc" id="namespaceMastodon_html_ac21d21d7706ccde099779da540cbb6c9"><div class="ttname"><a href="namespaceMastodon.html#ac21d21d7706ccde099779da540cbb6c9">Mastodon::return_base</a></div><div class="ttdeci">struct Mastodon::return_base return_base</div><div class="ttdoc">Basis for return types.</div></div>
<div class="ttc" id="structMastodon_1_1return__base_html_a12cebffae19249cac4c9e4ae9f95391a"><div class="ttname"><a href="structMastodon_1_1return__base.html#a12cebffae19249cac4c9e4ae9f95391a">Mastodon::return_base::error_code</a></div><div class="ttdeci">uint8_t error_code</div><div class="ttdoc">Error code.</div><div class="ttdef"><b>Definition:</b> return_types.hpp:42</div></div>
<div class="ttc" id="structMastodon_1_1return__base_html_af62546b8b4bb03899ddbec770065e0b6"><div class="ttname"><a href="structMastodon_1_1return__base.html#af62546b8b4bb03899ddbec770065e0b6">Mastodon::return_base::http_error_code</a></div><div class="ttdeci">uint16_t http_error_code</div><div class="ttdoc">HTTP error code.</div><div class="ttdef"><b>Definition:</b> return_types.hpp:56</div></div>
<div class="ttc" id="namespaceMastodon_html"><div class="ttname"><a href="namespaceMastodon.html">Mastodon</a></div><div class="ttdoc">Collection of things to interface with server software that implements the Mastodon API.</div><div class="ttdef"><b>Definition:</b> mastodon-cpp.hpp:47</div></div>
<div class="ttc" id="structMastodon_1_1return__base_html_ab902d5ecac698fadbdcabcd99d0ce754"><div class="ttname"><a href="structMastodon_1_1return__base.html#ab902d5ecac698fadbdcabcd99d0ce754">Mastodon::return_base::error_message</a></div><div class="ttdeci">string error_message</div><div class="ttdoc">The error message, or &quot;&quot;.</div><div class="ttdef"><b>Definition:</b> return_types.hpp:49</div></div>
<div class="ttc" id="structMastodon_1_1return__call_html_a9a83900af66c00acd9c26da38de17af8"><div class="ttname"><a href="structMastodon_1_1return__call.html#a9a83900af66c00acd9c26da38de17af8">Mastodon::return_call::operator&lt;&lt;</a></div><div class="ttdeci">friend std::ostream &amp; operator&lt;&lt;(std::ostream &amp;out, const return_call &amp;ret)</div><div class="ttdoc">Same es return_call::answer.</div><div class="ttdef"><b>Definition:</b> return_types.cpp:43</div></div>
<div class="ttc" id="structMastodon_1_1return__base_html"><div class="ttname"><a href="structMastodon_1_1return__base.html">Mastodon::return_base</a></div><div class="ttdoc">Basis for return types.</div><div class="ttdef"><b>Definition:</b> return_types.hpp:35</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- 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.15
</small></address>
</body>
</html>