Loading...
Searching...
No Matches
callback.h
Go to the documentation of this file.
/*******************************************************************************
* Copyright (c) 2013-2019 Frank Pagliughi <fpagliughi@mindspring.com>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v20.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Frank Pagliughi - initial implementation and documentation
*******************************************************************************/
#ifndef __mqtt_callback_h
#define __mqtt_callback_h
#include <memory>
#include <vector>
#include "MQTTAsync.h"
#include "mqtt/delivery_token.h"
#include "mqtt/types.h"
namespace mqtt {
class callback
{
public:
using ptr_t = std::shared_ptr<callback>;
using const_ptr_t = std::shared_ptr<const callback>;
virtual ~callback() {}
virtual void connected(const string& /*cause*/) {}
virtual void connection_lost(const string& /*cause*/) {}
virtual void message_arrived(const_message_ptr /*msg*/) {}
virtual void delivery_complete(delivery_token_ptr /*tok*/) {}
};
using callback_ptr = callback::ptr_t;
using const_callback_ptr = callback::const_ptr_t;
} // namespace mqtt
#endif // __mqtt_callback_h
mqtt::callback
Definition callback.h:43
mqtt::callback::const_ptr_t
std::shared_ptr< const callback > const_ptr_t
Definition callback.h:48
mqtt::callback::ptr_t
std::shared_ptr< callback > ptr_t
Definition callback.h:46
mqtt::callback::~callback
virtual ~callback()
Definition callback.h:53
mqtt::callback::connected
virtual void connected(const string &)
Definition callback.h:61
mqtt::callback::connection_lost
virtual void connection_lost(const string &)
Definition callback.h:65
mqtt::callback::delivery_complete
virtual void delivery_complete(delivery_token_ptr)
Definition callback.h:74
mqtt::callback::message_arrived
virtual void message_arrived(const_message_ptr)
Definition callback.h:69
delivery_token.h
mqtt
Definition async_client.h:60
mqtt::const_callback_ptr
callback::const_ptr_t const_callback_ptr
Definition callback.h:81
mqtt::callback_ptr
callback::ptr_t callback_ptr
Definition callback.h:78
mqtt::const_message_ptr
message::const_ptr_t const_message_ptr
Definition message.h:372
mqtt::delivery_token_ptr
delivery_token::ptr_t delivery_token_ptr
Definition delivery_token.h:127
types.h