eclipse / paho.mqtt.embedded-c

Paho MQTT C client library for embedded systems. Paho is an Eclipse IoT project (https://iot.eclipse.org/)

Home Page:https://eclipse.org/paho

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move includes to a subdirectory

Equidamoid opened this issue · comments

Hello,

The current code requies includes like #include <MQTTClient.h>, which can lead to a mess if you happen to have multiple mqtt-related dependencies.

How about prefixing the includes with something like paho/ or paho-embedded/?

I'm willing to prepare a PR for this if the maintainers agree (and if this repo isn't as abandoned as it looks).

I found that most embedded projects do not have folder-separated include files (e.g. STMicro's BSP, ARM's CMSIS all expect single-level includes and a properly defined INCLUDE path).
That said, because the name is generic (i.e. does not include "Paho"), I see how name collisions could appear. I never tried it but attempting to install the build on Linux side-by-side with Paho Linux will likely cause issues.

My preference is towards paho-embedded/ or similar to disambiguate from the paho.mqtt.c's "MQTTClient.h". We could also change the name of the client to include "Paho" or "PahoEmbedded" although I find that a bigger breaking change.

Similar / duplicate to #156.

Close as duplicate of #156