This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
esp-firewall/doxygen/html/classfw_1_1_a_p_i.html

906 lines
46 KiB
HTML
Raw Permalink Normal View History

2022-07-30 11:46:19 +02:00
<!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=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ESP32/ESP8266 Firewall: fw::API Class 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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.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 id="projectrow">
<td id="projectalign">
<div id="projectname">ESP32/ESP8266 Firewall<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">a software firewall for ESP23 or ESP8266</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('classfw_1_1_a_p_i.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- 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 class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classfw_1_1_a_p_i-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">fw::API Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>The <a class="el" href="classfw_1_1_a_p_i.html" title="The API to create, edit or remove Firewall rules.">API</a> to create, edit or remove <a class="el" href="classfw_1_1_firewall.html" title="The Firewall will handle Firewall rules as linked list.">Firewall</a> rules.
<a href="classfw_1_1_a_p_i.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_a_p_i_8hpp_source.html">API.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a033d5efd077dfad456cb6e6e7dd2baca"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#a033d5efd077dfad456cb6e6e7dd2baca">API</a> (<a class="el" href="classfw_1_1_firewall.html">Firewall</a> *, const char *cert, const char *key, const char *username, const char *password, const String ip, const uint16_t port=8080)</td></tr>
<tr class="memdesc:a033d5efd077dfad456cb6e6e7dd2baca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a new <a class="el" href="classfw_1_1_a_p_i.html" title="The API to create, edit or remove Firewall rules.">API</a> object, assign ip and port to generate endpoint list, setup authentication, create WebServer, setup routing. <a href="classfw_1_1_a_p_i.html#a033d5efd077dfad456cb6e6e7dd2baca">More...</a><br /></td></tr>
<tr class="separator:a033d5efd077dfad456cb6e6e7dd2baca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66ac0bd592bb08d069aea199668670ab"><td class="memItemLeft" align="right" valign="top"><a id="a66ac0bd592bb08d069aea199668670ab" name="a66ac0bd592bb08d069aea199668670ab"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>~API</b> ()</td></tr>
<tr class="memdesc:a66ac0bd592bb08d069aea199668670ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy the <a class="el" href="classfw_1_1_a_p_i.html" title="The API to create, edit or remove Firewall rules.">API</a> object. <br /></td></tr>
<tr class="separator:a66ac0bd592bb08d069aea199668670ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:af5dc938ae5a274e3599d637e672b8d07"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#af5dc938ae5a274e3599d637e672b8d07">get_url_base</a> ()</td></tr>
<tr class="memdesc:af5dc938ae5a274e3599d637e672b8d07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the url base string e.g. <a href="http://0.0.0.0:8080/api">http://0.0.0.0:8080/api</a>. <a href="classfw_1_1_a_p_i.html#af5dc938ae5a274e3599d637e672b8d07">More...</a><br /></td></tr>
<tr class="separator:af5dc938ae5a274e3599d637e672b8d07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45dcdd4969f70a7f1a02e49a47b16a1d"><td class="memItemLeft" align="right" valign="top">ok_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#a45dcdd4969f70a7f1a02e49a47b16a1d">setup_auth</a> (const char *username, const char *password)</td></tr>
<tr class="memdesc:a45dcdd4969f70a7f1a02e49a47b16a1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set up authentication. <a href="classfw_1_1_a_p_i.html#a45dcdd4969f70a7f1a02e49a47b16a1d">More...</a><br /></td></tr>
<tr class="separator:a45dcdd4969f70a7f1a02e49a47b16a1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc9523a1b6e6a6e8f57a514a25c35b8c"><td class="memItemLeft" align="right" valign="top">auth_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#adc9523a1b6e6a6e8f57a514a25c35b8c">check_auth</a> ()</td></tr>
<tr class="memdesc:adc9523a1b6e6a6e8f57a514a25c35b8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">check if request to <a class="el" href="classfw_1_1_a_p_i.html" title="The API to create, edit or remove Firewall rules.">API</a> can proceed or needs to stop <a href="classfw_1_1_a_p_i.html#adc9523a1b6e6a6e8f57a514a25c35b8c">More...</a><br /></td></tr>
<tr class="separator:adc9523a1b6e6a6e8f57a514a25c35b8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90986dc50f303564e6f5af6d3707dd20"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#a90986dc50f303564e6f5af6d3707dd20">setup_routing</a> (const char *cert, const char *key)</td></tr>
<tr class="memdesc:a90986dc50f303564e6f5af6d3707dd20"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set up the routing/endpoints and encryption. <a href="classfw_1_1_a_p_i.html#a90986dc50f303564e6f5af6d3707dd20">More...</a><br /></td></tr>
<tr class="separator:a90986dc50f303564e6f5af6d3707dd20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad90a1bfa8e00c4e25a091e5e9a61772"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#aad90a1bfa8e00c4e25a091e5e9a61772">add_endpoint_to_list</a> (const String uri, const char *method, const char *description)</td></tr>
<tr class="memdesc:aad90a1bfa8e00c4e25a091e5e9a61772"><td class="mdescLeft">&#160;</td><td class="mdescRight">add endpoint information to linked list that is used for the /api endpoint <a href="classfw_1_1_a_p_i.html#aad90a1bfa8e00c4e25a091e5e9a61772">More...</a><br /></td></tr>
<tr class="separator:aad90a1bfa8e00c4e25a091e5e9a61772"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb74e3b9efc2305c943683b14957ac9d"><td class="memItemLeft" align="right" valign="top"><a id="aeb74e3b9efc2305c943683b14957ac9d" name="aeb74e3b9efc2305c943683b14957ac9d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>not_found_handler</b> ()</td></tr>
<tr class="memdesc:aeb74e3b9efc2305c943683b14957ac9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">handling not found <br /></td></tr>
<tr class="separator:aeb74e3b9efc2305c943683b14957ac9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a734cbd9da536fb297da87b4310f20ba1"><td class="memItemLeft" align="right" valign="top"><a id="a734cbd9da536fb297da87b4310f20ba1" name="a734cbd9da536fb297da87b4310f20ba1"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>get_endpoint_list_handler</b> ()</td></tr>
<tr class="memdesc:a734cbd9da536fb297da87b4310f20ba1"><td class="mdescLeft">&#160;</td><td class="mdescRight">GET handler to retrieve endpoint list. <br /></td></tr>
<tr class="separator:a734cbd9da536fb297da87b4310f20ba1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac76f5a6c9c28d71772b238a51b122e4a"><td class="memItemLeft" align="right" valign="top"><a id="ac76f5a6c9c28d71772b238a51b122e4a" name="ac76f5a6c9c28d71772b238a51b122e4a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>get_firewall_rule_handler</b> ()</td></tr>
<tr class="memdesc:ac76f5a6c9c28d71772b238a51b122e4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">GET handler to retrieve single firewall rule. <br /></td></tr>
<tr class="separator:ac76f5a6c9c28d71772b238a51b122e4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab904f77fa777a1c8c19deb8e39cf89e8"><td class="memItemLeft" align="right" valign="top"><a id="ab904f77fa777a1c8c19deb8e39cf89e8" name="ab904f77fa777a1c8c19deb8e39cf89e8"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>get_firewall_rules_handler</b> ()</td></tr>
<tr class="memdesc:ab904f77fa777a1c8c19deb8e39cf89e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">GET handler to retrieve firewall rules. <br /></td></tr>
<tr class="separator:ab904f77fa777a1c8c19deb8e39cf89e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d78e9dd43abb72da8872cb207db25e3"><td class="memItemLeft" align="right" valign="top"><a id="a2d78e9dd43abb72da8872cb207db25e3" name="a2d78e9dd43abb72da8872cb207db25e3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>post_firewall_handler</b> ()</td></tr>
<tr class="memdesc:a2d78e9dd43abb72da8872cb207db25e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">POST handler to create firewall rule. <br /></td></tr>
<tr class="separator:a2d78e9dd43abb72da8872cb207db25e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ce4a9dd9afae493f6639b6fb3f6ba45"><td class="memItemLeft" align="right" valign="top"><a id="a6ce4a9dd9afae493f6639b6fb3f6ba45" name="a6ce4a9dd9afae493f6639b6fb3f6ba45"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>put_firewall_handler</b> ()</td></tr>
<tr class="memdesc:a6ce4a9dd9afae493f6639b6fb3f6ba45"><td class="mdescLeft">&#160;</td><td class="mdescRight">PUT handler to update firewall rule. <br /></td></tr>
<tr class="separator:a6ce4a9dd9afae493f6639b6fb3f6ba45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a592c2aa501ff920ebcc125f8d5635deb"><td class="memItemLeft" align="right" valign="top"><a id="a592c2aa501ff920ebcc125f8d5635deb" name="a592c2aa501ff920ebcc125f8d5635deb"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>delete_firewall_handler</b> ()</td></tr>
<tr class="memdesc:a592c2aa501ff920ebcc125f8d5635deb"><td class="mdescLeft">&#160;</td><td class="mdescRight">DELETE handler to delete firewall rule. <br /></td></tr>
<tr class="separator:a592c2aa501ff920ebcc125f8d5635deb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abab79e90786d14836dcf113077891c50"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#abab79e90786d14836dcf113077891c50">request_has_all_firewall_parameter</a> ()</td></tr>
<tr class="memdesc:abab79e90786d14836dcf113077891c50"><td class="mdescLeft">&#160;</td><td class="mdescRight">check if request to create/update firewall rule has all required parameter <a href="classfw_1_1_a_p_i.html#abab79e90786d14836dcf113077891c50">More...</a><br /></td></tr>
<tr class="separator:abab79e90786d14836dcf113077891c50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ff5aeb3b916dae9219041dc240d9156"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#a0ff5aeb3b916dae9219041dc240d9156">json_new_attribute</a> (String key, String value, bool last=false)</td></tr>
<tr class="memdesc:a0ff5aeb3b916dae9219041dc240d9156"><td class="mdescLeft">&#160;</td><td class="mdescRight">add another attribute to the json object <a href="classfw_1_1_a_p_i.html#a0ff5aeb3b916dae9219041dc240d9156">More...</a><br /></td></tr>
<tr class="separator:a0ff5aeb3b916dae9219041dc240d9156"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba378d97c999dda14ef2e4e97a9948f5"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#aba378d97c999dda14ef2e4e97a9948f5">json_new_attribute</a> (String key, uint32_t value, bool last=false)</td></tr>
<tr class="memdesc:aba378d97c999dda14ef2e4e97a9948f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">add another attribute to the json object <a href="classfw_1_1_a_p_i.html#aba378d97c999dda14ef2e4e97a9948f5">More...</a><br /></td></tr>
<tr class="separator:aba378d97c999dda14ef2e4e97a9948f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbebab924241292706c0287dca5c3ff5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#acbebab924241292706c0287dca5c3ff5">json_generic_response</a> (String serialized_string, const uint16_t response_code)</td></tr>
<tr class="memdesc:acbebab924241292706c0287dca5c3ff5"><td class="mdescLeft">&#160;</td><td class="mdescRight">json response to send any string and response code <a href="classfw_1_1_a_p_i.html#acbebab924241292706c0287dca5c3ff5">More...</a><br /></td></tr>
<tr class="separator:acbebab924241292706c0287dca5c3ff5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1892bc26b882b055853e26ed95d8d802"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#a1892bc26b882b055853e26ed95d8d802">json_array_response</a> (String serialized_string, const uint16_t response_code)</td></tr>
<tr class="memdesc:a1892bc26b882b055853e26ed95d8d802"><td class="mdescLeft">&#160;</td><td class="mdescRight">json response that wraps the message in array brackets <a href="classfw_1_1_a_p_i.html#a1892bc26b882b055853e26ed95d8d802">More...</a><br /></td></tr>
<tr class="separator:a1892bc26b882b055853e26ed95d8d802"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b7d4ce75b9cdba0dd39c6c949ef1c15"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#a6b7d4ce75b9cdba0dd39c6c949ef1c15">json_message_response</a> (String message, const uint16_t response_code)</td></tr>
<tr class="memdesc:a6b7d4ce75b9cdba0dd39c6c949ef1c15"><td class="mdescLeft">&#160;</td><td class="mdescRight">json response to send message as json object <a href="classfw_1_1_a_p_i.html#a6b7d4ce75b9cdba0dd39c6c949ef1c15">More...</a><br /></td></tr>
<tr class="separator:a6b7d4ce75b9cdba0dd39c6c949ef1c15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac249b6e7533414d0296bde477cecac1b"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#ac249b6e7533414d0296bde477cecac1b">construct_json_firewall_rule</a> (<a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *rule_ptr)</td></tr>
<tr class="memdesc:ac249b6e7533414d0296bde477cecac1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">construct a firewall rule as json object <a href="classfw_1_1_a_p_i.html#ac249b6e7533414d0296bde477cecac1b">More...</a><br /></td></tr>
<tr class="separator:ac249b6e7533414d0296bde477cecac1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a682ec7e09a230507c39cbc7d7c7427d5"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#a682ec7e09a230507c39cbc7d7c7427d5">construct_json_firewall</a> ()</td></tr>
<tr class="memdesc:a682ec7e09a230507c39cbc7d7c7427d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">construct array of all firewall rules as json object <a href="classfw_1_1_a_p_i.html#a682ec7e09a230507c39cbc7d7c7427d5">More...</a><br /></td></tr>
<tr class="separator:a682ec7e09a230507c39cbc7d7c7427d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a175d139d29530e2946f67789c9652da8"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#a175d139d29530e2946f67789c9652da8">construct_json_api_endpoint</a> (<a class="el" href="structapi__endpoint__t.html">api_endpoint_t</a> *api_ptr)</td></tr>
<tr class="memdesc:a175d139d29530e2946f67789c9652da8"><td class="mdescLeft">&#160;</td><td class="mdescRight">construct an <a class="el" href="classfw_1_1_a_p_i.html" title="The API to create, edit or remove Firewall rules.">API</a> endpoint as json object <a href="classfw_1_1_a_p_i.html#a175d139d29530e2946f67789c9652da8">More...</a><br /></td></tr>
<tr class="separator:a175d139d29530e2946f67789c9652da8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa541a477e14a992b55e3f75351887cab"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_a_p_i.html#aa541a477e14a992b55e3f75351887cab">construct_json_api</a> ()</td></tr>
<tr class="memdesc:aa541a477e14a992b55e3f75351887cab"><td class="mdescLeft">&#160;</td><td class="mdescRight">construct array of all endpoints as json object <a href="classfw_1_1_a_p_i.html#aa541a477e14a992b55e3f75351887cab">More...</a><br /></td></tr>
<tr class="separator:aa541a477e14a992b55e3f75351887cab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a63b835a5e99f9addd8389d35aefc1aa1"><td class="memItemLeft" align="right" valign="top"><a id="a63b835a5e99f9addd8389d35aefc1aa1" name="a63b835a5e99f9addd8389d35aefc1aa1"></a>
WebServer *&#160;</td><td class="memItemRight" valign="bottom"><b>server</b></td></tr>
<tr class="separator:a63b835a5e99f9addd8389d35aefc1aa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9cd5f27dafe039210d12c60e1cd6172"><td class="memItemLeft" align="right" valign="top"><a id="ad9cd5f27dafe039210d12c60e1cd6172" name="ad9cd5f27dafe039210d12c60e1cd6172"></a>
<a class="el" href="classfw_1_1_firewall.html">Firewall</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>firewall</b></td></tr>
<tr class="separator:ad9cd5f27dafe039210d12c60e1cd6172"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc5ef98b67d8f69d633434fa6867e654"><td class="memItemLeft" align="right" valign="top"><a id="abc5ef98b67d8f69d633434fa6867e654" name="abc5ef98b67d8f69d633434fa6867e654"></a>
<a class="el" href="structcredential__t.html">credential_t</a>&#160;</td><td class="memItemRight" valign="bottom"><b>credentials</b></td></tr>
<tr class="separator:abc5ef98b67d8f69d633434fa6867e654"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec0db3ef7ca1b851a99eaf5a3ed0041c"><td class="memItemLeft" align="right" valign="top"><a id="aec0db3ef7ca1b851a99eaf5a3ed0041c" name="aec0db3ef7ca1b851a99eaf5a3ed0041c"></a>
<a class="el" href="structapi__endpoint__t.html">api_endpoint_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>endpoint_head</b> = NULL</td></tr>
<tr class="separator:aec0db3ef7ca1b851a99eaf5a3ed0041c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af59975d0ca4c32f2edb4e026fea008aa"><td class="memItemLeft" align="right" valign="top"><a id="af59975d0ca4c32f2edb4e026fea008aa" name="af59975d0ca4c32f2edb4e026fea008aa"></a>
String&#160;</td><td class="memItemRight" valign="bottom"><b>api_ip</b> = &quot;0.0.0.0&quot;</td></tr>
<tr class="separator:af59975d0ca4c32f2edb4e026fea008aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dcccd4386829794c7df93d21b1f91d8"><td class="memItemLeft" align="right" valign="top"><a id="a8dcccd4386829794c7df93d21b1f91d8" name="a8dcccd4386829794c7df93d21b1f91d8"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>api_port</b></td></tr>
<tr class="separator:a8dcccd4386829794c7df93d21b1f91d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31fe0e90c14da484b9cabfcf00e65b04"><td class="memItemLeft" align="right" valign="top"><a id="a31fe0e90c14da484b9cabfcf00e65b04" name="a31fe0e90c14da484b9cabfcf00e65b04"></a>
String&#160;</td><td class="memItemRight" valign="bottom"><b>json_response_type</b> = &quot;application/json; charset=utf-8&quot;</td></tr>
<tr class="separator:a31fe0e90c14da484b9cabfcf00e65b04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9df393e56c5ff6f934f8fa628bf68217"><td class="memItemLeft" align="right" valign="top"><a id="a9df393e56c5ff6f934f8fa628bf68217" name="a9df393e56c5ff6f934f8fa628bf68217"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><b>TAG</b> = &quot;[API]&quot;</td></tr>
<tr class="separator:a9df393e56c5ff6f934f8fa628bf68217"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >The <a class="el" href="classfw_1_1_a_p_i.html" title="The API to create, edit or remove Firewall rules.">API</a> to create, edit or remove <a class="el" href="classfw_1_1_firewall.html" title="The Firewall will handle Firewall rules as linked list.">Firewall</a> rules. </p>
<dl class="section author"><dt>Author</dt><dd>Florian Hoss </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a033d5efd077dfad456cb6e6e7dd2baca" name="a033d5efd077dfad456cb6e6e7dd2baca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a033d5efd077dfad456cb6e6e7dd2baca">&#9670;&nbsp;</a></span>API()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">fw::API::API </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classfw_1_1_firewall.html">fw::Firewall</a> *&#160;</td>
<td class="paramname"><em>firewall</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>cert</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>username</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>password</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const String&#160;</td>
<td class="paramname"><em>ip</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint16_t&#160;</td>
<td class="paramname"><em>port</em> = <code>8080</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct a new <a class="el" href="classfw_1_1_a_p_i.html" title="The API to create, edit or remove Firewall rules.">API</a> object, assign ip and port to generate endpoint list, setup authentication, create WebServer, setup routing. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">cert</td><td></td></tr>
<tr><td class="paramname">key</td><td></td></tr>
<tr><td class="paramname">username</td><td></td></tr>
<tr><td class="paramname">password</td><td></td></tr>
<tr><td class="paramname">ip</td><td></td></tr>
<tr><td class="paramname">port</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aad90a1bfa8e00c4e25a091e5e9a61772" name="aad90a1bfa8e00c4e25a091e5e9a61772"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad90a1bfa8e00c4e25a091e5e9a61772">&#9670;&nbsp;</a></span>add_endpoint_to_list()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void fw::API::add_endpoint_to_list </td>
<td>(</td>
<td class="paramtype">const String&#160;</td>
<td class="paramname"><em>uri</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>method</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>description</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>add endpoint information to linked list that is used for the /api endpoint </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">uri</td><td></td></tr>
<tr><td class="paramname">method</td><td></td></tr>
<tr><td class="paramname">description</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="adc9523a1b6e6a6e8f57a514a25c35b8c" name="adc9523a1b6e6a6e8f57a514a25c35b8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc9523a1b6e6a6e8f57a514a25c35b8c">&#9670;&nbsp;</a></span>check_auth()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auth_t fw::API::check_auth </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>check if request to <a class="el" href="classfw_1_1_a_p_i.html" title="The API to create, edit or remove Firewall rules.">API</a> can proceed or needs to stop </p>
<dl class="section return"><dt>Returns</dt><dd>auth_t </dd></dl>
</div>
</div>
<a id="aa541a477e14a992b55e3f75351887cab" name="aa541a477e14a992b55e3f75351887cab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa541a477e14a992b55e3f75351887cab">&#9670;&nbsp;</a></span>construct_json_api()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">String fw::API::construct_json_api </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>construct array of all endpoints as json object </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">api_ptr</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>String </dd></dl>
</div>
</div>
<a id="a175d139d29530e2946f67789c9652da8" name="a175d139d29530e2946f67789c9652da8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a175d139d29530e2946f67789c9652da8">&#9670;&nbsp;</a></span>construct_json_api_endpoint()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">String fw::API::construct_json_api_endpoint </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structapi__endpoint__t.html">api_endpoint_t</a> *&#160;</td>
<td class="paramname"><em>api_ptr</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>construct an <a class="el" href="classfw_1_1_a_p_i.html" title="The API to create, edit or remove Firewall rules.">API</a> endpoint as json object </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">api_ptr</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>String </dd></dl>
</div>
</div>
<a id="a682ec7e09a230507c39cbc7d7c7427d5" name="a682ec7e09a230507c39cbc7d7c7427d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a682ec7e09a230507c39cbc7d7c7427d5">&#9670;&nbsp;</a></span>construct_json_firewall()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">String fw::API::construct_json_firewall </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>construct array of all firewall rules as json object </p>
<dl class="section return"><dt>Returns</dt><dd>String </dd></dl>
</div>
</div>
<a id="ac249b6e7533414d0296bde477cecac1b" name="ac249b6e7533414d0296bde477cecac1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac249b6e7533414d0296bde477cecac1b">&#9670;&nbsp;</a></span>construct_json_firewall_rule()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">String fw::API::construct_json_firewall_rule </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *&#160;</td>
<td class="paramname"><em>rule_ptr</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>construct a firewall rule as json object </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">rule_ptr</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>String </dd></dl>
</div>
</div>
<a id="af5dc938ae5a274e3599d637e672b8d07" name="af5dc938ae5a274e3599d637e672b8d07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af5dc938ae5a274e3599d637e672b8d07">&#9670;&nbsp;</a></span>get_url_base()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">String fw::API::get_url_base </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the url base string e.g. <a href="http://0.0.0.0:8080/api">http://0.0.0.0:8080/api</a>. </p>
<dl class="section return"><dt>Returns</dt><dd>String </dd></dl>
</div>
</div>
<a id="a1892bc26b882b055853e26ed95d8d802" name="a1892bc26b882b055853e26ed95d8d802"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1892bc26b882b055853e26ed95d8d802">&#9670;&nbsp;</a></span>json_array_response()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void fw::API::json_array_response </td>
<td>(</td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>serialized_string</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint16_t&#160;</td>
<td class="paramname"><em>response_code</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>json response that wraps the message in array brackets </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">serialized_string</td><td></td></tr>
<tr><td class="paramname">response_code</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="acbebab924241292706c0287dca5c3ff5" name="acbebab924241292706c0287dca5c3ff5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbebab924241292706c0287dca5c3ff5">&#9670;&nbsp;</a></span>json_generic_response()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void fw::API::json_generic_response </td>
<td>(</td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>serialized_string</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint16_t&#160;</td>
<td class="paramname"><em>response_code</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>json response to send any string and response code </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">serialized_string</td><td></td></tr>
<tr><td class="paramname">response_code</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a6b7d4ce75b9cdba0dd39c6c949ef1c15" name="a6b7d4ce75b9cdba0dd39c6c949ef1c15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b7d4ce75b9cdba0dd39c6c949ef1c15">&#9670;&nbsp;</a></span>json_message_response()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void fw::API::json_message_response </td>
<td>(</td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>message</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint16_t&#160;</td>
<td class="paramname"><em>response_code</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>json response to send message as json object </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">message</td><td></td></tr>
<tr><td class="paramname">response_code</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a0ff5aeb3b916dae9219041dc240d9156" name="a0ff5aeb3b916dae9219041dc240d9156"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ff5aeb3b916dae9219041dc240d9156">&#9670;&nbsp;</a></span>json_new_attribute() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">String fw::API::json_new_attribute </td>
<td>(</td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>last</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>add another attribute to the json object </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key</td><td></td></tr>
<tr><td class="paramname">value</td><td></td></tr>
<tr><td class="paramname">last</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>String </dd></dl>
</div>
</div>
<a id="aba378d97c999dda14ef2e4e97a9948f5" name="aba378d97c999dda14ef2e4e97a9948f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba378d97c999dda14ef2e4e97a9948f5">&#9670;&nbsp;</a></span>json_new_attribute() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">String fw::API::json_new_attribute </td>
<td>(</td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>last</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>add another attribute to the json object </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key</td><td></td></tr>
<tr><td class="paramname">value</td><td></td></tr>
<tr><td class="paramname">last</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>String </dd></dl>
</div>
</div>
<a id="abab79e90786d14836dcf113077891c50" name="abab79e90786d14836dcf113077891c50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abab79e90786d14836dcf113077891c50">&#9670;&nbsp;</a></span>request_has_all_firewall_parameter()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fw::API::request_has_all_firewall_parameter </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>check if request to create/update firewall rule has all required parameter </p>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>
</div>
</div>
<a id="a45dcdd4969f70a7f1a02e49a47b16a1d" name="a45dcdd4969f70a7f1a02e49a47b16a1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45dcdd4969f70a7f1a02e49a47b16a1d">&#9670;&nbsp;</a></span>setup_auth()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ok_t fw::API::setup_auth </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>username</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>password</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set up authentication. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">username</td><td></td></tr>
<tr><td class="paramname">password</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ok_t </dd></dl>
</div>
</div>
<a id="a90986dc50f303564e6f5af6d3707dd20" name="a90986dc50f303564e6f5af6d3707dd20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90986dc50f303564e6f5af6d3707dd20">&#9670;&nbsp;</a></span>setup_routing()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void fw::API::setup_routing </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>cert</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>key</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set up the routing/endpoints and encryption. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">cert</td><td></td></tr>
<tr><td class="paramname">key</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="_a_p_i_8hpp_source.html">API.hpp</a></li>
<li>src/API.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><b>fw</b></li><li class="navelem"><a class="el" href="classfw_1_1_a_p_i.html">API</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4 </li>
</ul>
</div>
</body>
</html>