@react-native-ohos/cookies 6.2.2-rc.3 → 6.2.2
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/LICENSE +21 -21
- package/README.md +14 -14
- package/harmony/rn_cookies/BuildProfile.ets +16 -16
- package/harmony/rn_cookies/Index.ets +3 -3
- package/harmony/rn_cookies/build-profile.json5 +28 -28
- package/harmony/rn_cookies/hvigorfile.ts +6 -6
- package/harmony/rn_cookies/obfuscation-rules.txt +17 -17
- package/harmony/rn_cookies/oh-package-lock.json5 +17 -17
- package/harmony/rn_cookies/oh-package.json5 +11 -11
- package/harmony/rn_cookies/src/main/cpp/CMakeLists.txt +7 -7
- package/harmony/rn_cookies/src/main/cpp/CookiesPackage.h +34 -34
- package/harmony/rn_cookies/src/main/cpp/CookiesTurboModule.cpp +63 -63
- package/harmony/rn_cookies/src/main/cpp/CookiesTurboModule.h +29 -29
- package/harmony/rn_cookies/src/main/ets/CookiesModule.ts +177 -177
- package/harmony/rn_cookies/src/main/ets/CookiesPackage.ets +26 -26
- package/harmony/rn_cookies/src/main/ets/Logger.ets +63 -63
- package/harmony/rn_cookies/src/main/module.json5 +11 -11
- package/harmony/rn_cookies/src/main/resources/base/element/string.json +8 -8
- package/harmony/rn_cookies/src/main/resources/en_US/element/string.json +8 -8
- package/harmony/rn_cookies/src/main/resources/zh_CN/element/string.json +8 -8
- package/harmony/rn_cookies/src/test/List.test.ets +4 -4
- package/harmony/rn_cookies/src/test/LocalUnit.test.ets +32 -32
- package/harmony/rn_cookies/ts.ets +1 -1
- package/harmony/rn_cookies.har +0 -0
- package/index.d.ts +42 -42
- package/index.js +62 -62
- package/package.json +72 -72
- package/react-native-cookies.podspec +18 -18
- package/src/NativeRTNCookies.tsx +44 -44
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 React Native Community
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 React Native Community
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# @react-native-ohos/react-native-cookies
|
|
2
|
-
|
|
3
|
-
This project is based on [cookies](https://github.com/react-native-cookies/cookies/tree/v6.2.1)@6.2.1
|
|
4
|
-
|
|
5
|
-
## Documentation
|
|
6
|
-
|
|
7
|
-
- [中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-cookies-cookies.md)
|
|
8
|
-
|
|
9
|
-
- [English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-cookies-cookies.md)
|
|
10
|
-
|
|
11
|
-
## License
|
|
12
|
-
|
|
13
|
-
This library is licensed under [The MIT License (MIT)](https://github.com/react-native-oh-library/react-native-cookies/blob/sig/LICENSE)
|
|
14
|
-
|
|
1
|
+
# @react-native-ohos/react-native-cookies
|
|
2
|
+
|
|
3
|
+
This project is based on [cookies](https://github.com/react-native-cookies/cookies/tree/v6.2.1)@6.2.1
|
|
4
|
+
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
- [中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-cookies-cookies.md)
|
|
8
|
+
|
|
9
|
+
- [English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-cookies-cookies.md)
|
|
10
|
+
|
|
11
|
+
## License
|
|
12
|
+
|
|
13
|
+
This library is licensed under [The MIT License (MIT)](https://github.com/react-native-oh-library/react-native-cookies/blob/sig/LICENSE)
|
|
14
|
+
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Use these variables when you tailor your ArkTS code. They must be of the const type.
|
|
3
|
-
*/
|
|
4
|
-
export const HAR_VERSION = '6.2.1-0.0.8';
|
|
5
|
-
export const BUILD_MODE_NAME = 'debug';
|
|
6
|
-
export const DEBUG = true;
|
|
7
|
-
export const TARGET_NAME = 'default';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* BuildProfile Class is used only for compatibility purposes.
|
|
11
|
-
*/
|
|
12
|
-
export default class BuildProfile {
|
|
13
|
-
static readonly HAR_VERSION = HAR_VERSION;
|
|
14
|
-
static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
|
|
15
|
-
static readonly DEBUG = DEBUG;
|
|
16
|
-
static readonly TARGET_NAME = TARGET_NAME;
|
|
1
|
+
/**
|
|
2
|
+
* Use these variables when you tailor your ArkTS code. They must be of the const type.
|
|
3
|
+
*/
|
|
4
|
+
export const HAR_VERSION = '6.2.1-0.0.8';
|
|
5
|
+
export const BUILD_MODE_NAME = 'debug';
|
|
6
|
+
export const DEBUG = true;
|
|
7
|
+
export const TARGET_NAME = 'default';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* BuildProfile Class is used only for compatibility purposes.
|
|
11
|
+
*/
|
|
12
|
+
export default class BuildProfile {
|
|
13
|
+
static readonly HAR_VERSION = HAR_VERSION;
|
|
14
|
+
static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
|
|
15
|
+
static readonly DEBUG = DEBUG;
|
|
16
|
+
static readonly TARGET_NAME = TARGET_NAME;
|
|
17
17
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CookiesPackage } from './src/main/ets/CookiesPackage';
|
|
2
|
-
export * from './ts'
|
|
3
|
-
export default CookiesPackage;
|
|
1
|
+
import { CookiesPackage } from './src/main/ets/CookiesPackage';
|
|
2
|
+
export * from './ts'
|
|
3
|
+
export default CookiesPackage;
|
|
@@ -1,28 +1,28 @@
|
|
|
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
|
-
}
|
|
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
|
+
}
|
|
@@ -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,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta": {
|
|
3
|
-
"stableOrder": false
|
|
4
|
-
},
|
|
5
|
-
"lockfileVersion": 3,
|
|
6
|
-
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
|
|
7
|
-
"specifiers": {
|
|
8
|
-
"@rnoh/react-native-openharmony@../libs/react_native_openharmony-5.0.0.491.har": "@rnoh/react-native-openharmony@../libs/react_native_openharmony-5.0.0.491.har"
|
|
9
|
-
},
|
|
10
|
-
"packages": {
|
|
11
|
-
"@rnoh/react-native-openharmony@../libs/react_native_openharmony-5.0.0.491.har": {
|
|
12
|
-
"name": "@rnoh/react-native-openharmony",
|
|
13
|
-
"version": "0.72.28",
|
|
14
|
-
"resolved": "../libs/react_native_openharmony-5.0.0.491.har",
|
|
15
|
-
"registryType": "local"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"stableOrder": false
|
|
4
|
+
},
|
|
5
|
+
"lockfileVersion": 3,
|
|
6
|
+
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
|
|
7
|
+
"specifiers": {
|
|
8
|
+
"@rnoh/react-native-openharmony@../libs/react_native_openharmony-5.0.0.491.har": "@rnoh/react-native-openharmony@../libs/react_native_openharmony-5.0.0.491.har"
|
|
9
|
+
},
|
|
10
|
+
"packages": {
|
|
11
|
+
"@rnoh/react-native-openharmony@../libs/react_native_openharmony-5.0.0.491.har": {
|
|
12
|
+
"name": "@rnoh/react-native-openharmony",
|
|
13
|
+
"version": "0.72.28",
|
|
14
|
+
"resolved": "../libs/react_native_openharmony-5.0.0.491.har",
|
|
15
|
+
"registryType": "local"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
18
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@react-native-ohos/cookies",
|
|
3
|
-
"version": "6.2.2
|
|
4
|
-
"description": "Please describe the basic information.",
|
|
5
|
-
"main": "Index.ets",
|
|
6
|
-
"author": "",
|
|
7
|
-
"license": "Apache-2.0",
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"@rnoh/react-native-openharmony": "file:../react_native_openharmony"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@react-native-ohos/cookies",
|
|
3
|
+
"version": "6.2.2",
|
|
4
|
+
"description": "Please describe the basic information.",
|
|
5
|
+
"main": "Index.ets",
|
|
6
|
+
"author": "",
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@rnoh/react-native-openharmony": "file:../react_native_openharmony"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# the minimum version of CMake
|
|
2
|
-
cmake_minimum_required(VERSION 3.13)
|
|
3
|
-
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
4
|
-
|
|
5
|
-
file(GLOB rnoh_cookies_SRC CONFIGURE_DEPENDS *.cpp)
|
|
6
|
-
add_library(rnoh_cookies SHARED ${rnoh_cookies_SRC})
|
|
7
|
-
target_include_directories(rnoh_cookies PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
|
1
|
+
# the minimum version of CMake
|
|
2
|
+
cmake_minimum_required(VERSION 3.13)
|
|
3
|
+
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
4
|
+
|
|
5
|
+
file(GLOB rnoh_cookies_SRC CONFIGURE_DEPENDS *.cpp)
|
|
6
|
+
add_library(rnoh_cookies SHARED ${rnoh_cookies_SRC})
|
|
7
|
+
target_include_directories(rnoh_cookies PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
|
8
8
|
target_link_libraries(rnoh_cookies PUBLIC rnoh)
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
2
|
-
// Use of this source code is governed by a Apache-2.0 license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
#ifndef COOKIESPACKAGE_H
|
|
6
|
-
#define COOKIESPACKAGE_H
|
|
7
|
-
|
|
8
|
-
#include "RNOH/Package.h"
|
|
9
|
-
#include "CookiesTurboModule.h"
|
|
10
|
-
|
|
11
|
-
using namespace rnoh;
|
|
12
|
-
using namespace facebook;
|
|
13
|
-
class NativeRTNCookiesFactoryDelegate : public TurboModuleFactoryDelegate {
|
|
14
|
-
public:
|
|
15
|
-
SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override
|
|
16
|
-
{
|
|
17
|
-
if (name == "RTNCookies") {
|
|
18
|
-
return std::make_shared<RTNCookiesTurboModule>(ctx, name);
|
|
19
|
-
}
|
|
20
|
-
return nullptr;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
namespace rnoh {
|
|
25
|
-
class CookiesPackage : public Package {
|
|
26
|
-
public:
|
|
27
|
-
CookiesPackage(Package::Context ctx) : Package(ctx) {}
|
|
28
|
-
std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override
|
|
29
|
-
{
|
|
30
|
-
return std::make_unique<NativeRTNCookiesFactoryDelegate>();
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
} // namespace rnoh
|
|
34
|
-
#endif
|
|
1
|
+
// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
2
|
+
// Use of this source code is governed by a Apache-2.0 license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
#ifndef COOKIESPACKAGE_H
|
|
6
|
+
#define COOKIESPACKAGE_H
|
|
7
|
+
|
|
8
|
+
#include "RNOH/Package.h"
|
|
9
|
+
#include "CookiesTurboModule.h"
|
|
10
|
+
|
|
11
|
+
using namespace rnoh;
|
|
12
|
+
using namespace facebook;
|
|
13
|
+
class NativeRTNCookiesFactoryDelegate : public TurboModuleFactoryDelegate {
|
|
14
|
+
public:
|
|
15
|
+
SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override
|
|
16
|
+
{
|
|
17
|
+
if (name == "RTNCookies") {
|
|
18
|
+
return std::make_shared<RTNCookiesTurboModule>(ctx, name);
|
|
19
|
+
}
|
|
20
|
+
return nullptr;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
namespace rnoh {
|
|
25
|
+
class CookiesPackage : public Package {
|
|
26
|
+
public:
|
|
27
|
+
CookiesPackage(Package::Context ctx) : Package(ctx) {}
|
|
28
|
+
std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override
|
|
29
|
+
{
|
|
30
|
+
return std::make_unique<NativeRTNCookiesFactoryDelegate>();
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
} // namespace rnoh
|
|
34
|
+
#endif
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
|
3
|
-
|
|
4
|
-
* Licensed under the The MIT License (MIT) (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
* https://github.com/react-native-cookies/cookies/blob/master/LICENSE
|
|
9
|
-
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#include "CookiesTurboModule.h"
|
|
18
|
-
#include "RNOH/ArkTSTurboModule.h"
|
|
19
|
-
|
|
20
|
-
using namespace rnoh;
|
|
21
|
-
using namespace facebook;
|
|
22
|
-
|
|
23
|
-
static jsi::Value hostFunction_RTNCookiesTurboModule_get(jsi::Runtime &rt, react::TurboModule &turboModule,
|
|
24
|
-
const jsi::Value *args, size_t count)
|
|
25
|
-
{
|
|
26
|
-
return static_cast<ArkTSTurboModule &>(turboModule).callAsync(rt, "get", args, count);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static jsi::Value hostFunction_RTNCookiesTurboModule_set(jsi::Runtime &rt, react::TurboModule &turboModule,
|
|
30
|
-
const jsi::Value *args, size_t count)
|
|
31
|
-
{
|
|
32
|
-
return static_cast<ArkTSTurboModule &>(turboModule).callAsync(rt, "set", args, count);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
static jsi::Value hostFunction_RTNCookiesTurboModule_clearByName(jsi::Runtime &rt, react::TurboModule &turboModule,
|
|
36
|
-
const jsi::Value *args, size_t count)
|
|
37
|
-
{
|
|
38
|
-
return static_cast<ArkTSTurboModule &>(turboModule).callAsync(rt, "clearByName", args, count);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static jsi::Value hostFunction_RTNCookiesTurboModule_clearAll(jsi::Runtime &rt, react::TurboModule &turboModule,
|
|
42
|
-
const jsi::Value *args, size_t count)
|
|
43
|
-
{
|
|
44
|
-
return static_cast<ArkTSTurboModule &>(turboModule).callAsync(rt, "clearAll", args, count);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
static jsi::Value hostFunction_RTNCookiesTurboModule_removeSessionCookies(jsi::Runtime &rt,
|
|
48
|
-
react::TurboModule &turboModule,
|
|
49
|
-
const jsi::Value *args, size_t count)
|
|
50
|
-
{
|
|
51
|
-
return static_cast<ArkTSTurboModule &>(turboModule).callAsync(rt, "removeSessionCookies", args, count);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
RTNCookiesTurboModule::RTNCookiesTurboModule(const ArkTSTurboModule::Context ctx, const std::string name)
|
|
56
|
-
: ArkTSTurboModule(ctx, name)
|
|
57
|
-
{
|
|
58
|
-
methodMap_["get"] = MethodMetadata{ 2, hostFunction_RTNCookiesTurboModule_get };
|
|
59
|
-
methodMap_["set"] = MethodMetadata{ 3, hostFunction_RTNCookiesTurboModule_set };
|
|
60
|
-
methodMap_["clearByName"] = MethodMetadata{ 3, hostFunction_RTNCookiesTurboModule_clearByName };
|
|
61
|
-
methodMap_["clearAll"] = MethodMetadata{ 1, hostFunction_RTNCookiesTurboModule_clearAll };
|
|
62
|
-
methodMap_["removeSessionCookies"] = MethodMetadata{ 0, hostFunction_RTNCookiesTurboModule_removeSessionCookies };
|
|
63
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
|
3
|
+
|
|
4
|
+
* Licensed under the The MIT License (MIT) (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
* https://github.com/react-native-cookies/cookies/blob/master/LICENSE
|
|
9
|
+
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
#include "CookiesTurboModule.h"
|
|
18
|
+
#include "RNOH/ArkTSTurboModule.h"
|
|
19
|
+
|
|
20
|
+
using namespace rnoh;
|
|
21
|
+
using namespace facebook;
|
|
22
|
+
|
|
23
|
+
static jsi::Value hostFunction_RTNCookiesTurboModule_get(jsi::Runtime &rt, react::TurboModule &turboModule,
|
|
24
|
+
const jsi::Value *args, size_t count)
|
|
25
|
+
{
|
|
26
|
+
return static_cast<ArkTSTurboModule &>(turboModule).callAsync(rt, "get", args, count);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static jsi::Value hostFunction_RTNCookiesTurboModule_set(jsi::Runtime &rt, react::TurboModule &turboModule,
|
|
30
|
+
const jsi::Value *args, size_t count)
|
|
31
|
+
{
|
|
32
|
+
return static_cast<ArkTSTurboModule &>(turboModule).callAsync(rt, "set", args, count);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static jsi::Value hostFunction_RTNCookiesTurboModule_clearByName(jsi::Runtime &rt, react::TurboModule &turboModule,
|
|
36
|
+
const jsi::Value *args, size_t count)
|
|
37
|
+
{
|
|
38
|
+
return static_cast<ArkTSTurboModule &>(turboModule).callAsync(rt, "clearByName", args, count);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static jsi::Value hostFunction_RTNCookiesTurboModule_clearAll(jsi::Runtime &rt, react::TurboModule &turboModule,
|
|
42
|
+
const jsi::Value *args, size_t count)
|
|
43
|
+
{
|
|
44
|
+
return static_cast<ArkTSTurboModule &>(turboModule).callAsync(rt, "clearAll", args, count);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static jsi::Value hostFunction_RTNCookiesTurboModule_removeSessionCookies(jsi::Runtime &rt,
|
|
48
|
+
react::TurboModule &turboModule,
|
|
49
|
+
const jsi::Value *args, size_t count)
|
|
50
|
+
{
|
|
51
|
+
return static_cast<ArkTSTurboModule &>(turboModule).callAsync(rt, "removeSessionCookies", args, count);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
RTNCookiesTurboModule::RTNCookiesTurboModule(const ArkTSTurboModule::Context ctx, const std::string name)
|
|
56
|
+
: ArkTSTurboModule(ctx, name)
|
|
57
|
+
{
|
|
58
|
+
methodMap_["get"] = MethodMetadata{ 2, hostFunction_RTNCookiesTurboModule_get };
|
|
59
|
+
methodMap_["set"] = MethodMetadata{ 3, hostFunction_RTNCookiesTurboModule_set };
|
|
60
|
+
methodMap_["clearByName"] = MethodMetadata{ 3, hostFunction_RTNCookiesTurboModule_clearByName };
|
|
61
|
+
methodMap_["clearAll"] = MethodMetadata{ 1, hostFunction_RTNCookiesTurboModule_clearAll };
|
|
62
|
+
methodMap_["removeSessionCookies"] = MethodMetadata{ 0, hostFunction_RTNCookiesTurboModule_removeSessionCookies };
|
|
63
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
|
3
|
-
|
|
4
|
-
* Licensed under the The MIT License (MIT) (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
* https://github.com/react-native-cookies/cookies/blob/master/LICENSE
|
|
9
|
-
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef COOKIESTURBOMODULE_H
|
|
18
|
-
#define COOKIESTURBOMODULE_H
|
|
19
|
-
|
|
20
|
-
#pragma once
|
|
21
|
-
#include "RNOH/ArkTSTurboModule.h"
|
|
22
|
-
|
|
23
|
-
namespace rnoh {
|
|
24
|
-
class JSI_EXPORT RTNCookiesTurboModule : public ArkTSTurboModule {
|
|
25
|
-
public:
|
|
26
|
-
RTNCookiesTurboModule(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
27
|
-
};
|
|
28
|
-
} // namespace rnoh
|
|
29
|
-
#endif
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
|
3
|
+
|
|
4
|
+
* Licensed under the The MIT License (MIT) (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
* https://github.com/react-native-cookies/cookies/blob/master/LICENSE
|
|
9
|
+
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
#ifndef COOKIESTURBOMODULE_H
|
|
18
|
+
#define COOKIESTURBOMODULE_H
|
|
19
|
+
|
|
20
|
+
#pragma once
|
|
21
|
+
#include "RNOH/ArkTSTurboModule.h"
|
|
22
|
+
|
|
23
|
+
namespace rnoh {
|
|
24
|
+
class JSI_EXPORT RTNCookiesTurboModule : public ArkTSTurboModule {
|
|
25
|
+
public:
|
|
26
|
+
RTNCookiesTurboModule(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
27
|
+
};
|
|
28
|
+
} // namespace rnoh
|
|
29
|
+
#endif
|