@digitalshieldfe/react-native-backup-card-sdk 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +17 -25
  2. package/android/build.gradle +49 -4
  3. package/android/consumer-rules.pro +0 -0
  4. package/android/proguard-rules.pro +21 -0
  5. package/android/src/main/AndroidManifest.xml +4 -1
  6. package/android/src/main/java/com/ziancube/backupcardsdk/BackupCardSdk.kt +478 -0
  7. package/android/src/main/java/com/ziancube/backupcardsdk/GPChannelNatives.java +41 -0
  8. package/android/src/main/java/com/ziancube/backupcardsdk/listener/ApiAsyncListener.java +13 -0
  9. package/android/src/main/java/com/ziancube/backupcardsdk/nfc/ApiNfc.java +173 -0
  10. package/android/src/main/java/com/ziancube/backupcardsdk/nfc/ImplNfc.java +39 -0
  11. package/android/src/main/java/com/ziancube/backupcardsdk/nfc/NfcComm.java +115 -0
  12. package/android/src/main/java/com/ziancube/backupcardsdk/utils/ApduParam.java +67 -0
  13. package/android/src/main/java/com/ziancube/backupcardsdk/utils/CommList.java +41 -0
  14. package/android/src/main/java/com/ziancube/backupcardsdk/utils/Utils.java +109 -0
  15. package/android/src/main/jni/CMakeLists.txt +60 -0
  16. package/android/src/main/jni/GPChannel/include/GPChannelSDK.h +306 -0
  17. package/android/src/main/jni/GPChannel/include/context/BaseContext.h +56 -0
  18. package/android/src/main/jni/GPChannel/include/device/ApduBuilder.hpp +72 -0
  19. package/android/src/main/jni/GPChannel/include/utility/Apdu.hpp +166 -0
  20. package/android/src/main/jni/GPChannel/include/utility/Debug.hpp +59 -0
  21. package/android/src/main/jni/GPChannel/include/utility/Singleton.h +34 -0
  22. package/android/src/main/jni/GPChannel/include/utility/mutex.h +24 -0
  23. package/android/src/main/jni/GPChannel/include/utility/trim.hpp +155 -0
  24. package/android/src/main/jni/GPChannel/include/utility/util.h +104 -0
  25. package/android/src/main/jni/GPChannel/include/utility/xFactory.hpp +26 -0
  26. package/android/src/main/jni/GPChannel/include/utility/xManager.hpp +84 -0
  27. package/android/src/main/jni/GPChannel/src/arm64-v8a/libJUB_GPC_APDU_SDK.a +0 -0
  28. package/android/src/main/jni/GPChannel/src/arm64-v8a/libTrezorCrypto.a +0 -0
  29. package/android/src/main/jni/GPChannel/src/armeabi-v7a/libJUB_GPC_APDU_SDK.a +0 -0
  30. package/android/src/main/jni/GPChannel/src/armeabi-v7a/libTrezorCrypto.a +0 -0
  31. package/android/src/main/jni/GPChannel/src/x86/libJUB_GPC_APDU_SDK.a +0 -0
  32. package/android/src/main/jni/GPChannel/src/x86/libTrezorCrypto.a +0 -0
  33. package/android/src/main/jni/src/implJni.cpp +313 -0
  34. package/android/src/main/jni/src/implJni.h +9 -0
  35. package/android/src/main/jni/utils/jsoncpp/AUTHORS +111 -0
  36. package/android/src/main/jni/utils/jsoncpp/CMakeLists.txt +159 -0
  37. package/android/src/main/jni/utils/jsoncpp/LICENSE +55 -0
  38. package/android/src/main/jni/utils/jsoncpp/README.md +135 -0
  39. package/android/src/main/jni/utils/jsoncpp/amalgamate.py +155 -0
  40. package/android/src/main/jni/utils/jsoncpp/appveyor.yml +22 -0
  41. package/android/src/main/jni/utils/jsoncpp/dev.makefile +35 -0
  42. package/android/src/main/jni/utils/jsoncpp/devtools/__init__.py +6 -0
  43. package/android/src/main/jni/utils/jsoncpp/devtools/agent_vmw7.json +33 -0
  44. package/android/src/main/jni/utils/jsoncpp/devtools/agent_vmxp.json +26 -0
  45. package/android/src/main/jni/utils/jsoncpp/devtools/antglob.py +205 -0
  46. package/android/src/main/jni/utils/jsoncpp/devtools/batchbuild.py +278 -0
  47. package/android/src/main/jni/utils/jsoncpp/devtools/fixeol.py +70 -0
  48. package/android/src/main/jni/utils/jsoncpp/devtools/licenseupdater.py +94 -0
  49. package/android/src/main/jni/utils/jsoncpp/devtools/tarball.py +52 -0
  50. package/android/src/main/jni/utils/jsoncpp/doxybuild.py +189 -0
  51. package/android/src/main/jni/utils/jsoncpp/include/CMakeLists.txt +2 -0
  52. package/android/src/main/jni/utils/jsoncpp/include/json/allocator.h +98 -0
  53. package/android/src/main/jni/utils/jsoncpp/include/json/assertions.h +54 -0
  54. package/android/src/main/jni/utils/jsoncpp/include/json/autolink.h +25 -0
  55. package/android/src/main/jni/utils/jsoncpp/include/json/config.h +187 -0
  56. package/android/src/main/jni/utils/jsoncpp/include/json/features.h +61 -0
  57. package/android/src/main/jni/utils/jsoncpp/include/json/forwards.h +37 -0
  58. package/android/src/main/jni/utils/jsoncpp/include/json/json.h +15 -0
  59. package/android/src/main/jni/utils/jsoncpp/include/json/reader.h +411 -0
  60. package/android/src/main/jni/utils/jsoncpp/include/json/value.h +888 -0
  61. package/android/src/main/jni/utils/jsoncpp/include/json/version.h +20 -0
  62. package/android/src/main/jni/utils/jsoncpp/include/json/writer.h +357 -0
  63. package/android/src/main/jni/utils/jsoncpp/makefiles/vs71/jsontest.vcproj +119 -0
  64. package/android/src/main/jni/utils/jsoncpp/makefiles/vs71/lib_json.vcproj +205 -0
  65. package/android/src/main/jni/utils/jsoncpp/makefiles/vs71/test_lib_json.vcproj +130 -0
  66. package/android/src/main/jni/utils/jsoncpp/makerelease.py +390 -0
  67. package/android/src/main/jni/utils/jsoncpp/meson.build +103 -0
  68. package/android/src/main/jni/utils/jsoncpp/pkg-config/jsoncpp.pc.in +9 -0
  69. package/android/src/main/jni/utils/jsoncpp/src/CMakeLists.txt +5 -0
  70. package/android/src/main/jni/utils/jsoncpp/src/jsontestrunner/CMakeLists.txt +25 -0
  71. package/android/src/main/jni/utils/jsoncpp/src/jsontestrunner/main.cpp +333 -0
  72. package/android/src/main/jni/utils/jsoncpp/src/lib_json/CMakeLists.txt +117 -0
  73. package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_reader.cpp +2060 -0
  74. package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_tool.h +114 -0
  75. package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_value.cpp +1661 -0
  76. package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_valueiterator.inl +167 -0
  77. package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_writer.cpp +1233 -0
  78. package/android/src/main/jni/utils/jsoncpp/src/lib_json/version.h.in +20 -0
  79. package/android/src/main/jni/utils/jsoncpp/src/test_lib_json/CMakeLists.txt +38 -0
  80. package/android/src/main/jni/utils/jsoncpp/src/test_lib_json/jsontest.cpp +457 -0
  81. package/android/src/main/jni/utils/jsoncpp/src/test_lib_json/jsontest.h +286 -0
  82. package/android/src/main/jni/utils/jsoncpp/src/test_lib_json/main.cpp +2606 -0
  83. package/android/src/main/jni/utils/jsoncpp/travis.sh +23 -0
  84. package/android/src/main/jni/utils/jsoncpp/version +1 -0
  85. package/android/src/main/jni/utils/jsoncpp/version.in +1 -0
  86. package/android/src/main/jni/utils/logUtils.cpp +108 -0
  87. package/android/src/main/jni/utils/logUtils.h +87 -0
  88. package/android/src/main/jni/utils/mSIGNA/stdutils/uchar_vector.h +614 -0
  89. package/package.json +2 -3
  90. package/android/libs/backupcardsdk-1.0.0.aar +0 -0
