feat(core): mqtt client subscription support wildcard

This commit is contained in:
eeff
2024-05-06 00:19:00 +08:00
parent 19c44a0735
commit ea8369ae98
4 changed files with 265 additions and 3 deletions
+14
View File
@@ -53,6 +53,20 @@ typedef enum {
typedef struct neu_mqtt_client_s neu_mqtt_client_t;
/**
* Check that `topic_filter` is a valid MQTT topic filter.
*/
bool neu_mqtt_topic_filter_is_valid(const char *topic_filter);
/**
* Check the given `topic_filter` matches the given `topic_name`.
*
* @Precondition `topic_filter` must be a valid MQTT topic filter.
* @Precondition `topic_name` must be a valid MQTT topic name.
*/
bool neu_mqtt_topic_filter_is_match(const char *topic_filter,
const char *topic_name);
typedef void (*neu_mqtt_client_connection_cb_t)(void *data);
typedef void (*neu_mqtt_client_publish_cb_t)(int errcode, neu_mqtt_qos_e qos,
char *topic, uint8_t *payload,