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 cbs.h Source File

cbs.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 CBS_H
00005 #define CBS_H
00006 
00007 #include "azure_uamqp_c/session.h"
00008 #include "azure_uamqp_c/amqp_management.h"
00009 
00010 #ifdef __cplusplus
00011 extern "C" {
00012 #endif /* __cplusplus */
00013 
00014 #include "azure_c_shared_utility/umock_c_prod.h"
00015 
00016     typedef enum CBS_OPERATION_RESULT_TAG
00017     {
00018         CBS_OPERATION_RESULT_OK,
00019         CBS_OPERATION_RESULT_CBS_ERROR,
00020         CBS_OPERATION_RESULT_OPERATION_FAILED
00021     } CBS_OPERATION_RESULT;
00022 
00023     typedef struct CBS_INSTANCE_TAG* CBS_HANDLE;
00024     typedef void(*ON_CBS_OPERATION_COMPLETE)(void* context, CBS_OPERATION_RESULT cbs_operation_result, unsigned int status_code, const char* status_description);
00025 
00026     MOCKABLE_FUNCTION(, CBS_HANDLE, cbs_create, SESSION_HANDLE, session, ON_AMQP_MANAGEMENT_STATE_CHANGED, on_amqp_management_state_changed, void*, callback_context);
00027     MOCKABLE_FUNCTION(, void, cbs_destroy, CBS_HANDLE, cbs);
00028     MOCKABLE_FUNCTION(, int, cbs_open, CBS_HANDLE, amqp_management);
00029     MOCKABLE_FUNCTION(, int, cbs_close, CBS_HANDLE, amqp_management);
00030     MOCKABLE_FUNCTION(, int, cbs_put_token, CBS_HANDLE, cbs, const char*, type, const char*, audience, const char*, token, ON_CBS_OPERATION_COMPLETE, on_cbs_operation_complete, void*, context);
00031     MOCKABLE_FUNCTION(, int, cbs_delete_token, CBS_HANDLE, cbs, const char*, type, const char*, audience, ON_CBS_OPERATION_COMPLETE, on_cbs_operation_complete, void*, context);
00032 
00033 #ifdef __cplusplus
00034 }
00035 #endif /* __cplusplus */
00036 
00037 #endif /* CBS_H */