@react-native-ohos/react-native-system-setting 1.7.7-rc.1 → 1.7.7-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/API.md +57 -57
  2. package/CHANGELOG.md +206 -0
  3. package/COMMITTERS.md +7 -0
  4. package/LICENSE +21 -21
  5. package/LICENSE.md +21 -21
  6. package/OAT.xml +81 -0
  7. package/RCTSystemSetting.podspec +20 -20
  8. package/README.OpenSource +10 -10
  9. package/README.md +15 -15
  10. package/SystemSetting.d.ts +81 -81
  11. package/SystemSetting.js +347 -347
  12. package/Utils.js +11 -11
  13. package/harmony/react_native_system_setting/Index.ets +28 -27
  14. package/harmony/react_native_system_setting/build-profile.json5 +31 -31
  15. package/harmony/react_native_system_setting/hvigorfile.ts +6 -6
  16. package/harmony/react_native_system_setting/obfuscation-rules.txt +17 -17
  17. package/harmony/react_native_system_setting/oh-package.json5 +10 -10
  18. package/harmony/react_native_system_setting/src/main/cpp/CMakeLists.txt +5 -3
  19. package/harmony/react_native_system_setting/src/main/cpp/SystemSettingPackage.h +36 -0
  20. package/harmony/react_native_system_setting/src/main/cpp/{RNSystemSettingPackage.h → generated/RNOH/generated/BaseReactNativeSystemSettingPackage.h} +65 -76
  21. package/harmony/react_native_system_setting/src/main/cpp/{ReactNativeSystemSetting.cpp → generated/RNOH/generated/turbo_modules/ReactNativeSystemSetting.cpp} +47 -54
  22. package/harmony/react_native_system_setting/src/main/cpp/{ReactNativeSystemSetting.h → generated/RNOH/generated/turbo_modules/ReactNativeSystemSetting.h} +16 -21
  23. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/ComponentDescriptors.h +22 -0
  24. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/EventEmitters.cpp +18 -0
  25. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/EventEmitters.h +19 -0
  26. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/Props.cpp +21 -0
  27. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/Props.h +20 -0
  28. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/ShadowNodes.cpp +19 -0
  29. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/ShadowNodes.h +25 -0
  30. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/States.cpp +18 -0
  31. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/States.h +23 -0
  32. package/harmony/react_native_system_setting/src/main/ets/Logger.ts +63 -63
  33. package/harmony/react_native_system_setting/src/main/ets/{RNSystemSettingPackage.ts → RNSystemSettingPackage.ets} +52 -51
  34. package/harmony/react_native_system_setting/src/main/ets/RNSystemSettingTurboModule.ts +346 -361
  35. package/harmony/react_native_system_setting/src/main/ets/generated/components/ts.ts +5 -5
  36. package/harmony/react_native_system_setting/src/main/ets/generated/index.ets +5 -8
  37. package/harmony/react_native_system_setting/src/main/ets/generated/ts.ts +6 -9
  38. package/harmony/react_native_system_setting/src/main/ets/generated/turboModules/ReactNativeSystemSetting.ts +78 -86
  39. package/harmony/react_native_system_setting/src/main/ets/generated/turboModules/ts.ts +5 -8
  40. package/harmony/react_native_system_setting/src/main/module.json5 +9 -9
  41. package/harmony/react_native_system_setting/src/main/resources/base/element/string.json +8 -8
  42. package/harmony/react_native_system_setting/src/main/resources/en_US/element/string.json +8 -8
  43. package/harmony/react_native_system_setting/src/main/resources/zh_CN/element/string.json +8 -8
  44. package/harmony/react_native_system_setting/src/mock/mock-config.json5 +2 -0
  45. package/harmony/react_native_system_setting/src/ohosTest/ets/test/Ability.test.ets +35 -0
  46. package/harmony/react_native_system_setting/src/ohosTest/ets/test/List.test.ets +5 -0
  47. package/harmony/react_native_system_setting/src/ohosTest/ets/testability/TestAbility.ets +47 -0
  48. package/harmony/react_native_system_setting/src/ohosTest/ets/testability/pages/Index.ets +17 -0
  49. package/harmony/react_native_system_setting/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets +90 -0
  50. package/harmony/react_native_system_setting/src/ohosTest/module.json5 +36 -0
  51. package/harmony/react_native_system_setting/src/ohosTest/resources/base/element/color.json +8 -0
  52. package/harmony/react_native_system_setting/src/ohosTest/resources/base/element/string.json +16 -0
  53. package/harmony/react_native_system_setting/src/ohosTest/resources/base/media/icon.png +0 -0
  54. package/harmony/react_native_system_setting/src/ohosTest/resources/base/profile/test_pages.json +5 -0
  55. package/harmony/react_native_system_setting/src/test/List.test.ets +5 -0
  56. package/harmony/react_native_system_setting/src/test/LocalUnit.test.ets +33 -0
  57. package/harmony/react_native_system_setting/{ts.ts → ts.ets} +24 -24
  58. package/harmony/react_native_system_setting.har +0 -0
  59. package/iOS.md +101 -0
  60. package/package.json +48 -46
  61. package/src/ReactRNSystemSetting.ts +108 -112
  62. package/harmony/react_native_system_setting/BuildProfile.ets +0 -6
