blob: e91c38fe38ca7d4772f07a3f47654151c4874cca [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/ipersistable.h Source File</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><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>mqtt/ipersistable.h</h1><a href="ipersistable_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
<a name="l00002"></a>00002
<a name="l00003"></a>00003
<a name="l00004"></a>00004
<a name="l00005"></a>00005
<a name="l00006"></a>00006
<a name="l00007"></a>00007
<a name="l00008"></a>00008 <span class="comment">/*******************************************************************************</span>
<a name="l00009"></a>00009 <span class="comment"> * Copyright (c) 2013 Frank Pagliughi &lt;fpagliughi@mindspring.com&gt;</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> * All rights reserved. This program and the accompanying materials</span>
<a name="l00012"></a>00012 <span class="comment"> * are made available under the terms of the Eclipse Public License v1.0</span>
<a name="l00013"></a>00013 <span class="comment"> * and Eclipse Distribution License v1.0 which accompany this distribution. </span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * The Eclipse Public License is available at </span>
<a name="l00016"></a>00016 <span class="comment"> * http://www.eclipse.org/legal/epl-v10.html</span>
<a name="l00017"></a>00017 <span class="comment"> * and the Eclipse Distribution License is available at </span>
<a name="l00018"></a>00018 <span class="comment"> * http://www.eclipse.org/org/documents/edl-v10.php.</span>
<a name="l00019"></a>00019 <span class="comment"> *</span>
<a name="l00020"></a>00020 <span class="comment"> * Contributors:</span>
<a name="l00021"></a>00021 <span class="comment"> * Frank Pagliughi - initial implementation and documentation</span>
<a name="l00022"></a>00022 <span class="comment"> *******************************************************************************/</span>
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="preprocessor">#ifndef __mqtt_ipersistable_h</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define __mqtt_ipersistable_h</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00028"></a>00028 <span class="preprocessor"> #include &quot;MQTTAsync.h&quot;</span>
<a name="l00029"></a>00029 }
<a name="l00030"></a>00030
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;memory&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;stdexcept&gt;</span>
<a name="l00035"></a>00035
<a name="l00036"></a>00036 <span class="keyword">namespace </span>mqtt {
<a name="l00037"></a>00037
<a name="l00039"></a>00039
<a name="l00076"></a><a class="code" href="classmqtt_1_1ipersistable.html">00076</a> <span class="keyword">class </span><a class="code" href="classmqtt_1_1ipersistable.html" title="Represents an object used to pass data to be persisted across the MqttClientPersistence...">ipersistable</a>
<a name="l00077"></a>00077 {
<a name="l00078"></a>00078 <span class="keyword">public</span>:
<a name="l00082"></a><a class="code" href="classmqtt_1_1ipersistable.html#ae17a8c2edd1852f427eb5ff520fa45c8">00082</a> <span class="keyword">typedef</span> std::shared_ptr&lt;ipersistable&gt; <a class="code" href="classmqtt_1_1ipersistable.html#ae17a8c2edd1852f427eb5ff520fa45c8" title="Smart/shared pointer to this class.">ptr_t</a>;
<a name="l00086"></a><a class="code" href="classmqtt_1_1ipersistable.html#ac02929cb8906fa53dda75d9cd917fbd3">00086</a> <span class="keyword">virtual</span> <a class="code" href="classmqtt_1_1ipersistable.html#ac02929cb8906fa53dda75d9cd917fbd3" title="Virtual destructor.">~ipersistable</a>() {}
<a name="l00091"></a>00091 <span class="keyword">virtual</span> <span class="keyword">const</span> uint8_t* <a class="code" href="classmqtt_1_1ipersistable.html#a5e744d618be72f5350ef249e2e8e1a9f" title="Returns the header bytes in an array.">get_header_bytes</a>() <span class="keyword">const</span> =0;
<a name="l00096"></a>00096 <span class="keyword">virtual</span> std::vector&lt;uint8_t&gt; <a class="code" href="classmqtt_1_1ipersistable.html#a3907db1d0ffcdfd2cfe3585493f85b7d" title="Returns the header bytes in an array.">get_header_byte_arr</a>() <span class="keyword">const</span> =0;
<a name="l00101"></a>00101 <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="classmqtt_1_1ipersistable.html#afafc9251d83c85b5be9fd8f5c5cb6e96" title="Returns the length of the header.">get_header_length</a>() <span class="keyword">const</span> =0;
<a name="l00107"></a>00107 <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="classmqtt_1_1ipersistable.html#a080a0e8919c54bcfc548e0e02975991a" title="Returns the offset of the header within the byte array returned by get_header_bytes()...">get_header_offset</a>() <span class="keyword">const</span> =0;
<a name="l00112"></a>00112 <span class="keyword">virtual</span> <span class="keyword">const</span> uint8_t* <a class="code" href="classmqtt_1_1ipersistable.html#a0be9dff3255662056a5e853631272d8d" title="Returns the payload bytes in an array.">get_payload_bytes</a>() <span class="keyword">const</span> =0;
<a name="l00117"></a>00117 <span class="keyword">virtual</span> std::vector&lt;uint8_t&gt; <a class="code" href="classmqtt_1_1ipersistable.html#ac21fc97fbf6be4f69b82de29db45fbcc" title="Returns the payload bytes in an array.">get_payload_byte_arr</a>() <span class="keyword">const</span> =0;
<a name="l00122"></a>00122 <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="classmqtt_1_1ipersistable.html#abb701ea822c67608a1057d93fbb1037a" title="Returns the length of the payload.">get_payload_length</a>() <span class="keyword">const</span> =0;
<a name="l00129"></a>00129 <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="classmqtt_1_1ipersistable.html#a2542383f0da366ba76b7b07151fe23b4" title="Returns the offset of the payload within the byte array returned by get_payload_bytes()...">get_payload_offset</a>() <span class="keyword">const</span> =0;
<a name="l00130"></a>00130 };
<a name="l00131"></a>00131
<a name="l00132"></a>00132 <span class="keyword">typedef</span> <a class="code" href="classmqtt_1_1ipersistable.html#ae17a8c2edd1852f427eb5ff520fa45c8" title="Smart/shared pointer to this class.">ipersistable::ptr_t</a> ipersistable_ptr;
<a name="l00133"></a>00133
<a name="l00135"></a>00135 <span class="comment">// end namespace mqtt</span>
<a name="l00136"></a>00136 }
<a name="l00137"></a>00137
<a name="l00138"></a>00138 <span class="preprocessor">#endif // __mqtt_ipersistable_h</span>
<a name="l00139"></a>00139 <span class="preprocessor"></span>
<a name="l00140"></a>00140
</pre></div></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>