react-native-mmkv 3.3.0 → 4.0.0-beta.1

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 (95) hide show
  1. package/android/CMakeLists.txt +18 -9
  2. package/android/build.gradle +6 -2
  3. package/cpp/{MMKVManagedBuffer.h → ManagedMMBuffer.h} +6 -6
  4. package/cpp/MmkvHostObject.cpp +13 -8
  5. package/cpp/MmkvHostObject.h +1 -2
  6. package/cpp/MmkvTypes.h +50 -0
  7. package/cpp/NativeMmkvModule.cpp +3 -3
  8. package/cpp/NativeMmkvModule.h +1 -8
  9. package/lib/commonjs/hooks.js +2 -2
  10. package/lib/commonjs/hooks.js.map +1 -1
  11. package/lib/module/hooks.js +2 -2
  12. package/lib/module/hooks.js.map +1 -1
  13. package/lib/typescript/src/MemoryWarningListener.web.d.ts.map +1 -1
  14. package/lib/typescript/src/createMMKV.d.ts.map +1 -1
  15. package/lib/typescript/src/createMMKV.web.d.ts.map +1 -1
  16. package/package.json +24 -24
  17. package/react-native-mmkv.podspec +3 -9
  18. package/react-native.config.js +9 -0
  19. package/src/hooks.ts +2 -2
  20. package/MMKV/Core/CMakeLists.txt +0 -172
  21. package/MMKV/Core/CodedInputData.cpp +0 -252
  22. package/MMKV/Core/CodedInputData.h +0 -87
  23. package/MMKV/Core/CodedInputDataCrypt.cpp +0 -280
  24. package/MMKV/Core/CodedInputDataCrypt.h +0 -87
  25. package/MMKV/Core/CodedInputDataCrypt_OSX.cpp +0 -62
  26. package/MMKV/Core/CodedInputData_OSX.cpp +0 -92
  27. package/MMKV/Core/CodedOutputData.cpp +0 -186
  28. package/MMKV/Core/CodedOutputData.h +0 -88
  29. package/MMKV/Core/Core.xcodeproj/project.pbxproj +0 -707
  30. package/MMKV/Core/Core.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  31. package/MMKV/Core/Core.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  32. package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/Core.xcscheme +0 -67
  33. package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/MMKVWatchCore.xcscheme +0 -67
  34. package/MMKV/Core/InterProcessLock.cpp +0 -186
  35. package/MMKV/Core/InterProcessLock.h +0 -119
  36. package/MMKV/Core/InterProcessLock_Android.cpp +0 -103
  37. package/MMKV/Core/InterProcessLock_Win32.cpp +0 -108
  38. package/MMKV/Core/KeyValueHolder.cpp +0 -236
  39. package/MMKV/Core/KeyValueHolder.h +0 -122
  40. package/MMKV/Core/MMBuffer.cpp +0 -210
  41. package/MMKV/Core/MMBuffer.h +0 -111
  42. package/MMKV/Core/MMKV.cpp +0 -1702
  43. package/MMKV/Core/MMKV.h +0 -595
  44. package/MMKV/Core/MMKVLog.cpp +0 -127
  45. package/MMKV/Core/MMKVLog.h +0 -86
  46. package/MMKV/Core/MMKVLog_Android.cpp +0 -134
  47. package/MMKV/Core/MMKVMetaInfo.hpp +0 -99
  48. package/MMKV/Core/MMKVPredef.h +0 -293
  49. package/MMKV/Core/MMKV_Android.cpp +0 -261
  50. package/MMKV/Core/MMKV_IO.cpp +0 -1905
  51. package/MMKV/Core/MMKV_IO.h +0 -57
  52. package/MMKV/Core/MMKV_OSX.cpp +0 -423
  53. package/MMKV/Core/MMKV_OSX.h +0 -57
  54. package/MMKV/Core/MemoryFile.cpp +0 -603
  55. package/MMKV/Core/MemoryFile.h +0 -194
  56. package/MMKV/Core/MemoryFile_Android.cpp +0 -236
  57. package/MMKV/Core/MemoryFile_Linux.cpp +0 -125
  58. package/MMKV/Core/MemoryFile_OSX.cpp +0 -142
  59. package/MMKV/Core/MemoryFile_Win32.cpp +0 -554
  60. package/MMKV/Core/MiniPBCoder.cpp +0 -672
  61. package/MMKV/Core/MiniPBCoder.h +0 -151
  62. package/MMKV/Core/MiniPBCoder_OSX.cpp +0 -237
  63. package/MMKV/Core/PBEncodeItem.hpp +0 -104
  64. package/MMKV/Core/PBUtility.cpp +0 -61
  65. package/MMKV/Core/PBUtility.h +0 -148
  66. package/MMKV/Core/ScopedLock.hpp +0 -69
  67. package/MMKV/Core/ThreadLock.cpp +0 -75
  68. package/MMKV/Core/ThreadLock.h +0 -81
  69. package/MMKV/Core/ThreadLock_Win32.cpp +0 -89
  70. package/MMKV/Core/aes/AESCrypt.cpp +0 -273
  71. package/MMKV/Core/aes/AESCrypt.h +0 -112
  72. package/MMKV/Core/aes/openssl/openssl_aes-armv4.S +0 -1243
  73. package/MMKV/Core/aes/openssl/openssl_aes.h +0 -130
  74. package/MMKV/Core/aes/openssl/openssl_aes_core.cpp +0 -1044
  75. package/MMKV/Core/aes/openssl/openssl_aes_locl.h +0 -38
  76. package/MMKV/Core/aes/openssl/openssl_aesv8-armx.S +0 -308
  77. package/MMKV/Core/aes/openssl/openssl_arm_arch.h +0 -84
  78. package/MMKV/Core/aes/openssl/openssl_cfb128.cpp +0 -97
  79. package/MMKV/Core/aes/openssl/openssl_md32_common.h +0 -254
  80. package/MMKV/Core/aes/openssl/openssl_md5.h +0 -49
  81. package/MMKV/Core/aes/openssl/openssl_md5_dgst.cpp +0 -166
  82. package/MMKV/Core/aes/openssl/openssl_md5_locl.h +0 -75
  83. package/MMKV/Core/aes/openssl/openssl_md5_one.cpp +0 -30
  84. package/MMKV/Core/aes/openssl/openssl_opensslconf.h +0 -271
  85. package/MMKV/Core/core.vcxproj +0 -288
  86. package/MMKV/Core/core.vcxproj.filters +0 -150
  87. package/MMKV/Core/crc32/Checksum.h +0 -75
  88. package/MMKV/Core/crc32/crc32_armv8.cpp +0 -134
  89. package/MMKV/Core/crc32/zlib/CMakeLists.txt +0 -60
  90. package/MMKV/Core/crc32/zlib/crc32.cpp +0 -55
  91. package/MMKV/Core/crc32/zlib/crc32.h +0 -48
  92. package/MMKV/Core/crc32/zlib/zconf.h +0 -380
  93. package/MMKV/Core/crc32/zlib/zutil.h +0 -25
  94. package/MMKV/LICENSE.TXT +0 -193
  95. package/MMKV/README.md +0 -354
