| 1 |
// Copyright (c) Microsoft. All rights reserved. |
| 2 |
// Licensed under the MIT license. See LICENSE file in the project root for full license information. |
| 3 |
|
| 4 |
#ifndef SASL_FRAME_CODEC_H |
| 5 |
#define SASL_FRAME_CODEC_H |
| 6 |
|
| 7 |
#ifdef __cplusplus |
| 8 |
extern "C" { |
| 9 |
#include <cstdint> |
| 10 |
#include <cstddef> |
| 11 |
#else |
| 12 |
#include <stdint.h> |
| 13 |
#include <stddef.h> |
| 14 |
#endif /* __cplusplus */ |
| 15 |
#include "azure_uamqp_c/frame_codec.h" |
| 16 |
|
| 17 |
#include "umock_c/umock_c_prod.h" |
| 18 |
|
| 19 |
#define SASL_MECHANISMS (uint64_t)0x40 |
| 20 |
#define SASL_INIT (uint64_t)0x41 |
| 21 |
#define SASL_CHALLENGE (uint64_t)0x42 |
| 22 |
#define SASL_RESPONSE (uint64_t)0x43 |
| 23 |
#define SASL_OUTCOME (uint64_t)0x44 |
| 24 |
|
| 25 |
typedef struct SASL_FRAME_CODEC_INSTANCE_TAG* SASL_FRAME_CODEC_HANDLE; |
| 26 |
typedef void(*ON_SASL_FRAME_RECEIVED)(void* context, AMQP_VALUE sasl_frame_value); |
| 27 |
typedef void(*ON_SASL_FRAME_CODEC_ERROR)(void* context); |
| 28 |
|
| 29 |
MOCKABLE_FUNCTION(, SASL_FRAME_CODEC_HANDLE, sasl_frame_codec_create, FRAME_CODEC_HANDLE, frame_codec, ON_SASL_FRAME_RECEIVED, on_sasl_frame_received, ON_SASL_FRAME_CODEC_ERROR, on_sasl_frame_codec_error, void*, callback_context); |
| 30 |
MOCKABLE_FUNCTION(, void, sasl_frame_codec_destroy, SASL_FRAME_CODEC_HANDLE, sasl_frame_codec); |
| 31 |
MOCKABLE_FUNCTION(, int, sasl_frame_codec_encode_frame, SASL_FRAME_CODEC_HANDLE, sasl_frame_codec, AMQP_VALUE, sasl_frame_value, ON_BYTES_ENCODED, on_bytes_encoded, void*, callback_context); |
| 32 |
|
| 33 |
#ifdef __cplusplus |
| 34 |
} |
| 35 |
#endif /* __cplusplus */ |
| 36 |
|
| 37 |
#endif /* SASL_FRAME_CODEC_H */ |