/*
 * myMqtt.h
 *
 *  Created on: 25.11.2022
 *      Author: jonas
 */

#ifndef MAIN_MYMQTT_H_
#define MAIN_MYMQTT_H_

#include "platform.h"
#include <stdbool.h>

bool MyMqtt_Init(void);

void MyMqtt_Deinit(void);

void MyMqtt_Publish(const char *topic, const char *data);

void MyMqtt_Subscribe(const char *topic);

#if PL_CONFIG_USE_SHELL
  #include "McuShell.h"

  /*!
   * \brief Command line and shell handler
   * \param cmd The command to be parsed
   * \param handled If command has been recognized and handled
   * \param io I/O handler to be used
   * \return error code, otherwise ERR_OK
   */
  uint8_t MyMqtt_ParseShellCommand(const unsigned char* cmd, bool *handled, const McuShell_StdIOType *io);
#endif

#endif /* MAIN_MYMQTT_H_ */
