Simplify usage of subscribe options enums

Summary: related to T13606

Reviewers: ivica

Reviewed By: ivica

Subscribers: miljen, iljazovic

Differential Revision: https://repo.mireo.local/D27679
This commit is contained in:
Korina Šimičević
2024-02-02 09:23:40 +01:00
parent 46a48fb62c
commit 677e625d1a
9 changed files with 82 additions and 86 deletions

View File

@ -180,9 +180,9 @@ void subscribe_and_receive_openssl_tls(int num_receive) {
topics.push_back(subscribe_topic {
"test/mqtt-test", {
qos_e::exactly_once,
subscribe_options::no_local_e::no,
subscribe_options::retain_as_published_e::retain,
subscribe_options::retain_handling_e::send
no_local_e::no,
retain_as_published_e::retain,
retain_handling_e::send
}
});

View File

@ -28,9 +28,9 @@ asio::awaitable<void> client_receiver(asio::io_context& ioc) {
"test/mqtt-test",
async_mqtt5::subscribe_options {
async_mqtt5::qos_e::exactly_once, // All messages will arrive at QoS 2.
async_mqtt5::subscribe_options::no_local_e::no, // Forward message from Clients with same ID.
async_mqtt5::subscribe_options::retain_as_published_e::retain, // Keep the original RETAIN flag.
async_mqtt5::subscribe_options::retain_handling_e::send // Send retained messages when the subscription is established.
async_mqtt5::no_local_e::no, // Forward message from Clients with same ID.
async_mqtt5::retain_as_published_e::retain, // Keep the original RETAIN flag.
async_mqtt5::retain_handling_e::send // Send retained messages when the subscription is established.
}
};

View File

@ -124,11 +124,11 @@ void subscribe_and_receive_websocket_tcp(int num_receive) {
topics.push_back(subscribe_topic{
"test/mqtt-test", {
qos_e::exactly_once,
subscribe_options::no_local_e::no,
subscribe_options::retain_as_published_e::retain,
subscribe_options::retain_handling_e::send
no_local_e::no,
retain_as_published_e::retain,
retain_handling_e::send
}
});
});
c.async_subscribe(
topics, subscribe_props{},

View File

@ -199,11 +199,11 @@ void subscribe_and_receive_websocket_tls(int num_receive) {
topics.push_back(subscribe_topic{
"test/mqtt-test", {
qos_e::exactly_once,
subscribe_options::no_local_e::no,
subscribe_options::retain_as_published_e::retain,
subscribe_options::retain_handling_e::send
no_local_e::no,
retain_as_published_e::retain,
retain_handling_e::send
}
});
});
c.async_subscribe(
topics, subscribe_props{},