115 lines
12 KiB
HTML
115 lines
12 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>CocoaTweet: src/cocoatweet/api/interface/httpBase.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">CocoaTweet
|
|
</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_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_7ab4773fac486c7995104695845818e6.html">cocoatweet</a></li><li class="navelem"><a class="el" href="dir_06575b8358e13047479eaa591b69dad2.html">api</a></li><li class="navelem"><a class="el" href="dir_23b5b2bc83a8d87415b91ff4fc156479.html">interface</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">httpBase.h</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="httpBase_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="preprocessor">#ifndef COCOATWEET_API_INTERFACE_HTTPBASE_H_</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#define COCOATWEET_API_INTERFACE_HTTPBASE_H_</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>  </div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include <functional></span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#include "<a class="code" href="oauth_8h.html">cocoatweet/oauth/oauth.h</a>"</span></div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>  </div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="namespaceCocoaTweet_1_1API_1_1Interface.html"> 7</a></span> <span class="keyword">namespace </span><a class="code" href="namespaceCocoaTweet_1_1API_1_1Interface.html">CocoaTweet::API::Interface</a> {</div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"><a class="line" href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html"> 8</a></span> <span class="keyword">class </span><a class="code" href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html">HttpBase</a> {</div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="keyword">protected</span>:</div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#ab0b8b76e12fdf34849fc1c8ee928a2ff"> 11</a></span>  std::weak_ptr<CocoaTweet::OAuth::OAuth1> <a class="code" href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#ab0b8b76e12fdf34849fc1c8ee928a2ff">oauth_</a>;</div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#a7c543dfa69524004df9e0fdcaa610313"> 12</a></span>  std::map<std::string, std::string> <a class="code" href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#a7c543dfa69524004df9e0fdcaa610313">bodyParam_</a>;</div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#a6511d018265ca90a5c675b375b8feee0"> 13</a></span>  std::string <a class="code" href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#a6511d018265ca90a5c675b375b8feee0">url_</a>;</div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#aa80a8d2b339e3eed6f9e031518f8193b"> 14</a></span>  std::string <a class="code" href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#aa80a8d2b339e3eed6f9e031518f8193b">contentType_</a>;</div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#a680ff63af97568baf2587f20b7e1a8ec">process</a>(std::weak_ptr<CocoaTweet::OAuth::OAuth1> _oauth,</div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  std::function<<span class="keywordtype">void</span>(<span class="keyword">const</span> std::string&)> _callback) = 0;</div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#a65e649cd380fc68d69aa8b575a20ab10"> 17</a></span>  <span class="keyword">static</span> <span class="keywordtype">size_t</span> <a class="code" href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#a65e649cd380fc68d69aa8b575a20ab10">curlCallback_</a>(<span class="keywordtype">char</span>* _ptr, <span class="keywordtype">size_t</span> _size, <span class="keywordtype">size_t</span> _nmemb, std::string* _stream) {</div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  <span class="keywordtype">int</span> realsize = _size * _nmemb;</div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  _stream->append(_ptr, realsize);</div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  <span class="keywordflow">return</span> realsize;</div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  }</div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> };</div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> } <span class="comment">// namespace CocoaTweet::API::Interface</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">#endif</span></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<div class="ttc" id="aclassCocoaTweet_1_1API_1_1Interface_1_1HttpBase_html_a680ff63af97568baf2587f20b7e1a8ec"><div class="ttname"><a href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#a680ff63af97568baf2587f20b7e1a8ec">CocoaTweet::API::Interface::HttpBase::process</a></div><div class="ttdeci">virtual void process(std::weak_ptr< CocoaTweet::OAuth::OAuth1 > _oauth, std::function< void(const std::string &)> _callback)=0</div></div>
|
|
<div class="ttc" id="anamespaceCocoaTweet_1_1API_1_1Interface_html"><div class="ttname"><a href="namespaceCocoaTweet_1_1API_1_1Interface.html">CocoaTweet::API::Interface</a></div><div class="ttdef"><b>Definition:</b> httpBase.h:7</div></div>
|
|
<div class="ttc" id="aclassCocoaTweet_1_1API_1_1Interface_1_1HttpBase_html_ab0b8b76e12fdf34849fc1c8ee928a2ff"><div class="ttname"><a href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#ab0b8b76e12fdf34849fc1c8ee928a2ff">CocoaTweet::API::Interface::HttpBase::oauth_</a></div><div class="ttdeci">std::weak_ptr< CocoaTweet::OAuth::OAuth1 > oauth_</div><div class="ttdef"><b>Definition:</b> httpBase.h:11</div></div>
|
|
<div class="ttc" id="aclassCocoaTweet_1_1API_1_1Interface_1_1HttpBase_html"><div class="ttname"><a href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html">CocoaTweet::API::Interface::HttpBase</a></div><div class="ttdef"><b>Definition:</b> httpBase.h:8</div></div>
|
|
<div class="ttc" id="aclassCocoaTweet_1_1API_1_1Interface_1_1HttpBase_html_a6511d018265ca90a5c675b375b8feee0"><div class="ttname"><a href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#a6511d018265ca90a5c675b375b8feee0">CocoaTweet::API::Interface::HttpBase::url_</a></div><div class="ttdeci">std::string url_</div><div class="ttdef"><b>Definition:</b> httpBase.h:13</div></div>
|
|
<div class="ttc" id="aclassCocoaTweet_1_1API_1_1Interface_1_1HttpBase_html_aa80a8d2b339e3eed6f9e031518f8193b"><div class="ttname"><a href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#aa80a8d2b339e3eed6f9e031518f8193b">CocoaTweet::API::Interface::HttpBase::contentType_</a></div><div class="ttdeci">std::string contentType_</div><div class="ttdef"><b>Definition:</b> httpBase.h:14</div></div>
|
|
<div class="ttc" id="aclassCocoaTweet_1_1API_1_1Interface_1_1HttpBase_html_a65e649cd380fc68d69aa8b575a20ab10"><div class="ttname"><a href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#a65e649cd380fc68d69aa8b575a20ab10">CocoaTweet::API::Interface::HttpBase::curlCallback_</a></div><div class="ttdeci">static size_t curlCallback_(char *_ptr, size_t _size, size_t _nmemb, std::string *_stream)</div><div class="ttdef"><b>Definition:</b> httpBase.h:17</div></div>
|
|
<div class="ttc" id="aoauth_8h_html"><div class="ttname"><a href="oauth_8h.html">oauth.h</a></div></div>
|
|
<div class="ttc" id="aclassCocoaTweet_1_1API_1_1Interface_1_1HttpBase_html_a7c543dfa69524004df9e0fdcaa610313"><div class="ttname"><a href="classCocoaTweet_1_1API_1_1Interface_1_1HttpBase.html#a7c543dfa69524004df9e0fdcaa610313">CocoaTweet::API::Interface::HttpBase::bodyParam_</a></div><div class="ttdeci">std::map< std::string, std::string > bodyParam_</div><div class="ttdef"><b>Definition:</b> httpBase.h:12</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>
|