Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

version change and add html doc

  • Loading branch information...
commit 7f32b0c4ad3ed0cf788d5459ab43f71eac36f43b 1 parent b324196
Ian Craggs authored
Showing with 4,457 additions and 2 deletions.
  1. +1,077 −0 doc/API/_m_q_t_t_client_8h.html
  2. +179 −0 doc/API/_m_q_t_t_client_8h_source.html
  3. +322 −0 doc/API/_m_q_t_t_client_persistence_8h.html
  4. +85 −0 doc/API/_m_q_t_t_client_persistence_8h_source.html
  5. +39 −0 doc/API/annotated.html
  6. +32 −0 doc/API/async.html
  7. +37 −0 doc/API/classes.html
  8. +545 −0 doc/API/doxygen.css
  9. BIN  doc/API/doxygen.png
  10. +37 −0 doc/API/files.html
  11. +185 −0 doc/API/functions.html
  12. +185 −0 doc/API/functions_vars.html
  13. +193 −0 doc/API/globals.html
  14. +88 −0 doc/API/globals_defs.html
  15. +97 −0 doc/API/globals_func.html
  16. +82 −0 doc/API/globals_type.html
  17. +71 −0 doc/API/index.html
  18. +41 −0 doc/API/pages.html
  19. +109 −0 doc/API/pubasync.html
  20. +73 −0 doc/API/pubsync.html
  21. +37 −0 doc/API/qos.html
  22. +196 −0 doc/API/struct_m_q_t_t_client__connect_options.html
  23. +176 −0 doc/API/struct_m_q_t_t_client__message.html
  24. +182 −0 doc/API/struct_m_q_t_t_client__persistence.html
  25. +134 −0 doc/API/struct_m_q_t_t_client__will_options.html
  26. +107 −0 doc/API/subasync.html
  27. BIN  doc/API/tab_b.gif
  28. BIN  doc/API/tab_l.gif
  29. BIN  doc/API/tab_r.gif
  30. +105 −0 doc/API/tabs.css
  31. +41 −0 doc/API/wildcard.html
  32. +2 −2 src/MQTTClient.c