package/Utils.js CHANGED
@@ -1,11 +1,11 @@
1
- /* @flow */
2
-
3
- import {
4
- Platform
5
- } from 'react-native';
6
-
7
- export default class Utils {
8
- static isAndroid = Platform.OS === 'android'
9
-
10
- static isIOS = Platform.OS === 'ios'
11
- }
1
+ /* @flow */
2
+
3
+ import {
4
+ Platform
5
+ } from 'react-native';
6
+
7
+ export default class Utils {
8
+ static isAndroid = Platform.OS === 'android'
9
+
10
+ static isIOS = Platform.OS === 'ios'
11
+ }
@@ -1,27 +1,28 @@
1
- /*
2
- * MIT License
3
- *
4
- * Copyright (C) 2024 Huawei Device Co., Ltd.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- export * from './ts';
26
- export * from "./src/main/ets/RNSystemSettingPackage";
27
- export * from "./src/main/ets/RNSystemSettingTurboModule";
1
+ /*
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2024 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+ import { RNSystemSettingPackage as SystemSettingPackage } from './src/main/ets/RNSystemSettingPackage'
25
+ export * from './ts';
26
+ export * from "./src/main/ets/RNSystemSettingPackage";
27
+ export * from "./src/main/ets/RNSystemSettingTurboModule";
28
+ export default SystemSettingPackage
@@ -1,31 +1,31 @@
1
- {
2
- "apiType": "stageMode",
3
- "buildOption": {
4
- },
5
- "buildOptionSet": [
6
- {
7
- "name": "release",
8
- "arkOptions": {
9
- "obfuscation": {
10
- "ruleOptions": {
11
- "enable": true,
12
- "files": [
13
- "./obfuscation-rules.txt"
14
- ]
15
- },
16
- "consumerFiles": [
17
- "./consumer-rules.txt"
18
- ]
19
- }
20
- },
21
- },
22
- ],
23
- "targets": [
24
- {
25
- "name": "default"
26
- },
27
- {
28
- "name": "ohosTest"
29
- }
30
- ]
31
- }
1
+ {
2
+ "apiType": "stageMode",
3
+ "buildOption": {
4
+ },
5
+ "buildOptionSet": [
6
+ {
7
+ "name": "release",
8
+ "arkOptions": {
9
+ "obfuscation": {
10
+ "ruleOptions": {
11
+ "enable": true,
12
+ "files": [
13
+ "./obfuscation-rules.txt"
14
+ ]
15
+ },
16
+ "consumerFiles": [
17
+ "./consumer-rules.txt"
18
+ ]
19
+ }
20
+ },
21
+ },
22
+ ],
23
+ "targets": [
24
+ {
25
+ "name": "default"
26
+ },
27
+ {
28
+ "name": "ohosTest"
29
+ }
30
+ ]
31
+ }
@@ -1,6 +1,6 @@
1
- import { harTasks } from '@ohos/hvigor-ohos-plugin';
2
-
3
- export default {
4
- system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
5
- plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
6
- }
1
+ import { harTasks } from '@ohos/hvigor-ohos-plugin';
2
+
3
+ export default {
4
+ system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
5
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
6
+ }
@@ -1,18 +1,18 @@
1
- # Define project specific obfuscation rules here.
2
- # You can include the obfuscation configuration files in the current module's build-profile.json5.
3
- #
4
- # For more details, see
5
- # https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
6
-
7
- # Obfuscation options:
8
- # -disable-obfuscation: disable all obfuscations
9
- # -enable-property-obfuscation: obfuscate the property names
10
- # -enable-toplevel-obfuscation: obfuscate the names in the global scope
11
- # -compact: remove unnecessary blank spaces and all line feeds
12
- # -remove-log: remove all console.* statements
13
- # -print-namecache: print the name cache that contains the mapping from the old names to new names
14
- # -apply-namecache: reuse the given cache file
15
-
16
- # Keep options:
17
- # -keep-property-name: specifies property names that you want to keep
1
+ # Define project specific obfuscation rules here.
2
+ # You can include the obfuscation configuration files in the current module's build-profile.json5.
3
+ #
4
+ # For more details, see
5
+ # https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
6
+
7
+ # Obfuscation options:
8
+ # -disable-obfuscation: disable all obfuscations
9
+ # -enable-property-obfuscation: obfuscate the property names
10
+ # -enable-toplevel-obfuscation: obfuscate the names in the global scope
11
+ # -compact: remove unnecessary blank spaces and all line feeds
12
+ # -remove-log: remove all console.* statements
13
+ # -print-namecache: print the name cache that contains the mapping from the old names to new names
14
+ # -apply-namecache: reuse the given cache file
15
+
16
+ # Keep options:
17
+ # -keep-property-name: specifies property names that you want to keep
18
18
  # -keep-global-name: specifies names that you want to keep in the global scope
@@ -1,11 +1,11 @@
1
- {
2
- "name": "@react-native-ohos/react-native-system-setting",
3
- "version": "1.7.7-rc.1",
4
- "description": "Please describe the basic information.",
5
- "main": "Index.ets",
6
- "author": "",
7
- "license": "MIT",
8
- "dependencies": {
9
- "@rnoh/react-native-openharmony": 'file:../react_native_openharmony'
10
- }
1
+ {
2
+ "name": "@react-native-ohos/react-native-system-setting",
3
+ "version": "1.7.7-rc.3",
4
+ "description": "Please describe the basic information.",
5
+ "main": "Index.ets",
6
+ "author": "",
7
+ "license": "MIT",
8
+ "dependencies": {
9
+ "@rnoh/react-native-openharmony": 'file:../react_native_openharmony'
10
+ }
11
11
  }
@@ -1,7 +1,9 @@
1
1
  cmake_minimum_required(VERSION 3.13)
2
2
  set(CMAKE_VERBOSE_MAKEFILE on)
3
3
 
4
- file(GLOB RNOH_SYSTEM_SETTING_SRC CONFIGURE_DEPENDS *.cpp)
5
- add_library(rnoh_system_setting SHARED ${RNOH_SYSTEM_SETTING_SRC})
6
- target_include_directories(rnoh_system_setting PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
4
+ set(rnoh_system_setting_generated_dir "${CMAKE_CURRENT_SOURCE_DIR}/generated")
5
+ file(GLOB_RECURSE rnoh_system_setting_generated_SRC "${rnoh_system_setting_generated_dir}/**/*.cpp")
6
+ file(GLOB rnoh_system_setting_SRC CONFIGURE_DEPENDS *.cpp)
7
+ add_library(rnoh_system_setting SHARED ${rnoh_system_setting_SRC} ${rnoh_system_setting_generated_SRC})
8
+ target_include_directories(rnoh_system_setting PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${rnoh_system_setting_generated_dir})
7
9
  target_link_libraries(rnoh_system_setting PUBLIC rnoh)
