| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <title>mqttpp: mqtt::itoken Class Reference</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <link href="doxygen.css" rel="stylesheet" type="text/css"/> |
| </head> |
| <body> |
| <!-- Generated by Doxygen 1.6.1 --> |
| <div class="navigation" id="top"> |
| <div class="tabs"> |
| <ul> |
| <li><a href="main.html"><span>Main Page</span></a></li> |
| <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
| <li><a href="files.html"><span>Files</span></a></li> |
| </ul> |
| </div> |
| <div class="tabs"> |
| <ul> |
| <li><a href="annotated.html"><span>Class List</span></a></li> |
| <li><a href="classes.html"><span>Class Index</span></a></li> |
| <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
| <li><a href="functions.html"><span>Class Members</span></a></li> |
| </ul> |
| </div> |
| <div class="navpath"><b>mqtt</b>::<a class="el" href="classmqtt_1_1itoken.html">itoken</a> |
| </div> |
| </div> |
| <div class="contents"> |
| <h1>mqtt::itoken Class Reference</h1><!-- doxytag: class="mqtt::itoken" --> |
| <p>Provides a mechanism for tracking the completion of an asynchronous task. |
| <a href="#_details">More...</a></p> |
| |
| <p><code>#include <<a class="el" href="token_8h_source.html">token.h</a>></code></p> |
| <div class="dynheader"> |
| Inheritance diagram for mqtt::itoken:</div> |
| <div class="dynsection"> |
| <div class="center"> |
| <img src="classmqtt_1_1itoken.gif" usemap="#mqtt::itoken_map" alt=""/> |
| <map id="mqtt::itoken_map" name="mqtt::itoken_map"> |
| <area href="classmqtt_1_1idelivery__token.html" alt="mqtt::idelivery_token" shape="rect" coords="0,56,125,80"/> |
| <area href="classmqtt_1_1token.html" alt="mqtt::token" shape="rect" coords="135,56,260,80"/> |
| <area href="classmqtt_1_1delivery__token.html" alt="mqtt::delivery_token" shape="rect" coords="0,112,125,136"/> |
| <area href="classmqtt_1_1delivery__token.html" alt="mqtt::delivery_token" shape="rect" coords="135,112,260,136"/> |
| </map> |
| </div> |
| </div> |
| |
| <p><a href="classmqtt_1_1itoken-members.html">List of all members.</a></p> |
| <table border="0" cellpadding="0" cellspacing="0"> |
| <tr><td colspan="2"><h2>Public Types</h2></td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2ed3a17409417a1a608b77b4cc99c1cb"></a><!-- doxytag: member="mqtt::itoken::ptr_t" ref="a2ed3a17409417a1a608b77b4cc99c1cb" args="" --> |
| typedef std::shared_ptr< <a class="el" href="classmqtt_1_1itoken.html">itoken</a> > </td><td class="memItemRight" valign="bottom"><b>ptr_t</b></td></tr> |
| <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abcf07d886eaea295702ae44ae32c9110"></a><!-- doxytag: member="mqtt::itoken::~itoken" ref="abcf07d886eaea295702ae44ae32c9110" args="()" --> |
| virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1itoken.html#abcf07d886eaea295702ae44ae32c9110">~itoken</a> ()</td></tr> |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual base destructor. <br/></td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1itoken.html#afb9395dcf53aa306368b7dfa7e7000a5">get_action_callback</a> () const =0</td></tr> |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the async listener for this <a class="el" href="classmqtt_1_1token.html" title="Provides a mechanism for tracking the completion of an asynchronous action.">token</a>. <a href="#afb9395dcf53aa306368b7dfa7e7000a5"></a><br/></td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classmqtt_1_1iasync__client.html">iasync_client</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1itoken.html#a458008aba7949bdfe21c044b24c49721">get_client</a> () const =0</td></tr> |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the MQTT <a class="el" href="classmqtt_1_1client.html" title="Lightweight client for talking to an MQTT server using methods that block until an...">client</a> that is responsible for processing the asynchronous action. <a href="#a458008aba7949bdfe21c044b24c49721"></a><br/></td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1itoken.html#a4bfa1320ee0000d0a54fd40ceed24658">get_message_id</a> () const =0</td></tr> |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns an <a class="el" href="classmqtt_1_1exception.html" title="Provides a mechanism for tracking the completion of an asynchronous action.">exception</a> providing more detail if an operation failed. <a href="#a4bfa1320ee0000d0a54fd40ceed24658"></a><br/></td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">virtual const std::vector<br class="typebreak"/> |
| < std::string > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1itoken.html#a393ebf9a6d82d1a093273c9a04a41979">get_topics</a> () const =0</td></tr> |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the <a class="el" href="classmqtt_1_1topic.html" title="Represents a topic destination, used for publish/subscribe messaging.">topic</a> string(s) for the action being tracked by this <a class="el" href="classmqtt_1_1token.html" title="Provides a mechanism for tracking the completion of an asynchronous action.">token</a>. <a href="#a393ebf9a6d82d1a093273c9a04a41979"></a><br/></td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">virtual void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1itoken.html#a01017690ed6efb016700813495c05079">get_user_context</a> () const =0</td></tr> |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve the context associated with an action. <a href="#a01017690ed6efb016700813495c05079"></a><br/></td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1itoken.html#a99af88ac59f2ed5cb696b4566f58d6d2">is_complete</a> () const =0</td></tr> |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether or not the action has finished. <a href="#a99af88ac59f2ed5cb696b4566f58d6d2"></a><br/></td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1itoken.html#aef0ed9396b89b2159a4a103a492fbc2e">set_action_callback</a> (<a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &listener)=0</td></tr> |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Register a listener to be notified when an action completes. <a href="#aef0ed9396b89b2159a4a103a492fbc2e"></a><br/></td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1itoken.html#a777df44320b48c494c3821f314d70f7a">set_user_context</a> (void *userContext)=0</td></tr> |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Store some context associated with an action. <a href="#a777df44320b48c494c3821f314d70f7a"></a><br/></td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a18517a2721ab65fb28d2b3fe6475fa2b"></a><!-- doxytag: member="mqtt::itoken::wait_for_completion" ref="a18517a2721ab65fb28d2b3fe6475fa2b" args="()=0" --> |
| virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1itoken.html#a18517a2721ab65fb28d2b3fe6475fa2b">wait_for_completion</a> ()=0</td></tr> |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Blocks the current thread until the action this <a class="el" href="classmqtt_1_1token.html" title="Provides a mechanism for tracking the completion of an asynchronous action.">token</a> is associated with has completed. <br/></td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1itoken.html#ae863704f781abb042774ecfb2f70bae0">wait_for_completion</a> (long timeout)=0</td></tr> |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Blocks the current thread until the action this <a class="el" href="classmqtt_1_1token.html" title="Provides a mechanism for tracking the completion of an asynchronous action.">token</a> is associated with has completed. <a href="#ae863704f781abb042774ecfb2f70bae0"></a><br/></td></tr> |
| </table> |
| <hr/><a name="_details"></a><h2>Detailed Description</h2> |
| <p>Provides a mechanism for tracking the completion of an asynchronous task. </p> |
| <hr/><h2>Member Function Documentation</h2> |
| <a class="anchor" id="afb9395dcf53aa306368b7dfa7e7000a5"></a><!-- doxytag: member="mqtt::itoken::get_action_callback" ref="afb9395dcf53aa306368b7dfa7e7000a5" args="() const =0" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a>* mqtt::itoken::get_action_callback </td> |
| <td>(</td> |
| <td class="paramname"></td> |
| <td> ) </td> |
| <td> const<code> [pure virtual]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p>Return the async listener for this <a class="el" href="classmqtt_1_1token.html" title="Provides a mechanism for tracking the completion of an asynchronous action.">token</a>. </p> |
| <dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="classmqtt_1_1iaction__listener.html" title="Provides a mechanism for tracking the completion of an asynchronous action.">iaction_listener</a> </dd></dl> |
| |
| <p>Implemented in <a class="el" href="classmqtt_1_1token.html#aad3c92d4e1be659101e118fc11daf963">mqtt::token</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a458008aba7949bdfe21c044b24c49721"></a><!-- doxytag: member="mqtt::itoken::get_client" ref="a458008aba7949bdfe21c044b24c49721" args="() const =0" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual <a class="el" href="classmqtt_1_1iasync__client.html">iasync_client</a>* mqtt::itoken::get_client </td> |
| <td>(</td> |
| <td class="paramname"></td> |
| <td> ) </td> |
| <td> const<code> [pure virtual]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p>Returns the MQTT <a class="el" href="classmqtt_1_1client.html" title="Lightweight client for talking to an MQTT server using methods that block until an...">client</a> that is responsible for processing the asynchronous action. </p> |
| <dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="classmqtt_1_1iasync__client.html" title="Enables an application to communicate with an MQTT server using non-blocking methods...">iasync_client</a> </dd></dl> |
| |
| <p>Implemented in <a class="el" href="classmqtt_1_1token.html#ab23933fa6d8db2501c976b79df91d1cb">mqtt::token</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a4bfa1320ee0000d0a54fd40ceed24658"></a><!-- doxytag: member="mqtt::itoken::get_message_id" ref="a4bfa1320ee0000d0a54fd40ceed24658" args="() const =0" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual int mqtt::itoken::get_message_id </td> |
| <td>(</td> |
| <td class="paramname"></td> |
| <td> ) </td> |
| <td> const<code> [pure virtual]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p>Returns an <a class="el" href="classmqtt_1_1exception.html" title="Provides a mechanism for tracking the completion of an asynchronous action.">exception</a> providing more detail if an operation failed. </p> |
| <dl class="return"><dt><b>Returns:</b></dt><dd>Exception Returns the <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> ID of the <a class="el" href="classmqtt_1_1message.html" title="An MQTT message holds the application payload and options specifying how the message...">message</a> that is associated with the <a class="el" href="classmqtt_1_1token.html" title="Provides a mechanism for tracking the completion of an asynchronous action.">token</a>. </dd> |
| <dd> |
| int </dd></dl> |
| |
| <p>Implemented in <a class="el" href="classmqtt_1_1token.html#a5bab8b8df3d9f04e75e9c57a6c36e93c">mqtt::token</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a393ebf9a6d82d1a093273c9a04a41979"></a><!-- doxytag: member="mqtt::itoken::get_topics" ref="a393ebf9a6d82d1a093273c9a04a41979" args="() const =0" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual const std::vector<std::string>& mqtt::itoken::get_topics </td> |
| <td>(</td> |
| <td class="paramname"></td> |
| <td> ) </td> |
| <td> const<code> [pure virtual]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p>Returns the <a class="el" href="classmqtt_1_1topic.html" title="Represents a topic destination, used for publish/subscribe messaging.">topic</a> string(s) for the action being tracked by this <a class="el" href="classmqtt_1_1token.html" title="Provides a mechanism for tracking the completion of an asynchronous action.">token</a>. </p> |
| <dl class="return"><dt><b>Returns:</b></dt><dd>std::vector<std::string> </dd></dl> |
| |
| <p>Implemented in <a class="el" href="classmqtt_1_1token.html#a55d8798a9def10c8f714953b696ad3e2">mqtt::token</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a01017690ed6efb016700813495c05079"></a><!-- doxytag: member="mqtt::itoken::get_user_context" ref="a01017690ed6efb016700813495c05079" args="() const =0" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual void* mqtt::itoken::get_user_context </td> |
| <td>(</td> |
| <td class="paramname"></td> |
| <td> ) </td> |
| <td> const<code> [pure virtual]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p>Retrieve the context associated with an action. </p> |
| <dl class="return"><dt><b>Returns:</b></dt><dd>void* </dd></dl> |
| |
| <p>Implemented in <a class="el" href="classmqtt_1_1token.html#a8fb4c13db17d0861b17cbe220b0696de">mqtt::token</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a99af88ac59f2ed5cb696b4566f58d6d2"></a><!-- doxytag: member="mqtt::itoken::is_complete" ref="a99af88ac59f2ed5cb696b4566f58d6d2" args="() const =0" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual bool mqtt::itoken::is_complete </td> |
| <td>(</td> |
| <td class="paramname"></td> |
| <td> ) </td> |
| <td> const<code> [pure virtual]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p>Returns whether or not the action has finished. </p> |
| <dl class="return"><dt><b>Returns:</b></dt><dd>bool </dd></dl> |
| |
| <p>Implemented in <a class="el" href="classmqtt_1_1token.html#a57c8c9e1f7c404a023022eba9dbcc0c2">mqtt::token</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="aef0ed9396b89b2159a4a103a492fbc2e"></a><!-- doxytag: member="mqtt::itoken::set_action_callback" ref="aef0ed9396b89b2159a4a103a492fbc2e" args="(iaction_listener &listener)=0" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual void mqtt::itoken::set_action_callback </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> & </td> |
| <td class="paramname"> <em>listener</em></td> |
| <td> ) </td> |
| <td><code> [pure virtual]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p>Register a listener to be notified when an action completes. </p> |
| <dl><dt><b>Parameters:</b></dt><dd> |
| <table border="0" cellspacing="2" cellpadding="0"> |
| <tr><td valign="top"></td><td valign="top"><em>listener</em> </td><td></td></tr> |
| </table> |
| </dd> |
| </dl> |
| |
| <p>Implemented in <a class="el" href="classmqtt_1_1token.html#ad916dc92354e24c17969334d84a119d6">mqtt::token</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a777df44320b48c494c3821f314d70f7a"></a><!-- doxytag: member="mqtt::itoken::set_user_context" ref="a777df44320b48c494c3821f314d70f7a" args="(void *userContext)=0" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual void mqtt::itoken::set_user_context </td> |
| <td>(</td> |
| <td class="paramtype">void * </td> |
| <td class="paramname"> <em>userContext</em></td> |
| <td> ) </td> |
| <td><code> [pure virtual]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p>Store some context associated with an action. </p> |
| <dl><dt><b>Parameters:</b></dt><dd> |
| <table border="0" cellspacing="2" cellpadding="0"> |
| <tr><td valign="top"></td><td valign="top"><em>userContext</em> </td><td></td></tr> |
| </table> |
| </dd> |
| </dl> |
| |
| <p>Implemented in <a class="el" href="classmqtt_1_1token.html#a5faa55b04ee75f18df7b019bf443b1a0">mqtt::token</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ae863704f781abb042774ecfb2f70bae0"></a><!-- doxytag: member="mqtt::itoken::wait_for_completion" ref="ae863704f781abb042774ecfb2f70bae0" args="(long timeout)=0" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual void mqtt::itoken::wait_for_completion </td> |
| <td>(</td> |
| <td class="paramtype">long </td> |
| <td class="paramname"> <em>timeout</em></td> |
| <td> ) </td> |
| <td><code> [pure virtual]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p>Blocks the current thread until the action this <a class="el" href="classmqtt_1_1token.html" title="Provides a mechanism for tracking the completion of an asynchronous action.">token</a> is associated with has completed. </p> |
| <dl><dt><b>Parameters:</b></dt><dd> |
| <table border="0" cellspacing="2" cellpadding="0"> |
| <tr><td valign="top"></td><td valign="top"><em>timeout</em> </td><td></td></tr> |
| </table> |
| </dd> |
| </dl> |
| |
| <p>Implemented in <a class="el" href="classmqtt_1_1token.html#a9d9f139a8aa0b197db6ef810f5c88684">mqtt::token</a>.</p> |
| |
| </div> |
| </div> |
| <hr/>The documentation for this class was generated from the following file:<ul> |
| <li>mqtt/<a class="el" href="token_8h_source.html">token.h</a></li> |
| </ul> |
| </div> |
| <hr size="1"/><address style="text-align: right;"><small>Generated on 30 Apr 2014 for mqttpp by |
| <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> |
| </body> |
| </html> |