Debian Codegraph @

src/vendor/azure-uamqp-c/inc/azure_uamqp_c/header_detect_io.h

raw
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 HEADER_DETECT_IO_H
5 #define HEADER_DETECT_IO_H
6
7 #include "azure_c_shared_utility/xio.h"
8
9 #ifdef __cplusplus
10 #include <cstddef>
11 extern "C" {
12 #else
13 #include <stddef.h>
14 #endif /* __cplusplus */
15
16 #include "umock_c/umock_c_prod.h"
17 #include "azure_c_shared_utility/xio.h"
18
19 typedef struct AMQP_HEADER_TAG
20 {
21 const unsigned char* header_bytes;
22 size_t header_size;
23 } AMQP_HEADER;
24
25 typedef struct HEADER_DETECT_ENTRY_TAG
26 {
27 AMQP_HEADER header;
28 const IO_INTERFACE_DESCRIPTION* io_interface_description;
29 } HEADER_DETECT_ENTRY;
30
31 typedef struct HEADER_DETECT_IO_CONFIG_TAG
32 {
33 XIO_HANDLE underlying_io;
34 HEADER_DETECT_ENTRY* header_detect_entries;
35 size_t header_detect_entry_count;
36 } HEADER_DETECT_IO_CONFIG;
37
38 MOCKABLE_FUNCTION(, AMQP_HEADER, header_detect_io_get_amqp_header);
39 MOCKABLE_FUNCTION(, AMQP_HEADER, header_detect_io_get_sasl_amqp_header);
40 MOCKABLE_FUNCTION(, const IO_INTERFACE_DESCRIPTION*, header_detect_io_get_interface_description);
41
42 #ifdef __cplusplus
43 }
44 #endif /* __cplusplus */
45
46 #endif /* HEADER_DETECT_IO_H */