Debian Codegraph @

crt/aws-c-mqtt/include/aws/mqtt/private/mqtt_client_test_helper.h

raw symbols SCIP
1 #ifndef AWS_MQTT_CLIENT_TEST_HELPER_H
2 #define AWS_MQTT_CLIENT_TEST_HELPER_H
3 /**
4 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
5 * SPDX-License-Identifier: Apache-2.0.
6 */
7
8 #include <aws/common/stdint.h>
9 #include <aws/mqtt/exports.h>
10
11 struct aws_allocator;
12 struct aws_byte_cursor;
13 struct aws_mqtt_client_connection_311_impl;
14 struct aws_string;
15
16 AWS_EXTERN_C_BEGIN
17
18 /** This is for testing applications sending MQTT payloads. Don't ever include this file outside of a unit test. */
19
20 /** result buffer will be initialized and payload will be written into it */
21 AWS_MQTT_API
22 int aws_mqtt_client_get_payload_for_outstanding_publish_packet(
23 struct aws_mqtt_client_connection *connection,
24 uint16_t packet_id,
25 struct aws_allocator *allocator,
26 struct aws_byte_buf *result);
27
28 AWS_MQTT_API
29 int aws_mqtt_client_get_topic_for_outstanding_publish_packet(
30 struct aws_mqtt_client_connection *connection,
31 uint16_t packet_id,
32 struct aws_allocator *allocator,
33 struct aws_string **result);
34
35 AWS_EXTERN_C_END
36
37 #endif // AWS_C_IOT_MQTT_CLIENT_TEST_HELPER_H