espressif / esp-mqtt

ESP32 mqtt component
Apache License 2.0
603 stars 255 forks source link

Suggest moving mqtt_supported_features.h to public include dir (IDFGH-4599) #184

Closed AxelLin closed 3 years ago

AxelLin commented 3 years ago

Currently the mqtt_supported_features.h is in PRIV_INCLUDE_DIRS. So the application cannot include it.

To write application code that can be compiled with different esp-idf versions. Now it needs to add #if gurad with checking ESP_IDF_VERSION in application code. (And manually check if some feature actually back-ported to old ESP_IDF_VERSION)

I think a better way is to allow application to include mqtt_supported_features.h, then the application just need to add #ifdef MQTT_SUPPORTED_FEATURE_XXX.