SNode.C
Loading...
Searching...
No Matches
Pubrec.h
Go to the documentation of this file.
1/*
2 * SNode.C - A Slim Toolkit for Network Communication
3 * Copyright (C) 2020, 2021, 2022 Volker Christian <me@vchrist.at>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19/*
20 * MIT License
21 *
22 * Permission is hereby granted, free of charge, to any person obtaining a copy
23 * of this software and associated documentation files (the "Software"), to deal
24 * in the Software without restriction, including without limitation the rights
25 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26 * copies of the Software, and to permit persons to whom the Software is
27 * furnished to do so, subject to the following conditions:
28 *
29 * The above copyright notice and this permission notice shall be included in
30 * all copies or substantial portions of the Software.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
38 * THE SOFTWARE.
39 */
40
41#ifndef IOT_MQTT_SERVER_PACKETS_DESERIALIZER_PUBREC_H
42#define IOT_MQTT_SERVER_PACKETS_DESERIALIZER_PUBREC_H
43
44#include "iot/mqtt/packets/Pubrec.h" // IWYU pragma: export
45#include "iot/mqtt/server/ControlPacketDeserializer.h" // IWYU pragma: export
46
47#ifndef DOXYGEN_SHOULD_SKIP_THIS
48
49#include <cstddef>
50#include <cstdint>
51
52#endif // DOXYGEN_SHOUĂ–D_SKIP_THIS
53
54namespace iot::mqtt::server::packets {
55
56 class Pubrec
57 : public iot::mqtt::packets::Pubrec
58 , public iot::mqtt::server::ControlPacketDeserializer {
59 public:
60 Pubrec(uint32_t remainingLength, uint8_t flags);
61
62 private:
63 std::size_t deserializeVP(iot::mqtt::MqttContext* mqttContext) override;
64 void deliverPacket(iot::mqtt::server::Mqtt* mqtt) override;
65 };
66
67} // namespace iot::mqtt::server::packets
68
69#endif // IOT_MQTT_SERVER_PACKETS_DESERIALIZER_PUBREC_H
void _onPubrec(const iot::mqtt::packets::Pubrec &pubrec)
Definition Mqtt.cpp:320
void printVP(const iot::mqtt::ControlPacket &packet) const
Definition Mqtt.cpp:368
iot::mqtt::types::UInt16 packetIdentifier
Definition Pubrec.h:68
std::size_t deserializeVP(iot::mqtt::MqttContext *mqttContext) override
Definition Pubrec.cpp:57
Pubrec(uint32_t remainingLength, uint8_t flags)
Definition Pubrec.cpp:52
void deliverPacket(iot::mqtt::server::Mqtt *mqtt) override
Definition Pubrec.cpp:67
virtual std::size_t deserialize(iot::mqtt::MqttContext *mqttContext)
Definition TypeBase.hpp:59
#define MQTT_PUBREC_FLAGS