| 238 | } |
| 239 | |
| 240 | void MqttClient::unsubscribe(const QString& topic) |
| 241 | { |
| 242 | #ifdef HAVE_MQTT |
| 243 | m_pendingTopics.removeAll(topic); |
| 244 | if (m_connected && m_mosq) { |
| 245 | mosquitto_unsubscribe(m_mosq, nullptr, topic.toUtf8().constData()); |
| 246 | } |
| 247 | #else |
| 248 | Q_UNUSED(topic); |
| 249 | #endif |
| 250 | } |
| 251 | |
| 252 | void MqttClient::publish(const QString& topic, const QByteArray& payload) |
| 253 | { |