52 lines
1.3 KiB
C
52 lines
1.3 KiB
C
/****************************************************************************
|
|
* This file is part of the project Gwenhywfar.
|
|
* Gwenhywfar (c) by 2023 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_ENDPOINT_MQTT_H
|
|
#define AQH_ENDPOINT_MQTT_H
|
|
|
|
|
|
#include <aqhome/api.h>
|
|
|
|
#include <gwenhywfar/endpoint.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
/**
|
|
* Extends the given endpoint to support MQTT messages. It expects the function GWEN_MsgIoEndpoint_Extend() to have been called
|
|
* beforehand.
|
|
*/
|
|
AQHOME_API void AQH_MqttEndpoint_Extend(GWEN_MSG_ENDPOINT *ep);
|
|
|
|
|
|
AQHOME_API const char *AQH_MqttEndpoint_GetClientId(const GWEN_MSG_ENDPOINT *ep);
|
|
AQHOME_API void AQH_MqttEndpoint_SetClientId(GWEN_MSG_ENDPOINT *ep, const char *s);
|
|
|
|
AQHOME_API uint16_t AQH_MqttEndpoint_GetNextPacketId(const GWEN_MSG_ENDPOINT *ep);
|
|
|
|
AQHOME_API uint16_t AQH_MqttEndpoint_GetKeepAliveTime(const GWEN_MSG_ENDPOINT *ep);
|
|
AQHOME_API void AQH_MqttEndpoint_SetKeepAliveTime(GWEN_MSG_ENDPOINT *ep, uint16_t i);
|
|
|
|
|
|
|
|
AQHOME_API GWEN_MSG *AQH_MqttEndpoint_CreateMsgConnect(GWEN_MSG_ENDPOINT *ep);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|