HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Users/fred/anaconda3/Library/include/aws/mqtt/private/mqtt_client_test_helper.h
#ifndef AWS_MQTT_CLIENT_TEST_HELPER_H
#define AWS_MQTT_CLIENT_TEST_HELPER_H
/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

#include <aws/common/stdint.h>
#include <aws/mqtt/exports.h>

struct aws_allocator;
struct aws_byte_cursor;
struct aws_mqtt_client_connection;
struct aws_string;

AWS_EXTERN_C_BEGIN

/** This is for testing applications sending MQTT payloads. Don't ever include this file outside of a unit test. */

/** result buffer will be initialized and payload will be written into it */
AWS_MQTT_API
int aws_mqtt_client_get_payload_for_outstanding_publish_packet(
    struct aws_mqtt_client_connection *connection,
    uint16_t packet_id,
    struct aws_allocator *allocator,
    struct aws_byte_buf *result);

AWS_MQTT_API
int aws_mqtt_client_get_topic_for_outstanding_publish_packet(
    struct aws_mqtt_client_connection *connection,
    uint16_t packet_id,
    struct aws_allocator *allocator,
    struct aws_string **result);

AWS_EXTERN_C_END

#endif // AWS_C_IOT_MQTT_CLIENT_TEST_HELPER_H