PahoMqttCpp
MQTT C++ Client for POSIX and Windows
Toggle main menu visibility
Loading...
Searching...
No Matches
callback.h
Go to the documentation of this file.
1
7
8
/*******************************************************************************
9
* Copyright (c) 2013-2019 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 v2.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-v20.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_callback_h
25
#define __mqtt_callback_h
26
27
#include <memory>
28
#include <vector>
29
30
#include "MQTTAsync.h"
31
#include "
mqtt/delivery_token.h
"
32
#include "
mqtt/types.h
"
33
34
namespace
mqtt
{
35
37
42
class
callback
43
{
44
public
:
46
using
ptr_t
= std::shared_ptr<callback>;
48
using
const_ptr_t
= std::shared_ptr<const callback>;
49
53
virtual
~callback
() {}
54
61
virtual
void
connected
(
const
string
&
/*cause*/
) {}
65
virtual
void
connection_lost
(
const
string
&
/*cause*/
) {}
69
virtual
void
message_arrived
(
const_message_ptr
/*msg*/
) {}
74
virtual
void
delivery_complete
(
delivery_token_ptr
/*tok*/
) {}
75
};
76
78
using
callback_ptr
=
callback::ptr_t
;
79
81
using
const_callback_ptr
=
callback::const_ptr_t
;
82
84
}
// namespace mqtt
85
86
#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::delivery_token_ptr
delivery_token::ptr_t delivery_token_ptr
Definition
delivery_token.h:127
mqtt::const_callback_ptr
callback::const_ptr_t const_callback_ptr
Definition
callback.h:81
mqtt::const_message_ptr
message::const_ptr_t const_message_ptr
Definition
message.h:372
mqtt::callback_ptr
callback::ptr_t callback_ptr
Definition
callback.h:78
types.h
Generated on
for PahoMqttCpp by
1.17.0