Skip to content

Commit 408e0e3

Browse files
fixup! defining MqttClient classes
1 parent 2750908 commit 408e0e3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

api/net/MqttClient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ void MqttClient::setAuth(const char* username, const char* password) {
8282
}
8383
}
8484

85-
void MqttClient::setWill(Topic willTopic, const uint8_t* will_message, size_t will_size) {
85+
void MqttClient::setWill(Topic willTopic, const uint8_t* will_message, size_t will_size, MqttQos qos) {
8686
checkInstance();
8787
if(impl != nullptr) {
88-
impl->setWill(willTopic, will_message, will_size);
88+
impl->setWill(willTopic, will_message, will_size, qos);
8989
}
9090
}
9191

api/net/MqttClient.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ class MqttClientInterface: public arduino::ClientConnect{
5757
// password may be null, if username is null password won't be used
5858
virtual void setAuth(const char* username, const char* password=nullptr) = 0;
5959

60-
virtual void setWill(Topic willTopic, const uint8_t* will_message, size_t will_size, MqttQos qos=QosDefault) = 0;
60+
virtual void setWill(
61+
Topic willTopic, const uint8_t* will_message,
62+
size_t will_size, MqttQos qos=QosDefault) = 0;
6163

6264
// TODO MQTT 5.0 stuff
6365
};
@@ -89,7 +91,9 @@ class MqttClient: public MqttClientInterface {
8991
void setClientId(const char* client_id = nullptr) override;
9092

9193
void setAuth(const char* username, const char* password=nullptr) override;
92-
void setWill(Topic willTopic, const uint8_t* will_message, size_t will_size) override;
94+
void setWill(
95+
Topic willTopic, const uint8_t* will_message,
96+
size_t will_size, MqttQos qos=QosDefault) override;
9397
protected:
9498
// static std::function<std::unique_ptr<MqttClientInterface>()> _factory;
9599

0 commit comments

Comments
 (0)