Files
aqhomecontrol/aqhome/msg/mqtt/m_mqtt_connect.h
2025-03-08 01:03:22 +01:00

41 lines
1.4 KiB
C

/****************************************************************************
* This file is part of the project AqHome.
* AqHome (c) by 2025 Martin Preuss, all rights reserved.
*
* The license for this file can be found in the file COPYING which you
* should have received along with this file.
****************************************************************************/
#ifndef AQH_M_MQTT_CONNECT_H
#define AQH_M_MQTT_CONNECT_H
#include <aqhome/api.h>
#include <aqhome/ipc2/message.h>
#include <gwenhywfar/buffer.h>
#define AQH_MQTTMSG_CONNECT_FLAGS_USERNAME 0x80u
#define AQH_MQTTMSG_CONNECT_FLAGS_PASSWD 0x40u
#define AQH_MQTTMSG_CONNECT_FLAGS_WILL_RETAIN 0x20u
#define AQH_MQTTMSG_CONNECT_FLAGS_WILL_QOS2 0x10u
#define AQH_MQTTMSG_CONNECT_FLAGS_WILL_QOS1 0x08u
#define AQH_MQTTMSG_CONNECT_FLAGS_WILL_FLAG 0x04u
#define AQH_MQTTMSG_CONNECT_FLAGS_CLEAN_SESSION 0x01u
AQHOME_API AQH_MESSAGE *AQH_MqttMessageConnect_new(const char *protoName,
uint8_t protoLevel,
uint8_t connectFlags,
uint16_t keepAliveTime,
const char *clientId,
const char *userName,
const char *password);
#endif