@@ -80,8 +80,10 @@ enum mqtt_evt_type {
80
80
/** Ping Response from server. */
81
81
MQTT_EVT_PINGRESP ,
82
82
83
+ #if defined(CONFIG_MQTT_VERSION_5_0 ) || defined(__DOXYGEN__ )
83
84
/** Authentication packet received from server. MQTT 5.0 only. */
84
85
MQTT_EVT_AUTH ,
86
+ #endif /* CONFIG_MQTT_VERSION_5_0 */
85
87
};
86
88
87
89
/** @brief MQTT version protocol level. */
@@ -244,11 +246,13 @@ struct mqtt_binstr {
244
246
245
247
/** @brief Abstracts aliased topic. */
246
248
struct mqtt_topic_alias {
249
+ #if defined(CONFIG_MQTT_VERSION_5_0 ) || defined(__DOXYGEN__ )
247
250
/** UTF-8 encoded topic name. */
248
251
uint8_t topic_buf [CONFIG_MQTT_TOPIC_ALIAS_STRING_MAX ];
249
252
250
253
/** Topic name size. */
251
254
uint16_t topic_size ;
255
+ #endif /* CONFIG_MQTT_VERSION_5_0 */
252
256
};
253
257
254
258
/** @brief Abstracts MQTT UTF-8 encoded topic that can be subscribed
@@ -388,6 +392,7 @@ struct mqtt_connack_param {
388
392
389
393
/** @brief Common MQTT 5.0 properties shared across all ack-type messages. */
390
394
struct mqtt_common_ack_properties {
395
+ #if defined(CONFIG_MQTT_VERSION_5_0 ) || defined(__DOXYGEN__ )
391
396
/** MQTT 5.0, chapter 3.4.2.2.3 User Property. */
392
397
struct mqtt_utf8_pair user_prop [CONFIG_MQTT_USER_PROPERTIES_MAX ];
393
398
@@ -401,6 +406,7 @@ struct mqtt_common_ack_properties {
401
406
/** User Property property was present. */
402
407
bool has_user_prop ;
403
408
} rx ;
409
+ #endif /* CONFIG_MQTT_VERSION_5_0 */
404
410
};
405
411
406
412
/** @brief Parameters for MQTT publish acknowledgment (PUBACK). */
@@ -621,8 +627,9 @@ struct mqtt_disconnect_param {
621
627
#endif /* CONFIG_MQTT_VERSION_5_0 */
622
628
};
623
629
624
- #if defined( CONFIG_MQTT_VERSION_5_0 ) || defined( __DOXYGEN__ )
630
+ /** @brief Parameters for auth message. */
625
631
struct mqtt_auth_param {
632
+ #if defined(CONFIG_MQTT_VERSION_5_0 ) || defined(__DOXYGEN__ )
626
633
/* MQTT 5.0, chapter 3.15.2.1 Authenticate Reason Code */
627
634
enum mqtt_auth_reason_code reason_code ;
628
635
@@ -651,8 +658,8 @@ struct mqtt_auth_param {
651
658
bool has_user_prop ;
652
659
} rx ;
653
660
} prop ;
654
- };
655
661
#endif /* CONFIG_MQTT_VERSION_5_0 */
662
+ };
656
663
657
664
/**
658
665
* @brief Defines event parameters notified along with asynchronous events
0 commit comments