_username_config_8cpp.html 14.5 KB
<!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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>hueplusplus: examples/UsernameConfig.cpp 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>
<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">hueplusplus
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</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_d28a4824dc47e487b107a5db32ef43c4.html">examples</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">UsernameConfig.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;algorithm&gt;</code><br />
<code>#include &lt;fstream&gt;</code><br />
<code>#include &lt;iomanip&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;<a class="el" href="_bridge_8h_source.html">hueplusplus/Bridge.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="_lin_http_handler_8h_source.html">hueplusplus/LinHttpHandler.h</a>&gt;</code><br />
</div><div class="textblock"><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Include dependency graph for UsernameConfig.cpp:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="_username_config_8cpp__incl.png" border="0" usemap="#examples_2_username_config_8cpp" alt=""/></div>
<map name="examples_2_username_config_8cpp" id="examples_2_username_config_8cpp">
<area shape="rect" id="node6" href="_bridge_8h.html" title="hueplusplus/Bridge.h" alt="" coords="1686,80,1845,107"/>
<area shape="rect" id="node46" href="_lin_http_handler_8h.html" title="hueplusplus/LinHttpHandler.h" alt="" coords="2579,379,2792,405"/>
<area shape="rect" id="node12" href="_a_p_i_cache_8h.html" title="APICache.h" alt="" coords="969,379,1063,405"/>
<area shape="rect" id="node14" href="_hue_command_a_p_i_8h.html" title="HueCommandAPI.h" alt="" coords="1683,453,1831,480"/>
<area shape="rect" id="node20" href="_i_http_handler_8h.html" title="IHttpHandler.h" alt="" coords="2345,528,2461,555"/>
<area shape="rect" id="node21" href="_bridge_config_8h.html" title="BridgeConfig.h" alt="" coords="715,304,832,331"/>
<area shape="rect" id="node24" href="_brightness_strategy_8h.html" title="BrightnessStrategy.h" alt="" coords="2681,304,2837,331"/>
<area shape="rect" id="node26" href="_color_hue_strategy_8h.html" title="ColorHueStrategy.h" alt="" coords="2968,379,3115,405"/>
<area shape="rect" id="node28" href="_color_temperature_strategy_8h.html" title="ColorTemperatureStrategy.h" alt="" coords="3059,304,3261,331"/>
<area shape="rect" id="node30" href="_group_8h.html" title="Group.h" alt="" coords="1729,304,1802,331"/>
<area shape="rect" id="node33" href="_hue_device_types_8h.html" title="HueDeviceTypes.h" alt="" coords="2021,155,2163,181"/>
<area shape="rect" id="node34" href="_light_8h.html" title="Light.h" alt="" coords="2149,229,2216,256"/>
<area shape="rect" id="node36" href="_resource_list_8h.html" title="ResourceList.h" alt="" coords="519,304,635,331"/>
<area shape="rect" id="node39" href="_utils_8h.html" title="Utils.h" alt="" coords="1189,379,1253,405"/>
<area shape="rect" id="node40" href="_rule_8h.html" title="Rule.h" alt="" coords="1330,304,1393,331"/>
<area shape="rect" id="node42" href="_scene_8h.html" title="Scene.h" alt="" coords="943,304,1017,331"/>
<area shape="rect" id="node43" href="_schedule_8h.html" title="Schedule.h" alt="" coords="1065,304,1159,331"/>
<area shape="rect" id="node44" href="_sensor_8h.html" title="Sensor.h" alt="" coords="1651,229,1728,256"/>
<area shape="rect" id="node45" href="_sensor_list_8h.html" title="SensorList.h" alt="" coords="1052,155,1153,181"/>
<area shape="rect" id="node17" href="_hue_exception_8h.html" title="HueException.h" alt="" coords="1081,528,1205,555"/>
<area shape="rect" id="node22" href="_time_pattern_8h.html" title="TimePattern.h" alt="" coords="801,453,914,480"/>
<area shape="rect" id="node27" href="_color_units_8h.html" title="ColorUnits.h" alt="" coords="2521,453,2623,480"/>
<area shape="rect" id="node31" href="_action_8h.html" title="Action.h" alt="" coords="1584,453,1659,480"/>
<area shape="rect" id="node32" href="_state_transaction_8h.html" title="StateTransaction.h" alt="" coords="1854,379,1997,405"/>
<area shape="rect" id="node35" href="_base_device_8h.html" title="BaseDevice.h" alt="" coords="1983,304,2094,331"/>
<area shape="rect" id="node38" href="_new_device_list_8h.html" title="NewDeviceList.h" alt="" coords="509,379,640,405"/>
<area shape="rect" id="node41" href="_condition_8h.html" title="Condition.h" alt="" coords="1277,379,1373,405"/>
<area shape="rect" id="node47" href="_base_http_handler_8h.html" title="BaseHttpHandler.h" alt="" coords="2749,453,2893,480"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a60f0bf9d32c9f2c500d20fb8e3e69e08"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_username_config_8cpp.html#a60f0bf9d32c9f2c500d20fb8e3e69e08">SystemHttpHandler</a> = <a class="el" href="classhueplusplus_1_1_lin_http_handler.html">hueplusplus::LinHttpHandler</a></td></tr>
<tr class="separator:a60f0bf9d32c9f2c500d20fb8e3e69e08"><td class="memSeparator" colspan="2">&#160;</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:a121fd3332ab275881e2b29007cf2c228"><td class="memItemLeft" align="right" valign="top">nlohmann::json&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_username_config_8cpp.html#a121fd3332ab275881e2b29007cf2c228">readConfigFile</a> (const std::string &amp;filename)</td></tr>
<tr class="separator:a121fd3332ab275881e2b29007cf2c228"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a4e95568e5122316762a62049d48ae5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_username_config_8cpp.html#a8a4e95568e5122316762a62049d48ae5">saveConfigFile</a> (const std::string &amp;filename, const nlohmann::json &amp;config)</td></tr>
<tr class="separator:a8a4e95568e5122316762a62049d48ae5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e03eb0222587bec230cd7e4c7021a48"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhueplusplus_1_1_bridge.html">hue::Bridge</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_username_config_8cpp.html#a3e03eb0222587bec230cd7e4c7021a48">connectToBridge</a> (const std::string &amp;<a class="el" href="_lights_off_8cpp.html#adc05afa9d9bfcc39217447497e598792">username</a>, const std::string &amp;<a class="el" href="_lights_off_8cpp.html#abc2f0412950e5418ab984b2d60d1b984">macAddress</a>)</td></tr>
<tr class="separator:a3e03eb0222587bec230cd7e4c7021a48"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_username_config_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><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>Copyright Notice<br />
Copyright (C) 2021 Jan Rogall - developer<br />
 This file is part of hueplusplus.</p>