@@ -0,0 +1,2 @@
1
+ FILE(GLOB INCLUDE_FILES "json/*.h")
2
+ INSTALL(FILES ${INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/json)
@@ -0,0 +1,98 @@
1
+ // Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
2
+ // Distributed under MIT license, or public domain if desired and
3
+ // recognized in your jurisdiction.
4
+ // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5
+
6
+ #ifndef CPPTL_JSON_ALLOCATOR_H_INCLUDED
7
+ #define CPPTL_JSON_ALLOCATOR_H_INCLUDED
8
+
9
+ #include <cstring>
10
+ #include <memory>
11
+
12
+ #pragma pack(push, 8)
13
+
14
+ namespace Json {
15
+ template<typename T>
16
+ class SecureAllocator {
17
+ public:
18
+ // Type definitions
19
+ using value_type = T;
20
+ using pointer = T*;
21
+ using const_pointer = const T*;
22
+ using reference = T&;
23
+ using const_reference = const T&;
24
+ using size_type = std::size_t;
25
+ using difference_type = std::ptrdiff_t;
26
+
27
+ /**
28
+ * Allocate memory for N items using the standard allocator.
29
+ */
30
+ pointer allocate(size_type n) {
31
+ // allocate using "global operator new"
32
+ return static_cast<pointer>(::operator new(n * sizeof(T)));
33
+ }
34
+
35
+ /**
36
+ * Release memory which was allocated for N items at pointer P.
37
+ *
38
+ * The memory block is filled with zeroes before being released.
39
+ * The pointer argument is tagged as "volatile" to prevent the
40
+ * compiler optimizing out this critical step.
41
+ */
42
+ void deallocate(volatile pointer p, size_type n) {
43
+ std::memset(p, 0, n * sizeof(T));
44
+ // free using "global operator delete"
45
+ ::operator delete(p);
46
+ }
47
+
48
+ /**
49
+ * Construct an item in-place at pointer P.
50
+ */
51
+ template<typename... Args>
52
+ void construct(pointer p, Args&&... args) {
53
+ // construct using "placement new" and "perfect forwarding"
54
+ ::new (static_cast<void*>(p)) T(std::forward<Args>(args)...);
55
+ }
56
+
57
+ size_type max_size() const {
58
+ return size_t(-1) / sizeof(T);
59
+ }
60
+
61
+ pointer address( reference x ) const {
62
+ return std::addressof(x);
63
+ }
64
+
65
+ const_pointer address( const_reference x ) const {
66
+ return std::addressof(x);
67
+ }
68
+
69
+ /**
70
+ * Destroy an item in-place at pointer P.
71
+ */
72
+ void destroy(pointer p) {
73
+ // destroy using "explicit destructor"
74
+ p->~T();
75
+ }
76
+
77
+ // Boilerplate
78
+ SecureAllocator() {}
79
+ template<typename U> SecureAllocator(const SecureAllocator<U>&) {}
80
+ template<typename U> struct rebind { using other = SecureAllocator<U>; };
81
+ };
82
+
83
+
84
+ template<typename T, typename U>
85
+ bool operator==(const SecureAllocator<T>&, const SecureAllocator<U>&) {
86
+ return true;
87
+ }
88
+
89
+ template<typename T, typename U>
90
+ bool operator!=(const SecureAllocator<T>&, const SecureAllocator<U>&) {
91
+ return false;
92
+ }
93
+
94
+ } //namespace Json
95
+
96
+ #pragma pack(pop)
97
+
98
+ #endif // CPPTL_JSON_ALLOCATOR_H_INCLUDED
@@ -0,0 +1,54 @@
1
+ // Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
2
+ // Distributed under MIT license, or public domain if desired and
3
+ // recognized in your jurisdiction.
4
+ // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5
+
6
+ #ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED
7
+ #define CPPTL_JSON_ASSERTIONS_H_INCLUDED
8
+
9
+ #include <stdlib.h>
10
+ #include <sstream>
11
+
12
+ #if !defined(JSON_IS_AMALGAMATION)
13
+ #include "config.h"
14
+ #endif // if !defined(JSON_IS_AMALGAMATION)
15
+
16
+ /** It should not be possible for a maliciously designed file to
17
+ * cause an abort() or seg-fault, so these macros are used only
18
+ * for pre-condition violations and internal logic errors.
19
+ */
20
+ #if JSON_USE_EXCEPTION
21
+
22
+ // @todo <= add detail about condition in exception
23
+ # define JSON_ASSERT(condition) \
24
+ {if (!(condition)) {Json::throwLogicError( "assert json failed" );}}
25
+
26
+ # define JSON_FAIL_MESSAGE(message) \
27
+ { \
28
+ JSONCPP_OSTRINGSTREAM oss; oss << message; \
29
+ Json::throwLogicError(oss.str()); \
30
+ abort(); \
31
+ }
32
+
33
+ #else // JSON_USE_EXCEPTION
34
+
35
+ # define JSON_ASSERT(condition) assert(condition)
36
+
37
+ // The call to assert() will show the failure message in debug builds. In
38
+ // release builds we abort, for a core-dump or debugger.
39
+ # define JSON_FAIL_MESSAGE(message) \
40
+ { \
41
+ JSONCPP_OSTRINGSTREAM oss; oss << message; \
42
+ assert(false && oss.str().c_str()); \
43
+ abort(); \
44
+ }
45
+
46
+
47
+ #endif
48
+
49
+ #define JSON_ASSERT_MESSAGE(condition, message) \
50
+ if (!(condition)) { \
51
+ JSON_FAIL_MESSAGE(message); \
52
+ }
53
+
54
+ #endif // CPPTL_JSON_ASSERTIONS_H_INCLUDED
@@ -0,0 +1,25 @@
1
+ // Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
2
+ // Distributed under MIT license, or public domain if desired and
3
+ // recognized in your jurisdiction.
4
+ // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5
+
6
+ #ifndef JSON_AUTOLINK_H_INCLUDED
7
+ #define JSON_AUTOLINK_H_INCLUDED
8
+
9
+ #include "config.h"
10
+
11
+ #ifdef JSON_IN_CPPTL
12
+ #include <cpptl/cpptl_autolink.h>
13
+ #endif
14
+
15
+ #if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) && \
16
+ !defined(JSON_IN_CPPTL)
17
+ #define CPPTL_AUTOLINK_NAME "json"
18
+ #undef CPPTL_AUTOLINK_DLL
19
+ #ifdef JSON_DLL
20
+ #define CPPTL_AUTOLINK_DLL
21
+ #endif
22
+ #include "autolink.h"
23
+ #endif
24
+
25
+ #endif // JSON_AUTOLINK_H_INCLUDED
@@ -0,0 +1,187 @@
1
+ // Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
2
+ // Distributed under MIT license, or public domain if desired and
3
+ // recognized in your jurisdiction.
4
+ // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5
+
6
+ #ifndef JSON_CONFIG_H_INCLUDED
7
+ #define JSON_CONFIG_H_INCLUDED
8
+ #include <stddef.h>
9
+ #include <string> //typedef String
10
+ #include <stdint.h> //typedef int64_t, uint64_t
11
+
12
+ /// If defined, indicates that json library is embedded in CppTL library.
13
+ //# define JSON_IN_CPPTL 1
14
+
15
+ /// If defined, indicates that json may leverage CppTL library
16
+ //# define JSON_USE_CPPTL 1
17
+ /// If defined, indicates that cpptl vector based map should be used instead of
18
+ /// std::map
19
+ /// as Value container.
20
+ //# define JSON_USE_CPPTL_SMALLMAP 1
21
+
22
+ // If non-zero, the library uses exceptions to report bad input instead of C
23
+ // assertion macros. The default is to use exceptions.
24
+ #ifndef JSON_USE_EXCEPTION
25
+ #define JSON_USE_EXCEPTION 1
26
+ #endif
27
+
28
+ /// If defined, indicates that the source file is amalgamated
29
+ /// to prevent private header inclusion.
30
+ /// Remarks: it is automatically defined in the generated amalgamated header.
31
+ // #define JSON_IS_AMALGAMATION
32
+
33
+ #ifdef JSON_IN_CPPTL
34
+ #include <cpptl/config.h>
35
+ #ifndef JSON_USE_CPPTL
36
+ #define JSON_USE_CPPTL 1
37
+ #endif
38
+ #endif
39
+
40
+ #ifdef JSON_IN_CPPTL
41
+ #define JSON_API CPPTL_API
42
+ #elif defined(JSON_DLL_BUILD)
43
+ #if defined(_MSC_VER) || defined(__MINGW32__)
44
+ #define JSON_API __declspec(dllexport)
45
+ #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
46
+ #endif // if defined(_MSC_VER)
47
+ #elif defined(JSON_DLL)
48
+ #if defined(_MSC_VER) || defined(__MINGW32__)
49
+ #define JSON_API __declspec(dllimport)
50
+ #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
51
+ #endif // if defined(_MSC_VER)
52
+ #endif // ifdef JSON_IN_CPPTL
53
+ #if !defined(JSON_API)
54
+ #define JSON_API
55
+ #endif
56
+
57
+ // If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
58
+ // integer
59
+ // Storages, and 64 bits integer support is disabled.
60
+ // #define JSON_NO_INT64 1
61
+
62
+ #if defined(_MSC_VER) // MSVC
63
+ # if _MSC_VER <= 1200 // MSVC 6
64
+ // Microsoft Visual Studio 6 only support conversion from __int64 to double
65
+ // (no conversion from unsigned __int64).
66
+ # define JSON_USE_INT64_DOUBLE_CONVERSION 1
67
+ // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
68
+ // characters in the debug information)
69
+ // All projects I've ever seen with VS6 were using this globally (not bothering
70
+ // with pragma push/pop).
71
+ # pragma warning(disable : 4786)
72
+ # endif // MSVC 6
73
+
74
+ # if _MSC_VER >= 1500 // MSVC 2008
75
+ /// Indicates that the following function is deprecated.
76
+ # define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
77
+ # endif
78
+
79
+ #endif // defined(_MSC_VER)
80
+
81
+ // In c++11 the override keyword allows you to explicitly define that a function
82
+ // is intended to override the base-class version. This makes the code more
83
+ // managable and fixes a set of common hard-to-find bugs.
84
+ #if __cplusplus >= 201103L
85
+ # define JSONCPP_OVERRIDE override
86
+ # define JSONCPP_NOEXCEPT noexcept
87
+ #elif defined(_MSC_VER) && _MSC_VER > 1600 && _MSC_VER < 1900
88
+ # define JSONCPP_OVERRIDE override
89
+ # define JSONCPP_NOEXCEPT throw()
90
+ #elif defined(_MSC_VER) && _MSC_VER >= 1900
91
+ # define JSONCPP_OVERRIDE override
92
+ # define JSONCPP_NOEXCEPT noexcept
93
+ #else
94
+ # define JSONCPP_OVERRIDE
95
+ # define JSONCPP_NOEXCEPT throw()
96
+ #endif
97
+
98
+ #ifndef JSON_HAS_RVALUE_REFERENCES
99
+
100
+ #if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010
101
+ #define JSON_HAS_RVALUE_REFERENCES 1
102
+ #endif // MSVC >= 2010
103
+
104
+ #ifdef __clang__
105
+ #if __has_feature(cxx_rvalue_references)
106
+ #define JSON_HAS_RVALUE_REFERENCES 1
107
+ #endif // has_feature
108
+
109
+ #elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc)
110
+ #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)
111
+ #define JSON_HAS_RVALUE_REFERENCES 1
112
+ #endif // GXX_EXPERIMENTAL
113
+
114
+ #endif // __clang__ || __GNUC__
115
+
116
+ #endif // not defined JSON_HAS_RVALUE_REFERENCES
117
+
118
+ #ifndef JSON_HAS_RVALUE_REFERENCES
119
+ #define JSON_HAS_RVALUE_REFERENCES 0
120
+ #endif
121
+
122
+ #ifdef __clang__
123
+ # if __has_extension(attribute_deprecated_with_message)
124
+ # define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
125
+ # endif
126
+ #elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc)
127
+ # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
128
+ # define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
129
+ # elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
130
+ # define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
131
+ # endif // GNUC version
132
+ #endif // __clang__ || __GNUC__
133
+
134
+ #if !defined(JSONCPP_DEPRECATED)
135
+ #define JSONCPP_DEPRECATED(message)
136
+ #endif // if !defined(JSONCPP_DEPRECATED)
137
+
138
+ #if __GNUC__ >= 6
139
+ # define JSON_USE_INT64_DOUBLE_CONVERSION 1
140
+ #endif
141
+
142
+ #if !defined(JSON_IS_AMALGAMATION)
143
+
144
+ # include "version.h"
145
+
146
+ # if JSONCPP_USING_SECURE_MEMORY
147
+ # include "allocator.h" //typedef Allocator
148
+ # endif
149
+
150
+ #endif // if !defined(JSON_IS_AMALGAMATION)
151
+
152
+ namespace Json {
153
+ typedef int Int;
154
+ typedef unsigned int UInt;
155
+ #if defined(JSON_NO_INT64)
156
+ typedef int LargestInt;
157
+ typedef unsigned int LargestUInt;
158
+ #undef JSON_HAS_INT64
159
+ #else // if defined(JSON_NO_INT64)
160
+ // For Microsoft Visual use specific types as long long is not supported
161
+ #if defined(_MSC_VER) // Microsoft Visual Studio
162
+ typedef __int64 Int64;
163
+ typedef unsigned __int64 UInt64;
164
+ #else // if defined(_MSC_VER) // Other platforms, use long long
165
+ typedef int64_t Int64;
166
+ typedef uint64_t UInt64;
167
+ #endif // if defined(_MSC_VER)
168
+ typedef Int64 LargestInt;
169
+ typedef UInt64 LargestUInt;
170
+ #define JSON_HAS_INT64
171
+ #endif // if defined(JSON_NO_INT64)
172
+ #if JSONCPP_USING_SECURE_MEMORY
173
+ #define JSONCPP_STRING std::basic_string<char, std::char_traits<char>, Json::SecureAllocator<char> >
174
+ #define JSONCPP_OSTRINGSTREAM std::basic_ostringstream<char, std::char_traits<char>, Json::SecureAllocator<char> >
175
+ #define JSONCPP_OSTREAM std::basic_ostream<char, std::char_traits<char>>
176
+ #define JSONCPP_ISTRINGSTREAM std::basic_istringstream<char, std::char_traits<char>, Json::SecureAllocator<char> >
177
+ #define JSONCPP_ISTREAM std::istream
178
+ #else
179
+ #define JSONCPP_STRING std::string
180
+ #define JSONCPP_OSTRINGSTREAM std::ostringstream
181
+ #define JSONCPP_OSTREAM std::ostream
182
+ #define JSONCPP_ISTRINGSTREAM std::istringstream
183
+ #define JSONCPP_ISTREAM std::istream
184
+ #endif // if JSONCPP_USING_SECURE_MEMORY
185
+ } // end namespace Json
186
+
187
+ #endif // JSON_CONFIG_H_INCLUDED
@@ -0,0 +1,61 @@
1
+ // Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
2
+ // Distributed under MIT license, or public domain if desired and
3
+ // recognized in your jurisdiction.
4
+ // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5
+
6
+ #ifndef CPPTL_JSON_FEATURES_H_INCLUDED
7
+ #define CPPTL_JSON_FEATURES_H_INCLUDED
8
+
9
+ #if !defined(JSON_IS_AMALGAMATION)
10
+ #include "forwards.h"
11
+ #endif // if !defined(JSON_IS_AMALGAMATION)
12
+
13
+ #pragma pack(push, 8)
14
+
15
+ namespace Json {
16
+
17
+ /** \brief Configuration passed to reader and writer.
18
+ * This configuration object can be used to force the Reader or Writer
19
+ * to behave in a standard conforming way.
20
+ */
21
+ class JSON_API Features {
22
+ public:
23
+ /** \brief A configuration that allows all features and assumes all strings
24
+ * are UTF-8.
25
+ * - C & C++ comments are allowed
26
+ * - Root object can be any JSON value
27
+ * - Assumes Value strings are encoded in UTF-8
28
+ */
29
+ static Features all();
30
+
31
+ /** \brief A configuration that is strictly compatible with the JSON
32
+ * specification.
33
+ * - Comments are forbidden.
34
+ * - Root object must be either an array or an object value.
35
+ * - Assumes Value strings are encoded in UTF-8
36
+ */
37
+ static Features strictMode();
38
+
39
+ /** \brief Initialize the configuration like JsonConfig::allFeatures;
40
+ */
41
+ Features();
42
+
43
+ /// \c true if comments are allowed. Default: \c true.
44
+ bool allowComments_;
45
+
46
+ /// \c true if root must be either an array or an object value. Default: \c
47
+ /// false.
48
+ bool strictRoot_;
49
+
50
+ /// \c true if dropped null placeholders are allowed. Default: \c false.
51
+ bool allowDroppedNullPlaceholders_;
52
+
53
+ /// \c true if numeric object key are allowed. Default: \c false.
54
+ bool allowNumericKeys_;
55
+ };
56
+
57
+ } // namespace Json
58
+
59
+ #pragma pack(pop)
60
+
61
+ #endif // CPPTL_JSON_FEATURES_H_INCLUDED
@@ -0,0 +1,37 @@
1
+ // Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
2
+ // Distributed under MIT license, or public domain if desired and
3
+ // recognized in your jurisdiction.
4
+ // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5
+
6
+ #ifndef JSON_FORWARDS_H_INCLUDED
7
+ #define JSON_FORWARDS_H_INCLUDED
8
+
9
+ #if !defined(JSON_IS_AMALGAMATION)
10
+ #include "config.h"
11
+ #endif // if !defined(JSON_IS_AMALGAMATION)
12
+
13
+ namespace Json {
14
+
15
+ // writer.h
16
+ class FastWriter;
17
+ class StyledWriter;
18
+
19
+ // reader.h
20
+ class Reader;
21
+
22
+ // features.h
23
+ class Features;
24
+
25
+ // value.h
26
+ typedef unsigned int ArrayIndex;
27
+ class StaticString;
28
+ class Path;
29
+ class PathArgument;
30
+ class Value;
31
+ class ValueIteratorBase;
32
+ class ValueIterator;
33
+ class ValueConstIterator;
34
+
35
+ } // namespace Json
36
+
37
+ #endif // JSON_FORWARDS_H_INCLUDED
@@ -0,0 +1,15 @@
1
+ // Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
2
+ // Distributed under MIT license, or public domain if desired and
3
+ // recognized in your jurisdiction.
4
+ // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5
+
6
+ #ifndef JSON_JSON_H_INCLUDED
7
+ #define JSON_JSON_H_INCLUDED
8
+
9
+ #include "autolink.h"
10
+ #include "value.h"
11
+ #include "reader.h"
12
+ #include "writer.h"
13
+ #include "features.h"
14
+
15
+ #endif // JSON_JSON_H_INCLUDED