@@ -1,88 +0,0 @@
1
- /*
2
- * Tencent is pleased to support the open source community by making
3
- * MMKV available.
4
- *
5
- * Copyright (C) 2018 THL A29 Limited, a Tencent company.
6
- * All rights reserved.
7
- *
8
- * Licensed under the BSD 3-Clause License (the "License"); you may not use
9
- * this file except in compliance with the License. You may obtain a copy of
10
- * the License at
11
- *
12
- * https://opensource.org/licenses/BSD-3-Clause
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- */
20
-
21
- #ifndef MMKV_CODEDOUTPUTDATA_H
22
- #define MMKV_CODEDOUTPUTDATA_H
23
- #ifdef __cplusplus
24
-
25
- #include "MMKVPredef.h"
26
-
27
- #include "MMBuffer.h"
28
- #include <cstdint>
29
-
30
- namespace mmkv {
31
-
32
- class CodedOutputData {
33
- uint8_t *const m_ptr;
34
- size_t m_size;
35
- size_t m_position;
36
-
37
- public:
38
- CodedOutputData(void *ptr, size_t len);
39
-
40
- size_t spaceLeft();
41
-
42
- uint8_t *curWritePointer();
43
-
44
- void seek(size_t addedSize);
45
-
46
- void reset();
47
-
48
- size_t getPosition();
49
-
50
- void setPosition(size_t position);
51
-
52
- void writeRawByte(uint8_t value);
53
-
54
- void writeRawLittleEndian32(int32_t value);
55
-
56
- void writeRawLittleEndian64(int64_t value);
57
-
58
- void writeRawVarint32(int32_t value);
59
-
60
- void writeRawVarint64(int64_t value);
61
-
62
- void writeRawData(const MMBuffer &data);
63
-
64
- void writeDouble(double value);
65
-
66
- void writeFloat(float value);
67
-
68
- void writeInt64(int64_t value);
69
-
70
- void writeUInt64(uint64_t value);
71
-
72
- void writeInt32(int32_t value);
73
-
74
- void writeUInt32(uint32_t value);
75
-
76
- void writeBool(bool value);
77
-
78
- void writeData(const MMBuffer &value);
79
-
80
- #ifndef MMKV_APPLE
81
- void writeString(const std::string &value);
82
- #endif
83
- };
84
-
85
- } // namespace mmkv
86
-
87
- #endif
88
- #endif //MMKV_CODEDOUTPUTDATA_H