Lines Matching full:networkid
198 …LOGI("OpenP2PConnection networkId %{public}s", Utils::GetAnonyString(deviceInfo.networkId).c_str()… in OpenP2PConnection()
201 RemoveDfsDelayTask(deviceInfo.networkId); in OpenP2PConnection()
206 ConnectCount::GetInstance()->AddConnect(callingTokenId, deviceInfo.networkId, listener); in OpenP2PConnection()
209 ConnectCount::GetInstance()->RemoveConnect(callingTokenId, deviceInfo.networkId); in OpenP2PConnection()
219 …LOGI("Close P2P Connection networkId %{public}s", Utils::GetAnonyString(deviceInfo.networkId).c_st… in CloseP2PConnection()
221 auto networkId = std::string(deviceInfo.networkId); in CloseP2PConnection() local
222 ConnectCount::GetInstance()->RemoveConnect(callingTokenId, networkId); in CloseP2PConnection()
237 auto networkId = std::string(deviceInfo.networkId); in ConnectionCount() local
239 if (!ConnectCount::GetInstance()->CheckCount(networkId)) { in ConnectionCount()
241 DevslDispatcher::GetDeviceDevsl(networkId); in ConnectionCount()
243 ret = ConnectionDetector::RepeatGetConnectionStatus(targetDir, networkId); in ConnectionCount()
246 if (ConnectionDetector::RepeatGetConnectionStatus(targetDir, networkId) != E_OK) { in ConnectionCount()
265 auto networkId = std::string(deviceInfo.networkId); in CleanUp() local
266 if (!ConnectCount::GetInstance()->CheckCount(networkId)) { in CleanUp()
267 auto ret = SendDfsDelayTask(networkId); in CleanUp()
275 const std::string &networkId, uint32_t callingTokenId, sptr<IFileDfsListener> remoteReverseObj) in ConnectionAndMount() argument
283 ConnectCount::GetInstance()->RemoveConnect(callingTokenId, networkId); in ConnectionAndMount()
287 ConnectCount::GetInstance()->AddConnect(callingTokenId, networkId, remoteReverseObj); in ConnectionAndMount()
294 std::string deviceId = deviceManager->GetDeviceIdByNetworkId(networkId); in ConnectionAndMount()
295 ret = deviceManager->MountDfsDocs(networkId, deviceId); in ConnectionAndMount()
297 ConnectCount::GetInstance()->RemoveConnect(callingTokenId, networkId); in ConnectionAndMount()
303 int32_t Daemon::OpenP2PConnectionEx(const std::string &networkId, sptr<IFileDfsListener> remoteReve… in OpenP2PConnectionEx() argument
306 …LOGI("Daemon::OpenP2PConnectionEx start, networkId %{public}s", Utils::GetAnonyString(networkId).c… in OpenP2PConnectionEx()
325 if (networkId.empty() || networkId.length() >= DM_MAX_DEVICE_ID_LEN) { in OpenP2PConnectionEx()
326 LOGE("Daemon::OpenP2PConnectionEx networkId length is invalid."); in OpenP2PConnectionEx()
330 auto res = strcpy_s(deviceInfo.networkId, DM_MAX_DEVICE_ID_LEN, networkId.c_str()); in OpenP2PConnectionEx()
336 RemoveDfsDelayTask(networkId); in OpenP2PConnectionEx()
337 int32_t ret = ConnectionAndMount(deviceInfo, networkId, callingTokenId, remoteReverseObj); in OpenP2PConnectionEx()
346 int32_t Daemon::CloseP2PConnectionEx(const std::string &networkId) in CloseP2PConnectionEx() argument
349 …LOGI("Daemon::CloseP2PConnectionEx start, networkId: %{public}s", Utils::GetAnonyString(networkId)… in CloseP2PConnectionEx()
356 if (networkId.empty() || networkId.length() >= DM_MAX_DEVICE_ID_LEN) { in CloseP2PConnectionEx()
357 …LOGE("Daemon::CloseP2PConnectionEx networkId length is invalid. len: %{public}zu", networkId.leng… in CloseP2PConnectionEx()
360 std::string deviceId = deviceManager->GetDeviceIdByNetworkId(networkId); in CloseP2PConnectionEx()
367 int32_t ret_umount = deviceManager->UMountDfsDocs(networkId, deviceId, false); in CloseP2PConnectionEx()
374 auto res = strcpy_s(deviceInfo.networkId, DM_MAX_DEVICE_ID_LEN, networkId.c_str()); in CloseP2PConnectionEx()
379 ConnectCount::GetInstance()->RemoveConnect(callingTokenId, networkId); in CloseP2PConnectionEx()
453 auto res = strcpy_s(deviceInfo.networkId, DM_MAX_DEVICE_ID_LEN, srcDeviceId.c_str()); in InnerCopy()
739 …LOGI("Copy localDeviceInfo.networkId: %{public}s", Utils::GetAnonyString(localDeviceInfo.networkId… in Copy()
740 auto ret = daemon->RequestSendFile(srcUri, dstPath, localDeviceInfo.networkId, sessionName); in Copy()
804 LOGE("[DfsListenerDeathRecipient] networkId is null"); in OnRemoteDied()
809 LOGE("fail to get deviceId, networkId: %{public}s", Utils::GetAnonyString(*it).c_str()); in OnRemoteDied()
814 auto res = strcpy_s(deviceInfo.networkId, DM_MAX_DEVICE_ID_LEN, it->c_str()); in OnRemoteDied()
901 int32_t Daemon::SendDfsDelayTask(const std::string &networkId) in SendDfsDelayTask() argument
905 if (networkId.empty()) { in SendDfsDelayTask()
906 LOGE("networkId is empty."); in SendDfsDelayTask()
909 LOGI("SendDfsDelayTask NetworkId:%{public}.5s", networkId.c_str()); in SendDfsDelayTask()
916 auto executeFunc = [this, networkId] { DisconnectDevice(networkId); }; in SendDfsDelayTask()
917 bool isSucc = eventHandler_->PostTask(executeFunc, networkId, DEFAULT_DELAY_INTERVAL, in SendDfsDelayTask()
926 void Daemon::RemoveDfsDelayTask(const std::string &networkId) in RemoveDfsDelayTask() argument
934 LOGI("RemoveDfsDelayTask NetworkId:%{public}.5s", networkId.c_str()); in RemoveDfsDelayTask()
935 eventHandler_->RemoveTask(networkId); in RemoveDfsDelayTask()
938 void Daemon::DisconnectDevice(const std::string networkId) in DisconnectDevice() argument
942 auto ret = strcpy_s(deviceInfo.networkId, DM_MAX_DEVICE_ID_LEN, networkId.c_str()); in DisconnectDevice()
947 LOGI("DisconnectDevice NetworkId:%{public}.5s", networkId.c_str()); in DisconnectDevice()
978 int32_t Daemon::GetDfsSwitchStatus(const std::string &networkId, int32_t &switchStatus) in GetDfsSwitchStatus() argument
980 … LOGI("GetDfsSwitchStatus enter. networkId: %{public}s", Utils::GetAnonyString(networkId).c_str()); in GetDfsSwitchStatus()
998 void Daemon::DisconnectByRemote(const string &networkId) in DisconnectByRemote() argument
1001 if (networkId.empty() || networkId.length() >= DM_MAX_DEVICE_ID_LEN) { in DisconnectByRemote()
1002 …LOGE("Daemon::DisconnectByRemote networkId length is invalid. len: %{public}zu", networkId.length(… in DisconnectByRemote()
1005 string subnetworkId = networkId.substr(0, VALID_MOUNT_NETWORKID_LEN); in DisconnectByRemote()
1006 int32_t res = DeviceManagerAgent::GetInstance()->UMountDfsDocs(networkId, subnetworkId, true); in DisconnectByRemote()
1012 res = strcpy_s(deviceInfo.networkId, DM_MAX_DEVICE_ID_LEN, networkId.c_str()); in DisconnectByRemote()
1017 ConnectCount::GetInstance()->RemoveConnect(IPCSkeleton::GetCallingTokenID(), networkId); in DisconnectByRemote()
1025 int32_t Daemon::CreatControlLink(const std::string &networkId) in CreatControlLink() argument
1028 if (ChannelManager::GetInstance().HasExistChannel(networkId)) { in CreatControlLink()
1029 LOGI("exist channel, networkId: %{public}.6s", networkId.c_str()); in CreatControlLink()
1034 …auto ret = DeviceProfileAdapter::GetInstance().GetDfsVersionFromNetworkId(networkId, remoteDfsVers… in CreatControlLink()
1041 if (ChannelManager::GetInstance().CreateClientChannel(networkId) != ERR_OK) { in CreatControlLink()
1042 LOGE("create channel failed, networkId: %{public}.6s", networkId.c_str()); in CreatControlLink()
1048 int32_t Daemon::CancelControlLink(const std::string &networkId) in CancelControlLink() argument
1050 if (!ChannelManager::GetInstance().HasExistChannel(networkId)) { in CancelControlLink()
1051 LOGI("not exist channel, networkId: %{public}.6s", networkId.c_str()); in CancelControlLink()
1054 if (ChannelManager::GetInstance().DestroyClientChannel(networkId) != ERR_OK) { in CancelControlLink()
1055 LOGE("create channel failed, networkId: %{public}.6s", networkId.c_str()); in CancelControlLink()
1061 int32_t Daemon::CheckRemoteAllowConnect(const std::string &networkId) in CheckRemoteAllowConnect() argument
1064 int32_t ret = CreatControlLink(networkId); in CheckRemoteAllowConnect()
1073 ret = ChannelManager::GetInstance().SendRequest(networkId, request, response, true); in CheckRemoteAllowConnect()
1082 int32_t Daemon::NotifyRemotePublishNotification(const std::string &networkId) in NotifyRemotePublishNotification() argument
1085 int32_t ret = CreatControlLink(networkId); in NotifyRemotePublishNotification()
1099 request.networkId = srcNetId; in NotifyRemotePublishNotification()
1102 ret = ChannelManager::GetInstance().SendRequest(networkId, request, response); in NotifyRemotePublishNotification()
1110 int32_t Daemon::NotifyRemoteCancelNotification(const std::string &networkId) in NotifyRemoteCancelNotification() argument
1113 int32_t ret = CreatControlLink(networkId); in NotifyRemoteCancelNotification()
1127 request.networkId = srcNetId; in NotifyRemoteCancelNotification()
1130 ret = ChannelManager::GetInstance().SendRequest(networkId, request, response); in NotifyRemoteCancelNotification()