!22 增加inner api及修改子系统路径

Merge pull request !22 from deserttime/master
This commit is contained in:
openharmony_ci 2023-10-26 14:19:08 +00:00 committed by Gitee
commit e0eab2981d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
11 changed files with 92 additions and 46 deletions

View File

@ -12,25 +12,23 @@
# limitations under the License.
import("//build/ohos.gni")
import("//domains/cloud/oaid/oaid.gni")
import("//domains/advertising/oaid/oaid.gni")
################################################################################
group("oaid_native_packages") {
deps = [
"etc/init:oaidservice.cfg",
"interfaces/innerkits:oaid_client",
"interfaces/kits/js/napi/oaid:oaid",
"profile:cloud_oaid_sa_profiles",
"services:oaid_service",
"services:oaid_service_config_json",
]
deps = [
"etc/init:oaidservice.cfg",
"interfaces/innerkits:oaid_client",
"interfaces/kits/js/napi/oaid:oaid",
"profile:cloud_oaid_sa_profiles",
"services:oaid_service",
"services:oaid_service_config_json",
]
}
group("oaid_build_fuzztest") {
testonly = true
deps = []
deps += [
"${oaid_root_path}/test/fuzztest:fuzztest"
]
}
deps += [ "${oaid_root_path}/test/fuzztest:fuzztest" ]
}

View File

@ -7,7 +7,7 @@ The Open Anonymous Device Identifier (OAID) service facilitates personalized ad
## Directory Structure
```
/domains/cloud/oaid # Service code of the OAID service component
/domains/advertising/oaid # Service code of the OAID service component
├── interfaces # API code
├── profile # Service configuration profile
├── services # Service code

View File

@ -8,7 +8,7 @@
## 目录
```
/domains/cloud/oaid # 广告标识服务部件业务代码
/domains/advertising/oaid # 广告标识服务部件业务代码
├── interfaces # 接口代码
├── profile # 服务配置文件
├── services # 服务代码

View File

@ -5,7 +5,7 @@
"license": "Apache License 2.0",
"publishAs": "code-segment",
"segment": {
"destPath": "domains/cloud/oaid"
"destPath": "domains/advertising/oaid"
},
"dirs": {},
"scripts": {},
@ -42,10 +42,19 @@
},
"build": {
"sub_component": [
"//domains/cloud/oaid:oaid_native_packages"
"//domains/advertising/oaid:oaid_native_packages"
],
"inner_api": [
{
"header": {
"header_base": "//domains/advertising/oaid/interfaces/innerkits/include/",
"header_files": []
},
"name": "//domains/advertising/oaid/interfaces/innerkits:oaid_client"
}
],
"test": [
"//domains/cloud/oaid/test/fuzztest:fuzztest"
"//domains/advertising/oaid/test/fuzztest:fuzztest"
]
}
}

View File

@ -10,8 +10,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//domains/cloud/oaid/oaid.gni")
import("//build/ohos.gni")
import("//domains/advertising/oaid/oaid.gni")
config("oaid_client_config") {
visibility = [ ":*" ]
@ -27,17 +27,23 @@ ohos_shared_library("oaid_client") {
"src/oaid_service_proxy.cpp",
]
sanitize = {
boundary_sanitize = true
integer_overflow = true
ubsan = true
}
configs = [ ":oaid_client_config" ]
public_configs = [ ":oaid_client_config" ]
deps = [
"${oaid_utils_path}:oaid_utils",
]
innerapi_tags = [ "platformsdk" ]
deps = [ "${oaid_utils_path}:oaid_utils" ]
external_deps = [
"hilog:libhilog",
"ipc:ipc_single",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
]
version_script = "liboaidclient.versionscript"
subsystem_name = "advertising"
part_name = "oaid"
}

View File

@ -0,0 +1,23 @@
# Copyright (c) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
1.0 {
global:
extern "C++" {
*GetInstance*;
*GetOAID*;
*ResetOAID*;
};
local:
*;
};

View File

@ -11,8 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//domains/cloud/oaid/oaid.gni")
import("//build/ohos.gni")
import("//domains/advertising/oaid/oaid.gni")
cflags = []
@ -33,30 +33,36 @@ config("native_module_config") {
ohos_shared_library("oaid") {
include_dirs = [
"//domains/cloud/oaid/interfaces/innerkits/include",
"${innerkits_path}/include",
"../utils/native/include",
"./include",
"//third_party/node/src",
"//third_party/libuv/include",
]
configs = [ ":native_module_config"]
sanitize = {
boundary_sanitize = true
integer_overflow = true
ubsan = true
}
configs = [ ":native_module_config" ]
sources = [
"src/oaid.cpp",
"src/oaid_init.cpp"
"src/oaid_init.cpp",
]
deps = [
"${oaid_utils_path}:oaid_utils",
"${innerkits_path}:oaid_client",
"//third_party/libuv:uv_static"
"${oaid_utils_path}:oaid_utils",
"//third_party/libuv:uv_static",
]
external_deps = [
"hilog:libhilog",
"ipc:ipc_single",
"napi:ace_napi"
"napi:ace_napi",
]
relative_install_dir = "module/identifier"

View File

@ -12,7 +12,7 @@
# limitations under the License.
import("//build/ohos.gni")
oaid_root_path = "//domains/cloud/oaid"
oaid_root_path = "//domains/advertising/oaid"
kits_path = "${oaid_root_path}/interfaces/kits"

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//domains/cloud/oaid/oaid.gni")
import("//domains/advertising/oaid/oaid.gni")
config("oaid_service_config") {
visibility = [ ":*" ]
@ -25,15 +25,19 @@ config("oaid_service_config") {
ohos_shared_library("oaid_service") {
configs = [ "${oaid_utils_path}:utils_config" ]
public_configs = [
":oaid_service_config"
]
public_configs = [ ":oaid_service_config" ]
sanitize = {
boundary_sanitize = true
integer_overflow = true
ubsan = true
}
sources = [
"oaid_manager/src/bundle_mgr_helper.cpp",
"oaid_manager/src/oaid_death_recipient.cpp",
"oaid_manager/src/oaid_service.cpp",
"oaid_manager/src/oaid_service_stub.cpp",
"oaid_manager/src/bundle_mgr_helper.cpp",
"oaid_manager/src/oaid_death_recipient.cpp"
]
deps = [
@ -42,17 +46,17 @@ ohos_shared_library("oaid_service") {
]
external_deps = [
"hilog:libhilog",
"ipc:ipc_single",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
"bundle_framework:appexecfwk_core",
"bundle_framework:appexecfwk_base",
"access_token:libaccesstoken_sdk",
"access_token:libprivacy_sdk",
"access_token:libtokenid_sdk",
"kv_store:distributeddata_inner",
"bundle_framework:appexecfwk_base",
"bundle_framework:appexecfwk_core",
"config_policy:configpolicy_util",
"hilog:libhilog",
"ipc:ipc_single",
"kv_store:distributeddata_inner",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
]
part_name = "oaid"
subsystem_name = "advertising"
@ -63,4 +67,4 @@ ohos_prebuilt_etc("oaid_service_config_json") {
relative_install_dir = "cloud/oaid"
part_name = "oaid"
subsystem_name = "advertising"
}
}

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//domains/cloud/oaid/oaid.gni")
import("//domains/advertising/oaid/oaid.gni")
#####################hydra-fuzz###################
import("//build/config/features.gni")

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//domains/cloud/oaid/oaid.gni")
import("//domains/advertising/oaid/oaid.gni")
config("utils_config") {
include_dirs = [