新增vcard模块,build文件

Signed-off-by: liuxiyao223 <liuxiyao223@huawei.com>
This commit is contained in:
xieyh0509 2023-11-13 19:49:06 +08:00
parent f3ba157454
commit a34f0546b0
4 changed files with 155 additions and 2 deletions

View File

@ -70,7 +70,8 @@
"libxml2",
"node",
"openssl",
"protobuf"
"protobuf",
"glib"
]
},
"build": {
@ -80,7 +81,8 @@
"fwk_group": [
"//base/telephony/core_service/interfaces/innerkits:tel_core_service_api",
"//base/telephony/core_service/frameworks/js/network_search:radio",
"//base/telephony/core_service/frameworks/js/sim:sim"
"//base/telephony/core_service/frameworks/js/sim:sim",
"//base/telephony/core_service/frameworks/js/vcard:vcard"
],
"service_group": [
"//base/telephony/core_service:tel_core_service",
@ -109,6 +111,13 @@
"header_files": []
},
"name":"//base/telephony/core_service/utils:libtel_common"
},
{
"header": {
"header_base" : "//base/telephony/core_service/utils",
"header_files": []
},
"name":"//base/telephony/core_service/utils:libtel_vcard"
}
],
"test": [

59
frameworks/js/vcard/BUILD.gn Executable file
View File

@ -0,0 +1,59 @@
# 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.
import("//build/ohos.gni")
SUBSYSTEM_DIR = "../../../../"
ohos_shared_library("vcard") {
include_dirs = [
"$SUBSYSTEM_DIR/core_service/frameworks/js/napi",
"include",
"$SUBSYSTEM_DIR/core_service/interfaces/kits/native",
"$SUBSYSTEM_DIR/core_service/interfaces/innerkits/include",
"$SUBSYSTEM_DIR/core_service/utils/vcard/include",
"$SUBSYSTEM_DIR/core_service/utils/vcard/include/contact_data",
]
sources = [
"$SUBSYSTEM_DIR/core_service/frameworks/js/napi/napi_util.cpp",
"src/napi_vcard.cpp",
]
configs = [ "$SUBSYSTEM_DIR/core_service/utils:telephony_log_config" ]
deps = [
"$SUBSYSTEM_DIR/core_service/interfaces/innerkits:tel_core_service_api",
"$SUBSYSTEM_DIR/core_service/utils:libtel_common",
"$SUBSYSTEM_DIR/core_service/utils:libtel_vcard",
"//third_party/node:node_header",
]
external_deps = [
"ability_base:zuri",
"ability_runtime:abilitykit_native",
"ability_runtime:data_ability_helper",
"ability_runtime:napi_base_context",
"c_utils:utils",
"data_share:datashare_common",
"data_share:datashare_consumer",
"hilog:libhilog",
"init:libbegetutil",
"ipc:ipc_single",
"napi:ace_napi",
]
defines = [
"TELEPHONY_LOG_TAG = \"CoreServiceVcardJsApi\"",
"LOG_DOMAIN = 0xD001F04",
]
subsystem_name = "telephony"
part_name = "core_service"
relative_install_dir = "module/telephony"
}

View File

@ -36,6 +36,7 @@ ohos_unittest("tel_core_service_gtest") {
"sim_test.cpp",
"sim_test_util.cpp",
"sim_type_convert_test.cpp",
"vcard_test.cpp",
"zero_branch_test.cpp",
"zero_branch_test_core_service.cpp",
"zero_branch_test_sim_ril.cpp",
@ -73,6 +74,7 @@ ohos_unittest("tel_core_service_gtest") {
"c_utils:utils",
"common_event_service:cesfwk_innerkits",
"config_policy:configpolicy_util",
"core_service:libtel_vcard",
"data_share:datashare_common",
"data_share:datashare_consumer",
"drivers_interface_ril:hril_innerkits",

View File

@ -37,6 +37,13 @@ config("tel_utils_config") {
]
}
config("tel_contact_config") {
include_dirs = [
"vcard/include",
"vcard/include/contact_data",
]
}
ohos_shared_library("libtel_common") {
version_script = "libtel_common.versionscript"
sources = [
@ -89,3 +96,79 @@ ohos_shared_library("libtel_common") {
part_name = "core_service"
subsystem_name = "telephony"
}
ohos_shared_library("libtel_vcard") {
version_script = "libtel_vcard.versionscript"
sources = [
"vcard/src/contact_data/vcard_anniversary_data.cpp",
"vcard/src/contact_data/vcard_birthday_data.cpp",
"vcard/src/contact_data/vcard_email_data.cpp",
"vcard/src/contact_data/vcard_event_data.cpp",
"vcard/src/contact_data/vcard_im_data.cpp",
"vcard/src/contact_data/vcard_name_data.cpp",
"vcard/src/contact_data/vcard_nickname_data.cpp",
"vcard/src/contact_data/vcard_note_data.cpp",
"vcard/src/contact_data/vcard_organization_data.cpp",
"vcard/src/contact_data/vcard_phone_data.cpp",
"vcard/src/contact_data/vcard_photo_data.cpp",
"vcard/src/contact_data/vcard_postal_data.cpp",
"vcard/src/contact_data/vcard_relation_data.cpp",
"vcard/src/contact_data/vcard_sip_data.cpp",
"vcard/src/contact_data/vcard_website_data.cpp",
"vcard/src/vcard_configuration.cpp",
"vcard/src/vcard_constructor.cpp",
"vcard/src/vcard_contact.cpp",
"vcard/src/vcard_decoder.cpp",
"vcard/src/vcard_decoder_v21.cpp",
"vcard/src/vcard_decoder_v30.cpp",
"vcard/src/vcard_decoder_v40.cpp",
"vcard/src/vcard_encoder.cpp",
"vcard/src/vcard_file_utils.cpp",
"vcard/src/vcard_manager.cpp",
"vcard/src/vcard_raw_data.cpp",
"vcard/src/vcard_rdb_helper.cpp",
"vcard/src/vcard_utils.cpp",
]
defines = [
"TELEPHONY_LOG_TAG = \"TelephonyVCard\"",
"LOG_DOMAIN = 0xD001F04",
]
if (is_standard_system) {
defines += [ "STANDARD_SYSTEM_ENABLE" ]
}
configs = [ "../utils:telephony_log_config" ]
public_configs = [ ":tel_contact_config" ]
if (is_double_framework) {
cflags_cc = [ "-DCONFIG_DUAL_FRAMEWORK" ]
}
include_dirs = [
":tel_contact_config",
"../interfaces/innerkits/include/",
"//third_party/glib/glib",
"//third_party/glib",
]
deps = [ "//third_party/glib:glib_packages" ]
external_deps = [
"ability_base:want",
"ability_base:zuri",
"ability_runtime:ability_manager",
"ability_runtime:data_ability_helper",
"c_utils:utils",
"data_share:datashare_common",
"data_share:datashare_consumer",
"hilog:libhilog",
"init:libbegetutil",
]
innerapi_tags = [ "platformsdk" ]
part_name = "core_service"
subsystem_name = "telephony"
}