Mark Radbourne / Mbed 2 deprecated iothub_client_sample_amqp

Dependencies:   EthernetInterface NTPClient iothub_amqp_transport iothub_client mbed-rtos mbed

Fork of iothub_client_sample_amqp by Azure IoT

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers sasl_mechanism.h Source File

sasl_mechanism.h

00001 // Copyright (c) Microsoft. All rights reserved.
00002 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
00003 
00004 #ifndef SASL_MECHANISM_H
00005 #define SASL_MECHANISM_H
00006 
00007 #ifdef __cplusplus
00008 extern "C" {
00009 #include "cstdint"
00010 #else
00011 #include "stdint.h"
00012 #endif /* __cplusplus */
00013 
00014 #include "azure_c_shared_utility/umock_c_prod.h"
00015 
00016     typedef struct SASL_MECHANISM_INSTANCE_TAG* SASL_MECHANISM_HANDLE;
00017     typedef void* CONCRETE_SASL_MECHANISM_HANDLE;
00018 
00019     typedef struct SASL_MECHANISM_BYTES_TAG
00020     {
00021         const void* bytes;
00022         uint32_t length;
00023     } SASL_MECHANISM_BYTES;
00024 
00025     typedef CONCRETE_SASL_MECHANISM_HANDLE(*SASL_MECHANISM_CREATE)(void* config);
00026     typedef void(*SASL_MECHANISM_DESTROY)(CONCRETE_SASL_MECHANISM_HANDLE concrete_sasl_mechanism);
00027     typedef int(*SASL_MECHANISM_GET_INIT_BYTES)(CONCRETE_SASL_MECHANISM_HANDLE concrete_sasl_mechanism, SASL_MECHANISM_BYTES* init_bytes);
00028     typedef const char*(*SASL_MECHANISM_GET_MECHANISM_NAME)(CONCRETE_SASL_MECHANISM_HANDLE concrete_sasl_mechanism);
00029     typedef int(*SASL_MECHANISM_CHALLENGE)(CONCRETE_SASL_MECHANISM_HANDLE concrete_sasl_mechanism, const SASL_MECHANISM_BYTES* challenge_bytes, SASL_MECHANISM_BYTES* response_bytes);
00030 
00031     typedef struct SASL_MECHANISM_INTERFACE_TAG
00032     {
00033         SASL_MECHANISM_CREATE concrete_sasl_mechanism_create;
00034         SASL_MECHANISM_DESTROY concrete_sasl_mechanism_destroy;
00035         SASL_MECHANISM_GET_INIT_BYTES concrete_sasl_mechanism_get_init_bytes;
00036         SASL_MECHANISM_GET_MECHANISM_NAME concrete_sasl_mechanism_get_mechanism_name;
00037         SASL_MECHANISM_CHALLENGE concrete_sasl_mechanism_challenge;
00038     } SASL_MECHANISM_INTERFACE_DESCRIPTION;
00039 
00040     MOCKABLE_FUNCTION(, SASL_MECHANISM_HANDLE, saslmechanism_create, const SASL_MECHANISM_INTERFACE_DESCRIPTION*, sasl_mechanism_interface_description, void*, sasl_mechanism_create_parameters);
00041     MOCKABLE_FUNCTION(, void, saslmechanism_destroy, SASL_MECHANISM_HANDLE, sasl_mechanism);
00042     MOCKABLE_FUNCTION(, int, saslmechanism_get_init_bytes, SASL_MECHANISM_HANDLE, sasl_mechanism, SASL_MECHANISM_BYTES*, init_bytes);
00043     MOCKABLE_FUNCTION(, const char*, saslmechanism_get_mechanism_name, SASL_MECHANISM_HANDLE, sasl_mechanism);
00044     MOCKABLE_FUNCTION(, int, saslmechanism_challenge, SASL_MECHANISM_HANDLE, sasl_mechanism, const SASL_MECHANISM_BYTES*, challenge_bytes, SASL_MECHANISM_BYTES*, response_bytes);
00045 
00046 #ifdef __cplusplus
00047 }
00048 #endif /* __cplusplus */
00049 
00050 #endif /* SASL_MECHANISM_H */