mirror of
https://github.com/jialexd/sdk-ameba-v4.0c_180328.git
synced 2024-11-25 23:44:20 +00:00
175 lines
18 KiB
HTML
Executable file
175 lines
18 KiB
HTML
Executable file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.11"/>
|
|
<title>SDK3.5: httpc.h File Reference</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>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { init_search(); });
|
|
</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">SDK3.5
|
|
</div>
|
|
<div id="projectbrief">This document shows Ameba SDK 3.5 APIs</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.11 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
|
</ul>
|
|
</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_59865070466a2d887ccae359ce349522.html">sdk-ameba</a></li><li class="navelem"><a class="el" href="dir_da6bad2e2c5a50fa6b6edae596f8e89f.html">component</a></li><li class="navelem"><a class="el" href="dir_407195b71e2fda49d4a285654b5b25b9.html">common</a></li><li class="navelem"><a class="el" href="dir_199fc8db423d23fe221af67c9b9ab28d.html">network</a></li><li class="navelem"><a class="el" href="dir_ad5b78d108ccb48c78676afdc0ab2c28.html">httpc</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Data Structures</a> |
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">httpc.h File Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>This file provides user interface for HTTP/HTTPS client.
|
|
<a href="#details">More...</a></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
|
Data Structures</h2></td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structhttp__response.html">http_response</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The structure is the context used for HTTP response header parsing. <a href="structhttp__response.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structhttpc__conn.html">httpc_conn</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The structure is the context used for connection. <a href="structhttpc__conn.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:ga9588b3030793be05e1346330e2828990"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#ga9588b3030793be05e1346330e2828990">httpc_conn_new</a> (uint8_t secure, char *client_cert, char *client_key, char *ca_certs)</td></tr>
|
|
<tr class="memdesc:ga9588b3030793be05e1346330e2828990"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to generate connection context for an HTTP/HTTPS client. <a href="group__httpc.html#ga9588b3030793be05e1346330e2828990">More...</a><br /></td></tr>
|
|
<tr class="separator:ga9588b3030793be05e1346330e2828990"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga3ef2d91d72af7b29c34b9ccd7633d606"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#ga3ef2d91d72af7b29c34b9ccd7633d606">httpc_conn_free</a> (struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> *conn)</td></tr>
|
|
<tr class="memdesc:ga3ef2d91d72af7b29c34b9ccd7633d606"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to deallocate a connection context. <a href="group__httpc.html#ga3ef2d91d72af7b29c34b9ccd7633d606">More...</a><br /></td></tr>
|
|
<tr class="separator:ga3ef2d91d72af7b29c34b9ccd7633d606"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga9ac713ce7902c9a4e2d3d8ecd98bbb24"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#ga9ac713ce7902c9a4e2d3d8ecd98bbb24">httpc_conn_connect</a> (struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> *conn, char *host, uint16_t port, uint32_t timeout)</td></tr>
|
|
<tr class="memdesc:ga9ac713ce7902c9a4e2d3d8ecd98bbb24"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to connect to a server. <a href="group__httpc.html#ga9ac713ce7902c9a4e2d3d8ecd98bbb24">More...</a><br /></td></tr>
|
|
<tr class="separator:ga9ac713ce7902c9a4e2d3d8ecd98bbb24"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gab38acec7af38ef32e3fb5b453b02e7e5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#gab38acec7af38ef32e3fb5b453b02e7e5">httpc_conn_close</a> (struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> *conn)</td></tr>
|
|
<tr class="memdesc:gab38acec7af38ef32e3fb5b453b02e7e5"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to close connection from a server. <a href="group__httpc.html#gab38acec7af38ef32e3fb5b453b02e7e5">More...</a><br /></td></tr>
|
|
<tr class="separator:gab38acec7af38ef32e3fb5b453b02e7e5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaebfbea2404de35dfe139c84a63431420"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#gaebfbea2404de35dfe139c84a63431420">httpc_conn_setup_user_password</a> (struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> *conn, char *user, char *password)</td></tr>
|
|
<tr class="memdesc:gaebfbea2404de35dfe139c84a63431420"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to setup authorization for connection. <a href="group__httpc.html#gaebfbea2404de35dfe139c84a63431420">More...</a><br /></td></tr>
|
|
<tr class="separator:gaebfbea2404de35dfe139c84a63431420"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gab20f3a4f75881d051dc8f2950ce426a3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#gab20f3a4f75881d051dc8f2950ce426a3">httpc_setup_debug</a> (uint8_t debug)</td></tr>
|
|
<tr class="memdesc:gab20f3a4f75881d051dc8f2950ce426a3"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to setup httpc debug. <a href="group__httpc.html#gab20f3a4f75881d051dc8f2950ce426a3">More...</a><br /></td></tr>
|
|
<tr class="separator:gab20f3a4f75881d051dc8f2950ce426a3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga2a91dd4c3973149814fa3dbad64619d3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#ga2a91dd4c3973149814fa3dbad64619d3">httpc_free</a> (void *ptr)</td></tr>
|
|
<tr class="memdesc:ga2a91dd4c3973149814fa3dbad64619d3"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to free memory allocated by httpc API, such as <a class="el" href="group__httpc.html#gae908ff84ede541b3f2c5ab87f66fc768" title="This function is used to get a header field from HTTP header of connection context. ">httpc_response_get_header_field()</a>. <a href="group__httpc.html#ga2a91dd4c3973149814fa3dbad64619d3">More...</a><br /></td></tr>
|
|
<tr class="separator:ga2a91dd4c3973149814fa3dbad64619d3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaa7370c608bdf4ff9e6bb021557cea0c2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#gaa7370c608bdf4ff9e6bb021557cea0c2">httpc_conn_dump_header</a> (struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> *conn)</td></tr>
|
|
<tr class="memdesc:gaa7370c608bdf4ff9e6bb021557cea0c2"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to dump the parsed HTTP header of response in connection context. <a href="group__httpc.html#gaa7370c608bdf4ff9e6bb021557cea0c2">More...</a><br /></td></tr>
|
|
<tr class="separator:gaa7370c608bdf4ff9e6bb021557cea0c2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gab2df82e33b688fd99f300b12a8949613"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#gab2df82e33b688fd99f300b12a8949613">httpc_request_write_header_start</a> (struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> *conn, char *method, char *resource, char *content_type, size_t content_len)</td></tr>
|
|
<tr class="memdesc:gab2df82e33b688fd99f300b12a8949613"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to start a HTTP request in connection. <a href="group__httpc.html#gab2df82e33b688fd99f300b12a8949613">More...</a><br /></td></tr>
|
|
<tr class="separator:gab2df82e33b688fd99f300b12a8949613"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae60fa22f56998399ccb2bbb56983fd2a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#gae60fa22f56998399ccb2bbb56983fd2a">httpc_request_write_header</a> (struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> *conn, char *name, char *value)</td></tr>
|
|
<tr class="memdesc:gae60fa22f56998399ccb2bbb56983fd2a"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to add an HTTP header field to HTTP request. <a href="group__httpc.html#gae60fa22f56998399ccb2bbb56983fd2a">More...</a><br /></td></tr>
|
|
<tr class="separator:gae60fa22f56998399ccb2bbb56983fd2a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga18dd661b7c6f7310ea224fba78602291"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#ga18dd661b7c6f7310ea224fba78602291">httpc_request_write_header_finish</a> (struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> *conn)</td></tr>
|
|
<tr class="memdesc:ga18dd661b7c6f7310ea224fba78602291"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to write HTTP request header data to connection. <a href="group__httpc.html#ga18dd661b7c6f7310ea224fba78602291">More...</a><br /></td></tr>
|
|
<tr class="separator:ga18dd661b7c6f7310ea224fba78602291"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gab0b6ce1439f8741813637794fcf83380"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#gab0b6ce1439f8741813637794fcf83380">httpc_request_write_data</a> (struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> *conn, uint8_t *data, size_t data_len)</td></tr>
|
|
<tr class="memdesc:gab0b6ce1439f8741813637794fcf83380"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to write HTTP request body data to connection. <a href="group__httpc.html#gab0b6ce1439f8741813637794fcf83380">More...</a><br /></td></tr>
|
|
<tr class="separator:gab0b6ce1439f8741813637794fcf83380"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae8b0dd05a72cd0cbc98f1a8448141ba4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#gae8b0dd05a72cd0cbc98f1a8448141ba4">httpc_response_is_status</a> (struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> *conn, char *status)</td></tr>
|
|
<tr class="memdesc:gae8b0dd05a72cd0cbc98f1a8448141ba4"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to check HTTP status of response in connection context. <a href="group__httpc.html#gae8b0dd05a72cd0cbc98f1a8448141ba4">More...</a><br /></td></tr>
|
|
<tr class="separator:gae8b0dd05a72cd0cbc98f1a8448141ba4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gac482492bb0f68625157c13194a549512"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#gac482492bb0f68625157c13194a549512">httpc_response_read_header</a> (struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> *conn)</td></tr>
|
|
<tr class="memdesc:gac482492bb0f68625157c13194a549512"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to read HTTP header from client socket descriptor and parse content to connection context. <a href="group__httpc.html#gac482492bb0f68625157c13194a549512">More...</a><br /></td></tr>
|
|
<tr class="separator:gac482492bb0f68625157c13194a549512"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae3cb9644a42e5008eac86a7233b7fb1c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#gae3cb9644a42e5008eac86a7233b7fb1c">httpc_response_read_data</a> (struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> *conn, uint8_t *data, size_t data_len)</td></tr>
|
|
<tr class="memdesc:gae3cb9644a42e5008eac86a7233b7fb1c"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to read data from HTTP/HTTPS connection. <a href="group__httpc.html#gae3cb9644a42e5008eac86a7233b7fb1c">More...</a><br /></td></tr>
|
|
<tr class="separator:gae3cb9644a42e5008eac86a7233b7fb1c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae908ff84ede541b3f2c5ab87f66fc768"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpc.html#gae908ff84ede541b3f2c5ab87f66fc768">httpc_response_get_header_field</a> (struct <a class="el" href="structhttpc__conn.html">httpc_conn</a> *conn, char *field, char **value)</td></tr>
|
|
<tr class="memdesc:gae908ff84ede541b3f2c5ab87f66fc768"><td class="mdescLeft"> </td><td class="mdescRight">This function is used to get a header field from HTTP header of connection context. <a href="group__httpc.html#gae908ff84ede541b3f2c5ab87f66fc768">More...</a><br /></td></tr>
|
|
<tr class="separator:gae908ff84ede541b3f2c5ab87f66fc768"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>This file provides user interface for HTTP/HTTPS client. </p>
|
|
<dl class="section author"><dt>Author</dt><dd></dd></dl>
|
|
<dl class="section version"><dt>Version</dt><dd></dd></dl>
|
|
<dl class="section attention"><dt>Attention</dt><dd></dd></dl>
|
|
<p>This module is a confidential and proprietary property of RealTek and possession or use of this module requires written permission of RealTek.</p>
|
|
<p>Copyright(c) 2016, Realtek Semiconductor Corporation. All rights reserved. </p>
|
|
</div></div><!-- contents -->
|
|
<!-- 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.11
|
|
</small></address>
|
|
</body>
|
|
</html>
|