Add unit tests for buttons / relays; and a bunch of mocks :)

This commit is contained in:
Pim van Pelt
2017-12-20 17:32:28 +01:00
parent 1cbd2130db
commit 4b4642416f
12 changed files with 6304 additions and 3 deletions

View File

@ -2,6 +2,7 @@
#define __MGOS_MQTT_H
#include "mgos.h"
#include "mongoose/mongoose.h"
struct mg_connection;
@ -9,9 +10,14 @@ typedef void (*sub_handler_t)(struct mg_connection *nc, const char *topic,
int topic_len, const char *msg, int msg_len,
void *ud);
typedef void (*mqtt_event_handler_t)(struct mg_connection *nc, int ev,
void *ev_data, void *user_data);
void mgos_mqtt_pub(char *t, char *m, int m_len, int flags, bool persist);
void mgos_mqtt_sub(char *t, sub_handler_t cb, void *ud);
void mgos_mqtt_inject(char *topic, char *msg);
void mgos_mqtt_add_global_handler(mqtt_event_handler_t handler, void *ud);
#endif // __MGOS_MQTT_H