mirror of
https://gitee.com/openharmony/deviceprofile_device_info_manager
synced 2024-11-23 07:30:13 +00:00
修改检视意见
Signed-off-by: wangzhaohao <wangzhaohao@huawei.com>
This commit is contained in:
parent
7a8a79bc49
commit
3ee37db67e
@ -31,11 +31,11 @@ public:
|
||||
DpInitedCallbackStub();
|
||||
~DpInitedCallbackStub();
|
||||
|
||||
virtual int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
|
||||
MessageOption &option) override;
|
||||
virtual int32_t OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply,
|
||||
MessageOption& option) override;
|
||||
|
||||
private:
|
||||
int32_t OnDpInitedInner(MessageParcel &data, MessageParcel &reply);
|
||||
int32_t OnDpInitedInner(MessageParcel& data, MessageParcel& reply);
|
||||
};
|
||||
} // namespace DistributedDeviceProfile
|
||||
} // namespace OHOS
|
||||
|
@ -307,7 +307,7 @@ int32_t DistributedDeviceProfileClient::DeleteCharacteristicProfile(const std::s
|
||||
return dpService->DeleteCharacteristicProfile(deviceId, serviceName, characteristicKey);
|
||||
}
|
||||
|
||||
int32_t DistributedDeviceProfileClient::SubscribeDeviceProfile(const SubscribeInfo& subscribeInfo)
|
||||
int32_t DistributedDeviceProfileClient::SubscribeDeviceProfile(const SubscribeInfo& subscribeInfo)
|
||||
{
|
||||
SubscribeDeviceProfileSA();
|
||||
auto dpService = GetDeviceProfileService();
|
||||
@ -493,13 +493,13 @@ int32_t DistributedDeviceProfileClient::SubscribeDeviceProfileInited(int32_t saI
|
||||
HILOGE("SyncCb ipc cast fail!");
|
||||
return DP_SUBSCRIBE_INITED_FALI;
|
||||
}
|
||||
int32_t ret = dpService->SubscribeDeviceProfileInited(saId, dpInitedCallback);
|
||||
if (ret != DP_SUCCESS) {
|
||||
HILOGE("Subscribe DP Inited failed!");
|
||||
return ret;
|
||||
}
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(serviceLock_);
|
||||
int32_t ret = dpService->SubscribeDeviceProfileInited(saId, dpInitedCallback);
|
||||
if (ret != DP_SUCCESS) {
|
||||
HILOGE("Subscribe DP Inited failed!");
|
||||
return ret;
|
||||
}
|
||||
saId_ = saId;
|
||||
dpInitedCallback_ = initedCb;
|
||||
}
|
||||
@ -524,13 +524,13 @@ int32_t DistributedDeviceProfileClient::UnSubscribeDeviceProfileInited(int32_t s
|
||||
HILOGE("saId is invalid, saId:%{public}d", saId);
|
||||
return DP_INVALID_PARAM;
|
||||
}
|
||||
int32_t ret = dpService->UnSubscribeDeviceProfileInited(saId);
|
||||
if (ret != DP_SUCCESS) {
|
||||
HILOGE("Unsubscribe DP Inited failed!");
|
||||
return ret;
|
||||
}
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(serviceLock_);
|
||||
int32_t ret = dpService->UnSubscribeDeviceProfileInited(saId);
|
||||
if (ret != DP_SUCCESS) {
|
||||
HILOGE("Unsubscribe DP Inited failed!");
|
||||
return ret;
|
||||
}
|
||||
dpInitedCallback_ = nullptr;
|
||||
}
|
||||
HILOGI("Unsubscribe DP Inited succeed!");
|
||||
|
@ -96,10 +96,6 @@ void DistributedDeviceProfileStub::InitNewIpcInterface()
|
||||
&DistributedDeviceProfileStub::SendSubscribeInfosInner;
|
||||
funcsMap_[static_cast<uint32_t>(DPInterfaceCode::SYNC_DEVICE_PROFILE_NEW)] =
|
||||
&DistributedDeviceProfileStub::SyncDeviceProfileNewInner;
|
||||
funcsMap_[static_cast<uint32_t>(DPInterfaceCode::SUBSCRIBE_DEVICE_PROFILE_INITED)] =
|
||||
&DistributedDeviceProfileStub::SubscribeDeviceProfileInitedInner;
|
||||
funcsMap_[static_cast<uint32_t>(DPInterfaceCode::UNSUBSCRIBE_DEVICE_PROFILE_INITED)] =
|
||||
&DistributedDeviceProfileStub::UnSubscribeDeviceProfileInitedInner;
|
||||
InitAclAndSubscribe();
|
||||
}
|
||||
|
||||
|
@ -73,10 +73,6 @@ DistributedDeviceProfileStubNew::DistributedDeviceProfileStubNew()
|
||||
&DistributedDeviceProfileStubNew::SyncDeviceProfileInner;
|
||||
funcsMap_[static_cast<uint32_t>(DPInterfaceCode::SEND_SUBSCRIBE_INFOS)] =
|
||||
&DistributedDeviceProfileStubNew::SendSubscribeInfosInner;
|
||||
funcsMap_[static_cast<uint32_t>(DPInterfaceCode::SUBSCRIBE_DEVICE_PROFILE_INITED)] =
|
||||
&DistributedDeviceProfileStubNew::SubscribeDeviceProfileInitedInner;
|
||||
funcsMap_[static_cast<uint32_t>(DPInterfaceCode::UNSUBSCRIBE_DEVICE_PROFILE_INITED)] =
|
||||
&DistributedDeviceProfileStubNew::UnSubscribeDeviceProfileInitedInner;
|
||||
InitAclAndSubscribe();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user