@appzung/react-native-code-push 9.0.2 → 10.0.0
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/CodePush.podspec +1 -0
- package/LICENSE.md +1 -1
- package/README.md +169 -329
- package/android/app/.gradle/config.properties +2 -0
- package/android/app/build.gradle +63 -19
- package/android/app/local.properties +8 -0
- package/android/app/src/main/AndroidManifest.xml +2 -3
- package/android/app/src/main/AndroidManifestNew.xml +3 -0
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePush.java +35 -97
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushConstants.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInstallMode.java +2 -2
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidPublicKeyException.java +2 -2
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidUpdateException.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushMalformedDataException.java +2 -2
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNativeModule.java +37 -8
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNotInitializedException.java +2 -2
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushTelemetryManager.java +14 -14
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUnknownException.java +2 -2
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateManager.java +3 -3
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateState.java +2 -2
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateUtils.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUtils.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgress.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgressCallback.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/FileUtils.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/ReactInstanceHolder.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/SettingsManager.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/TLSSocketFactory.java +1 -1
- package/android/build.gradle +1 -11
- package/android/codepush.gradle +3 -3
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradle.properties +4 -20
- package/docs/advanced-usage.md +56 -0
- package/docs/api-android.md +16 -77
- package/docs/api-ios.md +9 -21
- package/docs/api-js.md +184 -219
- package/docs/code-signing.md +62 -0
- package/docs/migrating-to-v10.md +31 -0
- package/docs/setup-android.md +54 -463
- package/docs/setup-ios.md +37 -208
- package/docs/setup-windows.md +8 -74
- package/ios/CodePush/CodePush.h +4 -4
- package/ios/CodePush/CodePush.m +21 -65
- package/ios/CodePush/CodePushConfig.m +14 -11
- package/ios/CodePush/CodePushPackage.m +60 -60
- package/ios/CodePush/CodePushTelemetryManager.m +13 -13
- package/ios/CodePush.xcodeproj/project.pbxproj +1 -562
- package/lib/commonjs/CodePush.js +90 -0
- package/lib/commonjs/CodePush.js.map +1 -0
- package/lib/commonjs/allowRestart.js +12 -0
- package/lib/commonjs/allowRestart.js.map +1 -0
- package/lib/commonjs/checkForUpdates.js +105 -0
- package/lib/commonjs/checkForUpdates.js.map +1 -0
- package/lib/commonjs/clearUpdates.js +15 -0
- package/lib/commonjs/clearUpdates.js.map +1 -0
- package/lib/commonjs/disallowRestart.js +12 -0
- package/lib/commonjs/disallowRestart.js.map +1 -0
- package/lib/commonjs/enums/CheckFrequency.enum.js +25 -0
- package/lib/commonjs/enums/CheckFrequency.enum.js.map +1 -0
- package/lib/commonjs/enums/DeploymentStatus.enum.js +21 -0
- package/lib/commonjs/enums/DeploymentStatus.enum.js.map +1 -0
- package/lib/commonjs/enums/InstallMode.enum.js +35 -0
- package/lib/commonjs/enums/InstallMode.enum.js.map +1 -0
- package/lib/commonjs/enums/SyncStatus.enum.js +53 -0
- package/lib/commonjs/enums/SyncStatus.enum.js.map +1 -0
- package/lib/commonjs/enums/UpdateState.enum.js +29 -0
- package/lib/commonjs/enums/UpdateState.enum.js.map +1 -0
- package/lib/commonjs/getUpdateMetadata.js +25 -0
- package/lib/commonjs/getUpdateMetadata.js.map +1 -0
- package/lib/commonjs/index.js +195 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/internals/AcquisitionSdk.js +9 -0
- package/lib/commonjs/internals/AcquisitionSdk.js.map +1 -0
- package/lib/commonjs/internals/LocalPackageImplementation.js +29 -0
- package/lib/commonjs/internals/LocalPackageImplementation.js.map +1 -0
- package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js +8 -0
- package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js.map +1 -0
- package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js +6 -0
- package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
- package/lib/commonjs/internals/RemotePackageImplementation.js +49 -0
- package/lib/commonjs/internals/RemotePackageImplementation.js.map +1 -0
- package/lib/commonjs/internals/getConfiguration.js +15 -0
- package/lib/commonjs/internals/getConfiguration.js.map +1 -0
- package/lib/commonjs/internals/getCurrentPackage.js +12 -0
- package/lib/commonjs/internals/getCurrentPackage.js.map +1 -0
- package/lib/commonjs/internals/getPromisifiedSdk.js +49 -0
- package/lib/commonjs/internals/getPromisifiedSdk.js.map +1 -0
- package/lib/commonjs/internals/shouldUpdateBeIgnored.js +62 -0
- package/lib/commonjs/internals/shouldUpdateBeIgnored.js.map +1 -0
- package/lib/commonjs/internals/types.js +6 -0
- package/lib/commonjs/internals/types.js.map +1 -0
- package/lib/commonjs/internals/utils/log.js +11 -0
- package/lib/commonjs/internals/utils/log.js.map +1 -0
- package/lib/commonjs/internals/utils/request-fetch-adapter.js +50 -0
- package/lib/commonjs/internals/utils/request-fetch-adapter.js.map +1 -0
- package/lib/commonjs/internals/version.js +9 -0
- package/lib/commonjs/internals/version.js.map +1 -0
- package/lib/commonjs/notifyAppReady.js +83 -0
- package/lib/commonjs/notifyAppReady.js.map +1 -0
- package/lib/commonjs/reactNative.d.js +2 -0
- package/lib/commonjs/reactNative.d.js.map +1 -0
- package/lib/commonjs/restartApp.js +16 -0
- package/lib/commonjs/restartApp.js.map +1 -0
- package/lib/commonjs/sync.js +219 -0
- package/lib/commonjs/sync.js.map +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/CodePush.js +84 -0
- package/lib/module/CodePush.js.map +1 -0
- package/lib/module/allowRestart.js +9 -0
- package/lib/module/allowRestart.js.map +1 -0
- package/lib/module/checkForUpdates.js +101 -0
- package/lib/module/checkForUpdates.js.map +1 -0
- package/lib/module/clearUpdates.js +12 -0
- package/lib/module/clearUpdates.js.map +1 -0
- package/lib/module/disallowRestart.js +9 -0
- package/lib/module/disallowRestart.js.map +1 -0
- package/lib/module/enums/CheckFrequency.enum.js +21 -0
- package/lib/module/enums/CheckFrequency.enum.js.map +1 -0
- package/lib/module/enums/DeploymentStatus.enum.js +17 -0
- package/lib/module/enums/DeploymentStatus.enum.js.map +1 -0
- package/lib/module/enums/InstallMode.enum.js +32 -0
- package/lib/module/enums/InstallMode.enum.js.map +1 -0
- package/lib/module/enums/SyncStatus.enum.js +49 -0
- package/lib/module/enums/SyncStatus.enum.js.map +1 -0
- package/lib/module/enums/UpdateState.enum.js +26 -0
- package/lib/module/enums/UpdateState.enum.js.map +1 -0
- package/lib/module/getUpdateMetadata.js +21 -0
- package/lib/module/getUpdateMetadata.js.map +1 -0
- package/lib/module/index.js +19 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/internals/AcquisitionSdk.js +5 -0
- package/lib/module/internals/AcquisitionSdk.js.map +1 -0
- package/lib/module/internals/LocalPackageImplementation.js +24 -0
- package/lib/module/internals/LocalPackageImplementation.js.map +1 -0
- package/lib/module/internals/NativeRNAppZungCodePushModule.js +4 -0
- package/lib/module/internals/NativeRNAppZungCodePushModule.js.map +1 -0
- package/lib/module/internals/RNAppZungCodePushModuleSpec.js +4 -0
- package/lib/module/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
- package/lib/module/internals/RemotePackageImplementation.js +44 -0
- package/lib/module/internals/RemotePackageImplementation.js.map +1 -0
- package/lib/module/internals/getConfiguration.js +11 -0
- package/lib/module/internals/getConfiguration.js.map +1 -0
- package/lib/module/internals/getCurrentPackage.js +8 -0
- package/lib/module/internals/getCurrentPackage.js.map +1 -0
- package/lib/module/internals/getPromisifiedSdk.js +45 -0
- package/lib/module/internals/getPromisifiedSdk.js.map +1 -0
- package/lib/module/internals/shouldUpdateBeIgnored.js +58 -0
- package/lib/module/internals/shouldUpdateBeIgnored.js.map +1 -0
- package/lib/module/internals/types.js +4 -0
- package/lib/module/internals/types.js.map +1 -0
- package/lib/module/internals/utils/log.js +7 -0
- package/lib/module/internals/utils/log.js.map +1 -0
- package/lib/module/internals/utils/request-fetch-adapter.js +46 -0
- package/lib/module/internals/utils/request-fetch-adapter.js.map +1 -0
- package/lib/module/internals/version.js +5 -0
- package/lib/module/internals/version.js.map +1 -0
- package/lib/module/notifyAppReady.js +79 -0
- package/lib/module/notifyAppReady.js.map +1 -0
- package/lib/module/reactNative.d.js +2 -0
- package/lib/module/reactNative.d.js.map +1 -0
- package/lib/module/restartApp.js +13 -0
- package/lib/module/restartApp.js.map +1 -0
- package/lib/module/sync.js +215 -0
- package/lib/module/sync.js.map +1 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/CodePush.d.ts +24 -0
- package/lib/typescript/commonjs/src/CodePush.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/allowRestart.d.ts +5 -0
- package/lib/typescript/commonjs/src/allowRestart.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/checkForUpdates.d.ts +9 -0
- package/lib/typescript/commonjs/src/checkForUpdates.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/clearUpdates.d.ts +8 -0
- package/lib/typescript/commonjs/src/clearUpdates.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/disallowRestart.d.ts +5 -0
- package/lib/typescript/commonjs/src/disallowRestart.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts +18 -0
- package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts +14 -0
- package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts +27 -0
- package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts +46 -0
- package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts +21 -0
- package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts +9 -0
- package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts +17 -0
- package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
- package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts +18 -0
- package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts +2 -0
- package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts +13 -0
- package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/types.d.ts +16 -0
- package/lib/typescript/commonjs/src/internals/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/utils/log.d.ts +2 -0
- package/lib/typescript/commonjs/src/internals/utils/log.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/version.d.ts +2 -0
- package/lib/typescript/commonjs/src/internals/version.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/notifyAppReady.d.ts +6 -0
- package/lib/typescript/commonjs/src/notifyAppReady.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/restartApp.d.ts +7 -0
- package/lib/typescript/commonjs/src/restartApp.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/sync.d.ts +17 -0
- package/lib/typescript/commonjs/src/sync.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types.d.ts +196 -0
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/CodePush.d.ts +24 -0
- package/lib/typescript/module/src/CodePush.d.ts.map +1 -0
- package/lib/typescript/module/src/allowRestart.d.ts +5 -0
- package/lib/typescript/module/src/allowRestart.d.ts.map +1 -0
- package/lib/typescript/module/src/checkForUpdates.d.ts +9 -0
- package/lib/typescript/module/src/checkForUpdates.d.ts.map +1 -0
- package/lib/typescript/module/src/clearUpdates.d.ts +8 -0
- package/lib/typescript/module/src/clearUpdates.d.ts.map +1 -0
- package/lib/typescript/module/src/disallowRestart.d.ts +5 -0
- package/lib/typescript/module/src/disallowRestart.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts +18 -0
- package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts +14 -0
- package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/InstallMode.enum.d.ts +27 -0
- package/lib/typescript/module/src/enums/InstallMode.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts +46 -0
- package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/UpdateState.enum.d.ts +21 -0
- package/lib/typescript/module/src/enums/UpdateState.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/getUpdateMetadata.d.ts +9 -0
- package/lib/typescript/module/src/getUpdateMetadata.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +17 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts +3 -0
- package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts +17 -0
- package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
- package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
- package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts +18 -0
- package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/getConfiguration.d.ts +3 -0
- package/lib/typescript/module/src/internals/getConfiguration.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/getCurrentPackage.d.ts +2 -0
- package/lib/typescript/module/src/internals/getCurrentPackage.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts +13 -0
- package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
- package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/types.d.ts +16 -0
- package/lib/typescript/module/src/internals/types.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/utils/log.d.ts +2 -0
- package/lib/typescript/module/src/internals/utils/log.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts +3 -0
- package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/version.d.ts +2 -0
- package/lib/typescript/module/src/internals/version.d.ts.map +1 -0
- package/lib/typescript/module/src/notifyAppReady.d.ts +6 -0
- package/lib/typescript/module/src/notifyAppReady.d.ts.map +1 -0
- package/lib/typescript/module/src/restartApp.d.ts +7 -0
- package/lib/typescript/module/src/restartApp.d.ts.map +1 -0
- package/lib/typescript/module/src/sync.d.ts +17 -0
- package/lib/typescript/module/src/sync.d.ts.map +1 -0
- package/lib/typescript/module/src/types.d.ts +196 -0
- package/lib/typescript/module/src/types.d.ts.map +1 -0
- package/package.json +79 -29
- package/react-native.config.js +8 -8
- package/scripts/generateBundledResourcesHash.js +1 -1
- package/scripts/getFilesInFolder.js +1 -1
- package/scripts/recordFilesBeforeBundleCommand.js +1 -1
- package/src/CodePush.tsx +108 -0
- package/src/allowRestart.ts +6 -0
- package/src/checkForUpdates.ts +109 -0
- package/src/clearUpdates.ts +9 -0
- package/src/disallowRestart.ts +6 -0
- package/src/enums/CheckFrequency.enum.ts +19 -0
- package/src/enums/DeploymentStatus.enum.ts +14 -0
- package/src/enums/InstallMode.enum.ts +31 -0
- package/src/enums/SyncStatus.enum.ts +53 -0
- package/src/enums/UpdateState.enum.ts +24 -0
- package/src/getUpdateMetadata.ts +23 -0
- package/src/index.ts +18 -0
- package/src/internals/AcquisitionSdk.ts +3 -0
- package/src/internals/LocalPackageImplementation.ts +45 -0
- package/src/internals/NativeRNAppZungCodePushModule.ts +3 -0
- package/src/internals/RNAppZungCodePushModuleSpec.ts +54 -0
- package/src/internals/RemotePackageImplementation.ts +69 -0
- package/src/internals/getConfiguration.ts +12 -0
- package/src/internals/getCurrentPackage.ts +6 -0
- package/src/internals/getPromisifiedSdk.ts +72 -0
- package/src/internals/shouldUpdateBeIgnored.ts +76 -0
- package/src/internals/types.ts +18 -0
- package/{logging.js → src/internals/utils/log.ts} +1 -3
- package/src/internals/utils/request-fetch-adapter.ts +58 -0
- package/src/internals/version.ts +2 -0
- package/src/notifyAppReady.ts +94 -0
- package/src/reactNative.d.ts +34 -0
- package/src/restartApp.ts +10 -0
- package/src/sync.ts +272 -0
- package/src/types.ts +237 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +29 -12
- package/windows/CodePush/CodePushConfig.cpp +3 -3
- package/windows/CodePush/CodePushConfig.h +3 -3
- package/windows/CodePush/CodePushNativeModule.cpp +27 -27
- package/windows/CodePush/CodePushNativeModule.h +4 -4
- package/windows/CodePush/CodePushTelemetryManager.cpp +12 -12
- package/windows/CodePush/CodePushTelemetryManager.h +1 -1
- package/.azurepipelines/build-rn-code-push-1es.yml +0 -104
- package/.azurepipelines/test-rn-code-push.yml +0 -94
- package/.config/CredScanSuppressions.json +0 -14
- package/AlertAdapter.js +0 -24
- package/CONTRIBUTING.md +0 -134
- package/CodePush.js +0 -671
- package/SECURITY.md +0 -41
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +0 -37
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +0 -102
- package/docs/multi-deployment-testing-android.md +0 -148
- package/docs/multi-deployment-testing-ios.md +0 -59
- package/ios/CodePush/Base64/Base64/MF_Base64Additions.h +0 -34
- package/ios/CodePush/Base64/Base64/MF_Base64Additions.m +0 -252
- package/ios/CodePush/Base64/README.md +0 -47
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithm.h +0 -69
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.h +0 -16
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.m +0 -51
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.h +0 -15
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.m +0 -55
- package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.h +0 -24
- package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.m +0 -41
- package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.h +0 -28
- package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.m +0 -205
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.h +0 -103
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.m +0 -322
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.h +0 -37
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.m +0 -145
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.h +0 -35
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.m +0 -551
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTRSAlgorithm.h +0 -23
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.h +0 -43
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.m +0 -230
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.h +0 -31
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.m +0 -113
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.h +0 -38
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.m +0 -500
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.h +0 -18
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.m +0 -214
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.h +0 -23
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.m +0 -29
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.h +0 -19
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.m +0 -68
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.h +0 -18
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.m +0 -72
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.h +0 -67
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.m +0 -111
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.h +0 -119
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.m +0 -307
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.h +0 -94
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.m +0 -619
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.h +0 -164
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.m +0 -514
- package/ios/CodePush/JWT/Core/Coding/JWTCoding.h +0 -24
- package/ios/CodePush/JWT/Core/Coding/JWTCoding.m +0 -11
- package/ios/CodePush/JWT/Core/FrameworkSupplement/JWT.h +0 -52
- package/ios/CodePush/JWT/Core/FrameworkSupplement/Map.modulemap +0 -5
- package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.h +0 -28
- package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.m +0 -70
- package/ios/CodePush/JWT/Core/Supplement/JWTDeprecations.h +0 -22
- package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.h +0 -34
- package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.m +0 -73
- package/ios/CodePush/JWT/LICENSE +0 -19
- package/ios/CodePush/JWT/README.md +0 -489
- package/ios/CodePush/SSZipArchive/Info.plist +0 -26
- package/ios/CodePush/SSZipArchive/README.md +0 -1
- package/ios/CodePush/SSZipArchive/SSZipArchive.h +0 -178
- package/ios/CodePush/SSZipArchive/SSZipArchive.m +0 -1496
- package/ios/CodePush/SSZipArchive/SSZipCommon.h +0 -71
- package/ios/CodePush/SSZipArchive/Supporting Files/PrivacyInfo.xcprivacy +0 -23
- package/ios/CodePush/SSZipArchive/include/ZipArchive.h +0 -25
- package/ios/CodePush/SSZipArchive/minizip/LICENSE +0 -17
- package/ios/CodePush/SSZipArchive/minizip/mz.h +0 -273
- package/ios/CodePush/SSZipArchive/minizip/mz_compat.c +0 -1306
- package/ios/CodePush/SSZipArchive/minizip/mz_compat.h +0 -346
- package/ios/CodePush/SSZipArchive/minizip/mz_crypt.c +0 -187
- package/ios/CodePush/SSZipArchive/minizip/mz_crypt.h +0 -65
- package/ios/CodePush/SSZipArchive/minizip/mz_crypt_apple.c +0 -526
- package/ios/CodePush/SSZipArchive/minizip/mz_os.c +0 -348
- package/ios/CodePush/SSZipArchive/minizip/mz_os.h +0 -176
- package/ios/CodePush/SSZipArchive/minizip/mz_os_posix.c +0 -350
- package/ios/CodePush/SSZipArchive/minizip/mz_strm.c +0 -556
- package/ios/CodePush/SSZipArchive/minizip/mz_strm.h +0 -132
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.c +0 -383
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.h +0 -42
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.c +0 -269
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.h +0 -48
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_os.h +0 -40
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_os_posix.c +0 -203
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.c +0 -334
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.h +0 -46
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.c +0 -429
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.h +0 -43
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.c +0 -360
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.h +0 -46
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.c +0 -389
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.h +0 -43
- package/ios/CodePush/SSZipArchive/minizip/mz_zip.c +0 -2782
- package/ios/CodePush/SSZipArchive/minizip/mz_zip.h +0 -262
- package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.c +0 -1942
- package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.h +0 -285
- package/package-mixins.js +0 -68
- package/request-fetch-adapter.js +0 -52
- package/scripts/postlink/android/postlink.js +0 -87
- package/scripts/postlink/ios/postlink.js +0 -116
- package/scripts/postlink/run.js +0 -11
- package/scripts/postunlink/android/postunlink.js +0 -74
- package/scripts/postunlink/ios/postunlink.js +0 -87
- package/scripts/postunlink/run.js +0 -11
- package/scripts/tools/linkToolsAndroid.js +0 -57
- package/scripts/tools/linkToolsIos.js +0 -130
- package/tslint.json +0 -32
- package/typings/react-native-code-push.d.ts +0 -455
- package/windows-legacy/CodePush/CodePush.csproj +0 -128
- package/windows-legacy/CodePush/CodePushUtils.cs +0 -47
- package/windows-legacy/CodePush/FileUtils.cs +0 -40
- package/windows-legacy/CodePush/Properties/AssemblyInfo.cs +0 -29
- package/windows-legacy/CodePush/Properties/CodePush.rd.xml +0 -33
- package/windows-legacy/CodePush/UpdateManager.cs +0 -305
- package/windows-legacy/CodePush/UpdateUtils.cs +0 -46
- package/windows-legacy/CodePush.Net46/Adapters/Http/HttpProgress.cs +0 -28
- package/windows-legacy/CodePush.Net46/Adapters/Storage/ApplicationDataContainer.cs +0 -106
- package/windows-legacy/CodePush.Net46/CodePush.Net46.csproj +0 -103
- package/windows-legacy/CodePush.Net46/CodePushUtils.cs +0 -158
- package/windows-legacy/CodePush.Net46/FileUtils.cs +0 -55
- package/windows-legacy/CodePush.Net46/Properties/AssemblyInfo.cs +0 -36
- package/windows-legacy/CodePush.Net46/UpdateManager.cs +0 -330
- package/windows-legacy/CodePush.Net46/UpdateUtils.cs +0 -70
- package/windows-legacy/CodePush.Net46/packages.config +0 -5
- package/windows-legacy/CodePush.Net46.Test/ApplicationDataContainerTest.cs +0 -105
- package/windows-legacy/CodePush.Net46.Test/CodePush.Net46.Test.csproj +0 -137
- package/windows-legacy/CodePush.Net46.Test/Properties/AssemblyInfo.cs +0 -36
- package/windows-legacy/CodePush.Net46.Test/TelemetryManagerTest.cs +0 -117
- package/windows-legacy/CodePush.Net46.Test/app.config +0 -11
- package/windows-legacy/CodePush.Net46.Test/packages.config +0 -4
- package/windows-legacy/CodePush.Shared/CodePush.Shared.projitems +0 -22
- package/windows-legacy/CodePush.Shared/CodePush.Shared.shproj +0 -13
- package/windows-legacy/CodePush.Shared/CodePushConstants.cs +0 -35
- package/windows-legacy/CodePush.Shared/CodePushNativeModule.cs +0 -329
- package/windows-legacy/CodePush.Shared/CodePushReactPackage.cs +0 -235
- package/windows-legacy/CodePush.Shared/CodePushUtils.cs +0 -70
- package/windows-legacy/CodePush.Shared/InstallMode.cs +0 -9
- package/windows-legacy/CodePush.Shared/MinimumBackgroundListener.cs +0 -44
- package/windows-legacy/CodePush.Shared/SettingsManager.cs +0 -148
- package/windows-legacy/CodePush.Shared/TelemetryManager.cs +0 -250
- package/windows-legacy/CodePush.Shared/UpdateState.cs +0 -9
|
@@ -1,556 +0,0 @@
|
|
|
1
|
-
/* mz_strm.c -- Stream interface
|
|
2
|
-
part of the minizip-ng project
|
|
3
|
-
|
|
4
|
-
Copyright (C) Nathan Moinvaziri
|
|
5
|
-
https://github.com/zlib-ng/minizip-ng
|
|
6
|
-
|
|
7
|
-
This program is distributed under the terms of the same license as zlib.
|
|
8
|
-
See the accompanying LICENSE file for the full text of the license.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "mz.h"
|
|
12
|
-
#include "mz_strm.h"
|
|
13
|
-
|
|
14
|
-
/***************************************************************************/
|
|
15
|
-
|
|
16
|
-
#define MZ_STREAM_FIND_SIZE (1024)
|
|
17
|
-
|
|
18
|
-
/***************************************************************************/
|
|
19
|
-
|
|
20
|
-
int32_t mz_stream_open(void *stream, const char *path, int32_t mode) {
|
|
21
|
-
mz_stream *strm = (mz_stream *)stream;
|
|
22
|
-
if (!strm || !strm->vtbl || !strm->vtbl->open)
|
|
23
|
-
return MZ_STREAM_ERROR;
|
|
24
|
-
return strm->vtbl->open(strm, path, mode);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
int32_t mz_stream_is_open(void *stream) {
|
|
28
|
-
mz_stream *strm = (mz_stream *)stream;
|
|
29
|
-
if (!strm || !strm->vtbl || !strm->vtbl->is_open)
|
|
30
|
-
return MZ_STREAM_ERROR;
|
|
31
|
-
return strm->vtbl->is_open(strm);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
int32_t mz_stream_read(void *stream, void *buf, int32_t size) {
|
|
35
|
-
mz_stream *strm = (mz_stream *)stream;
|
|
36
|
-
if (!strm || !strm->vtbl || !strm->vtbl->read)
|
|
37
|
-
return MZ_PARAM_ERROR;
|
|
38
|
-
if (mz_stream_is_open(stream) != MZ_OK)
|
|
39
|
-
return MZ_STREAM_ERROR;
|
|
40
|
-
return strm->vtbl->read(strm, buf, size);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
static int32_t mz_stream_read_value(void *stream, uint64_t *value, int32_t len) {
|
|
44
|
-
uint8_t buf[8];
|
|
45
|
-
int32_t n = 0;
|
|
46
|
-
int32_t i = 0;
|
|
47
|
-
|
|
48
|
-
*value = 0;
|
|
49
|
-
if (mz_stream_read(stream, buf, len) == len) {
|
|
50
|
-
for (n = 0; n < len; n += 1, i += 8)
|
|
51
|
-
*value += ((uint64_t)buf[n]) << i;
|
|
52
|
-
} else if (mz_stream_error(stream))
|
|
53
|
-
return MZ_STREAM_ERROR;
|
|
54
|
-
else
|
|
55
|
-
return MZ_END_OF_STREAM;
|
|
56
|
-
|
|
57
|
-
return MZ_OK;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
int32_t mz_stream_read_uint8(void *stream, uint8_t *value) {
|
|
61
|
-
int32_t err = MZ_OK;
|
|
62
|
-
uint64_t value64 = 0;
|
|
63
|
-
|
|
64
|
-
*value = 0;
|
|
65
|
-
err = mz_stream_read_value(stream, &value64, sizeof(uint8_t));
|
|
66
|
-
if (err == MZ_OK)
|
|
67
|
-
*value = (uint8_t)value64;
|
|
68
|
-
return err;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
int32_t mz_stream_read_uint16(void *stream, uint16_t *value) {
|
|
72
|
-
int32_t err = MZ_OK;
|
|
73
|
-
uint64_t value64 = 0;
|
|
74
|
-
|
|
75
|
-
*value = 0;
|
|
76
|
-
err = mz_stream_read_value(stream, &value64, sizeof(uint16_t));
|
|
77
|
-
if (err == MZ_OK)
|
|
78
|
-
*value = (uint16_t)value64;
|
|
79
|
-
return err;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
int32_t mz_stream_read_uint32(void *stream, uint32_t *value) {
|
|
83
|
-
int32_t err = MZ_OK;
|
|
84
|
-
uint64_t value64 = 0;
|
|
85
|
-
|
|
86
|
-
*value = 0;
|
|
87
|
-
err = mz_stream_read_value(stream, &value64, sizeof(uint32_t));
|
|
88
|
-
if (err == MZ_OK)
|
|
89
|
-
*value = (uint32_t)value64;
|
|
90
|
-
return err;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
int32_t mz_stream_read_int64(void *stream, int64_t *value) {
|
|
94
|
-
return mz_stream_read_value(stream, (uint64_t *)value, sizeof(uint64_t));
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
int32_t mz_stream_read_uint64(void *stream, uint64_t *value) {
|
|
98
|
-
return mz_stream_read_value(stream, value, sizeof(uint64_t));
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
int32_t mz_stream_write(void *stream, const void *buf, int32_t size) {
|
|
102
|
-
mz_stream *strm = (mz_stream *)stream;
|
|
103
|
-
if (size == 0)
|
|
104
|
-
return size;
|
|
105
|
-
if (!strm || !strm->vtbl || !strm->vtbl->write)
|
|
106
|
-
return MZ_PARAM_ERROR;
|
|
107
|
-
if (mz_stream_is_open(stream) != MZ_OK)
|
|
108
|
-
return MZ_STREAM_ERROR;
|
|
109
|
-
return strm->vtbl->write(strm, buf, size);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
static int32_t mz_stream_write_value(void *stream, uint64_t value, int32_t len) {
|
|
113
|
-
uint8_t buf[8];
|
|
114
|
-
int32_t n = 0;
|
|
115
|
-
|
|
116
|
-
for (n = 0; n < len; n += 1) {
|
|
117
|
-
buf[n] = (uint8_t)(value & 0xff);
|
|
118
|
-
value >>= 8;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (value != 0) {
|
|
122
|
-
/* Data overflow - hack for ZIP64 (X Roche) */
|
|
123
|
-
for (n = 0; n < len; n += 1)
|
|
124
|
-
buf[n] = 0xff;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (mz_stream_write(stream, buf, len) != len)
|
|
128
|
-
return MZ_STREAM_ERROR;
|
|
129
|
-
|
|
130
|
-
return MZ_OK;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
int32_t mz_stream_write_uint8(void *stream, uint8_t value) {
|
|
134
|
-
return mz_stream_write_value(stream, value, sizeof(uint8_t));
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
int32_t mz_stream_write_uint16(void *stream, uint16_t value) {
|
|
138
|
-
return mz_stream_write_value(stream, value, sizeof(uint16_t));
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
int32_t mz_stream_write_uint32(void *stream, uint32_t value) {
|
|
142
|
-
return mz_stream_write_value(stream, value, sizeof(uint32_t));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
int32_t mz_stream_write_int64(void *stream, int64_t value) {
|
|
146
|
-
return mz_stream_write_value(stream, (uint64_t)value, sizeof(uint64_t));
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
int32_t mz_stream_write_uint64(void *stream, uint64_t value) {
|
|
150
|
-
return mz_stream_write_value(stream, value, sizeof(uint64_t));
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
int32_t mz_stream_copy(void *target, void *source, int32_t len) {
|
|
154
|
-
return mz_stream_copy_stream(target, NULL, source, NULL, len);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
int32_t mz_stream_copy_to_end(void *target, void *source) {
|
|
158
|
-
return mz_stream_copy_stream_to_end(target, NULL, source, NULL);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
int32_t mz_stream_copy_stream(void *target, mz_stream_write_cb write_cb, void *source,
|
|
162
|
-
mz_stream_read_cb read_cb, int32_t len) {
|
|
163
|
-
uint8_t buf[16384];
|
|
164
|
-
int32_t bytes_to_copy = 0;
|
|
165
|
-
int32_t read = 0;
|
|
166
|
-
int32_t written = 0;
|
|
167
|
-
|
|
168
|
-
if (!write_cb)
|
|
169
|
-
write_cb = mz_stream_write;
|
|
170
|
-
if (!read_cb)
|
|
171
|
-
read_cb = mz_stream_read;
|
|
172
|
-
|
|
173
|
-
while (len > 0) {
|
|
174
|
-
bytes_to_copy = len;
|
|
175
|
-
if (bytes_to_copy > (int32_t)sizeof(buf))
|
|
176
|
-
bytes_to_copy = sizeof(buf);
|
|
177
|
-
read = read_cb(source, buf, bytes_to_copy);
|
|
178
|
-
if (read <= 0)
|
|
179
|
-
return MZ_STREAM_ERROR;
|
|
180
|
-
written = write_cb(target, buf, read);
|
|
181
|
-
if (written != read)
|
|
182
|
-
return MZ_STREAM_ERROR;
|
|
183
|
-
len -= read;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return MZ_OK;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
int32_t mz_stream_copy_stream_to_end(void *target, mz_stream_write_cb write_cb, void *source,
|
|
190
|
-
mz_stream_read_cb read_cb) {
|
|
191
|
-
uint8_t buf[16384];
|
|
192
|
-
int32_t read = 0;
|
|
193
|
-
int32_t written = 0;
|
|
194
|
-
|
|
195
|
-
if (!write_cb)
|
|
196
|
-
write_cb = mz_stream_write;
|
|
197
|
-
if (!read_cb)
|
|
198
|
-
read_cb = mz_stream_read;
|
|
199
|
-
|
|
200
|
-
read = read_cb(source, buf, sizeof(buf));
|
|
201
|
-
while (read > 0) {
|
|
202
|
-
written = write_cb(target, buf, read);
|
|
203
|
-
if (written != read)
|
|
204
|
-
return MZ_STREAM_ERROR;
|
|
205
|
-
read = read_cb(source, buf, sizeof(buf));
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
if (read < 0)
|
|
209
|
-
return MZ_STREAM_ERROR;
|
|
210
|
-
|
|
211
|
-
return MZ_OK;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
int64_t mz_stream_tell(void *stream) {
|
|
215
|
-
mz_stream *strm = (mz_stream *)stream;
|
|
216
|
-
if (!strm || !strm->vtbl || !strm->vtbl->tell)
|
|
217
|
-
return MZ_PARAM_ERROR;
|
|
218
|
-
if (mz_stream_is_open(stream) != MZ_OK)
|
|
219
|
-
return MZ_STREAM_ERROR;
|
|
220
|
-
return strm->vtbl->tell(strm);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
int32_t mz_stream_seek(void *stream, int64_t offset, int32_t origin) {
|
|
224
|
-
mz_stream *strm = (mz_stream *)stream;
|
|
225
|
-
if (!strm || !strm->vtbl || !strm->vtbl->seek)
|
|
226
|
-
return MZ_PARAM_ERROR;
|
|
227
|
-
if (mz_stream_is_open(stream) != MZ_OK)
|
|
228
|
-
return MZ_STREAM_ERROR;
|
|
229
|
-
if (origin == MZ_SEEK_SET && offset < 0)
|
|
230
|
-
return MZ_SEEK_ERROR;
|
|
231
|
-
return strm->vtbl->seek(strm, offset, origin);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
int32_t mz_stream_find(void *stream, const void *find, int32_t find_size, int64_t max_seek, int64_t *position) {
|
|
235
|
-
uint8_t buf[MZ_STREAM_FIND_SIZE];
|
|
236
|
-
int32_t buf_pos = 0;
|
|
237
|
-
int32_t read_size = sizeof(buf);
|
|
238
|
-
int32_t read = 0;
|
|
239
|
-
int64_t read_pos = 0;
|
|
240
|
-
int64_t start_pos = 0;
|
|
241
|
-
int64_t disk_pos = 0;
|
|
242
|
-
int32_t i = 0;
|
|
243
|
-
uint8_t first = 1;
|
|
244
|
-
int32_t err = MZ_OK;
|
|
245
|
-
|
|
246
|
-
if (!stream || !find || !position)
|
|
247
|
-
return MZ_PARAM_ERROR;
|
|
248
|
-
if (find_size < 0 || find_size >= (int32_t)sizeof(buf))
|
|
249
|
-
return MZ_PARAM_ERROR;
|
|
250
|
-
|
|
251
|
-
*position = -1;
|
|
252
|
-
|
|
253
|
-
start_pos = mz_stream_tell(stream);
|
|
254
|
-
|
|
255
|
-
while (read_pos < max_seek) {
|
|
256
|
-
if (read_size > (int32_t)(max_seek - read_pos - buf_pos) && (max_seek - read_pos - buf_pos) < (int64_t)sizeof(buf))
|
|
257
|
-
read_size = (int32_t)(max_seek - read_pos - buf_pos);
|
|
258
|
-
|
|
259
|
-
read = mz_stream_read(stream, buf + buf_pos, read_size);
|
|
260
|
-
if ((read <= 0) || (read + buf_pos < find_size))
|
|
261
|
-
break;
|
|
262
|
-
|
|
263
|
-
for (i = 0; i <= read + buf_pos - find_size; i += 1) {
|
|
264
|
-
if (memcmp(&buf[i], find, find_size) != 0)
|
|
265
|
-
continue;
|
|
266
|
-
|
|
267
|
-
disk_pos = mz_stream_tell(stream);
|
|
268
|
-
|
|
269
|
-
/* Seek to position on disk where the data was found */
|
|
270
|
-
err = mz_stream_seek(stream, disk_pos - ((int64_t)read + buf_pos - i), MZ_SEEK_SET);
|
|
271
|
-
if (err != MZ_OK)
|
|
272
|
-
return MZ_EXIST_ERROR;
|
|
273
|
-
|
|
274
|
-
*position = start_pos + read_pos + i;
|
|
275
|
-
return MZ_OK;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
if (first) {
|
|
279
|
-
read -= find_size;
|
|
280
|
-
read_size -= find_size;
|
|
281
|
-
buf_pos = find_size;
|
|
282
|
-
first = 0;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
memmove(buf, buf + read, find_size);
|
|
286
|
-
read_pos += read;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
return MZ_EXIST_ERROR;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
int32_t mz_stream_find_reverse(void *stream, const void *find, int32_t find_size, int64_t max_seek, int64_t *position) {
|
|
293
|
-
uint8_t buf[MZ_STREAM_FIND_SIZE];
|
|
294
|
-
int32_t buf_pos = 0;
|
|
295
|
-
int32_t read_size = MZ_STREAM_FIND_SIZE;
|
|
296
|
-
int64_t read_pos = 0;
|
|
297
|
-
int32_t read = 0;
|
|
298
|
-
int64_t start_pos = 0;
|
|
299
|
-
int64_t disk_pos = 0;
|
|
300
|
-
uint8_t first = 1;
|
|
301
|
-
int32_t i = 0;
|
|
302
|
-
int32_t err = MZ_OK;
|
|
303
|
-
|
|
304
|
-
if (!stream || !find || !position)
|
|
305
|
-
return MZ_PARAM_ERROR;
|
|
306
|
-
if (find_size < 0 || find_size >= (int32_t)sizeof(buf))
|
|
307
|
-
return MZ_PARAM_ERROR;
|
|
308
|
-
|
|
309
|
-
*position = -1;
|
|
310
|
-
|
|
311
|
-
start_pos = mz_stream_tell(stream);
|
|
312
|
-
|
|
313
|
-
while (read_pos < max_seek) {
|
|
314
|
-
if (read_size > (int32_t)(max_seek - read_pos) && (max_seek - read_pos) < (int64_t)sizeof(buf))
|
|
315
|
-
read_size = (int32_t)(max_seek - read_pos);
|
|
316
|
-
|
|
317
|
-
if (mz_stream_seek(stream, start_pos - (read_pos + read_size), MZ_SEEK_SET) != MZ_OK)
|
|
318
|
-
break;
|
|
319
|
-
read = mz_stream_read(stream, buf, read_size);
|
|
320
|
-
if ((read <= 0) || (read + buf_pos < find_size))
|
|
321
|
-
break;
|
|
322
|
-
if (read + buf_pos < MZ_STREAM_FIND_SIZE)
|
|
323
|
-
memmove(buf + MZ_STREAM_FIND_SIZE - (read + buf_pos), buf, read);
|
|
324
|
-
|
|
325
|
-
for (i = find_size; i <= (read + buf_pos); i += 1) {
|
|
326
|
-
if (memcmp(&buf[MZ_STREAM_FIND_SIZE - i], find, find_size) != 0)
|
|
327
|
-
continue;
|
|
328
|
-
|
|
329
|
-
disk_pos = mz_stream_tell(stream);
|
|
330
|
-
|
|
331
|
-
/* Seek to position on disk where the data was found */
|
|
332
|
-
err = mz_stream_seek(stream, disk_pos + buf_pos - i, MZ_SEEK_SET);
|
|
333
|
-
if (err != MZ_OK)
|
|
334
|
-
return MZ_EXIST_ERROR;
|
|
335
|
-
|
|
336
|
-
*position = start_pos - (read_pos - buf_pos + i);
|
|
337
|
-
return MZ_OK;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
if (first) {
|
|
341
|
-
read -= find_size;
|
|
342
|
-
read_size -= find_size;
|
|
343
|
-
buf_pos = find_size;
|
|
344
|
-
first = 0;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
if (read == 0)
|
|
348
|
-
break;
|
|
349
|
-
|
|
350
|
-
memmove(buf + read_size, buf, find_size);
|
|
351
|
-
read_pos += read;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
return MZ_EXIST_ERROR;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
int32_t mz_stream_close(void *stream) {
|
|
358
|
-
mz_stream *strm = (mz_stream *)stream;
|
|
359
|
-
if (!strm || !strm->vtbl || !strm->vtbl->close)
|
|
360
|
-
return MZ_PARAM_ERROR;
|
|
361
|
-
if (mz_stream_is_open(stream) != MZ_OK)
|
|
362
|
-
return MZ_STREAM_ERROR;
|
|
363
|
-
return strm->vtbl->close(strm);
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
int32_t mz_stream_error(void *stream) {
|
|
367
|
-
mz_stream *strm = (mz_stream *)stream;
|
|
368
|
-
if (!strm || !strm->vtbl || !strm->vtbl->error)
|
|
369
|
-
return MZ_PARAM_ERROR;
|
|
370
|
-
return strm->vtbl->error(strm);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
int32_t mz_stream_set_base(void *stream, void *base) {
|
|
374
|
-
mz_stream *strm = (mz_stream *)stream;
|
|
375
|
-
strm->base = (mz_stream *)base;
|
|
376
|
-
return MZ_OK;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
void* mz_stream_get_interface(void *stream) {
|
|
380
|
-
mz_stream *strm = (mz_stream *)stream;
|
|
381
|
-
if (!strm || !strm->vtbl)
|
|
382
|
-
return NULL;
|
|
383
|
-
return (void *)strm->vtbl;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
int32_t mz_stream_get_prop_int64(void *stream, int32_t prop, int64_t *value) {
|
|
387
|
-
mz_stream *strm = (mz_stream *)stream;
|
|
388
|
-
if (!strm || !strm->vtbl || !strm->vtbl->get_prop_int64)
|
|
389
|
-
return MZ_PARAM_ERROR;
|
|
390
|
-
return strm->vtbl->get_prop_int64(stream, prop, value);
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
int32_t mz_stream_set_prop_int64(void *stream, int32_t prop, int64_t value) {
|
|
394
|
-
mz_stream *strm = (mz_stream *)stream;
|
|
395
|
-
if (!strm || !strm->vtbl || !strm->vtbl->set_prop_int64)
|
|
396
|
-
return MZ_PARAM_ERROR;
|
|
397
|
-
return strm->vtbl->set_prop_int64(stream, prop, value);
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
void *mz_stream_create(void **stream, mz_stream_vtbl *vtbl) {
|
|
401
|
-
if (!stream || !vtbl || !vtbl->create)
|
|
402
|
-
return NULL;
|
|
403
|
-
return vtbl->create(stream);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
void mz_stream_delete(void **stream) {
|
|
407
|
-
mz_stream *strm = NULL;
|
|
408
|
-
if (!stream)
|
|
409
|
-
return;
|
|
410
|
-
strm = (mz_stream *)*stream;
|
|
411
|
-
if (strm && strm->vtbl && strm->vtbl->destroy)
|
|
412
|
-
strm->vtbl->destroy(stream);
|
|
413
|
-
*stream = NULL;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/***************************************************************************/
|
|
417
|
-
|
|
418
|
-
typedef struct mz_stream_raw_s {
|
|
419
|
-
mz_stream stream;
|
|
420
|
-
int64_t total_in;
|
|
421
|
-
int64_t total_out;
|
|
422
|
-
int64_t max_total_in;
|
|
423
|
-
} mz_stream_raw;
|
|
424
|
-
|
|
425
|
-
/***************************************************************************/
|
|
426
|
-
|
|
427
|
-
int32_t mz_stream_raw_open(void *stream, const char *path, int32_t mode) {
|
|
428
|
-
MZ_UNUSED(stream);
|
|
429
|
-
MZ_UNUSED(path);
|
|
430
|
-
MZ_UNUSED(mode);
|
|
431
|
-
|
|
432
|
-
return MZ_OK;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
int32_t mz_stream_raw_is_open(void *stream) {
|
|
436
|
-
mz_stream_raw *raw = (mz_stream_raw *)stream;
|
|
437
|
-
return mz_stream_is_open(raw->stream.base);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
int32_t mz_stream_raw_read(void *stream, void *buf, int32_t size) {
|
|
441
|
-
mz_stream_raw *raw = (mz_stream_raw *)stream;
|
|
442
|
-
int32_t bytes_to_read = size;
|
|
443
|
-
int32_t read = 0;
|
|
444
|
-
|
|
445
|
-
if (raw->max_total_in > 0) {
|
|
446
|
-
if ((int64_t)bytes_to_read > (raw->max_total_in - raw->total_in))
|
|
447
|
-
bytes_to_read = (int32_t)(raw->max_total_in - raw->total_in);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
read = mz_stream_read(raw->stream.base, buf, bytes_to_read);
|
|
451
|
-
|
|
452
|
-
if (read > 0) {
|
|
453
|
-
raw->total_in += read;
|
|
454
|
-
raw->total_out += read;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
return read;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
int32_t mz_stream_raw_write(void *stream, const void *buf, int32_t size) {
|
|
461
|
-
mz_stream_raw *raw = (mz_stream_raw *)stream;
|
|
462
|
-
int32_t written = 0;
|
|
463
|
-
|
|
464
|
-
written = mz_stream_write(raw->stream.base, buf, size);
|
|
465
|
-
|
|
466
|
-
if (written > 0) {
|
|
467
|
-
raw->total_out += written;
|
|
468
|
-
raw->total_in += written;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
return written;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
int64_t mz_stream_raw_tell(void *stream) {
|
|
475
|
-
mz_stream_raw *raw = (mz_stream_raw *)stream;
|
|
476
|
-
return mz_stream_tell(raw->stream.base);
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
int32_t mz_stream_raw_seek(void *stream, int64_t offset, int32_t origin) {
|
|
480
|
-
mz_stream_raw *raw = (mz_stream_raw *)stream;
|
|
481
|
-
return mz_stream_seek(raw->stream.base, offset, origin);
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
int32_t mz_stream_raw_close(void *stream) {
|
|
485
|
-
MZ_UNUSED(stream);
|
|
486
|
-
return MZ_OK;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
int32_t mz_stream_raw_error(void *stream) {
|
|
490
|
-
mz_stream_raw *raw = (mz_stream_raw *)stream;
|
|
491
|
-
return mz_stream_error(raw->stream.base);
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
int32_t mz_stream_raw_get_prop_int64(void *stream, int32_t prop, int64_t *value) {
|
|
495
|
-
mz_stream_raw *raw = (mz_stream_raw *)stream;
|
|
496
|
-
switch (prop) {
|
|
497
|
-
case MZ_STREAM_PROP_TOTAL_IN:
|
|
498
|
-
*value = raw->total_in;
|
|
499
|
-
return MZ_OK;
|
|
500
|
-
case MZ_STREAM_PROP_TOTAL_OUT:
|
|
501
|
-
*value = raw->total_out;
|
|
502
|
-
return MZ_OK;
|
|
503
|
-
}
|
|
504
|
-
return MZ_EXIST_ERROR;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
int32_t mz_stream_raw_set_prop_int64(void *stream, int32_t prop, int64_t value) {
|
|
508
|
-
mz_stream_raw *raw = (mz_stream_raw *)stream;
|
|
509
|
-
switch (prop) {
|
|
510
|
-
case MZ_STREAM_PROP_TOTAL_IN_MAX:
|
|
511
|
-
raw->max_total_in = value;
|
|
512
|
-
return MZ_OK;
|
|
513
|
-
}
|
|
514
|
-
return MZ_EXIST_ERROR;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
/***************************************************************************/
|
|
518
|
-
|
|
519
|
-
static mz_stream_vtbl mz_stream_raw_vtbl = {
|
|
520
|
-
mz_stream_raw_open,
|
|
521
|
-
mz_stream_raw_is_open,
|
|
522
|
-
mz_stream_raw_read,
|
|
523
|
-
mz_stream_raw_write,
|
|
524
|
-
mz_stream_raw_tell,
|
|
525
|
-
mz_stream_raw_seek,
|
|
526
|
-
mz_stream_raw_close,
|
|
527
|
-
mz_stream_raw_error,
|
|
528
|
-
mz_stream_raw_create,
|
|
529
|
-
mz_stream_raw_delete,
|
|
530
|
-
mz_stream_raw_get_prop_int64,
|
|
531
|
-
mz_stream_raw_set_prop_int64
|
|
532
|
-
};
|
|
533
|
-
|
|
534
|
-
/***************************************************************************/
|
|
535
|
-
|
|
536
|
-
void *mz_stream_raw_create(void **stream) {
|
|
537
|
-
mz_stream_raw *raw = NULL;
|
|
538
|
-
|
|
539
|
-
raw = (mz_stream_raw *)calloc(1, sizeof(mz_stream_raw));
|
|
540
|
-
if (raw)
|
|
541
|
-
raw->stream.vtbl = &mz_stream_raw_vtbl;
|
|
542
|
-
if (stream)
|
|
543
|
-
*stream = raw;
|
|
544
|
-
|
|
545
|
-
return raw;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
void mz_stream_raw_delete(void **stream) {
|
|
549
|
-
mz_stream_raw *raw = NULL;
|
|
550
|
-
if (!stream)
|
|
551
|
-
return;
|
|
552
|
-
raw = (mz_stream_raw *)*stream;
|
|
553
|
-
if (raw)
|
|
554
|
-
free(raw);
|
|
555
|
-
*stream = NULL;
|
|
556
|
-
}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/* mz_strm.h -- Stream interface
|
|
2
|
-
part of the minizip-ng project
|
|
3
|
-
|
|
4
|
-
Copyright (C) Nathan Moinvaziri
|
|
5
|
-
https://github.com/zlib-ng/minizip-ng
|
|
6
|
-
|
|
7
|
-
This program is distributed under the terms of the same license as zlib.
|
|
8
|
-
See the accompanying LICENSE file for the full text of the license.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#ifndef MZ_STREAM_H
|
|
12
|
-
#define MZ_STREAM_H
|
|
13
|
-
|
|
14
|
-
#ifdef __cplusplus
|
|
15
|
-
extern "C" {
|
|
16
|
-
#endif
|
|
17
|
-
|
|
18
|
-
/***************************************************************************/
|
|
19
|
-
|
|
20
|
-
#define MZ_STREAM_PROP_TOTAL_IN (1)
|
|
21
|
-
#define MZ_STREAM_PROP_TOTAL_IN_MAX (2)
|
|
22
|
-
#define MZ_STREAM_PROP_TOTAL_OUT (3)
|
|
23
|
-
#define MZ_STREAM_PROP_TOTAL_OUT_MAX (4)
|
|
24
|
-
#define MZ_STREAM_PROP_HEADER_SIZE (5)
|
|
25
|
-
#define MZ_STREAM_PROP_FOOTER_SIZE (6)
|
|
26
|
-
#define MZ_STREAM_PROP_DISK_SIZE (7)
|
|
27
|
-
#define MZ_STREAM_PROP_DISK_NUMBER (8)
|
|
28
|
-
#define MZ_STREAM_PROP_COMPRESS_LEVEL (9)
|
|
29
|
-
#define MZ_STREAM_PROP_COMPRESS_METHOD (10)
|
|
30
|
-
#define MZ_STREAM_PROP_COMPRESS_WINDOW (11)
|
|
31
|
-
|
|
32
|
-
/***************************************************************************/
|
|
33
|
-
|
|
34
|
-
typedef int32_t (*mz_stream_open_cb) (void *stream, const char *path, int32_t mode);
|
|
35
|
-
typedef int32_t (*mz_stream_is_open_cb) (void *stream);
|
|
36
|
-
typedef int32_t (*mz_stream_read_cb) (void *stream, void *buf, int32_t size);
|
|
37
|
-
typedef int32_t (*mz_stream_write_cb) (void *stream, const void *buf, int32_t size);
|
|
38
|
-
typedef int64_t (*mz_stream_tell_cb) (void *stream);
|
|
39
|
-
typedef int32_t (*mz_stream_seek_cb) (void *stream, int64_t offset, int32_t origin);
|
|
40
|
-
typedef int32_t (*mz_stream_close_cb) (void *stream);
|
|
41
|
-
typedef int32_t (*mz_stream_error_cb) (void *stream);
|
|
42
|
-
typedef void* (*mz_stream_create_cb) (void **stream);
|
|
43
|
-
typedef void (*mz_stream_destroy_cb) (void **stream);
|
|
44
|
-
|
|
45
|
-
typedef int32_t (*mz_stream_get_prop_int64_cb) (void *stream, int32_t prop, int64_t *value);
|
|
46
|
-
typedef int32_t (*mz_stream_set_prop_int64_cb) (void *stream, int32_t prop, int64_t value);
|
|
47
|
-
|
|
48
|
-
typedef int32_t (*mz_stream_find_cb) (void *stream, const void *find, int32_t find_size,
|
|
49
|
-
int64_t max_seek, int64_t *position);
|
|
50
|
-
|
|
51
|
-
/***************************************************************************/
|
|
52
|
-
|
|
53
|
-
typedef struct mz_stream_vtbl_s {
|
|
54
|
-
mz_stream_open_cb open;
|
|
55
|
-
mz_stream_is_open_cb is_open;
|
|
56
|
-
mz_stream_read_cb read;
|
|
57
|
-
mz_stream_write_cb write;
|
|
58
|
-
mz_stream_tell_cb tell;
|
|
59
|
-
mz_stream_seek_cb seek;
|
|
60
|
-
mz_stream_close_cb close;
|
|
61
|
-
mz_stream_error_cb error;
|
|
62
|
-
mz_stream_create_cb create;
|
|
63
|
-
mz_stream_destroy_cb destroy;
|
|
64
|
-
|
|
65
|
-
mz_stream_get_prop_int64_cb get_prop_int64;
|
|
66
|
-
mz_stream_set_prop_int64_cb set_prop_int64;
|
|
67
|
-
} mz_stream_vtbl;
|
|
68
|
-
|
|
69
|
-
typedef struct mz_stream_s {
|
|
70
|
-
mz_stream_vtbl *vtbl;
|
|
71
|
-
struct mz_stream_s *base;
|
|
72
|
-
} mz_stream;
|
|
73
|
-
|
|
74
|
-
/***************************************************************************/
|
|
75
|
-
|
|
76
|
-
int32_t mz_stream_open(void *stream, const char *path, int32_t mode);
|
|
77
|
-
int32_t mz_stream_is_open(void *stream);
|
|
78
|
-
int32_t mz_stream_read(void *stream, void *buf, int32_t size);
|
|
79
|
-
int32_t mz_stream_read_uint8(void *stream, uint8_t *value);
|
|
80
|
-
int32_t mz_stream_read_uint16(void *stream, uint16_t *value);
|
|
81
|
-
int32_t mz_stream_read_uint32(void *stream, uint32_t *value);
|
|
82
|
-
int32_t mz_stream_read_int64(void *stream, int64_t *value);
|
|
83
|
-
int32_t mz_stream_read_uint64(void *stream, uint64_t *value);
|
|
84
|
-
int32_t mz_stream_write(void *stream, const void *buf, int32_t size);
|
|
85
|
-
int32_t mz_stream_write_uint8(void *stream, uint8_t value);
|
|
86
|
-
int32_t mz_stream_write_uint16(void *stream, uint16_t value);
|
|
87
|
-
int32_t mz_stream_write_uint32(void *stream, uint32_t value);
|
|
88
|
-
int32_t mz_stream_write_int64(void *stream, int64_t value);
|
|
89
|
-
int32_t mz_stream_write_uint64(void *stream, uint64_t value);
|
|
90
|
-
int32_t mz_stream_copy(void *target, void *source, int32_t len);
|
|
91
|
-
int32_t mz_stream_copy_to_end(void *target, void *source);
|
|
92
|
-
int32_t mz_stream_copy_stream(void *target, mz_stream_write_cb write_cb, void *source, mz_stream_read_cb read_cb, int32_t len);
|
|
93
|
-
int32_t mz_stream_copy_stream_to_end(void *target, mz_stream_write_cb write_cb, void *source, mz_stream_read_cb read_cb);
|
|
94
|
-
int64_t mz_stream_tell(void *stream);
|
|
95
|
-
int32_t mz_stream_seek(void *stream, int64_t offset, int32_t origin);
|
|
96
|
-
int32_t mz_stream_find(void *stream, const void *find, int32_t find_size, int64_t max_seek, int64_t *position);
|
|
97
|
-
int32_t mz_stream_find_reverse(void *stream, const void *find, int32_t find_size, int64_t max_seek, int64_t *position);
|
|
98
|
-
int32_t mz_stream_close(void *stream);
|
|
99
|
-
int32_t mz_stream_error(void *stream);
|
|
100
|
-
|
|
101
|
-
int32_t mz_stream_set_base(void *stream, void *base);
|
|
102
|
-
void* mz_stream_get_interface(void *stream);
|
|
103
|
-
int32_t mz_stream_get_prop_int64(void *stream, int32_t prop, int64_t *value);
|
|
104
|
-
int32_t mz_stream_set_prop_int64(void *stream, int32_t prop, int64_t value);
|
|
105
|
-
|
|
106
|
-
void* mz_stream_create(void **stream, mz_stream_vtbl *vtbl);
|
|
107
|
-
void mz_stream_delete(void **stream);
|
|
108
|
-
|
|
109
|
-
/***************************************************************************/
|
|
110
|
-
|
|
111
|
-
int32_t mz_stream_raw_open(void *stream, const char *filename, int32_t mode);
|
|
112
|
-
int32_t mz_stream_raw_is_open(void *stream);
|
|
113
|
-
int32_t mz_stream_raw_read(void *stream, void *buf, int32_t size);
|
|
114
|
-
int32_t mz_stream_raw_write(void *stream, const void *buf, int32_t size);
|
|
115
|
-
int64_t mz_stream_raw_tell(void *stream);
|
|
116
|
-
int32_t mz_stream_raw_seek(void *stream, int64_t offset, int32_t origin);
|
|
117
|
-
int32_t mz_stream_raw_close(void *stream);
|
|
118
|
-
int32_t mz_stream_raw_error(void *stream);
|
|
119
|
-
|
|
120
|
-
int32_t mz_stream_raw_get_prop_int64(void *stream, int32_t prop, int64_t *value);
|
|
121
|
-
int32_t mz_stream_raw_set_prop_int64(void *stream, int32_t prop, int64_t value);
|
|
122
|
-
|
|
123
|
-
void* mz_stream_raw_create(void **stream);
|
|
124
|
-
void mz_stream_raw_delete(void **stream);
|
|
125
|
-
|
|
126
|
-
/***************************************************************************/
|
|
127
|
-
|
|
128
|
-
#ifdef __cplusplus
|
|
129
|
-
}
|
|
130
|
-
#endif
|
|
131
|
-
|
|
132
|
-
#endif
|