eclipse / paho.mqtt.embedded-c

Paho MQTT C client library for embedded systems. Paho is an Eclipse IoT project (https://iot.eclipse.org/)
https://eclipse.org/paho
Other
1.35k stars 752 forks source link

*nix install and public header locations #156

Open daniel-santos opened 5 years ago

daniel-santos commented 5 years ago

I'm working on a change set to install headers on *nix when make install is run, but I need some clarification and direction.

First is the question of where to install them. The root is easy to determine, it should always be ${CMAKE_INSTALL_PREFIX}/include, but the subdirectory and file names I'm uncertain of.

  1. Should they be allowed to co-exist with the non-embedded C and C++ libraries? My instincts say "yes".
  2. If the community agrees with the above, then should they go in the mqtt/embed subdirectory perhaps? (e.g., /usr/include/mqtt/embed)
  3. Finally, how many header files do we reasonably need? Can we consolidate them into a single packet.h header or do we need multiple headers?

Even if we want multiple headers, each should be structured to be able to be included alone such that types it uses are included. Probably the easiest way to do this would be to separate out MQTTString into its own header and tease apart the other inter-header dependencies.

icraggs commented 5 years ago
  1. I think the headers should be allowed to co-exist with the mainline Paho C/C++ libraries. If both are installed by accident, then unexpected and confusing errors could occur.
  2. I think that the directory name ought to include the 'paho' name. Other MQTT implementations are available :-)
  3. I intended that there would be at least 3 different packages each of which can be used independently:
    1. MQTTPacket - most lightweight, least helpful
    2. MQTTClient - C++ synchronous
    3. MQTTAsync - C++ asynchronous

Now there is a C version of MQTTClient as well which adds to the options. I think we need separate headers for each. And a programming manual or similar doc, which I guess I should write :-)

CIPop commented 1 year ago

👍 on all above.