Azure IoT / serializer

Dependents:   sht15_remote_monitoring f767zi_mqtt remote_monitoring simplesample_amqp ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers methodreturn.h Source File

methodreturn.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 METHODRETURN_H
00005 #define METHODRETURN_H
00006 
00007 typedef struct METHODRETURN_HANDLE_DATA_TAG* METHODRETURN_HANDLE;
00008 
00009 #include "azure_c_shared_utility/macro_utils.h"
00010 
00011 /*the following macro expands to "const" if X is defined. If X is not defined, then it expands to nothing*/
00012 #define CONST_BY_COMPILATION_UNIT(X) IF(COUNT_ARG(X),const,)
00013 
00014 typedef struct METHODRETURN_DATA_TAG
00015 {
00016     CONST_BY_COMPILATION_UNIT(METHODRETURN_C) int statusCode;
00017     CONST_BY_COMPILATION_UNIT(METHODRETURN_C) char* jsonValue;
00018 }METHODRETURN_DATA;
00019 
00020 #include "azure_c_shared_utility/umock_c_prod.h"
00021 
00022 #ifdef __cplusplus
00023 extern "C"
00024 {
00025 #endif
00026 
00027 MOCKABLE_FUNCTION(, METHODRETURN_HANDLE, MethodReturn_Create, int, statusCode, const char*, jsonValue);
00028 MOCKABLE_FUNCTION(, void, MethodReturn_Destroy, METHODRETURN_HANDLE, handle);
00029 MOCKABLE_FUNCTION(, const METHODRETURN_DATA*, MethodReturn_GetReturn, METHODRETURN_HANDLE, handle);
00030 
00031 #ifdef __cplusplus
00032 }
00033 #endif
00034 
00035 
00036 #endif /*METHODRETURN_H*/
00037