Skip to content

Commit 3b8647c

Browse files
committed
Adjust test plugin to API changes
1 parent 9eae90d commit 3b8647c

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

FlashMQTests/plugins/test_plugin.cpp

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,14 @@ void publish_in_thread()
188188
flashmq_publish_message("topic/from/thread", 0, false, "payload from thread");
189189
}
190190

191-
AuthResult flashmq_plugin_acl_check(void *thread_data, const AclAccess access, const std::string &clientid, const std::string &username,
192-
const std::string &topic, const std::vector<std::string> &subtopics, const std::string &shareName,
193-
std::string_view payload, const uint8_t qos, const bool retain,
194-
const std::optional<std::string> &correlationData, const std::optional<std::string> &responseTopic,
195-
const std::vector<std::pair<std::string, std::string>> *userProperties)
191+
AuthResult flashmq_plugin_acl_check(
192+
void *thread_data, const AclAccess access, const std::string &clientid, const std::string &username,
193+
const std::string &topic, const std::vector<std::string> &subtopics, const std::string &shareName,
194+
std::string_view payload, const uint8_t qos, const bool retain,
195+
const std::optional<std::string> &correlationData, const std::optional<std::string> &responseTopic,
196+
const std::optional<std::string> &contentType,
197+
const std::optional<std::chrono::time_point<std::chrono::steady_clock>> expiresAt,
198+
const std::vector<std::pair<std::string, std::string>> *userProperties)
196199
{
197200
(void)thread_data;
198201
(void)access;
@@ -205,6 +208,8 @@ AuthResult flashmq_plugin_acl_check(void *thread_data, const AclAccess access, c
205208
(void)responseTopic;
206209
(void)userProperties;
207210
(void)shareName;
211+
(void)contentType;
212+
(void)expiresAt;
208213

209214
if (clientid == "return_error")
210215
return AuthResult::error;
@@ -306,9 +311,11 @@ AuthResult flashmq_plugin_extended_auth(void *thread_data, const std::string &cl
306311
return AuthResult::auth_method_not_supported;
307312
}
308313

309-
bool flashmq_plugin_alter_publish(void *thread_data, const std::string &clientid, std::string &topic, const std::vector<std::string> &subtopics, std::string_view payload,
310-
uint8_t &qos, bool &retain, const std::optional<std::string> &correlationData, const std::optional<std::string> &responseTopic,
311-
std::vector<std::pair<std::string, std::string>> *userProperties)
314+
bool flashmq_plugin_alter_publish(
315+
void *thread_data, const std::string &clientid, std::string &topic, const std::vector<std::string> &subtopics,
316+
std::string_view payload, uint8_t &qos, bool &retain, std::optional<std::string> &correlationData,
317+
std::optional<std::string> &responseTopic, std::optional<std::string> &contentType,
318+
std::vector<std::pair<std::string, std::string>> *userProperties)
312319
{
313320
(void)thread_data;
314321
(void)clientid;
@@ -318,6 +325,7 @@ bool flashmq_plugin_alter_publish(void *thread_data, const std::string &clientid
318325
(void)correlationData;
319326
(void)responseTopic;
320327
(void)userProperties;
328+
(void)contentType;
321329

322330
TestPluginData *p = static_cast<TestPluginData*>(thread_data);
323331

0 commit comments

Comments
 (0)