A modelling and serializer library for Microsoft Azure IoTHub client applications
Dependents: sht15_remote_monitoring f767zi_mqtt remote_monitoring simplesample_amqp ... more
This library implements a serializer library to be used in projects involving Microsoft Azure IoT Hub connectivity. The code is replicated from https://github.com/Azure/azure-iot-sdks
methodreturn.h@36:7d12a5386197, 2018-09-11 (annotated)
- Committer:
- AzureIoTClient
- Date:
- Tue Sep 11 11:14:37 2018 -0700
- Revision:
- 36:7d12a5386197
- Parent:
- 17:fa1bba4c6053
1.2.9
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AzureIoTClient | 17:fa1bba4c6053 | 1 | // Copyright (c) Microsoft. All rights reserved. |
AzureIoTClient | 17:fa1bba4c6053 | 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
AzureIoTClient | 17:fa1bba4c6053 | 3 | |
AzureIoTClient | 17:fa1bba4c6053 | 4 | #ifndef METHODRETURN_H |
AzureIoTClient | 17:fa1bba4c6053 | 5 | #define METHODRETURN_H |
AzureIoTClient | 17:fa1bba4c6053 | 6 | |
AzureIoTClient | 17:fa1bba4c6053 | 7 | typedef struct METHODRETURN_HANDLE_DATA_TAG* METHODRETURN_HANDLE; |
AzureIoTClient | 17:fa1bba4c6053 | 8 | |
AzureIoTClient | 17:fa1bba4c6053 | 9 | #include "azure_c_shared_utility/macro_utils.h" |
AzureIoTClient | 17:fa1bba4c6053 | 10 | |
AzureIoTClient | 17:fa1bba4c6053 | 11 | /*the following macro expands to "const" if X is defined. If X is not defined, then it expands to nothing*/ |
AzureIoTClient | 17:fa1bba4c6053 | 12 | #define CONST_BY_COMPILATION_UNIT(X) IF(COUNT_ARG(X),const,) |
AzureIoTClient | 17:fa1bba4c6053 | 13 | |
AzureIoTClient | 17:fa1bba4c6053 | 14 | typedef struct METHODRETURN_DATA_TAG |
AzureIoTClient | 17:fa1bba4c6053 | 15 | { |
AzureIoTClient | 17:fa1bba4c6053 | 16 | CONST_BY_COMPILATION_UNIT(METHODRETURN_C) int statusCode; |
AzureIoTClient | 17:fa1bba4c6053 | 17 | CONST_BY_COMPILATION_UNIT(METHODRETURN_C) char* jsonValue; |
AzureIoTClient | 17:fa1bba4c6053 | 18 | }METHODRETURN_DATA; |
AzureIoTClient | 17:fa1bba4c6053 | 19 | |
AzureIoTClient | 17:fa1bba4c6053 | 20 | #include "azure_c_shared_utility/umock_c_prod.h" |
AzureIoTClient | 17:fa1bba4c6053 | 21 | |
AzureIoTClient | 17:fa1bba4c6053 | 22 | #ifdef __cplusplus |
AzureIoTClient | 36:7d12a5386197 | 23 | extern "C" |
AzureIoTClient | 17:fa1bba4c6053 | 24 | { |
AzureIoTClient | 17:fa1bba4c6053 | 25 | #endif |
AzureIoTClient | 17:fa1bba4c6053 | 26 | |
AzureIoTClient | 17:fa1bba4c6053 | 27 | MOCKABLE_FUNCTION(, METHODRETURN_HANDLE, MethodReturn_Create, int, statusCode, const char*, jsonValue); |
AzureIoTClient | 17:fa1bba4c6053 | 28 | MOCKABLE_FUNCTION(, void, MethodReturn_Destroy, METHODRETURN_HANDLE, handle); |
AzureIoTClient | 17:fa1bba4c6053 | 29 | MOCKABLE_FUNCTION(, const METHODRETURN_DATA*, MethodReturn_GetReturn, METHODRETURN_HANDLE, handle); |
AzureIoTClient | 17:fa1bba4c6053 | 30 | |
AzureIoTClient | 17:fa1bba4c6053 | 31 | #ifdef __cplusplus |
AzureIoTClient | 17:fa1bba4c6053 | 32 | } |
AzureIoTClient | 17:fa1bba4c6053 | 33 | #endif |
AzureIoTClient | 17:fa1bba4c6053 | 34 | |
AzureIoTClient | 17:fa1bba4c6053 | 35 | |
AzureIoTClient | 17:fa1bba4c6053 | 36 | #endif /*METHODRETURN_H*/ |
AzureIoTClient | 17:fa1bba4c6053 | 37 |