8 #ifndef COMPONENTS_AWS_H_
9 #define COMPONENTS_AWS_H_
10 #include "sdkconfig.h"
11 #ifdef CONFIG_AWS_IOT_SDK
13 #include <aws_iot_mqtt_client_interface.h>
14 #include <aws_iot_mqtt_client.h>
25 void connect(std::string clientId);
27 static std::string errorToString(IoT_Error_t err);
28 void init(std::string host=CONFIG_AWS_IOT_MQTT_HOST, uint16_t port=CONFIG_AWS_IOT_MQTT_PORT);
29 void publish(std::string topic, std::string payload, QoS qos = QOS0);
30 void subscribe(std::string topic);
31 void unsubscribe(std::string topic);
34 AWS_IoT_Client m_client;
36 #endif // CONFIG_AWS_IOT_SDK