Paho C++  1.0
The Paho MQTT C++ Client Library
 All Classes Files Functions Variables Typedefs Friends
iaction_listener.h
Go to the documentation of this file.
1 
8 /*******************************************************************************
9  * Copyright (c) 2013-2016 Frank Pagliughi <fpagliughi@mindspring.com>
10  *
11  * All rights reserved. This program and the accompanying materials
12  * are made available under the terms of the Eclipse Public License v1.0
13  * and Eclipse Distribution License v1.0 which accompany this distribution.
14  *
15  * The Eclipse Public License is available at
16  * http://www.eclipse.org/legal/epl-v10.html
17  * and the Eclipse Distribution License is available at
18  * http://www.eclipse.org/org/documents/edl-v10.php.
19  *
20  * Contributors:
21  * Frank Pagliughi - initial implementation and documentation
22  *******************************************************************************/
23 
24 #ifndef __mqtt_iaction_listener_h
25 #define __mqtt_iaction_listener_h
26 
27 #include "MQTTAsync.h"
28 #include "mqtt/types.h"
29 #include <vector>
30 
31 namespace mqtt {
32 
33 class token;
34 
36 
49 {
50 public:
52  using ptr_t = std::shared_ptr<iaction_listener>;
54  using const_ptr_t = std::shared_ptr<const iaction_listener>;
55 
59  virtual ~iaction_listener() {}
64  virtual void on_failure(const token& asyncActionToken) =0;
69  virtual void on_success(const token& asyncActionToken) =0;
70 };
71 
73 using iaction_listener_ptr = iaction_listener::ptr_t;
74 
76 using const_iaction_listener_ptr = iaction_listener::const_ptr_t;
77 
78 
80 // end namespace mqtt
81 }
82 
83 #endif // __mqtt_iaction_listener_h
84 
Basic types and type conversions for the Paho MQTT C++ library.
Provides a mechanism for tracking the completion of an asynchronous action.
Definition: iaction_listener.h:48
virtual ~iaction_listener()
Virtual base destructor.
Definition: iaction_listener.h:59
virtual void on_failure(const token &asyncActionToken)=0
This method is invoked when an action fails.
std::shared_ptr< iaction_listener > ptr_t
Smart/shared pointer to an object of this class.
Definition: iaction_listener.h:52
std::shared_ptr< const iaction_listener > const_ptr_t
Smart/shared pointer to a const object of this class.
Definition: iaction_listener.h:54
virtual void on_success(const token &asyncActionToken)=0
This method is invoked when an action has completed successfully.
Provides a mechanism for tracking the completion of an asynchronous action.
Definition: token.h:49