_win_http_handler_8h_source.html
10.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
<!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/WinHttpHandler.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">WinHttpHandler.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="_win_http_handler_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="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#ifndef INCLUDE_HUEPLUSPLUS_WINHTTPHANDLER_H</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#define INCLUDE_HUEPLUSPLUS_WINHTTPHANDLER_H</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</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> <span class="preprocessor">#include <vector></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <winsock2.h></span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="_base_http_handler_8h.html">BaseHttpHandler.h</a>"</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">namespace </span><a class="code" href="namespacehueplusplus.html">hueplusplus</a></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> {</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classhueplusplus_1_1_win_http_handler.html"> 36</a></span> <span class="keyword">class </span><a class="code" href="classhueplusplus_1_1_win_http_handler.html">WinHttpHandler</a> : <span class="keyword">public</span> <a class="code" href="classhueplusplus_1_1_base_http_handler.html">BaseHttpHandler</a></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> {</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <a class="code" href="classhueplusplus_1_1_win_http_handler.html#a222758a0c48a6ba0ef1a360a70575a8a">WinHttpHandler</a>();</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <a class="code" href="classhueplusplus_1_1_win_http_handler.html#a8005b6b984bb82259b5f1149fe0b97cd">~WinHttpHandler</a>();</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  std::string <a class="code" href="classhueplusplus_1_1_win_http_handler.html#a1d3cd49cacaf22081bab27024cfcce33">send</a>(<span class="keyword">const</span> std::string& msg, <span class="keyword">const</span> std::string& adr, <span class="keywordtype">int</span> port = 80) <span class="keyword">const override</span>;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  std::vector<std::string> <a class="code" href="classhueplusplus_1_1_win_http_handler.html#aceb94114ec78023a3cd45375205bbde5">sendMulticast</a>(<span class="keyword">const</span> std::string& msg, <span class="keyword">const</span> std::string& adr = <span class="stringliteral">"239.255.255.250"</span>,</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="keywordtype">int</span> port = 1900, std::chrono::steady_clock::duration timeout = std::chrono::seconds(5)) <span class="keyword">const override</span>;</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="keyword">private</span>:</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  WSADATA wsaData;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> };</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> } <span class="comment">// namespace hueplusplus</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="_base_http_handler_8h_html"><div class="ttname"><a href="_base_http_handler_8h.html">BaseHttpHandler.h</a></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_win_http_handler_html_aceb94114ec78023a3cd45375205bbde5"><div class="ttname"><a href="classhueplusplus_1_1_win_http_handler.html#aceb94114ec78023a3cd45375205bbde5">hueplusplus::WinHttpHandler::sendMulticast</a></div><div class="ttdeci">std::vector< std::string > sendMulticast(const std::string &msg, const std::string &adr="239.255.255.250", int port=1900, std::chrono::steady_clock::duration timeout=std::chrono::seconds(5)) const override</div><div class="ttdoc">Function that sends a multicast request with the specified message. </div><div class="ttdef"><b>Definition:</b> WinHttpHandler.cpp:175</div></div>
<div class="ttc" id="classhueplusplus_1_1_win_http_handler_html_a8005b6b984bb82259b5f1149fe0b97cd"><div class="ttname"><a href="classhueplusplus_1_1_win_http_handler.html#a8005b6b984bb82259b5f1149fe0b97cd">hueplusplus::WinHttpHandler::~WinHttpHandler</a></div><div class="ttdeci">~WinHttpHandler()</div><div class="ttdoc">Dtor needed for wsaData cleanup. </div><div class="ttdef"><b>Definition:</b> WinHttpHandler.cpp:70</div></div>
<div class="ttc" id="classhueplusplus_1_1_win_http_handler_html_a222758a0c48a6ba0ef1a360a70575a8a"><div class="ttname"><a href="classhueplusplus_1_1_win_http_handler.html#a222758a0c48a6ba0ef1a360a70575a8a">hueplusplus::WinHttpHandler::WinHttpHandler</a></div><div class="ttdeci">WinHttpHandler()</div><div class="ttdoc">Ctor needed for initializing wsaData. </div><div class="ttdef"><b>Definition:</b> WinHttpHandler.cpp:59</div></div>
<div class="ttc" id="classhueplusplus_1_1_base_http_handler_html"><div class="ttname"><a href="classhueplusplus_1_1_base_http_handler.html">hueplusplus::BaseHttpHandler</a></div><div class="ttdoc">Base class for classes that handle http requests and multicast requests. </div><div class="ttdef"><b>Definition:</b> BaseHttpHandler.h:38</div></div>
<div class="ttc" id="classhueplusplus_1_1_win_http_handler_html"><div class="ttname"><a href="classhueplusplus_1_1_win_http_handler.html">hueplusplus::WinHttpHandler</a></div><div class="ttdoc">Class to handle http requests and multicast requests on windows systems. </div><div class="ttdef"><b>Definition:</b> WinHttpHandler.h:36</div></div>
<div class="ttc" id="classhueplusplus_1_1_win_http_handler_html_a1d3cd49cacaf22081bab27024cfcce33"><div class="ttname"><a href="classhueplusplus_1_1_win_http_handler.html#a1d3cd49cacaf22081bab27024cfcce33">hueplusplus::WinHttpHandler::send</a></div><div class="ttdeci">std::string send(const std::string &msg, const std::string &adr, int port=80) const override</div><div class="ttdoc">Function that sends a given message to the specified host and returns the response. </div><div class="ttdef"><b>Definition:</b> WinHttpHandler.cpp:75</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>