broker/Eventhandler: Deprecate Broker::auto_publish() for v8.1

Relates to #3637
This commit is contained in:
Arne Welzel 2024-11-06 15:15:04 +01:00
parent 455e05bc2e
commit 6abb9d7eda
6 changed files with 29 additions and 5 deletions

View file

@ -811,7 +811,10 @@ bool Manager::AutoPublishEvent(string topic, Val* event) {
}
DBG_LOG(DBG_BROKER, "Enabling auto-publishing of event %s to topic %s", handler->Name(), topic.c_str());
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
handler->AutoPublish(std::move(topic));
#pragma GCC diagnostic pop
return true;
}
@ -837,7 +840,10 @@ bool Manager::AutoUnpublishEvent(const string& topic, Val* event) {
}
DBG_LOG(DBG_BROKER, "Disabling auto-publishing of event %s to topic %s", handler->Name(), topic.c_str());
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
handler->AutoUnpublish(topic);
#pragma GCC diagnostic pop
return true;
}