net/mqtt: Add the reception callback
The reception cb: internal use only cb that will be set according to the application profile: PUBLISHER, SUBSCRIBER, PUBLISHER & SUBSCRIBER or SERVER. Change-Id: Ib36b0686deb9220e507f9e468aae1b1191c35d31 Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit is contained in:
parent
8619d9d625
commit
bf88fe5118
|
@ -24,12 +24,12 @@
|
|||
* @brief mqtt_app MQTT application type
|
||||
*/
|
||||
enum mqtt_app {
|
||||
/** Publisher and Subscriber application */
|
||||
MQTT_APP_PUBLISHER_SUBSCRIBER,
|
||||
/** Publisher only application */
|
||||
MQTT_APP_PUBLISHER,
|
||||
/** Subscriber only application */
|
||||
MQTT_APP_SUBSCRIBER,
|
||||
/** Publisher and Subscriber application */
|
||||
MQTT_APP_PUBLISHER_SUBSCRIBER,
|
||||
/** MQTT Server */
|
||||
MQTT_APP_SERVER
|
||||
};
|
||||
|
@ -183,7 +183,10 @@ struct mqtt_ctx {
|
|||
/** Data passed to the #unsubscribe callback */
|
||||
void *unsubscribe_data;
|
||||
|
||||
/** Application type */
|
||||
/* Internal use only */
|
||||
int (*rcv)(struct mqtt_ctx *, struct net_buf *);
|
||||
|
||||
/** Application type, see: enum mqtt_app */
|
||||
uint8_t app_type;
|
||||
|
||||
/* Clean session is also part of the MQTT CONNECT msg, however app
|
||||
|
|
Loading…
Reference in a new issue