mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-27 00:20:44 +00:00
!650 Fix the bug input error deviceId no catch error
Merge pull request !650 from hunili/master
This commit is contained in:
commit
4c93be95f2
20
CODEOWNERS
Normal file
20
CODEOWNERS
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ang change to common/include/dtbabilitymgr_ipc_interface_code.h needs to be reviewed by @leonchan5
|
||||||
|
common/include/dtbabilitymgr_ipc_interface_code.h @leonchan5
|
||||||
|
|
||||||
|
#ang change to common/include/distributed_ipc_interface_code.h needs to be reviewed by @leonchan5
|
||||||
|
common/include/distributed_ipc_interface_code.h @leonchan5
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -19,6 +19,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "continuation_result.h"
|
#include "continuation_result.h"
|
||||||
|
#include "dtbabilitymgr_ipc_interface_code.h"
|
||||||
#include "iremote_broker.h"
|
#include "iremote_broker.h"
|
||||||
|
|
||||||
namespace OHOS {
|
namespace OHOS {
|
||||||
@ -37,11 +38,6 @@ public:
|
|||||||
|
|
||||||
virtual void OnDeviceConnect(const std::vector<ContinuationResult>& continuationResults) = 0;
|
virtual void OnDeviceConnect(const std::vector<ContinuationResult>& continuationResults) = 0;
|
||||||
virtual void OnDeviceDisconnect(const std::vector<ContinuationResult>& continuationResults) = 0;
|
virtual void OnDeviceDisconnect(const std::vector<ContinuationResult>& continuationResults) = 0;
|
||||||
|
|
||||||
enum RequestCode {
|
|
||||||
EVENT_DEVICE_CONNECT = 1,
|
|
||||||
EVENT_DEVICE_DISCONNECT = 2,
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
} // namespace DistributedSchedule
|
} // namespace DistributedSchedule
|
||||||
} // namespace OHOS
|
} // namespace OHOS
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -19,6 +19,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "continuation_result.h"
|
#include "continuation_result.h"
|
||||||
|
#include "dtbabilitymgr_ipc_interface_code.h"
|
||||||
#include "iremote_broker.h"
|
#include "iremote_broker.h"
|
||||||
|
|
||||||
namespace OHOS {
|
namespace OHOS {
|
||||||
@ -33,12 +34,6 @@ public:
|
|||||||
virtual int32_t OnDeviceConnect(int32_t token, const std::vector<ContinuationResult>& continuationResults) = 0;
|
virtual int32_t OnDeviceConnect(int32_t token, const std::vector<ContinuationResult>& continuationResults) = 0;
|
||||||
virtual int32_t OnDeviceDisconnect(int32_t token, const std::vector<ContinuationResult>& continuationResults) = 0;
|
virtual int32_t OnDeviceDisconnect(int32_t token, const std::vector<ContinuationResult>& continuationResults) = 0;
|
||||||
virtual int32_t OnDeviceCancel() = 0;
|
virtual int32_t OnDeviceCancel() = 0;
|
||||||
|
|
||||||
enum RequestCode {
|
|
||||||
EVENT_DEVICE_CONNECT = 1,
|
|
||||||
EVENT_DEVICE_DISCONNECT = 2,
|
|
||||||
EVENT_DEVICE_CANCEL = 3,
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
} // namespace DistributedSchedule
|
} // namespace DistributedSchedule
|
||||||
} // namespace OHOS
|
} // namespace OHOS
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "continuation_extra_params.h"
|
#include "continuation_extra_params.h"
|
||||||
#include "continuation_result.h"
|
#include "continuation_result.h"
|
||||||
|
#include "dtbabilitymgr_ipc_interface_code.h"
|
||||||
#include "device_connect_status.h"
|
#include "device_connect_status.h"
|
||||||
#include "iremote_broker.h"
|
#include "iremote_broker.h"
|
||||||
|
|
||||||
@ -41,16 +42,6 @@ public:
|
|||||||
const DeviceConnectStatus& deviceConnectStatus) = 0;
|
const DeviceConnectStatus& deviceConnectStatus) = 0;
|
||||||
virtual int32_t StartDeviceManager(
|
virtual int32_t StartDeviceManager(
|
||||||
int32_t token, const std::shared_ptr<ContinuationExtraParams>& continuationExtraParams = nullptr) = 0;
|
int32_t token, const std::shared_ptr<ContinuationExtraParams>& continuationExtraParams = nullptr) = 0;
|
||||||
|
|
||||||
enum {
|
|
||||||
// request code for continuation manager
|
|
||||||
REGISTER = 500,
|
|
||||||
UNREGISTER = 501,
|
|
||||||
REGISTER_DEVICE_SELECTION_CALLBACK = 502,
|
|
||||||
UNREGISTER_DEVICE_SELECTION_CALLBACK = 503,
|
|
||||||
UPDATE_CONNECT_STATUS = 504,
|
|
||||||
START_DEVICE_MANAGER = 505,
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
} // namespace DistributedSchedule
|
} // namespace DistributedSchedule
|
||||||
} // namespace OHOS
|
} // namespace OHOS
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OHOS_DISTRIBUTED_DTBABILITYMGR_IPC_INTERFACE_CODE_H
|
||||||
|
#define OHOS_DISTRIBUTED_DTBABILITYMGR_IPC_INTERFACE_CODE_H
|
||||||
|
|
||||||
|
namespace OHOS {
|
||||||
|
namespace DistributedSchedule {
|
||||||
|
enum class IDAbilityManagerInterfaceCode : uint32_t {
|
||||||
|
// request code for continuation manager
|
||||||
|
REGISTER = 500,
|
||||||
|
UNREGISTER = 501,
|
||||||
|
REGISTER_DEVICE_SELECTION_CALLBACK = 502,
|
||||||
|
UNREGISTER_DEVICE_SELECTION_CALLBACK = 503,
|
||||||
|
UPDATE_CONNECT_STATUS = 504,
|
||||||
|
START_DEVICE_MANAGER = 505,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class IDRequestCallbackInterfaceCode : uint32_t {
|
||||||
|
EVENT_DEVICE_CONNECT = 1,
|
||||||
|
EVENT_DEVICE_DISCONNECT = 2,
|
||||||
|
EVENT_DEVICE_CANCEL = 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class IDRequestInterfaceCode {
|
||||||
|
EVENT_DEVICE_CONNECT = 1,
|
||||||
|
EVENT_DEVICE_DISCONNECT = 2,
|
||||||
|
};
|
||||||
|
} // namespace DistributedSchedule
|
||||||
|
} // namespace OHOS
|
||||||
|
#endif // OHOS_DISTRIBUTED_DTBABILITYMGR_IPC_INTERFACE_CODE_H
|
@ -41,7 +41,7 @@ int32_t AppDeviceCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel& dat
|
|||||||
}
|
}
|
||||||
int32_t token = -1;
|
int32_t token = -1;
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case AppDeviceCallbackInterface::EVENT_DEVICE_CONNECT: {
|
case static_cast<uint32_t>(IDRequestCallbackInterfaceCode::EVENT_DEVICE_CONNECT): {
|
||||||
PARCEL_READ_HELPER(data, Int32, token);
|
PARCEL_READ_HELPER(data, Int32, token);
|
||||||
std::vector<ContinuationResult> continuationResults;
|
std::vector<ContinuationResult> continuationResults;
|
||||||
if (!ContinuationResult::ReadContinuationResultsFromParcel(data, continuationResults)) {
|
if (!ContinuationResult::ReadContinuationResultsFromParcel(data, continuationResults)) {
|
||||||
@ -50,7 +50,7 @@ int32_t AppDeviceCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel& dat
|
|||||||
int32_t result = OnDeviceConnect(token, continuationResults);
|
int32_t result = OnDeviceConnect(token, continuationResults);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
case AppDeviceCallbackInterface::EVENT_DEVICE_DISCONNECT: {
|
case static_cast<uint32_t>(IDRequestCallbackInterfaceCode::EVENT_DEVICE_DISCONNECT): {
|
||||||
PARCEL_READ_HELPER(data, Int32, token);
|
PARCEL_READ_HELPER(data, Int32, token);
|
||||||
std::vector<ContinuationResult> continuationResults;
|
std::vector<ContinuationResult> continuationResults;
|
||||||
if (!ContinuationResult::ReadContinuationResultsFromParcel(data, continuationResults)) {
|
if (!ContinuationResult::ReadContinuationResultsFromParcel(data, continuationResults)) {
|
||||||
@ -59,7 +59,7 @@ int32_t AppDeviceCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel& dat
|
|||||||
int32_t result = OnDeviceDisconnect(token, continuationResults);
|
int32_t result = OnDeviceDisconnect(token, continuationResults);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
case AppDeviceCallbackInterface::EVENT_DEVICE_CANCEL: {
|
case static_cast<uint32_t>(IDRequestCallbackInterfaceCode::EVENT_DEVICE_CANCEL): {
|
||||||
int32_t result = OnDeviceCancel();
|
int32_t result = OnDeviceCancel();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,8 @@ void DeviceSelectionNotifierProxy::OnDeviceConnect(const std::vector<Continuatio
|
|||||||
if (!ContinuationResult::WriteContinuationResultsToParcel(data, continuationResults)) {
|
if (!ContinuationResult::WriteContinuationResultsToParcel(data, continuationResults)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int32_t errCode = Remote()->SendRequest(IDeviceSelectionNotifier::EVENT_DEVICE_CONNECT, data, reply, option);
|
int32_t errCode = Remote()->SendRequest(static_cast<uint32_t>
|
||||||
|
(IDRequestInterfaceCode::EVENT_DEVICE_CONNECT), data, reply, option);
|
||||||
HILOGD("result = %{public}d", errCode);
|
HILOGD("result = %{public}d", errCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +60,8 @@ void DeviceSelectionNotifierProxy::OnDeviceDisconnect(const std::vector<Continua
|
|||||||
if (!ContinuationResult::WriteContinuationResultsToParcel(data, continuationResults)) {
|
if (!ContinuationResult::WriteContinuationResultsToParcel(data, continuationResults)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int32_t errCode = Remote()->SendRequest(IDeviceSelectionNotifier::EVENT_DEVICE_DISCONNECT, data, reply, option);
|
int32_t errCode = Remote()->SendRequest(static_cast<uint32_t>
|
||||||
|
(IDRequestInterfaceCode::EVENT_DEVICE_DISCONNECT), data, reply, option);
|
||||||
HILOGD("result = %{public}d", errCode);
|
HILOGD("result = %{public}d", errCode);
|
||||||
}
|
}
|
||||||
} // namespace DistributedSchedule
|
} // namespace DistributedSchedule
|
||||||
|
@ -42,7 +42,7 @@ int32_t DeviceSelectionNotifierStub::OnRemoteRequest(uint32_t code, MessageParce
|
|||||||
return ERR_INVALID_VALUE;
|
return ERR_INVALID_VALUE;
|
||||||
}
|
}
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case IDeviceSelectionNotifier::EVENT_DEVICE_CONNECT: {
|
case static_cast<uint32_t>(IDRequestInterfaceCode::EVENT_DEVICE_CONNECT): {
|
||||||
std::vector<ContinuationResult> continuationResults;
|
std::vector<ContinuationResult> continuationResults;
|
||||||
if (!ContinuationResult::ReadContinuationResultsFromParcel(data, continuationResults)) {
|
if (!ContinuationResult::ReadContinuationResultsFromParcel(data, continuationResults)) {
|
||||||
return ERR_FLATTEN_OBJECT;
|
return ERR_FLATTEN_OBJECT;
|
||||||
@ -50,7 +50,7 @@ int32_t DeviceSelectionNotifierStub::OnRemoteRequest(uint32_t code, MessageParce
|
|||||||
int32_t result = OnDeviceConnectInner(continuationResults);
|
int32_t result = OnDeviceConnectInner(continuationResults);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
case IDeviceSelectionNotifier::EVENT_DEVICE_DISCONNECT: {
|
case static_cast<uint32_t>(IDRequestInterfaceCode::EVENT_DEVICE_DISCONNECT): {
|
||||||
std::vector<ContinuationResult> continuationResults;
|
std::vector<ContinuationResult> continuationResults;
|
||||||
if (!ContinuationResult::ReadContinuationResultsFromParcel(data, continuationResults)) {
|
if (!ContinuationResult::ReadContinuationResultsFromParcel(data, continuationResults)) {
|
||||||
return ERR_FLATTEN_OBJECT;
|
return ERR_FLATTEN_OBJECT;
|
||||||
|
@ -47,7 +47,8 @@ int32_t DistributedAbilityManagerProxy::Register(
|
|||||||
}
|
}
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
int32_t error = remote->SendRequest(REGISTER, data, reply, option);
|
int32_t error = remote->SendRequest(static_cast<uint32_t>(IDAbilityManagerInterfaceCode::REGISTER),
|
||||||
|
data, reply, option);
|
||||||
if (error != ERR_NONE) {
|
if (error != ERR_NONE) {
|
||||||
HILOGE("SendRequest error = %{public}d", error);
|
HILOGE("SendRequest error = %{public}d", error);
|
||||||
return error;
|
return error;
|
||||||
@ -75,7 +76,7 @@ int32_t DistributedAbilityManagerProxy::Unregister(int32_t token)
|
|||||||
}
|
}
|
||||||
PARCEL_WRITE_HELPER(data, Int32, token);
|
PARCEL_WRITE_HELPER(data, Int32, token);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, UNREGISTER, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDAbilityManagerInterfaceCode::UNREGISTER), data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedAbilityManagerProxy::RegisterDeviceSelectionCallback(
|
int32_t DistributedAbilityManagerProxy::RegisterDeviceSelectionCallback(
|
||||||
@ -104,7 +105,8 @@ int32_t DistributedAbilityManagerProxy::RegisterDeviceSelectionCallback(
|
|||||||
PARCEL_WRITE_HELPER(data, String, cbType);
|
PARCEL_WRITE_HELPER(data, String, cbType);
|
||||||
PARCEL_WRITE_HELPER(data, RemoteObject, notifier);
|
PARCEL_WRITE_HELPER(data, RemoteObject, notifier);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, REGISTER_DEVICE_SELECTION_CALLBACK, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>
|
||||||
|
(IDAbilityManagerInterfaceCode::REGISTER_DEVICE_SELECTION_CALLBACK), data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedAbilityManagerProxy::UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType)
|
int32_t DistributedAbilityManagerProxy::UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType)
|
||||||
@ -126,7 +128,8 @@ int32_t DistributedAbilityManagerProxy::UnregisterDeviceSelectionCallback(int32_
|
|||||||
PARCEL_WRITE_HELPER(data, Int32, token);
|
PARCEL_WRITE_HELPER(data, Int32, token);
|
||||||
PARCEL_WRITE_HELPER(data, String, cbType);
|
PARCEL_WRITE_HELPER(data, String, cbType);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, UNREGISTER_DEVICE_SELECTION_CALLBACK, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>
|
||||||
|
(IDAbilityManagerInterfaceCode::UNREGISTER_DEVICE_SELECTION_CALLBACK), data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedAbilityManagerProxy::UpdateConnectStatus(int32_t token, const std::string& deviceId,
|
int32_t DistributedAbilityManagerProxy::UpdateConnectStatus(int32_t token, const std::string& deviceId,
|
||||||
@ -146,7 +149,8 @@ int32_t DistributedAbilityManagerProxy::UpdateConnectStatus(int32_t token, const
|
|||||||
PARCEL_WRITE_HELPER(data, String, deviceId);
|
PARCEL_WRITE_HELPER(data, String, deviceId);
|
||||||
PARCEL_WRITE_HELPER(data, Int32, static_cast<int32_t>(deviceConnectStatus));
|
PARCEL_WRITE_HELPER(data, Int32, static_cast<int32_t>(deviceConnectStatus));
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, UPDATE_CONNECT_STATUS, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDAbilityManagerInterfaceCode::UPDATE_CONNECT_STATUS),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedAbilityManagerProxy::StartDeviceManager(
|
int32_t DistributedAbilityManagerProxy::StartDeviceManager(
|
||||||
@ -170,7 +174,8 @@ int32_t DistributedAbilityManagerProxy::StartDeviceManager(
|
|||||||
PARCEL_WRITE_HELPER(data, Parcelable, continuationExtraParams.get());
|
PARCEL_WRITE_HELPER(data, Parcelable, continuationExtraParams.get());
|
||||||
}
|
}
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, START_DEVICE_MANAGER, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDAbilityManagerInterfaceCode::START_DEVICE_MANAGER),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
} // namespace DistributedSchedule
|
} // namespace DistributedSchedule
|
||||||
} // namespace OHOS
|
} // namespace OHOS
|
@ -38,14 +38,18 @@ const std::string PERMISSION_DISTRIBUTED_DATASYNC = "ohos.permission.DISTRIBUTED
|
|||||||
|
|
||||||
DistributedAbilityManagerStub::DistributedAbilityManagerStub()
|
DistributedAbilityManagerStub::DistributedAbilityManagerStub()
|
||||||
{
|
{
|
||||||
funcsMap_[REGISTER] = &DistributedAbilityManagerStub::RegisterInner;
|
funcsMap_[static_cast<uint32_t>(IDAbilityManagerInterfaceCode::REGISTER)] =
|
||||||
funcsMap_[UNREGISTER] = &DistributedAbilityManagerStub::UnregisterInner;
|
&DistributedAbilityManagerStub::RegisterInner;
|
||||||
funcsMap_[REGISTER_DEVICE_SELECTION_CALLBACK] =
|
funcsMap_[static_cast<uint32_t>(IDAbilityManagerInterfaceCode::UNREGISTER)] =
|
||||||
|
&DistributedAbilityManagerStub::UnregisterInner;
|
||||||
|
funcsMap_[static_cast<uint32_t>(IDAbilityManagerInterfaceCode::REGISTER_DEVICE_SELECTION_CALLBACK)] =
|
||||||
&DistributedAbilityManagerStub::RegisterDeviceSelectionCallbackInner;
|
&DistributedAbilityManagerStub::RegisterDeviceSelectionCallbackInner;
|
||||||
funcsMap_[UNREGISTER_DEVICE_SELECTION_CALLBACK] =
|
funcsMap_[static_cast<uint32_t>(IDAbilityManagerInterfaceCode::UNREGISTER_DEVICE_SELECTION_CALLBACK)] =
|
||||||
&DistributedAbilityManagerStub::UnregisterDeviceSelectionCallbackInner;
|
&DistributedAbilityManagerStub::UnregisterDeviceSelectionCallbackInner;
|
||||||
funcsMap_[UPDATE_CONNECT_STATUS] = &DistributedAbilityManagerStub::UpdateConnectStatusInner;
|
funcsMap_[static_cast<uint32_t>(IDAbilityManagerInterfaceCode::UPDATE_CONNECT_STATUS)] =
|
||||||
funcsMap_[START_DEVICE_MANAGER] = &DistributedAbilityManagerStub::StartDeviceManagerInner;
|
&DistributedAbilityManagerStub::UpdateConnectStatusInner;
|
||||||
|
funcsMap_[static_cast<uint32_t>(IDAbilityManagerInterfaceCode::START_DEVICE_MANAGER)] =
|
||||||
|
&DistributedAbilityManagerStub::StartDeviceManagerInner;
|
||||||
}
|
}
|
||||||
|
|
||||||
DistributedAbilityManagerStub::~DistributedAbilityManagerStub()
|
DistributedAbilityManagerStub::~DistributedAbilityManagerStub()
|
||||||
|
@ -1629,8 +1629,8 @@ HWTEST_F(ContinuationManagerTest, OnRemoteRequest_001, TestSize.Level3)
|
|||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
DeviceSelectionNotifierTest deviceSelectionNotifierTest;
|
DeviceSelectionNotifierTest deviceSelectionNotifierTest;
|
||||||
int32_t result = deviceSelectionNotifierTest.OnRemoteRequest(IDeviceSelectionNotifier::EVENT_DEVICE_CONNECT,
|
int32_t result = deviceSelectionNotifierTest.OnRemoteRequest(static_cast<uint32_t>
|
||||||
data, reply, option);
|
(IDRequestInterfaceCode::EVENT_DEVICE_CONNECT), data, reply, option);
|
||||||
EXPECT_EQ(ERR_INVALID_VALUE, result);
|
EXPECT_EQ(ERR_INVALID_VALUE, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1683,8 +1683,8 @@ HWTEST_F(ContinuationManagerTest, OnRemoteRequest_003, TestSize.Level3)
|
|||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
DeviceSelectionNotifierTest deviceSelectionNotifierTest;
|
DeviceSelectionNotifierTest deviceSelectionNotifierTest;
|
||||||
int32_t result2 = deviceSelectionNotifierTest.OnRemoteRequest(IDeviceSelectionNotifier::EVENT_DEVICE_CONNECT,
|
int32_t result2 = deviceSelectionNotifierTest.OnRemoteRequest(static_cast<uint32_t>
|
||||||
data, reply, option);
|
(IDRequestInterfaceCode::EVENT_DEVICE_CONNECT), data, reply, option);
|
||||||
|
|
||||||
EXPECT_EQ(true, result1);
|
EXPECT_EQ(true, result1);
|
||||||
EXPECT_EQ(ERR_OK, result2);
|
EXPECT_EQ(ERR_OK, result2);
|
||||||
@ -1705,8 +1705,8 @@ HWTEST_F(ContinuationManagerTest, OnRemoteRequest_004, TestSize.Level3)
|
|||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
DeviceSelectionNotifierTest deviceSelectionNotifierTest;
|
DeviceSelectionNotifierTest deviceSelectionNotifierTest;
|
||||||
int32_t result = deviceSelectionNotifierTest.OnRemoteRequest(IDeviceSelectionNotifier::EVENT_DEVICE_DISCONNECT,
|
int32_t result = deviceSelectionNotifierTest.OnRemoteRequest(static_cast<uint32_t>
|
||||||
data, reply, option);
|
(IDRequestInterfaceCode::EVENT_DEVICE_DISCONNECT), data, reply, option);
|
||||||
EXPECT_EQ(ERR_INVALID_VALUE, result);
|
EXPECT_EQ(ERR_INVALID_VALUE, result);
|
||||||
/**
|
/**
|
||||||
* @tc.steps: step2. test OnRemoteDied when dmsNotifier_ == nullptr.
|
* @tc.steps: step2. test OnRemoteDied when dmsNotifier_ == nullptr.
|
||||||
@ -1747,8 +1747,8 @@ HWTEST_F(ContinuationManagerTest, OnRemoteRequest_005, TestSize.Level3)
|
|||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
DeviceSelectionNotifierTest deviceSelectionNotifierTest;
|
DeviceSelectionNotifierTest deviceSelectionNotifierTest;
|
||||||
int32_t result = deviceSelectionNotifierTest.OnRemoteRequest(IDeviceSelectionNotifier::EVENT_DEVICE_DISCONNECT,
|
int32_t result = deviceSelectionNotifierTest.OnRemoteRequest(static_cast<uint32_t>
|
||||||
data, reply, option);
|
(IDRequestInterfaceCode::EVENT_DEVICE_DISCONNECT), data, reply, option);
|
||||||
|
|
||||||
EXPECT_EQ(ERR_OK, result);
|
EXPECT_EQ(ERR_OK, result);
|
||||||
}
|
}
|
||||||
@ -1768,8 +1768,8 @@ HWTEST_F(ContinuationManagerTest, OnRemoteRequest_006, TestSize.Level3)
|
|||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
DeviceSelectionNotifierTest deviceSelectionNotifierTest;
|
DeviceSelectionNotifierTest deviceSelectionNotifierTest;
|
||||||
int32_t result = deviceSelectionNotifierTest.OnRemoteRequest(IDeviceSelectionNotifier::EVENT_DEVICE_CONNECT,
|
int32_t result = deviceSelectionNotifierTest.OnRemoteRequest(static_cast<uint32_t>
|
||||||
data, reply, option);
|
(IDRequestInterfaceCode::EVENT_DEVICE_CONNECT), data, reply, option);
|
||||||
EXPECT_EQ(ERR_FLATTEN_OBJECT, result);
|
EXPECT_EQ(ERR_FLATTEN_OBJECT, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1788,8 +1788,8 @@ HWTEST_F(ContinuationManagerTest, OnRemoteRequest_007, TestSize.Level3)
|
|||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
DeviceSelectionNotifierTest deviceSelectionNotifierTest;
|
DeviceSelectionNotifierTest deviceSelectionNotifierTest;
|
||||||
int32_t result = deviceSelectionNotifierTest.OnRemoteRequest(IDeviceSelectionNotifier::EVENT_DEVICE_DISCONNECT,
|
int32_t result = deviceSelectionNotifierTest.OnRemoteRequest(static_cast<uint32_t>
|
||||||
data, reply, option);
|
(IDRequestInterfaceCode::EVENT_DEVICE_DISCONNECT), data, reply, option);
|
||||||
EXPECT_EQ(ERR_FLATTEN_OBJECT, result);
|
EXPECT_EQ(ERR_FLATTEN_OBJECT, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1845,7 +1845,8 @@ HWTEST_F(ContinuationManagerTest, OnRemoteRequest_008, TestSize.Level3)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @tc.name: OnRemoteRequest_009
|
* @tc.name: OnRemoteRequest_009
|
||||||
* @tc.desc: test OnRemoteRequest when code = AppDeviceCallbackInterface::EVENT_DEVICE_CONNECT.
|
* @tc.desc: test OnRemoteRequest when code = static_cast<uint32_t>
|
||||||
|
* (IDRequestCallbackInterfaceCode::EVENT_DEVICE_CONNECT).
|
||||||
* @tc.type: FUNC
|
* @tc.type: FUNC
|
||||||
* @tc.require: I621C1
|
* @tc.require: I621C1
|
||||||
*/
|
*/
|
||||||
@ -1858,7 +1859,7 @@ HWTEST_F(ContinuationManagerTest, OnRemoteRequest_009, TestSize.Level3)
|
|||||||
data.WriteInterfaceToken(AppDeviceCallbackInterface::GetDescriptor());
|
data.WriteInterfaceToken(AppDeviceCallbackInterface::GetDescriptor());
|
||||||
data.WriteInt32(TEST_TOKEN);
|
data.WriteInt32(TEST_TOKEN);
|
||||||
int32_t ret = appDeviceCallbackStub.OnRemoteRequest(
|
int32_t ret = appDeviceCallbackStub.OnRemoteRequest(
|
||||||
AppDeviceCallbackInterface::EVENT_DEVICE_CONNECT, data, reply, option);
|
static_cast<uint32_t>(IDRequestCallbackInterfaceCode::EVENT_DEVICE_CONNECT), data, reply, option);
|
||||||
EXPECT_EQ(DISCONNECT_ABILITY_FAILED, ret);
|
EXPECT_EQ(DISCONNECT_ABILITY_FAILED, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1879,13 +1880,14 @@ HWTEST_F(ContinuationManagerTest, OnRemoteRequest_010, TestSize.Level3)
|
|||||||
data.WriteInt32(VALUE_OBJECT);
|
data.WriteInt32(VALUE_OBJECT);
|
||||||
data.WriteInt32(INVALID_LEN);
|
data.WriteInt32(INVALID_LEN);
|
||||||
int32_t ret = appDeviceCallbackStub.OnRemoteRequest(
|
int32_t ret = appDeviceCallbackStub.OnRemoteRequest(
|
||||||
AppDeviceCallbackInterface::EVENT_DEVICE_CONNECT, data, reply, option);
|
static_cast<uint32_t>(IDRequestCallbackInterfaceCode::EVENT_DEVICE_CONNECT), data, reply, option);
|
||||||
EXPECT_EQ(ERR_FLATTEN_OBJECT, ret);
|
EXPECT_EQ(ERR_FLATTEN_OBJECT, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @tc.name: OnRemoteRequest_011
|
* @tc.name: OnRemoteRequest_011
|
||||||
* @tc.desc: test OnRemoteRequest when code = AppDeviceCallbackInterface::EVENT_DEVICE_DISCONNECT.
|
* @tc.desc: test OnRemoteRequest when code = static_cast<uint32_t>
|
||||||
|
* (IDRequestCallbackInterfaceCode::EVENT_DEVICE_DISCONNECT).
|
||||||
* @tc.type: FUNC
|
* @tc.type: FUNC
|
||||||
* @tc.require: I621C1
|
* @tc.require: I621C1
|
||||||
*/
|
*/
|
||||||
@ -1898,7 +1900,7 @@ HWTEST_F(ContinuationManagerTest, OnRemoteRequest_011, TestSize.Level3)
|
|||||||
data.WriteInterfaceToken(AppDeviceCallbackInterface::GetDescriptor());
|
data.WriteInterfaceToken(AppDeviceCallbackInterface::GetDescriptor());
|
||||||
data.WriteInt32(TEST_TOKEN);
|
data.WriteInt32(TEST_TOKEN);
|
||||||
int32_t ret = appDeviceCallbackStub.OnRemoteRequest(
|
int32_t ret = appDeviceCallbackStub.OnRemoteRequest(
|
||||||
AppDeviceCallbackInterface::EVENT_DEVICE_DISCONNECT, data, reply, option);
|
static_cast<uint32_t>(IDRequestCallbackInterfaceCode::EVENT_DEVICE_DISCONNECT), data, reply, option);
|
||||||
EXPECT_EQ(DISCONNECT_ABILITY_FAILED, ret);
|
EXPECT_EQ(DISCONNECT_ABILITY_FAILED, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1919,13 +1921,14 @@ HWTEST_F(ContinuationManagerTest, OnRemoteRequest_012, TestSize.Level3)
|
|||||||
data.WriteInt32(VALUE_OBJECT);
|
data.WriteInt32(VALUE_OBJECT);
|
||||||
data.WriteInt32(INVALID_LEN);
|
data.WriteInt32(INVALID_LEN);
|
||||||
int32_t ret = appDeviceCallbackStub.OnRemoteRequest(
|
int32_t ret = appDeviceCallbackStub.OnRemoteRequest(
|
||||||
AppDeviceCallbackInterface::EVENT_DEVICE_DISCONNECT, data, reply, option);
|
static_cast<uint32_t>(IDRequestCallbackInterfaceCode::EVENT_DEVICE_DISCONNECT), data, reply, option);
|
||||||
EXPECT_EQ(ERR_FLATTEN_OBJECT, ret);
|
EXPECT_EQ(ERR_FLATTEN_OBJECT, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @tc.name: OnRemoteRequest_013
|
* @tc.name: OnRemoteRequest_013
|
||||||
* @tc.desc: test OnRemoteRequest when code = AppDeviceCallbackInterface::EVENT_DEVICE_CANCEL.
|
* @tc.desc: test OnRemoteRequest when code = static_cast<uint32_t>
|
||||||
|
* (IDRequestCallbackInterfaceCode::EVENT_DEVICE_CANCEL).
|
||||||
* @tc.type: FUNC
|
* @tc.type: FUNC
|
||||||
* @tc.require: I621C1
|
* @tc.require: I621C1
|
||||||
*/
|
*/
|
||||||
@ -1937,7 +1940,7 @@ HWTEST_F(ContinuationManagerTest, OnRemoteRequest_013, TestSize.Level3)
|
|||||||
MessageOption option;
|
MessageOption option;
|
||||||
data.WriteInterfaceToken(AppDeviceCallbackInterface::GetDescriptor());
|
data.WriteInterfaceToken(AppDeviceCallbackInterface::GetDescriptor());
|
||||||
int32_t ret = appDeviceCallbackStub.OnRemoteRequest(
|
int32_t ret = appDeviceCallbackStub.OnRemoteRequest(
|
||||||
AppDeviceCallbackInterface::EVENT_DEVICE_CANCEL, data, reply, option);
|
static_cast<uint32_t>(IDRequestCallbackInterfaceCode::EVENT_DEVICE_CANCEL), data, reply, option);
|
||||||
EXPECT_EQ(DISCONNECT_ABILITY_FAILED, ret);
|
EXPECT_EQ(DISCONNECT_ABILITY_FAILED, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -16,6 +16,7 @@
|
|||||||
#ifndef OHOS_DISTRIBUTED_BUNDLE_MANANGER_CALLBACK_INTERFACE_H
|
#ifndef OHOS_DISTRIBUTED_BUNDLE_MANANGER_CALLBACK_INTERFACE_H
|
||||||
#define OHOS_DISTRIBUTED_BUNDLE_MANANGER_CALLBACK_INTERFACE_H
|
#define OHOS_DISTRIBUTED_BUNDLE_MANANGER_CALLBACK_INTERFACE_H
|
||||||
|
|
||||||
|
#include "distributedsched_ipc_interface_code.h"
|
||||||
#include <iremote_broker.h>
|
#include <iremote_broker.h>
|
||||||
|
|
||||||
namespace OHOS {
|
namespace OHOS {
|
||||||
@ -27,11 +28,6 @@ namespace DistributedSchedule {
|
|||||||
class IDmsBundleManagerCallback : public IRemoteBroker {
|
class IDmsBundleManagerCallback : public IRemoteBroker {
|
||||||
public:
|
public:
|
||||||
DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedSchedule.IDmsBundleManagerCallback");
|
DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedSchedule.IDmsBundleManagerCallback");
|
||||||
|
|
||||||
protected:
|
|
||||||
enum IDmsBundleManagerCallbackCmd {
|
|
||||||
ON_QUERY_INSTALLATION_DONE = 1,
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
} // namespace DistributedSchedule
|
} // namespace DistributedSchedule
|
||||||
} // namespace OHOS
|
} // namespace OHOS
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "ability_info.h"
|
#include "ability_info.h"
|
||||||
#include "ability_manager_interface.h"
|
#include "ability_manager_interface.h"
|
||||||
#include "caller_info.h"
|
#include "caller_info.h"
|
||||||
|
#include "distributedsched_ipc_interface_code.h"
|
||||||
#ifdef SUPPORT_DISTRIBUTED_FORM_SHARE
|
#ifdef SUPPORT_DISTRIBUTED_FORM_SHARE
|
||||||
#include "form_share_info.h"
|
#include "form_share_info.h"
|
||||||
#endif
|
#endif
|
||||||
@ -144,72 +145,6 @@ public:
|
|||||||
const OHOS::AAFwk::Want& want, int32_t callerUid, uint32_t accessToken, int32_t extensionType) = 0;
|
const OHOS::AAFwk::Want& want, int32_t callerUid, uint32_t accessToken, int32_t extensionType) = 0;
|
||||||
virtual int32_t StopExtensionAbilityFromRemote(const OHOS::AAFwk::Want& want,
|
virtual int32_t StopExtensionAbilityFromRemote(const OHOS::AAFwk::Want& want,
|
||||||
const CallerInfo& callerInfo, const AccountInfo& accountInfo, int32_t extensionType) = 0;
|
const CallerInfo& callerInfo, const AccountInfo& accountInfo, int32_t extensionType) = 0;
|
||||||
|
|
||||||
enum {
|
|
||||||
START_REMOTE_ABILITY = 1,
|
|
||||||
STOP_REMOTE_ABILITY = 3,
|
|
||||||
START_ABILITY_FROM_REMOTE = 4,
|
|
||||||
STOP_ABILITY_FROM_REMOTE = 5,
|
|
||||||
CONNECT_REMOTE_ABILITY = 6,
|
|
||||||
DISCONNECT_REMOTE_ABILITY = 7,
|
|
||||||
CONNECT_ABILITY_FROM_REMOTE = 8,
|
|
||||||
DISCONNECT_ABILITY_FROM_REMOTE = 9,
|
|
||||||
START_CONTINUATION = 11,
|
|
||||||
NOTIFY_COMPLETE_CONTINUATION = 12,
|
|
||||||
NOTIFY_CONTINUATION_RESULT_FROM_REMOTE = 13,
|
|
||||||
REGISTER_ABILITY_TOKEN = 14,
|
|
||||||
UNREGISTER_ABILITY_TOKEN = 15,
|
|
||||||
CONTINUE_ABILITY = 16,
|
|
||||||
NOTIFY_PROCESS_DIED_FROM_REMOTE = 17,
|
|
||||||
SEND_RESULT_FROM_REMOTE = 20,
|
|
||||||
GET_REMOTE_APPTHREAD = 35,
|
|
||||||
CONTINUE_MISSION = 36,
|
|
||||||
CONTINUE_MISSION_OF_BUNDLENAME = 37,
|
|
||||||
|
|
||||||
// requeset code for free install
|
|
||||||
START_FREE_INSTALL_FROM_REMOTE = 51,
|
|
||||||
NOTIFY_COMPLETE_FREE_INSTALL_FROM_REMOTE = 52,
|
|
||||||
|
|
||||||
// request code for mission
|
|
||||||
GET_MISSION_INFOS = 80,
|
|
||||||
REGISTER_MISSION_LISTENER = 84,
|
|
||||||
UNREGISTER_MISSION_LISTENER = 85,
|
|
||||||
START_SYNC_MISSIONS_FROM_REMOTE = 86,
|
|
||||||
STOP_SYNC_MISSIONS_FROM_REMOTE = 87,
|
|
||||||
CHECK_SUPPORTED_OSD = 88,
|
|
||||||
CHECK_SUPPORT_OSD_FROM_REMOTE = 89,
|
|
||||||
MISSION_CHANGED = 90,
|
|
||||||
NOTIFY_MISSIONS_CHANGED_FROM_REMOTE = 91,
|
|
||||||
START_SYNC_MISSIONS = 92,
|
|
||||||
TRY_OPENP2PSESSION_FROM_REMOTE = 93,
|
|
||||||
SWITCH_CHANGED = 94,
|
|
||||||
NOTIFY_SWITCH_CHANGED_FROM_REMOTE = 95,
|
|
||||||
GET_CACHED_SUPPORTED_OSD = 96,
|
|
||||||
ALL_CONNECT_TO_DMS = 97,
|
|
||||||
STOP_SYNC_MISSIONS = 98,
|
|
||||||
GET_REMOTE_MISSION_SNAPSHOT_INFO = 99,
|
|
||||||
|
|
||||||
// request code for call ability
|
|
||||||
START_REMOTE_ABILITY_BY_CALL = 150,
|
|
||||||
RELEASE_REMOTE_ABILITY = 151,
|
|
||||||
START_ABILITY_BY_CALL_FROM_REMOTE = 152,
|
|
||||||
RELEASE_ABILITY_FROM_REMOTE = 153,
|
|
||||||
NOTIFY_STATE_CHANGED_FROM_REMOTE = 154,
|
|
||||||
|
|
||||||
START_REMOTE_FREE_INSTALL = 200,
|
|
||||||
// request code for upload distributed component info
|
|
||||||
GET_DISTRIBUTED_COMPONENT_LIST = 161,
|
|
||||||
|
|
||||||
// form share
|
|
||||||
START_REMOTE_SHARE_FORM = 220,
|
|
||||||
START_SHARE_FORM_FROM_REMOTE = 221,
|
|
||||||
|
|
||||||
// stop externsion ability
|
|
||||||
STOP_REMOTE_EXTERNSION_ABILITY = 225,
|
|
||||||
STOP_EXTERNSION_ABILITY_FROM_REMOTE = 226,
|
|
||||||
REGISTER_ON_LISTENER = 260,
|
|
||||||
REGISTER_OFF_LISTENER = 261,
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
} // namespace DistributedSchedule
|
} // namespace DistributedSchedule
|
||||||
} // namespace OHOS
|
} // namespace OHOS
|
||||||
|
@ -0,0 +1,98 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OHOS_DISTRIBUTED_DISTRIBUTEDSCHED_IPC_INTERFACE_CODE_H
|
||||||
|
#define OHOS_DISTRIBUTED_DISTRIBUTEDSCHED_IPC_INTERFACE_CODE_H
|
||||||
|
|
||||||
|
namespace OHOS {
|
||||||
|
namespace DistributedSchedule {
|
||||||
|
/* SAID: 1401 */
|
||||||
|
enum class IDSchedInterfaceCode : uint32_t {
|
||||||
|
START_REMOTE_ABILITY = 1,
|
||||||
|
STOP_REMOTE_ABILITY = 3,
|
||||||
|
START_ABILITY_FROM_REMOTE = 4,
|
||||||
|
STOP_ABILITY_FROM_REMOTE = 5,
|
||||||
|
CONNECT_REMOTE_ABILITY = 6,
|
||||||
|
DISCONNECT_REMOTE_ABILITY = 7,
|
||||||
|
CONNECT_ABILITY_FROM_REMOTE = 8,
|
||||||
|
DISCONNECT_ABILITY_FROM_REMOTE = 9,
|
||||||
|
START_CONTINUATION = 11,
|
||||||
|
NOTIFY_COMPLETE_CONTINUATION = 12,
|
||||||
|
NOTIFY_CONTINUATION_RESULT_FROM_REMOTE = 13,
|
||||||
|
REGISTER_ABILITY_TOKEN = 14,
|
||||||
|
UNREGISTER_ABILITY_TOKEN = 15,
|
||||||
|
CONTINUE_ABILITY = 16,
|
||||||
|
NOTIFY_PROCESS_DIED_FROM_REMOTE = 17,
|
||||||
|
SEND_RESULT_FROM_REMOTE = 20,
|
||||||
|
GET_REMOTE_APPTHREAD = 35,
|
||||||
|
CONTINUE_MISSION = 36,
|
||||||
|
CONTINUE_MISSION_OF_BUNDLENAME = 37,
|
||||||
|
|
||||||
|
// requeset code for free install
|
||||||
|
START_FREE_INSTALL_FROM_REMOTE = 51,
|
||||||
|
NOTIFY_COMPLETE_FREE_INSTALL_FROM_REMOTE = 52,
|
||||||
|
|
||||||
|
// request code for mission
|
||||||
|
GET_MISSION_INFOS = 80,
|
||||||
|
REGISTER_MISSION_LISTENER = 84,
|
||||||
|
UNREGISTER_MISSION_LISTENER = 85,
|
||||||
|
START_SYNC_MISSIONS_FROM_REMOTE = 86,
|
||||||
|
STOP_SYNC_MISSIONS_FROM_REMOTE = 87,
|
||||||
|
CHECK_SUPPORTED_OSD = 88,
|
||||||
|
CHECK_SUPPORT_OSD_FROM_REMOTE = 89,
|
||||||
|
MISSION_CHANGED = 90,
|
||||||
|
NOTIFY_MISSIONS_CHANGED_FROM_REMOTE = 91,
|
||||||
|
START_SYNC_MISSIONS = 92,
|
||||||
|
TRY_OPENP2PSESSION_FROM_REMOTE = 93,
|
||||||
|
SWITCH_CHANGED = 94,
|
||||||
|
NOTIFY_SWITCH_CHANGED_FROM_REMOTE = 95,
|
||||||
|
GET_CACHED_SUPPORTED_OSD = 96,
|
||||||
|
ALL_CONNECT_TO_DMS = 97,
|
||||||
|
STOP_SYNC_MISSIONS = 98,
|
||||||
|
GET_REMOTE_MISSION_SNAPSHOT_INFO = 99,
|
||||||
|
|
||||||
|
// request code for call ability
|
||||||
|
START_REMOTE_ABILITY_BY_CALL = 150,
|
||||||
|
RELEASE_REMOTE_ABILITY = 151,
|
||||||
|
START_ABILITY_BY_CALL_FROM_REMOTE = 152,
|
||||||
|
RELEASE_ABILITY_FROM_REMOTE = 153,
|
||||||
|
NOTIFY_STATE_CHANGED_FROM_REMOTE = 154,
|
||||||
|
|
||||||
|
// request code for upload distributed component info
|
||||||
|
GET_DISTRIBUTED_COMPONENT_LIST = 161,
|
||||||
|
|
||||||
|
START_REMOTE_FREE_INSTALL = 200,
|
||||||
|
// form share
|
||||||
|
START_REMOTE_SHARE_FORM = 220,
|
||||||
|
START_SHARE_FORM_FROM_REMOTE = 221,
|
||||||
|
|
||||||
|
// stop externsion ability
|
||||||
|
STOP_REMOTE_EXTERNSION_ABILITY = 225,
|
||||||
|
STOP_EXTERNSION_ABILITY_FROM_REMOTE = 226,
|
||||||
|
REGISTER_ON_LISTENER = 260,
|
||||||
|
REGISTER_OFF_LISTENER = 261,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class IDRreeInstallCallbackInterfaceCode : uint32_t {
|
||||||
|
ON_FREE_INSTALL_DONE = 0,
|
||||||
|
CMD_MAX,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class IDBundleManagerCallbackInterfaceCod {
|
||||||
|
ON_QUERY_INSTALLATION_DONE = 1,
|
||||||
|
};
|
||||||
|
} // namespace DistributedSchedule
|
||||||
|
} // namespace OHOS
|
||||||
|
#endif // OHOS_DISTRIBUTED_DISTRIBUTEDSCHED_IPC_INTERFACE_CODE_H
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -16,6 +16,7 @@
|
|||||||
#ifndef OHOS_DMS_FREE_INSTALL_CALLBACK_INTERFACE_H
|
#ifndef OHOS_DMS_FREE_INSTALL_CALLBACK_INTERFACE_H
|
||||||
#define OHOS_DMS_FREE_INSTALL_CALLBACK_INTERFACE_H
|
#define OHOS_DMS_FREE_INSTALL_CALLBACK_INTERFACE_H
|
||||||
|
|
||||||
|
#include "distributedsched_ipc_interface_code.h"
|
||||||
#include <iremote_broker.h>
|
#include <iremote_broker.h>
|
||||||
#include "want.h"
|
#include "want.h"
|
||||||
|
|
||||||
@ -37,12 +38,6 @@ public:
|
|||||||
* @param resultCode, ERR_OK on success, others on failure.
|
* @param resultCode, ERR_OK on success, others on failure.
|
||||||
*/
|
*/
|
||||||
virtual void OnInstallFinished(const AAFwk::Want& want, int32_t requestCode, int32_t resultCode) = 0;
|
virtual void OnInstallFinished(const AAFwk::Want& want, int32_t requestCode, int32_t resultCode) = 0;
|
||||||
|
|
||||||
protected:
|
|
||||||
enum IDmsFreeInstallCallbackCmd {
|
|
||||||
ON_FREE_INSTALL_DONE = 0,
|
|
||||||
CMD_MAX,
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
} // namespace DistributedSchedule
|
} // namespace DistributedSchedule
|
||||||
} // namespace OHOS
|
} // namespace OHOS
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -43,7 +43,6 @@ public:
|
|||||||
virtual void OnInstallFinished(const OHOS::AAFwk::Want& want, int32_t requestCode, int32_t resultCode) override;
|
virtual void OnInstallFinished(const OHOS::AAFwk::Want& want, int32_t requestCode, int32_t resultCode) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SendRequestCommon(int32_t errcode, IDmsFreeInstallCallback::IDmsFreeInstallCallbackCmd cmd);
|
|
||||||
static inline BrokerDelegator<DmsFreeInstallCallbackProxy> delegator_;
|
static inline BrokerDelegator<DmsFreeInstallCallbackProxy> delegator_;
|
||||||
};
|
};
|
||||||
} // namespace DistributedSchedule
|
} // namespace DistributedSchedule
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -30,7 +30,7 @@ constexpr int64_t CONTINUATION_FREE_INSTALL_TIMEOUT = 50000; // 50s
|
|||||||
|
|
||||||
DmsBundleManagerCallbackStub::DmsBundleManagerCallbackStub()
|
DmsBundleManagerCallbackStub::DmsBundleManagerCallbackStub()
|
||||||
{
|
{
|
||||||
memberFuncMap_[IDmsBundleManagerCallbackCmd::ON_QUERY_INSTALLATION_DONE] =
|
memberFuncMap_[static_cast<uint32_t>(IDBundleManagerCallbackInterfaceCod::ON_QUERY_INSTALLATION_DONE)] =
|
||||||
&DmsBundleManagerCallbackStub::OnQueryInstallationFinishedInner;
|
&DmsBundleManagerCallbackStub::OnQueryInstallationFinishedInner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,21 +53,19 @@ const int DEFAULT_DEVICE_SECURITY_LEVEL = -1;
|
|||||||
IMPLEMENT_SINGLE_INSTANCE(DistributedSchedPermission);
|
IMPLEMENT_SINGLE_INSTANCE(DistributedSchedPermission);
|
||||||
void from_json(const nlohmann::json& jsonObject, GroupInfo& groupInfo)
|
void from_json(const nlohmann::json& jsonObject, GroupInfo& groupInfo)
|
||||||
{
|
{
|
||||||
if (jsonObject.find(FIELD_GROUP_NAME) != jsonObject.end() && jsonObject[FIELD_GROUP_NAME].is_string()) {
|
if (jsonObject.find(FIELD_GROUP_NAME) != jsonObject.end()) {
|
||||||
jsonObject.at(FIELD_GROUP_NAME).get_to(groupInfo.groupName);
|
jsonObject.at(FIELD_GROUP_NAME).get_to(groupInfo.groupName);
|
||||||
}
|
}
|
||||||
if (jsonObject.find(FIELD_GROUP_ID) != jsonObject.end() && jsonObject[FIELD_GROUP_ID].is_string()) {
|
if (jsonObject.find(FIELD_GROUP_ID) != jsonObject.end()) {
|
||||||
jsonObject.at(FIELD_GROUP_ID).get_to(groupInfo.groupId);
|
jsonObject.at(FIELD_GROUP_ID).get_to(groupInfo.groupId);
|
||||||
}
|
}
|
||||||
if (jsonObject.find(FIELD_GROUP_OWNER) != jsonObject.end() && jsonObject[FIELD_GROUP_OWNER].is_string()) {
|
if (jsonObject.find(FIELD_GROUP_OWNER) != jsonObject.end()) {
|
||||||
jsonObject.at(FIELD_GROUP_OWNER).get_to(groupInfo.groupOwner);
|
jsonObject.at(FIELD_GROUP_OWNER).get_to(groupInfo.groupOwner);
|
||||||
}
|
}
|
||||||
if (jsonObject.find(FIELD_GROUP_TYPE) != jsonObject.end() &&
|
if (jsonObject.find(FIELD_GROUP_TYPE) != jsonObject.end()) {
|
||||||
jsonObject[FIELD_GROUP_TYPE].is_number_integer()) {
|
|
||||||
jsonObject.at(FIELD_GROUP_TYPE).get_to(groupInfo.groupType);
|
jsonObject.at(FIELD_GROUP_TYPE).get_to(groupInfo.groupType);
|
||||||
}
|
}
|
||||||
if (jsonObject.find(FIELD_GROUP_VISIBILITY) != jsonObject.end() &&
|
if (jsonObject.find(FIELD_GROUP_VISIBILITY) != jsonObject.end()) {
|
||||||
jsonObject[FIELD_GROUP_VISIBILITY].is_number_integer()) {
|
|
||||||
jsonObject.at(FIELD_GROUP_VISIBILITY).get_to(groupInfo.groupVisibility);
|
jsonObject.at(FIELD_GROUP_VISIBILITY).get_to(groupInfo.groupVisibility);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,8 @@ int32_t DistributedSchedProxy::StartRemoteAbility(const OHOS::AAFwk::Want& want,
|
|||||||
PARCEL_WRITE_HELPER(data, Int32, requestCode);
|
PARCEL_WRITE_HELPER(data, Int32, requestCode);
|
||||||
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, START_REMOTE_ABILITY, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_ABILITY),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::StartAbilityFromRemote(const OHOS::AAFwk::Want& want,
|
int32_t DistributedSchedProxy::StartAbilityFromRemote(const OHOS::AAFwk::Want& want,
|
||||||
@ -94,7 +95,8 @@ int32_t DistributedSchedProxy::StartAbilityFromRemote(const OHOS::AAFwk::Want& w
|
|||||||
PARCEL_WRITE_HELPER(data, String, extraInfo);
|
PARCEL_WRITE_HELPER(data, String, extraInfo);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
HITRACE_METER_NAME(TraceTag::DSCHED, TraceValue::REMOTE_PROCEDURE_CALL);
|
HITRACE_METER_NAME(TraceTag::DSCHED, TraceValue::REMOTE_PROCEDURE_CALL);
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, START_ABILITY_FROM_REMOTE, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::START_ABILITY_FROM_REMOTE),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::SendResultFromRemote(OHOS::AAFwk::Want& want, int32_t requestCode,
|
int32_t DistributedSchedProxy::SendResultFromRemote(OHOS::AAFwk::Want& want, int32_t requestCode,
|
||||||
@ -121,7 +123,8 @@ int32_t DistributedSchedProxy::SendResultFromRemote(OHOS::AAFwk::Want& want, int
|
|||||||
std::string extraInfo = callerInfo.extraInfoJson.dump();
|
std::string extraInfo = callerInfo.extraInfoJson.dump();
|
||||||
PARCEL_WRITE_HELPER(data, String, extraInfo);
|
PARCEL_WRITE_HELPER(data, String, extraInfo);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, SEND_RESULT_FROM_REMOTE, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::SEND_RESULT_FROM_REMOTE),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::ContinueMission(const std::string& srcDeviceId, const std::string& dstDeviceId,
|
int32_t DistributedSchedProxy::ContinueMission(const std::string& srcDeviceId, const std::string& dstDeviceId,
|
||||||
@ -146,7 +149,7 @@ int32_t DistributedSchedProxy::ContinueMission(const std::string& srcDeviceId, c
|
|||||||
PARCEL_WRITE_HELPER(data, RemoteObject, callback);
|
PARCEL_WRITE_HELPER(data, RemoteObject, callback);
|
||||||
PARCEL_WRITE_HELPER(data, Parcelable, &wantParams);
|
PARCEL_WRITE_HELPER(data, Parcelable, &wantParams);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, CONTINUE_MISSION, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::CONTINUE_MISSION), data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::ContinueMission(const std::string& srcDeviceId, const std::string& dstDeviceId,
|
int32_t DistributedSchedProxy::ContinueMission(const std::string& srcDeviceId, const std::string& dstDeviceId,
|
||||||
@ -171,7 +174,8 @@ int32_t DistributedSchedProxy::ContinueMission(const std::string& srcDeviceId, c
|
|||||||
PARCEL_WRITE_HELPER(data, RemoteObject, callback);
|
PARCEL_WRITE_HELPER(data, RemoteObject, callback);
|
||||||
PARCEL_WRITE_HELPER(data, Parcelable, &wantParams);
|
PARCEL_WRITE_HELPER(data, Parcelable, &wantParams);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, CONTINUE_MISSION_OF_BUNDLENAME, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::CONTINUE_MISSION_OF_BUNDLENAME),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::StartContinuation(const OHOS::AAFwk::Want& want, int32_t missionId, int32_t callerUid,
|
int32_t DistributedSchedProxy::StartContinuation(const OHOS::AAFwk::Want& want, int32_t missionId, int32_t callerUid,
|
||||||
@ -192,7 +196,7 @@ int32_t DistributedSchedProxy::StartContinuation(const OHOS::AAFwk::Want& want,
|
|||||||
PARCEL_WRITE_HELPER(data, Int32, status);
|
PARCEL_WRITE_HELPER(data, Int32, status);
|
||||||
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, START_CONTINUATION, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::START_CONTINUATION), data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DistributedSchedProxy::NotifyCompleteContinuation(const std::u16string& devId, int32_t sessionId, bool isSuccess)
|
void DistributedSchedProxy::NotifyCompleteContinuation(const std::u16string& devId, int32_t sessionId, bool isSuccess)
|
||||||
@ -210,7 +214,8 @@ void DistributedSchedProxy::NotifyCompleteContinuation(const std::u16string& dev
|
|||||||
PARCEL_WRITE_HELPER_NORET(data, Int32, sessionId);
|
PARCEL_WRITE_HELPER_NORET(data, Int32, sessionId);
|
||||||
PARCEL_WRITE_HELPER_NORET(data, Bool, isSuccess);
|
PARCEL_WRITE_HELPER_NORET(data, Bool, isSuccess);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_NORET(remote, NOTIFY_COMPLETE_CONTINUATION, data, reply);
|
PARCEL_TRANSACT_SYNC_NORET(remote, static_cast<uint32_t>(IDSchedInterfaceCode::NOTIFY_COMPLETE_CONTINUATION),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::NotifyContinuationResultFromRemote(int32_t sessionId, bool isSuccess)
|
int32_t DistributedSchedProxy::NotifyContinuationResultFromRemote(int32_t sessionId, bool isSuccess)
|
||||||
@ -227,7 +232,8 @@ int32_t DistributedSchedProxy::NotifyContinuationResultFromRemote(int32_t sessio
|
|||||||
PARCEL_WRITE_HELPER(data, Int32, sessionId);
|
PARCEL_WRITE_HELPER(data, Int32, sessionId);
|
||||||
PARCEL_WRITE_HELPER(data, Bool, isSuccess);
|
PARCEL_WRITE_HELPER(data, Bool, isSuccess);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, NOTIFY_CONTINUATION_RESULT_FROM_REMOTE, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>
|
||||||
|
(IDSchedInterfaceCode::NOTIFY_CONTINUATION_RESULT_FROM_REMOTE), data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::ConnectRemoteAbility(const OHOS::AAFwk::Want& want, const sptr<IRemoteObject>& connect,
|
int32_t DistributedSchedProxy::ConnectRemoteAbility(const OHOS::AAFwk::Want& want, const sptr<IRemoteObject>& connect,
|
||||||
@ -253,7 +259,8 @@ int32_t DistributedSchedProxy::ConnectRemoteAbility(const OHOS::AAFwk::Want& wan
|
|||||||
PARCEL_WRITE_HELPER(data, Int32, callerPid);
|
PARCEL_WRITE_HELPER(data, Int32, callerPid);
|
||||||
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, CONNECT_REMOTE_ABILITY, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::CONNECT_REMOTE_ABILITY),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::DisconnectRemoteAbility(const sptr<IRemoteObject>& connect, int32_t callerUid,
|
int32_t DistributedSchedProxy::DisconnectRemoteAbility(const sptr<IRemoteObject>& connect, int32_t callerUid,
|
||||||
@ -277,7 +284,8 @@ int32_t DistributedSchedProxy::DisconnectRemoteAbility(const sptr<IRemoteObject>
|
|||||||
PARCEL_WRITE_HELPER(data, Int32, callerUid);
|
PARCEL_WRITE_HELPER(data, Int32, callerUid);
|
||||||
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, DISCONNECT_REMOTE_ABILITY, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::DISCONNECT_REMOTE_ABILITY),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::ConnectAbilityFromRemote(const OHOS::AAFwk::Want& want,
|
int32_t DistributedSchedProxy::ConnectAbilityFromRemote(const OHOS::AAFwk::Want& want,
|
||||||
@ -319,7 +327,8 @@ int32_t DistributedSchedProxy::ConnectAbilityFromRemote(const OHOS::AAFwk::Want&
|
|||||||
PARCEL_WRITE_HELPER(data, String, extraInfo);
|
PARCEL_WRITE_HELPER(data, String, extraInfo);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
HITRACE_METER_NAME(TraceTag::DSCHED, TraceValue::REMOTE_PROCEDURE_CALL);
|
HITRACE_METER_NAME(TraceTag::DSCHED, TraceValue::REMOTE_PROCEDURE_CALL);
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, CONNECT_ABILITY_FROM_REMOTE, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::CONNECT_ABILITY_FROM_REMOTE),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::DisconnectAbilityFromRemote(const sptr<IRemoteObject>& connect,
|
int32_t DistributedSchedProxy::DisconnectAbilityFromRemote(const sptr<IRemoteObject>& connect,
|
||||||
@ -344,7 +353,8 @@ int32_t DistributedSchedProxy::DisconnectAbilityFromRemote(const sptr<IRemoteObj
|
|||||||
PARCEL_WRITE_HELPER(data, String, sourceDeviceId);
|
PARCEL_WRITE_HELPER(data, String, sourceDeviceId);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
HITRACE_METER_NAME(TraceTag::DSCHED, TraceValue::REMOTE_PROCEDURE_CALL);
|
HITRACE_METER_NAME(TraceTag::DSCHED, TraceValue::REMOTE_PROCEDURE_CALL);
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, DISCONNECT_ABILITY_FROM_REMOTE, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::DISCONNECT_ABILITY_FROM_REMOTE),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::NotifyProcessDiedFromRemote(const CallerInfo& callerInfo)
|
int32_t DistributedSchedProxy::NotifyProcessDiedFromRemote(const CallerInfo& callerInfo)
|
||||||
@ -363,7 +373,8 @@ int32_t DistributedSchedProxy::NotifyProcessDiedFromRemote(const CallerInfo& cal
|
|||||||
PARCEL_WRITE_HELPER(data, Int32, callerInfo.pid);
|
PARCEL_WRITE_HELPER(data, Int32, callerInfo.pid);
|
||||||
PARCEL_WRITE_HELPER(data, String, callerInfo.sourceDeviceId);
|
PARCEL_WRITE_HELPER(data, String, callerInfo.sourceDeviceId);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, NOTIFY_PROCESS_DIED_FROM_REMOTE, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::NOTIFY_PROCESS_DIED_FROM_REMOTE),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SUPPORT_DISTRIBUTED_MISSION_MANAGER
|
#ifdef SUPPORT_DISTRIBUTED_MISSION_MANAGER
|
||||||
@ -384,7 +395,7 @@ int32_t DistributedSchedProxy::StartSyncRemoteMissions(const std::string& devId,
|
|||||||
PARCEL_WRITE_HELPER(data, String16, Str8ToStr16(devId));
|
PARCEL_WRITE_HELPER(data, String16, Str8ToStr16(devId));
|
||||||
PARCEL_WRITE_HELPER(data, Bool, fixConflict);
|
PARCEL_WRITE_HELPER(data, Bool, fixConflict);
|
||||||
PARCEL_WRITE_HELPER(data, Int64, tag);
|
PARCEL_WRITE_HELPER(data, Int64, tag);
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, START_SYNC_MISSIONS, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::START_SYNC_MISSIONS), data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::StartSyncMissionsFromRemote(const CallerInfo& callerInfo,
|
int32_t DistributedSchedProxy::StartSyncMissionsFromRemote(const CallerInfo& callerInfo,
|
||||||
@ -405,7 +416,8 @@ int32_t DistributedSchedProxy::StartSyncMissionsFromRemote(const CallerInfo& cal
|
|||||||
if (!CallerInfoMarshalling(callerInfo, data)) {
|
if (!CallerInfoMarshalling(callerInfo, data)) {
|
||||||
return ERR_FLATTEN_OBJECT;
|
return ERR_FLATTEN_OBJECT;
|
||||||
}
|
}
|
||||||
int32_t error = remote->SendRequest(START_SYNC_MISSIONS_FROM_REMOTE, data, reply, option);
|
int32_t error = remote->SendRequest(static_cast<uint32_t>(IDSchedInterfaceCode::START_SYNC_MISSIONS_FROM_REMOTE),
|
||||||
|
data, reply, option);
|
||||||
if (error != ERR_NONE) {
|
if (error != ERR_NONE) {
|
||||||
HILOGW("fail, error: %{public}d", error);
|
HILOGW("fail, error: %{public}d", error);
|
||||||
return error;
|
return error;
|
||||||
@ -429,7 +441,7 @@ int32_t DistributedSchedProxy::StopSyncRemoteMissions(const std::string& devId)
|
|||||||
return ERR_FLATTEN_OBJECT;
|
return ERR_FLATTEN_OBJECT;
|
||||||
}
|
}
|
||||||
PARCEL_WRITE_HELPER(data, String16, Str8ToStr16(devId));
|
PARCEL_WRITE_HELPER(data, String16, Str8ToStr16(devId));
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, STOP_SYNC_MISSIONS, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::STOP_SYNC_MISSIONS), data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::StopSyncMissionsFromRemote(const CallerInfo& callerInfo)
|
int32_t DistributedSchedProxy::StopSyncMissionsFromRemote(const CallerInfo& callerInfo)
|
||||||
@ -449,7 +461,8 @@ int32_t DistributedSchedProxy::StopSyncMissionsFromRemote(const CallerInfo& call
|
|||||||
if (!CallerInfoMarshalling(callerInfo, data)) {
|
if (!CallerInfoMarshalling(callerInfo, data)) {
|
||||||
return ERR_FLATTEN_OBJECT;
|
return ERR_FLATTEN_OBJECT;
|
||||||
}
|
}
|
||||||
int32_t error = remote->SendRequest(STOP_SYNC_MISSIONS_FROM_REMOTE, data, reply, option);
|
int32_t error = remote->SendRequest(static_cast<uint32_t>(IDSchedInterfaceCode::STOP_SYNC_MISSIONS_FROM_REMOTE),
|
||||||
|
data, reply, option);
|
||||||
if (error != ERR_NONE) {
|
if (error != ERR_NONE) {
|
||||||
HILOGW("sendRequest fail, error: %{public}d", error);
|
HILOGW("sendRequest fail, error: %{public}d", error);
|
||||||
return error;
|
return error;
|
||||||
@ -473,7 +486,8 @@ int32_t DistributedSchedProxy::RegisterMissionListener(const std::u16string& dev
|
|||||||
}
|
}
|
||||||
PARCEL_WRITE_HELPER(data, String16, devId);
|
PARCEL_WRITE_HELPER(data, String16, devId);
|
||||||
PARCEL_WRITE_HELPER(data, RemoteObject, obj);
|
PARCEL_WRITE_HELPER(data, RemoteObject, obj);
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, REGISTER_MISSION_LISTENER, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::REGISTER_MISSION_LISTENER),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::RegisterOnListener(const std::string& type,
|
int32_t DistributedSchedProxy::RegisterOnListener(const std::string& type,
|
||||||
@ -492,7 +506,8 @@ int32_t DistributedSchedProxy::RegisterOnListener(const std::string& type,
|
|||||||
}
|
}
|
||||||
PARCEL_WRITE_HELPER(data, String, type);
|
PARCEL_WRITE_HELPER(data, String, type);
|
||||||
PARCEL_WRITE_HELPER(data, RemoteObject, obj);
|
PARCEL_WRITE_HELPER(data, RemoteObject, obj);
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, REGISTER_ON_LISTENER, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::REGISTER_ON_LISTENER),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::RegisterOffListener(const std::string& type,
|
int32_t DistributedSchedProxy::RegisterOffListener(const std::string& type,
|
||||||
@ -511,7 +526,8 @@ int32_t DistributedSchedProxy::RegisterOffListener(const std::string& type,
|
|||||||
}
|
}
|
||||||
PARCEL_WRITE_HELPER(data, String, type);
|
PARCEL_WRITE_HELPER(data, String, type);
|
||||||
PARCEL_WRITE_HELPER(data, RemoteObject, obj);
|
PARCEL_WRITE_HELPER(data, RemoteObject, obj);
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, REGISTER_OFF_LISTENER, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::REGISTER_OFF_LISTENER),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::UnRegisterMissionListener(const std::u16string& devId,
|
int32_t DistributedSchedProxy::UnRegisterMissionListener(const std::u16string& devId,
|
||||||
@ -530,7 +546,8 @@ int32_t DistributedSchedProxy::UnRegisterMissionListener(const std::u16string& d
|
|||||||
}
|
}
|
||||||
PARCEL_WRITE_HELPER(data, String16, devId);
|
PARCEL_WRITE_HELPER(data, String16, devId);
|
||||||
PARCEL_WRITE_HELPER(data, RemoteObject, obj);
|
PARCEL_WRITE_HELPER(data, RemoteObject, obj);
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, UNREGISTER_MISSION_LISTENER, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::UNREGISTER_MISSION_LISTENER),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::GetMissionInfos(const std::string& deviceId, int32_t numMissions,
|
int32_t DistributedSchedProxy::GetMissionInfos(const std::string& deviceId, int32_t numMissions,
|
||||||
@ -551,7 +568,8 @@ int32_t DistributedSchedProxy::GetMissionInfos(const std::string& deviceId, int3
|
|||||||
}
|
}
|
||||||
PARCEL_WRITE_HELPER(data, String16, Str8ToStr16(deviceId));
|
PARCEL_WRITE_HELPER(data, String16, Str8ToStr16(deviceId));
|
||||||
PARCEL_WRITE_HELPER(data, Int32, numMissions);
|
PARCEL_WRITE_HELPER(data, Int32, numMissions);
|
||||||
int32_t ret = remote->SendRequest(GET_MISSION_INFOS, data, reply, option);
|
int32_t ret = remote->SendRequest(static_cast<uint32_t>(IDSchedInterfaceCode::GET_MISSION_INFOS), data, reply,
|
||||||
|
option);
|
||||||
if (ret != ERR_NONE) {
|
if (ret != ERR_NONE) {
|
||||||
HILOGW("sendRequest fail, error: %{public}d", ret);
|
HILOGW("sendRequest fail, error: %{public}d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
@ -583,7 +601,8 @@ int32_t DistributedSchedProxy::NotifyMissionsChangedFromRemote(const std::vector
|
|||||||
PARCEL_WRITE_HELPER(data, Int32, callerInfo.dmsVersion);
|
PARCEL_WRITE_HELPER(data, Int32, callerInfo.dmsVersion);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option { MessageOption::TF_SYNC, WAIT_TIME };
|
MessageOption option { MessageOption::TF_SYNC, WAIT_TIME };
|
||||||
int32_t error = remote->SendRequest(NOTIFY_MISSIONS_CHANGED_FROM_REMOTE, data, reply, option);
|
int32_t error = remote->SendRequest(static_cast<uint32_t>
|
||||||
|
(IDSchedInterfaceCode::NOTIFY_MISSIONS_CHANGED_FROM_REMOTE), data, reply, option);
|
||||||
if (error != ERR_NONE) {
|
if (error != ERR_NONE) {
|
||||||
HILOGE("%{public}s transact failed, error: %{public}d", __func__, error);
|
HILOGE("%{public}s transact failed, error: %{public}d", __func__, error);
|
||||||
return error;
|
return error;
|
||||||
@ -617,7 +636,8 @@ int32_t DistributedSchedProxy::GetRemoteMissionSnapshotInfo(const std::string& n
|
|||||||
PARCEL_WRITE_HELPER(data, Int32, missionId);
|
PARCEL_WRITE_HELPER(data, Int32, missionId);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
int32_t error = remote->SendRequest(GET_REMOTE_MISSION_SNAPSHOT_INFO, data, reply, option);
|
int32_t error = remote->SendRequest(static_cast<uint32_t>(IDSchedInterfaceCode::GET_REMOTE_MISSION_SNAPSHOT_INFO),
|
||||||
|
data, reply, option);
|
||||||
if (error != ERR_NONE) {
|
if (error != ERR_NONE) {
|
||||||
HILOGE("transact failed, error: %{public}d", error);
|
HILOGE("transact failed, error: %{public}d", error);
|
||||||
return error;
|
return error;
|
||||||
@ -663,7 +683,8 @@ int32_t DistributedSchedProxy::StartRemoteAbilityByCall(const OHOS::AAFwk::Want&
|
|||||||
PARCEL_WRITE_HELPER(data, Int32, callerPid);
|
PARCEL_WRITE_HELPER(data, Int32, callerPid);
|
||||||
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, START_REMOTE_ABILITY_BY_CALL, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_ABILITY_BY_CALL),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::ReleaseRemoteAbility(const sptr<IRemoteObject>& connect,
|
int32_t DistributedSchedProxy::ReleaseRemoteAbility(const sptr<IRemoteObject>& connect,
|
||||||
@ -689,7 +710,8 @@ int32_t DistributedSchedProxy::ReleaseRemoteAbility(const sptr<IRemoteObject>& c
|
|||||||
return ERR_INVALID_VALUE;
|
return ERR_INVALID_VALUE;
|
||||||
}
|
}
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, RELEASE_REMOTE_ABILITY, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::RELEASE_REMOTE_ABILITY),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::StartAbilityByCallFromRemote(const OHOS::AAFwk::Want& want,
|
int32_t DistributedSchedProxy::StartAbilityByCallFromRemote(const OHOS::AAFwk::Want& want,
|
||||||
@ -727,7 +749,8 @@ int32_t DistributedSchedProxy::StartAbilityByCallFromRemote(const OHOS::AAFwk::W
|
|||||||
PARCEL_WRITE_HELPER(data, Parcelable, &dstbWant);
|
PARCEL_WRITE_HELPER(data, Parcelable, &dstbWant);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
HITRACE_METER_NAME(TraceTag::DSCHED, TraceValue::REMOTE_PROCEDURE_CALL);
|
HITRACE_METER_NAME(TraceTag::DSCHED, TraceValue::REMOTE_PROCEDURE_CALL);
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, START_ABILITY_BY_CALL_FROM_REMOTE, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>
|
||||||
|
(IDSchedInterfaceCode::START_ABILITY_BY_CALL_FROM_REMOTE), data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::ReleaseAbilityFromRemote(const sptr<IRemoteObject>& connect,
|
int32_t DistributedSchedProxy::ReleaseAbilityFromRemote(const sptr<IRemoteObject>& connect,
|
||||||
@ -757,7 +780,8 @@ int32_t DistributedSchedProxy::ReleaseAbilityFromRemote(const sptr<IRemoteObject
|
|||||||
PARCEL_WRITE_HELPER(data, String, extraInfo);
|
PARCEL_WRITE_HELPER(data, String, extraInfo);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
HITRACE_METER_NAME(TraceTag::DSCHED, TraceValue::REMOTE_PROCEDURE_CALL);
|
HITRACE_METER_NAME(TraceTag::DSCHED, TraceValue::REMOTE_PROCEDURE_CALL);
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, RELEASE_ABILITY_FROM_REMOTE, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::RELEASE_ABILITY_FROM_REMOTE),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::StartRemoteFreeInstall(const OHOS::AAFwk::Want& want,
|
int32_t DistributedSchedProxy::StartRemoteFreeInstall(const OHOS::AAFwk::Want& want,
|
||||||
@ -787,7 +811,8 @@ int32_t DistributedSchedProxy::StartRemoteFreeInstall(const OHOS::AAFwk::Want& w
|
|||||||
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
||||||
PARCEL_WRITE_HELPER(data, RemoteObject, callback);
|
PARCEL_WRITE_HELPER(data, RemoteObject, callback);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, START_REMOTE_FREE_INSTALL, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_FREE_INSTALL),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::StartFreeInstallFromRemote(const FreeInstallInfo& info, int64_t taskId)
|
int32_t DistributedSchedProxy::StartFreeInstallFromRemote(const FreeInstallInfo& info, int64_t taskId)
|
||||||
@ -826,7 +851,8 @@ int32_t DistributedSchedProxy::StartFreeInstallFromRemote(const FreeInstallInfo&
|
|||||||
PARCEL_WRITE_HELPER(data, String, extraInfo);
|
PARCEL_WRITE_HELPER(data, String, extraInfo);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
HITRACE_METER_NAME(TraceTag::DSCHED, TraceValue::REMOTE_PROCEDURE_CALL);
|
HITRACE_METER_NAME(TraceTag::DSCHED, TraceValue::REMOTE_PROCEDURE_CALL);
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, START_FREE_INSTALL_FROM_REMOTE, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::START_FREE_INSTALL_FROM_REMOTE),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::NotifyCompleteFreeInstallFromRemote(int64_t taskId, int32_t resultCode)
|
int32_t DistributedSchedProxy::NotifyCompleteFreeInstallFromRemote(int64_t taskId, int32_t resultCode)
|
||||||
@ -847,7 +873,8 @@ int32_t DistributedSchedProxy::NotifyCompleteFreeInstallFromRemote(int64_t taskI
|
|||||||
PARCEL_WRITE_HELPER(data, Int64, taskId);
|
PARCEL_WRITE_HELPER(data, Int64, taskId);
|
||||||
PARCEL_WRITE_HELPER(data, Int32, resultCode);
|
PARCEL_WRITE_HELPER(data, Int32, resultCode);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, NOTIFY_COMPLETE_FREE_INSTALL_FROM_REMOTE, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>
|
||||||
|
(IDSchedInterfaceCode::NOTIFY_COMPLETE_FREE_INSTALL_FROM_REMOTE), data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SUPPORT_DISTRIBUTED_FORM_SHARE
|
#ifdef SUPPORT_DISTRIBUTED_FORM_SHARE
|
||||||
@ -876,7 +903,8 @@ int32_t DistributedSchedProxy::StartRemoteShareForm(
|
|||||||
PARCEL_WRITE_HELPER(data, String, remoteDeviceId);
|
PARCEL_WRITE_HELPER(data, String, remoteDeviceId);
|
||||||
PARCEL_WRITE_HELPER(data, Parcelable, &formShareInfo);
|
PARCEL_WRITE_HELPER(data, Parcelable, &formShareInfo);
|
||||||
|
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, START_REMOTE_SHARE_FORM, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_SHARE_FORM),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::StartShareFormFromRemote(
|
int32_t DistributedSchedProxy::StartShareFormFromRemote(
|
||||||
@ -904,7 +932,8 @@ int32_t DistributedSchedProxy::StartShareFormFromRemote(
|
|||||||
PARCEL_WRITE_HELPER(data, String, remoteDeviceId);
|
PARCEL_WRITE_HELPER(data, String, remoteDeviceId);
|
||||||
PARCEL_WRITE_HELPER(data, Parcelable, &formShareInfo);
|
PARCEL_WRITE_HELPER(data, Parcelable, &formShareInfo);
|
||||||
|
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, START_SHARE_FORM_FROM_REMOTE, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::START_SHARE_FORM_FROM_REMOTE),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -928,7 +957,8 @@ int32_t DistributedSchedProxy::NotifyStateChangedFromRemote(int32_t abilityState
|
|||||||
return ERR_INVALID_VALUE;
|
return ERR_INVALID_VALUE;
|
||||||
}
|
}
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, NOTIFY_STATE_CHANGED_FROM_REMOTE, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::NOTIFY_STATE_CHANGED_FROM_REMOTE),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::GetDistributedComponentList(std::vector<std::string>& distributedComponents)
|
int32_t DistributedSchedProxy::GetDistributedComponentList(std::vector<std::string>& distributedComponents)
|
||||||
@ -944,7 +974,8 @@ int32_t DistributedSchedProxy::GetDistributedComponentList(std::vector<std::stri
|
|||||||
}
|
}
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
int32_t error = remote->SendRequest(GET_DISTRIBUTED_COMPONENT_LIST, data, reply, option);
|
int32_t error = remote->SendRequest(static_cast<uint32_t>(IDSchedInterfaceCode::GET_DISTRIBUTED_COMPONENT_LIST),
|
||||||
|
data, reply, option);
|
||||||
if (error != ERR_NONE) {
|
if (error != ERR_NONE) {
|
||||||
HILOGE("GetDistributedComponentList SendRequest error = %{public}d", error);
|
HILOGE("GetDistributedComponentList SendRequest error = %{public}d", error);
|
||||||
return error;
|
return error;
|
||||||
@ -976,7 +1007,8 @@ int32_t DistributedSchedProxy::StopRemoteExtensionAbility(
|
|||||||
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
PARCEL_WRITE_HELPER(data, Uint32, accessToken);
|
||||||
PARCEL_WRITE_HELPER(data, Int32, extensionType);
|
PARCEL_WRITE_HELPER(data, Int32, extensionType);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, STOP_REMOTE_EXTERNSION_ABILITY, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>(IDSchedInterfaceCode::STOP_REMOTE_EXTERNSION_ABILITY),
|
||||||
|
data, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DistributedSchedProxy::StopExtensionAbilityFromRemote(const OHOS::AAFwk::Want& want,
|
int32_t DistributedSchedProxy::StopExtensionAbilityFromRemote(const OHOS::AAFwk::Want& want,
|
||||||
@ -1005,7 +1037,8 @@ int32_t DistributedSchedProxy::StopExtensionAbilityFromRemote(const OHOS::AAFwk:
|
|||||||
std::string extraInfo = extraInfoJson.dump();
|
std::string extraInfo = extraInfoJson.dump();
|
||||||
PARCEL_WRITE_HELPER(data, String, extraInfo);
|
PARCEL_WRITE_HELPER(data, String, extraInfo);
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
PARCEL_TRANSACT_SYNC_RET_INT(remote, STOP_EXTERNSION_ABILITY_FROM_REMOTE, data, reply);
|
PARCEL_TRANSACT_SYNC_RET_INT(remote, static_cast<uint32_t>
|
||||||
|
(IDSchedInterfaceCode::STOP_EXTERNSION_ABILITY_FROM_REMOTE), data, reply);
|
||||||
}
|
}
|
||||||
} // namespace DistributedSchedule
|
} // namespace DistributedSchedule
|
||||||
} // namespace OHOS
|
} // namespace OHOS
|
||||||
|
@ -447,9 +447,11 @@ int32_t DistributedSchedService::ContinueMission(const std::string& srcDeviceId,
|
|||||||
return INVALID_PARAMETERS_ERR;
|
return INVALID_PARAMETERS_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (srcDeviceId == localDevId) {
|
if (srcDeviceId == localDevId &&
|
||||||
|
DtbschedmgrDeviceInfoStorage::GetInstance().GetDeviceInfoById(dstDeviceId) != nullptr) {
|
||||||
return ContinueLocalMission(dstDeviceId, missionId, callback, wantParams);
|
return ContinueLocalMission(dstDeviceId, missionId, callback, wantParams);
|
||||||
} else if (dstDeviceId == localDevId) {
|
} else if (dstDeviceId == localDevId &&
|
||||||
|
DtbschedmgrDeviceInfoStorage::GetInstance().GetDeviceInfoById(srcDeviceId) != nullptr) {
|
||||||
return ContinueRemoteMission(srcDeviceId, dstDeviceId, missionId, callback, wantParams);
|
return ContinueRemoteMission(srcDeviceId, dstDeviceId, missionId, callback, wantParams);
|
||||||
} else {
|
} else {
|
||||||
HILOGE("source or target device must be local!");
|
HILOGE("source or target device must be local!");
|
||||||
@ -473,7 +475,8 @@ int32_t DistributedSchedService::ContinueMission(const std::string& srcDeviceId,
|
|||||||
return INVALID_PARAMETERS_ERR;
|
return INVALID_PARAMETERS_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (srcDeviceId == localDevId) {
|
if (srcDeviceId == localDevId &&
|
||||||
|
DtbschedmgrDeviceInfoStorage::GetInstance().GetDeviceInfoById(dstDeviceId) != nullptr) {
|
||||||
int32_t missionId = 1;
|
int32_t missionId = 1;
|
||||||
#ifdef SUPPORT_DISTRIBUTED_MISSION_MANAGER
|
#ifdef SUPPORT_DISTRIBUTED_MISSION_MANAGER
|
||||||
int32_t ret = DistributedSchedContinueManager::GetInstance().GetMissionId(bundleName, missionId);
|
int32_t ret = DistributedSchedContinueManager::GetInstance().GetMissionId(bundleName, missionId);
|
||||||
@ -483,7 +486,8 @@ int32_t DistributedSchedService::ContinueMission(const std::string& srcDeviceId,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return ContinueLocalMission(dstDeviceId, missionId, callback, wantParams);
|
return ContinueLocalMission(dstDeviceId, missionId, callback, wantParams);
|
||||||
} else if (dstDeviceId == localDevId) {
|
} else if (dstDeviceId == localDevId &&
|
||||||
|
DtbschedmgrDeviceInfoStorage::GetInstance().GetDeviceInfoById(srcDeviceId) != nullptr) {
|
||||||
return ContinueRemoteMission(srcDeviceId, dstDeviceId, bundleName, callback, wantParams);
|
return ContinueRemoteMission(srcDeviceId, dstDeviceId, bundleName, callback, wantParams);
|
||||||
} else {
|
} else {
|
||||||
HILOGE("source or target device must be local!");
|
HILOGE("source or target device must be local!");
|
||||||
|
@ -71,65 +71,97 @@ DistributedSchedStub::~DistributedSchedStub()
|
|||||||
|
|
||||||
void DistributedSchedStub::InitLocalFuncsInner()
|
void DistributedSchedStub::InitLocalFuncsInner()
|
||||||
{
|
{
|
||||||
localFuncsMap_[START_REMOTE_ABILITY] = &DistributedSchedStub::StartRemoteAbilityInner;
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_ABILITY)] =
|
||||||
localFuncsMap_[CONTINUE_MISSION] = &DistributedSchedStub::ContinueMissionInner;
|
&DistributedSchedStub::StartRemoteAbilityInner;
|
||||||
localFuncsMap_[CONTINUE_MISSION_OF_BUNDLENAME] = &DistributedSchedStub::ContinueMissionOfBundleNameInner;
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::CONTINUE_MISSION)] =
|
||||||
localFuncsMap_[START_CONTINUATION] = &DistributedSchedStub::StartContinuationInner;
|
&DistributedSchedStub::ContinueMissionInner;
|
||||||
localFuncsMap_[NOTIFY_COMPLETE_CONTINUATION] = &DistributedSchedStub::NotifyCompleteContinuationInner;
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::CONTINUE_MISSION_OF_BUNDLENAME)] =
|
||||||
localFuncsMap_[CONNECT_REMOTE_ABILITY] = &DistributedSchedStub::ConnectRemoteAbilityInner;
|
&DistributedSchedStub::ContinueMissionOfBundleNameInner;
|
||||||
localFuncsMap_[DISCONNECT_REMOTE_ABILITY] = &DistributedSchedStub::DisconnectRemoteAbilityInner;
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::START_CONTINUATION)] =
|
||||||
|
&DistributedSchedStub::StartContinuationInner;
|
||||||
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::NOTIFY_COMPLETE_CONTINUATION)] =
|
||||||
|
&DistributedSchedStub::NotifyCompleteContinuationInner;
|
||||||
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::CONNECT_REMOTE_ABILITY)] =
|
||||||
|
&DistributedSchedStub::ConnectRemoteAbilityInner;
|
||||||
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::DISCONNECT_REMOTE_ABILITY)] =
|
||||||
|
&DistributedSchedStub::DisconnectRemoteAbilityInner;
|
||||||
// request codes for mission manager
|
// request codes for mission manager
|
||||||
#ifdef SUPPORT_DISTRIBUTED_MISSION_MANAGER
|
#ifdef SUPPORT_DISTRIBUTED_MISSION_MANAGER
|
||||||
localFuncsMap_[GET_REMOTE_MISSION_SNAPSHOT_INFO] = &DistributedSchedStub::GetRemoteMissionSnapshotInfoInner;
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::GET_REMOTE_MISSION_SNAPSHOT_INFO)] =
|
||||||
localFuncsMap_[REGISTER_MISSION_LISTENER] = &DistributedSchedStub::RegisterMissionListenerInner;
|
&DistributedSchedStub::GetRemoteMissionSnapshotInfoInner;
|
||||||
localFuncsMap_[REGISTER_ON_LISTENER] = &DistributedSchedStub::RegisterOnListenerInner;
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::REGISTER_MISSION_LISTENER)] =
|
||||||
localFuncsMap_[REGISTER_OFF_LISTENER] = &DistributedSchedStub::RegisterOffListenerInner;
|
&DistributedSchedStub::RegisterMissionListenerInner;
|
||||||
localFuncsMap_[UNREGISTER_MISSION_LISTENER] = &DistributedSchedStub::UnRegisterMissionListenerInner;
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::REGISTER_ON_LISTENER)] =
|
||||||
localFuncsMap_[GET_MISSION_INFOS] = &DistributedSchedStub::GetMissionInfosInner;
|
&DistributedSchedStub::RegisterOnListenerInner;
|
||||||
localFuncsMap_[START_SYNC_MISSIONS] = &DistributedSchedStub::StartSyncRemoteMissionsInner;
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::REGISTER_OFF_LISTENER)] =
|
||||||
localFuncsMap_[STOP_SYNC_MISSIONS] = &DistributedSchedStub::StopSyncRemoteMissionsInner;
|
&DistributedSchedStub::RegisterOffListenerInner;
|
||||||
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::UNREGISTER_MISSION_LISTENER)] =
|
||||||
|
&DistributedSchedStub::UnRegisterMissionListenerInner;
|
||||||
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::GET_MISSION_INFOS)] =
|
||||||
|
&DistributedSchedStub::GetMissionInfosInner;
|
||||||
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::START_SYNC_MISSIONS)] =
|
||||||
|
&DistributedSchedStub::StartSyncRemoteMissionsInner;
|
||||||
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::STOP_SYNC_MISSIONS)] =
|
||||||
|
&DistributedSchedStub::StopSyncRemoteMissionsInner;
|
||||||
#endif
|
#endif
|
||||||
localFuncsMap_[START_REMOTE_ABILITY_BY_CALL] = &DistributedSchedStub::StartRemoteAbilityByCallInner;
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_ABILITY_BY_CALL)] =
|
||||||
localFuncsMap_[RELEASE_REMOTE_ABILITY] = &DistributedSchedStub::ReleaseRemoteAbilityInner;
|
&DistributedSchedStub::StartRemoteAbilityByCallInner;
|
||||||
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::RELEASE_REMOTE_ABILITY)] =
|
||||||
|
&DistributedSchedStub::ReleaseRemoteAbilityInner;
|
||||||
#ifdef SUPPORT_DISTRIBUTED_FORM_SHARE
|
#ifdef SUPPORT_DISTRIBUTED_FORM_SHARE
|
||||||
localFuncsMap_[START_REMOTE_SHARE_FORM] = &DistributedSchedStub::StartRemoteShareFormInner;
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_SHARE_FORM)] =
|
||||||
|
&DistributedSchedStub::StartRemoteShareFormInner;
|
||||||
#endif
|
#endif
|
||||||
localFuncsMap_[GET_DISTRIBUTED_COMPONENT_LIST] = &DistributedSchedStub::GetDistributedComponentListInner;
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::GET_DISTRIBUTED_COMPONENT_LIST)] =
|
||||||
localFuncsMap_[START_REMOTE_FREE_INSTALL] = &DistributedSchedStub::StartRemoteFreeInstallInner;
|
&DistributedSchedStub::GetDistributedComponentListInner;
|
||||||
localFuncsMap_[STOP_REMOTE_EXTERNSION_ABILITY] =
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_FREE_INSTALL)] =
|
||||||
|
&DistributedSchedStub::StartRemoteFreeInstallInner;
|
||||||
|
localFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::STOP_REMOTE_EXTERNSION_ABILITY)] =
|
||||||
&DistributedSchedStub::StopRemoteExtensionAbilityInner;
|
&DistributedSchedStub::StopRemoteExtensionAbilityInner;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DistributedSchedStub::InitRemoteFuncsInner()
|
void DistributedSchedStub::InitRemoteFuncsInner()
|
||||||
{
|
{
|
||||||
remoteFuncsMap_[START_ABILITY_FROM_REMOTE] = &DistributedSchedStub::StartAbilityFromRemoteInner;
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::START_ABILITY_FROM_REMOTE)] =
|
||||||
remoteFuncsMap_[SEND_RESULT_FROM_REMOTE] = &DistributedSchedStub::SendResultFromRemoteInner;
|
&DistributedSchedStub::StartAbilityFromRemoteInner;
|
||||||
remoteFuncsMap_[NOTIFY_CONTINUATION_RESULT_FROM_REMOTE] =
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::SEND_RESULT_FROM_REMOTE)] =
|
||||||
|
&DistributedSchedStub::SendResultFromRemoteInner;
|
||||||
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::NOTIFY_CONTINUATION_RESULT_FROM_REMOTE)] =
|
||||||
&DistributedSchedStub::NotifyContinuationResultFromRemoteInner;
|
&DistributedSchedStub::NotifyContinuationResultFromRemoteInner;
|
||||||
remoteFuncsMap_[CONNECT_ABILITY_FROM_REMOTE] = &DistributedSchedStub::ConnectAbilityFromRemoteInner;
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::CONNECT_ABILITY_FROM_REMOTE)] =
|
||||||
remoteFuncsMap_[DISCONNECT_ABILITY_FROM_REMOTE] = &DistributedSchedStub::DisconnectAbilityFromRemoteInner;
|
&DistributedSchedStub::ConnectAbilityFromRemoteInner;
|
||||||
remoteFuncsMap_[NOTIFY_PROCESS_DIED_FROM_REMOTE] = &DistributedSchedStub::NotifyProcessDiedFromRemoteInner;
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::DISCONNECT_ABILITY_FROM_REMOTE)] =
|
||||||
|
&DistributedSchedStub::DisconnectAbilityFromRemoteInner;
|
||||||
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::NOTIFY_PROCESS_DIED_FROM_REMOTE)] =
|
||||||
|
&DistributedSchedStub::NotifyProcessDiedFromRemoteInner;
|
||||||
#ifdef SUPPORT_DISTRIBUTED_MISSION_MANAGER
|
#ifdef SUPPORT_DISTRIBUTED_MISSION_MANAGER
|
||||||
// request codes for mission manager
|
// request codes for mission manager
|
||||||
remoteFuncsMap_[START_SYNC_MISSIONS_FROM_REMOTE] =
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::START_SYNC_MISSIONS_FROM_REMOTE)] =
|
||||||
&DistributedSchedStub::StartSyncMissionsFromRemoteInner;
|
&DistributedSchedStub::StartSyncMissionsFromRemoteInner;
|
||||||
remoteFuncsMap_[STOP_SYNC_MISSIONS_FROM_REMOTE] =
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::STOP_SYNC_MISSIONS_FROM_REMOTE)] =
|
||||||
&DistributedSchedStub::StopSyncMissionsFromRemoteInner;
|
&DistributedSchedStub::StopSyncMissionsFromRemoteInner;
|
||||||
remoteFuncsMap_[NOTIFY_MISSIONS_CHANGED_FROM_REMOTE] = &DistributedSchedStub::NotifyMissionsChangedFromRemoteInner;
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::NOTIFY_MISSIONS_CHANGED_FROM_REMOTE)] =
|
||||||
|
&DistributedSchedStub::NotifyMissionsChangedFromRemoteInner;
|
||||||
#endif
|
#endif
|
||||||
remoteFuncsMap_[CONTINUE_MISSION] = &DistributedSchedStub::ContinueMissionInner;
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::CONTINUE_MISSION)] =
|
||||||
remoteFuncsMap_[CONTINUE_MISSION_OF_BUNDLENAME] = &DistributedSchedStub::ContinueMissionOfBundleNameInner;
|
&DistributedSchedStub::ContinueMissionInner;
|
||||||
remoteFuncsMap_[START_ABILITY_BY_CALL_FROM_REMOTE] = &DistributedSchedStub::StartAbilityByCallFromRemoteInner;
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::CONTINUE_MISSION_OF_BUNDLENAME)] =
|
||||||
remoteFuncsMap_[RELEASE_ABILITY_FROM_REMOTE] = &DistributedSchedStub::ReleaseAbilityFromRemoteInner;
|
&DistributedSchedStub::ContinueMissionOfBundleNameInner;
|
||||||
remoteFuncsMap_[NOTIFY_STATE_CHANGED_FROM_REMOTE] =
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::START_ABILITY_BY_CALL_FROM_REMOTE)] =
|
||||||
|
&DistributedSchedStub::StartAbilityByCallFromRemoteInner;
|
||||||
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::RELEASE_ABILITY_FROM_REMOTE)] =
|
||||||
|
&DistributedSchedStub::ReleaseAbilityFromRemoteInner;
|
||||||
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::NOTIFY_STATE_CHANGED_FROM_REMOTE)] =
|
||||||
&DistributedSchedStub::NotifyStateChangedFromRemoteInner;
|
&DistributedSchedStub::NotifyStateChangedFromRemoteInner;
|
||||||
#ifdef SUPPORT_DISTRIBUTED_FORM_SHARE
|
#ifdef SUPPORT_DISTRIBUTED_FORM_SHARE
|
||||||
remoteFuncsMap_[START_SHARE_FORM_FROM_REMOTE] = &DistributedSchedStub::StartShareFormFromRemoteInner;
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::START_SHARE_FORM_FROM_REMOTE)] =
|
||||||
|
&DistributedSchedStub::StartShareFormFromRemoteInner;
|
||||||
#endif
|
#endif
|
||||||
remoteFuncsMap_[START_FREE_INSTALL_FROM_REMOTE] = &DistributedSchedStub::StartFreeInstallFromRemoteInner;
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::START_FREE_INSTALL_FROM_REMOTE)] =
|
||||||
remoteFuncsMap_[NOTIFY_COMPLETE_FREE_INSTALL_FROM_REMOTE] =
|
&DistributedSchedStub::StartFreeInstallFromRemoteInner;
|
||||||
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::NOTIFY_COMPLETE_FREE_INSTALL_FROM_REMOTE)] =
|
||||||
&DistributedSchedStub::NotifyCompleteFreeInstallFromRemoteInner;
|
&DistributedSchedStub::NotifyCompleteFreeInstallFromRemoteInner;
|
||||||
remoteFuncsMap_[STOP_EXTERNSION_ABILITY_FROM_REMOTE] =
|
remoteFuncsMap_[static_cast<uint32_t>(IDSchedInterfaceCode::STOP_EXTERNSION_ABILITY_FROM_REMOTE)] =
|
||||||
&DistributedSchedStub::StopExtensionAbilityFromRemoteInner;
|
&DistributedSchedStub::StopExtensionAbilityFromRemoteInner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -57,7 +57,8 @@ void DmsFreeInstallCallbackProxy::OnInstallFinished(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t error = Remote()->SendRequest(IDmsFreeInstallCallbackCmd::ON_FREE_INSTALL_DONE, data, reply, option);
|
int32_t error = Remote()->SendRequest(static_cast<uint32_t>
|
||||||
|
(IDRreeInstallCallbackInterfaceCode::ON_FREE_INSTALL_DONE), data, reply, option);
|
||||||
if (error != NO_ERROR) {
|
if (error != NO_ERROR) {
|
||||||
HILOGE("OnFinished fail, error: %{public}d", error);
|
HILOGE("OnFinished fail, error: %{public}d", error);
|
||||||
return;
|
return;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -26,7 +26,7 @@ const std::string TAG = "DmsFreeInstallCallbackStub";
|
|||||||
}
|
}
|
||||||
DmsFreeInstallCallbackStub::DmsFreeInstallCallbackStub()
|
DmsFreeInstallCallbackStub::DmsFreeInstallCallbackStub()
|
||||||
{
|
{
|
||||||
memberFuncMap_[IDmsFreeInstallCallbackCmd::ON_FREE_INSTALL_DONE] =
|
memberFuncMap_[static_cast<uint32_t>(IDRreeInstallCallbackInterfaceCode::ON_FREE_INSTALL_DONE)] =
|
||||||
&DmsFreeInstallCallbackStub::OnInstallFinishedInner;
|
&DmsFreeInstallCallbackStub::OnInstallFinishedInner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ void DistributedSchedStubTest::FreeInstallInfoMarshalling(const CallerInfo& call
|
|||||||
HWTEST_F(DistributedSchedStubTest, OnRemoteRequest_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, OnRemoteRequest_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest OnRemoteRequest_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest OnRemoteRequest_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_REMOTE_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -139,7 +139,7 @@ HWTEST_F(DistributedSchedStubTest, OnRemoteRequest_001, TestSize.Level3)
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_REMOTE_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -158,7 +158,7 @@ HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityInner_001, TestSize.Level3)
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_REMOTE_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -203,7 +203,7 @@ HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityInner_002, TestSize.Level3)
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityInner_003, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityInner_003, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityInner_003 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityInner_003 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_REMOTE_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -231,7 +231,7 @@ HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityInner_003, TestSize.Level3)
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityInner_004, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityInner_004, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityInner_004 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityInner_004 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_REMOTE_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -563,7 +563,7 @@ HWTEST_F(DistributedSchedStubTest, ContinueMissionInner_002, TestSize.Level3)
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartContinuationInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartContinuationInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartContinuationInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartContinuationInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_CONTINUATION;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_CONTINUATION);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -583,7 +583,7 @@ HWTEST_F(DistributedSchedStubTest, StartContinuationInner_001, TestSize.Level3)
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartContinuationInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartContinuationInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartContinuationInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartContinuationInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_CONTINUATION;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_CONTINUATION);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -616,7 +616,7 @@ HWTEST_F(DistributedSchedStubTest, StartContinuationInner_002, TestSize.Level3)
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartContinuationInner_003, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartContinuationInner_003, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartContinuationInner_003 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartContinuationInner_003 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_CONTINUATION;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_CONTINUATION);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -645,7 +645,7 @@ HWTEST_F(DistributedSchedStubTest, StartContinuationInner_003, TestSize.Level3)
|
|||||||
HWTEST_F(DistributedSchedStubTest, NotifyCompleteContinuationInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, NotifyCompleteContinuationInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest NotifyCompleteContinuationInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest NotifyCompleteContinuationInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::NOTIFY_COMPLETE_CONTINUATION;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::NOTIFY_COMPLETE_CONTINUATION);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -665,7 +665,7 @@ HWTEST_F(DistributedSchedStubTest, NotifyCompleteContinuationInner_001, TestSize
|
|||||||
HWTEST_F(DistributedSchedStubTest, NotifyCompleteContinuationInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, NotifyCompleteContinuationInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest NotifyCompleteContinuationInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest NotifyCompleteContinuationInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::NOTIFY_COMPLETE_CONTINUATION;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::NOTIFY_COMPLETE_CONTINUATION);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -714,7 +714,7 @@ HWTEST_F(DistributedSchedStubTest, NotifyContinuationResultFromRemoteInner_001,
|
|||||||
HWTEST_F(DistributedSchedStubTest, ConnectRemoteAbilityInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, ConnectRemoteAbilityInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest ConnectRemoteAbilityInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest ConnectRemoteAbilityInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::CONNECT_REMOTE_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::CONNECT_REMOTE_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -734,7 +734,7 @@ HWTEST_F(DistributedSchedStubTest, ConnectRemoteAbilityInner_001, TestSize.Level
|
|||||||
HWTEST_F(DistributedSchedStubTest, ConnectRemoteAbilityInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, ConnectRemoteAbilityInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest ConnectRemoteAbilityInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest ConnectRemoteAbilityInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::CONNECT_REMOTE_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::CONNECT_REMOTE_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -765,7 +765,7 @@ HWTEST_F(DistributedSchedStubTest, ConnectRemoteAbilityInner_002, TestSize.Level
|
|||||||
HWTEST_F(DistributedSchedStubTest, ConnectRemoteAbilityInner_003, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, ConnectRemoteAbilityInner_003, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest ConnectRemoteAbilityInner_003 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest ConnectRemoteAbilityInner_003 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::CONNECT_REMOTE_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::CONNECT_REMOTE_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -792,7 +792,7 @@ HWTEST_F(DistributedSchedStubTest, ConnectRemoteAbilityInner_003, TestSize.Level
|
|||||||
HWTEST_F(DistributedSchedStubTest, DisconnectRemoteAbilityInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, DisconnectRemoteAbilityInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest DisconnectRemoteAbilityInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest DisconnectRemoteAbilityInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::DISCONNECT_REMOTE_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::DISCONNECT_REMOTE_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -812,7 +812,7 @@ HWTEST_F(DistributedSchedStubTest, DisconnectRemoteAbilityInner_001, TestSize.Le
|
|||||||
HWTEST_F(DistributedSchedStubTest, DisconnectRemoteAbilityInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, DisconnectRemoteAbilityInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest DisconnectRemoteAbilityInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest DisconnectRemoteAbilityInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::DISCONNECT_REMOTE_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::DISCONNECT_REMOTE_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -837,7 +837,7 @@ HWTEST_F(DistributedSchedStubTest, DisconnectRemoteAbilityInner_002, TestSize.Le
|
|||||||
HWTEST_F(DistributedSchedStubTest, DisconnectRemoteAbilityInner_003, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, DisconnectRemoteAbilityInner_003, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest DisconnectRemoteAbilityInner_003 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest DisconnectRemoteAbilityInner_003 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::DISCONNECT_REMOTE_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::DISCONNECT_REMOTE_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -989,7 +989,7 @@ HWTEST_F(DistributedSchedStubTest, NotifyProcessDiedFromRemoteInner_001, TestSiz
|
|||||||
HWTEST_F(DistributedSchedStubTest, GetMissionInfosInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, GetMissionInfosInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest GetMissionInfosInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest GetMissionInfosInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::GET_MISSION_INFOS;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::GET_MISSION_INFOS);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1009,7 +1009,7 @@ HWTEST_F(DistributedSchedStubTest, GetMissionInfosInner_001, TestSize.Level3)
|
|||||||
HWTEST_F(DistributedSchedStubTest, GetMissionInfosInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, GetMissionInfosInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest GetMissionInfosInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest GetMissionInfosInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::GET_MISSION_INFOS;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::GET_MISSION_INFOS);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1032,7 +1032,7 @@ HWTEST_F(DistributedSchedStubTest, GetMissionInfosInner_002, TestSize.Level3)
|
|||||||
HWTEST_F(DistributedSchedStubTest, GetRemoteMissionSnapshotInfoInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, GetRemoteMissionSnapshotInfoInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest GetRemoteMissionSnapshotInfoInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest GetRemoteMissionSnapshotInfoInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::GET_REMOTE_MISSION_SNAPSHOT_INFO;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::GET_REMOTE_MISSION_SNAPSHOT_INFO);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1052,7 +1052,7 @@ HWTEST_F(DistributedSchedStubTest, GetRemoteMissionSnapshotInfoInner_001, TestSi
|
|||||||
HWTEST_F(DistributedSchedStubTest, GetRemoteMissionSnapshotInfoInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, GetRemoteMissionSnapshotInfoInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest GetRemoteMissionSnapshotInfoInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest GetRemoteMissionSnapshotInfoInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::GET_REMOTE_MISSION_SNAPSHOT_INFO;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::GET_REMOTE_MISSION_SNAPSHOT_INFO);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1086,7 +1086,7 @@ HWTEST_F(DistributedSchedStubTest, GetRemoteMissionSnapshotInfoInner_002, TestSi
|
|||||||
HWTEST_F(DistributedSchedStubTest, RegisterMissionListenerInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, RegisterMissionListenerInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest RegisterMissionListenerInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest RegisterMissionListenerInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::REGISTER_MISSION_LISTENER;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::REGISTER_MISSION_LISTENER);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1106,7 +1106,7 @@ HWTEST_F(DistributedSchedStubTest, RegisterMissionListenerInner_001, TestSize.Le
|
|||||||
HWTEST_F(DistributedSchedStubTest, RegisterMissionListenerInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, RegisterMissionListenerInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest RegisterMissionListenerInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest RegisterMissionListenerInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::REGISTER_MISSION_LISTENER;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::REGISTER_MISSION_LISTENER);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1138,7 +1138,7 @@ HWTEST_F(DistributedSchedStubTest, RegisterMissionListenerInner_002, TestSize.Le
|
|||||||
HWTEST_F(DistributedSchedStubTest, UnRegisterMissionListenerInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, UnRegisterMissionListenerInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest UnRegisterMissionListenerInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest UnRegisterMissionListenerInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::UNREGISTER_MISSION_LISTENER;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::UNREGISTER_MISSION_LISTENER);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1158,7 +1158,7 @@ HWTEST_F(DistributedSchedStubTest, UnRegisterMissionListenerInner_001, TestSize.
|
|||||||
HWTEST_F(DistributedSchedStubTest, UnRegisterMissionListenerInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, UnRegisterMissionListenerInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest UnRegisterMissionListenerInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest UnRegisterMissionListenerInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::UNREGISTER_MISSION_LISTENER;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::UNREGISTER_MISSION_LISTENER);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1226,7 +1226,7 @@ HWTEST_F(DistributedSchedStubTest, StartSyncMissionsFromRemoteInner_002, TestSiz
|
|||||||
HWTEST_F(DistributedSchedStubTest, StopSyncRemoteMissionsInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StopSyncRemoteMissionsInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StopSyncRemoteMissionsInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StopSyncRemoteMissionsInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::STOP_SYNC_MISSIONS;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::STOP_SYNC_MISSIONS);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1246,7 +1246,7 @@ HWTEST_F(DistributedSchedStubTest, StopSyncRemoteMissionsInner_001, TestSize.Lev
|
|||||||
HWTEST_F(DistributedSchedStubTest, StopSyncRemoteMissionsInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StopSyncRemoteMissionsInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StopSyncRemoteMissionsInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StopSyncRemoteMissionsInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::STOP_SYNC_MISSIONS;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::STOP_SYNC_MISSIONS);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1325,7 +1325,7 @@ HWTEST_F(DistributedSchedStubTest, NotifyMissionsChangedFromRemoteInner_001, Tes
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartSyncRemoteMissionsInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartSyncRemoteMissionsInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartSyncRemoteMissionsInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartSyncRemoteMissionsInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_SYNC_MISSIONS;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_SYNC_MISSIONS);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1345,7 +1345,7 @@ HWTEST_F(DistributedSchedStubTest, StartSyncRemoteMissionsInner_001, TestSize.Le
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartSyncRemoteMissionsInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartSyncRemoteMissionsInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartSyncRemoteMissionsInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartSyncRemoteMissionsInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_SYNC_MISSIONS;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_SYNC_MISSIONS);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1404,7 +1404,7 @@ HWTEST_F(DistributedSchedStubTest, CallerInfoUnmarshalling_001, TestSize.Level3)
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityByCallInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityByCallInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityByCallInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityByCallInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_REMOTE_ABILITY_BY_CALL;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_ABILITY_BY_CALL);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1424,7 +1424,7 @@ HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityByCallInner_001, TestSize.L
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityByCallInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityByCallInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityByCallInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityByCallInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_REMOTE_ABILITY_BY_CALL;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_ABILITY_BY_CALL);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1457,7 +1457,7 @@ HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityByCallInner_002, TestSize.L
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityByCallInner_003, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityByCallInner_003, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityByCallInner_003 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartRemoteAbilityByCallInner_003 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_REMOTE_ABILITY_BY_CALL;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_ABILITY_BY_CALL);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1486,7 +1486,7 @@ HWTEST_F(DistributedSchedStubTest, StartRemoteAbilityByCallInner_003, TestSize.L
|
|||||||
HWTEST_F(DistributedSchedStubTest, ReleaseRemoteAbilityInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, ReleaseRemoteAbilityInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest ReleaseRemoteAbilityInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest ReleaseRemoteAbilityInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::RELEASE_REMOTE_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::RELEASE_REMOTE_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1506,7 +1506,7 @@ HWTEST_F(DistributedSchedStubTest, ReleaseRemoteAbilityInner_001, TestSize.Level
|
|||||||
HWTEST_F(DistributedSchedStubTest, ReleaseRemoteAbilityInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, ReleaseRemoteAbilityInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest ReleaseRemoteAbilityInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest ReleaseRemoteAbilityInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::RELEASE_REMOTE_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::RELEASE_REMOTE_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1648,7 +1648,7 @@ HWTEST_F(DistributedSchedStubTest, ReleaseAbilityFromRemoteInner_001, TestSize.L
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartRemoteShareFormInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartRemoteShareFormInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartRemoteShareFormInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartRemoteShareFormInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_REMOTE_SHARE_FORM;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_SHARE_FORM);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1668,7 +1668,7 @@ HWTEST_F(DistributedSchedStubTest, StartRemoteShareFormInner_001, TestSize.Level
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartRemoteShareFormInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartRemoteShareFormInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartRemoteShareFormInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartRemoteShareFormInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_REMOTE_SHARE_FORM;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_SHARE_FORM);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1721,7 +1721,7 @@ HWTEST_F(DistributedSchedStubTest, StartShareFormFromRemoteInner_001, TestSize.L
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartRemoteFreeInstallInner_001, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartRemoteFreeInstallInner_001, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartRemoteFreeInstallInner_001 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartRemoteFreeInstallInner_001 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_REMOTE_FREE_INSTALL;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_FREE_INSTALL);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1741,7 +1741,7 @@ HWTEST_F(DistributedSchedStubTest, StartRemoteFreeInstallInner_001, TestSize.Lev
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartRemoteFreeInstallInner_002, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartRemoteFreeInstallInner_002, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartRemoteFreeInstallInner_002 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartRemoteFreeInstallInner_002 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_REMOTE_FREE_INSTALL;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_FREE_INSTALL);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -1782,7 +1782,7 @@ HWTEST_F(DistributedSchedStubTest, StartRemoteFreeInstallInner_002, TestSize.Lev
|
|||||||
HWTEST_F(DistributedSchedStubTest, StartRemoteFreeInstallInner_003, TestSize.Level3)
|
HWTEST_F(DistributedSchedStubTest, StartRemoteFreeInstallInner_003, TestSize.Level3)
|
||||||
{
|
{
|
||||||
DTEST_LOG << "DistributedSchedStubTest StartRemoteFreeInstallInner_003 begin" << std::endl;
|
DTEST_LOG << "DistributedSchedStubTest StartRemoteFreeInstallInner_003 begin" << std::endl;
|
||||||
int32_t code = DistributedSchedStub::START_REMOTE_FREE_INSTALL;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::START_REMOTE_FREE_INSTALL);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
@ -2112,7 +2112,7 @@ HWTEST_F(DistributedSchedStubTest, StopRemoteExtensionAbilityInner_002, TestSize
|
|||||||
CallerInfo callerInfo2;
|
CallerInfo callerInfo2;
|
||||||
distributedSchedStub_->SaveExtraInfo(extraInfoJson2, callerInfo2);
|
distributedSchedStub_->SaveExtraInfo(extraInfoJson2, callerInfo2);
|
||||||
|
|
||||||
int32_t code = DistributedSchedStub::STOP_REMOTE_EXTERNSION_ABILITY;
|
int32_t code = static_cast<uint32_t>(IDSchedInterfaceCode::STOP_REMOTE_EXTERNSION_ABILITY);
|
||||||
MessageParcel data;
|
MessageParcel data;
|
||||||
MessageParcel reply;
|
MessageParcel reply;
|
||||||
MessageOption option;
|
MessageOption option;
|
||||||
|
Loading…
Reference in New Issue
Block a user