update esp mqtt library
This commit is contained in:
@@ -20,46 +20,61 @@ the LICENSE file.
|
||||
|
||||
#include "MqttClientSetup.h"
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP8266)
|
||||
class espMqttClient : public MqttClientSetup<espMqttClient> {
|
||||
public:
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
explicit espMqttClient(bool internalTask = true, uint8_t priority = 1, uint8_t core = 1);
|
||||
#else
|
||||
espMqttClient();
|
||||
#endif
|
||||
|
||||
protected:
|
||||
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
|
||||
espMqttClientInternals::ClientSync _client;
|
||||
#elif defined(__linux__)
|
||||
espMqttClientInternals::ClientPosix _client;
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
|
||||
class espMqttClientSecure : public MqttClientSetup<espMqttClientSecure> {
|
||||
public:
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
explicit espMqttClientSecure(bool internalTask = true, uint8_t priority = 1, uint8_t core = 1);
|
||||
#else
|
||||
espMqttClientSecure();
|
||||
#endif
|
||||
espMqttClientSecure& setInsecure();
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
espMqttClientSecure& setCACert(const char* rootCA);
|
||||
espMqttClientSecure& setCertificate(const char* clientCa);
|
||||
espMqttClientSecure& setPrivateKey(const char* privateKey);
|
||||
espMqttClientSecure& setPreSharedKey(const char* pskIdent, const char* psKey);
|
||||
#else
|
||||
espMqttClientSecure& setFingerprint(const uint8_t fingerprint[20]);
|
||||
espMqttClientSecure& setTrustAnchors(const X509List *ta);
|
||||
espMqttClientSecure& setClientRSACert(const X509List *cert, const PrivateKey *sk);
|
||||
espMqttClientSecure& setClientECCert(const X509List *cert, const PrivateKey *sk, unsigned allowed_usages, unsigned cert_issuer_key_type);
|
||||
espMqttClientSecure& setCertStore(CertStoreBase *certStore);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
espMqttClientInternals::ClientSecureSync _client;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
class espMqttClient : public MqttClientSetup<espMqttClient> {
|
||||
public:
|
||||
explicit espMqttClient(espMqttClientTypes::UseInternalTask useInternalTask);
|
||||
explicit espMqttClient(uint8_t priority = 1, uint8_t core = 1);
|
||||
|
||||
protected:
|
||||
espMqttClientInternals::ClientSync _client;
|
||||
};
|
||||
|
||||
class espMqttClientSecure : public MqttClientSetup<espMqttClientSecure> {
|
||||
public:
|
||||
explicit espMqttClientSecure(espMqttClientTypes::UseInternalTask useInternalTask);
|
||||
explicit espMqttClientSecure(uint8_t priority = 1, uint8_t core = 1);
|
||||
espMqttClientSecure& setInsecure();
|
||||
espMqttClientSecure& setCACert(const char* rootCA);
|
||||
espMqttClientSecure& setCertificate(const char* clientCa);
|
||||
espMqttClientSecure& setPrivateKey(const char* privateKey);
|
||||
espMqttClientSecure& setPreSharedKey(const char* pskIdent, const char* psKey);
|
||||
|
||||
protected:
|
||||
espMqttClientInternals::ClientSecureSync _client;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
class espMqttClient : public MqttClientSetup<espMqttClient> {
|
||||
public:
|
||||
espMqttClient();
|
||||
|
||||
protected:
|
||||
espMqttClientInternals::ClientPosix _client;
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user