
---@class mqtt_protocol5*
---@field properties table<string|integer, string|integer> MQTT v5 Property name and property ID mapping.
---@field suback_rc table<integer, string> SUBACK Reason code description.
---@field unsuback_rc table<integer, string> UNSUBACK Reason code description.
---@field disconnect_rc table<integer, string> DISCONNECT Reason code description.
---@field suback_packet_mt table SUBACK Package metatable.
---@field unsuback_packet_mt table UNSUBACK Package metatable.
---@field disconnect_packet_mt table DISCONNECT Package metatable.
---@type mqtt_protocol5*
local M = {}

M.properties = nil
M.suback_rc = nil
M.unsuback_rc = nil
M.disconnect_rc = nil
M.suback_packet_mt = nil
M.unsuback_packet_mt = nil
M.disconnect_packet_mt = nil

--- Create control packages as per MQTT v5.0.
---@param args mqtt_packet* package parameters.
---@return mqtt_combined_packet* packet Sendable package.
function M.make_packet(args) end

--- Parse control packets as per MQTT v5.0.
---@param read_func mqtt_read_func Read function.
---@return mqtt_packet*|false packet
---@return string? errMsg
function M.parse_packet(read_func) end

return M