@@ -0,0 +1,36 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2024 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+ #ifndef SYSTEMSETTINGPACKAGE_H
25
+ #define SYSTEMSETTINGPACKAGE_H
26
+
27
+ #include "generated/RNOH/generated/BaseReactNativeSystemSettingPackage.h"
28
+ #pragma once
29
+
30
+ namespace rnoh {
31
+ class SystemSettingPackage : public BaseReactNativeSystemSettingPackage {
32
+ using Super = BaseReactNativeSystemSettingPackage;
33
+ using Super::Super;
34
+ };
35
+ } // namespace rnoh
36
+ #endif // SYSTEMSETTINGPACKAGE_H
@@ -1,76 +1,65 @@
1
- /**
2
- * This code was generated by "react-native codegen-harmony"
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be
5
- * lost once the code is regenerated.
6
- *
7
- * @generatorVersion: 1
8
- */
9
-
10
- #pragma once
11
-
12
- #include "RNOH/Package.h"
13
- #include "RNOH/ArkTSTurboModule.h"
14
- #include "./ReactNativeSystemSetting.h"
15
-
16
- namespace rnoh {
17
-
18
- class RNSystemSettingFactoryDelegate : public TurboModuleFactoryDelegate {
19
- public:
20
- SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
21
- if (name == "ReactNativeSystemSetting") {
22
- return std::make_shared<ReactNativeSystemSetting>(ctx, name);
23
- }
24
- return nullptr;
25
- };
26
- };
27
-
28
- class RNSystemSettingEventEmitRequestHandler : public EventEmitRequestHandler {
29
- public:
30
- void handleEvent(Context const &ctx) override {
31
- auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);
32
- auto componentName = ctx.shadowViewRegistry->getComponentName(ctx.tag);
33
-
34
- if (eventEmitter == nullptr) {
35
- return;
36
- }
37
-
38
- std::vector<std::string> supportedComponentNames = {
39
- };
40
-
41
- std::vector<std::string> supportedEventNames = {
42
- };
43
-
44
- if (std::find(supportedComponentNames.begin(), supportedComponentNames.end(), componentName) != supportedComponentNames.end() &&
45
- std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) {
46
- eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));
47
- }
48
- }
49
- };
50
-
51
- class RNSystemSettingPackage : public Package {
52
- public:
53
-
54
- RNSystemSettingPackage(Package::Context ctx) : Package(ctx){};
55
- std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
56
- return std::make_unique<RNSystemSettingFactoryDelegate>();
57
- }
58
-
59
- std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {
60
- return {
61
- };
62
- }
63
-
64
- ComponentJSIBinderByString createComponentJSIBinderByName() override {
65
- return {
66
- };
67
- };
68
-
69
- EventEmitRequestHandlers createEventEmitRequestHandlers() override {
70
- return {
71
- std::make_shared<RNSystemSettingEventEmitRequestHandler>(),
72
- };
73
- }
74
- };
75
-
76
- } // namespace rnoh
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ #pragma once
6
+
7
+ #include "RNOH/Package.h"
8
+ #include "RNOH/ArkTSTurboModule.h"
9
+ #include "RNOH/generated/turbo_modules/ReactNativeSystemSetting.h"
10
+
11
+ namespace rnoh {
12
+
13
+ class BaseReactNativeSystemSettingPackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {
14
+ public:
15
+ SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
16
+ if (name == "ReactNativeSystemSetting") {
17
+ return std::make_shared<ReactNativeSystemSetting>(ctx, name);
18
+ }
19
+ return nullptr;
20
+ };
21
+ };
22
+
23
+ class BaseReactNativeSystemSettingPackageEventEmitRequestHandler : public EventEmitRequestHandler {
24
+ public:
25
+ void handleEvent(Context const &ctx) override {
26
+ auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);
27
+ if (eventEmitter == nullptr) {
28
+ return;
29
+ }
30
+
31
+ std::vector<std::string> supportedEventNames = {
32
+ };
33
+ if (std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) {
34
+ eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));
35
+ }
36
+ }
37
+ };
38
+
39
+
40
+ class BaseReactNativeSystemSettingPackage : public Package {
41
+ public:
42
+ BaseReactNativeSystemSettingPackage(Package::Context ctx) : Package(ctx){};
43
+
44
+ std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
45
+ return std::make_unique<BaseReactNativeSystemSettingPackageTurboModuleFactoryDelegate>();
46
+ }
47
+
48
+ std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {
49
+ return {
50
+ };
51
+ }
52
+
53
+ ComponentJSIBinderByString createComponentJSIBinderByName() override {
54
+ return {
55
+ };
56
+ };
57
+
58
+ EventEmitRequestHandlers createEventEmitRequestHandlers() override {
59
+ return {
60
+ std::make_shared<BaseReactNativeSystemSettingPackageEventEmitRequestHandler>(),
61
+ };
62
+ }
63
+ };
64
+
65
+ } // namespace rnoh
@@ -1,54 +1,47 @@
1
- /**
2
- * This code was generated by "react-native codegen-harmony"
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be
5
- * lost once the code is regenerated.
6
- *
7
- * @generatorVersion: 1
8
- */
9
-
10
- #include "ReactNativeSystemSetting.h"
11
-
12
- namespace rnoh {
13
- using namespace facebook;
14
-
15
- ReactNativeSystemSetting::ReactNativeSystemSetting(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
16
- methodMap_ = {
17
- ARK_ASYNC_METHOD_METADATA(getBrightness, 0),
18
- ARK_ASYNC_METHOD_METADATA(setBrightness, 1),
19
- ARK_ASYNC_METHOD_METADATA(setBrightnessForce, 1),
20
- ARK_ASYNC_METHOD_METADATA(getAppBrightness, 0),
21
- ARK_ASYNC_METHOD_METADATA(setAppBrightness, 1),
22
- ARK_METHOD_METADATA(grantWriteSettingPremission, 0),
23
- ARK_ASYNC_METHOD_METADATA(getScreenMode, 0),
24
- ARK_ASYNC_METHOD_METADATA(setScreenMode, 1),
25
- ARK_ASYNC_METHOD_METADATA(saveBrightness, 0),
26
- ARK_METHOD_METADATA(restoreBrightness, 0),
27
- ARK_ASYNC_METHOD_METADATA(getVolume, 1),
28
- ARK_METHOD_METADATA(setVolume, 2),
29
- ARK_METHOD_METADATA(addVolumeListener, 0),
30
- ARK_METHOD_METADATA(removeVolumeListener, 1),
31
- ARK_ASYNC_METHOD_METADATA(isWifiEnabled, 0),
32
- ARK_METHOD_METADATA(switchWifiSilence, 1),
33
- ARK_METHOD_METADATA(switchWifi, 1),
34
- ARK_ASYNC_METHOD_METADATA(isLocationEnabled, 0),
35
- ARK_ASYNC_METHOD_METADATA(getLocationMode, 0),
36
- ARK_METHOD_METADATA(switchLocation, 1),
37
- ARK_ASYNC_METHOD_METADATA(isBluetoothEnabled, 0),
38
- ARK_METHOD_METADATA(switchBluetooth, 1),
39
- ARK_METHOD_METADATA(switchBluetoothSilence, 1),
40
- ARK_ASYNC_METHOD_METADATA(isAirplaneEnabled, 0),
41
- ARK_METHOD_METADATA(switchAirplane, 1),
42
- ARK_METHOD_METADATA(openAppSystemSettings, 0),
43
- ARK_METHOD_METADATA(addBluetoothListener, 0),
44
- ARK_ASYNC_METHOD_METADATA(addWifiListener, 1),
45
- ARK_ASYNC_METHOD_METADATA(addLocationListener, 1),
46
- ARK_ASYNC_METHOD_METADATA(addLocationModeListener, 1),
47
- ARK_ASYNC_METHOD_METADATA(addAirplaneListener, 1),
48
- ARK_METHOD_METADATA(removeListener, 1),
49
- ARK_METHOD_METADATA(addListener, 1),
50
- ARK_METHOD_METADATA(removeListeners, 1),
51
- };
52
- }
53
-
54
- } // namespace rnoh
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ #include "ReactNativeSystemSetting.h"
6
+
7
+ namespace rnoh {
8
+ using namespace facebook;
9
+
10
+ ReactNativeSystemSetting::ReactNativeSystemSetting(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
11
+ methodMap_ = {
12
+ ARK_ASYNC_METHOD_METADATA(getBrightness, 0),
13
+ ARK_ASYNC_METHOD_METADATA(setBrightness, 1),
14
+ ARK_ASYNC_METHOD_METADATA(setBrightnessForce, 1),
15
+ ARK_ASYNC_METHOD_METADATA(getAppBrightness, 0),
16
+ ARK_ASYNC_METHOD_METADATA(setAppBrightness, 1),
17
+ ARK_METHOD_METADATA(grantWriteSettingPremission, 0),
18
+ ARK_ASYNC_METHOD_METADATA(getScreenMode, 0),
19
+ ARK_ASYNC_METHOD_METADATA(setScreenMode, 1),
20
+ ARK_ASYNC_METHOD_METADATA(saveBrightness, 0),
21
+ ARK_METHOD_METADATA(restoreBrightness, 0),
22
+ ARK_ASYNC_METHOD_METADATA(getVolume, 1),
23
+ ARK_METHOD_METADATA(setVolume, 2),
24
+ ARK_METHOD_METADATA(addVolumeListener, 0),
25
+ ARK_METHOD_METADATA(removeVolumeListener, 1),
26
+ ARK_ASYNC_METHOD_METADATA(isWifiEnabled, 0),
27
+ ARK_METHOD_METADATA(switchWifiSilence, 1),
28
+ ARK_METHOD_METADATA(switchWifi, 1),
29
+ ARK_ASYNC_METHOD_METADATA(isLocationEnabled, 0),
30
+ ARK_ASYNC_METHOD_METADATA(getLocationMode, 0),
31
+ ARK_METHOD_METADATA(switchLocation, 1),
32
+ ARK_ASYNC_METHOD_METADATA(isBluetoothEnabled, 0),
33
+ ARK_METHOD_METADATA(switchBluetooth, 1),
34
+ ARK_METHOD_METADATA(switchBluetoothSilence, 1),
35
+ ARK_ASYNC_METHOD_METADATA(isAirplaneEnabled, 0),
36
+ ARK_METHOD_METADATA(switchAirplane, 1),
37
+ ARK_METHOD_METADATA(openAppSystemSettings, 0),
38
+ ARK_METHOD_METADATA(addBluetoothListener, 0),
39
+ ARK_ASYNC_METHOD_METADATA(addWifiListener, 1),
40
+ ARK_ASYNC_METHOD_METADATA(addLocationListener, 1),
41
+ ARK_ASYNC_METHOD_METADATA(addLocationModeListener, 1),
42
+ ARK_ASYNC_METHOD_METADATA(addAirplaneListener, 1),
43
+ ARK_METHOD_METADATA(removeListener, 1),
44
+ };
45
+ }
46
+
47
+ } // namespace rnoh
@@ -1,21 +1,16 @@
1
- /**
2
- * This code was generated by "react-native codegen-harmony"
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be
5
- * lost once the code is regenerated.
6
- *
7
- * @generatorVersion: 1
8
- */
9
-
10
- #pragma once
11
-
12
- #include "RNOH/ArkTSTurboModule.h"
13
-
14
- namespace rnoh {
15
-
16
- class JSI_EXPORT ReactNativeSystemSetting : public ArkTSTurboModule {
17
- public:
18
- ReactNativeSystemSetting(const ArkTSTurboModule::Context ctx, const std::string name);
19
- };
20
-
21
- } // namespace rnoh
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ #pragma once
6
+
7
+ #include "RNOH/ArkTSTurboModule.h"
8
+
9
+ namespace rnoh {
10
+
11
+ class JSI_EXPORT ReactNativeSystemSetting : public ArkTSTurboModule {
12
+ public:
13
+ ReactNativeSystemSetting(const ArkTSTurboModule::Context ctx, const std::string name);
14
+ };
15
+
16
+ } // namespace rnoh
@@ -0,0 +1,22 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateComponentDescriptorH.js
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include <react/renderer/components/react_native_system_setting/ShadowNodes.h>
14
+ #include <react/renderer/core/ConcreteComponentDescriptor.h>
15
+
16
+ namespace facebook {
17
+ namespace react {
18
+
19
+
20
+
21
+ } // namespace react
22
+ } // namespace facebook
@@ -0,0 +1,18 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateEventEmitterCpp.js
9
+ */
10
+
11
+ #include <react/renderer/components/react_native_system_setting/EventEmitters.h>
12
+
13
+
14
+ namespace facebook {
15
+ namespace react {
16
+
17
+ } // namespace react
18
+ } // namespace facebook
@@ -0,0 +1,19 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateEventEmitterH.js
9
+ */
10
+ #pragma once
11
+
12
+ #include <react/renderer/components/view/ViewEventEmitter.h>
13
+
14
+
15
+ namespace facebook {
16
+ namespace react {
17
+
18
+ } // namespace react
19
+ } // namespace facebook
@@ -0,0 +1,21 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GeneratePropsCpp.js
9
+ */
10
+
11
+ #include <react/renderer/components/react_native_system_setting/Props.h>
12
+ #include <react/renderer/core/PropsParserContext.h>
13
+ #include <react/renderer/core/propsConversions.h>
14
+
15
+ namespace facebook {
16
+ namespace react {
17
+
18
+
19
+
20
+ } // namespace react
21
+ } // namespace facebook