View
1,077 doc/API/_m_q_t_t_client_8h.html
@@ -0,0 +1,1077 @@
+<!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>MQTT Client: MQTTClient.h File 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.3 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+ <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+ <li><a href="annotated.html"><span>Data&nbsp;Structures</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>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>MQTTClient.h File Reference</h1><code>#include &lt;stdio.h&gt;</code><br/>
+<code>#include &quot;<a class="el" href="_m_q_t_t_client_8h_source.html">MQTTClientPersistence.h</a>&quot;</code><br/>
+
+<p><a href="_m_q_t_t_client_8h_source.html">Go to the source code of this file.</a></p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_m_q_t_t_client__will_options.html">MQTTClient_willOptions</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_m_q_t_t_client__connect_options.html">MQTTClient_connectOptions</a></td></tr>
+<tr><td colspan="2"><h2>Defines</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a>&nbsp;&nbsp;&nbsp;0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#af33a6d6c0e8a6a747bf39638e0bba36b">MQTTCLIENT_FAILURE</a>&nbsp;&nbsp;&nbsp;-1</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a561d053311cb492cf7226f419ee0d516">MQTTCLIENT_DISCONNECTED</a>&nbsp;&nbsp;&nbsp;-3</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a8fc442fc2e9dfb422a163ab1fa02e0cb">MQTTCLIENT_MAX_MESSAGES_INFLIGHT</a>&nbsp;&nbsp;&nbsp;-4</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a678a4744192de9c8dca220d9965809dd">MQTTCLIENT_BAD_UTF8_STRING</a>&nbsp;&nbsp;&nbsp;-5</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#ac3232abd7f86bbba26faea0e2b132c3c">MQTTCLIENT_NULL_PARAMETER</a>&nbsp;&nbsp;&nbsp;-6</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a29afebfce0bdf6cda1e37abc0c4b6690">MQTTCLIENT_TOPICNAME_TRUNCATED</a>&nbsp;&nbsp;&nbsp;-7</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a747615d8064e3fe024ae5565ec63e1ce">MQTTCLIENT_BAD_STRUCTURE</a>&nbsp;&nbsp;&nbsp;-8</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#aa1fd995924d3df75959fcf57e87aefac">MQTTClient_message_initializer</a>&nbsp;&nbsp;&nbsp;{ &quot;MQTM&quot;, 0, 0, NULL, 0, 0, 0, 0 }</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#aae0811659c59f5dad0467544f91645eb">MQTTClient_willOptions_initializer</a>&nbsp;&nbsp;&nbsp;{ &quot;MQTW&quot;, 0, NULL, NULL, 0, 0 }</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#aefd7c865f2641c8155b763fdf3061c25">MQTTClient_connectOptions_initializer</a>&nbsp;&nbsp;&nbsp;{ &quot;MQTC&quot;, 0, 60, 1, 1, NULL, NULL, NULL, 30, 20 }</td></tr>
+<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#aa42130dd069e7e949bcab37b6dce64a5">MQTTClient_messageArrived</a> (void *context, char *topicName, int topicLen, <a class="el" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a> *message)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#abef83794d8252551ed248cde6eb845a6">MQTTClient_deliveryComplete</a> (void *context, <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> dt)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a6bb253f16754e7cc81798c9fda0e36cf">MQTTClient_connectionLost</a> (void *context, char *cause)</td></tr>
+<tr><td colspan="2"><h2>Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, void *context, <a class="el" href="_m_q_t_t_client_8h.html#a6bb253f16754e7cc81798c9fda0e36cf">MQTTClient_connectionLost</a> *cl, <a class="el" href="_m_q_t_t_client_8h.html#aa42130dd069e7e949bcab37b6dce64a5">MQTTClient_messageArrived</a> *ma, <a class="el" href="_m_q_t_t_client_8h.html#abef83794d8252551ed248cde6eb845a6">MQTTClient_deliveryComplete</a> *dc)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> *handle, char *serverURI, char *clientId, int persistence_type, void *persistence_context)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#aaa8ae61cd65c9dc0846df10122d7bd4e">MQTTClient_connect</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <a class="el" href="struct_m_q_t_t_client__connect_options.html">MQTTClient_connectOptions</a> *options)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a1e4d90c13a3c0705bc4a13bfe64e6525">MQTTClient_disconnect</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, int timeout)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a6e8231e8c47f6f67f7ebbb5dcb4c69c0">MQTTClient_isConnected</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a326fb0ba7a16613ab7fc861f78232ccf">MQTTClient_subscribe</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, char *topic, int qos)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#ad125c07aad06ca085b5fff40c333b533">MQTTClient_subscribeMany</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, int count, char **topic, int *qos)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#adc79908187e9dd8d96ddc9536aa9d0c7">MQTTClient_unsubscribe</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, char *topic)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a4966145fdc008afc6aa90d7030f73b51">MQTTClient_unsubscribeMany</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, int count, char **topic)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#aa061f83fbed3a23177cca8714780ffbd">MQTTClient_publish</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, char *topicName, int payloadlen, void *payload, int qos, int retained, <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> *dt)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a288d6c8d4919f06e991be2435f649676">MQTTClient_publishMessage</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, char *topicName, <a class="el" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a> *msg, <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> *dt)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a83807ec81fe8c3941e368ab329d43067">MQTTClient_waitForCompletion</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> dt, unsigned long timeout)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a2a617c6b0492c04a4ddea592f5e53604">MQTTClient_getPendingDeliveryTokens</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> **tokens)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a8ad3d29864a9ca08202b0832e0f6678e">MQTTClient_yield</a> (void)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a4c2df88d00a3dadd510a8cb774739366">MQTTClient_receive</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, char **topicName, int *topicLen, <a class="el" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a> **message, unsigned long timeout)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#abd8abde4f39d3e689029de27f7a98a65">MQTTClient_freeMessage</a> (<a class="el" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a> **msg)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#a203b545c999beb6b825ec99b6aea79ab">MQTTClient_free</a> (void *ptr)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_8h.html#ae700c3f5cfea3813264ce95e7c8cf498">MQTTClient_destroy</a> (<a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> *handle)</td></tr>
+</table>
+<hr/><h2>Define Documentation</h2>
+<a class="anchor" id="acba095704d79e5a1996389fa26203f73"></a><!-- doxytag: member="MQTTClient.h::MQTTCLIENT_SUCCESS" ref="acba095704d79e5a1996389fa26203f73" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTCLIENT_SUCCESS&nbsp;&nbsp;&nbsp;0</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Return code: No error. Indicates successful completion of an MQTT client operation. </p>
+
+</div>
+</div>
+<a class="anchor" id="af33a6d6c0e8a6a747bf39638e0bba36b"></a><!-- doxytag: member="MQTTClient.h::MQTTCLIENT_FAILURE" ref="af33a6d6c0e8a6a747bf39638e0bba36b" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTCLIENT_FAILURE&nbsp;&nbsp;&nbsp;-1</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Return code: A generic error code indicating the failure of an MQTT client operation. </p>
+
+</div>
+</div>
+<a class="anchor" id="a561d053311cb492cf7226f419ee0d516"></a><!-- doxytag: member="MQTTClient.h::MQTTCLIENT_DISCONNECTED" ref="a561d053311cb492cf7226f419ee0d516" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTCLIENT_DISCONNECTED&nbsp;&nbsp;&nbsp;-3</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Return code: The client is disconnected. </p>
+
+</div>
+</div>
+<a class="anchor" id="a8fc442fc2e9dfb422a163ab1fa02e0cb"></a><!-- doxytag: member="MQTTClient.h::MQTTCLIENT_MAX_MESSAGES_INFLIGHT" ref="a8fc442fc2e9dfb422a163ab1fa02e0cb" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTCLIENT_MAX_MESSAGES_INFLIGHT&nbsp;&nbsp;&nbsp;-4</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Return code: The maximum number of messages allowed to be simultaneously in-flight has been reached. </p>
+
+</div>
+</div>
+<a class="anchor" id="a678a4744192de9c8dca220d9965809dd"></a><!-- doxytag: member="MQTTClient.h::MQTTCLIENT_BAD_UTF8_STRING" ref="a678a4744192de9c8dca220d9965809dd" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTCLIENT_BAD_UTF8_STRING&nbsp;&nbsp;&nbsp;-5</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Return code: An invalid UTF-8 string has been detected. </p>
+
+</div>
+</div>
+<a class="anchor" id="ac3232abd7f86bbba26faea0e2b132c3c"></a><!-- doxytag: member="MQTTClient.h::MQTTCLIENT_NULL_PARAMETER" ref="ac3232abd7f86bbba26faea0e2b132c3c" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTCLIENT_NULL_PARAMETER&nbsp;&nbsp;&nbsp;-6</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Return code: A NULL parameter has been supplied when this is invalid. </p>
+
+</div>
+</div>
+<a class="anchor" id="a29afebfce0bdf6cda1e37abc0c4b6690"></a><!-- doxytag: member="MQTTClient.h::MQTTCLIENT_TOPICNAME_TRUNCATED" ref="a29afebfce0bdf6cda1e37abc0c4b6690" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTCLIENT_TOPICNAME_TRUNCATED&nbsp;&nbsp;&nbsp;-7</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Return code: The topic has been truncated (the topic string includes embedded NULL characters). String functions will not access the full topic. Use the topic length value to access the full topic. </p>
+
+</div>
+</div>
+<a class="anchor" id="a747615d8064e3fe024ae5565ec63e1ce"></a><!-- doxytag: member="MQTTClient.h::MQTTCLIENT_BAD_STRUCTURE" ref="a747615d8064e3fe024ae5565ec63e1ce" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTCLIENT_BAD_STRUCTURE&nbsp;&nbsp;&nbsp;-8</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Return code: A structure parameter does not have the correct eyecatcher and version number. </p>
+
+</div>
+</div>
+<a class="anchor" id="aa1fd995924d3df75959fcf57e87aefac"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_message_initializer" ref="aa1fd995924d3df75959fcf57e87aefac" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTClient_message_initializer&nbsp;&nbsp;&nbsp;{ &quot;MQTM&quot;, 0, 0, NULL, 0, 0, 0, 0 }</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="aae0811659c59f5dad0467544f91645eb"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_willOptions_initializer" ref="aae0811659c59f5dad0467544f91645eb" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTClient_willOptions_initializer&nbsp;&nbsp;&nbsp;{ &quot;MQTW&quot;, 0, NULL, NULL, 0, 0 }</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="aefd7c865f2641c8155b763fdf3061c25"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_connectOptions_initializer" ref="aefd7c865f2641c8155b763fdf3061c25" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTClient_connectOptions_initializer&nbsp;&nbsp;&nbsp;{ &quot;MQTC&quot;, 0, 60, 1, 1, NULL, NULL, NULL, 30, 20 }</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+</div>
+</div>
+<hr/><h2>Typedef Documentation</h2>
+<a class="anchor" id="a7649e3913f9a216424d296f88a969c59"></a><!-- doxytag: member="MQTTClient.h::MQTTClient" ref="a7649e3913f9a216424d296f88a969c59" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef void* <a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>A handle representing an MQTT client. A valid client handle is available following a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </p>
+
+</div>
+</div>
+<a class="anchor" id="a73e49030fd8b7074aa1aa45669b7fe8d"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_deliveryToken" ref="a73e49030fd8b7074aa1aa45669b7fe8d" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef int <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>A value representing an MQTT message. A delivery token is returned to the client application when a message is published. The token can then be used to check that the message was successfully delivered to its destination (see <a class="el" href="_m_q_t_t_client_8h.html#aa061f83fbed3a23177cca8714780ffbd">MQTTClient_publish()</a>, <a class="el" href="_m_q_t_t_client_8h.html#a288d6c8d4919f06e991be2435f649676">MQTTClient_publishMessage()</a>, <a class="el" href="_m_q_t_t_client_8h.html#abef83794d8252551ed248cde6eb845a6">MQTTClient_deliveryComplete()</a>, <a class="el" href="_m_q_t_t_client_8h.html#a83807ec81fe8c3941e368ab329d43067">MQTTClient_waitForCompletion()</a> and <a class="el" href="_m_q_t_t_client_8h.html#a2a617c6b0492c04a4ddea592f5e53604">MQTTClient_getPendingDeliveryTokens()</a>). </p>
+
+</div>
+</div>
+<a class="anchor" id="aa42130dd069e7e949bcab37b6dce64a5"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_messageArrived" ref="aa42130dd069e7e949bcab37b6dce64a5" args="(void *context, char *topicName, int topicLen, MQTTClient_message *message)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef int <a class="el" href="_m_q_t_t_client_8h.html#aa42130dd069e7e949bcab37b6dce64a5">MQTTClient_messageArrived</a>(void *context, char *topicName, int topicLen, <a class="el" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a> *message)</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This is a callback function. The client application must provide an implementation of this function to enable asynchronous receipt of messages. The function is registered with the client library by passing it as an argument to <a class="el" href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks()</a>. It is called by the client library when a new message that matches a client subscription has been received from the server. This function is executed on a separate thread to the one on which the client application is running. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A pointer to the <em>context</em> value originally passed to <a class="el" href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks()</a>, which contains any application-specific context. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>topicName</em>&nbsp;</td><td>The topic associated with the received message. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>topicLen</em>&nbsp;</td><td>The length of the topic if there are one more NULL characters embedded in <em>topicName</em>, otherwise <em>topicLen</em> is 0. If <em>topicLen</em> is 0, the value returned by <em>strlen(topicName)</em> can be trusted. If <em>topicLen</em> is greater than 0, the full topic name can be retrieved by accessing <em>topicName</em> as a byte array of length <em>topicLen</em>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>message</em>&nbsp;</td><td>The <a class="el" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a> structure for the received message. This structure contains the message payload and attributes. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>This function must return a boolean value indicating whether or not the message has been safely received by the client application. Returning true indicates that the message has been successfully handled. Returning false indicates that there was a problem. In this case, the client library will reinvoke <a class="el" href="_m_q_t_t_client_8h.html#aa42130dd069e7e949bcab37b6dce64a5">MQTTClient_messageArrived()</a> to attempt to deliver the message to the application again. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="abef83794d8252551ed248cde6eb845a6"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_deliveryComplete" ref="abef83794d8252551ed248cde6eb845a6" args="(void *context, MQTTClient_deliveryToken dt)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef void <a class="el" href="_m_q_t_t_client_8h.html#abef83794d8252551ed248cde6eb845a6">MQTTClient_deliveryComplete</a>(void *context, <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> dt)</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This is a callback function. The client application must provide an implementation of this function to enable asynchronous notification of delivery of messages. The function is registered with the client library by passing it as an argument to <a class="el" href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks()</a>. It is called by the client library after the client application has published a message to the server. It indicates that the necessary handshaking and acknowledgements for the requested quality of service (see <a class="el" href="struct_m_q_t_t_client__message.html#a35738099155a0e4f54050da474bab2e7">MQTTClient_message.qos</a>) have been completed. This function is executed on a separate thread to the one on which the client application is running. <b>Note:</b><a class="el" href="_m_q_t_t_client_8h.html#abef83794d8252551ed248cde6eb845a6">MQTTClient_deliveryComplete()</a> is not called when messages are published at QoS0. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A pointer to the <em>context</em> value originally passed to <a class="el" href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks()</a>, which contains any application-specific context. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>dt</em>&nbsp;</td><td>The <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> associated with the published message. Applications can check that all messages have been correctly published by matching the delivery tokens returned from calls to <a class="el" href="_m_q_t_t_client_8h.html#aa061f83fbed3a23177cca8714780ffbd">MQTTClient_publish()</a> and <a class="el" href="_m_q_t_t_client_8h.html#a288d6c8d4919f06e991be2435f649676">MQTTClient_publishMessage()</a> with the tokens passed to this callback. </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a6bb253f16754e7cc81798c9fda0e36cf"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_connectionLost" ref="a6bb253f16754e7cc81798c9fda0e36cf" args="(void *context, char *cause)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef void <a class="el" href="_m_q_t_t_client_8h.html#a6bb253f16754e7cc81798c9fda0e36cf">MQTTClient_connectionLost</a>(void *context, char *cause)</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This is a callback function. The client application must provide an implementation of this function to enable asynchronous notification of the loss of connection to the server. The function is registered with the client library by passing it as an argument to <a class="el" href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks()</a>. It is called by the client library if the client loses its connection to the server. The client application must take appropriate action, such as trying to reconnect or reporting the problem. This function is executed on a separate thread to the one on which the client application is running. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A pointer to the <em>context</em> value originally passed to <a class="el" href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks()</a>, which contains any application-specific context. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>cause</em>&nbsp;</td><td>The reason for the disconnection. Currently, <em>cause</em> is always set to NULL. </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<hr/><h2>Function Documentation</h2>
+<a class="anchor" id="aad27d07782991a4937ebf2f39a021f83"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_setCallbacks" ref="aad27d07782991a4937ebf2f39a021f83" args="(MQTTClient handle, void *context, MQTTClient_connectionLost *cl, MQTTClient_messageArrived *ma, MQTTClient_deliveryComplete *dc)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_setCallbacks </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>&nbsp;</td>
+ <td class="paramname"> <em>handle</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">void *&nbsp;</td>
+ <td class="paramname"> <em>context</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a6bb253f16754e7cc81798c9fda0e36cf">MQTTClient_connectionLost</a> *&nbsp;</td>
+ <td class="paramname"> <em>cl</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#aa42130dd069e7e949bcab37b6dce64a5">MQTTClient_messageArrived</a> *&nbsp;</td>
+ <td class="paramname"> <em>ma</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#abef83794d8252551ed248cde6eb845a6">MQTTClient_deliveryComplete</a> *&nbsp;</td>
+ <td class="paramname"> <em>dc</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function sets the callback functions for a specific client. If your client application doesn't use a particular callback, set the relevant parameter to NULL. Calling <a class="el" href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks()</a> puts the client into multi-threaded mode. Any necessary message acknowledgements and status communications are handled in the background without any intervention from the client application. See <a class="el" href="async.html">Asynchronous vs synchronous client applications</a> for more information.</p>
+<p><b>Note:</b> The MQTT client must be disconnected when this function is called. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>A valid client handle from a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A pointer to any application-specific context. The the <em>context</em> pointer is passed to each of the callback functions to provide access to the context information in the callback. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>cl</em>&nbsp;</td><td>A pointer to an <a class="el" href="_m_q_t_t_client_8h.html#a6bb253f16754e7cc81798c9fda0e36cf">MQTTClient_connectionLost()</a> callback function. You can set this to NULL if your application doesn't handle disconnections. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>ma</em>&nbsp;</td><td>A pointer to an <a class="el" href="_m_q_t_t_client_8h.html#aa42130dd069e7e949bcab37b6dce64a5">MQTTClient_messageArrived()</a> callback function. This callback function must be specified when you call <a class="el" href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>dc</em>&nbsp;</td><td>A pointer to an <a class="el" href="_m_q_t_t_client_8h.html#abef83794d8252551ed248cde6eb845a6">MQTTClient_deliveryComplete()</a> callback function. You can set this to NULL if your application publishes synchronously or if you do not want to check for successful delivery. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> if the callbacks were correctly set, <a class="el" href="_m_q_t_t_client_8h.html#af33a6d6c0e8a6a747bf39638e0bba36b">MQTTCLIENT_FAILURE</a> if an error occurred. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a5cb44bc0e06bcc95a314d51320a0cd1b"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_create" ref="a5cb44bc0e06bcc95a314d51320a0cd1b" args="(MQTTClient *handle, char *serverURI, char *clientId, int persistence_type, void *persistence_context)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_create </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> *&nbsp;</td>
+ <td class="paramname"> <em>handle</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char *&nbsp;</td>
+ <td class="paramname"> <em>serverURI</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char *&nbsp;</td>
+ <td class="paramname"> <em>clientId</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&nbsp;</td>
+ <td class="paramname"> <em>persistence_type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">void *&nbsp;</td>
+ <td class="paramname"> <em>persistence_context</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function creates an MQTT client ready for connection to the specified server and using the specified persistent storage (see <a class="el" href="struct_m_q_t_t_client__persistence.html" title="A structure containing the function pointers to a persistence implementation and...">MQTTClient_persistence</a>). See also <a class="el" href="_m_q_t_t_client_8h.html#ae700c3f5cfea3813264ce95e7c8cf498">MQTTClient_destroy()</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>handle</em>&nbsp;</td><td>A pointer to an <a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle. The handle is populated with a valid client reference following a successful return from this function. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>serverURI</em>&nbsp;</td><td>A null-terminated string specifying the server to which the client will connect. It takes the form <em>protocol://host:port</em>. Currently, <em>protocol</em> must be <em>tcp</em>. For <em>host</em>, you can specify either an IP address or a domain name. For instance, to connect to a server running on the local machines with the default MQTT port, specify <em>tcp://localhost:1883</em>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>clientId</em>&nbsp;</td><td>The client identifier passed to the server when the client connects to it. It is a null-terminated UTF-8 encoded string. ClientIDs must be no longer than 23 characters according to the MQTT specification. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>persistence_type</em>&nbsp;</td><td>The type of persistence to be used by the client: <br/>
+ <a class="el" href="_m_q_t_t_client_persistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa">MQTTCLIENT_PERSISTENCE_NONE</a>: Use in-memory persistence. If the device or system on which the client is running fails or is switched off, the current state of any in-flight messages is lost and some messages may not be delivered even at QoS1 and QoS2. <br/>
+ <a class="el" href="_m_q_t_t_client_persistence_8h.html#aaa948291718a9c06369b854b0f64bc32">MQTTCLIENT_PERSISTENCE_DEFAULT</a>: Use the default (file system-based) persistence mechanism. Status about in-flight messages is held in persistent storage and provides some protection against message loss in the case of unexpected failure. <br/>
+ <a class="el" href="_m_q_t_t_client_persistence_8h.html#a5dc68b8616e4041e037bad94ce07681b">MQTTCLIENT_PERSISTENCE_USER</a>: Use an application-specific persistence implementation. Using this type of persistence gives control of the persistence mechanism to the application. The application has to implement the <a class="el" href="struct_m_q_t_t_client__persistence.html" title="A structure containing the function pointers to a persistence implementation and...">MQTTClient_persistence</a> interface. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>persistence_context</em>&nbsp;</td><td>If the application uses <a class="el" href="_m_q_t_t_client_persistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa">MQTTCLIENT_PERSISTENCE_NONE</a> persistence, this argument is unused and should be set to NULL. For <a class="el" href="_m_q_t_t_client_persistence_8h.html#aaa948291718a9c06369b854b0f64bc32">MQTTCLIENT_PERSISTENCE_DEFAULT</a> persistence, it should be set to the location of the persistence directory (if set to NULL, the persistence directory used is the working directory). Applications that use <a class="el" href="_m_q_t_t_client_persistence_8h.html#a5dc68b8616e4041e037bad94ce07681b">MQTTCLIENT_PERSISTENCE_USER</a> persistence set this argument to point to a valid <a class="el" href="struct_m_q_t_t_client__persistence.html" title="A structure containing the function pointers to a persistence implementation and...">MQTTClient_persistence</a> structure. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> if the client is successfully created, otherwise an error code is returned. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="aaa8ae61cd65c9dc0846df10122d7bd4e"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_connect" ref="aaa8ae61cd65c9dc0846df10122d7bd4e" args="(MQTTClient handle, MQTTClient_connectOptions *options)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_connect </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>&nbsp;</td>
+ <td class="paramname"> <em>handle</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="struct_m_q_t_t_client__connect_options.html">MQTTClient_connectOptions</a> *&nbsp;</td>
+ <td class="paramname"> <em>options</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function attempts to connect a previously-created client (see <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>) to an MQTT server using the specified options. If you want to enable asynchronous message and status notifications, you must call <a class="el" href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks()</a> prior to <a class="el" href="_m_q_t_t_client_8h.html#aaa8ae61cd65c9dc0846df10122d7bd4e">MQTTClient_connect()</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>handle</em>&nbsp;</td><td>A valid client handle from a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>options</em>&nbsp;</td><td>A pointer to a valid <a class="el" href="struct_m_q_t_t_client__connect_options.html">MQTTClient_connectOptions</a> structure. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> if the client successfully connects to the server. An error code is returned if the client was unable to connect to the server. Error codes greater than 0 are returned by the MQTT protocol:<br/>
+<br/>
+ <b>1</b>: Connection refused: Unacceptable protocol version<br/>
+ <b>2</b>: Connection refused: Identifier rejected<br/>
+ <b>3</b>: Connection refused: Server unavailable<br/>
+ <b>4</b>: Connection refused: Bad user name or password<br/>
+ <b>5</b>: Connection refused: Not authorized<br/>
+ <b>6-255</b>: Reserved for future use<br/>
+ </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a1e4d90c13a3c0705bc4a13bfe64e6525"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_disconnect" ref="a1e4d90c13a3c0705bc4a13bfe64e6525" args="(MQTTClient handle, int timeout)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_disconnect </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>&nbsp;</td>
+ <td class="paramname"> <em>handle</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&nbsp;</td>
+ <td class="paramname"> <em>timeout</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function attempts to disconnect the client from the MQTT server. In order to allow the client time to complete handling of messages that are in-flight when this function is called, a timeout period is specified. When the timeout period has expired, the client disconnects even if there are still outstanding message acknowledgements. The next time the client connects to the same server, any QoS 1 or 2 messages which have not completed will be retried depending on the cleansession settings for both the previous and the new connection (see <a class="el" href="struct_m_q_t_t_client__connect_options.html#a036c36a2a4d3a3ffae9ab4dd8b3e7f7b">MQTTClient_connectOptions.cleansession</a> and <a class="el" href="_m_q_t_t_client_8h.html#aaa8ae61cd65c9dc0846df10122d7bd4e">MQTTClient_connect()</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>handle</em>&nbsp;</td><td>A valid client handle from a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>The client delays disconnection for up to this time (in milliseconds) in order to allow in-flight message transfers to complete. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> if the client successfully disconnects from the server. An error code is returned if the client was unable to disconnect from the server </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a6e8231e8c47f6f67f7ebbb5dcb4c69c0"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_isConnected" ref="a6e8231e8c47f6f67f7ebbb5dcb4c69c0" args="(MQTTClient handle)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_isConnected </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>&nbsp;</td>
+ <td class="paramname"> <em>handle</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function allows the client application to test whether or not a client is currently connected to the MQTT server. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>A valid client handle from a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>Boolean true if the client is connected, otherwise false. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a326fb0ba7a16613ab7fc861f78232ccf"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_subscribe" ref="a326fb0ba7a16613ab7fc861f78232ccf" args="(MQTTClient handle, char *topic, int qos)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_subscribe </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>&nbsp;</td>
+ <td class="paramname"> <em>handle</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char *&nbsp;</td>
+ <td class="paramname"> <em>topic</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&nbsp;</td>
+ <td class="paramname"> <em>qos</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function attempts to subscribe a client to a single topic, which may contain wildcards (see <a class="el" href="wildcard.html">Subscription wildcards</a>). This call also specifies the <a class="el" href="qos.html">Quality of service</a> requested for the subscription (see also <a class="el" href="_m_q_t_t_client_8h.html#ad125c07aad06ca085b5fff40c333b533">MQTTClient_subscribeMany()</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>handle</em>&nbsp;</td><td>A valid client handle from a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>topic</em>&nbsp;</td><td>The subscription topic, which may include wildcards. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>qos</em>&nbsp;</td><td>The requested quality of service for the subscription. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> if the subscription request is successful. An error code is returned if there was a problem registering the subscription. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ad125c07aad06ca085b5fff40c333b533"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_subscribeMany" ref="ad125c07aad06ca085b5fff40c333b533" args="(MQTTClient handle, int count, char **topic, int *qos)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_subscribeMany </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>&nbsp;</td>
+ <td class="paramname"> <em>handle</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&nbsp;</td>
+ <td class="paramname"> <em>count</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char **&nbsp;</td>
+ <td class="paramname"> <em>topic</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int *&nbsp;</td>
+ <td class="paramname"> <em>qos</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function attempts to subscribe a client to a list of topics, which may contain wildcards (see <a class="el" href="wildcard.html">Subscription wildcards</a>). This call also specifies the <a class="el" href="qos.html">Quality of service</a> requested for each topic (see also <a class="el" href="_m_q_t_t_client_8h.html#a326fb0ba7a16613ab7fc861f78232ccf">MQTTClient_subscribe()</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>handle</em>&nbsp;</td><td>A valid client handle from a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>The number of topics for which the client is requesting subscriptions. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>topic</em>&nbsp;</td><td>An array (of length <em>count</em>) of pointers to topics, each of which may include wildcards. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>qos</em>&nbsp;</td><td>An array (of length <em>count</em>) of <a class="el" href="qos.html">Quality of service</a> values. qos[n] is the requested QoS for topic[n]. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> if the subscription request is successful. An error code is returned if there was a problem registering the subscriptions. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="adc79908187e9dd8d96ddc9536aa9d0c7"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_unsubscribe" ref="adc79908187e9dd8d96ddc9536aa9d0c7" args="(MQTTClient handle, char *topic)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_unsubscribe </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>&nbsp;</td>
+ <td class="paramname"> <em>handle</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char *&nbsp;</td>
+ <td class="paramname"> <em>topic</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function attempts to remove an existing subscription made by the specified client. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>A valid client handle from a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>topic</em>&nbsp;</td><td>The topic for the subscription to be removed, which may include wildcards (see <a class="el" href="wildcard.html">Subscription wildcards</a>). </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> if the subscription is removed. An error code is returned if there was a problem removing the subscription. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a4966145fdc008afc6aa90d7030f73b51"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_unsubscribeMany" ref="a4966145fdc008afc6aa90d7030f73b51" args="(MQTTClient handle, int count, char **topic)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_unsubscribeMany </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>&nbsp;</td>
+ <td class="paramname"> <em>handle</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&nbsp;</td>
+ <td class="paramname"> <em>count</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char **&nbsp;</td>
+ <td class="paramname"> <em>topic</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function attempts to remove existing subscriptions to a list of topics made by the specified client. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>A valid client handle from a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>The number subscriptions to be removed. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>topic</em>&nbsp;</td><td>An array (of length <em>count</em>) of pointers to the topics of the subscriptions to be removed, each of which may include wildcards. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> if the subscriptions are removed. An error code is returned if there was a problem removing the subscriptions. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="aa061f83fbed3a23177cca8714780ffbd"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_publish" ref="aa061f83fbed3a23177cca8714780ffbd" args="(MQTTClient handle, char *topicName, int payloadlen, void *payload, int qos, int retained, MQTTClient_deliveryToken *dt)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_publish </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>&nbsp;</td>
+ <td class="paramname"> <em>handle</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char *&nbsp;</td>
+ <td class="paramname"> <em>topicName</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&nbsp;</td>
+ <td class="paramname"> <em>payloadlen</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">void *&nbsp;</td>
+ <td class="paramname"> <em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&nbsp;</td>
+ <td class="paramname"> <em>qos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&nbsp;</td>
+ <td class="paramname"> <em>retained</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> *&nbsp;</td>
+ <td class="paramname"> <em>dt</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function attempts to publish a message to a given topic (see also <a class="el" href="_m_q_t_t_client_8h.html#a288d6c8d4919f06e991be2435f649676">MQTTClient_publishMessage()</a>). An <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> is issued when this function returns successfully. If the client application needs to test for succesful delivery of QoS1 and QoS2 messages, this can be done either asynchronously or synchronously (see <a class="el" href="async.html">Asynchronous vs synchronous client applications</a>, <a class="el" href="_m_q_t_t_client_8h.html#a83807ec81fe8c3941e368ab329d43067">MQTTClient_waitForCompletion</a> and <a class="el" href="_m_q_t_t_client_8h.html#abef83794d8252551ed248cde6eb845a6">MQTTClient_deliveryComplete()</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>handle</em>&nbsp;</td><td>A valid client handle from a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>topicName</em>&nbsp;</td><td>The topic associated with this message. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>payloadlen</em>&nbsp;</td><td>The length of the payload in bytes. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>payload</em>&nbsp;</td><td>A pointer to the byte array payload of the message. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>qos</em>&nbsp;</td><td>The <a class="el" href="qos.html">Quality of service</a> of the message. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>retained</em>&nbsp;</td><td>The retained flag for the message. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>dt</em>&nbsp;</td><td>A pointer to an <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a>. This is populated with a token representing the message when the function returns successfully. If your application does not use delivery tokens, set this argument to NULL. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> if the message is accepted for publication. An error code is returned if there was a problem accepting the message. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a288d6c8d4919f06e991be2435f649676"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_publishMessage" ref="a288d6c8d4919f06e991be2435f649676" args="(MQTTClient handle, char *topicName, MQTTClient_message *msg, MQTTClient_deliveryToken *dt)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_publishMessage </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>&nbsp;</td>
+ <td class="paramname"> <em>handle</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char *&nbsp;</td>
+ <td class="paramname"> <em>topicName</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a> *&nbsp;</td>
+ <td class="paramname"> <em>msg</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> *&nbsp;</td>
+ <td class="paramname"> <em>dt</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function attempts to publish a message to a given topic (see also <a class="el" href="_m_q_t_t_client_8h.html#aa061f83fbed3a23177cca8714780ffbd">MQTTClient_publish()</a>). An <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> is issued when this function returns successfully. If the client application needs to test for succesful delivery of QoS1 and QoS2 messages, this can be done either asynchronously or synchronously (see <a class="el" href="async.html">Asynchronous vs synchronous client applications</a>, <a class="el" href="_m_q_t_t_client_8h.html#a83807ec81fe8c3941e368ab329d43067">MQTTClient_waitForCompletion</a> and <a class="el" href="_m_q_t_t_client_8h.html#abef83794d8252551ed248cde6eb845a6">MQTTClient_deliveryComplete()</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>handle</em>&nbsp;</td><td>A valid client handle from a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>topicName</em>&nbsp;</td><td>The topic associated with this message. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>msg</em>&nbsp;</td><td>A pointer to a valid <a class="el" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a> structure containing the payload and attributes of the message to be published. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>dt</em>&nbsp;</td><td>A pointer to an <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a>. This is populated with a token representing the message when the function returns successfully. If your application does not use delivery tokens, set this argument to NULL. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> if the message is accepted for publication. An error code is returned if there was a problem accepting the message. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a83807ec81fe8c3941e368ab329d43067"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_waitForCompletion" ref="a83807ec81fe8c3941e368ab329d43067" args="(MQTTClient handle, MQTTClient_deliveryToken dt, unsigned long timeout)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_waitForCompletion </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>&nbsp;</td>
+ <td class="paramname"> <em>handle</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a>&nbsp;</td>
+ <td class="paramname"> <em>dt</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">unsigned long&nbsp;</td>
+ <td class="paramname"> <em>timeout</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function is called by the client application to synchronize execution of the main thread with completed publication of a message. When called, <a class="el" href="_m_q_t_t_client_8h.html#a83807ec81fe8c3941e368ab329d43067">MQTTClient_waitForCompletion()</a> blocks execution until the message has been successful delivered or the specified timeout has expired. See <a class="el" href="async.html">Asynchronous vs synchronous client applications</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>handle</em>&nbsp;</td><td>A valid client handle from a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>dt</em>&nbsp;</td><td>The <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> that represents the message being tested for successful delivery. Delivery tokens are issued by the publishing functions <a class="el" href="_m_q_t_t_client_8h.html#aa061f83fbed3a23177cca8714780ffbd">MQTTClient_publish()</a> and <a class="el" href="_m_q_t_t_client_8h.html#a288d6c8d4919f06e991be2435f649676">MQTTClient_publishMessage()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>The maximum time to wait in milliseconds. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> if the message was successfully delivered. An error code is returned if the timeout expires or there was a problem checking the token. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a2a617c6b0492c04a4ddea592f5e53604"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_getPendingDeliveryTokens" ref="a2a617c6b0492c04a4ddea592f5e53604" args="(MQTTClient handle, MQTTClient_deliveryToken **tokens)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_getPendingDeliveryTokens </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>&nbsp;</td>
+ <td class="paramname"> <em>handle</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> **&nbsp;</td>
+ <td class="paramname"> <em>tokens</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function sets a pointer to an array of delivery tokens for messages that are currently in-flight (pending completion).</p>
+<p><b>Important note:</b> The memory used to hold the array of tokens is malloc()'d in this function. The client application is responsible for freeing this memory when it is no longer required. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>A valid client handle from a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>tokens</em>&nbsp;</td><td>The address of a pointer to an <a class="el" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a>. When the function returns successfully, the pointer is set to point to an array of tokens representing messages pending completion. The last member of the array is set to -1 to indicate there are no more tokens. If no tokens are pending, the pointer is set to NULL. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> if the function returns successfully. An error code is returned if there was a problem obtaining the list of pending tokens. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a8ad3d29864a9ca08202b0832e0f6678e"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_yield" ref="a8ad3d29864a9ca08202b0832e0f6678e" args="(void)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void MQTTClient_yield </td>
+ <td>(</td>
+ <td class="paramtype">void&nbsp;</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>When implementing a single-threaded client, call this function periodically to allow processing of message retries and to send MQTT keepalive pings. If the application is calling <a class="el" href="_m_q_t_t_client_8h.html#a4c2df88d00a3dadd510a8cb774739366">MQTTClient_receive()</a> regularly, then it is not necessary to call this function. </p>
+
+</div>
+</div>
+<a class="anchor" id="a4c2df88d00a3dadd510a8cb774739366"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_receive" ref="a4c2df88d00a3dadd510a8cb774739366" args="(MQTTClient handle, char **topicName, int *topicLen, MQTTClient_message **message, unsigned long timeout)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int MQTTClient_receive </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>&nbsp;</td>
+ <td class="paramname"> <em>handle</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char **&nbsp;</td>
+ <td class="paramname"> <em>topicName</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int *&nbsp;</td>
+ <td class="paramname"> <em>topicLen</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a> **&nbsp;</td>
+ <td class="paramname"> <em>message</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">unsigned long&nbsp;</td>
+ <td class="paramname"> <em>timeout</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function performs a synchronous receive of incoming messages. It should be used only when the client application has not set callback methods to support asynchronous receipt of messages (see <a class="el" href="async.html">Asynchronous vs synchronous client applications</a> and <a class="el" href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks()</a>). Using this function allows a single-threaded client subscriber application to be written. When called, this function blocks until the next message arrives or the specified timeout expires (see also <a class="el" href="_m_q_t_t_client_8h.html#a8ad3d29864a9ca08202b0832e0f6678e">MQTTClient_yield()</a>).</p>
+<p><b>Important note:</b> The application must free() the memory allocated to the topic and the message when processing is complete (see <a class="el" href="_m_q_t_t_client_8h.html#abd8abde4f39d3e689029de27f7a98a65">MQTTClient_freeMessage()</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>handle</em>&nbsp;</td><td>A valid client handle from a successful call to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>topicName</em>&nbsp;</td><td>The address of a pointer to a topic. This function allocates the memory for the topic and returns it to the application by setting <em>topicName</em> to point to the topic. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>topicLen</em>&nbsp;</td><td>The length of the topic. If the return code from this function is <a class="el" href="_m_q_t_t_client_8h.html#a29afebfce0bdf6cda1e37abc0c4b6690">MQTTCLIENT_TOPICNAME_TRUNCATED</a>, the topic contains embedded NULL characters and the full topic should be retrieved by using <em>topicLen</em>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>message</em>&nbsp;</td><td>The address of a pointer to the received message. This function allocates the memory for the message and returns it to the application by setting <em>message</em> to point to the received message. The pointer is set to NULL if the timeout expires. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>The length of time to wait for a message in milliseconds. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> or <a class="el" href="_m_q_t_t_client_8h.html#a29afebfce0bdf6cda1e37abc0c4b6690">MQTTCLIENT_TOPICNAME_TRUNCATED</a> if a message is received. <a class="el" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">MQTTCLIENT_SUCCESS</a> can also indicate that the timeout expired, in which case <em>message</em> is NULL. An error code is returned if there was a problem trying to receive a message. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="abd8abde4f39d3e689029de27f7a98a65"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_freeMessage" ref="abd8abde4f39d3e689029de27f7a98a65" args="(MQTTClient_message **msg)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void MQTTClient_freeMessage </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a> **&nbsp;</td>
+ <td class="paramname"> <em>msg</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function frees memory allocated to an MQTT message, including the additional memory allocated to the message payload. The client application calls this function when the message has been fully processed. <b>Important note:</b> This function does not free the memory allocated to a message topic string. It is the responsibility of the client application to free this memory using the <a class="el" href="_m_q_t_t_client_8h.html#a203b545c999beb6b825ec99b6aea79ab">MQTTClient_free()</a> library function. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>msg</em>&nbsp;</td><td>The address of a pointer to the <a class="el" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a> structure to be freed. </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a203b545c999beb6b825ec99b6aea79ab"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_free" ref="a203b545c999beb6b825ec99b6aea79ab" args="(void *ptr)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void MQTTClient_free </td>
+ <td>(</td>
+ <td class="paramtype">void *&nbsp;</td>
+ <td class="paramname"> <em>ptr</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function frees memory allocated by the MQTT C client library, especially the topic name. This is needed on Windows when the client libary and application program have been compiled with different versions of the C compiler. It is thus good policy to always use this function when freeing any MQTT C client- allocated memory. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>ptr</em>&nbsp;</td><td>The pointer to the client library storage to be freed. </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="ae700c3f5cfea3813264ce95e7c8cf498"></a><!-- doxytag: member="MQTTClient.h::MQTTClient_destroy" ref="ae700c3f5cfea3813264ce95e7c8cf498" args="(MQTTClient *handle)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void MQTTClient_destroy </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> *&nbsp;</td>
+ <td class="paramname"> <em>handle</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This function frees the memory allocated to an MQTT client (see <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>). It should be called when the client is no longer required. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>A pointer to the handle referring to the <a class="el" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> structure to be freed. </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+</div>
+<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 3 15:17:14 2012 for MQTT Client by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
+</body>
+</html>
View
179 doc/API/_m_q_t_t_client_8h_source.html
@@ -0,0 +1,179 @@
+<!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>MQTT Client: MQTTClient.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.3 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+ <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+ <li><a href="annotated.html"><span>Data&nbsp;Structures</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>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<h1>MQTTClient.h</h1><a href="_m_q_t_t_client_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*******************************************************************************</span>
+<a name="l00002"></a>00002 <span class="comment"> * Copyright (c) 2009, 2012 IBM Corp.</span>
+<a name="l00003"></a>00003 <span class="comment"> *</span>
+<a name="l00004"></a>00004 <span class="comment"> * All rights reserved. This program and the accompanying materials</span>
+<a name="l00005"></a>00005 <span class="comment"> * are made available under the terms of the Eclipse Public License v1.0</span>
+<a name="l00006"></a>00006 <span class="comment"> * which accompanies this distribution, and is available at</span>
+<a name="l00007"></a>00007 <span class="comment"> * http://www.eclipse.org/legal/epl-v10.html</span>
+<a name="l00008"></a>00008 <span class="comment"> *</span>
+<a name="l00009"></a>00009 <span class="comment"> * Contributors:</span>
+<a name="l00010"></a>00010 <span class="comment"> * Ian Craggs - initial API and implementation and/or initial documentation</span>
+<a name="l00011"></a>00011 <span class="comment"> *******************************************************************************/</span>
+<a name="l00012"></a>00012
+<a name="l00055"></a>00055
+<a name="l00056"></a>00056 <span class="preprocessor">#if !defined(MQTTCLIENT_H)</span>
+<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#define MQTTCLIENT_H</span>
+<a name="l00058"></a>00058 <span class="preprocessor"></span>
+<a name="l00059"></a>00059 <span class="preprocessor">#if defined(WIN32)</span>
+<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor"> #define DLLImport __declspec(dllimport)</span>
+<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor"> #define DLLExport __declspec(dllexport)</span>
+<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor"> #define DLLImport extern</span>
+<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor"> #define DLLExport</span>
+<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00066"></a>00066 <span class="preprocessor"></span>
+<a name="l00067"></a>00067 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
+<a name="l00069"></a>00069
+<a name="l00070"></a>00070 <span class="preprocessor">#if !defined(NO_PERSISTENCE)</span>
+<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="_m_q_t_t_client_persistence_8h.html" title="This structure represents a persistent data store, used to store outbound and inbound...">MQTTClientPersistence.h</a>&quot;</span>
+<a name="l00072"></a>00072 <span class="preprocessor">#endif</span>
+<a name="l00073"></a>00073 <span class="preprocessor"></span>
+<a name="l00078"></a><a class="code" href="_m_q_t_t_client_8h.html#acba095704d79e5a1996389fa26203f73">00078</a> <span class="preprocessor">#define MQTTCLIENT_SUCCESS 0</span>
+<a name="l00079"></a>00079 <span class="preprocessor"></span>
+<a name="l00083"></a><a class="code" href="_m_q_t_t_client_8h.html#af33a6d6c0e8a6a747bf39638e0bba36b">00083</a> <span class="preprocessor">#define MQTTCLIENT_FAILURE -1</span>
+<a name="l00084"></a>00084 <span class="preprocessor"></span>
+<a name="l00085"></a>00085 <span class="comment">/* error code -2 is MQTTCLIENT_PERSISTENCE_ERROR */</span>
+<a name="l00086"></a>00086
+<a name="l00090"></a><a class="code" href="_m_q_t_t_client_8h.html#a561d053311cb492cf7226f419ee0d516">00090</a> <span class="preprocessor">#define MQTTCLIENT_DISCONNECTED -3</span>
+<a name="l00091"></a>00091 <span class="preprocessor"></span>
+<a name="l00095"></a><a class="code" href="_m_q_t_t_client_8h.html#a8fc442fc2e9dfb422a163ab1fa02e0cb">00095</a> <span class="preprocessor">#define MQTTCLIENT_MAX_MESSAGES_INFLIGHT -4</span>
+<a name="l00096"></a>00096 <span class="preprocessor"></span>
+<a name="l00099"></a><a class="code" href="_m_q_t_t_client_8h.html#a678a4744192de9c8dca220d9965809dd">00099</a> <span class="preprocessor">#define MQTTCLIENT_BAD_UTF8_STRING -5</span>
+<a name="l00100"></a>00100 <span class="preprocessor"></span>
+<a name="l00103"></a><a class="code" href="_m_q_t_t_client_8h.html#ac3232abd7f86bbba26faea0e2b132c3c">00103</a> <span class="preprocessor">#define MQTTCLIENT_NULL_PARAMETER -6</span>
+<a name="l00104"></a>00104 <span class="preprocessor"></span>
+<a name="l00109"></a><a class="code" href="_m_q_t_t_client_8h.html#a29afebfce0bdf6cda1e37abc0c4b6690">00109</a> <span class="preprocessor">#define MQTTCLIENT_TOPICNAME_TRUNCATED -7</span>
+<a name="l00110"></a>00110 <span class="preprocessor"></span>
+<a name="l00114"></a><a class="code" href="_m_q_t_t_client_8h.html#a747615d8064e3fe024ae5565ec63e1ce">00114</a> <span class="preprocessor">#define MQTTCLIENT_BAD_STRUCTURE -8</span>
+<a name="l00115"></a>00115 <span class="preprocessor"></span>
+<a name="l00120"></a><a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">00120</a> <span class="keyword">typedef</span> <span class="keywordtype">void</span>* <a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>;
+<a name="l00131"></a><a class="code" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">00131</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a>;
+<a name="l00132"></a>00132
+<a name="l00139"></a><a class="code" href="struct_m_q_t_t_client__message.html">00139</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
+<a name="l00140"></a>00140 {
+<a name="l00142"></a><a class="code" href="struct_m_q_t_t_client__message.html#aa5326df180cb23c59afbcab711a06479">00142</a> <span class="keywordtype">char</span> struct_id[4];
+<a name="l00144"></a><a class="code" href="struct_m_q_t_t_client__message.html#a0761a5e5be0383882e42924de8e51f82">00144</a> <span class="keywordtype">int</span> struct_version;
+<a name="l00146"></a><a class="code" href="struct_m_q_t_t_client__message.html#aa3cb44feb3ae6d11b3a4cad2d94cb33a">00146</a> <span class="keywordtype">int</span> payloadlen;
+<a name="l00148"></a><a class="code" href="struct_m_q_t_t_client__message.html#a9eff55064941fb604452abb0050ea99d">00148</a> <span class="keywordtype">void</span>* payload;
+<a name="l00162"></a><a class="code" href="struct_m_q_t_t_client__message.html#a35738099155a0e4f54050da474bab2e7">00162</a> <span class="keywordtype">int</span> qos;
+<a name="l00181"></a><a class="code" href="struct_m_q_t_t_client__message.html#a6a4904c112507a43e7dc8495b62cc0fc">00181</a> <span class="keywordtype">int</span> retained;
+<a name="l00188"></a><a class="code" href="struct_m_q_t_t_client__message.html#adc4cf3f551bb367858644559d69cfdf5">00188</a> <span class="keywordtype">int</span> dup;
+<a name="l00192"></a><a class="code" href="struct_m_q_t_t_client__message.html#a6174c42da8c55c86e7255be2848dc4ac">00192</a> <span class="keywordtype">int</span> msgid;
+<a name="l00193"></a>00193 } <a class="code" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a>;
+<a name="l00194"></a>00194
+<a name="l00195"></a><a class="code" href="_m_q_t_t_client_8h.html#aa1fd995924d3df75959fcf57e87aefac">00195</a> <span class="preprocessor">#define MQTTClient_message_initializer { &quot;MQTM&quot;, 0, 0, NULL, 0, 0, 0, 0 }</span>
+<a name="l00196"></a>00196 <span class="preprocessor"></span>
+<a name="l00223"></a><a class="code" href="_m_q_t_t_client_8h.html#aa42130dd069e7e949bcab37b6dce64a5">00223</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#aa42130dd069e7e949bcab37b6dce64a5">MQTTClient_messageArrived</a>(<span class="keywordtype">void</span>* context, <span class="keywordtype">char</span>* topicName, <span class="keywordtype">int</span> topicLen, <a class="code" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a>* message);
+<a name="l00224"></a>00224
+<a name="l00245"></a><a class="code" href="_m_q_t_t_client_8h.html#abef83794d8252551ed248cde6eb845a6">00245</a> <span class="keyword">typedef</span> <span class="keywordtype">void</span> <a class="code" href="_m_q_t_t_client_8h.html#abef83794d8252551ed248cde6eb845a6">MQTTClient_deliveryComplete</a>(<span class="keywordtype">void</span>* context, <a class="code" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> dt);
+<a name="l00246"></a>00246
+<a name="l00262"></a><a class="code" href="_m_q_t_t_client_8h.html#a6bb253f16754e7cc81798c9fda0e36cf">00262</a> <span class="keyword">typedef</span> <span class="keywordtype">void</span> <a class="code" href="_m_q_t_t_client_8h.html#a6bb253f16754e7cc81798c9fda0e36cf">MQTTClient_connectionLost</a>(<span class="keywordtype">void</span>* context, <span class="keywordtype">char</span>* cause);
+<a name="l00263"></a>00263
+<a name="l00264"></a>00264
+<a name="l00292"></a>00292 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#aad27d07782991a4937ebf2f39a021f83">MQTTClient_setCallbacks</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <span class="keywordtype">void</span>* context, <a class="code" href="_m_q_t_t_client_8h.html#a6bb253f16754e7cc81798c9fda0e36cf">MQTTClient_connectionLost</a>* cl,
+<a name="l00293"></a>00293 <a class="code" href="_m_q_t_t_client_8h.html#aa42130dd069e7e949bcab37b6dce64a5">MQTTClient_messageArrived</a>* ma, <a class="code" href="_m_q_t_t_client_8h.html#abef83794d8252551ed248cde6eb845a6">MQTTClient_deliveryComplete</a>* dc);
+<a name="l00294"></a>00294
+<a name="l00338"></a>00338 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>* handle, <span class="keywordtype">char</span>* serverURI, <span class="keywordtype">char</span>* clientId,
+<a name="l00339"></a>00339 <span class="keywordtype">int</span> persistence_type, <span class="keywordtype">void</span>* persistence_context);
+<a name="l00340"></a>00340
+<a name="l00353"></a><a class="code" href="struct_m_q_t_t_client__will_options.html">00353</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
+<a name="l00354"></a>00354 {
+<a name="l00356"></a><a class="code" href="struct_m_q_t_t_client__will_options.html#aa5326df180cb23c59afbcab711a06479">00356</a> <span class="keywordtype">char</span> struct_id[4];
+<a name="l00358"></a><a class="code" href="struct_m_q_t_t_client__will_options.html#a0761a5e5be0383882e42924de8e51f82">00358</a> <span class="keywordtype">int</span> struct_version;
+<a name="l00360"></a><a class="code" href="struct_m_q_t_t_client__will_options.html#ac0aaa2cc04921489bbddaf101f03b961">00360</a> <span class="keywordtype">char</span>* topicName;
+<a name="l00362"></a><a class="code" href="struct_m_q_t_t_client__will_options.html#a0b2e8c7f76df48129f994ecc46d5c66c">00362</a> <span class="keywordtype">char</span>* message;
+<a name="l00366"></a><a class="code" href="struct_m_q_t_t_client__will_options.html#a6a4904c112507a43e7dc8495b62cc0fc">00366</a> <span class="keywordtype">int</span> retained;
+<a name="l00371"></a><a class="code" href="struct_m_q_t_t_client__will_options.html#a35738099155a0e4f54050da474bab2e7">00371</a> <span class="keywordtype">int</span> qos;
+<a name="l00372"></a>00372 } <a class="code" href="struct_m_q_t_t_client__will_options.html">MQTTClient_willOptions</a>;
+<a name="l00373"></a>00373
+<a name="l00374"></a><a class="code" href="_m_q_t_t_client_8h.html#aae0811659c59f5dad0467544f91645eb">00374</a> <span class="preprocessor">#define MQTTClient_willOptions_initializer { &quot;MQTW&quot;, 0, NULL, NULL, 0, 0 }</span>
+<a name="l00375"></a>00375 <span class="preprocessor"></span>
+<a name="l00390"></a><a class="code" href="struct_m_q_t_t_client__connect_options.html">00390</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
+<a name="l00391"></a>00391 {
+<a name="l00393"></a><a class="code" href="struct_m_q_t_t_client__connect_options.html#aa5326df180cb23c59afbcab711a06479">00393</a> <span class="keywordtype">char</span> struct_id[4];
+<a name="l00395"></a><a class="code" href="struct_m_q_t_t_client__connect_options.html#a0761a5e5be0383882e42924de8e51f82">00395</a> <span class="keywordtype">int</span> struct_version;
+<a name="l00405"></a><a class="code" href="struct_m_q_t_t_client__connect_options.html#ac8dd0930672a9c7d71fc645aa1f0521d">00405</a> <span class="keywordtype">int</span> keepAliveInterval;
+<a name="l00427"></a><a class="code" href="struct_m_q_t_t_client__connect_options.html#a036c36a2a4d3a3ffae9ab4dd8b3e7f7b">00427</a> <span class="keywordtype">int</span> cleansession;
+<a name="l00437"></a><a class="code" href="struct_m_q_t_t_client__connect_options.html#a9f1cdffc99659fd4e2d20e6de3c64df0">00437</a> <span class="keywordtype">int</span> reliable;
+<a name="l00443"></a><a class="code" href="struct_m_q_t_t_client__connect_options.html#a0a880e99d47eb2efe552abe5079bdc9d">00443</a> <a class="code" href="struct_m_q_t_t_client__will_options.html">MQTTClient_willOptions</a>* will;
+<a name="l00449"></a><a class="code" href="struct_m_q_t_t_client__connect_options.html#a9b20c006bd90a09e1465fb668700e81d">00449</a> <span class="keywordtype">char</span>* username;
+<a name="l00455"></a><a class="code" href="struct_m_q_t_t_client__connect_options.html#a59460a3ff2c12443d1022e5cc0fba85c">00455</a> <span class="keywordtype">char</span>* password;
+<a name="l00459"></a><a class="code" href="struct_m_q_t_t_client__connect_options.html#a38c6aa24b36d981c49405db425c24db0">00459</a> <span class="keywordtype">int</span> connectTimeout;
+<a name="l00463"></a><a class="code" href="struct_m_q_t_t_client__connect_options.html#ac73f57846c42bcaa9a47e6721a957748">00463</a> <span class="keywordtype">int</span> retryInterval;
+<a name="l00464"></a>00464 } <a class="code" href="struct_m_q_t_t_client__connect_options.html">MQTTClient_connectOptions</a>;
+<a name="l00465"></a>00465
+<a name="l00466"></a><a class="code" href="_m_q_t_t_client_8h.html#aefd7c865f2641c8155b763fdf3061c25">00466</a> <span class="preprocessor">#define MQTTClient_connectOptions_initializer { &quot;MQTC&quot;, 0, 60, 1, 1, NULL, NULL, NULL, 30, 20 }</span>
+<a name="l00467"></a>00467 <span class="preprocessor"></span>
+<a name="l00488"></a>00488 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#aaa8ae61cd65c9dc0846df10122d7bd4e">MQTTClient_connect</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <a class="code" href="struct_m_q_t_t_client__connect_options.html">MQTTClient_connectOptions</a>* options);
+<a name="l00489"></a>00489
+<a name="l00508"></a>00508 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#a1e4d90c13a3c0705bc4a13bfe64e6525">MQTTClient_disconnect</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <span class="keywordtype">int</span> timeout);
+<a name="l00509"></a>00509
+<a name="l00517"></a>00517 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#a6e8231e8c47f6f67f7ebbb5dcb4c69c0">MQTTClient_isConnected</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle);
+<a name="l00518"></a>00518
+<a name="l00519"></a>00519
+<a name="l00520"></a>00520 <span class="comment">/* Subscribe is synchronous. QoS list parameter is changed on return to granted QoSs.</span>
+<a name="l00521"></a>00521 <span class="comment"> Returns return code, MQTTCLIENT_SUCCESS == success, non-zero some sort of error (TBD) */</span>
+<a name="l00522"></a>00522
+<a name="l00536"></a>00536 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#a326fb0ba7a16613ab7fc861f78232ccf">MQTTClient_subscribe</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <span class="keywordtype">char</span>* topic, <span class="keywordtype">int</span> qos);
+<a name="l00537"></a>00537
+<a name="l00554"></a>00554 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#ad125c07aad06ca085b5fff40c333b533">MQTTClient_subscribeMany</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <span class="keywordtype">int</span> count, <span class="keywordtype">char</span>** topic, <span class="keywordtype">int</span>* qos);
+<a name="l00555"></a>00555
+<a name="l00567"></a>00567 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#adc79908187e9dd8d96ddc9536aa9d0c7">MQTTClient_unsubscribe</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <span class="keywordtype">char</span>* topic);
+<a name="l00568"></a>00568
+<a name="l00580"></a>00580 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#a4966145fdc008afc6aa90d7030f73b51">MQTTClient_unsubscribeMany</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <span class="keywordtype">int</span> count, <span class="keywordtype">char</span>** topic);
+<a name="l00581"></a>00581
+<a name="l00603"></a>00603 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#aa061f83fbed3a23177cca8714780ffbd">MQTTClient_publish</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <span class="keywordtype">char</span>* topicName, <span class="keywordtype">int</span> payloadlen, <span class="keywordtype">void</span>* payload, <span class="keywordtype">int</span> qos, <span class="keywordtype">int</span> retained,
+<a name="l00604"></a>00604 <a class="code" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a>* dt);
+<a name="l00605"></a>00605
+<a name="l00625"></a>00625 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#a288d6c8d4919f06e991be2435f649676">MQTTClient_publishMessage</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <span class="keywordtype">char</span>* topicName, <a class="code" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a>* msg, <a class="code" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a>* dt);
+<a name="l00626"></a>00626
+<a name="l00627"></a>00627
+<a name="l00643"></a>00643 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#a83807ec81fe8c3941e368ab329d43067">MQTTClient_waitForCompletion</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <a class="code" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> dt, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> timeout);
+<a name="l00644"></a>00644
+<a name="l00645"></a>00645
+<a name="l00664"></a>00664 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#a2a617c6b0492c04a4ddea592f5e53604">MQTTClient_getPendingDeliveryTokens</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <a class="code" href="_m_q_t_t_client_8h.html#a73e49030fd8b7074aa1aa45669b7fe8d">MQTTClient_deliveryToken</a> **tokens);
+<a name="l00665"></a>00665
+<a name="l00672"></a>00672 DLLExport <span class="keywordtype">void</span> <a class="code" href="_m_q_t_t_client_8h.html#a8ad3d29864a9ca08202b0832e0f6678e">MQTTClient_yield</a>(<span class="keywordtype">void</span>);
+<a name="l00673"></a>00673
+<a name="l00705"></a>00705 DLLExport <span class="keywordtype">int</span> <a class="code" href="_m_q_t_t_client_8h.html#a4c2df88d00a3dadd510a8cb774739366">MQTTClient_receive</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a> handle, <span class="keywordtype">char</span>** topicName, <span class="keywordtype">int</span>* topicLen, <a class="code" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a>** message,
+<a name="l00706"></a>00706 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> timeout);
+<a name="l00707"></a>00707
+<a name="l00718"></a>00718 DLLExport <span class="keywordtype">void</span> <a class="code" href="_m_q_t_t_client_8h.html#abd8abde4f39d3e689029de27f7a98a65">MQTTClient_freeMessage</a>(<a class="code" href="struct_m_q_t_t_client__message.html">MQTTClient_message</a>** msg);
+<a name="l00719"></a>00719
+<a name="l00728"></a>00728 DLLExport <span class="keywordtype">void</span> <a class="code" href="_m_q_t_t_client_8h.html#a203b545c999beb6b825ec99b6aea79ab">MQTTClient_free</a>(<span class="keywordtype">void</span>* ptr);
+<a name="l00729"></a>00729
+<a name="l00737"></a>00737 DLLExport <span class="keywordtype">void</span> <a class="code" href="_m_q_t_t_client_8h.html#ae700c3f5cfea3813264ce95e7c8cf498">MQTTClient_destroy</a>(<a class="code" href="_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59">MQTTClient</a>* handle);
+<a name="l00738"></a>00738
+<a name="l00739"></a>00739 <span class="preprocessor">#endif</span>
+<a name="l00740"></a>00740 <span class="preprocessor"></span>
+</pre></div></div>
+<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 3 15:17:14 2012 for MQTT Client by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
+</body>
+</html>
View
322 doc/API/_m_q_t_t_client_persistence_8h.html
@@ -0,0 +1,322 @@
+<!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>MQTT Client: MQTTClientPersistence.h File 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.3 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+ <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+ <li><a href="annotated.html"><span>Data&nbsp;Structures</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>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>MQTTClientPersistence.h File Reference</h1>
+<p>This structure represents a persistent data store, used to store outbound and inbound messages, in order to achieve reliable messaging.
+<a href="#_details">More...</a></p>
+
+<p><a href="_m_q_t_t_client_persistence_8h_source.html">Go to the source code of this file.</a></p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_m_q_t_t_client__persistence.html">MQTTClient_persistence</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A structure containing the function pointers to a persistence implementation and the context or state that will be shared across all the persistence functions. <a href="struct_m_q_t_t_client__persistence.html#_details">More...</a><br/></td></tr>
+<tr><td colspan="2"><h2>Defines</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_persistence_8h.html#aaa948291718a9c06369b854b0f64bc32">MQTTCLIENT_PERSISTENCE_DEFAULT</a>&nbsp;&nbsp;&nbsp;0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_persistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa">MQTTCLIENT_PERSISTENCE_NONE</a>&nbsp;&nbsp;&nbsp;1</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_persistence_8h.html#a5dc68b8616e4041e037bad94ce07681b">MQTTCLIENT_PERSISTENCE_USER</a>&nbsp;&nbsp;&nbsp;2</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_persistence_8h.html#ab716e21e53c84a5ad62aa962a2a8f7db">MQTTCLIENT_PERSISTENCE_ERROR</a>&nbsp;&nbsp;&nbsp;-2</td></tr>
+<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_persistence_8h.html#a3c418c1cb963a76d9fae5c3219eeb8ce">Persistence_open</a> )(void **handle, char *clientID, char *serverURI, void *context)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize the persistent store. <a href="#a3c418c1cb963a76d9fae5c3219eeb8ce"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_persistence_8h.html#a23648571a3f4cd47ef18fdb821a990a4">Persistence_close</a> )(void *handle)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close the persistent store referred to by the handle. <a href="#a23648571a3f4cd47ef18fdb821a990a4"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_persistence_8h.html#a0b95acfdfff547e3a539f229b1cf6e41">Persistence_put</a> )(void *handle, char *key, int bufcount, char *buffers[], int buflens[])</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Put the specified data into the persistent store. <a href="#a0b95acfdfff547e3a539f229b1cf6e41"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_persistence_8h.html#a4fd91e00c8fc2ddff4b4d54e9c5a1d48">Persistence_get</a> )(void *handle, char *key, char **buffer, int *buflen)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve the specified data from the persistent store. <a href="#a4fd91e00c8fc2ddff4b4d54e9c5a1d48"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_persistence_8h.html#adfeea3989b64d626003086636f6585de">Persistence_remove</a> )(void *handle, char *key)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove the data for the specified key from the store. <a href="#adfeea3989b64d626003086636f6585de"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_persistence_8h.html#ad6295da2bee2a65722a9e0c1e12474c2">Persistence_keys</a> )(void *handle, char ***keys, int *nkeys)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the keys in this persistent data store. <a href="#ad6295da2bee2a65722a9e0c1e12474c2"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_persistence_8h.html#a40523890e58ebe47bd34db6a6d1b47d1">Persistence_clear</a> )(void *handle)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clears the persistence store, so that it no longer contains any persisted data. <a href="#a40523890e58ebe47bd34db6a6d1b47d1"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_m_q_t_t_client_persistence_8h.html#ad92081c4da5e242934f0b13c0279d0af">Persistence_containskey</a> )(void *handle, char *key)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns whether any data has been persisted using the specified key. <a href="#ad92081c4da5e242934f0b13c0279d0af"></a><br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>This structure represents a persistent data store, used to store outbound and inbound messages, in order to achieve reliable messaging. </p>
+<p>The MQTT Client persists QoS1 and QoS2 messages in order to meet the assurances of delivery associated with these <a class="el" href="qos.html">Quality of service</a> levels. The messages are saved in persistent storage The type and context of the persistence implementation are specified when the MQTT client is created (see <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>). The default persistence type (<a class="el" href="_m_q_t_t_client_persistence_8h.html#aaa948291718a9c06369b854b0f64bc32">MQTTCLIENT_PERSISTENCE_DEFAULT</a>) uses a file system-based persistence mechanism. The <em>persistence_context</em> argument passed to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a> when using the default peristence is a string representing the location of the persistence directory. If the context argument is NULL, the working directory will be used.</p>
+<p>To use memory-based persistence, an application passes <a class="el" href="_m_q_t_t_client_persistence_8h.html#ae01e089313a65ac4661ed216b6ac00fa">MQTTCLIENT_PERSISTENCE_NONE</a> as the <em>persistence_type</em> to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>. This can lead to message loss in certain situations, but can be appropriate in some cases (see <a class="el" href="qos.html">Quality of service</a>).</p>
+<p>Client applications can provide their own persistence mechanism by passing <a class="el" href="_m_q_t_t_client_persistence_8h.html#a5dc68b8616e4041e037bad94ce07681b">MQTTCLIENT_PERSISTENCE_USER</a> as the <em>persistence_type</em>. To implement a custom persistence mechanism, the application must pass an initialized <a class="el" href="struct_m_q_t_t_client__persistence.html" title="A structure containing the function pointers to a persistence implementation and...">MQTTClient_persistence</a> structure as the <em>persistence_context</em> argument to <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>.</p>
+<p>If the functions defined return an <a class="el" href="_m_q_t_t_client_persistence_8h.html#ab716e21e53c84a5ad62aa962a2a8f7db">MQTTCLIENT_PERSISTENCE_ERROR</a> then the state of the persisted data should remain as it was prior to the function being called. For example, if <a class="el" href="_m_q_t_t_client_persistence_8h.html#a0b95acfdfff547e3a539f229b1cf6e41" title="Put the specified data into the persistent store.">Persistence_put()</a> returns <a class="el" href="_m_q_t_t_client_persistence_8h.html#ab716e21e53c84a5ad62aa962a2a8f7db">MQTTCLIENT_PERSISTENCE_ERROR</a>, then it is assumed tha tthe persistent store does not contain the data that was passed to the function. Similarly, if <a class="el" href="_m_q_t_t_client_persistence_8h.html#adfeea3989b64d626003086636f6585de" title="Remove the data for the specified key from the store.">Persistence_remove()</a> returns <a class="el" href="_m_q_t_t_client_persistence_8h.html#ab716e21e53c84a5ad62aa962a2a8f7db">MQTTCLIENT_PERSISTENCE_ERROR</a> then it is assumed that the data to be removed is still held in the persistent store.</p>
+<p>It is up to the persistence implementation to log any error information that may be required to diagnose a persistence mechanism failure. </p>
+<hr/><h2>Define Documentation</h2>
+<a class="anchor" id="aaa948291718a9c06369b854b0f64bc32"></a><!-- doxytag: member="MQTTClientPersistence.h::MQTTCLIENT_PERSISTENCE_DEFAULT" ref="aaa948291718a9c06369b854b0f64bc32" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTCLIENT_PERSISTENCE_DEFAULT&nbsp;&nbsp;&nbsp;0</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This <em>persistence_type</em> value specifies the default file system-based persistence mechanism (see <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>). </p>
+
+</div>
+</div>
+<a class="anchor" id="ae01e089313a65ac4661ed216b6ac00fa"></a><!-- doxytag: member="MQTTClientPersistence.h::MQTTCLIENT_PERSISTENCE_NONE" ref="ae01e089313a65ac4661ed216b6ac00fa" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTCLIENT_PERSISTENCE_NONE&nbsp;&nbsp;&nbsp;1</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This <em>persistence_type</em> value specifies a memory-based persistence mechanism (see <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>). </p>
+
+</div>
+</div>
+<a class="anchor" id="a5dc68b8616e4041e037bad94ce07681b"></a><!-- doxytag: member="MQTTClientPersistence.h::MQTTCLIENT_PERSISTENCE_USER" ref="a5dc68b8616e4041e037bad94ce07681b" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTCLIENT_PERSISTENCE_USER&nbsp;&nbsp;&nbsp;2</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>This <em>persistence_type</em> value specifies an application-specific persistence mechanism (see <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>). </p>
+
+</div>
+</div>
+<a class="anchor" id="ab716e21e53c84a5ad62aa962a2a8f7db"></a><!-- doxytag: member="MQTTClientPersistence.h::MQTTCLIENT_PERSISTENCE_ERROR" ref="ab716e21e53c84a5ad62aa962a2a8f7db" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define MQTTCLIENT_PERSISTENCE_ERROR&nbsp;&nbsp;&nbsp;-2</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Application-specific persistence functions must return this error code if there is a problem executing the function. </p>
+
+</div>
+</div>
+<hr/><h2>Typedef Documentation</h2>
+<a class="anchor" id="a3c418c1cb963a76d9fae5c3219eeb8ce"></a><!-- doxytag: member="MQTTClientPersistence.h::Persistence_open" ref="a3c418c1cb963a76d9fae5c3219eeb8ce" args=")(void **handle, char *clientID, char *serverURI, void *context)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef int(* <a class="el" href="_m_q_t_t_client_persistence_8h.html#a3c418c1cb963a76d9fae5c3219eeb8ce">Persistence_open</a>)(void **handle, char *clientID, char *serverURI, void *context)</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Initialize the persistent store. </p>
+<p>Either open the existing persistent store for this client ID or create a new one if one doesn't exist. If the persistent store is already open, return without taking any action.</p>
+<p>An application can use the same client identifier to connect to many different servers. The <em>clientid</em> in conjunction with the <em>serverURI</em> uniquely identifies the persistence store required.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The address of a pointer to a handle for this persistence implementation. This function must set handle to a valid reference to the persistence following a successful return. The handle pointer is passed as an argument to all the other persistence functions. It may include the context parameter and/or any other data for use by the persistence functions. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>clientID</em>&nbsp;</td><td>The client identifier for which the persistent store should be opened. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>serverURI</em>&nbsp;</td><td>The connection string specified when the MQTT client was created (see <a class="el" href="_m_q_t_t_client_8h.html#a5cb44bc0e06bcc95a314d51320a0cd1b">MQTTClient_create()</a>). </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>A pointer to any data required to initialize the persistent store (see <a class="el" href="struct_m_q_t_t_client__persistence.html" title="A structure containing the function pointers to a persistence implementation and...">MQTTClient_persistence</a>). </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>Return 0 if the function completes successfully, otherwise return <a class="el" href="_m_q_t_t_client_persistence_8h.html#ab716e21e53c84a5ad62aa962a2a8f7db">MQTTCLIENT_PERSISTENCE_ERROR</a>. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a23648571a3f4cd47ef18fdb821a990a4"></a><!-- doxytag: member="MQTTClientPersistence.h::Persistence_close" ref="a23648571a3f4cd47ef18fdb821a990a4" args=")(void *handle)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef int(* <a class="el" href="_m_q_t_t_client_persistence_8h.html#a23648571a3f4cd47ef18fdb821a990a4">Persistence_close</a>)(void *handle)</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Close the persistent store referred to by the handle. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The handle pointer from a successful call to <a class="el" href="_m_q_t_t_client_persistence_8h.html#a3c418c1cb963a76d9fae5c3219eeb8ce" title="Initialize the persistent store.">Persistence_open()</a>. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>Return 0 if the function completes successfully, otherwise return <a class="el" href="_m_q_t_t_client_persistence_8h.html#ab716e21e53c84a5ad62aa962a2a8f7db">MQTTCLIENT_PERSISTENCE_ERROR</a>. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a0b95acfdfff547e3a539f229b1cf6e41"></a><!-- doxytag: member="MQTTClientPersistence.h::Persistence_put" ref="a0b95acfdfff547e3a539f229b1cf6e41" args=")(void *handle, char *key, int bufcount, char *buffers[], int buflens[])" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef int(* <a class="el" href="_m_q_t_t_client_persistence_8h.html#a0b95acfdfff547e3a539f229b1cf6e41">Persistence_put</a>)(void *handle, char *key, int bufcount, char *buffers[], int buflens[])</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Put the specified data into the persistent store. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The handle pointer from a successful call to <a class="el" href="_m_q_t_t_client_persistence_8h.html#a3c418c1cb963a76d9fae5c3219eeb8ce" title="Initialize the persistent store.">Persistence_open()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>A string used as the key for the data to be put in the store. The key is later used to retrieve data from the store with <a class="el" href="_m_q_t_t_client_persistence_8h.html#a4fd91e00c8fc2ddff4b4d54e9c5a1d48" title="Retrieve the specified data from the persistent store.">Persistence_get()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>bufcount</em>&nbsp;</td><td>The number of buffers to write to the persistence store. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>buffers</em>&nbsp;</td><td>An array of pointers to the data buffers associated with this <em>key</em>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>buflens</em>&nbsp;</td><td>An array of lengths of the data buffers. <em>buflen[n]</em> gives the length of <em>buffer[n]</em>. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>Return 0 if the function completes successfully, otherwise return <a class="el" href="_m_q_t_t_client_persistence_8h.html#ab716e21e53c84a5ad62aa962a2a8f7db">MQTTCLIENT_PERSISTENCE_ERROR</a>. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a4fd91e00c8fc2ddff4b4d54e9c5a1d48"></a><!-- doxytag: member="MQTTClientPersistence.h::Persistence_get" ref="a4fd91e00c8fc2ddff4b4d54e9c5a1d48" args=")(void *handle, char *key, char **buffer, int *buflen)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef int(* <a class="el" href="_m_q_t_t_client_persistence_8h.html#a4fd91e00c8fc2ddff4b4d54e9c5a1d48">Persistence_get</a>)(void *handle, char *key, char **buffer, int *buflen)</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Retrieve the specified data from the persistent store. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The handle pointer from a successful call to <a class="el" href="_m_q_t_t_client_persistence_8h.html#a3c418c1cb963a76d9fae5c3219eeb8ce" title="Initialize the persistent store.">Persistence_open()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>A string that is the key for the data to be retrieved. This is the same key used to save the data to the store with <a class="el" href="_m_q_t_t_client_persistence_8h.html#a0b95acfdfff547e3a539f229b1cf6e41" title="Put the specified data into the persistent store.">Persistence_put()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>buffer</em>&nbsp;</td><td>The address of a pointer to a buffer. This function sets the pointer to point at the retrieved data, if successful. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>buflen</em>&nbsp;</td><td>The address of an int that is set to the length of <em>buffer</em> by this function if successful. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>Return 0 if the function completes successfully, otherwise return <a class="el" href="_m_q_t_t_client_persistence_8h.html#ab716e21e53c84a5ad62aa962a2a8f7db">MQTTCLIENT_PERSISTENCE_ERROR</a>. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="adfeea3989b64d626003086636f6585de"></a><!-- doxytag: member="MQTTClientPersistence.h::Persistence_remove" ref="adfeea3989b64d626003086636f6585de" args=")(void *handle, char *key)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef int(* <a class="el" href="_m_q_t_t_client_persistence_8h.html#adfeea3989b64d626003086636f6585de">Persistence_remove</a>)(void *handle, char *key)</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Remove the data for the specified key from the store. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The handle pointer from a successful call to <a class="el" href="_m_q_t_t_client_persistence_8h.html#a3c418c1cb963a76d9fae5c3219eeb8ce" title="Initialize the persistent store.">Persistence_open()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>A string that is the key for the data to be removed from the store. This is the same key used to save the data to the store with <a class="el" href="_m_q_t_t_client_persistence_8h.html#a0b95acfdfff547e3a539f229b1cf6e41" title="Put the specified data into the persistent store.">Persistence_put()</a>. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>Return 0 if the function completes successfully, otherwise return <a class="el" href="_m_q_t_t_client_persistence_8h.html#ab716e21e53c84a5ad62aa962a2a8f7db">MQTTCLIENT_PERSISTENCE_ERROR</a>. </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ad6295da2bee2a65722a9e0c1e12474c2"></a><!-- doxytag: member="MQTTClientPersistence.h::Persistence_keys" ref="ad6295da2bee2a65722a9e0c1e12474c2" args=")(void *handle, char ***keys, int *nkeys)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef int(* <a class="el" href="_m_q_t_t_client_persistence_8h.html#ad6295da2bee2a65722a9e0c1e12474c2">Persistence_keys</a>)(void *handle, char ***keys, int *nkeys)</td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Returns the keys in this persistent data store. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The handle pointer from a successful call to <a class="el" href="_m_q_t_t_client_persistence_8h.html#a3c418c1cb963a76d9fae5c3219eeb8ce" title="Initialize the persistent store.">Persistence_open()</a>. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>keys</em>&nbsp;</td><td>The address of a pointer to pointers to strings. Assuming successful execution, this function allocates memory to hold the returned keys (st