@@ -158,11 +158,11 @@ class MQTTClient {
158158 this ->timeout = (uint32_t )timeout;
159159 }
160160
161- boolean connect (const char clientId[]) { return this ->connect (clientId, nullptr , nullptr ); }
161+ bool connect (const char clientId[]) { return this ->connect (clientId, nullptr , nullptr ); }
162162
163- boolean connect (const char clientId[], const char username[]) { return this ->connect (clientId, username, nullptr ); }
163+ bool connect (const char clientId[], const char username[]) { return this ->connect (clientId, username, nullptr ); }
164164
165- boolean connect (const char clientId[], const char username[], const char password[]) {
165+ bool connect (const char clientId[], const char username[], const char password[]) {
166166 // close left open connection if still connected
167167 if (this ->connected ()) {
168168 this ->close ();
@@ -209,35 +209,35 @@ class MQTTClient {
209209 return true ;
210210 }
211211
212- boolean publish (const String &topic) { return this ->publish (topic.c_str (), " " ); }
212+ bool publish (const String &topic) { return this ->publish (topic.c_str (), " " ); }
213213
214- boolean publish (const char topic[]) { return this ->publish (topic, " " ); }
214+ bool publish (const char topic[]) { return this ->publish (topic, " " ); }
215215
216- boolean publish (const String &topic, const String &payload) { return this ->publish (topic.c_str (), payload.c_str ()); }
216+ bool publish (const String &topic, const String &payload) { return this ->publish (topic.c_str (), payload.c_str ()); }
217217
218- boolean publish (const String &topic, const String &payload, bool retained, int qos) {
218+ bool publish (const String &topic, const String &payload, bool retained, int qos) {
219219 return this ->publish (topic.c_str (), payload.c_str (), retained, qos);
220220 }
221221
222- boolean publish (const char topic[], const String &payload) { return this ->publish (topic, payload.c_str ()); }
222+ bool publish (const char topic[], const String &payload) { return this ->publish (topic, payload.c_str ()); }
223223
224- boolean publish (const char topic[], const String &payload, bool retained, int qos) {
224+ bool publish (const char topic[], const String &payload, bool retained, int qos) {
225225 return this ->publish (topic, payload.c_str (), retained, qos);
226226 }
227227
228- boolean publish (const char topic[], const char payload[]) {
228+ bool publish (const char topic[], const char payload[]) {
229229 return this ->publish (topic, (char *)payload, (int )strlen (payload));
230230 }
231231
232- boolean publish (const char topic[], const char payload[], bool retained, int qos) {
232+ bool publish (const char topic[], const char payload[], bool retained, int qos) {
233233 return this ->publish (topic, (char *)payload, (int )strlen (payload), retained, qos);
234234 }
235235
236- boolean publish (const char topic[], const char payload[], int length) {
236+ bool publish (const char topic[], const char payload[], int length) {
237237 return this ->publish (topic, payload, length, false , 0 );
238238 }
239239
240- boolean publish (const char topic[], const char payload[], int length, bool retained, int qos) {
240+ bool publish (const char topic[], const char payload[], int length, bool retained, int qos) {
241241 // return immediately if not connected
242242 if (!this ->connected ()) {
243243 return false ;
@@ -259,13 +259,13 @@ class MQTTClient {
259259 return true ;
260260 }
261261
262- boolean subscribe (const String &topic) { return this ->subscribe (topic.c_str ()); }
262+ bool subscribe (const String &topic) { return this ->subscribe (topic.c_str ()); }
263263
264- boolean subscribe (const String &topic, int qos) { return this ->subscribe (topic.c_str (), qos); }
264+ bool subscribe (const String &topic, int qos) { return this ->subscribe (topic.c_str (), qos); }
265265
266- boolean subscribe (const char topic[]) { return this ->subscribe (topic, 0 ); }
266+ bool subscribe (const char topic[]) { return this ->subscribe (topic, 0 ); }
267267
268- boolean subscribe (const char topic[], int qos) {
268+ bool subscribe (const char topic[], int qos) {
269269 // return immediately if not connected
270270 if (!this ->connected ()) {
271271 return false ;
@@ -280,9 +280,9 @@ class MQTTClient {
280280 return true ;
281281 }
282282
283- boolean unsubscribe (const String &topic) { return this ->unsubscribe (topic.c_str ()); }
283+ bool unsubscribe (const String &topic) { return this ->unsubscribe (topic.c_str ()); }
284284
285- boolean unsubscribe (const char topic[]) {
285+ bool unsubscribe (const char topic[]) {
286286 // return immediately if not connected
287287 if (!this ->connected ()) {
288288 return false ;
@@ -297,7 +297,7 @@ class MQTTClient {
297297 return true ;
298298 }
299299
300- boolean loop () {
300+ bool loop () {
301301 // return immediately if not connected
302302 if (!this ->connected ()) {
303303 return false ;
@@ -323,7 +323,7 @@ class MQTTClient {
323323 return true ;
324324 }
325325
326- boolean connected () {
326+ bool connected () {
327327 // a client is connected if the network is connected, a client is available and
328328 // the connection has been properly initiated
329329 return this ->netClient != nullptr && this ->netClient ->connected () == 1 && this ->_connected ;
@@ -333,7 +333,7 @@ class MQTTClient {
333333
334334 lwmqtt_return_code_t returnCode () { return this ->_returnCode ; }
335335
336- boolean disconnect () {
336+ bool disconnect () {
337337 // return immediately if not connected anymore
338338 if (!this ->connected ()) {
339339 return false ;
@@ -349,7 +349,7 @@ class MQTTClient {
349349 }
350350
351351 private:
352- boolean close () {
352+ bool close () {
353353 // set flag
354354 this ->_connected = false ;
355355
0 commit comments