@react-native-ohos/react-native-mmkv 3.3.1-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.
- package/MMKV/Core/CMakeLists.txt +172 -0
- package/MMKV/Core/CodedInputData.cpp +252 -0
- package/MMKV/Core/CodedInputData.h +87 -0
- package/MMKV/Core/CodedInputDataCrypt.cpp +280 -0
- package/MMKV/Core/CodedInputDataCrypt.h +87 -0
- package/MMKV/Core/CodedInputDataCrypt_OSX.cpp +62 -0
- package/MMKV/Core/CodedInputData_OSX.cpp +92 -0
- package/MMKV/Core/CodedOutputData.cpp +186 -0
- package/MMKV/Core/CodedOutputData.h +88 -0
- package/MMKV/Core/Core.xcodeproj/project.pbxproj +707 -0
- package/MMKV/Core/Core.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/MMKV/Core/Core.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/Core.xcscheme +67 -0
- package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/MMKVWatchCore.xcscheme +67 -0
- package/MMKV/Core/InterProcessLock.cpp +186 -0
- package/MMKV/Core/InterProcessLock.h +119 -0
- package/MMKV/Core/InterProcessLock_Android.cpp +103 -0
- package/MMKV/Core/InterProcessLock_Win32.cpp +108 -0
- package/MMKV/Core/KeyValueHolder.cpp +236 -0
- package/MMKV/Core/KeyValueHolder.h +122 -0
- package/MMKV/Core/MMBuffer.cpp +210 -0
- package/MMKV/Core/MMBuffer.h +111 -0
- package/MMKV/Core/MMKV.cpp +1702 -0
- package/MMKV/Core/MMKV.h +595 -0
- package/MMKV/Core/MMKVLog.cpp +127 -0
- package/MMKV/Core/MMKVLog.h +86 -0
- package/MMKV/Core/MMKVLog_Android.cpp +134 -0
- package/MMKV/Core/MMKVMetaInfo.hpp +99 -0
- package/MMKV/Core/MMKVPredef.h +293 -0
- package/MMKV/Core/MMKV_Android.cpp +261 -0
- package/MMKV/Core/MMKV_IO.cpp +1905 -0
- package/MMKV/Core/MMKV_IO.h +57 -0
- package/MMKV/Core/MMKV_OSX.cpp +423 -0
- package/MMKV/Core/MMKV_OSX.h +57 -0
- package/MMKV/Core/MemoryFile.cpp +603 -0
- package/MMKV/Core/MemoryFile.h +194 -0
- package/MMKV/Core/MemoryFile_Android.cpp +236 -0
- package/MMKV/Core/MemoryFile_Linux.cpp +125 -0
- package/MMKV/Core/MemoryFile_OSX.cpp +142 -0
- package/MMKV/Core/MemoryFile_Win32.cpp +554 -0
- package/MMKV/Core/MiniPBCoder.cpp +672 -0
- package/MMKV/Core/MiniPBCoder.h +151 -0
- package/MMKV/Core/MiniPBCoder_OSX.cpp +237 -0
- package/MMKV/Core/PBEncodeItem.hpp +104 -0
- package/MMKV/Core/PBUtility.cpp +61 -0
- package/MMKV/Core/PBUtility.h +148 -0
- package/MMKV/Core/ScopedLock.hpp +69 -0
- package/MMKV/Core/ThreadLock.cpp +75 -0
- package/MMKV/Core/ThreadLock.h +81 -0
- package/MMKV/Core/ThreadLock_Win32.cpp +89 -0
- package/MMKV/Core/aes/AESCrypt.cpp +273 -0
- package/MMKV/Core/aes/AESCrypt.h +112 -0
- package/MMKV/Core/aes/openssl/openssl_aes-armv4.S +1243 -0
- package/MMKV/Core/aes/openssl/openssl_aes.h +130 -0
- package/MMKV/Core/aes/openssl/openssl_aes_core.cpp +1044 -0
- package/MMKV/Core/aes/openssl/openssl_aes_locl.h +38 -0
- package/MMKV/Core/aes/openssl/openssl_aesv8-armx.S +308 -0
- package/MMKV/Core/aes/openssl/openssl_arm_arch.h +84 -0
- package/MMKV/Core/aes/openssl/openssl_cfb128.cpp +97 -0
- package/MMKV/Core/aes/openssl/openssl_md32_common.h +254 -0
- package/MMKV/Core/aes/openssl/openssl_md5.h +49 -0
- package/MMKV/Core/aes/openssl/openssl_md5_dgst.cpp +166 -0
- package/MMKV/Core/aes/openssl/openssl_md5_locl.h +75 -0
- package/MMKV/Core/aes/openssl/openssl_md5_one.cpp +30 -0
- package/MMKV/Core/aes/openssl/openssl_opensslconf.h +271 -0
- package/MMKV/Core/core.vcxproj +288 -0
- package/MMKV/Core/core.vcxproj.filters +150 -0
- package/MMKV/Core/crc32/Checksum.h +75 -0
- package/MMKV/Core/crc32/crc32_armv8.cpp +134 -0
- package/MMKV/Core/crc32/zlib/CMakeLists.txt +60 -0
- package/MMKV/Core/crc32/zlib/crc32.cpp +55 -0
- package/MMKV/Core/crc32/zlib/crc32.h +48 -0
- package/MMKV/Core/crc32/zlib/zconf.h +380 -0
- package/MMKV/Core/crc32/zlib/zutil.h +25 -0
- package/MMKV/LICENSE.TXT +193 -0
- package/MMKV/README.md +354 -0
- package/README.md +5 -0
- package/cpp/MMKVManagedBuffer.h +32 -0
- package/cpp/MmkvHostObject.cpp +355 -0
- package/cpp/MmkvHostObject.h +32 -0
- package/cpp/MmkvLogger.h +35 -0
- package/cpp/NativeMmkvModule.cpp +43 -0
- package/cpp/NativeMmkvModule.h +38 -0
- package/harmony/reactNativeMMKV/BuildProfile.ets +17 -0
- package/harmony/reactNativeMMKV/LICENSE +20 -0
- package/harmony/reactNativeMMKV/NOTICE +34 -0
- package/harmony/reactNativeMMKV/README.OpenSource +11 -0
- package/harmony/reactNativeMMKV/build-profile.json5 +9 -0
- package/harmony/reactNativeMMKV/hvigorfile.ts +6 -0
- package/harmony/reactNativeMMKV/index.ets +24 -0
- package/harmony/reactNativeMMKV/oh-package.json5 +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/CMakeLists.txt +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/ComponentDescriptors.h +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/EventEmitters.cpp +41 -0
- package/harmony/reactNativeMMKV/src/main/cpp/EventEmitters.h +182 -0
- package/harmony/reactNativeMMKV/src/main/cpp/HarmonyLogger.cpp +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.clang-format +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.dockerignore +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.github/FUNDING.yml +14 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.github/ISSUE_TEMPLATE/bug_report.md +45 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.gitmodules +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/build.gradle +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/checkstyle.xml +156 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/debug.keystore +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/android-publish-private.gradle +207 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/android-publish.gradle +276 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/build_library.gradle +62 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/check.gradle +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle.properties +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradlew +172 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradlew.bat +84 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/CMakeLists.txt +56 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/build.gradle +238 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/gradle.properties +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/proguard-rules.pro +9 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/androidTest/AndroidManifest.xml +11 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/androidTest/java/com/tencent/mmkv/MMKVTest.java +270 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/androidTest/java/com/tencent/mmkv/MMKVTestService.java +79 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/AndroidManifest.xml +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/aidl/com/tencent/mmkv/ParcelableMMKV.aidl +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/cpp/flutter-bridge.cpp +706 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/cpp/native-bridge.cpp +1244 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKV.java +2024 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVContentChangeNotification.java +34 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVContentProvider.java +174 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVHandler.java +63 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVLogLevel.java +52 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVProcessUtil.java +100 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVRecoverStrategic.java +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/NameSpace.java +214 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/NativeBuffer.java +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/ParcelableMMKV.java +108 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/UnsupportedArchitectureException.java +27 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvannotation/build.gradle +34 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvannotation/src/main/AndroidManifest.xml +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvannotation/src/main/java/dalvik/annotation/optimization/FastNative.java +104 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/build.gradle +116 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/proguard-rules.pro +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/AndroidManifest.xml +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/aidl/com/tencent/mmkvdemo/IAshmemMMKV.aidl +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/cpp/CMakeLists.txt +50 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/cpp/mmkvdemo.cpp +245 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/Baseline.java +297 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/BenchMarkBaseService.java +363 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/FakeInfo.java +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/Info.java +69 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MainActivity.java +1029 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MultiProcessSharedPreferences.java +710 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyApplication.java +130 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyService.java +105 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyService_1.java +92 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/SQLiteKV.java +143 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/TestParcelable.java +70 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/kotlin/KotlinUsecase.kt +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/drawable/ic_launcher_background.xml +170 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/layout/activity_main.xml +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/values/colors.xml +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/values/strings.xml +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/values/styles.xml +11 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/pmd-ruleset.xml +44 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/proguard-rules/proguard-rules-android-lib.pro +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/proguard-rules/proguard-rules-test.pro +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/settings.gradle +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/CHANGELOG.md +979 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/CODE_OF_CONDUCT.md +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/CONTRIBUTING.md +61 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CMakeLists.txt +207 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputData.cpp +248 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputData.h +86 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputDataCrypt.cpp +276 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputDataCrypt.h +86 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputDataCrypt_OSX.cpp +62 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputData_OSX.cpp +92 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedOutputData.cpp +182 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedOutputData.h +86 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/project.pbxproj +703 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/Core.xcscheme +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/MMKVWatchCore.xcscheme +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock.cpp +211 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock.h +124 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock_Android.cpp +104 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock_Win32.cpp +108 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/KeyValueHolder.cpp +237 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/KeyValueHolder.h +122 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMBuffer.cpp +207 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMBuffer.h +119 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV.cpp +1791 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV.h +781 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVLog.cpp +127 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVLog.h +86 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVLog_Android.cpp +134 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVMetaInfo.hpp +99 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVPredef.h +310 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_Android.cpp +365 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_IO.cpp +2049 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_IO.h +85 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_OSX.cpp +589 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_OSX.h +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile.cpp +716 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile.h +212 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_Android.cpp +247 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_Linux.cpp +126 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_OSX.cpp +173 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_Win32.cpp +655 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MiniPBCoder.cpp +668 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MiniPBCoder.h +150 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MiniPBCoder_OSX.cpp +237 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/PBEncodeItem.hpp +102 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/PBUtility.cpp +61 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/PBUtility.h +148 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ScopedLock.hpp +69 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ThreadLock.cpp +75 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ThreadLock.h +81 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ThreadLock_Win32.cpp +89 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/AESCrypt.cpp +293 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/AESCrypt.h +117 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aes.h +98 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aes_core.cpp +1044 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aes_locl.h +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aesv8-armx.S +308 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_arm_arch.h +84 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_cfb128.cpp +97 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md32_common.h +254 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5.h +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5_dgst.cpp +166 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5_locl.h +75 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5_one.cpp +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_opensslconf.h +271 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/core.vcxproj +288 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/core.vcxproj.filters +150 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/CMakeLists.txt +60 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/Checksum.h +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/crc32_armv8.cpp +134 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/crc32.cpp +55 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/crc32.h +48 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/zconf.h +380 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/zutil.h +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Dockerfile +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/LICENSE.TXT +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKV.podspec +40 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKV.xcworkspace/contents.xcworkspacedata +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKV.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKVAppExtension.podspec +37 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKVCore.podspec +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKVWatchExtension.podspec +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Makefile +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/AppScope/app.json5 +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/AppScope/resources/base/element/string.json +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/AppScope/resources/base/media/app_icon.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/BuildProfile.ets +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/CHANGELOG.md +75 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/Index.ets +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/README.md +208 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/build-profile.json5 +40 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/consumer-rules.txt +61 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/example/Index.ets +686 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/example/Util.ets +31 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/hvigorfile.ts +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/obfuscation-rules.txt +18 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/oh-package.json5 +22 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/CMakeLists.txt +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/flutter-bridge.cpp +703 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/native_bridge.cpp +1840 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/types/libmmkv/index.d.ts +80 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/types/libmmkv/oh-package.json5 +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/MMKV.ets +1073 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/MMKVHandler.ets +111 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/MMKVLogLevel.ets +50 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/NativeBuffer.ets +34 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/Util.ts +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/module.json5 +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/build-profile.json5 +62 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/dependencies/hvigor-4.3.0.tgz +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/dependencies/hvigor-ohos-plugin-4.3.0.tgz +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/build-profile.json5 +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/hvigorfile.ts +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/obfuscation-rules.txt +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/oh-package.json5 +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/CMakeLists.txt +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/napi_init.cpp +233 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/types/libentry/index.d.ts +1 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/types/libentry/oh-package.json5 +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/Util/Baseline.ets +188 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/Util/MyMMKVHandler.ets +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/Util/Util.ets +220 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/entryability/EntryAbility.ets +107 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/pages/Index.ets +766 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/process/DemoProcess.ets +31 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/module.json5 +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/element/color.json +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/background.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/foreground.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/layered_image.json +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/startIcon.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/profile/main_pages.json +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/en_US/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/zh_CN/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/mock/mock-config.json5 +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/test/Ability.test.ets +55 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/test/List.test.ets +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/testability/TestAbility.ets +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/testability/pages/Index.ets +37 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets +110 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/module.json5 +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/element/color.json +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/media/icon.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/profile/test_pages.json +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/test/List.test.ets +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/test/LocalUnit.test.ets +53 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/hvigor/hvigor-config.json5 +21 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/hvigorfile.ts +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/oh-package.json5 +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/CMakeLists.txt +27 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/CMakeLists.txt +65 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/TestInterProcessLock.cpp +130 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/UnitTest.cpp +272 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/demo.cpp +1431 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/process.cpp +78 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/CMakeLists.txt +87 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/callback.go +121 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/go.mod +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/golang-bridge.cpp +731 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/golang-bridge.h +131 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/mmkv.go +817 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/mmkv_test.go +33 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/test/go.mod +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/test/main.go +455 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/src/CMakeLists.txt +83 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/src/libmmkv.cpp +21 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/CMakeLists.txt +62 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/README.md +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/demo.py +368 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/libmmkv_python.cpp +454 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.appveyor.yml +35 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.clang-format +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.clang-tidy +77 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.cmake-format.yaml +73 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.codespell-ignore-lines +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.gitattributes +1 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/CODEOWNERS +9 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/CONTRIBUTING.md +388 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml +61 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/dependabot.yml +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/labeler.yml +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/labeler_merged.yml +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/matchers/pylint.json +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/pull_request_template.md +19 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/ci.yml +1233 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/configure.yml +92 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/format.yml +60 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/labeler.yml +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/pip.yml +117 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/upstream.yml +116 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.pre-commit-config.yaml +156 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.readthedocs.yml +20 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/CMakeLists.txt +375 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/LICENSE +29 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/MANIFEST.in +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/README.rst +181 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/SECURITY.md +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/Doxyfile +21 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/_static/css/custom.css +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/chrono.rst +81 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/custom.rst +93 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/eigen.rst +310 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/functional.rst +109 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/index.rst +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/overview.rst +170 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/stl.rst +249 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/strings.rst +296 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/classes.rst +1335 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/embedding.rst +262 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/exceptions.rst +401 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/functions.rst +614 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/misc.rst +429 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/index.rst +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/numpy.rst +453 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/object.rst +286 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/utilities.rst +155 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/smart_ptrs.rst +174 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/basics.rst +307 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/benchmark.py +89 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/benchmark.rst +95 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/changelog.rst +3121 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/classes.rst +555 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/cmake/index.rst +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/compiling.rst +726 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/conf.py +369 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/faq.rst +308 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/index.rst +48 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/installing.rst +105 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/limitations.rst +72 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11-logo.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python1.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python1.svg +427 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python2.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python2.svg +427 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/reference.rst +130 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/release.rst +143 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/requirements.in +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/requirements.txt +275 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/upgrade.rst +594 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/attr.h +690 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/buffer_info.h +208 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/cast.h +1848 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/chrono.h +225 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/common.h +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/complex.h +74 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/class.h +754 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/common.h +1268 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/descr.h +172 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/init.h +434 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/internals.h +749 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/type_caster_base.h +1214 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/typeid.h +65 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen/common.h +9 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen/matrix.h +714 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen/tensor.h +517 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen.h +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/embed.h +313 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eval.h +156 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/functional.h +138 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/gil.h +219 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/gil_safe_call_once.h +91 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/iostream.h +265 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/numpy.h +2135 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/operators.h +202 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/options.h +92 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/pybind11.h +3026 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/pytypes.h +2604 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/stl/filesystem.h +115 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/stl.h +448 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/stl_bind.h +822 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/type_caster_pyobject_ptr.h +61 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/typing.h +239 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/noxfile.py +107 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/__init__.py +19 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/__main__.py +63 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/_version.py +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/commands.py +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/py.typed +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/setup_helpers.py +500 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pyproject.toml +87 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/setup.cfg +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/setup.py +149 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/CMakeLists.txt +589 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/conftest.py +224 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/constructor_stats.h +322 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/cross_module_gil_utils.cpp +111 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/cross_module_interleaved_error_already_set.cpp +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/eigen_tensor_avoid_stl_array.cpp +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/env.py +31 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_python_package/pytest.ini +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_python_package/test_files.py +296 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_setuptools/pytest.ini +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_setuptools/test_setuphelper.py +153 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/local_bindings.h +92 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/object.h +205 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pybind11_cross_module_tests.cpp +149 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pybind11_tests.cpp +131 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pybind11_tests.h +98 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pytest.ini +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/requirements.txt +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_async.cpp +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_async.py +26 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_buffers.cpp +259 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_buffers.py +230 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_builtin_casters.cpp +387 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_builtin_casters.py +530 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_call_policies.cpp +113 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_call_policies.py +249 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_callbacks.cpp +280 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_callbacks.py +227 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_chrono.cpp +81 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_chrono.py +207 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_class.cpp +656 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_class.py +503 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/CMakeLists.txt +80 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/embed.cpp +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +46 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/main.cpp +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +41 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/test.py +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_const_name.cpp +55 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_const_name.py +31 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_constants_and_functions.cpp +158 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_constants_and_functions.py +58 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_copy_move.cpp +544 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_copy_move.py +140 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_casters.cpp +217 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_casters.py +124 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_setup.cpp +41 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_setup.py +50 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_docstring_options.cpp +129 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_docstring_options.py +66 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_matrix.cpp +443 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_matrix.py +816 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_tensor.cpp +18 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_tensor.inl +332 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_tensor.py +290 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/CMakeLists.txt +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/catch.cpp +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/external_module.cpp +20 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/test_interpreter.cpp +488 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/test_interpreter.py +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/test_trampoline.py +18 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_enum.cpp +133 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_enum.py +270 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eval.cpp +118 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eval.py +52 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eval_call.py +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_exceptions.cpp +388 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_exceptions.h +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_exceptions.py +434 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_factory_constructors.cpp +430 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_factory_constructors.py +518 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_gil_scoped.cpp +144 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_gil_scoped.py +244 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_iostream.cpp +126 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_iostream.py +293 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_kwargs_and_defaults.cpp +325 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_kwargs_and_defaults.py +428 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_local_bindings.cpp +106 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_local_bindings.py +259 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_methods_and_attributes.cpp +492 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_methods_and_attributes.py +539 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_modules.cpp +125 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_modules.py +118 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_multiple_inheritance.cpp +341 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_multiple_inheritance.py +495 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_array.cpp +547 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_array.py +672 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_dtypes.cpp +639 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_dtypes.py +448 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_vectorize.cpp +107 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_vectorize.py +268 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_opaque_types.cpp +77 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_opaque_types.py +60 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_operator_overloading.cpp +281 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_operator_overloading.py +153 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pickling.cpp +194 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pickling.py +95 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_python_multiple_inheritance.cpp +45 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_python_multiple_inheritance.py +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pytypes.cpp +926 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pytypes.py +1050 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_sequences_and_iterators.cpp +600 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_sequences_and_iterators.py +267 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_smart_ptr.cpp +473 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_smart_ptr.py +317 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl.cpp +549 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl.py +383 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl_binders.cpp +275 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl_binders.py +395 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_tagbased_polymorphic.cpp +147 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_tagbased_polymorphic.py +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_thread.cpp +66 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_thread.py +44 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_type_caster_pyobject_ptr.cpp +167 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_type_caster_pyobject_ptr.py +122 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_union.cpp +22 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_union.py +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_a.cpp +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_a.py +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_b.cpp +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_b.py +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_vector_unique_ptr_member.cpp +54 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_vector_unique_ptr_member.py +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_virtual_functions.cpp +592 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_virtual_functions.py +460 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/valgrind-numpy-scipy.supp +140 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/valgrind-python.supp +117 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/FindCatch.cmake +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/FindEigen3.cmake +86 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/FindPythonLibsNew.cmake +310 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/JoinPaths.cmake +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/check-style.sh +44 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/cmake_uninstall.cmake.in +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/codespell_ignore_lines_from_errors.py +40 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/libsize.py +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/make_changelog.py +92 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11.pc.in +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11Common.cmake +429 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11Config.cmake.in +233 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11GuessPythonExtSuffix.cmake +86 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11NewTools.cmake +341 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11Tools.cmake +239 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pyproject.toml +3 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/setup_global.py.in +63 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/setup_main.py.in +44 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/test-pybind11GuessPythonExtSuffix.cmake +161 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/setup.py +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/unit_test.py +209 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/README.md +357 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/README_CN.md +301 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/SECURITY.md +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Script/dumpJavaSignature.py +144 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Script/formatCode.py +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/.clang-format +35 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32.sln +58 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/Win32Demo.cpp +548 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/Win32Demo.vcxproj +190 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/Win32Demo.vcxproj.filters +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/pch.cpp +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/pch.h +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/Win32DemoProcess.cpp +88 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/Win32DemoProcess.vcxproj +188 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/Win32DemoProcess.vcxproj.filters +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/pch.cpp +21 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/pch.h +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/.metadata +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/.vscode/launch.json +162 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/.vscode/settings.json +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/CHANGELOG.md +196 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/README.md +217 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/analysis_options.yaml +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/README.md +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/build.gradle +79 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/AndroidManifest.xml +41 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/java/com/tencent/mmkv_example/MainActivity.java +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/drawable/launch_background.xml +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/values/styles.xml +18 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/profile/AndroidManifest.xml +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/build.gradle +29 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/gradle.properties +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/settings.gradle +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/settings_aar.gradle +1 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/AppFrameworkInfo.plist +26 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/Debug.xcconfig +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/Release.xcconfig +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/ephemeral/flutter_lldb_helper.py +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/ephemeral/flutter_lldbinit +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Podfile +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/AppDelegate.h +26 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/AppDelegate.m +33 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +122 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +37 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Base.lproj/Main.storyboard +29 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Info.plist +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Runner.entitlements +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/main.m +29 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.pbxproj +612 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +90 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcworkspace/contents.xcworkspacedata +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/lib/main.dart +565 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/CMakeLists.txt +128 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/CMakeLists.txt +88 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/generated_plugin_registrant.cc +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/generated_plugin_registrant.h +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/generated_plugins.cmake +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/CMakeLists.txt +26 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/main.cc +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/my_application.cc +130 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/my_application.h +18 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Flutter/Flutter-Debug.xcconfig +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Flutter/Flutter-Release.xcconfig +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Flutter/GeneratedPluginRegistrant.swift +14 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Podfile +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/AppDelegate.swift +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Base.lproj/MainMenu.xib +343 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/AppInfo.xcconfig +14 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/Debug.xcconfig +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/Release.xcconfig +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/Warnings.xcconfig +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/DebugProfile.entitlements +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Info.plist +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/MainFlutterWindow.swift +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Release.entitlements +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcodeproj/project.pbxproj +800 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +99 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcworkspace/contents.xcworkspacedata +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/RunnerTests/RunnerTests.swift +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/AppScope/app.json5 +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/AppScope/resources/base/element/string.json +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/AppScope/resources/base/media/app_icon.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/build-profile.json5 +41 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/build-profile.json5 +34 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/hvigorfile.ts +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/oh-package.json5 +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/ets/pages/Index.ets +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/ets/plugins/GeneratedPluginRegistrant.ets +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/module.json5 +53 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/element/color.json +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/media/icon.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/profile/main_pages.json +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/en_US/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/zh_CN/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/test/Ability.test.ets +50 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/test/List.test.ets +20 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/testability/TestAbility.ets +63 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts +64 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/module.json5 +51 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/element/color.json +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/element/string.json +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/media/icon.png +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/profile/test_pages.json +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/hvigor/hvigor-config.json5 +20 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/hvigorfile.ts +21 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/oh-package.json5 +21 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/pubspec.yaml +75 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/CMakeLists.txt +108 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/CMakeLists.txt +109 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/generated_plugin_registrant.cc +14 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/generated_plugin_registrant.h +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/generated_plugins.cmake +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/CMakeLists.txt +40 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/Runner.rc +121 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/flutter_window.cpp +71 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/flutter_window.h +33 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/main.cpp +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/resource.h +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/resources/app_icon.ico +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/runner.exe.manifest +14 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/utils.cpp +65 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/utils.h +19 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/win32_window.cpp +288 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/win32_window.h +102 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/lib/mmkv.dart +1052 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/mmkv.iml +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/pubspec.yaml +62 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/test/mmkv_test.dart +48 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/tool/fix_mmkv_plugin_name.rb +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/tool/mmkvpodhelper.rb +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv.iml +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/CHANGELOG.md +48 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/README.md +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/build.gradle +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradle.properties +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradlew +160 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradlew.bat +90 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/settings.gradle +1 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/src/main/AndroidManifest.xml +1 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/src/main/java/com/tencent/mmkv/MMKVPlugin.java +82 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/lib/mmkv_android.dart +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/pubspec.yaml +40 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/.metadata +33 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/CHANGELOG.md +52 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/README.md +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/MMKVPlugin.h +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/MMKVPlugin.mm +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/flutter-bridge.h +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/flutter-bridge.mm +693 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/mmkv_ios.podspec +35 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/lib/mmkv_ios.dart +78 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/pubspec.yaml +44 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/.metadata +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/CHANGELOG.md +9 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/README.md +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/analysis_options.yaml +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/lib/mmkv_linux.dart +69 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/CMakeLists.txt +63 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/flutter-bridge.cpp +694 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/include/mmkv_linux/mmkv_linux_plugin.h +46 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/mmkv_linux_plugin.cc +97 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/pubspec.yaml +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/.metadata +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/CHANGELOG.md +42 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/README.md +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/analysis_options.yaml +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/lib/mmkv_ohos.dart +84 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/build-profile.json5 +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/hvigorfile.ts +2 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/index.ets +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/oh-package.json5 +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/src/main/ets/components/plugin/MMKVPlugin.ets +78 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/src/main/module.json5 +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/pubspec.yaml +50 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/CHANGELOG.md +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/README.md +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/lib/mmkv_platform_ffi.dart +363 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/lib/mmkv_platform_interface.dart +363 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/pubspec.yaml +23 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/.metadata +30 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/CHANGELOG.md +9 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/LICENSE +193 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/README.md +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/analysis_options.yaml +4 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/lib/mmkv_win32.dart +69 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/pubspec.yaml +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/CMakeLists.txt +71 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/flutter-bridge.cpp +721 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/include/mmkv_win32/mmkv_win32_plugin.h +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/mmkv_win32_plugin.cpp +88 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/AutoCleanInfo.hpp +65 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/MMKV.h +552 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/MMKVHandler.h +60 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/Resources/Info.plist +24 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/libMMKV.mm +1361 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/project.pbxproj +967 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKV For App Extension.xcscheme +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKV Static.xcscheme +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKV.xcscheme +76 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKVWatchExtension.xcscheme +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/Config.xcconfig +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/AppDelegate.h +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/AppDelegate.m +43 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Assets.xcassets/AppIcon.appiconset/Contents.json +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Base.lproj/LaunchScreen.storyboard +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Base.lproj/Main.storyboard +42 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Info.plist +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/MMKVCatalystDemo.entitlements +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/SceneDelegate.h +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/SceneDelegate.m +58 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/ViewController.h +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/ViewController.mm +85 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/main.m +19 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/AppDelegate.h +27 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/AppDelegate.m +135 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/DemoSwiftUsage.swift +82 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/MMKVDemo-Bridging-Header.h +22 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +98 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Base.lproj/LaunchScreen.storyboard +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Base.lproj/Main.storyboard +48 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Info.plist +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/MMKVDemo.entitlements +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/testReadOnly +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/testReadOnly.crc +0 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/TestMMKVCpp.cpp +204 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/TestMMKVCpp.hpp +18 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController+TestCaseBad.h +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController+TestCaseBad.mm +200 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController.h +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController.mm +1245 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/main.m +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.pbxproj +1944 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/MMKVDemo.xcscheme +88 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/MMKVMacDemo.xcscheme +78 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/MMKVTodayExtensionDemo.xcscheme +116 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/WatchApp (Notification).xcscheme +106 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/WatchApp.xcscheme +102 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/kvdemo.xcscheme +78 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemoTests/Info.plist +22 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemoTests/MMKVDemoTests.mm +554 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemoTests/MMKVPerformanceTest.mm +118 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/AppDelegate.h +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/AppDelegate.m +27 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Assets.xcassets/AppIcon.appiconset/Contents.json +58 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Base.lproj/Main.storyboard +718 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Info.plist +32 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/MMKVMacDemo.entitlements +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/ViewController.h +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/ViewController.mm +352 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/main.m +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/Base.lproj/MainInterface.storyboard +45 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/Info.plist +31 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/MMKVTodayExtensionDemo.entitlements +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/TodayViewController.h +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/TodayViewController.m +106 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Contents.json +17 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json +12 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/ContentView.swift +71 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Info.plist +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/MMKVVisionDemoApp.swift +22 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Preview Content/Preview Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Assets.xcassets/AppIcon.appiconset/Contents.json +81 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Base.lproj/Interface.storyboard +47 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Info.plist +33 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Contents.json +48 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json +28 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/ExtensionDelegate.h +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/ExtensionDelegate.mm +135 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Info.plist +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/InterfaceController.h +26 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/InterfaceController.m +50 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/NotificationController.h +26 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/NotificationController.m +60 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/PushNotificationPayload.apns +20 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/AppDelegate.h +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/AppDelegate.m +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Assets.xcassets/AppIcon.appiconset/Contents.json +13 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Assets.xcassets/Contents.json +6 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Base.lproj/LaunchScreen.storyboard +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Base.lproj/Main.storyboard +45 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Info.plist +25 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/SceneDelegate.h +16 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/SceneDelegate.m +58 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/ViewController.h +15 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/ViewController.m +38 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/kvdemo.entitlements +10 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/main.m +19 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MMKVManagedBuffer.h +49 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvCxx.cpp +152 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvCxx.h +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvHostObject.cpp +357 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvHostObject.h +66 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvLogger.h +52 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvPlatformContext.cpp +37 -0
- package/harmony/reactNativeMMKV/src/main/cpp/MmkvPlatformContext.h +36 -0
- package/harmony/reactNativeMMKV/src/main/cpp/NativeMMKVComponentDescriptor.h +65 -0
- package/harmony/reactNativeMMKV/src/main/cpp/NativeMMKVJSIBinder.h +55 -0
- package/harmony/reactNativeMMKV/src/main/cpp/NativeMMKVPackage.h +67 -0
- package/harmony/reactNativeMMKV/src/main/cpp/Props.cpp +37 -0
- package/harmony/reactNativeMMKV/src/main/cpp/Props.h +42 -0
- package/harmony/reactNativeMMKV/src/main/cpp/ShadowNodes.cpp +39 -0
- package/harmony/reactNativeMMKV/src/main/cpp/ShadowNodes.h +41 -0
- package/harmony/reactNativeMMKV/src/main/cpp/States.cpp +40 -0
- package/harmony/reactNativeMMKV/src/main/cpp/States.h +45 -0
- package/harmony/reactNativeMMKV/src/main/ets/Logger.ts +65 -0
- package/harmony/reactNativeMMKV/src/main/ets/MmkvCxxPackage.ts +46 -0
- package/harmony/reactNativeMMKV/src/main/ets/MmkvCxxTurboModule.ts +60 -0
- package/harmony/reactNativeMMKV/src/main/ets/MmkvPlatformContextPackage.ts +46 -0
- package/harmony/reactNativeMMKV/src/main/ets/MmkvPlatformContextTurboModule.ts +48 -0
- package/harmony/reactNativeMMKV/src/main/module.json5 +7 -0
- package/harmony/reactNativeMMKV/src/main/resources/base/element/string.json +8 -0
- package/harmony/reactNativeMMKV/src/main/resources/en_US/element/string.json +8 -0
- package/harmony/reactNativeMMKV/src/main/resources/zh_CN/element/string.json +8 -0
- package/harmony/reactNativeMMKV/ts.ts +27 -0
- package/harmony/reactNativeMMKV.har +0 -0
- package/lib/commonjs/MMKV.js +124 -0
- package/lib/commonjs/MMKV.js.map +1 -0
- package/lib/commonjs/MemoryWarningListener.js +31 -0
- package/lib/commonjs/MemoryWarningListener.js.map +1 -0
- package/lib/commonjs/MemoryWarningListener.web.js +11 -0
- package/lib/commonjs/MemoryWarningListener.web.js.map +1 -0
- package/lib/commonjs/ModuleNotFoundError.js +75 -0
- package/lib/commonjs/ModuleNotFoundError.js.map +1 -0
- package/lib/commonjs/NativeMmkv.js +53 -0
- package/lib/commonjs/NativeMmkv.js.map +1 -0
- package/lib/commonjs/NativeMmkvPlatformContext.js +22 -0
- package/lib/commonjs/NativeMmkvPlatformContext.js.map +1 -0
- package/lib/commonjs/PlatformChecker.js +14 -0
- package/lib/commonjs/PlatformChecker.js.map +1 -0
- package/lib/commonjs/Types.js +32 -0
- package/lib/commonjs/Types.js.map +1 -0
- package/lib/commonjs/createMMKV.js +43 -0
- package/lib/commonjs/createMMKV.js.map +1 -0
- package/lib/commonjs/createMMKV.mock.js +43 -0
- package/lib/commonjs/createMMKV.mock.js.map +1 -0
- package/lib/commonjs/createMMKV.web.js +110 -0
- package/lib/commonjs/createMMKV.web.js.map +1 -0
- package/lib/commonjs/createTextEncoder.js +23 -0
- package/lib/commonjs/createTextEncoder.js.map +1 -0
- package/lib/commonjs/hooks.js +198 -0
- package/lib/commonjs/hooks.js.map +1 -0
- package/lib/commonjs/index.js +40 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/module/MMKV.js +119 -0
- package/lib/module/MMKV.js.map +1 -0
- package/lib/module/MemoryWarningListener.js +27 -0
- package/lib/module/MemoryWarningListener.js.map +1 -0
- package/lib/module/MemoryWarningListener.web.js +6 -0
- package/lib/module/MemoryWarningListener.web.js.map +1 -0
- package/lib/module/ModuleNotFoundError.js +70 -0
- package/lib/module/ModuleNotFoundError.js.map +1 -0
- package/lib/module/NativeMmkv.js +51 -0
- package/lib/module/NativeMmkv.js.map +1 -0
- package/lib/module/NativeMmkvPlatformContext.js +18 -0
- package/lib/module/NativeMmkvPlatformContext.js.map +1 -0
- package/lib/module/PlatformChecker.js +10 -0
- package/lib/module/PlatformChecker.js.map +1 -0
- package/lib/module/Types.js +31 -0
- package/lib/module/Types.js.map +1 -0
- package/lib/module/createMMKV.js +38 -0
- package/lib/module/createMMKV.js.map +1 -0
- package/lib/module/createMMKV.mock.js +38 -0
- package/lib/module/createMMKV.mock.js.map +1 -0
- package/lib/module/createMMKV.web.js +105 -0
- package/lib/module/createMMKV.web.js.map +1 -0
- package/lib/module/createTextEncoder.js +19 -0
- package/lib/module/createTextEncoder.js.map +1 -0
- package/lib/module/hooks.js +189 -0
- package/lib/module/hooks.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/src/MMKV.d.ts +34 -0
- package/lib/typescript/src/MMKV.d.ts.map +1 -0
- package/lib/typescript/src/MemoryWarningListener.d.ts +3 -0
- package/lib/typescript/src/MemoryWarningListener.d.ts.map +1 -0
- package/lib/typescript/src/MemoryWarningListener.web.d.ts +3 -0
- package/lib/typescript/src/MemoryWarningListener.web.d.ts.map +1 -0
- package/lib/typescript/src/ModuleNotFoundError.d.ts +7 -0
- package/lib/typescript/src/ModuleNotFoundError.d.ts.map +1 -0
- package/lib/typescript/src/NativeMmkv.d.ts +91 -0
- package/lib/typescript/src/NativeMmkv.d.ts.map +1 -0
- package/lib/typescript/src/NativeMmkvPlatformContext.d.ts +20 -0
- package/lib/typescript/src/NativeMmkvPlatformContext.d.ts.map +1 -0
- package/lib/typescript/src/PlatformChecker.d.ts +2 -0
- package/lib/typescript/src/PlatformChecker.d.ts.map +1 -0
- package/lib/typescript/src/Types.d.ts +172 -0
- package/lib/typescript/src/Types.d.ts.map +1 -0
- package/lib/typescript/src/__tests__/hooks.test.d.ts +2 -0
- package/lib/typescript/src/__tests__/hooks.test.d.ts.map +1 -0
- package/lib/typescript/src/createMMKV.d.ts +3 -0
- package/lib/typescript/src/createMMKV.d.ts.map +1 -0
- package/lib/typescript/src/createMMKV.mock.d.ts +3 -0
- package/lib/typescript/src/createMMKV.mock.d.ts.map +1 -0
- package/lib/typescript/src/createMMKV.web.d.ts +3 -0
- package/lib/typescript/src/createMMKV.web.d.ts.map +1 -0
- package/lib/typescript/src/createTextEncoder.d.ts +2 -0
- package/lib/typescript/src/createTextEncoder.d.ts.map +1 -0
- package/lib/typescript/src/hooks.d.ts +86 -0
- package/lib/typescript/src/hooks.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +187 -0
- package/react-native-mmkv.podspec +38 -0
- package/react-native.config.js +20 -0
- package/src/MMKV.ts +142 -0
- package/src/MemoryWarningListener.ts +29 -0
- package/src/MemoryWarningListener.web.ts +5 -0
- package/src/ModuleNotFoundError.ts +95 -0
- package/src/NativeMmkv.ts +118 -0
- package/src/NativeMmkvPlatformContext.ts +38 -0
- package/src/PlatformChecker.ts +9 -0
- package/src/Types.ts +178 -0
- package/src/__tests__/hooks.test.tsx +89 -0
- package/src/createMMKV.mock.ts +38 -0
- package/src/createMMKV.ts +42 -0
- package/src/createMMKV.web.ts +127 -0
- package/src/createTextEncoder.ts +16 -0
- package/src/hooks.ts +247 -0
- package/src/index.ts +4 -0
|
@@ -0,0 +1,1431 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Tencent is pleased to support the open source community by making
|
|
3
|
+
* MMKV available.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (C) 2019 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
|
+
#include <MMKV/MMKV.h>
|
|
22
|
+
#include <chrono>
|
|
23
|
+
#include <cstdio>
|
|
24
|
+
#include <iostream>
|
|
25
|
+
#include <limits>
|
|
26
|
+
#include <pthread.h>
|
|
27
|
+
#include <semaphore.h>
|
|
28
|
+
#include <string>
|
|
29
|
+
#include <sys/wait.h>
|
|
30
|
+
#include <sys/stat.h>
|
|
31
|
+
#include <sys/time.h>
|
|
32
|
+
#include <sys/resource.h>
|
|
33
|
+
#include <unistd.h>
|
|
34
|
+
#include <cstring>
|
|
35
|
+
#include <cassert>
|
|
36
|
+
#include <ctime>
|
|
37
|
+
#include <cmath>
|
|
38
|
+
#include <cinttypes> // For PRId64 & PRIu64
|
|
39
|
+
#include <sys/mman.h>
|
|
40
|
+
|
|
41
|
+
// it's not a must-have for most app so do it the handy way
|
|
42
|
+
#include "../../Core/InterProcessLock.h"
|
|
43
|
+
|
|
44
|
+
using namespace std;
|
|
45
|
+
using namespace mmkv;
|
|
46
|
+
|
|
47
|
+
string to_string(const std::string& str) { return str; }
|
|
48
|
+
|
|
49
|
+
template <class T>
|
|
50
|
+
string to_string(const vector<T> &arr, const char* sp = ", ") {
|
|
51
|
+
string str;
|
|
52
|
+
for (const auto &element : arr) {
|
|
53
|
+
str += to_string(element);
|
|
54
|
+
str += sp;
|
|
55
|
+
}
|
|
56
|
+
if (!str.empty()) {
|
|
57
|
+
str.erase(str.length() - strlen(sp));
|
|
58
|
+
}
|
|
59
|
+
return str;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
void containerTest(MMKV *mmkv, bool decodeOnly);
|
|
63
|
+
|
|
64
|
+
void functionalTest(MMKV *mmkv, bool decodeOnly) {
|
|
65
|
+
if (!decodeOnly) {
|
|
66
|
+
mmkv->set(true, "bool");
|
|
67
|
+
}
|
|
68
|
+
cout << "bool = " << mmkv->getBool("bool") << endl;
|
|
69
|
+
|
|
70
|
+
if (!decodeOnly) {
|
|
71
|
+
mmkv->set(1024, "int32");
|
|
72
|
+
}
|
|
73
|
+
cout << "int32 = " << mmkv->getInt32("int32") << endl;
|
|
74
|
+
|
|
75
|
+
if (!decodeOnly) {
|
|
76
|
+
mmkv->set(numeric_limits<uint32_t>::max(), "uint32");
|
|
77
|
+
}
|
|
78
|
+
cout << "uint32 = " << mmkv->getUInt32("uint32") << endl;
|
|
79
|
+
|
|
80
|
+
if (!decodeOnly) {
|
|
81
|
+
mmkv->set(numeric_limits<int64_t>::min(), "int64");
|
|
82
|
+
}
|
|
83
|
+
cout << "int64 = " << mmkv->getInt64("int64") << endl;
|
|
84
|
+
|
|
85
|
+
if (!decodeOnly) {
|
|
86
|
+
mmkv->set(numeric_limits<uint64_t>::max(), "uint64");
|
|
87
|
+
}
|
|
88
|
+
cout << "uint64 = " << mmkv->getUInt64("uint64") << endl;
|
|
89
|
+
|
|
90
|
+
if (!decodeOnly) {
|
|
91
|
+
mmkv->set(3.14f, "float");
|
|
92
|
+
}
|
|
93
|
+
cout << "float = " << mmkv->getFloat("float") << endl;
|
|
94
|
+
|
|
95
|
+
if (!decodeOnly) {
|
|
96
|
+
mmkv->set(numeric_limits<double>::max(), "double");
|
|
97
|
+
}
|
|
98
|
+
cout << "double = " << mmkv->getDouble("double") << endl;
|
|
99
|
+
|
|
100
|
+
if (!decodeOnly) {
|
|
101
|
+
mmkv->set("Hello, MMKV-示例 for POSIX", "raw_string");
|
|
102
|
+
string str = "Hello, MMKV-示例 for POSIX string";
|
|
103
|
+
mmkv->set(str, "string");
|
|
104
|
+
mmkv->set(string_view(str).substr(7, 21), "string_view");
|
|
105
|
+
}
|
|
106
|
+
string result;
|
|
107
|
+
mmkv->getString("raw_string", result);
|
|
108
|
+
cout << "raw_string = " << result << endl;
|
|
109
|
+
mmkv->getString("string", result);
|
|
110
|
+
cout << "string = " << result << endl;
|
|
111
|
+
mmkv->getString("string_view", result);
|
|
112
|
+
cout << "string_view = " << result << endl;
|
|
113
|
+
|
|
114
|
+
containerTest(mmkv, decodeOnly);
|
|
115
|
+
|
|
116
|
+
cout << "allKeys: " << ::to_string(mmkv->allKeys()) << endl;
|
|
117
|
+
cout << "count = " << mmkv->count() << ", totalSize = " << mmkv->totalSize() << endl;
|
|
118
|
+
cout << "containsKey[string]: " << mmkv->containsKey("string") << endl;
|
|
119
|
+
|
|
120
|
+
mmkv->removeValueForKey("bool");
|
|
121
|
+
cout << "bool: " << mmkv->getBool("bool") << endl;
|
|
122
|
+
mmkv->removeValuesForKeys({"int", "long"});
|
|
123
|
+
|
|
124
|
+
mmkv->set("some string", "null string");
|
|
125
|
+
result.erase();
|
|
126
|
+
mmkv->getString("null string", result);
|
|
127
|
+
cout << "string before set null: " << result << endl;
|
|
128
|
+
mmkv->set((const char *) nullptr, "null string");
|
|
129
|
+
//mmkv->set("", "null string");
|
|
130
|
+
result.erase();
|
|
131
|
+
mmkv->getString("null string", result);
|
|
132
|
+
cout << "string after set null: " << result << ", containsKey:" << mmkv->containsKey("null string") << endl;
|
|
133
|
+
|
|
134
|
+
//kv.sync();
|
|
135
|
+
//kv.async();
|
|
136
|
+
//kv.clearAll();
|
|
137
|
+
mmkv->clearMemoryCache();
|
|
138
|
+
cout << "allKeys: " << ::to_string(mmkv->allKeys()) << endl;
|
|
139
|
+
cout << "isFileValid[" << mmkv->mmapID() + "]: " << MMKV::isFileValid(mmkv->mmapID()) << endl;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
void containerTest(MMKV *mmkv, bool decodeOnly) {
|
|
143
|
+
{
|
|
144
|
+
if (!decodeOnly) {
|
|
145
|
+
vector<string> vec = {"Hello", "MMKV-示例", "for", "POSIX"};
|
|
146
|
+
mmkv->set(vec, "string-set");
|
|
147
|
+
}
|
|
148
|
+
vector<string> vecResult;
|
|
149
|
+
mmkv->getVector("string-set", vecResult);
|
|
150
|
+
cout << "string-set = " << to_string(vecResult) << endl;
|
|
151
|
+
}
|
|
152
|
+
#if __cplusplus>=202002L
|
|
153
|
+
{
|
|
154
|
+
if (!decodeOnly) {
|
|
155
|
+
vector<bool> vec = {true, false, std::numeric_limits<bool>::min(), std::numeric_limits<bool>::max()};
|
|
156
|
+
mmkv->set(vec, "bool-set");
|
|
157
|
+
}
|
|
158
|
+
vector<bool> vecResult;
|
|
159
|
+
mmkv->getVector("bool-set", vecResult);
|
|
160
|
+
cout << "bool-set = " << to_string(vecResult) << endl;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
{
|
|
164
|
+
if (!decodeOnly) {
|
|
165
|
+
vector<int32_t> vec = {1024, 0, std::numeric_limits<int32_t>::min(), std::numeric_limits<int32_t>::max()};
|
|
166
|
+
mmkv->set(vec, "int32-set");
|
|
167
|
+
}
|
|
168
|
+
vector<int32_t> vecResult;
|
|
169
|
+
mmkv->getVector("int32-set", vecResult);
|
|
170
|
+
cout << "int32-set = " << to_string(vecResult) << endl;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
{
|
|
174
|
+
if (!decodeOnly) {
|
|
175
|
+
constexpr uint32_t arr[] = {2048, 0, std::numeric_limits<uint32_t>::min(), std::numeric_limits<uint32_t>::max()};
|
|
176
|
+
std::span vec = arr;
|
|
177
|
+
mmkv->set(vec, "uint32-set");
|
|
178
|
+
}
|
|
179
|
+
vector<uint32_t> vecResult;
|
|
180
|
+
mmkv->getVector("uint32-set", vecResult);
|
|
181
|
+
cout << "uint32-set = " << to_string(vecResult) << endl;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
{
|
|
185
|
+
if (!decodeOnly) {
|
|
186
|
+
constexpr int64_t vec[] = {1024, 0, std::numeric_limits<int64_t>::min(), std::numeric_limits<int64_t>::max()};
|
|
187
|
+
mmkv->set(std::span(vec), "int64-set");
|
|
188
|
+
}
|
|
189
|
+
vector<int64_t> vecResult;
|
|
190
|
+
mmkv->getVector("int64-set", vecResult);
|
|
191
|
+
cout << "int64-set = " << to_string(vecResult) << endl;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
{
|
|
195
|
+
if (!decodeOnly) {
|
|
196
|
+
vector<uint64_t> vec = {1024, 0, std::numeric_limits<uint64_t>::min(), std::numeric_limits<uint64_t>::max()};
|
|
197
|
+
mmkv->set(vec, "uint64-set");
|
|
198
|
+
}
|
|
199
|
+
vector<uint64_t> vecResult;
|
|
200
|
+
mmkv->getVector("uint64-set", vecResult);
|
|
201
|
+
cout << "uint64-set = " << to_string(vecResult) << endl;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
{
|
|
205
|
+
if (!decodeOnly) {
|
|
206
|
+
vector<float> vec = {1024.0, 0.0, std::numeric_limits<float>::min(), std::numeric_limits<float>::max()};
|
|
207
|
+
mmkv->set(vec, "float-set");
|
|
208
|
+
}
|
|
209
|
+
vector<float> vecResult;
|
|
210
|
+
mmkv->getVector("float-set", vecResult);
|
|
211
|
+
cout << "float-set = " << to_string(vecResult) << endl;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
{
|
|
215
|
+
if (!decodeOnly) {
|
|
216
|
+
vector<double> vec = {1024.0, 0.0, std::numeric_limits<double>::min(), std::numeric_limits<double>::max()};
|
|
217
|
+
mmkv->set(vec, "double-set");
|
|
218
|
+
}
|
|
219
|
+
vector<double> vecResult;
|
|
220
|
+
mmkv->getVector("double-set", vecResult);
|
|
221
|
+
cout << "double-set = " << to_string(vecResult) << endl;
|
|
222
|
+
|
|
223
|
+
// un-comment to test the functionality of set<!MMKV_SUPPORTED_VALUE_TYPE<T>>(const T& value, key)
|
|
224
|
+
// mmkv->set(&vecResult, "unsupported-type");
|
|
225
|
+
}
|
|
226
|
+
#endif // __cplusplus>=202002L
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
constexpr int32_t keyCount = 10000;
|
|
230
|
+
constexpr int32_t threadCount = 10;
|
|
231
|
+
static const string MMKV_ID = "thread_test1";
|
|
232
|
+
vector<string> arrIntKeys;
|
|
233
|
+
vector<string> arrStringKeys;
|
|
234
|
+
|
|
235
|
+
void *threadFunction(void *lpParam) {
|
|
236
|
+
auto threadIndex = (size_t) lpParam;
|
|
237
|
+
auto mmkv = MMKV::mmkvWithID(MMKV_ID);
|
|
238
|
+
mmkv->lock();
|
|
239
|
+
cout << "thread " << threadIndex << " starts" << endl;
|
|
240
|
+
mmkv->unlock();
|
|
241
|
+
|
|
242
|
+
auto segmentCount = keyCount / threadCount;
|
|
243
|
+
auto startIndex = segmentCount * threadIndex;
|
|
244
|
+
for (int32_t index = startIndex; index < startIndex + segmentCount; index++) {
|
|
245
|
+
mmkv->set(index, arrIntKeys[index]);
|
|
246
|
+
mmkv->set("str-" + to_string(index), arrStringKeys[index]);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
mmkv->lock();
|
|
250
|
+
cout << "thread " << threadIndex << " ends" << endl;
|
|
251
|
+
mmkv->unlock();
|
|
252
|
+
return nullptr;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
void threadTest() {
|
|
256
|
+
pthread_t threadHandles[threadCount] = {0};
|
|
257
|
+
for (size_t index = 0; index < threadCount; index++) {
|
|
258
|
+
pthread_create(&threadHandles[index], nullptr, threadFunction, (void *) index);
|
|
259
|
+
}
|
|
260
|
+
for (auto threadHandle : threadHandles) {
|
|
261
|
+
pthread_join(threadHandle, nullptr);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
auto mmkv = MMKV::mmkvWithID(MMKV_ID);
|
|
265
|
+
cout << "total count " << mmkv->count() << endl;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
void brutleTest() {
|
|
269
|
+
using hclock = chrono::high_resolution_clock;
|
|
270
|
+
auto start = hclock::now();
|
|
271
|
+
|
|
272
|
+
auto mmkv = MMKV::mmkvWithID("brutleTest");
|
|
273
|
+
for (int32_t i = 0; i < keyCount; i++) {
|
|
274
|
+
mmkv->set(i, arrIntKeys[i]);
|
|
275
|
+
mmkv->set("str-" + to_string(i), arrStringKeys[i]);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
auto finish = hclock::now();
|
|
279
|
+
long long used = chrono::duration_cast<chrono::milliseconds>(finish - start).count();
|
|
280
|
+
printf("encode int & string %d times, cost: %lld ms\n", keyCount, used);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
void processTest() {
|
|
284
|
+
constexpr auto processCount = 2;
|
|
285
|
+
pid_t processHandles[processCount] = {0};
|
|
286
|
+
for (int &processHandle : processHandles) {
|
|
287
|
+
auto pid = fork();
|
|
288
|
+
// this is child
|
|
289
|
+
if (pid <= 0) {
|
|
290
|
+
execl("process", "process", nullptr);
|
|
291
|
+
perror("execl"); // execl doesn't return unless there is a problem
|
|
292
|
+
exit(1);
|
|
293
|
+
} else {
|
|
294
|
+
processHandle = pid;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
for (int &processHandle : processHandles) {
|
|
299
|
+
printf("Waiting for child %d ...\n", processHandle);
|
|
300
|
+
auto pid = waitpid(processHandle, nullptr, 0);
|
|
301
|
+
printf("Child quit pid: %d\n", pid);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
auto mmkv = MMKV::mmkvWithID("process_test", MMKV_MULTI_PROCESS);
|
|
305
|
+
cout << "total count of process_test: " << mmkv->count() << endl;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
void testInterProcessLock() {
|
|
309
|
+
//auto mmkv = MMKV::mmkvWithID("TestInterProcessLock", MMKV_MULTI_PROCESS);
|
|
310
|
+
//mmkv->set(true, "bool");
|
|
311
|
+
|
|
312
|
+
auto fd = open("/tmp/mmkv/TestInterProcessLock.file", O_RDWR | O_CREAT | O_CLOEXEC, S_IRWXU);
|
|
313
|
+
FileLock flock(fd);
|
|
314
|
+
|
|
315
|
+
// auto fd2 = open("/tmp/mmkv/TestInterProcessLock2.file", O_RDWR | O_CREAT | O_CLOEXEC, S_IRWXU);
|
|
316
|
+
// FileLock flock2(fd2);
|
|
317
|
+
// flock2.lock(SharedLockType);
|
|
318
|
+
// auto ptr = ::mmap(nullptr, DEFAULT_MMAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0);
|
|
319
|
+
// printf("mmap fd %d to %p\n", fd2, ptr);
|
|
320
|
+
// ::close(fd2);
|
|
321
|
+
// flock2.destroyLock();
|
|
322
|
+
|
|
323
|
+
auto pid = fork();
|
|
324
|
+
// this is child
|
|
325
|
+
if (pid <= 0) {
|
|
326
|
+
execl("TestInterProcessLock", "TestInterProcessLock", nullptr);
|
|
327
|
+
perror("execl"); // execl doesn't return unless there is a problem
|
|
328
|
+
exit(1);
|
|
329
|
+
}
|
|
330
|
+
printf("Waiting for child %d to start ...\n", pid);
|
|
331
|
+
sem_t *sem = sem_open("/mmkv_main", O_CREAT, 0644, 0);
|
|
332
|
+
if (!sem) {
|
|
333
|
+
printf("fail to create semaphore: %d(%s)\n", errno, strerror(errno));
|
|
334
|
+
exit(1);
|
|
335
|
+
}
|
|
336
|
+
sem_wait(sem);
|
|
337
|
+
printf("Child %d to started\n", pid);
|
|
338
|
+
|
|
339
|
+
//mmkv->clearAll();
|
|
340
|
+
//mmkv->lock();
|
|
341
|
+
flock.lock(ExclusiveLockType);
|
|
342
|
+
|
|
343
|
+
sem_post(sem);
|
|
344
|
+
sem_close(sem);
|
|
345
|
+
|
|
346
|
+
printf("Waiting for child %d to finish...\n", pid);
|
|
347
|
+
waitpid(pid, nullptr, 0);
|
|
348
|
+
printf("Child %d to finished\n", pid);
|
|
349
|
+
|
|
350
|
+
//mmkv->unlock();
|
|
351
|
+
flock.unlock(ExclusiveLockType);
|
|
352
|
+
close(fd);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
void cornetSizeTest() {
|
|
356
|
+
string aesKey = "aes";
|
|
357
|
+
auto mmkv = MMKV::mmkvWithID("cornerSize", MMKV_MULTI_PROCESS, &aesKey);
|
|
358
|
+
mmkv->clearAll();
|
|
359
|
+
auto size = getpagesize() - 2;
|
|
360
|
+
size -= 4;
|
|
361
|
+
string key = "key";
|
|
362
|
+
auto keySize = 3 + 1;
|
|
363
|
+
size -= keySize;
|
|
364
|
+
auto valueSize = 3;
|
|
365
|
+
size -= valueSize;
|
|
366
|
+
mmkv::MMBuffer value(size);
|
|
367
|
+
mmkv->set(value, key);
|
|
368
|
+
mmkv->trim();
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
void itemSizeHolderTest() {
|
|
372
|
+
auto mmkv = MMKV::mmkvWithID("itemsize");
|
|
373
|
+
// mmkv->clearAll();
|
|
374
|
+
mmkv->set(true, "bool");
|
|
375
|
+
mmkv->clearMemoryCache();
|
|
376
|
+
// you won't find the key "bool"
|
|
377
|
+
cout << "allKeys: " << ::to_string(mmkv->allKeys()) << endl;
|
|
378
|
+
|
|
379
|
+
string aesKey = "cryptKey";
|
|
380
|
+
mmkv = MMKV::mmkvWithID("itemsizecrypt", MMKV_SINGLE_PROCESS, &aesKey);
|
|
381
|
+
mmkv->set(true, "bool");
|
|
382
|
+
mmkv->clearMemoryCache();
|
|
383
|
+
// you won't find the key "bool"
|
|
384
|
+
cout << "allKeys: " << ::to_string(mmkv->allKeys()) << endl;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
void fastRemoveCornetSizeTest() {
|
|
388
|
+
string aesKey = "aes";
|
|
389
|
+
auto mmkv = MMKV::mmkvWithID("fastRemoveCornerSize", MMKV_MULTI_PROCESS, &aesKey);
|
|
390
|
+
mmkv->clearAll();
|
|
391
|
+
auto size = getpagesize() - 4;
|
|
392
|
+
size -= 4;
|
|
393
|
+
string key = "key";
|
|
394
|
+
auto keySize = 3 + 1;
|
|
395
|
+
size -= keySize;
|
|
396
|
+
auto valueSize = 3;
|
|
397
|
+
size -= valueSize;
|
|
398
|
+
size -= (keySize + 1); // total size of fast remove
|
|
399
|
+
size /= 16;
|
|
400
|
+
mmkv::MMBuffer value(size);
|
|
401
|
+
auto ptr = (char *) value.getPtr();
|
|
402
|
+
for (size_t i = 0; i < value.length(); i++) {
|
|
403
|
+
ptr[i] = 'A';
|
|
404
|
+
}
|
|
405
|
+
for (int i = 0; i < 16; i++) {
|
|
406
|
+
mmkv->set(value, key); // when a full write back is occur, here's corruption happens
|
|
407
|
+
mmkv->removeValueForKey(key);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
void testClearEmptyMMKV() {
|
|
412
|
+
auto mmkv = MMKV::mmkvWithID("emptyMMKV");
|
|
413
|
+
mmkv->set(true, "bool");
|
|
414
|
+
mmkv->clearAll();
|
|
415
|
+
mmkv->clearAll();
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
void testClearAllKeepSpace() {
|
|
419
|
+
{
|
|
420
|
+
auto mmkv = MMKV::mmkvWithID("testClearAllKeepSpace");
|
|
421
|
+
string big(10, '0');
|
|
422
|
+
for (int i = 0; i < 100; i++) {
|
|
423
|
+
mmkv->set(big, to_string(i));
|
|
424
|
+
}
|
|
425
|
+
size_t size0 = mmkv->totalSize();
|
|
426
|
+
|
|
427
|
+
mmkv->clearAll(true);
|
|
428
|
+
size_t size1 = mmkv->totalSize();
|
|
429
|
+
assert(size0 == size1);
|
|
430
|
+
assert(mmkv->count() == 0);
|
|
431
|
+
string key1 = "key1";
|
|
432
|
+
string key2 = "key2";
|
|
433
|
+
mmkv->set(123, key1);
|
|
434
|
+
assert(mmkv->getInt32(key1, 0) == 123);
|
|
435
|
+
|
|
436
|
+
mmkv->set(456, key2);
|
|
437
|
+
assert(mmkv->getInt32(key2, 0) == 456);
|
|
438
|
+
|
|
439
|
+
// test normal clearAll
|
|
440
|
+
assert(mmkv->count() == 2);
|
|
441
|
+
mmkv->clearAll();
|
|
442
|
+
assert(mmkv->count() == 0);
|
|
443
|
+
|
|
444
|
+
// test reopen
|
|
445
|
+
mmkv->set(1234, key1);
|
|
446
|
+
mmkv->set(12345, key2);
|
|
447
|
+
mmkv->clearAll(true);
|
|
448
|
+
mmkv->close();
|
|
449
|
+
mmkv = MMKV::mmkvWithID("testClearAllKeepSpace");
|
|
450
|
+
assert(mmkv->count() == 0);
|
|
451
|
+
|
|
452
|
+
mmkv->set(456, key2);
|
|
453
|
+
assert(mmkv->getInt32(key2, 0) == 456);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
{
|
|
457
|
+
string aesKey = "cryptKey111";
|
|
458
|
+
auto mmkv = MMKV::mmkvWithID("testClearAllKeepSpaceWithCrypt", MMKV_SINGLE_PROCESS, &aesKey);
|
|
459
|
+
string big(10, '0');
|
|
460
|
+
for (int i = 0; i < 100; i++) {
|
|
461
|
+
mmkv->set(big, to_string(i));
|
|
462
|
+
}
|
|
463
|
+
size_t size0 = mmkv->totalSize();
|
|
464
|
+
|
|
465
|
+
mmkv->clearAll(true);
|
|
466
|
+
size_t size1 = mmkv->totalSize();
|
|
467
|
+
assert(size0 == size1);
|
|
468
|
+
assert(mmkv->count() == 0);
|
|
469
|
+
string key1 = "key1";
|
|
470
|
+
string key2 = "key2";
|
|
471
|
+
mmkv->set(123, key1);
|
|
472
|
+
assert(mmkv->getInt32(key1, 0) == 123);
|
|
473
|
+
|
|
474
|
+
mmkv->set(456, key2);
|
|
475
|
+
assert(mmkv->getInt32(key2, 0) == 456);
|
|
476
|
+
|
|
477
|
+
// test normal clearAll
|
|
478
|
+
assert(mmkv->count() == 2);
|
|
479
|
+
mmkv->clearAll();
|
|
480
|
+
assert(mmkv->count() == 0);
|
|
481
|
+
|
|
482
|
+
// test reopen
|
|
483
|
+
mmkv->set(1234, key1);
|
|
484
|
+
mmkv->set(12345, key2);
|
|
485
|
+
mmkv->clearAll(true);
|
|
486
|
+
mmkv->close();
|
|
487
|
+
mmkv = MMKV::mmkvWithID("testClearAllKeepSpaceWithCrypt", MMKV_SINGLE_PROCESS, &aesKey);
|
|
488
|
+
assert(mmkv->count() == 0);
|
|
489
|
+
|
|
490
|
+
mmkv->set(456, key2);
|
|
491
|
+
assert(mmkv->getInt32(key2, 0) == 456);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
void testBackup() {
|
|
496
|
+
string rootDir = "/tmp/mmkv_backup";
|
|
497
|
+
string mmapID = "test/Encrypt";
|
|
498
|
+
string aesKey = "cryptKey";
|
|
499
|
+
auto ret = MMKV::backupOneToDirectory(mmapID, rootDir);
|
|
500
|
+
printf("backup one return %d\n", ret);
|
|
501
|
+
if (ret) {
|
|
502
|
+
auto mmkv = MMKV::mmkvWithID(mmapID, MMKV_SINGLE_PROCESS, &aesKey, &rootDir);
|
|
503
|
+
cout << "after backup allKeys: " << ::to_string(mmkv->allKeys()) << endl;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
auto count = MMKV::backupAllToDirectory(rootDir);
|
|
507
|
+
printf("backup all count: %zu\n", count);
|
|
508
|
+
if (count > 0) {
|
|
509
|
+
auto backupMMKV = MMKV::mmkvWithID(mmapID, MMKV_SINGLE_PROCESS, &aesKey, &rootDir);
|
|
510
|
+
cout << "check on backup [" << backupMMKV->mmapID() << "] allKeys: " << ::to_string(backupMMKV->allKeys(), ",\n") << endl;
|
|
511
|
+
|
|
512
|
+
backupMMKV = MMKV::mmkvWithID("brutleTest", MMKV_SINGLE_PROCESS, nullptr, &rootDir);
|
|
513
|
+
cout << "check on backup [" << backupMMKV->mmapID() << "] allKeys count: " << backupMMKV->count() << endl;
|
|
514
|
+
|
|
515
|
+
backupMMKV = MMKV::mmkvWithID("process_test", MMKV_MULTI_PROCESS, nullptr, &rootDir);
|
|
516
|
+
cout << "check on backup [" << backupMMKV->mmapID() << "] allKeys count: " << backupMMKV->count() << endl;
|
|
517
|
+
|
|
518
|
+
backupMMKV = MMKV::mmkvWithID("thread_test1", MMKV_SINGLE_PROCESS, nullptr, &rootDir);
|
|
519
|
+
cout << "check on backup [" << backupMMKV->mmapID() << "] allKeys count: " << backupMMKV->count() << endl;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
void testRestore() {
|
|
524
|
+
string rootDir = "/tmp/mmkv_backup";
|
|
525
|
+
string mmapID = "test/Encrypt";
|
|
526
|
+
string aesKey = "cryptKey";
|
|
527
|
+
auto mmkv = MMKV::mmkvWithID(mmapID, MMKV_SINGLE_PROCESS, &aesKey);
|
|
528
|
+
mmkv->set(__LINE__, "test_restore_key");
|
|
529
|
+
cout << "before restore [" << mmkv->mmapID() << "] allKeys: " << ::to_string(mmkv->allKeys(), ",\n") << endl;
|
|
530
|
+
|
|
531
|
+
auto ret = MMKV::restoreOneFromDirectory(mmapID, rootDir);
|
|
532
|
+
printf("restore one return %d\n", ret);
|
|
533
|
+
if (ret) {
|
|
534
|
+
cout << "after restore [" << mmkv->mmapID() << "] allKeys: " << ::to_string(mmkv->allKeys(), ",\n") << endl;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
auto count = MMKV::restoreAllFromDirectory(rootDir);
|
|
538
|
+
printf("restore all count: %zu\n", count);
|
|
539
|
+
if (count > 0) {
|
|
540
|
+
auto backupMMKV = MMKV::mmkvWithID(mmapID, MMKV_SINGLE_PROCESS, &aesKey);
|
|
541
|
+
cout << "check on restore [" << backupMMKV->mmapID() << "] allKeys: " << ::to_string(backupMMKV->allKeys(), ",\n") << endl;
|
|
542
|
+
|
|
543
|
+
backupMMKV = MMKV::mmkvWithID("brutleTest");
|
|
544
|
+
cout << "check on restore [" << backupMMKV->mmapID() << "] allKeys count: " << backupMMKV->count() << endl;
|
|
545
|
+
|
|
546
|
+
backupMMKV = MMKV::mmkvWithID("process_test", MMKV_MULTI_PROCESS);
|
|
547
|
+
cout << "check on restore [" << backupMMKV->mmapID() << "] allKeys count: " << backupMMKV->count() << endl;
|
|
548
|
+
|
|
549
|
+
backupMMKV = MMKV::mmkvWithID("thread_test1", MMKV_SINGLE_PROCESS);
|
|
550
|
+
cout << "check on restore [" << backupMMKV->mmapID() << "] allKeys count: " << backupMMKV->count() << endl;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
void testAutoExpiration() {
|
|
555
|
+
string mmapID = "testAutoExpire";
|
|
556
|
+
auto mmkv = MMKV::mmkvWithID(mmapID);
|
|
557
|
+
mmkv->clearAll();
|
|
558
|
+
mmkv->trim();
|
|
559
|
+
mmkv->disableAutoKeyExpire();
|
|
560
|
+
|
|
561
|
+
mmkv->set(true, "auto_expire_key_1");
|
|
562
|
+
mmkv->enableAutoKeyExpire(1);
|
|
563
|
+
mmkv->set("never_expire_value_1", "never_expire_key_1", MMKV::ExpireNever);
|
|
564
|
+
mmkv->set("", "never_expire_key_2", MMKV::ExpireNever);
|
|
565
|
+
mmkv->set(MMBuffer(), "never_expire_key_3", MMKV::ExpireNever);
|
|
566
|
+
|
|
567
|
+
sleep(2);
|
|
568
|
+
assert(mmkv->containsKey("auto_expire_key_1") == false);
|
|
569
|
+
assert(mmkv->containsKey("never_expire_key_1") == true);
|
|
570
|
+
assert(mmkv->containsKey("never_expire_key_2") == true);
|
|
571
|
+
assert(mmkv->containsKey("never_expire_key_3") == true);
|
|
572
|
+
{
|
|
573
|
+
string result;
|
|
574
|
+
auto ret = mmkv->getString("never_expire_key_2", result);
|
|
575
|
+
assert(ret && result.empty());
|
|
576
|
+
|
|
577
|
+
MMBuffer buffer;
|
|
578
|
+
ret = mmkv->getBytes("never_expire_key_3", buffer);
|
|
579
|
+
assert(ret && buffer.length() == 0);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
mmkv->removeValueForKey("never_expire_key_1");
|
|
583
|
+
mmkv->enableAutoKeyExpire(MMKV::ExpireNever);
|
|
584
|
+
mmkv->set("never_expire_value_1", "never_expire_key_1");
|
|
585
|
+
mmkv->set(true, "auto_expire_key_1", 1);
|
|
586
|
+
sleep(2);
|
|
587
|
+
assert(mmkv->containsKey("never_expire_key_1") == true);
|
|
588
|
+
assert(mmkv->containsKey("auto_expire_key_1") == false);
|
|
589
|
+
|
|
590
|
+
auto count = mmkv->count(true);
|
|
591
|
+
cout << "count all non expire keys: " << count << endl;
|
|
592
|
+
auto allKeys = mmkv->allKeys(true);
|
|
593
|
+
cout << "all non expire keys: " << ::to_string(allKeys) << endl;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
void testExpectedCapacity() {
|
|
597
|
+
auto mmkv0 = MMKV::mmkvWithID("testExpectedCapacity0", MMKV_SINGLE_PROCESS, nullptr, nullptr, 0);
|
|
598
|
+
assert(mmkv0->totalSize() == DEFAULT_MMAP_SIZE);
|
|
599
|
+
|
|
600
|
+
auto mmkv1 = MMKV::mmkvWithID("testExpectedCapacity1", MMKV_SINGLE_PROCESS, nullptr, nullptr, DEFAULT_MMAP_SIZE + 1);
|
|
601
|
+
assert(mmkv1->totalSize() == DEFAULT_MMAP_SIZE << 1);
|
|
602
|
+
|
|
603
|
+
auto mmkv2 = MMKV::mmkvWithID("testExpectedCapacity2", MMKV_SINGLE_PROCESS, nullptr, nullptr, DEFAULT_MMAP_SIZE >> 1);
|
|
604
|
+
assert(mmkv2->totalSize() == DEFAULT_MMAP_SIZE);
|
|
605
|
+
|
|
606
|
+
auto mmkv3 = MMKV::mmkvWithID("testExpectedCapacity3");
|
|
607
|
+
mmkv3->clearAll();
|
|
608
|
+
assert(mmkv3->totalSize() == DEFAULT_MMAP_SIZE);
|
|
609
|
+
mmkv3->close();
|
|
610
|
+
// expand it
|
|
611
|
+
mmkv3 = MMKV::mmkvWithID("testExpectedCapacity3", MMKV_SINGLE_PROCESS, nullptr, nullptr, 100 * DEFAULT_MMAP_SIZE + 100);
|
|
612
|
+
assert(mmkv3->totalSize() == DEFAULT_MMAP_SIZE * 101);
|
|
613
|
+
|
|
614
|
+
// if new size is smaller than file size, keep file its origin size
|
|
615
|
+
mmkv3->close();
|
|
616
|
+
mmkv3 = MMKV::mmkvWithID("testExpectedCapacity3", MMKV_SINGLE_PROCESS, nullptr, nullptr, 0);
|
|
617
|
+
assert(mmkv3->totalSize() == DEFAULT_MMAP_SIZE * 101);
|
|
618
|
+
|
|
619
|
+
int len = 10000;
|
|
620
|
+
std::string value(len, '0');
|
|
621
|
+
value = "🏊🏻®4️⃣🐅_" + value;
|
|
622
|
+
cout << "value length = " << value.size() << endl;
|
|
623
|
+
std::string key = "key";
|
|
624
|
+
// if you know exactly the sizes of key and value, set expectedCapacity for performance improvement
|
|
625
|
+
size_t expectedSize = key.size() + value.size();
|
|
626
|
+
auto mmkv4 = MMKV::mmkvWithID("testExpectedCapacity4", MMKV_SINGLE_PROCESS, nullptr, nullptr, expectedSize);
|
|
627
|
+
// 0 times expand
|
|
628
|
+
mmkv4->set(value, key);
|
|
629
|
+
|
|
630
|
+
int count = 10;
|
|
631
|
+
expectedSize = (key.size() + value.size()) * count;
|
|
632
|
+
auto mmkv5 = MMKV::mmkvWithID("testExpectedCapacity5", MMKV_SINGLE_PROCESS, nullptr, nullptr, expectedSize);
|
|
633
|
+
for (int i = 0; i < count; i++) {
|
|
634
|
+
key[0] = static_cast<char>('a' + i);
|
|
635
|
+
// 0 times expand
|
|
636
|
+
mmkv5->set(value, key);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
void testOnlyOneKey() {
|
|
641
|
+
string key = "name";
|
|
642
|
+
string s;
|
|
643
|
+
{
|
|
644
|
+
s = "";
|
|
645
|
+
auto mmkv = MMKV::mmkvWithID("testOneKey");
|
|
646
|
+
|
|
647
|
+
mmkv->getString(key, s);
|
|
648
|
+
printf("testOneKey: value = %s\n", s.c_str());
|
|
649
|
+
|
|
650
|
+
mmkv->set("world", key);
|
|
651
|
+
mmkv->getString(key, s);
|
|
652
|
+
printf("testOneKey: value = %s\n", s.c_str());
|
|
653
|
+
|
|
654
|
+
for (int i = 0; i < 10; i++) {
|
|
655
|
+
string value = "world_";
|
|
656
|
+
value += to_string(i);
|
|
657
|
+
mmkv->set(value, key);
|
|
658
|
+
mmkv->getString(key, s);
|
|
659
|
+
printf("testOneKey: value = %s\n", s.c_str());
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
// test file expanding
|
|
663
|
+
string bigValue(100000, '0');
|
|
664
|
+
mmkv->set(bigValue, key);
|
|
665
|
+
mmkv->getString(key, s);
|
|
666
|
+
assert(s == bigValue);
|
|
667
|
+
|
|
668
|
+
mmkv->set("OK", key);
|
|
669
|
+
mmkv->getString(key, s);
|
|
670
|
+
printf("testOneKey: value = %s\n", s.c_str());
|
|
671
|
+
|
|
672
|
+
// close it and reopen it
|
|
673
|
+
mmkv->close();
|
|
674
|
+
mmkv = MMKV::mmkvWithID("testOneKey");
|
|
675
|
+
mmkv->getString(key, s);
|
|
676
|
+
printf("testOneKey: after reopen value = %s\n", s.c_str());
|
|
677
|
+
assert(s == "OK");
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
{
|
|
681
|
+
s = "";
|
|
682
|
+
string cryptKey = "fastest";
|
|
683
|
+
auto mmkv = MMKV::mmkvWithID("testOneKeyCrypt", MMKV_SINGLE_PROCESS, &cryptKey);
|
|
684
|
+
|
|
685
|
+
mmkv->getString(key, s);
|
|
686
|
+
printf("testOneKeyCrypt: value = %s\n", s.c_str());
|
|
687
|
+
|
|
688
|
+
mmkv->set("cryptworld", key);
|
|
689
|
+
mmkv->getString(key, s);
|
|
690
|
+
printf("testOneKeyCrypt: value = %s\n", s.c_str());
|
|
691
|
+
|
|
692
|
+
for (int i = 0; i < 10; i++) {
|
|
693
|
+
string value = "cryptworld_";
|
|
694
|
+
value += to_string(i);
|
|
695
|
+
mmkv->set(value, key);
|
|
696
|
+
mmkv->getString(key, s);
|
|
697
|
+
printf("testOneKeyCrypt: value = %s\n", s.c_str());
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
// close it and reopen it
|
|
701
|
+
mmkv->close();
|
|
702
|
+
mmkv = MMKV::mmkvWithID("testOneKeyCrypt", MMKV_SINGLE_PROCESS, &cryptKey);
|
|
703
|
+
mmkv->getString(key, s);
|
|
704
|
+
printf("testOneKeyCrypt: after reopen value = %s\n", s.c_str());
|
|
705
|
+
assert(s == "cryptworld_9");
|
|
706
|
+
|
|
707
|
+
mmkv->set("cryptworld_good", key);
|
|
708
|
+
mmkv->getString(key, s);
|
|
709
|
+
printf("testOneKeyCrypt: value = %s\n", s.c_str());
|
|
710
|
+
assert(s == "cryptworld_good");
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
{
|
|
714
|
+
string cryptKey = "expiretest";
|
|
715
|
+
auto mmkv = MMKV::mmkvWithID("testOneKeyCryptExpire", MMKV_SINGLE_PROCESS, &cryptKey);
|
|
716
|
+
mmkv->enableAutoKeyExpire(24 * 60 * 60);
|
|
717
|
+
|
|
718
|
+
s = "";
|
|
719
|
+
mmkv->getString(key, s);
|
|
720
|
+
printf("testOneKeyCryptExpire: value = %s\n", s.c_str());
|
|
721
|
+
|
|
722
|
+
mmkv->set("expire", key, 1000);
|
|
723
|
+
mmkv->getString(key, s);
|
|
724
|
+
printf("testOneKeyCryptExpire: value = %s\n", s.c_str());
|
|
725
|
+
|
|
726
|
+
for (int i = 0; i < 10; i++) {
|
|
727
|
+
string value = "expire_";
|
|
728
|
+
value += to_string(i);
|
|
729
|
+
mmkv->set(value, key);
|
|
730
|
+
mmkv->getString(key, s);
|
|
731
|
+
printf("testOneKeyCryptExpire: value = %s\n", s.c_str());
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
// close it and reopen it
|
|
735
|
+
mmkv->close();
|
|
736
|
+
mmkv = MMKV::mmkvWithID("testOneKeyCryptExpire", MMKV_SINGLE_PROCESS, &cryptKey);
|
|
737
|
+
mmkv->getString(key, s);
|
|
738
|
+
printf("testOneKeyCryptExpire: after reopen value = %s\n", s.c_str());
|
|
739
|
+
assert(s == "expire_9");
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
void testOverride() {
|
|
744
|
+
string key1 = "key1";
|
|
745
|
+
string key2 = "key2";
|
|
746
|
+
string key3 = "key3";
|
|
747
|
+
string s;
|
|
748
|
+
{
|
|
749
|
+
s = "";
|
|
750
|
+
auto mmkv = MMKV::mmkvWithID("testOverride");
|
|
751
|
+
|
|
752
|
+
mmkv->set("world1", key1);
|
|
753
|
+
mmkv->getString(key1, s);
|
|
754
|
+
printf("testOverride: key1 = %s\n", s.c_str());
|
|
755
|
+
|
|
756
|
+
mmkv->set("world2", key2);
|
|
757
|
+
mmkv->getString(key2, s);
|
|
758
|
+
printf("testOverride: key2 = %s\n", s.c_str());
|
|
759
|
+
|
|
760
|
+
mmkv->removeValueForKey(key1);
|
|
761
|
+
mmkv->removeValueForKey(key2);
|
|
762
|
+
|
|
763
|
+
printf("testOverride: actualSize = %lu\n", mmkv->actualSize());
|
|
764
|
+
|
|
765
|
+
mmkv->set("world3", key3);
|
|
766
|
+
mmkv->getString(key3, s);
|
|
767
|
+
printf("testOverride: key3 = %s\n", s.c_str());
|
|
768
|
+
printf("testOverride: actualSize = %lu\n", mmkv->actualSize());
|
|
769
|
+
|
|
770
|
+
mmkv->removeValueForKey(key3);
|
|
771
|
+
|
|
772
|
+
// test file expanding
|
|
773
|
+
string bigValue(100000, '0');
|
|
774
|
+
mmkv->set(bigValue, key1);
|
|
775
|
+
mmkv->getString(key1, s);
|
|
776
|
+
assert(s == bigValue);
|
|
777
|
+
|
|
778
|
+
mmkv->removeValueForKey(key1);
|
|
779
|
+
|
|
780
|
+
mmkv->set("OK", key2);
|
|
781
|
+
mmkv->getString(key2, s);
|
|
782
|
+
printf("testOverride: value = %s\n", s.c_str());
|
|
783
|
+
|
|
784
|
+
// close it and reopen it
|
|
785
|
+
mmkv->close();
|
|
786
|
+
mmkv = MMKV::mmkvWithID("testOverride");
|
|
787
|
+
mmkv->getString(key2, s);
|
|
788
|
+
printf("testOverride: after reopen key2 = %s\n", s.c_str());
|
|
789
|
+
assert(s == "OK");
|
|
790
|
+
|
|
791
|
+
mmkv->removeValueForKey(key2);
|
|
792
|
+
mmkv->trim();
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
{
|
|
796
|
+
s = "";
|
|
797
|
+
string cryptKey = "fastest2";
|
|
798
|
+
auto mmkv = MMKV::mmkvWithID("testOverrideCrypt", MMKV_SINGLE_PROCESS, &cryptKey);
|
|
799
|
+
mmkv->enableAutoKeyExpire(24 * 60 * 60);
|
|
800
|
+
|
|
801
|
+
mmkv->set("world1", key1);
|
|
802
|
+
mmkv->getString(key1, s);
|
|
803
|
+
printf("testOverrideCrypt: key1 = %s\n", s.c_str());
|
|
804
|
+
|
|
805
|
+
mmkv->set("world2", key2);
|
|
806
|
+
mmkv->getString(key2, s);
|
|
807
|
+
printf("testOverrideCrypt: key2 = %s\n", s.c_str());
|
|
808
|
+
|
|
809
|
+
mmkv->removeValueForKey(key1);
|
|
810
|
+
mmkv->removeValueForKey(key2);
|
|
811
|
+
|
|
812
|
+
printf("testOverrideCrypt: actualSize = %lu\n", mmkv->actualSize());
|
|
813
|
+
|
|
814
|
+
mmkv->set("world3", key3);
|
|
815
|
+
mmkv->getString(key3, s);
|
|
816
|
+
printf("testOverrideCrypt: key3 = %s\n", s.c_str());
|
|
817
|
+
printf("testOverrideCrypt: actualSize = %lu\n", mmkv->actualSize());
|
|
818
|
+
|
|
819
|
+
mmkv->removeValueForKey(key3);
|
|
820
|
+
|
|
821
|
+
// test file expanding
|
|
822
|
+
string bigValue(100000, '0');
|
|
823
|
+
mmkv->set(bigValue, key1);
|
|
824
|
+
mmkv->getString(key1, s);
|
|
825
|
+
assert(s == bigValue);
|
|
826
|
+
|
|
827
|
+
mmkv->removeValueForKey(key1);
|
|
828
|
+
|
|
829
|
+
mmkv->set("OK", key2);
|
|
830
|
+
mmkv->getString(key2, s);
|
|
831
|
+
printf("testOverrideCrypt: value = %s\n", s.c_str());
|
|
832
|
+
|
|
833
|
+
// close it and reopen it
|
|
834
|
+
mmkv->close();
|
|
835
|
+
mmkv = MMKV::mmkvWithID("testOverrideCrypt", MMKV_SINGLE_PROCESS, &cryptKey);
|
|
836
|
+
mmkv->getString(key2, s);
|
|
837
|
+
printf("testOverrideCrypt: after reopen key2 = %s\n", s.c_str());
|
|
838
|
+
assert(s == "OK");
|
|
839
|
+
|
|
840
|
+
mmkv->removeValueForKey(key2);
|
|
841
|
+
mmkv->trim();
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
uint64_t getTimeInMs() {
|
|
847
|
+
using namespace std::chrono;
|
|
848
|
+
return duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
void testGetStringSpeed() {
|
|
852
|
+
string bigValue(100000, '0');
|
|
853
|
+
string key = "key1";
|
|
854
|
+
auto mmkv = MMKV::mmkvWithID("testGetStringSpeed");
|
|
855
|
+
mmkv->set(bigValue, key);
|
|
856
|
+
|
|
857
|
+
string result;
|
|
858
|
+
uint64_t start1, end1, start2, end2;
|
|
859
|
+
|
|
860
|
+
start2 = getTimeInMs();
|
|
861
|
+
for (int i = 0; i < 2000000; i++) {
|
|
862
|
+
mmkv->getString("key1", result, true);
|
|
863
|
+
}
|
|
864
|
+
end2 = getTimeInMs();
|
|
865
|
+
|
|
866
|
+
start1 = getTimeInMs();
|
|
867
|
+
for (int i = 0; i < 2000000; i++) {
|
|
868
|
+
mmkv->getString("key1", result, false);
|
|
869
|
+
}
|
|
870
|
+
end1 = getTimeInMs();
|
|
871
|
+
|
|
872
|
+
printf("old_method = %" PRId64 ", new_method = %" PRId64 "\n", end1 - start1, end2 - start2);
|
|
873
|
+
|
|
874
|
+
start1 = getTimeInMs();
|
|
875
|
+
for (int i = 0; i < 2000000; i++) {
|
|
876
|
+
mmkv->getString("key1", result, false);
|
|
877
|
+
}
|
|
878
|
+
end1 = getTimeInMs();
|
|
879
|
+
|
|
880
|
+
start2 = getTimeInMs();
|
|
881
|
+
for (int i = 0; i < 2000000; i++) {
|
|
882
|
+
mmkv->getString("key1", result, true);
|
|
883
|
+
}
|
|
884
|
+
end2 = getTimeInMs();
|
|
885
|
+
printf("old_method = %" PRId64 ", new_method = %" PRId64 "\n", end1 - start1, end2 - start2);
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
void printVector(vector<string> &v) {
|
|
889
|
+
printf("testCompareBeforeSet: string<vector>: ");
|
|
890
|
+
if (v.empty()) {
|
|
891
|
+
return;
|
|
892
|
+
}
|
|
893
|
+
for (int i = 0; i < v.size() - 1; i++) {
|
|
894
|
+
printf("%s, ", v[i].c_str());
|
|
895
|
+
}
|
|
896
|
+
if (!v.empty()) {
|
|
897
|
+
printf("%s\n", v[v.size() - 1].c_str());
|
|
898
|
+
} else {
|
|
899
|
+
printf("\n");
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
void testCompareBeforeSet() {
|
|
904
|
+
auto mmkv = MMKV::mmkvWithID("testCompareBeforeSet", MMKV_SINGLE_PROCESS);
|
|
905
|
+
mmkv->enableCompareBeforeSet();
|
|
906
|
+
mmkv->set("extraValue", "extraKey");
|
|
907
|
+
|
|
908
|
+
size_t actualSize1 = -1;
|
|
909
|
+
size_t actualSize2 = -1;
|
|
910
|
+
|
|
911
|
+
string key;
|
|
912
|
+
{
|
|
913
|
+
key = "bool";
|
|
914
|
+
mmkv->set(true, key);
|
|
915
|
+
printf("testCompareBeforeSet: bool value = %d\n", mmkv->getBool(key));
|
|
916
|
+
actualSize1 = mmkv->actualSize();
|
|
917
|
+
printf("testCompareBeforeSet: actualSize = %lu\n", actualSize1);
|
|
918
|
+
printf("testCompareBeforeSet: bool value = %d\n", mmkv->getBool(key));
|
|
919
|
+
mmkv->set(true, key);
|
|
920
|
+
actualSize2 = mmkv->actualSize();
|
|
921
|
+
printf("testCompareBeforeSet: actualSize2 = %lu\n", actualSize2);
|
|
922
|
+
assert(actualSize1 == actualSize2);
|
|
923
|
+
mmkv->set(false, key);
|
|
924
|
+
printf("testCompareBeforeSet: bool value = %d\n", mmkv->getBool(key));
|
|
925
|
+
assert(mmkv->getBool(key) == false);
|
|
926
|
+
}
|
|
927
|
+
{
|
|
928
|
+
key = "int32_t";
|
|
929
|
+
int32_t v = 12345;
|
|
930
|
+
mmkv->set(v, key);
|
|
931
|
+
printf("testCompareBeforeSet: int32 value = %d\n", mmkv->getInt32(key));
|
|
932
|
+
actualSize1 = mmkv->actualSize();
|
|
933
|
+
printf("testCompareBeforeSet: actualSize = %lu\n", actualSize1);
|
|
934
|
+
printf("testCompareBeforeSet: int32 value = %d\n", mmkv->getInt32(key));
|
|
935
|
+
mmkv->set(v, key);
|
|
936
|
+
actualSize2 = mmkv->actualSize();
|
|
937
|
+
assert(actualSize1 == actualSize2);
|
|
938
|
+
mmkv->set(v << 1, key);
|
|
939
|
+
printf("testCompareBeforeSet: int32 value = %d\n", mmkv->getInt32(key));
|
|
940
|
+
assert(mmkv->getInt32(key) == v << 1);
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
{
|
|
944
|
+
key = "uint32_t";
|
|
945
|
+
uint32_t v32u = 6379;
|
|
946
|
+
mmkv->set(v32u, key);
|
|
947
|
+
printf("testCompareBeforeSet: uint32_t value = %d\n", mmkv->getUInt32(key));
|
|
948
|
+
actualSize1 = mmkv->actualSize();
|
|
949
|
+
printf("testCompareBeforeSet: actualSize = %lu\n", actualSize1);
|
|
950
|
+
printf("testCompareBeforeSet: uint32_t value = %d\n", mmkv->getUInt32(key));
|
|
951
|
+
mmkv->set(v32u, key);
|
|
952
|
+
actualSize2 = mmkv->actualSize();
|
|
953
|
+
assert(actualSize1 == actualSize2);
|
|
954
|
+
mmkv->set(v32u >> 1, key);
|
|
955
|
+
printf("testCompareBeforeSet: uint32_t value = %d\n", mmkv->getUInt32(key));
|
|
956
|
+
assert(mmkv->getUInt32(key) == v32u >> 1);
|
|
957
|
+
}
|
|
958
|
+
{
|
|
959
|
+
key = "int64_t";
|
|
960
|
+
int64_t v64 = 8080;
|
|
961
|
+
mmkv->set(v64, key);
|
|
962
|
+
printf("testCompareBeforeSet: int64_t value = %" PRId64 "\n", mmkv->getInt64(key));
|
|
963
|
+
actualSize1 = mmkv->actualSize();
|
|
964
|
+
printf("testCompareBeforeSet: actualSize = %lu\n", actualSize1);
|
|
965
|
+
printf("testCompareBeforeSet: int64_t value = %" PRId64 "\n", mmkv->getInt64(key));
|
|
966
|
+
mmkv->set(v64, key);
|
|
967
|
+
actualSize2 = mmkv->actualSize();
|
|
968
|
+
assert(actualSize1 == actualSize2);
|
|
969
|
+
mmkv->set(v64 >> 1, key);
|
|
970
|
+
printf("testCompareBeforeSet: int64_t value = %" PRId64 "\n", mmkv->getInt64(key));
|
|
971
|
+
assert(mmkv->getInt64(key) == v64 >> 1);
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
{
|
|
975
|
+
key = "uint64_t";
|
|
976
|
+
uint64_t v64u = 8848;
|
|
977
|
+
mmkv->set(v64u, key);
|
|
978
|
+
printf("testCompareBeforeSet: uint64_t value = %" PRIu64 "\n", mmkv->getUInt64(key));
|
|
979
|
+
actualSize1 = mmkv->actualSize();
|
|
980
|
+
printf("testCompareBeforeSet: actualSize = %lu\n", actualSize1);
|
|
981
|
+
printf("testCompareBeforeSet: uint64_t value = %" PRIu64 "\n", mmkv->getUInt64(key));
|
|
982
|
+
mmkv->set(v64u, key);
|
|
983
|
+
actualSize2 = mmkv->actualSize();
|
|
984
|
+
assert(actualSize1 == actualSize2);
|
|
985
|
+
mmkv->set(v64u >> 1, key);
|
|
986
|
+
printf("testCompareBeforeSet: uint64_t value = %" PRIu64 "\n", mmkv->getUInt64(key));
|
|
987
|
+
assert(mmkv->getUInt64(key) == v64u >> 1);
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
{
|
|
991
|
+
key = "float";
|
|
992
|
+
float flt = -987.012f;
|
|
993
|
+
mmkv->set(flt, key);
|
|
994
|
+
printf("testCompareBeforeSet: float value = %lf\n", mmkv->getFloat(key));
|
|
995
|
+
actualSize1 = mmkv->actualSize();
|
|
996
|
+
printf("testCompareBeforeSet: actualSize = %lu\n", actualSize1);
|
|
997
|
+
printf("testCompareBeforeSet: float value = %lf\n", mmkv->getFloat(key));
|
|
998
|
+
mmkv->set(flt, key);
|
|
999
|
+
actualSize2 = mmkv->actualSize();
|
|
1000
|
+
assert(actualSize1 == actualSize2);
|
|
1001
|
+
mmkv->set(flt * 12.56f, key);
|
|
1002
|
+
printf("testCompareBeforeSet: float value = %lf\n", mmkv->getFloat(key));
|
|
1003
|
+
assert(fabs(mmkv->getFloat(key) - flt * 12.56f) <= 1e-6);
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
{
|
|
1007
|
+
key = "double";
|
|
1008
|
+
double db = 8888987.012f;
|
|
1009
|
+
mmkv->set(db, key);
|
|
1010
|
+
printf("testCompareBeforeSet: double value = %lf\n", mmkv->getDouble(key));
|
|
1011
|
+
actualSize1 = mmkv->actualSize();
|
|
1012
|
+
printf("testCompareBeforeSet: actualSize = %lu\n", actualSize1);
|
|
1013
|
+
printf("testCompareBeforeSet: double value = %lf\n", mmkv->getDouble(key));
|
|
1014
|
+
mmkv->set(db, key);
|
|
1015
|
+
actualSize2 = mmkv->actualSize();
|
|
1016
|
+
assert(actualSize1 == actualSize2);
|
|
1017
|
+
mmkv->set(db * -12.56f, key);
|
|
1018
|
+
printf("testCompareBeforeSet: double value = %lf\n", mmkv->getDouble(key));
|
|
1019
|
+
assert(fabs(mmkv->getDouble(key) - db * -12.56f) <= 1e-6);
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
bool ret = false;
|
|
1023
|
+
string resultString;
|
|
1024
|
+
const char* raws = "🏊🏻®4️⃣🐅_";
|
|
1025
|
+
const char* raws2 = "12🏊🏻e®4️⃣🐅_34)(*()";
|
|
1026
|
+
{
|
|
1027
|
+
key = "char*";
|
|
1028
|
+
mmkv->set(raws, key);
|
|
1029
|
+
ret = mmkv->getString(key, resultString);
|
|
1030
|
+
printf("testCompareBeforeSet: char* = %s\n", resultString.c_str());
|
|
1031
|
+
actualSize1 = mmkv->actualSize();
|
|
1032
|
+
printf("testCompareBeforeSet: actualSize = %lu\n", actualSize1);
|
|
1033
|
+
ret = mmkv->getString(key, resultString);
|
|
1034
|
+
printf("testCompareBeforeSet: char* = %s\n", resultString.c_str());
|
|
1035
|
+
mmkv->set(raws, key);
|
|
1036
|
+
actualSize2 = mmkv->actualSize();
|
|
1037
|
+
assert(actualSize1 == actualSize2);
|
|
1038
|
+
mmkv->set(raws2, key);
|
|
1039
|
+
ret = mmkv->getString(key, resultString);
|
|
1040
|
+
printf("testCompareBeforeSet: char* = %s\n", resultString.c_str());
|
|
1041
|
+
assert(resultString == raws2);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
string s1 = "🏊🏻®hhh4️⃣🐅_yyy";
|
|
1045
|
+
string s2 = "0aA🏊🏻®hhh4️⃣🐅_zzz";
|
|
1046
|
+
|
|
1047
|
+
{
|
|
1048
|
+
key = "string";
|
|
1049
|
+
mmkv->set(s1, key);
|
|
1050
|
+
ret = mmkv->getString(key, resultString);
|
|
1051
|
+
printf("testCompareBeforeSet: string = %s\n", resultString.c_str());
|
|
1052
|
+
actualSize1 = mmkv->actualSize();
|
|
1053
|
+
printf("testCompareBeforeSet: actualSize = %lu\n", actualSize1);
|
|
1054
|
+
ret = mmkv->getString(key, resultString);
|
|
1055
|
+
printf("testCompareBeforeSet: string = %s\n", resultString.c_str());
|
|
1056
|
+
mmkv->set(s1, key);
|
|
1057
|
+
actualSize2 = mmkv->actualSize();
|
|
1058
|
+
assert(actualSize1 == actualSize2);
|
|
1059
|
+
mmkv->set(s2, key);
|
|
1060
|
+
ret = mmkv->getString(key, resultString);
|
|
1061
|
+
printf("testCompareBeforeSet: string = %s\n", resultString.c_str());
|
|
1062
|
+
assert(resultString == s2);
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
{
|
|
1066
|
+
s1 = "buffer_🏊🏻®hhh4️⃣🐅_yyy";
|
|
1067
|
+
s2 = "buffer_0aA🏊🏻®hhh4️⃣🐅_zzz";
|
|
1068
|
+
MMBuffer buffer1((void *) s1.c_str(), s1.size());
|
|
1069
|
+
MMBuffer buffer2((void *) s2.c_str(), s2.size());
|
|
1070
|
+
key = "mmbuffer";
|
|
1071
|
+
mmkv->set(buffer1, key);
|
|
1072
|
+
ret = mmkv->getString(key, resultString);
|
|
1073
|
+
printf("testCompareBeforeSet: MMBuffer = %s\n", resultString.c_str());
|
|
1074
|
+
actualSize1 = mmkv->actualSize();
|
|
1075
|
+
printf("testCompareBeforeSet: MMBuffer = %lu\n", actualSize1);
|
|
1076
|
+
ret = mmkv->getString(key, resultString);
|
|
1077
|
+
printf("testCompareBeforeSet: MMBuffer = %s\n", resultString.c_str());
|
|
1078
|
+
mmkv->set(buffer1, key);
|
|
1079
|
+
actualSize2 = mmkv->actualSize();
|
|
1080
|
+
assert(actualSize1 == actualSize2);
|
|
1081
|
+
mmkv->set(buffer2, key);
|
|
1082
|
+
ret = mmkv->getString(key, resultString);
|
|
1083
|
+
printf("testCompareBeforeSet: MMBuffer = %s\n", resultString.c_str());
|
|
1084
|
+
assert(resultString == s2);
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
{
|
|
1088
|
+
key = "string<vector>";
|
|
1089
|
+
vector<string> v1 = {"1", s1, s2};
|
|
1090
|
+
vector<string> v2 = {"2", s1, s2};
|
|
1091
|
+
vector<string> vectorResult;
|
|
1092
|
+
mmkv->set(v1, key);
|
|
1093
|
+
ret = mmkv->getVector(key, vectorResult);
|
|
1094
|
+
printVector(vectorResult);
|
|
1095
|
+
actualSize1 = mmkv->actualSize();
|
|
1096
|
+
printf("testCompareBeforeSet: string<vector> size = %lu\n", actualSize1);
|
|
1097
|
+
ret = mmkv->getVector(key, vectorResult);
|
|
1098
|
+
printVector(vectorResult);
|
|
1099
|
+
mmkv->set(v1, key);
|
|
1100
|
+
actualSize2 = mmkv->actualSize();
|
|
1101
|
+
assert(actualSize1 == actualSize2);
|
|
1102
|
+
mmkv->set(v2, key);
|
|
1103
|
+
ret = mmkv->getVector(key, vectorResult);
|
|
1104
|
+
printVector(vectorResult);
|
|
1105
|
+
assert(vectorResult == v2);
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
// {
|
|
1109
|
+
// string key = "keyyy";
|
|
1110
|
+
// auto mmkv1 = MMKV::mmkvWithID("testCompareBeforeSet1", MMKV_SINGLE_PROCESS, &key);
|
|
1111
|
+
// mmkv1->enableCompareBeforeSet();
|
|
1112
|
+
// }
|
|
1113
|
+
|
|
1114
|
+
// {
|
|
1115
|
+
// auto mmkv2 = MMKV::mmkvWithID("testCompareBeforeSet2", MMKV_SINGLE_PROCESS);
|
|
1116
|
+
// mmkv2->enableAutoKeyExpire();
|
|
1117
|
+
// mmkv2->enableCompareBeforeSet();
|
|
1118
|
+
// }
|
|
1119
|
+
//
|
|
1120
|
+
// {
|
|
1121
|
+
// auto mmkv3 = MMKV::mmkvWithID("testCompareBeforeSet3", MMKV_SINGLE_PROCESS);
|
|
1122
|
+
// mmkv3->enableCompareBeforeSet();
|
|
1123
|
+
// mmkv3->enableAutoKeyExpire();
|
|
1124
|
+
// }
|
|
1125
|
+
|
|
1126
|
+
{
|
|
1127
|
+
actualSize1 = -1;
|
|
1128
|
+
auto mmkv1 = MMKV::mmkvWithID("differentType2");
|
|
1129
|
+
mmkv1->clearAll();
|
|
1130
|
+
mmkv1->enableCompareBeforeSet();
|
|
1131
|
+
mmkv1->set("xxx", "yyy");
|
|
1132
|
+
actualSize1 = mmkv1->actualSize();
|
|
1133
|
+
|
|
1134
|
+
mmkv1->set("value1", "key1");
|
|
1135
|
+
actualSize2 = mmkv1->actualSize();
|
|
1136
|
+
assert(actualSize2 > actualSize1);
|
|
1137
|
+
actualSize1 = actualSize2;
|
|
1138
|
+
printf("%d\n", mmkv1->getBool("key1", false));
|
|
1139
|
+
printf("actualSize = %lu\n", mmkv1->actualSize());
|
|
1140
|
+
assert( mmkv1->getBool("key1", false));
|
|
1141
|
+
mmkv1->set(true, "key1");
|
|
1142
|
+
actualSize2 = mmkv1->actualSize();
|
|
1143
|
+
assert(actualSize2 > actualSize1);
|
|
1144
|
+
actualSize1 = actualSize2;
|
|
1145
|
+
|
|
1146
|
+
mmkv1->set(false, "key1");
|
|
1147
|
+
actualSize2 = mmkv1->actualSize();
|
|
1148
|
+
assert(actualSize2 > actualSize1);
|
|
1149
|
+
actualSize1 = actualSize2;
|
|
1150
|
+
|
|
1151
|
+
printf("%d\n", mmkv1->getBool("key1", false)); // print 1
|
|
1152
|
+
printf("actualSize = %lu\n", mmkv1->actualSize());
|
|
1153
|
+
mmkv1->set("value1", "key1");
|
|
1154
|
+
actualSize2 = mmkv1->actualSize();
|
|
1155
|
+
assert(actualSize2 > actualSize1);
|
|
1156
|
+
actualSize1 = actualSize2;
|
|
1157
|
+
|
|
1158
|
+
string v;
|
|
1159
|
+
mmkv1->getString("key1", v);
|
|
1160
|
+
printf("%s\n", v.c_str()); // print value1
|
|
1161
|
+
|
|
1162
|
+
vector<string> v1 = {"1", s1, s2};
|
|
1163
|
+
vector<string> v2 = {"2", s1, s2};
|
|
1164
|
+
mmkv1->set(v1, "key1");
|
|
1165
|
+
actualSize2 = mmkv1->actualSize();
|
|
1166
|
+
assert(actualSize2 > actualSize1);
|
|
1167
|
+
actualSize1 = actualSize2;
|
|
1168
|
+
vector<string> vectorResult;
|
|
1169
|
+
ret = mmkv1->getVector("key1", vectorResult);
|
|
1170
|
+
printVector(vectorResult);
|
|
1171
|
+
|
|
1172
|
+
// test exception
|
|
1173
|
+
mmkv1->set(12345, "key2");
|
|
1174
|
+
actualSize1 = mmkv1->actualSize();
|
|
1175
|
+
// "<MMKV_IO.cpp::setDataForKey> compareBeforeSet exception: InvalidProtocolBuffer truncatedMessage" from log
|
|
1176
|
+
string vv = "abcdefg";
|
|
1177
|
+
mmkv1->set(vv, "key2");
|
|
1178
|
+
actualSize2 = mmkv1->actualSize();
|
|
1179
|
+
string vv2(vv.size(), 0);
|
|
1180
|
+
mmkv1->getString("key2", vv2, true);
|
|
1181
|
+
assert(vv == vv2);
|
|
1182
|
+
assert(actualSize2 > actualSize1);
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
{
|
|
1186
|
+
key = "key";
|
|
1187
|
+
auto mmkv1 = MMKV::mmkvWithID("compareEmpty");
|
|
1188
|
+
mmkv1->enableCompareBeforeSet();
|
|
1189
|
+
mmkv1->set("", key);
|
|
1190
|
+
actualSize1 = mmkv1->actualSize();
|
|
1191
|
+
mmkv1->set("", key);
|
|
1192
|
+
actualSize2 = mmkv1->actualSize();
|
|
1193
|
+
assert(actualSize1 == actualSize2);
|
|
1194
|
+
|
|
1195
|
+
string vv = "abcdefG";
|
|
1196
|
+
actualSize1 = mmkv1->actualSize();
|
|
1197
|
+
mmkv1->set(vv, key);
|
|
1198
|
+
actualSize2 = mmkv1->actualSize();
|
|
1199
|
+
assert(actualSize2 > actualSize1);
|
|
1200
|
+
string result;
|
|
1201
|
+
mmkv1->getString(key, result, true);
|
|
1202
|
+
assert(result == vv);
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
void testFtruncateFail() {
|
|
1207
|
+
auto mmkv = MMKV::mmkvWithID("testFtruncateFail");
|
|
1208
|
+
signal(SIGXFSZ, SIG_IGN);
|
|
1209
|
+
struct rlimit rlim_new,rlim;
|
|
1210
|
+
string bigValue(1000, '0');
|
|
1211
|
+
if (getrlimit(RLIMIT_FSIZE, &rlim) == 0) {
|
|
1212
|
+
rlim_new.rlim_cur = rlim_new.rlim_max = 5000 * 1024;
|
|
1213
|
+
int ret = setrlimit(RLIMIT_FSIZE, &rlim_new);
|
|
1214
|
+
printf("setrlimit ret = %d\n", ret);
|
|
1215
|
+
|
|
1216
|
+
for (int i = 0; i < 1000000; i++) {
|
|
1217
|
+
string key = "qwerttt" + to_string(i);
|
|
1218
|
+
// fail to truncate [/tmp/mmkv/testFtruncateFail] to size 8388608, File too large
|
|
1219
|
+
bool ret = mmkv->set(bigValue, key);
|
|
1220
|
+
if (!ret) {
|
|
1221
|
+
break;
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
void testRemoveStorage() {
|
|
1228
|
+
string mmapID = "test_remove";
|
|
1229
|
+
{
|
|
1230
|
+
auto mmkv = MMKV::mmkvWithID(mmapID, MMKV_MULTI_PROCESS);
|
|
1231
|
+
mmkv->set(true, "bool");
|
|
1232
|
+
}
|
|
1233
|
+
MMKV::removeStorage(mmapID);
|
|
1234
|
+
{
|
|
1235
|
+
auto mmkv = MMKV::mmkvWithID(mmapID, MMKV_MULTI_PROCESS);
|
|
1236
|
+
if (mmkv->count() != 0) {
|
|
1237
|
+
abort();
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
mmapID = "test_remove/sg";
|
|
1242
|
+
string rootDir = "/tmp/mmkv_1";
|
|
1243
|
+
auto mmkv = MMKV::mmkvWithID(mmapID, MMKV_SINGLE_PROCESS, nullptr, &rootDir);
|
|
1244
|
+
mmkv->set(true, "bool");
|
|
1245
|
+
MMKV::removeStorage(mmapID, &rootDir);
|
|
1246
|
+
mmkv = MMKV::mmkvWithID(mmapID, MMKV_SINGLE_PROCESS, nullptr, &rootDir);
|
|
1247
|
+
if (mmkv->count() != 0) {
|
|
1248
|
+
abort();
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
void setReadOnly(const MMKVPath_t& path, bool readOnly) {
|
|
1253
|
+
int mode = 0;
|
|
1254
|
+
// alter the read-only attribute
|
|
1255
|
+
if (readOnly) {
|
|
1256
|
+
mode = 0444;
|
|
1257
|
+
} else {
|
|
1258
|
+
mode = 0666;
|
|
1259
|
+
}
|
|
1260
|
+
// Set the file attributes to the new value
|
|
1261
|
+
if (chmod(path.c_str(), mode) != 0) {
|
|
1262
|
+
// If the function fails, print an error message
|
|
1263
|
+
auto err = errno;
|
|
1264
|
+
printf("Failed to set file attributes. Error code: %d, %s\n", err, strerror(err));
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
void testReadOnly() {
|
|
1269
|
+
string mmapID = "testReadOnly";
|
|
1270
|
+
string aesKey = "ReadOnly+Key";
|
|
1271
|
+
{
|
|
1272
|
+
auto mmkv = MMKV::mmkvWithID(mmapID, MMKV_SINGLE_PROCESS, &aesKey);
|
|
1273
|
+
functionalTest(mmkv, false);
|
|
1274
|
+
mmkv->close();
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
auto path = MMKV::getRootDir() + MMKV_PATH_SLASH + mmapID;
|
|
1278
|
+
setReadOnly(path, true);
|
|
1279
|
+
auto crcPath = path + ".crc";
|
|
1280
|
+
setReadOnly(crcPath, true);
|
|
1281
|
+
{
|
|
1282
|
+
auto mmkv = MMKV::mmkvWithID(mmapID, (MMKV_SINGLE_PROCESS | MMKV_READ_ONLY), &aesKey);
|
|
1283
|
+
functionalTest(mmkv, true);
|
|
1284
|
+
|
|
1285
|
+
// also check if it tolerate update operations without crash
|
|
1286
|
+
functionalTest(mmkv, false);
|
|
1287
|
+
|
|
1288
|
+
mmkv->close();
|
|
1289
|
+
}
|
|
1290
|
+
setReadOnly(path, false);
|
|
1291
|
+
setReadOnly(crcPath, false);
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
void testNameSpace() {
|
|
1295
|
+
string root = "/tmp/mmkv_namespace";
|
|
1296
|
+
auto ns = MMKV::nameSpace(root);
|
|
1297
|
+
auto kv = ns.mmkvWithID("test_namespace");
|
|
1298
|
+
functionalTest(kv, false);
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
void testImport() {
|
|
1302
|
+
string mmapID = "test_import_src";
|
|
1303
|
+
auto src = MMKV::mmkvWithID(mmapID);
|
|
1304
|
+
src->set(true, "bool");
|
|
1305
|
+
src->set(std::numeric_limits<int32_t>::min(), "int");
|
|
1306
|
+
src->set(std::numeric_limits<uint64_t>::max(), "long");
|
|
1307
|
+
src->set("test import", "string");
|
|
1308
|
+
|
|
1309
|
+
auto dst = MMKV::mmkvWithID("test_import_dst");
|
|
1310
|
+
dst->clearAll();
|
|
1311
|
+
dst->enableAutoKeyExpire(1);
|
|
1312
|
+
dst->set(true, "bool");
|
|
1313
|
+
dst->set(-1, "int");
|
|
1314
|
+
dst->set(0, "long");
|
|
1315
|
+
dst->set(mmapID, "string");
|
|
1316
|
+
|
|
1317
|
+
auto count = dst->importFrom(src);
|
|
1318
|
+
assert(count == 4 && dst->count() == 4);
|
|
1319
|
+
assert(dst->getBool("bool"));
|
|
1320
|
+
assert(dst->getInt32("int") == std::numeric_limits<int32_t>::min());
|
|
1321
|
+
assert(dst->getUInt64("long") == std::numeric_limits<uint64_t>::max());
|
|
1322
|
+
string result;
|
|
1323
|
+
dst->getString("string", result);
|
|
1324
|
+
assert(result == "test import");
|
|
1325
|
+
sleep(2);
|
|
1326
|
+
assert(dst->count(true) == 0);
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
MMKV* testMMKV(const string& mmapID, const string* cryptKey, bool aes256, bool decodeOnly, const string* rootPath) {
|
|
1330
|
+
MMKV* kv = MMKV::mmkvWithID(mmapID, MMKV_SINGLE_PROCESS, cryptKey, rootPath, 0, aes256);
|
|
1331
|
+
functionalTest(kv, decodeOnly);
|
|
1332
|
+
return kv;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
void testReKey() {
|
|
1336
|
+
string mmapID = "test/AES_reKey1";
|
|
1337
|
+
MMKV* kv = testMMKV(mmapID, nullptr, false, false, nullptr);
|
|
1338
|
+
|
|
1339
|
+
string cryptKey = "Key_seq_1";
|
|
1340
|
+
kv->reKey(cryptKey);
|
|
1341
|
+
kv->clearMemoryCache();
|
|
1342
|
+
testMMKV(mmapID, &cryptKey, false, true, nullptr);
|
|
1343
|
+
|
|
1344
|
+
string cryptKey2 = "Key_Seq_Very_Looooooooong";
|
|
1345
|
+
kv->reKey(cryptKey2, true);
|
|
1346
|
+
kv->clearMemoryCache();
|
|
1347
|
+
testMMKV(mmapID, &cryptKey2, true, true, nullptr);
|
|
1348
|
+
|
|
1349
|
+
kv->reKey(string());
|
|
1350
|
+
kv->clearMemoryCache();
|
|
1351
|
+
testMMKV(mmapID, nullptr, false, true, nullptr);
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
void MyLogHandler(MMKVLogLevel level, const char *file, int line, const char *function, const string &message) {
|
|
1355
|
+
|
|
1356
|
+
auto desc = [level] {
|
|
1357
|
+
switch (level) {
|
|
1358
|
+
case MMKVLogDebug:
|
|
1359
|
+
return "D";
|
|
1360
|
+
case MMKVLogInfo:
|
|
1361
|
+
return "I";
|
|
1362
|
+
case MMKVLogWarning:
|
|
1363
|
+
return "W";
|
|
1364
|
+
case MMKVLogError:
|
|
1365
|
+
return "E";
|
|
1366
|
+
default:
|
|
1367
|
+
return "N";
|
|
1368
|
+
}
|
|
1369
|
+
}();
|
|
1370
|
+
printf("redirecting-[%s] <%s:%d::%s> %s\n", desc, file, line, function, message.c_str());
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
void testReadonlyCrash() {
|
|
1374
|
+
std::string *key = nullptr;
|
|
1375
|
+
const std::string g_ro_path = "/tmp/mmkv_readonly";
|
|
1376
|
+
MMKV *self = MMKV::mmkvWithID("UnitTestRo", MMKVMode::MMKV_MULTI_PROCESS | MMKVMode::MMKV_READ_ONLY, key, &g_ro_path);
|
|
1377
|
+
// MMKV *self = MMKV::mmkvWithID("UnitTestRo", MMKVMode::MMKV_MULTI_PROCESS, key, &g_ro_path);
|
|
1378
|
+
std::string tmp;
|
|
1379
|
+
// self->set("", "test_ro_string");
|
|
1380
|
+
self->getString("test_ro_string", tmp);
|
|
1381
|
+
printf("value: %s\n", tmp.c_str());
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
int main() {
|
|
1385
|
+
locale::global(locale(""));
|
|
1386
|
+
wcout.imbue(locale(""));
|
|
1387
|
+
char c;
|
|
1388
|
+
srand((uint64_t) &c);
|
|
1389
|
+
|
|
1390
|
+
// test NameSpace before MMKV.initializeMMKV()
|
|
1391
|
+
testNameSpace();
|
|
1392
|
+
|
|
1393
|
+
string rootDir = "/tmp/mmkv";
|
|
1394
|
+
MMKV::initializeMMKV(rootDir, MMKVLogInfo, MyLogHandler);
|
|
1395
|
+
// MMKV::setLogLevel(MMKVLogNone);
|
|
1396
|
+
// MMKV::registerLogHandler(MyLogHandler);
|
|
1397
|
+
|
|
1398
|
+
//auto mmkv = MMKV::defaultMMKV();
|
|
1399
|
+
string aesKey = "cryptKey";
|
|
1400
|
+
auto mmkv = MMKV::mmkvWithID("test/Encrypt", MMKV_SINGLE_PROCESS, &aesKey);
|
|
1401
|
+
functionalTest(mmkv, false);
|
|
1402
|
+
|
|
1403
|
+
for (size_t index = 0; index < keyCount; index++) {
|
|
1404
|
+
arrIntKeys.push_back("int-" + to_string(index));
|
|
1405
|
+
arrStringKeys.push_back("string-" + to_string(index));
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
//fastRemoveCornetSizeTest();
|
|
1409
|
+
// cornetSizeTest();
|
|
1410
|
+
//testClearEmptyMMKV();
|
|
1411
|
+
brutleTest();
|
|
1412
|
+
threadTest();
|
|
1413
|
+
processTest();
|
|
1414
|
+
testInterProcessLock();
|
|
1415
|
+
testExpectedCapacity();
|
|
1416
|
+
testOnlyOneKey();
|
|
1417
|
+
testOverride();
|
|
1418
|
+
testClearAllKeepSpace();
|
|
1419
|
+
// testGetStringSpeed();
|
|
1420
|
+
testCompareBeforeSet();
|
|
1421
|
+
testBackup();
|
|
1422
|
+
testRestore();
|
|
1423
|
+
testAutoExpiration();
|
|
1424
|
+
// testFtruncateFail();
|
|
1425
|
+
testRemoveStorage();
|
|
1426
|
+
testReadOnly();
|
|
1427
|
+
testReadonlyCrash();
|
|
1428
|
+
testImport();
|
|
1429
|
+
itemSizeHolderTest();
|
|
1430
|
+
testReKey();
|
|
1431
|
+
}
|