blob: 77a143616db6c775e15ab2f6f0d416f91553aa3b [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"/>
<title>mqttpp: mqtt::message Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
<div class="navpath"><b>mqtt</b>::<a class="el" href="classmqtt_1_1message.html">message</a>
</div>
</div>
<div class="contents">
<h1>mqtt::message Class Reference</h1><!-- doxytag: class="mqtt::message" -->
<p>An MQTT <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> holds the application payload and options specifying how the <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> is to be delivered The <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> includes a "payload" (the body of the <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a>) represented as a byte array.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="message_8h_source.html">message.h</a>&gt;</code></p>
<p><a href="classmqtt_1_1message-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab310ab7859aa48dc0a6489fa331f41fc"></a><!-- doxytag: member="mqtt::message::ptr_t" ref="ab310ab7859aa48dc0a6489fa331f41fc" args="" -->
typedef std::shared_ptr&lt; <a class="el" href="classmqtt_1_1message.html">message</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#ab310ab7859aa48dc0a6489fa331f41fc">ptr_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Smart/shared pointer to this class. <br/></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3c82927ad233c393b30f28f376b9d1b0"></a><!-- doxytag: member="mqtt::message::message" ref="a3c82927ad233c393b30f28f376b9d1b0" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#a3c82927ad233c393b30f28f376b9d1b0">message</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> with an empty payload, and all other values set to defaults. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a75aea52d5daea27e7f4ad1f9db34b35c"></a><!-- doxytag: member="mqtt::message::message" ref="a75aea52d5daea27e7f4ad1f9db34b35c" args="(const void *payload, size_t len)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#a75aea52d5daea27e7f4ad1f9db34b35c">message</a> (const void *payload, size_t len)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> with the specified array as a payload, and all other values set to defaults. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a66a3ee997e3a18e882b14b2d61a88979"></a><!-- doxytag: member="mqtt::message::message" ref="a66a3ee997e3a18e882b14b2d61a88979" args="(const std::string &amp;payload)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#a66a3ee997e3a18e882b14b2d61a88979">message</a> (const std::string &amp;payload)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> with the specified string as a payload, and all other values set to defaults. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a367cb103dc8aedfec183bf423640c7a3"></a><!-- doxytag: member="mqtt::message::message" ref="a367cb103dc8aedfec183bf423640c7a3" args="(const MQTTAsync_message &amp;msg)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#a367cb103dc8aedfec183bf423640c7a3">message</a> (const MQTTAsync_message &amp;msg)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> as a copy of the <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> structure. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a36ffb41a2e76db2525654fb1e8b3c40a"></a><!-- doxytag: member="mqtt::message::message" ref="a36ffb41a2e76db2525654fb1e8b3c40a" args="(const message &amp;other)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#a36ffb41a2e76db2525654fb1e8b3c40a">message</a> (const <a class="el" href="classmqtt_1_1message.html">message</a> &amp;other)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> as a copy of the other <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a97eb09482d0d6432fe996c80ac84a1e0"></a><!-- doxytag: member="mqtt::message::message" ref="a97eb09482d0d6432fe996c80ac84a1e0" args="(message &amp;&amp;other)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#a97eb09482d0d6432fe996c80ac84a1e0">message</a> (<a class="el" href="classmqtt_1_1message.html">message</a> &amp;&amp;other)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Moves the other <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> to this one. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad66d97679cdd8c1f7b22446801295f51"></a><!-- doxytag: member="mqtt::message::~message" ref="ad66d97679cdd8c1f7b22446801295f51" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#ad66d97679cdd8c1f7b22446801295f51">~message</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroys a <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> and frees all associated resources. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmqtt_1_1message.html">message</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#ae40dd6ffa3596bcef33b81f8a3995f3f">operator=</a> (const <a class="el" href="classmqtt_1_1message.html">message</a> &amp;rhs)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copies another <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> to this one. <a href="#ae40dd6ffa3596bcef33b81f8a3995f3f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmqtt_1_1message.html">message</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#ab518f92d809b7ee0d74e27b78a8d36fd">operator=</a> (<a class="el" href="classmqtt_1_1message.html">message</a> &amp;&amp;rhs)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Moves another <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> to this one. <a href="#ab518f92d809b7ee0d74e27b78a8d36fd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a74ab9515b7f84a9023c61a942a2b2459"></a><!-- doxytag: member="mqtt::message::clear_payload" ref="a74ab9515b7f84a9023c61a942a2b2459" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#a74ab9515b7f84a9023c61a942a2b2459">clear_payload</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clears the payload, resetting it to be empty. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aba72487cdf0852e11eb94895cddbeb51"></a><!-- doxytag: member="mqtt::message::get_payload" ref="aba72487cdf0852e11eb94895cddbeb51" args="() const " -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#aba72487cdf0852e11eb94895cddbeb51">get_payload</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the payload. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#aacab31d78f9ac17f962d89f9405c0c38">get_qos</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the quality of service for this <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a>. <a href="#aacab31d78f9ac17f962d89f9405c0c38"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#ad05a411b58f9b7aad271c2dee0c937f8">is_duplicate</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns whether or not this <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> might be a duplicate of one which has already been received. <a href="#ad05a411b58f9b7aad271c2dee0c937f8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#aa845a148b73a9be79c4e5d09910d36b7">is_retained</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns whether or not this <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> should be/was retained by the server. <a href="#aa845a148b73a9be79c4e5d09910d36b7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae784b5150baacfaaca319c0ce84ddcb2"></a><!-- doxytag: member="mqtt::message::set_payload" ref="ae784b5150baacfaaca319c0ce84ddcb2" args="(const void *payload, size_t n)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#ae784b5150baacfaaca319c0ce84ddcb2">set_payload</a> (const void *payload, size_t n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the payload of this <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> to be the specified byte array. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e6099a696d297b5342ce509107459b0"></a><!-- doxytag: member="mqtt::message::set_payload" ref="a7e6099a696d297b5342ce509107459b0" args="(const std::string &amp;payload)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#a7e6099a696d297b5342ce509107459b0">set_payload</a> (const std::string &amp;payload)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the payload of this <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> to be the specified string. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#af666e57c7e68f43e5331f09a843b4262">set_qos</a> (int qos) throw (std::invalid_argument)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the quality of service for this <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a>. <a href="#af666e57c7e68f43e5331f09a843b4262"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#a51c7f7cfe89ebcc17d1686ec025193d2">set_retained</a> (bool retained)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Whether or not the publish <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> should be retained by the messaging engine. <a href="#a51c7f7cfe89ebcc17d1686ec025193d2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#a0f89f7c1ae58dc8b3ceaae6c86781e22">to_str</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a string representation of this messages payload. <a href="#a0f89f7c1ae58dc8b3ceaae6c86781e22"></a><br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#a5da9f7a3c9c437069e32f05a933a62aa">validate_qos</a> (int qos) throw (std::invalid_argument)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines if the QOS value is a valid one. <a href="#a5da9f7a3c9c437069e32f05a933a62aa"></a><br/></td></tr>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1message.html#ac39954340d8b15edaa883af1bcfcf7ae">async_client</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The <a class="el" href="classmqtt_1_1client.html" title="Lightweight client for talking to an MQTT server using methods that block until an...">client</a> has special access. <a href="#ac39954340d8b15edaa883af1bcfcf7ae"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>An MQTT <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> holds the application payload and options specifying how the <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> is to be delivered The <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> includes a "payload" (the body of the <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a>) represented as a byte array. </p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aacab31d78f9ac17f962d89f9405c0c38"></a><!-- doxytag: member="mqtt::message::get_qos" ref="aacab31d78f9ac17f962d89f9405c0c38" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int mqtt::message::get_qos </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the quality of service for this <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The quality of service for this <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a>. </dd></dl>
</div>
</div>
<a class="anchor" id="ad05a411b58f9b7aad271c2dee0c937f8"></a><!-- doxytag: member="mqtt::message::is_duplicate" ref="ad05a411b58f9b7aad271c2dee0c937f8" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool mqtt::message::is_duplicate </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns whether or not this <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> might be a duplicate of one which has already been received. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>bool </dd></dl>
</div>
</div>
<a class="anchor" id="aa845a148b73a9be79c4e5d09910d36b7"></a><!-- doxytag: member="mqtt::message::is_retained" ref="aa845a148b73a9be79c4e5d09910d36b7" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool mqtt::message::is_retained </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns whether or not this <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> should be/was retained by the server. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>bool </dd></dl>
</div>
</div>
<a class="anchor" id="ab518f92d809b7ee0d74e27b78a8d36fd"></a><!-- doxytag: member="mqtt::message::operator=" ref="ab518f92d809b7ee0d74e27b78a8d36fd" args="(message &amp;&amp;rhs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classmqtt_1_1message.html">message</a>&amp; mqtt::message::operator= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classmqtt_1_1message.html">message</a> &amp;&amp;&nbsp;</td>
<td class="paramname"> <em>rhs</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Moves another <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> to this one. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>rhs</em>&nbsp;</td><td>The other <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A reference to this <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a>. </dd></dl>
</div>
</div>
<a class="anchor" id="ae40dd6ffa3596bcef33b81f8a3995f3f"></a><!-- doxytag: member="mqtt::message::operator=" ref="ae40dd6ffa3596bcef33b81f8a3995f3f" args="(const message &amp;rhs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classmqtt_1_1message.html">message</a>&amp; mqtt::message::operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classmqtt_1_1message.html">message</a> &amp;&nbsp;</td>
<td class="paramname"> <em>rhs</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Copies another <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> to this one. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>rhs</em>&nbsp;</td><td>The other <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A reference to this <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a>. </dd></dl>
</div>
</div>
<a class="anchor" id="af666e57c7e68f43e5331f09a843b4262"></a><!-- doxytag: member="mqtt::message::set_qos" ref="af666e57c7e68f43e5331f09a843b4262" args="(int qos)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mqtt::message::set_qos </td>
<td>(</td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>qos</em></td>
<td>&nbsp;)&nbsp;</td>
<td> throw (std::invalid_argument)<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the quality of service for this <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>qos</em>&nbsp;</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a51c7f7cfe89ebcc17d1686ec025193d2"></a><!-- doxytag: member="mqtt::message::set_retained" ref="a51c7f7cfe89ebcc17d1686ec025193d2" args="(bool retained)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mqtt::message::set_retained </td>
<td>(</td>
<td class="paramtype">bool&nbsp;</td>
<td class="paramname"> <em>retained</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Whether or not the publish <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> should be retained by the messaging engine. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>retained</em>&nbsp;</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a0f89f7c1ae58dc8b3ceaae6c86781e22"></a><!-- doxytag: member="mqtt::message::to_str" ref="a0f89f7c1ae58dc8b3ceaae6c86781e22" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string mqtt::message::to_str </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a string representation of this messages payload. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>std::string </dd></dl>
</div>
</div>
<a class="anchor" id="a5da9f7a3c9c437069e32f05a933a62aa"></a><!-- doxytag: member="mqtt::message::validate_qos" ref="a5da9f7a3c9c437069e32f05a933a62aa" args="(int qos)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void mqtt::message::validate_qos </td>
<td>(</td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>qos</em></td>
<td>&nbsp;)&nbsp;</td>
<td> throw (std::invalid_argument)<code> [inline, static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Determines if the QOS value is a valid one. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>qos</em>&nbsp;</td><td>The QOS value. </td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>std::invalid_argument</em>&nbsp;</td><td>If the qos value is invalid. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="ac39954340d8b15edaa883af1bcfcf7ae"></a><!-- doxytag: member="mqtt::message::async_client" ref="ac39954340d8b15edaa883af1bcfcf7ae" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">friend class <a class="el" href="classmqtt_1_1async__client.html">async_client</a><code> [friend]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The <a class="el" href="classmqtt_1_1client.html" title="Lightweight client for talking to an MQTT server using methods that block until an...">client</a> has special access. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>mqtt/<a class="el" href="message_8h_source.html">message.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on 30 Apr 2014 for mqttpp by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>