Microsoft Azure IoTHub client AMQP transport

Dependents:   sht15_remote_monitoring RobotArmDemo iothub_client_sample_amqp iothub_client_sample_amqp ... more

This library implements the AMQP transport for Microsoft Azure IoTHub client. The code is replicated from https://github.com/Azure/azure-iot-sdks

Committer:
AzureIoTClient
Date:
Fri Feb 24 14:00:00 2017 -0800
Revision:
29:7e8852b14e3b
Parent:
25:63f7d371c030
Child:
42:c2eaa912a28c
1.1.8

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AzureIoTClient 25:63f7d371c030 1 // Copyright (c) Microsoft. All rights reserved.
AzureIoTClient 25:63f7d371c030 2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
AzureIoTClient 25:63f7d371c030 3
AzureIoTClient 25:63f7d371c030 4 #ifndef IOTHUBTRANSPORTAMQP_METHODS_H
AzureIoTClient 25:63f7d371c030 5 #define IOTHUBTRANSPORTAMQP_METHODS_H
AzureIoTClient 25:63f7d371c030 6
AzureIoTClient 25:63f7d371c030 7 #ifdef WIP_C2D_METHODS_AMQP /* This feature is WIP, do not use yet */
AzureIoTClient 25:63f7d371c030 8
AzureIoTClient 25:63f7d371c030 9 #include "azure_uamqp_c/session.h"
AzureIoTClient 25:63f7d371c030 10 #include "azure_c_shared_utility/buffer_.h"
AzureIoTClient 25:63f7d371c030 11 #include "azure_c_shared_utility/umock_c_prod.h"
AzureIoTClient 25:63f7d371c030 12
AzureIoTClient 25:63f7d371c030 13 #ifdef __cplusplus
AzureIoTClient 25:63f7d371c030 14 #include <cstddef>
AzureIoTClient 25:63f7d371c030 15
AzureIoTClient 25:63f7d371c030 16 extern "C"
AzureIoTClient 25:63f7d371c030 17 {
AzureIoTClient 25:63f7d371c030 18 #else
AzureIoTClient 25:63f7d371c030 19 #include <stddef.h>
AzureIoTClient 25:63f7d371c030 20 #endif
AzureIoTClient 25:63f7d371c030 21
AzureIoTClient 25:63f7d371c030 22 typedef struct IOTHUBTRANSPORT_AMQP_METHOD_TAG* IOTHUBTRANSPORT_AMQP_METHOD_HANDLE;
AzureIoTClient 25:63f7d371c030 23 typedef struct IOTHUBTRANSPORT_AMQP_METHODS_TAG* IOTHUBTRANSPORT_AMQP_METHODS_HANDLE;
AzureIoTClient 25:63f7d371c030 24 typedef void(*ON_METHODS_ERROR)(void* context);
AzureIoTClient 25:63f7d371c030 25 typedef int(*ON_METHOD_REQUEST_RECEIVED)(void* context, const char* method_name, const unsigned char* request, size_t request_size, IOTHUBTRANSPORT_AMQP_METHOD_HANDLE response);
AzureIoTClient 29:7e8852b14e3b 26 typedef void(*ON_METHODS_UNSUBSCRIBED)(void* context);
AzureIoTClient 25:63f7d371c030 27
AzureIoTClient 25:63f7d371c030 28 MOCKABLE_FUNCTION(, IOTHUBTRANSPORT_AMQP_METHODS_HANDLE, iothubtransportamqp_methods_create, const char*, hostname, const char*, device_id);
AzureIoTClient 25:63f7d371c030 29 MOCKABLE_FUNCTION(, void, iothubtransportamqp_methods_destroy, IOTHUBTRANSPORT_AMQP_METHODS_HANDLE, iothubtransport_amqp_methods_handle);
AzureIoTClient 25:63f7d371c030 30 MOCKABLE_FUNCTION(, int, iothubtransportamqp_methods_subscribe, IOTHUBTRANSPORT_AMQP_METHODS_HANDLE, iothubtransport_amqp_methods_handle,
AzureIoTClient 25:63f7d371c030 31 SESSION_HANDLE, session_handle, ON_METHODS_ERROR, on_methods_error, void*, on_methods_error_context,
AzureIoTClient 29:7e8852b14e3b 32 ON_METHOD_REQUEST_RECEIVED, on_method_request_received, void*, on_method_request_received_context,
AzureIoTClient 29:7e8852b14e3b 33 ON_METHODS_UNSUBSCRIBED, on_methods_unsubscribed, void*, on_methods_unsubscribed_context);
AzureIoTClient 25:63f7d371c030 34 MOCKABLE_FUNCTION(, int, iothubtransportamqp_methods_respond, IOTHUBTRANSPORT_AMQP_METHOD_HANDLE, method_handle,
AzureIoTClient 25:63f7d371c030 35 const unsigned char*, response, size_t, response_size, int, status_code);
AzureIoTClient 25:63f7d371c030 36 MOCKABLE_FUNCTION(, void, iothubtransportamqp_methods_unsubscribe, IOTHUBTRANSPORT_AMQP_METHODS_HANDLE, iothubtransport_amqp_methods_handle);
AzureIoTClient 25:63f7d371c030 37
AzureIoTClient 25:63f7d371c030 38 #ifdef __cplusplus
AzureIoTClient 25:63f7d371c030 39 }
AzureIoTClient 25:63f7d371c030 40 #endif
AzureIoTClient 25:63f7d371c030 41
AzureIoTClient 25:63f7d371c030 42 #endif
AzureIoTClient 25:63f7d371c030 43
AzureIoTClient 25:63f7d371c030 44 #endif /* IOTHUBTRANSPORTAMQP_METHODS_H */