<p>hueplusplus is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
<p>hueplusplus is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p>
<p>You should have received a copy of the GNU Lesser General Public License along with hueplusplus. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="a60f0bf9d32c9f2c500d20fb8e3e69e08"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60f0bf9d32c9f2c500d20fb8e3e69e08">&#9670;&nbsp;</a></span>SystemHttpHandler</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="_bridge_setup_8cpp.html#a60f0bf9d32c9f2c500d20fb8e3e69e08">SystemHttpHandler</a> =  <a class="el" href="classhueplusplus_1_1_lin_http_handler.html">hueplusplus::LinHttpHandler</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a3e03eb0222587bec230cd7e4c7021a48"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e03eb0222587bec230cd7e4c7021a48">&#9670;&nbsp;</a></span>connectToBridge()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhueplusplus_1_1_bridge.html">hue::Bridge</a> connectToBridge </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>macAddress</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a3c04138a5bfe5d72780bb7e82a18e627"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c04138a5bfe5d72780bb7e82a18e627">&#9670;&nbsp;</a></span>main()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>argv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a121fd3332ab275881e2b29007cf2c228"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a121fd3332ab275881e2b29007cf2c228">&#9670;&nbsp;</a></span>readConfigFile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">nlohmann::json readConfigFile </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a8a4e95568e5122316762a62049d48ae5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a4e95568e5122316762a62049d48ae5">&#9670;&nbsp;</a></span>saveConfigFile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void saveConfigFile </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const nlohmann::json &amp;&#160;</td>
          <td class="paramname"><em>config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</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.13
</small></address>
</body>
</html>