blob: 62811d0adeaab556fa6f10bb390b803fd2ffe98e [file] [log] [blame]
<!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.6"/>
<title>Paho C++: src/mqtt/will_options.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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</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="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">Paho C++
&#160;<span id="projectnumber">1.0</span>
</div>
<div id="projectbrief">The Paho MQTT C++ Client Library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<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&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</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&#160;List</span></a></li>
</ul>
</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">
$(document).ready(function(){initNavTree('will__options_8h_source.html','');});
</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)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a></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="headertitle">
<div class="title">will_options.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="will__options_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>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">/*******************************************************************************</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * Copyright (c) 2016 Guilherme M. Ferreira &lt;guilherme.maciel.ferreira@gmail.com&gt;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * All rights reserved. This program and the accompanying materials</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * are made available under the terms of the Eclipse Public License v1.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * and Eclipse Distribution License v1.0 which accompany this distribution.</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * The Eclipse Public License is available at</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * http://www.eclipse.org/legal/epl-v10.html</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * and the Eclipse Distribution License is available at</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * http://www.eclipse.org/org/documents/edl-v10.php.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment"> * Contributors:</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment"> * Guilherme M. Ferreira - initial implementation and documentation</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment"> * Frank Pagliughi - added copy &amp; move operations</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment"> *******************************************************************************/</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#ifndef __mqtt_will_options_h</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define __mqtt_will_options_h</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &quot;MQTTAsync.h&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="types_8h.html">mqtt/types.h</a>&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="message_8h.html">mqtt/message.h</a>&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="topic_8h.html">mqtt/topic.h</a>&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">namespace </span>mqtt {</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="keyword">class </span>connect_options;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classmqtt_1_1will__options.html"> 47</a></span>&#160;<span class="keyword">class </span><a class="code" href="classmqtt_1_1will__options.html">will_options</a></div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;{</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keyword">static</span> constexpr <span class="keywordtype">int</span> DFLT_QOS = 0;</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="keyword">static</span> constexpr <span class="keywordtype">bool</span> DFLT_RETAINED = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> MQTTAsync_willOptions DFLT_C_STRUCT;</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; MQTTAsync_willOptions opts_;</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <a class="code" href="classmqtt_1_1buffer__ref.html">string_ref</a> topic_;</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <a class="code" href="classmqtt_1_1buffer__ref.html">binary_ref</a> payload_;</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classmqtt_1_1will__options.html#ab5e824c91a65212d9b79c704c6ae6f29"> 66</a></span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classmqtt_1_1connect__options.html">connect_options</a>;</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span>connect_options_test;</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span>will_options_test;</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span>* c_str(<span class="keyword">const</span> <a class="code" href="classmqtt_1_1buffer__ref.html">string_ref</a>&amp; sr) {</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keywordflow">return</span> sr ? sr.<a class="code" href="classmqtt_1_1buffer__ref.html#a940a8cf306fd985b2f3c85a79328b423">to_string</a>().c_str() : <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; }</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classmqtt_1_1will__options.html#ac56a7fbfa543f5c6ce01a2b2fdd1283c"> 87</a></span>&#160; <span class="keyword">using</span> <a class="code" href="classmqtt_1_1will__options.html#ac56a7fbfa543f5c6ce01a2b2fdd1283c">ptr_t</a> = std::shared_ptr&lt;will_options&gt;;</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classmqtt_1_1will__options.html#ac86ef64ef281a3ecc461a8a869ef756c"> 89</a></span>&#160; <span class="keyword">using</span> <a class="code" href="classmqtt_1_1will__options.html#ac86ef64ef281a3ecc461a8a869ef756c">const_ptr_t</a> = std::shared_ptr&lt;const will_options&gt;;</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <a class="code" href="classmqtt_1_1will__options.html#ab30a4a0063dfb1653ddf80e84c0d4bb9">will_options</a>();</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <a class="code" href="classmqtt_1_1will__options.html#ab30a4a0063dfb1653ddf80e84c0d4bb9">will_options</a>(<a class="code" href="classmqtt_1_1buffer__ref.html">string_ref</a> top, <span class="keyword">const</span> <span class="keywordtype">void</span> *payload, <span class="keywordtype">size_t</span> payload_len,</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="keywordtype">int</span> qos=DFLT_QOS, <span class="keywordtype">bool</span> retained=DFLT_RETAINED);</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <a class="code" href="classmqtt_1_1will__options.html#ab30a4a0063dfb1653ddf80e84c0d4bb9">will_options</a>(<span class="keyword">const</span> <a class="code" href="classmqtt_1_1topic.html">topic</a>&amp; top, <span class="keyword">const</span> <span class="keywordtype">void</span> *payload, <span class="keywordtype">size_t</span> payload_len,</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="keywordtype">int</span> qos=DFLT_QOS, <span class="keywordtype">bool</span> retained=DFLT_RETAINED);</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <a class="code" href="classmqtt_1_1will__options.html#ab30a4a0063dfb1653ddf80e84c0d4bb9">will_options</a>(<a class="code" href="classmqtt_1_1buffer__ref.html">string_ref</a> top, <a class="code" href="classmqtt_1_1buffer__ref.html">binary_ref</a> payload,</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keywordtype">int</span> qos=DFLT_QOS, <span class="keywordtype">bool</span> retained=DFLT_RETAINED);</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <a class="code" href="classmqtt_1_1will__options.html#ab30a4a0063dfb1653ddf80e84c0d4bb9">will_options</a>(<a class="code" href="classmqtt_1_1buffer__ref.html">string_ref</a> top, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; payload,</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keywordtype">int</span> qos=DFLT_QOS, <span class="keywordtype">bool</span> retained=DFLT_QOS);</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <a class="code" href="classmqtt_1_1will__options.html#ab30a4a0063dfb1653ddf80e84c0d4bb9">will_options</a>(<span class="keyword">const</span> <a class="code" href="classmqtt_1_1message.html">message</a>&amp; msg);</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <a class="code" href="classmqtt_1_1will__options.html#ab30a4a0063dfb1653ddf80e84c0d4bb9">will_options</a>(<span class="keyword">const</span> <a class="code" href="classmqtt_1_1will__options.html">will_options</a>&amp; opt);</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <a class="code" href="classmqtt_1_1will__options.html#ab30a4a0063dfb1653ddf80e84c0d4bb9">will_options</a>(<a class="code" href="classmqtt_1_1will__options.html">will_options</a>&amp;&amp; opt);</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <a class="code" href="classmqtt_1_1will__options.html">will_options</a>&amp; <a class="code" href="classmqtt_1_1will__options.html#a38b0ebea7545384f9871920810163834">operator=</a>(<span class="keyword">const</span> <a class="code" href="classmqtt_1_1will__options.html">will_options</a>&amp; opt);</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <a class="code" href="classmqtt_1_1will__options.html">will_options</a>&amp; <a class="code" href="classmqtt_1_1will__options.html#a38b0ebea7545384f9871920810163834">operator=</a>(<a class="code" href="classmqtt_1_1will__options.html">will_options</a>&amp;&amp; opt);</div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="classmqtt_1_1will__options.html#a3ace4c9e5aef81654cdb5795c0926523"> 168</a></span>&#160; <span class="keywordtype">string</span> <a class="code" href="classmqtt_1_1will__options.html#a3ace4c9e5aef81654cdb5795c0926523">get_topic</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> topic_ ? topic_.<a class="code" href="classmqtt_1_1buffer__ref.html#a940a8cf306fd985b2f3c85a79328b423">to_string</a>() : string(); }</div>
<div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="classmqtt_1_1will__options.html#acba39c10d33a6e3c0245b25830f1ee0c"> 173</a></span>&#160; <span class="keyword">const</span> <a class="code" href="classmqtt_1_1buffer__ref.html">binary_ref</a>&amp; <a class="code" href="classmqtt_1_1will__options.html#acba39c10d33a6e3c0245b25830f1ee0c">get_payload</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> payload_; }</div>
<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="classmqtt_1_1will__options.html#aa6fe0b0fae3537609bc54e746aed07ed"> 178</a></span>&#160; <span class="keywordtype">string</span> <a class="code" href="classmqtt_1_1will__options.html#aa6fe0b0fae3537609bc54e746aed07ed">get_payload_str</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> payload_ ? payload_.<a class="code" href="classmqtt_1_1buffer__ref.html#a940a8cf306fd985b2f3c85a79328b423">to_string</a>() : string(); }</div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="classmqtt_1_1will__options.html#a1876b5c2b1176c2759755f225a91e7c3"> 183</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="classmqtt_1_1will__options.html#a1876b5c2b1176c2759755f225a91e7c3">get_qos</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> opts_.qos; }</div>
<div class="line"><a name="l00188"></a><span class="lineno"><a class="line" href="classmqtt_1_1will__options.html#aa9202a426bed90785d641f57cae5925e"> 188</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classmqtt_1_1will__options.html#aa9202a426bed90785d641f57cae5925e">is_retained</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> opts_.retained != 0; }</div>
<div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="classmqtt_1_1will__options.html#a5ee824476eb40b39aabc18ed0feb158b"> 193</a></span>&#160; const_message_ptr <a class="code" href="classmqtt_1_1will__options.html#a5ee824476eb40b39aabc18ed0feb158b">get_message</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classmqtt_1_1message.html#a3837ff1e6d7ed1227d57fafe1e3618a0">message::create</a>(topic_, payload_, opts_.qos, to_bool(opts_.retained));</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; }</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmqtt_1_1will__options.html#a6f7d6e083440de05cfd631cc3f063240">set_topic</a>(<a class="code" href="classmqtt_1_1buffer__ref.html">string_ref</a> top);</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmqtt_1_1will__options.html#a132976bc745ba889a4aae76173f2c569">set_payload</a>(<a class="code" href="classmqtt_1_1buffer__ref.html">binary_ref</a> msg);</div>
<div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="classmqtt_1_1will__options.html#a7412354ed5599b9bc267464bbacae972"> 210</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmqtt_1_1will__options.html#a7412354ed5599b9bc267464bbacae972">set_payload</a>(<span class="keywordtype">string</span> msg) { <a class="code" href="classmqtt_1_1will__options.html#a7412354ed5599b9bc267464bbacae972">set_payload</a>(<a class="code" href="classmqtt_1_1buffer__ref.html">binary_ref</a>(std::move(msg))); }</div>
<div class="line"><a name="l00215"></a><span class="lineno"><a class="line" href="classmqtt_1_1will__options.html#a37b9e92e0b9d339af19bba3a0b30c2c4"> 215</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmqtt_1_1will__options.html#a37b9e92e0b9d339af19bba3a0b30c2c4">set_qos</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> qos) { opts_.qos = qos; }</div>
<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="classmqtt_1_1will__options.html#a5767dc68cb8bfec285ffcfaf71a5c077"> 221</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmqtt_1_1will__options.html#a5767dc68cb8bfec285ffcfaf71a5c077">set_retained</a>(<span class="keywordtype">bool</span> retained) { opts_.retained = to_int(retained); }</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160;};</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;<span class="keyword">using</span> will_options_ptr = <a class="code" href="classmqtt_1_1will__options.html#ac56a7fbfa543f5c6ce01a2b2fdd1283c">will_options::ptr_t</a>;</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;<span class="keyword">using</span> const_will_options_ptr = <a class="code" href="classmqtt_1_1will__options.html#ac86ef64ef281a3ecc461a8a869ef756c">will_options::const_ptr_t</a>;</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160;</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160;<span class="comment">// end namespace mqtt</span></div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;}</div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160;</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160;<span class="preprocessor">#endif // __mqtt_will_options_h</span></div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160;<span class="preprocessor"></span></div>
<div class="ttc" id="types_8h_html"><div class="ttname"><a href="types_8h.html">types.h</a></div><div class="ttdoc">Basic types and type conversions for the Paho MQTT C++ library. </div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_a5ee824476eb40b39aabc18ed0feb158b"><div class="ttname"><a href="classmqtt_1_1will__options.html#a5ee824476eb40b39aabc18ed0feb158b">mqtt::will_options::get_message</a></div><div class="ttdeci">const_message_ptr get_message() const </div><div class="ttdoc">Gets the LWT message as a message object. </div><div class="ttdef"><b>Definition:</b> will_options.h:193</div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_aa6fe0b0fae3537609bc54e746aed07ed"><div class="ttname"><a href="classmqtt_1_1will__options.html#aa6fe0b0fae3537609bc54e746aed07ed">mqtt::will_options::get_payload_str</a></div><div class="ttdeci">string get_payload_str() const </div><div class="ttdoc">Gets the LWT message payload as a string. </div><div class="ttdef"><b>Definition:</b> will_options.h:178</div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_a7412354ed5599b9bc267464bbacae972"><div class="ttname"><a href="classmqtt_1_1will__options.html#a7412354ed5599b9bc267464bbacae972">mqtt::will_options::set_payload</a></div><div class="ttdeci">void set_payload(string msg)</div><div class="ttdoc">Sets the LWT message text. </div><div class="ttdef"><b>Definition:</b> will_options.h:210</div></div>
<div class="ttc" id="classmqtt_1_1connect__options_html"><div class="ttname"><a href="classmqtt_1_1connect__options.html">mqtt::connect_options</a></div><div class="ttdoc">Holds the set of options that control how the client connects to a server. </div><div class="ttdef"><b>Definition:</b> connect_options.h:46</div></div>
<div class="ttc" id="classmqtt_1_1topic_html"><div class="ttname"><a href="classmqtt_1_1topic.html">mqtt::topic</a></div><div class="ttdoc">Represents a topic destination, used for publish/subscribe messaging. </div><div class="ttdef"><b>Definition:</b> topic.h:42</div></div>
<div class="ttc" id="message_8h_html"><div class="ttname"><a href="message_8h.html">message.h</a></div><div class="ttdoc">Declaration of MQTT message class. </div></div>
<div class="ttc" id="classmqtt_1_1buffer__ref_html"><div class="ttname"><a href="classmqtt_1_1buffer__ref.html">mqtt::buffer_ref&lt; char &gt;</a></div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_aa9202a426bed90785d641f57cae5925e"><div class="ttname"><a href="classmqtt_1_1will__options.html#aa9202a426bed90785d641f57cae5925e">mqtt::will_options::is_retained</a></div><div class="ttdeci">bool is_retained() const </div><div class="ttdoc">Gets the &#39;retained&#39; flag for the LWT message. </div><div class="ttdef"><b>Definition:</b> will_options.h:188</div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_a6f7d6e083440de05cfd631cc3f063240"><div class="ttname"><a href="classmqtt_1_1will__options.html#a6f7d6e083440de05cfd631cc3f063240">mqtt::will_options::set_topic</a></div><div class="ttdeci">void set_topic(string_ref top)</div><div class="ttdoc">Sets the LWT message topic name. </div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_ab30a4a0063dfb1653ddf80e84c0d4bb9"><div class="ttname"><a href="classmqtt_1_1will__options.html#ab30a4a0063dfb1653ddf80e84c0d4bb9">mqtt::will_options::will_options</a></div><div class="ttdeci">will_options()</div><div class="ttdoc">Constructs a new object using the default values. </div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_a5767dc68cb8bfec285ffcfaf71a5c077"><div class="ttname"><a href="classmqtt_1_1will__options.html#a5767dc68cb8bfec285ffcfaf71a5c077">mqtt::will_options::set_retained</a></div><div class="ttdeci">void set_retained(bool retained)</div><div class="ttdoc">Sets the retained flag. </div><div class="ttdef"><b>Definition:</b> will_options.h:221</div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_ac86ef64ef281a3ecc461a8a869ef756c"><div class="ttname"><a href="classmqtt_1_1will__options.html#ac86ef64ef281a3ecc461a8a869ef756c">mqtt::will_options::const_ptr_t</a></div><div class="ttdeci">std::shared_ptr&lt; const will_options &gt; const_ptr_t</div><div class="ttdoc">Smart/shared pointer to a const object of this class. </div><div class="ttdef"><b>Definition:</b> will_options.h:89</div></div>
<div class="ttc" id="classmqtt_1_1message_html"><div class="ttname"><a href="classmqtt_1_1message.html">mqtt::message</a></div><div class="ttdoc">An MQTT message holds everything required for an MQTT PUBLISH message. </div><div class="ttdef"><b>Definition:</b> message.h:52</div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_ac56a7fbfa543f5c6ce01a2b2fdd1283c"><div class="ttname"><a href="classmqtt_1_1will__options.html#ac56a7fbfa543f5c6ce01a2b2fdd1283c">mqtt::will_options::ptr_t</a></div><div class="ttdeci">std::shared_ptr&lt; will_options &gt; ptr_t</div><div class="ttdoc">Smart/shared pointer to this class. </div><div class="ttdef"><b>Definition:</b> will_options.h:87</div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_acba39c10d33a6e3c0245b25830f1ee0c"><div class="ttname"><a href="classmqtt_1_1will__options.html#acba39c10d33a6e3c0245b25830f1ee0c">mqtt::will_options::get_payload</a></div><div class="ttdeci">const binary_ref &amp; get_payload() const </div><div class="ttdoc">Gets the LWT message payload. </div><div class="ttdef"><b>Definition:</b> will_options.h:173</div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_a38b0ebea7545384f9871920810163834"><div class="ttname"><a href="classmqtt_1_1will__options.html#a38b0ebea7545384f9871920810163834">mqtt::will_options::operator=</a></div><div class="ttdeci">will_options &amp; operator=(const will_options &amp;opt)</div><div class="ttdoc">Copy assignment for the LWT options. </div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_a3ace4c9e5aef81654cdb5795c0926523"><div class="ttname"><a href="classmqtt_1_1will__options.html#a3ace4c9e5aef81654cdb5795c0926523">mqtt::will_options::get_topic</a></div><div class="ttdeci">string get_topic() const </div><div class="ttdoc">Gets the LWT message topic name. </div><div class="ttdef"><b>Definition:</b> will_options.h:168</div></div>
<div class="ttc" id="topic_8h_html"><div class="ttname"><a href="topic_8h.html">topic.h</a></div><div class="ttdoc">Declaration of MQTT topic class. </div></div>
<div class="ttc" id="classmqtt_1_1message_html_a3837ff1e6d7ed1227d57fafe1e3618a0"><div class="ttname"><a href="classmqtt_1_1message.html#a3837ff1e6d7ed1227d57fafe1e3618a0">mqtt::message::create</a></div><div class="ttdeci">static ptr_t create(string_ref topic, const void *payload, size_t len, int qos, bool retained)</div><div class="ttdoc">Constructs a message with the specified array as a payload, and all other values set to defaults...</div><div class="ttdef"><b>Definition:</b> message.h:164</div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_a1876b5c2b1176c2759755f225a91e7c3"><div class="ttname"><a href="classmqtt_1_1will__options.html#a1876b5c2b1176c2759755f225a91e7c3">mqtt::will_options::get_qos</a></div><div class="ttdeci">int get_qos() const </div><div class="ttdoc">Gets the QoS value for the LWT message. </div><div class="ttdef"><b>Definition:</b> will_options.h:183</div></div>
<div class="ttc" id="classmqtt_1_1will__options_html"><div class="ttname"><a href="classmqtt_1_1will__options.html">mqtt::will_options</a></div><div class="ttdoc">Holds the set of options that govern the Last Will and Testament feature. </div><div class="ttdef"><b>Definition:</b> will_options.h:47</div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_a132976bc745ba889a4aae76173f2c569"><div class="ttname"><a href="classmqtt_1_1will__options.html#a132976bc745ba889a4aae76173f2c569">mqtt::will_options::set_payload</a></div><div class="ttdeci">void set_payload(binary_ref msg)</div><div class="ttdoc">Sets the LWT message text. </div></div>
<div class="ttc" id="classmqtt_1_1will__options_html_a37b9e92e0b9d339af19bba3a0b30c2c4"><div class="ttname"><a href="classmqtt_1_1will__options.html#a37b9e92e0b9d339af19bba3a0b30c2c4">mqtt::will_options::set_qos</a></div><div class="ttdeci">void set_qos(const int qos)</div><div class="ttdoc">Sets the QoS value. </div><div class="ttdef"><b>Definition:</b> will_options.h:215</div></div>
<div class="ttc" id="classmqtt_1_1buffer__ref_html_a940a8cf306fd985b2f3c85a79328b423"><div class="ttname"><a href="classmqtt_1_1buffer__ref.html#a940a8cf306fd985b2f3c85a79328b423">mqtt::buffer_ref::to_string</a></div><div class="ttdeci">const blob &amp; to_string() const </div><div class="ttdoc">Gets the data buffer as a string. </div><div class="ttdef"><b>Definition:</b> buffer_ref.h:251</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_503ebd9f384f44c9859dcb1451d026bc.html">mqtt</a></li><li class="navelem"><a class="el" href="will__options_8h.html">will_options.h</a></li>
<li class="footer">Generated on Sun Jul 23 2017 10:24:29 for Paho C++ by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
</ul>
</div>
</body>
</html>