Clean up the MQTT connection authentication configuration.

This commit is contained in:
Jonathan Naylor
2025-03-03 15:02:47 +00:00
parent dcee575722
commit f9a5a169cb
6 changed files with 29 additions and 30 deletions

View File

@@ -32,7 +32,7 @@ enum MQTT_QOS {
class CMQTTConnection {
public:
CMQTTConnection(const std::string& host, unsigned short port, const std::string& name, const bool authEnabled, const std::string& user, const std::string& pass, const std::vector<std::pair<std::string, void (*)(const unsigned char*, unsigned int)>>& subs, unsigned int keepalive, MQTT_QOS qos = MQTT_QOS_EXACTLY_ONCE);
CMQTTConnection(const std::string& host, unsigned short port, const std::string& name, const bool authEnabled, const std::string& username, const std::string& password, const std::vector<std::pair<std::string, void (*)(const unsigned char*, unsigned int)>>& subs, unsigned int keepalive, MQTT_QOS qos = MQTT_QOS_EXACTLY_ONCE);
~CMQTTConnection();
bool open();
@@ -48,8 +48,8 @@ private:
unsigned short m_port;
std::string m_name;
bool m_authEnabled;
std::string m_user;
std::string m_pass;
std::string m_username;
std::string m_password;
std::vector<std::pair<std::string, void (*)(const unsigned char*, unsigned int)>> m_subs;
unsigned int m_keepalive;
MQTT_QOS m_qos;