source: azure_iot_hub_f767zi/trunk/azure_iot_sdk/serializer/inc/jsonencoder.h@ 457

Last change on this file since 457 was 457, checked in by coas-nagasima, 4 years ago

ファイルを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr;charset=UTF-8
File size: 1.5 KB
Line 
1// Copyright (c) Microsoft. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
4#ifndef JSONENCODER_H
5#define JSONENCODER_H
6
7#include "azure_macro_utils/macro_utils.h"
8#include "azure_c_shared_utility/strings.h"
9
10#ifdef __cplusplus
11#include "cstddef"
12extern "C" {
13#else
14#include "stddef.h"
15#endif
16
17#include "multitree.h"
18
19#define JSON_ENCODER_RESULT_VALUES \
20JSON_ENCODER_OK, \
21JSON_ENCODER_INVALID_ARG, \
22JSON_ENCODER_ALREADY_EXISTS, \
23JSON_ENCODER_MULTITREE_ERROR, \
24JSON_ENCODER_TOSTRING_FUNCTION_ERROR, \
25JSON_ENCODER_ERROR
26
27MU_DEFINE_ENUM_WITHOUT_INVALID(JSON_ENCODER_RESULT, JSON_ENCODER_RESULT_VALUES);
28
29#define JSON_ENCODER_TOSTRING_RESULT_VALUES \
30JSON_ENCODER_TOSTRING_OK, \
31JSON_ENCODER_TOSTRING_INVALID_ARG, \
32JSON_ENCODER_TOSTRING_ERROR
33
34MU_DEFINE_ENUM_WITHOUT_INVALID(JSON_ENCODER_TOSTRING_RESULT, JSON_ENCODER_TOSTRING_RESULT_VALUES);
35
36typedef JSON_ENCODER_TOSTRING_RESULT(*JSON_ENCODER_TOSTRING_FUNC)(STRING_HANDLE, const void* value);
37
38#include "umock_c/umock_c_prod.h"
39
40MOCKABLE_FUNCTION(, JSON_ENCODER_TOSTRING_RESULT, JSONEncoder_CharPtr_ToString, STRING_HANDLE, destination, const void*, value);
41MOCKABLE_FUNCTION(, JSON_ENCODER_RESULT, JSONEncoder_EncodeTree, MULTITREE_HANDLE, treeHandle, STRING_HANDLE, destination, JSON_ENCODER_TOSTRING_FUNC, toStringFunc);
42
43#ifdef __cplusplus
44}
45#endif
46
47
48#endif /* JSONENCODER_H */
Note: See TracBrowser for help on using the repository browser.