1# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//base/security/access_token/access_token.gni") 15import("//build/ohos.gni") 16 17ohos_prebuilt_etc("token_sync.rc") { 18 source = "token_sync.cfg" 19 relative_install_dir = "init" 20 subsystem_name = "security" 21 part_name = "access_token" 22} 23 24group("tokensyncmanager") { 25 if (is_standard_system && token_sync_enable == true) { 26 deps = [ 27 "//base/security/access_token/interfaces/innerkits/tokensync:libtokensync_sdk", 28 "//base/security/access_token/services/tokensyncmanager:token_sync_manager_service", 29 "//base/security/access_token/services/tokensyncmanager/sa_profile:tokensync_sa_profile_standard", 30 ] 31 } 32} 33 34ohos_shared_library("token_sync_manager_service") { 35 subsystem_name = "security" 36 part_name = "access_token" 37 version_script = "tokensync_manager_service.map" 38 39 include_dirs = [ 40 "include/service", 41 "include/remote", 42 "include/command", 43 "include/common", 44 "include/device", 45 "include/protocol", 46 "//base/security/access_token/frameworks/common/include", 47 "//base/security/access_token/frameworks/accesstoken/include", 48 "//base/security/access_token/frameworks/tokensync/include", 49 "//base/security/access_token/interfaces/innerkits/accesstoken/include", 50 "//third_party/json/include", 51 ] 52 53 sources = [ 54 "src/command/base_remote_command.cpp", 55 "src/command/delete_remote_token_command.cpp", 56 "src/command/sync_remote_hap_token_command.cpp", 57 "src/command/sync_remote_native_token_command.cpp", 58 "src/command/update_remote_hap_token_command.cpp", 59 "src/common/constant.cpp", 60 "src/device/device_info_manager.cpp", 61 "src/device/device_info_repository.cpp", 62 "src/remote/remote_command_executor.cpp", 63 "src/remote/remote_command_factory.cpp", 64 "src/remote/remote_command_manager.cpp", 65 "src/remote/soft_bus_channel.cpp", 66 "src/remote/soft_bus_device_connection_listener.cpp", 67 "src/remote/soft_bus_manager.cpp", 68 "src/remote/soft_bus_session_listener.cpp", 69 "src/service/token_sync_event_handler.cpp", 70 "src/service/token_sync_manager_service.cpp", 71 "src/service/token_sync_manager_stub.cpp", 72 ] 73 74 cflags_cc = [ 75 "-DHILOG_ENABLE", 76 "-DDEBUG_API_PERFORMANCE", 77 ] 78 79 configs = [ "//base/security/access_token/config:coverage_flags" ] 80 81 deps = [ 82 "//base/security/access_token/frameworks/accesstoken:accesstoken_communication_adapter_cxx", 83 "//base/security/access_token/frameworks/common:accesstoken_common_cxx", 84 "//base/security/access_token/interfaces/innerkits/accesstoken:libaccesstoken_sdk", 85 "//base/security/access_token/services/tokensyncmanager:token_sync.rc", 86 "//third_party/zlib:libz", 87 ] 88 89 external_deps = [ 90 "c_utils:utils", 91 "dsoftbus:softbus_client", 92 "eventhandler:libeventhandler", 93 "hiviewdfx_hilog_native:libhilog", 94 "ipc:ipc_core", 95 "safwk:system_ability_fwk", 96 ] 97 98 if (token_sync_enable == true) { 99 cflags_cc += [ "-DTOKEN_SYNC_ENABLE" ] 100 external_deps += [ "device_manager:devicemanagersdk" ] 101 } 102} 103