PubSub: management of MQTT library dependency should be refactored
The S2OPC PubSub library provides MQTT protocol based on Paho library dependency.
This implementation is directly done in src/PubSub/protocol/sopc_mqtt_transport_layer.c
and functions are "empty" when Paho is not present.
It might be preferable to allow the MQTT library to be changed easily by providing a library independent S2OPC MQTT API and by separating the Paho implementation in a dedicated directory as it is the case for crypto library.
Thus, the following actions might be done:
- Create
src/PubSub/protocol/mqtt
andsrc/PubSub/protocol/mqtt/paho
directories - Provide
src/PubSub/protocol/mqtt/sopc_mqtt_transport_layer.h
as API andsrc/PubSub/protocol/mqtt/paho/paho_mqtt_transport_layer.c
as implementation