_new_device_list_8h_source.html
11.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!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: include/hueplusplus/NewDeviceList.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">hueplusplus
 <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_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_e05b4b7707bd5f9fd045e8be02b17d0a.html">hueplusplus</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">NewDeviceList.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="_new_device_list_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> </div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#ifndef INCLUDE_HUEPLUSPLUS_NEW_DEVICE_LIST_H</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#define INCLUDE_HUEPLUSPLUS_NEW_DEVICE_LIST_H</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">#include <map></span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <string></span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include "<a class="code" href="_time_pattern_8h.html">TimePattern.h</a>"</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "json/json.hpp"</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">namespace </span><a class="code" href="namespacehueplusplus.html">hueplusplus</a></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> {</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classhueplusplus_1_1_new_device_list.html"> 35</a></span> <span class="keyword">class </span><a class="code" href="classhueplusplus_1_1_new_device_list.html">NewDeviceList</a></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <a class="code" href="classhueplusplus_1_1_new_device_list.html#a6f0d36ffa3691397eb4ccae3711d0c0b">NewDeviceList</a>(<span class="keyword">const</span> std::string& lastScan, <span class="keyword">const</span> std::map<int, std::string>& devices);</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keyword">const</span> std::map<int, std::string>& <a class="code" href="classhueplusplus_1_1_new_device_list.html#ad56949dee021cd75e28a9f1e82c35f6b">getNewDevices</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keywordtype">bool</span> <a class="code" href="classhueplusplus_1_1_new_device_list.html#a6af4c9b27eadcf0aec9cc4e7cac0f137">hasLastScanTime</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keywordtype">bool</span> <a class="code" href="classhueplusplus_1_1_new_device_list.html#a80028dc3480f338f88525171daccce53">isScanActive</a>();</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <a class="code" href="classhueplusplus_1_1time_1_1_absolute_time.html">time::AbsoluteTime</a> <a class="code" href="classhueplusplus_1_1_new_device_list.html#a2fcd0310f9fddb1bfafdd1f3a2ceeae0">getLastScanTime</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keyword">static</span> <a class="code" href="classhueplusplus_1_1_new_device_list.html">NewDeviceList</a> <a class="code" href="classhueplusplus_1_1_new_device_list.html#a5b529a5a874e4acc4c00d9ad3a34e650">parse</a>(<span class="keyword">const</span> nlohmann::json& json);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  std::string lastScan;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  std::map<int, std::string> devices;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> };</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> } <span class="comment">// namespace hueplusplus</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="classhueplusplus_1_1_new_device_list_html_a2fcd0310f9fddb1bfafdd1f3a2ceeae0"><div class="ttname"><a href="classhueplusplus_1_1_new_device_list.html#a2fcd0310f9fddb1bfafdd1f3a2ceeae0">hueplusplus::NewDeviceList::getLastScanTime</a></div><div class="ttdeci">time::AbsoluteTime getLastScanTime() const</div><div class="ttdoc">Get time when last scan was completed. </div><div class="ttdef"><b>Definition:</b> NewDeviceList.cpp:41</div></div>
<div class="ttc" id="classhueplusplus_1_1_new_device_list_html_a5b529a5a874e4acc4c00d9ad3a34e650"><div class="ttname"><a href="classhueplusplus_1_1_new_device_list.html#a5b529a5a874e4acc4c00d9ad3a34e650">hueplusplus::NewDeviceList::parse</a></div><div class="ttdeci">static NewDeviceList parse(const nlohmann::json &json)</div><div class="ttdoc">Parse from json response. </div><div class="ttdef"><b>Definition:</b> NewDeviceList.cpp:45</div></div>
<div class="ttc" id="classhueplusplus_1_1_new_device_list_html_a80028dc3480f338f88525171daccce53"><div class="ttname"><a href="classhueplusplus_1_1_new_device_list.html#a80028dc3480f338f88525171daccce53">hueplusplus::NewDeviceList::isScanActive</a></div><div class="ttdeci">bool isScanActive()</div><div class="ttdoc">Get whether scan is currently active. </div><div class="ttdef"><b>Definition:</b> NewDeviceList.cpp:37</div></div>
<div class="ttc" id="namespacehueplusplus_html"><div class="ttname"><a href="namespacehueplusplus.html">hueplusplus</a></div><div class="ttdoc">Namespace for the hueplusplus library. </div><div class="ttdef"><b>Definition:</b> Action.h:27</div></div>
<div class="ttc" id="classhueplusplus_1_1_new_device_list_html"><div class="ttname"><a href="classhueplusplus_1_1_new_device_list.html">hueplusplus::NewDeviceList</a></div><div class="ttdoc">List of new devices found during the last scan. </div><div class="ttdef"><b>Definition:</b> NewDeviceList.h:35</div></div>
<div class="ttc" id="classhueplusplus_1_1_new_device_list_html_ad56949dee021cd75e28a9f1e82c35f6b"><div class="ttname"><a href="classhueplusplus_1_1_new_device_list.html#ad56949dee021cd75e28a9f1e82c35f6b">hueplusplus::NewDeviceList::getNewDevices</a></div><div class="ttdeci">const std::map< int, std::string > & getNewDevices() const</div><div class="ttdoc">Get a map of id and name of new devices. </div><div class="ttdef"><b>Definition:</b> NewDeviceList.cpp:29</div></div>
<div class="ttc" id="classhueplusplus_1_1time_1_1_absolute_time_html"><div class="ttname"><a href="classhueplusplus_1_1time_1_1_absolute_time.html">hueplusplus::time::AbsoluteTime</a></div><div class="ttdoc">One-time, absolute time point. </div><div class="ttdef"><b>Definition:</b> TimePattern.h:72</div></div>
<div class="ttc" id="_time_pattern_8h_html"><div class="ttname"><a href="_time_pattern_8h.html">TimePattern.h</a></div></div>
<div class="ttc" id="classhueplusplus_1_1_new_device_list_html_a6f0d36ffa3691397eb4ccae3711d0c0b"><div class="ttname"><a href="classhueplusplus_1_1_new_device_list.html#a6f0d36ffa3691397eb4ccae3711d0c0b">hueplusplus::NewDeviceList::NewDeviceList</a></div><div class="ttdeci">NewDeviceList(const std::string &lastScan, const std::map< int, std::string > &devices)</div><div class="ttdoc">Construct from data. </div><div class="ttdef"><b>Definition:</b> NewDeviceList.cpp:26</div></div>
<div class="ttc" id="classhueplusplus_1_1_new_device_list_html_a6af4c9b27eadcf0aec9cc4e7cac0f137"><div class="ttname"><a href="classhueplusplus_1_1_new_device_list.html#a6af4c9b27eadcf0aec9cc4e7cac0f137">hueplusplus::NewDeviceList::hasLastScanTime</a></div><div class="ttdeci">bool hasLastScanTime() const</div><div class="ttdoc">Get whether a last scan time is available. </div><div class="ttdef"><b>Definition:</b> NewDeviceList.cpp:33</div></div>
</div><!-- fragment --></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.13
</small></address>
</body>
</html>