From fd7a1fc30d43f517b57e9759d4bca65342ece4bd Mon Sep 17 00:00:00 2001
From: majiajun <864428661@qq.com>
Date: Mon, 20 Dec 2021 22:54:21 -0800
Subject: [PATCH] sync code to master Signed-off-by: majiajun
<864428661@qq.com>
Change-Id: I7593eafe27246f0e9bc7e038a3232c91029478a9
---
OAT.xml | 3 +
etc/profile/BUILD.gn | 21 +
etc/profile/distributedsched_trust.xml | 19 +
ohos.build | 7 +-
services/dtbschedmgr/BUILD.gn | 12 +-
.../ability_connection_wrapper_proxy.h | 41 +
.../include/ability_connection_wrapper_stub.h | 6 -
.../adapter/adapter_constant.h} | 59 +-
.../include/adapter/dnetwork_adapter.h | 8 +-
services/dtbschedmgr/include/caller_info.h | 5 +
.../include/distributed_sched_ability_shell.h | 52 -
.../include/distributed_sched_adapter.h | 7 +-
.../include/distributed_sched_interface.h | 52 +-
.../include/distributed_sched_proxy.h | 34 +-
.../include/distributed_sched_service.h | 37 +-
.../include/distributed_sched_stub.h | 25 +-
.../include/dtbschedmgr_device_info_storage.h | 47 +-
.../dtbschedmgr/include/dtbschedmgr_log.h | 75 +-
.../distributed_data_change_listener.h} | 66 +-
.../mission/distributed_data_storage.h | 122 ++
.../distributed_sched_mission_manager.h | 184 +++
.../include/mission/mission_changed_notify.h | 38 +
.../include/mission/mission_constant.h | 29 +
.../include/mission/mission_info.h | 65 +
.../include/mission/mission_info_converter.h | 38 +
.../dtbschedmgr/include/mission/snapshot.h | 106 ++
services/dtbschedmgr/include/parcel_helper.h | 0
.../src/ability_connection_wrapper_proxy.cpp | 64 +
.../src/ability_connection_wrapper_stub.cpp | 36 +-
.../src/adapter/dnetwork_adapter.cpp | 21 +-
.../src/bundle/bundle_manager_internal.cpp | 12 +-
.../src/connect_death_recipient.cpp | 5 +-
.../src/deviceManager/dms_device_info.cpp | 3 +
.../src/distributed_device_node_listener.cpp | 7 +-
.../src/distributed_sched_ability_shell.cpp | 152 --
.../src/distributed_sched_adapter.cpp | 61 +-
.../src/distributed_sched_continuation.cpp | 23 +-
.../src/distributed_sched_dumper.cpp | 1 +
.../src/distributed_sched_permission.cpp | 11 +-
.../src/distributed_sched_proxy.cpp | 323 +++-
.../src/distributed_sched_service.cpp | 206 ++-
.../src/distributed_sched_stub.cpp | 399 ++++-
.../src/dtbschedmgr_device_info_storage.cpp | 182 ++-
.../distributed_data_change_listener.cpp | 110 ++
.../src/mission/distributed_data_storage.cpp | 182 +++
.../distributed_sched_mission_manager.cpp | 1321 +++++++++++++++++
.../src/mission/mission_changed_notify.cpp | 135 ++
.../dtbschedmgr/src/mission/mission_info.cpp | 194 +++
.../src/mission/mission_info_converter.cpp | 71 +
services/dtbschedmgr/src/mission/snapshot.cpp | 219 +++
services/dtbschedmgr/test/BUILD.gn | 27 +-
.../test/etsDmsDemo/dmsDemo/build.gradle | 34 +
.../etsDmsDemo/dmsDemo/entry/build.gradle | 22 +
.../dmsDemo/entry/src/main/config.json | 102 ++
.../entry/src/main/ets/LocalAbility/app.ets | 23 +
.../src/main/ets/LocalAbility/pages/index.ets | 28 +
.../entry/src/main/ets/RemoteAbility/app.ets | 38 +
.../main/ets/RemoteAbility/pages/index.ets | 543 +++++++
.../src/main/ets/ServiceAbility/service.ts | 69 +
.../src/main/ets/model/RemoteDeviceModel.ets | 184 +++
.../main/resources/base/element/string.json | 20 +
.../src/main/resources/base/media/icon.png | 0
.../test/etsDmsDemo/dmsDemo/settings.gradle | 1 +
.../test/jsDmsDemo/dmsDemo/build.gradle | 34 +
.../test/jsDmsDemo/dmsDemo/entry/build.gradle | 22 +
.../dmsDemo/entry/src/main/config.json | 94 ++
.../entry/src/main/js/LocalAbility/app.js | 23 +
.../src/main/js/LocalAbility/i18n/en-US.json | 11 +
.../src/main/js/LocalAbility/i18n/zh-CN.json | 11 +
.../js/LocalAbility/pages/index/index.css | 39 +
.../js/LocalAbility/pages/index/index.hml | 20 +
.../main/js/LocalAbility/pages/index/index.js | 23 +
.../entry/src/main/js/RemoteAbility/app.js | 38 +
.../src/main/js/RemoteAbility/i18n/en-US.json | 11 +
.../src/main/js/RemoteAbility/i18n/zh-CN.json | 11 +
.../js/RemoteAbility/pages/index/index.css | 163 ++
.../js/RemoteAbility/pages/index/index.hml | 78 +
.../js/RemoteAbility/pages/index/index.js | 438 ++++++
.../src/main/js/ServiceAbility/service.js | 69 +
.../src/main/js/model/RemoteDeviceModel.js | 184 +++
.../main/resources/base/element/string.json | 20 +
.../src/main/resources/base/media/icon.png | 0
.../test/jsDmsDemo/dmsDemo/settings.gradle | 1 +
.../distributed_sched_ability_shell_test.cpp | 571 -------
.../distributed_sched_connect_test.cpp | 272 +++-
.../distributed_sched_continuation_test.cpp | 13 +-
.../distributed_sched_service_test.cpp | 62 +-
.../mission/dms_mission_manager_test.cpp | 319 ++++
.../mission/dms_mission_manager_test.h | 39 +
.../test/unittest/mock_distributed_sched.cpp | 93 +-
.../test/unittest/mock_distributed_sched.h | 32 +-
91 files changed, 7377 insertions(+), 1301 deletions(-)
create mode 100644 etc/profile/BUILD.gn
create mode 100644 etc/profile/distributedsched_trust.xml
mode change 100755 => 100644 ohos.build
create mode 100644 services/dtbschedmgr/include/ability_connection_wrapper_proxy.h
mode change 100755 => 100644 services/dtbschedmgr/include/ability_connection_wrapper_stub.h
rename services/dtbschedmgr/{src/continuation_callback_death_recipient.cpp => include/adapter/adapter_constant.h} (59%)
mode change 100755 => 100644
mode change 100755 => 100644 services/dtbschedmgr/include/adapter/dnetwork_adapter.h
delete mode 100755 services/dtbschedmgr/include/distributed_sched_ability_shell.h
mode change 100755 => 100644 services/dtbschedmgr/include/distributed_sched_adapter.h
mode change 100755 => 100644 services/dtbschedmgr/include/dtbschedmgr_device_info_storage.h
rename services/dtbschedmgr/include/{continuation_callback_death_recipient.h => mission/distributed_data_change_listener.h} (54%)
mode change 100755 => 100644
create mode 100644 services/dtbschedmgr/include/mission/distributed_data_storage.h
create mode 100644 services/dtbschedmgr/include/mission/distributed_sched_mission_manager.h
create mode 100644 services/dtbschedmgr/include/mission/mission_changed_notify.h
create mode 100644 services/dtbschedmgr/include/mission/mission_constant.h
create mode 100644 services/dtbschedmgr/include/mission/mission_info.h
create mode 100644 services/dtbschedmgr/include/mission/mission_info_converter.h
create mode 100644 services/dtbschedmgr/include/mission/snapshot.h
mode change 100755 => 100644 services/dtbschedmgr/include/parcel_helper.h
create mode 100644 services/dtbschedmgr/src/ability_connection_wrapper_proxy.cpp
mode change 100755 => 100644 services/dtbschedmgr/src/ability_connection_wrapper_stub.cpp
mode change 100755 => 100644 services/dtbschedmgr/src/adapter/dnetwork_adapter.cpp
mode change 100755 => 100644 services/dtbschedmgr/src/bundle/bundle_manager_internal.cpp
mode change 100755 => 100644 services/dtbschedmgr/src/connect_death_recipient.cpp
mode change 100755 => 100644 services/dtbschedmgr/src/deviceManager/dms_device_info.cpp
mode change 100755 => 100644 services/dtbschedmgr/src/distributed_device_node_listener.cpp
delete mode 100755 services/dtbschedmgr/src/distributed_sched_ability_shell.cpp
mode change 100755 => 100644 services/dtbschedmgr/src/distributed_sched_adapter.cpp
mode change 100755 => 100644 services/dtbschedmgr/src/distributed_sched_continuation.cpp
mode change 100755 => 100644 services/dtbschedmgr/src/distributed_sched_dumper.cpp
mode change 100755 => 100644 services/dtbschedmgr/src/distributed_sched_permission.cpp
mode change 100755 => 100644 services/dtbschedmgr/src/dtbschedmgr_device_info_storage.cpp
create mode 100644 services/dtbschedmgr/src/mission/distributed_data_change_listener.cpp
create mode 100644 services/dtbschedmgr/src/mission/distributed_data_storage.cpp
create mode 100644 services/dtbschedmgr/src/mission/distributed_sched_mission_manager.cpp
create mode 100644 services/dtbschedmgr/src/mission/mission_changed_notify.cpp
create mode 100644 services/dtbschedmgr/src/mission/mission_info.cpp
create mode 100644 services/dtbschedmgr/src/mission/mission_info_converter.cpp
create mode 100644 services/dtbschedmgr/src/mission/snapshot.cpp
mode change 100755 => 100644 services/dtbschedmgr/test/BUILD.gn
create mode 100644 services/dtbschedmgr/test/etsDmsDemo/dmsDemo/build.gradle
create mode 100644 services/dtbschedmgr/test/etsDmsDemo/dmsDemo/entry/build.gradle
create mode 100644 services/dtbschedmgr/test/etsDmsDemo/dmsDemo/entry/src/main/config.json
create mode 100644 services/dtbschedmgr/test/etsDmsDemo/dmsDemo/entry/src/main/ets/LocalAbility/app.ets
create mode 100644 services/dtbschedmgr/test/etsDmsDemo/dmsDemo/entry/src/main/ets/LocalAbility/pages/index.ets
create mode 100644 services/dtbschedmgr/test/etsDmsDemo/dmsDemo/entry/src/main/ets/RemoteAbility/app.ets
create mode 100644 services/dtbschedmgr/test/etsDmsDemo/dmsDemo/entry/src/main/ets/RemoteAbility/pages/index.ets
create mode 100644 services/dtbschedmgr/test/etsDmsDemo/dmsDemo/entry/src/main/ets/ServiceAbility/service.ts
create mode 100644 services/dtbschedmgr/test/etsDmsDemo/dmsDemo/entry/src/main/ets/model/RemoteDeviceModel.ets
create mode 100644 services/dtbschedmgr/test/etsDmsDemo/dmsDemo/entry/src/main/resources/base/element/string.json
create mode 100644 services/dtbschedmgr/test/etsDmsDemo/dmsDemo/entry/src/main/resources/base/media/icon.png
create mode 100644 services/dtbschedmgr/test/etsDmsDemo/dmsDemo/settings.gradle
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/build.gradle
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/build.gradle
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/config.json
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/LocalAbility/app.js
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/LocalAbility/i18n/en-US.json
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/LocalAbility/i18n/zh-CN.json
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/LocalAbility/pages/index/index.css
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/LocalAbility/pages/index/index.hml
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/LocalAbility/pages/index/index.js
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/RemoteAbility/app.js
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/RemoteAbility/i18n/en-US.json
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/RemoteAbility/i18n/zh-CN.json
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/RemoteAbility/pages/index/index.css
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/RemoteAbility/pages/index/index.hml
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/RemoteAbility/pages/index/index.js
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/ServiceAbility/service.js
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/js/model/RemoteDeviceModel.js
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/resources/base/element/string.json
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/entry/src/main/resources/base/media/icon.png
create mode 100644 services/dtbschedmgr/test/jsDmsDemo/dmsDemo/settings.gradle
delete mode 100755 services/dtbschedmgr/test/unittest/distributed_sched_ability_shell_test.cpp
mode change 100755 => 100644 services/dtbschedmgr/test/unittest/distributed_sched_connect_test.cpp
mode change 100755 => 100644 services/dtbschedmgr/test/unittest/distributed_sched_continuation_test.cpp
create mode 100644 services/dtbschedmgr/test/unittest/mission/dms_mission_manager_test.cpp
create mode 100644 services/dtbschedmgr/test/unittest/mission/dms_mission_manager_test.h
mode change 100755 => 100644 services/dtbschedmgr/test/unittest/mock_distributed_sched.cpp
mode change 100755 => 100644 services/dtbschedmgr/test/unittest/mock_distributed_sched.h
diff --git a/OAT.xml b/OAT.xml
index b16430c7..a0f4a604 100644
--- a/OAT.xml
+++ b/OAT.xml
@@ -58,6 +58,9 @@ Note:If the text contains special characters, please escape them according to th
+
+
+
\ No newline at end of file
diff --git a/etc/profile/BUILD.gn b/etc/profile/BUILD.gn
new file mode 100644
index 00000000..a68f76b4
--- /dev/null
+++ b/etc/profile/BUILD.gn
@@ -0,0 +1,21 @@
+# Copyright (c) 2021 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")
+
+ohos_prebuilt_etc("distributedsched_trust") {
+ source = "distributedsched_trust.xml"
+ module_install_dir = "profile"
+ part_name = "dmsfwk_standard"
+ subsystem_name = "distributedschedule"
+}
diff --git a/etc/profile/distributedsched_trust.xml b/etc/profile/distributedsched_trust.xml
new file mode 100644
index 00000000..4e151d3b
--- /dev/null
+++ b/etc/profile/distributedsched_trust.xml
@@ -0,0 +1,19 @@
+
+
+
+ distributedsched
+ 1401
+ 6001
+
diff --git a/ohos.build b/ohos.build
old mode 100755
new mode 100644
index f41cc29a..a0e8824f
--- a/ohos.build
+++ b/ohos.build
@@ -7,7 +7,11 @@
"header": {
"header_base": "//foundation/distributedschedule/dmsfwk/services/dtbschedmgr/include",
"header_files": [
- "uri.h"
+ "distributed_sched_interface.h",
+ "distributed_sched_proxy.h",
+ "caller_info.h",
+ "uri.h",
+ "mission/mission_info.h"
]
},
"name": "//foundation/distributedschedule/dmsfwk/interfaces/innerkits/uri:zuri"
@@ -15,6 +19,7 @@
],
"module_list": [
"//foundation/distributedschedule/dmsfwk/etc/init:etc",
+ "//foundation/distributedschedule/dmsfwk/etc/profile:distributedsched_trust",
"//foundation/distributedschedule/dmsfwk/sa_profile:dms_sa_profile",
"//foundation/distributedschedule/dmsfwk/services/dtbschedmgr:distributedschedsvr"
],
diff --git a/services/dtbschedmgr/BUILD.gn b/services/dtbschedmgr/BUILD.gn
index 0a19b781..8552207b 100644
--- a/services/dtbschedmgr/BUILD.gn
+++ b/services/dtbschedmgr/BUILD.gn
@@ -30,14 +30,13 @@ config("distributed_sched_config") {
ohos_shared_library("distributedschedsvr") {
install_enable = true
sources = [
+ "src/ability_connection_wrapper_proxy.cpp",
"src/ability_connection_wrapper_stub.cpp",
"src/adapter/dnetwork_adapter.cpp",
"src/bundle/bundle_manager_internal.cpp",
"src/connect_death_recipient.cpp",
- "src/continuation_callback_death_recipient.cpp",
"src/deviceManager/dms_device_info.cpp",
"src/distributed_device_node_listener.cpp",
- "src/distributed_sched_ability_shell.cpp",
"src/distributed_sched_adapter.cpp",
"src/distributed_sched_continuation.cpp",
"src/distributed_sched_dumper.cpp",
@@ -46,6 +45,13 @@ ohos_shared_library("distributedschedsvr") {
"src/distributed_sched_service.cpp",
"src/distributed_sched_stub.cpp",
"src/dtbschedmgr_device_info_storage.cpp",
+ "src/mission/distributed_data_change_listener.cpp",
+ "src/mission/distributed_data_storage.cpp",
+ "src/mission/distributed_sched_mission_manager.cpp",
+ "src/mission/mission_changed_notify.cpp",
+ "src/mission/mission_info.cpp",
+ "src/mission/mission_info_converter.cpp",
+ "src/mission/snapshot.cpp",
]
configs = [ ":distributed_sched_config" ]
@@ -60,8 +66,10 @@ ohos_shared_library("distributedschedsvr") {
"//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_base:appexecfwk_base",
"//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core:appexecfwk_core",
"//foundation/appexecfwk/standard/interfaces/innerkits/libeventhandler:libeventhandler",
+ "//foundation/distributeddatamgr/distributeddatamgr/interfaces/innerkits/distributeddata:distributeddata_inner",
"//foundation/distributedschedule/safwk/interfaces/innerkits/safwk:system_ability_fwk",
"//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
+ "//foundation/multimedia/image_standard/interfaces/innerkits:image_native",
"//utils/native/base:utils",
]
diff --git a/services/dtbschedmgr/include/ability_connection_wrapper_proxy.h b/services/dtbschedmgr/include/ability_connection_wrapper_proxy.h
new file mode 100644
index 00000000..e36091ea
--- /dev/null
+++ b/services/dtbschedmgr/include/ability_connection_wrapper_proxy.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2021 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.
+ */
+
+#ifndef OHOS_DISTRIBUTED_ABILITY_CONNECTION_WRAPPER_PROXY_H
+#define OHOS_DISTRIBUTED_ABILITY_CONNECTION_WRAPPER_PROXY_H
+
+#include "ability_connect_callback_interface.h"
+
+#include "iremote_object.h"
+#include "iremote_proxy.h"
+
+namespace OHOS {
+namespace DistributedSchedule {
+class AbilityConnectionWrapperProxy : public IRemoteProxy {
+public:
+ explicit AbilityConnectionWrapperProxy(const sptr& impl)
+ : IRemoteProxy(impl) {}
+ virtual ~AbilityConnectionWrapperProxy() = default;
+
+ void OnAbilityConnectDone(const AppExecFwk::ElementName& element, const sptr& remoteObject,
+ int32_t resultCode) override;
+ void OnAbilityDisconnectDone(const AppExecFwk::ElementName& element, int32_t resultCode) override;
+
+private:
+ static inline BrokerDelegator delegator_;
+};
+} // namespace DistributedSchedule
+} // namespace OHOS
+#endif // OHOS_DISTRIBUTED_ABILITY_CONNECTION_WRAPPER_PROXY_H
\ No newline at end of file
diff --git a/services/dtbschedmgr/include/ability_connection_wrapper_stub.h b/services/dtbschedmgr/include/ability_connection_wrapper_stub.h
old mode 100755
new mode 100644
index 625cb3cf..23f1a075
--- a/services/dtbschedmgr/include/ability_connection_wrapper_stub.h
+++ b/services/dtbschedmgr/include/ability_connection_wrapper_stub.h
@@ -26,11 +26,6 @@ namespace OHOS {
namespace DistributedSchedule {
class AbilityConnectionWrapperStub : public IRemoteStub {
public:
- enum {
- ON_ABILITY_CONNECT_DONE = 1,
- ON_ABILITY_DISCONNECT_DONE = 2
- };
-
explicit AbilityConnectionWrapperStub(sptr connection);
virtual ~AbilityConnectionWrapperStub() = default;
@@ -43,7 +38,6 @@ public:
private:
DISALLOW_COPY_AND_MOVE(AbilityConnectionWrapperStub);
-
sptr distributedConnection_;
};
} // namespace DistributedSchedule
diff --git a/services/dtbschedmgr/src/continuation_callback_death_recipient.cpp b/services/dtbschedmgr/include/adapter/adapter_constant.h
old mode 100755
new mode 100644
similarity index 59%
rename from services/dtbschedmgr/src/continuation_callback_death_recipient.cpp
rename to services/dtbschedmgr/include/adapter/adapter_constant.h
index 944fe6b1..5193b701
--- a/services/dtbschedmgr/src/continuation_callback_death_recipient.cpp
+++ b/services/dtbschedmgr/include/adapter/adapter_constant.h
@@ -1,29 +1,30 @@
-/*
- * Copyright (c) 2021 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.
- */
-
-#include "continuation_callback_death_recipient.h"
-#include "distributed_sched_ability_shell.h"
-#include "dtbschedmgr_log.h"
-#include "iremote_proxy.h"
-
-namespace OHOS {
-namespace DistributedSchedule {
-void ContinuationCallbackDeathRecipient::OnRemoteDied(const wptr& remote)
-{
- HILOGI("%s called", __func__);
- DistributedSchedAbilityShell::GetInstance().RemoveContinuationCallback(remote.promote());
-}
-} // namespace DistributedSchedule
-} // namespace OHOS
\ No newline at end of file
+/*
+ * Copyright (c) 2021 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.
+ */
+
+#ifndef OHOS_DISTRIBUTED_DMS_DFX_CONSTANT_H
+#define OHOS_DISTRIBUTED_DMS_DFX_CONSTANT_H
+
+namespace OHOS {
+namespace DistributedSchedule {
+namespace Constants {
+namespace Adapter {
+constexpr int32_t PARCELABLE_FLAG = 1;
+constexpr int32_t VALUE_NULL = -1;
+constexpr int32_t VALUE_OBJECT = 1;
+} // Adapter
+} // Constants
+} // DistributedSchedule
+} // OHOS
+#endif
diff --git a/services/dtbschedmgr/include/adapter/dnetwork_adapter.h b/services/dtbschedmgr/include/adapter/dnetwork_adapter.h
old mode 100755
new mode 100644
index deb42afd..e1bc76aa
--- a/services/dtbschedmgr/include/adapter/dnetwork_adapter.h
+++ b/services/dtbschedmgr/include/adapter/dnetwork_adapter.h
@@ -38,7 +38,7 @@ public:
virtual void OnDeviceOnline(const NodeBasicInfo* nodeBasicInfo) = 0;
virtual void OnDeviceOffline(const NodeBasicInfo* nodeBasicInfo) = 0;
- virtual void OnDeviceInfoChanged(const std::string& nodeId, DeviceInfoType type) = 0;
+ virtual void OnDeviceInfoChanged(const std::string& networkId, DeviceInfoType type) = 0;
};
class DnetworkAdapter {
@@ -49,8 +49,8 @@ public:
void Init();
bool AddDeviceChangeListener(const std::shared_ptr& listener);
void RemoveDeviceChangeListener(const std::shared_ptr& listener);
- std::string GetUdidByNodeId(const std::string& nodeId);
- std::string GetUuidByNodeId(const std::string& nodeId);
+ std::string GetUdidByNetworkId(const std::string& networkId);
+ std::string GetUuidByNetworkId(const std::string& networkId);
std::shared_ptr GetLocalBasicInfo();
static std::string AnonymizeDeviceId(const std::string& deviceId);
@@ -59,7 +59,7 @@ public:
private:
DISALLOW_COPY_AND_MOVE(DnetworkAdapter);
- std::string GetUuidOrUdidByNodeId(const std::string& nodeId, NodeDeivceInfoKey keyType);
+ std::string GetUuidOrUdidByNetworkId(const std::string& networkId, NodeDeivceInfoKey keyType);
static void OnNodeOnline(NodeBasicInfo* info);
static void OnNodeOffline(NodeBasicInfo* info);
static void OnNodeBasicInfoChanged(NodeBasicInfoType type, NodeBasicInfo* info);
diff --git a/services/dtbschedmgr/include/caller_info.h b/services/dtbschedmgr/include/caller_info.h
index 3c25f966..fc28cf97 100644
--- a/services/dtbschedmgr/include/caller_info.h
+++ b/services/dtbschedmgr/include/caller_info.h
@@ -23,6 +23,10 @@ enum {
CALLER_TYPE_HARMONY = 1,
};
+enum {
+ VERSION_BASE = 200, // begin for 200 and step for 200
+ VERSION = VERSION_BASE,
+};
struct CallerInfo {
int32_t uid = -1;
int32_t pid = -1;
@@ -31,6 +35,7 @@ struct CallerInfo {
int32_t duid = -1;
std::string callerAppId;
std::vector bundleNames;
+ int32_t dmsVersion = -1;
};
} // namespace DistributedSchedule
} // namespace OHOS
diff --git a/services/dtbschedmgr/include/distributed_sched_ability_shell.h b/services/dtbschedmgr/include/distributed_sched_ability_shell.h
deleted file mode 100755
index 79ee0dc5..00000000
--- a/services/dtbschedmgr/include/distributed_sched_ability_shell.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2021 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.
- */
-
-#ifndef OHOS_DISTRIBUTED_SCHED_ABILITY_SHELL_H
-#define OHOS_DISTRIBUTED_SCHED_ABILITY_SHELL_H
-
-#include
-#include