diff --git a/BUILD.gn b/BUILD.gn index 30e541cd31f93859149a9505df1d05da7a6fa724..48a36aa7495848288d5880e6bbb01debf485825e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -11,37 +11,32 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/telephony/core_service/telephony.gni") import("//build/ohos.gni") -SOURCE_DIR = "//base/telephony/state_registry" -CORE_DIR = "//base/telephony/core_service" ohos_shared_library("tel_state_registry") { part_name = "state_registry" subsystem_name = "telephony" sources = [ - "$SOURCE_DIR/frameworks/native/observer/src/telephony_observer_proxy.cpp", - "$SOURCE_DIR/services/src/telephony_state_registry_dump_helper.cpp", - "$SOURCE_DIR/services/src/telephony_state_registry_record.cpp", - "$SOURCE_DIR/services/src/telephony_state_registry_service.cpp", - "$SOURCE_DIR/services/src/telephony_state_registry_stub.cpp", + "frameworks/native/observer/src/telephony_observer_proxy.cpp", + "services/src/telephony_state_registry_dump_helper.cpp", + "services/src/telephony_state_registry_record.cpp", + "services/src/telephony_state_registry_service.cpp", + "services/src/telephony_state_registry_stub.cpp", ] include_dirs = [ - "$SOURCE_DIR/frameworks/native/observer/include", - "$SOURCE_DIR/frameworks/native/common/include", - "$SOURCE_DIR/services/include", + "frameworks/native/observer/include", + "frameworks/native/common/include", + "services/include", ] - configs = [ "//base/telephony/core_service/utils:telephony_log_config" ] - - deps = [ "$CORE_DIR/utils:libtel_common" ] - external_deps = [ "ability_base:want", + "c_utils:utils", "call_manager:tel_call_manager_api", "common_event_service:cesfwk_innerkits", + "core_service:libtel_common", "core_service:tel_core_service_api", "hiviewdfx_hilog_native:libhilog", "init:libbegetutil", @@ -50,7 +45,7 @@ ohos_shared_library("tel_state_registry") { "samgr:samgr_proxy", ] - defines += [ + defines = [ "TELEPHONY_LOG_TAG = \"StateRegistry\"", "LOG_DOMAIN = 0xD001F07", ] diff --git a/bundle.json b/bundle.json index dc5a64dd19db4368d0a2b0ec2e3f5bf07351a595..f399b8658beb53a43816134e25e32e429b6bc6e8 100755 --- a/bundle.json +++ b/bundle.json @@ -1,6 +1,6 @@ { "name": "@ohos/state_registry", - "version": "3.1.0", + "version": "4.0", "description": "telephony state_registry service", "publishAs": "code-segment", "homePage": "https://gitee.com/openharmony", @@ -31,7 +31,9 @@ "deps": { "components": [ "ability_base", + "access_token", "c_utils", + "call_manager", "common_event_service", "core_service", "eventhandler", diff --git a/frameworks/js/napi/BUILD.gn b/frameworks/js/napi/BUILD.gn index a7041c404f8a6b4c4a146e2d354e440e399d93bc..106e49ff01388b191d44b77c79dcd3e914db54d7 100644 --- a/frameworks/js/napi/BUILD.gn +++ b/frameworks/js/napi/BUILD.gn @@ -10,47 +10,38 @@ # 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("//base/telephony/core_service/telephony.gni") import("//build/ohos.gni") -SUBSYSTEM_DIR = "//base/telephony" +SUBSYSTEM_DIR = "../../../.." ohos_shared_library("observer") { include_dirs = [ "//third_party/node/src", "include", "$SUBSYSTEM_DIR/state_registry/frameworks/native/observer/include", - "$SUBSYSTEM_DIR/core_service/frameworks/js/sim/include", - "$SUBSYSTEM_DIR/core_service/frameworks/js/network_search/include", - "$SUBSYSTEM_DIR/core_service/frameworks/js/napi", - "$SUBSYSTEM_DIR/call_manager/interfaces/innerkits", - "//third_party/libuv/include", ] sources = [ - "$SUBSYSTEM_DIR/core_service/frameworks/js/napi/napi_util.cpp", "src/event_listener_handler.cpp", "src/event_listener_manager.cpp", "src/napi_state_registry.cpp", "src/napi_telephony_observer.cpp", ] - configs = [ "//base/telephony/core_service/utils:telephony_log_config" ] - - deps = [ - "//foundation/arkui/napi:ace_napi", - "//third_party/libuv:uv", - ] + deps = [ "//third_party/libuv:uv" ] external_deps = [ "c_utils:utils", + "call_manager:tel_call_manager_api", + "core_service:libtel_common", "core_service:tel_core_service_api", "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "init:libbegetutil", "ipc:ipc_core", + "napi:ace_napi", "state_registry:tel_state_registry_api", ] - defines += [ + defines = [ "TELEPHONY_LOG_TAG = \"StateRegistryJsApi\"", "LOG_DOMAIN = 0xD001F07", ] diff --git a/frameworks/js/napi/src/event_listener_handler.cpp b/frameworks/js/napi/src/event_listener_handler.cpp index 3540ea2ef6e1c674c592061bcbcc1592ea3ff1d4..3e4c278d9d1a6f388686d01892dc23f8df8d8f67 100644 --- a/frameworks/js/napi/src/event_listener_handler.cpp +++ b/frameworks/js/napi/src/event_listener_handler.cpp @@ -22,7 +22,6 @@ #include "inner_event.h" #include "napi_parameter_util.h" #include "napi_radio_types.h" -#include "napi_sim_type.h" #include "napi_state_registry.h" #include "napi_telephony_observer.h" #include "napi_util.h" diff --git a/frameworks/native/observer/BUILD.gn b/frameworks/native/observer/BUILD.gn index f6387e5b2e3e669a18821446eff1c9230efff2b2..005b27fedb4ff1ba6aab30366468ea6370a358d4 100644 --- a/frameworks/native/observer/BUILD.gn +++ b/frameworks/native/observer/BUILD.gn @@ -11,8 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") -SUBSYSTEM_DIR = "//base/telephony/state_registry" -CORE_DIR = "//base/telephony/core_service" +SUBSYSTEM_DIR = "../../.." config("state_registry_observer_config") { include_dirs = [ @@ -23,28 +22,20 @@ config("state_registry_observer_config") { ohos_shared_library("tel_state_registry_api") { sources = [ - "$CORE_DIR/frameworks/native/src/cell_information.cpp", - "$CORE_DIR/frameworks/native/src/network_state.cpp", - "$CORE_DIR/frameworks/native/src/signal_information.cpp", - "$CORE_DIR/frameworks/native/src/telephony_state_registry_proxy.cpp", "$SUBSYSTEM_DIR/frameworks/native/observer/src/telephony_observer.cpp", "$SUBSYSTEM_DIR/frameworks/native/observer/src/telephony_observer_client.cpp", "$SUBSYSTEM_DIR/frameworks/native/observer/src/telephony_observer_proxy.cpp", "$SUBSYSTEM_DIR/frameworks/native/observer/src/telephony_state_manager.cpp", ] - include_dirs = [ - "$SUBSYSTEM_DIR/frameworks/native/observer/include", - "$CORE_DIR/interfaces/innerkits/include", - ] - - configs = [ "//base/telephony/core_service/utils:telephony_log_config" ] + include_dirs = [ "$SUBSYSTEM_DIR/frameworks/native/observer/include" ] public_configs = [ ":state_registry_observer_config" ] - deps = [ "$CORE_DIR/utils:libtel_common" ] - external_deps = [ + "c_utils:utils", + "core_service:libtel_common", + "core_service:tel_core_service_api", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "samgr:samgr_proxy", diff --git a/test/unittest/state_test/BUILD.gn b/test/unittest/state_test/BUILD.gn index d270475fbfb9534e02397efaa96b45c72bfb6f9f..337296fe03d9d0222b48cd101555ae9c50dcd3d0 100644 --- a/test/unittest/state_test/BUILD.gn +++ b/test/unittest/state_test/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/test.gni") -SOURCE_DIR = "//base/telephony/state_registry" +SOURCE_DIR = "../../.." ohos_unittest("tel_state_registry_test") { part_name = "state_registry" @@ -20,11 +20,7 @@ ohos_unittest("tel_state_registry_test") { test_module = "tel_state_registry_test" module_out_path = part_name + "/" + test_module - sources = [ - "$SOURCE_DIR/test/unittest/state_test/state_registry_test.cpp", - "//base/telephony/core_service/frameworks/native/src/telephony_state_registry_client.cpp", - "//base/telephony/core_service/frameworks/native/src/telephony_state_registry_proxy.cpp", - ] + sources = [ "$SOURCE_DIR/test/unittest/state_test/state_registry_test.cpp" ] include_dirs = [ "$SOURCE_DIR/interfaces/innerkits/notify", @@ -33,15 +29,14 @@ ohos_unittest("tel_state_registry_test") { "$SOURCE_DIR/services/include", ] - configs = [ "//base/telephony/core_service/utils:telephony_log_config" ] - - deps = [ "//base/telephony/state_registry/frameworks/native/observer:tel_state_registry_api" ] + deps = [ "$SOURCE_DIR/frameworks/native/observer:tel_state_registry_api" ] external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", "c_utils:utils", + "core_service:libtel_common", "core_service:tel_core_service_api", "init:libbegetutil", "ipc:ipc_core",