/ohos5.0/foundation/communication/dsoftbus/core/transmission/trans_channel/common/src/ |
H A D | trans_channel_limit.c | 28 const char *sessionName; member 38 .sessionName = "com.huawei.devicegroupmanage", 42 .sessionName = "IShareAuthSession", 50 .sessionName = "com.huawei.plrdtest.dsoftbus", 58 .sessionName = "com.huawei.dmsdp+dmsdp", 62 .sessionName = "com.huawei.devicemanager.dynamic", 78 if (sessionName == NULL) { in CheckSessionNameValidOnAuthChannel() 84 if (CompareString(g_sessionWhiteList[index].sessionName, sessionName, in CheckSessionNameValidOnAuthChannel() 90 Anonymize(sessionName, &tmpName); in CheckSessionNameValidOnAuthChannel() 97 bool IsNoPkgNameSession(const char *sessionName) in IsNoPkgNameSession() argument [all …]
|
/ohos5.0/foundation/communication/dsoftbus/tests/sdk/transmission/trans_channel/permission/ |
H A D | trans_dynamic_permission_test.cpp | 129 ret = AddDynamicPermission(g_permUid, g_permPid, sessionName.c_str()); 134 ret = AddDynamicPermission(g_permUid, testPid, sessionName.c_str()); 147 ret = DeleteDynamicPermission(sessionName.c_str()); 151 ret = AddDynamicPermission(g_permUid, testPid, sessionName.c_str()); 154 ret = DeleteDynamicPermission(sessionName.c_str()); 160 ret = DeleteDynamicPermission(sessionName.c_str()); 161 ASSERT_EQ(ret, SOFTBUS_OK) << sessionName; 186 ret = CheckTransSecLevel(sessionName.c_str(), sessionName.c_str()); 194 ret = DeleteDynamicPermission(sessionName.c_str()); 225 ret = CheckTransSecLevel(sessionName.c_str(), sessionName.c_str()); [all …]
|
/ohos5.0/foundation/communication/ipc/ipc/native/c/rpc/ipc_adapter/small/ |
H A D | ipc_stub_inner.c | 59 WriteString(reply, sessionName); in MakeStubCached() 98 free(current->sessionName); in InvokerDataBusThread() 99 current->sessionName = NULL; in InvokerDataBusThread() 109 if (strcpy_s(current->sessionName, sessionNameLen + 1, sessionName) != EOK) { in InvokerDataBusThread() 110 free(current->sessionName); in InvokerDataBusThread() 144 if (sessionName == NULL || strlen(sessionName) == 0) { in GetPidAndUidInfoStub() 149 free(sessionName); in GetPidAndUidInfoStub() 150 sessionName = NULL; in GetPidAndUidInfoStub() 178 if (sessionName == NULL) { in GrantDataBusNameStub() 184 free(sessionName); in GrantDataBusNameStub() [all …]
|
/ohos5.0/foundation/filemanagement/dfs_service/services/distributedfiledaemon/src/network/softbus/ |
H A D | softbus_file_receive_listener.cpp | 97 std::string sessionName = ""; in GetLocalSessionName() local 98 sessionName = SoftBusHandler::GetSessionName(sessionId); in GetLocalSessionName() 99 return sessionName; in GetLocalSessionName() 111 std::string sessionName = GetLocalSessionName(sessionId); in OnReceiveFileProcess() local 112 if (sessionName.empty()) { in OnReceiveFileProcess() 122 std::string sessionName = GetLocalSessionName(sessionId); in OnReceiveFileFinished() local 123 if (sessionName.empty()) { in OnReceiveFileFinished() 128 TransManager::GetInstance().DeleteTransTask(sessionName); in OnReceiveFileFinished() 140 if (sessionName.empty()) { in OnFileTransError() 153 if (sessionName.empty()) { in OnReceiveFileReport() [all …]
|
H A D | softbus_handler.cpp | 98 std::string sessionName = ""; in GetSessionName() local 102 sessionName = iter->second; in GetSessionName() 103 return sessionName; in GetSessionName() 106 return sessionName; in GetSessionName() 279 … RadarDotsSendFile("OpenSession", sessionName, sessionName, ret, Utils::StageRes::STAGE_FAIL); in CopySendFile() 282 RadarDotsSendFile("OpenSession", sessionName, sessionName, ret, Utils::StageRes::STAGE_SUCCESS); in CopySendFile() 288 if (sessionName.empty()) { in ChangeOwnerIfNeeded() 338 if (sessionName.empty()) { in CloseSessionWithSessionName() 355 CloseSession(sessionId, sessionName); in CloseSessionWithSessionName() 410 if (sessionName.empty()) { in CopyOnStop() [all …]
|
H A D | softbus_file_send_listener.cpp | 56 std::string sessionName = ""; in GetLocalSessionName() local 57 sessionName = SoftBusHandler::GetSessionName(sessionId); in GetLocalSessionName() 58 return sessionName; in GetLocalSessionName() 70 std::string sessionName = GetLocalSessionName(sessionId); in OnSendFileFinished() local 71 if (sessionName.empty()) { in OnSendFileFinished() 75 SoftBusHandler::GetInstance().CloseSession(sessionId, sessionName); in OnSendFileFinished() 81 std::string sessionName = GetLocalSessionName(sessionId); in OnFileTransError() local 82 if (sessionName.empty()) { in OnFileTransError() 86 SoftBusHandler::GetInstance().CloseSession(sessionId, sessionName); in OnFileTransError() 97 std::string sessionName = GetLocalSessionName(sessionId); in OnSendFileShutdown() local [all …]
|
H A D | softbus_session_pool.cpp | 33 std::string sessionName = std::string(SESSION_NAME_PREFIX) + std::to_string(i); in GenerateSessionName() local 34 auto it = sessionMap_.find(sessionName); in GenerateSessionName() 36 sessionMap_.insert(std::pair<std::string, SessionInfo>(sessionName, sessionInfo)); in GenerateSessionName() 37 return sessionName; in GenerateSessionName() 43 void SoftBusSessionPool::AddSessionInfo(const std::string &sessionName, const SessionInfo &sessionI… in AddSessionInfo() argument 46 sessionMap_.insert(std::pair<std::string, SessionInfo>(sessionName, sessionInfo)); in AddSessionInfo() 49 void SoftBusSessionPool::DeleteSessionInfo(const std::string &sessionName) in DeleteSessionInfo() argument 52 sessionMap_.erase(sessionName); in DeleteSessionInfo() 55 bool SoftBusSessionPool::GetSessionInfo(const std::string &sessionName, SessionInfo &sessionInfo) in GetSessionInfo() argument 59 if (it.first == sessionName) { in GetSessionInfo()
|
/ohos5.0/foundation/filemanagement/dfs_service/services/cloudsyncservice/src/transport/softbus/ |
H A D | softbus_adapter.cpp | 42 .name = const_cast<char*>(sessionName), in CreateSessionServer() 96 string sessionName = info.name; in OnBind() local 98 if (sessionName.empty()) { in OnBind() 117 if (sessionName.empty()) { in OnShutdown() 136 if (sessionName.empty()) { in OnBytes() 172 if (sessionName.empty()) { in OnReceiveFileFinished() 210 .name = sessionName, in OpenSession() 211 .peerName = sessionName, in OpenSession() 324 listeners_[sessionName] = listener; in RegisterSessionListener() 330 listeners_.erase(sessionName); in UnRegisterSessionListener() [all …]
|
/ohos5.0/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/src/ |
H A D | softbus_proxychannel_network.c | 28 char sessionName[SESSION_NAME_SIZE_MAX]; member 34 static INetworkingListenerEntry *FindListenerEntry(const char *sessionName) in FindListenerEntry() argument 37 if (strcmp(sessionName, g_listeners[i].sessionName) == 0) { in FindListenerEntry() 47 INetworkingListenerEntry *entry = FindListenerEntry(sessionName); in NotifyNetworkingChannelOpened() 63 INetworkingListenerEntry *entry = FindListenerEntry(sessionName); in NotifyNetworkingChannelOpenFailed() 71 void NotifyNetworkingChannelClosed(const char *sessionName, int32_t channelId) in NotifyNetworkingChannelClosed() argument 73 INetworkingListenerEntry *entry = FindListenerEntry(sessionName); in NotifyNetworkingChannelClosed() 83 INetworkingListenerEntry *entry = FindListenerEntry(sessionName); in NotifyNetworkingMsgReceived() 94 if (strlen(g_listeners[i].sessionName) == 0) { in TransRegisterNetworkingChannelListener() 98 if (strcmp(sessionName, g_listeners[i].sessionName) == 0) { in TransRegisterNetworkingChannelListener() [all …]
|
/ohos5.0/foundation/filemanagement/dfs_service/test/unittests/distributed_file_daemon/ |
H A D | trans_mananger_test.cpp | 59 string sessionName; variable 69 string sessionName; variable 79 string sessionName; variable 80 transManager_->DeleteTransTask(sessionName); 88 string sessionName; variable 105 string sessionName; variable 115 string sessionName; variable 125 string sessionName; variable 134 string sessionName; variable 143 string sessionName; variable [all …]
|
/ohos5.0/foundation/filemanagement/dfs_service/services/distributedfiledaemon/test/unittest/network/softbus/ |
H A D | softbus_handler_test.cpp | 121 std::string sessionName = "testSession"; variable 126 handler.serverIdMap_.erase(sessionName); 132 handler.serverIdMap_.erase(sessionName); 144 handler.serverIdMap_.erase(sessionName); 160 std::string sessionName = "testSession"; variable 186 std::string sessionName = "testSession"; variable 225 std::string sessionName = "testSession"; variable 288 EXPECT_EQ(sessionName, ""); 384 string sessionName = "sessionName"; variable 427 string sessionName = "sessionName"; variable [all …]
|
H A D | softbus_session_pool_test.cpp | 64 EXPECT_EQ(sessionName, sessionName1); 65 sessionName = SoftBusSessionPool::GetInstance().GenerateSessionName(sessionInfo2); 66 EXPECT_EQ(sessionName, sessionName2); 100 EXPECT_EQ(sessionName, "DistributedFileService0"); 110 sessionName = SoftBusSessionPool::GetInstance().GenerateSessionName(sessionInfo1); 111 EXPECT_EQ(sessionName, "DistributedFileService9"); 112 SoftBusSessionPool::GetInstance().AddSessionInfo(sessionName, sessionInfo1); 113 sessionName = SoftBusSessionPool::GetInstance().GenerateSessionName(sessionInfo1); 114 EXPECT_EQ(sessionName, ""); 121 sessionName = SoftBusSessionPool::GetInstance().GenerateSessionName(sessionInfo1); [all …]
|
/ohos5.0/foundation/communication/dsoftbus/core/transmission/session/src/ |
H A D | trans_session_manager.c | 83 if (sessionName == NULL) { in TransSessionServerIsExist() 99 if (strcmp(pos->sessionName, sessionName) == 0) { in TransSessionServerIsExist() 146 if (strcmp(pos->sessionName, newNode->sessionName) == 0) { in TransSessionServerAddItem() 183 if (sessionName == NULL) { in TransSessionServerDelItem() 198 if (strcmp(pos->sessionName, sessionName) == 0) { in TransSessionServerDelItem() 218 if (sessionName == NULL) { in CheckUidAndPid() 233 if (strcmp(pos->sessionName, sessionName) == 0 && in CheckUidAndPid() 290 if (strcmp(pos->sessionName, sessionName) == 0) { in TransGetPkgNameBySessionName() 303 Anonymize(sessionName, &tmpName); in TransGetPkgNameBySessionName() 327 Anonymize(sessionName, &tmpName); in TransGetUidAndPid() [all …]
|
H A D | trans_session_service.c | 90 int32_t TransCreateSessionServer(const char *pkgName, const char *sessionName, int32_t uid, int32_t… in TransCreateSessionServer() argument 93 !IsValidString(sessionName, SESSION_NAME_SIZE_MAX - 1)) { in TransCreateSessionServer() 97 Anonymize(sessionName, &tmpName); in TransCreateSessionServer() 109 if (strcpy_s(newNode->sessionName, sizeof(newNode->sessionName), sessionName) != EOK) { in TransCreateSessionServer() 119 .socketName = sessionName, in TransCreateSessionServer() 137 int32_t TransRemoveSessionServer(const char *pkgName, const char *sessionName) in TransRemoveSessionServer() argument 140 !IsValidString(sessionName, SESSION_NAME_SIZE_MAX - 1)) { in TransRemoveSessionServer() 143 int32_t ret = TransSessionServerDelItem(sessionName); in TransRemoveSessionServer() 145 .socketName = sessionName, in TransRemoveSessionServer() 156 if (!IsValidString(param->sessionName, SESSION_NAME_SIZE_MAX) || in TransOpenSession() [all …]
|
/ohos5.0/foundation/filemanagement/dfs_service/services/distributedfiledaemon/src/ipc/ |
H A D | trans_mananger.cpp | 32 auto iter = sessionTransMap_.find(sessionName); in NotifyFileProgress() 44 void TransManager::NotifyFileFailed(const std::string &sessionName, int32_t errorCode) in NotifyFileFailed() argument 47 auto iter = sessionTransMap_.find(sessionName); in NotifyFileFailed() 56 iter->second->OnFailed(sessionName, errorCode); in NotifyFileFailed() 59 void TransManager::NotifyFileFinished(const std::string &sessionName) in NotifyFileFinished() argument 62 auto iter = sessionTransMap_.find(sessionName); in NotifyFileFinished() 71 iter->second->OnFinished(sessionName); in NotifyFileFinished() 77 auto iter = sessionTransMap_.find(sessionName); in AddTransTask() 82 sessionTransMap_.insert(std::make_pair(sessionName, listener)); in AddTransTask() 85 void TransManager::DeleteTransTask(const std::string &sessionName) in DeleteTransTask() argument [all …]
|
/ohos5.0/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/file/src/ |
H A D | client_trans_file_virtual.c | 28 int32_t TransSetFileReceiveListener(const char *sessionName, in TransSetFileReceiveListener() argument 31 (void)sessionName; in TransSetFileReceiveListener() 37 int32_t TransSetFileSendListener(const char *sessionName, const IFileSendListener *sendListener) in TransSetFileSendListener() argument 39 (void)sessionName; in TransSetFileSendListener() 44 int32_t TransGetFileListener(const char *sessionName, FileListener *fileListener) in TransGetFileListener() argument 46 (void)sessionName; in TransGetFileListener() 51 void TransDeleteFileListener(const char *sessionName) in TransDeleteFileListener() argument 53 (void)sessionName; in TransDeleteFileListener() 61 int32_t TransOnFileChannelOpened(const char *sessionName, const ChannelInfo *channel, int32_t *file… in TransOnFileChannelOpened() argument 63 (void)sessionName; in TransOnFileChannelOpened()
|
H A D | client_trans_file_listener.c | 64 int32_t TransSetFileReceiveListener(const char *sessionName, in TransSetFileReceiveListener() argument 76 if (strcmp(fileNode->mySessionName, sessionName) == 0) { in TransSetFileReceiveListener() 110 Anonymize(sessionName, &tmpName); in TransSetFileReceiveListener() 130 if (strcmp(fileNode->mySessionName, sessionName) == 0) { in TransSetFileSendListener() 169 if (sessionName == NULL || fileCallback == NULL) { in TransAddNewSocketFileListener() 194 if (sessionName == NULL || fileCallback == NULL) { in TransSetSocketFileListener() 210 if (strcmp(fileNode->mySessionName, sessionName) == 0) { in TransSetSocketFileListener() 234 Anonymize(sessionName, &tmpName); in TransSetSocketFileListener() 268 void TransDeleteFileListener(const char *sessionName) in TransDeleteFileListener() argument 270 if (sessionName == NULL) { in TransDeleteFileListener() [all …]
|
/ohos5.0/foundation/communication/dsoftbus/sdk/transmission/ipc/mini/ |
H A D | trans_server_proxy.c | 35 int32_t ServerIpcCreateSessionServer(const char *pkgName, const char *sessionName) in ServerIpcCreateSessionServer() argument 37 return TransCreateSessionServer(pkgName, sessionName, 0, 0); in ServerIpcCreateSessionServer() 40 int32_t ServerIpcRemoveSessionServer(const char *pkgName, const char *sessionName) in ServerIpcRemoveSessionServer() argument 42 return TransRemoveSessionServer(pkgName, sessionName); in ServerIpcRemoveSessionServer() 52 if ((sessionName == NULL) || (addrInfo == NULL)) { in ServerIpcOpenAuthSession() 60 return TransOpenAuthChannel(sessionName, &connOpt, ""); in ServerIpcOpenAuthSession() 70 return TransCloseChannel(sessionName, channelId, channelType); in ServerIpcCloseChannel() 103 int32_t ServerIpcGrantPermission(int uid, int pid, const char *sessionName) in ServerIpcGrantPermission() argument 107 (void)sessionName; in ServerIpcGrantPermission() 111 int32_t ServerIpcRemovePermission(const char *sessionName) in ServerIpcRemovePermission() argument [all …]
|
/ohos5.0/foundation/communication/dsoftbus/core/common/security/permission/common/ |
H A D | permission_entry.c | 405 if (StrIsEmpty(sessionName)) { in CheckDBinder() 425 if (CompareString(pe->sessionName, sessionName, pe->regexp) == SOFTBUS_OK) { in HaveGrantedPermission() 564 if (CompareString(pe->sessionName, sessionName, pe->regexp) == SOFTBUS_OK) { in CheckPermissionEntry() 613 if (sessionName == NULL) { in PermIsSecLevelPublic() 616 if (CheckDBinder(sessionName)) { in PermIsSecLevelPublic() 626 if (CompareString(pe->sessionName, sessionName, pe->regexp) == SOFTBUS_OK) { in PermIsSecLevelPublic() 660 if (sessionName == NULL) { in NewDynamicPermissionEntry() 676 if (strcpy_s(permissionEntry->sessionName, SESSION_NAME_SIZE_MAX, sessionName) != EOK) { in NewDynamicPermissionEntry() 704 if (sessionName == NULL) { in AddDynamicPermission() 750 if (sessionName == NULL) { in DeleteDynamicPermission() [all …]
|
/ohos5.0/foundation/distributedhardware/distributed_screen/services/softbusadapter/test/unittest/src/ |
H A D | softbus_adapter_test.cpp | 92 std::string sessionName = DATA_SESSION_NAME; variable 133 std::string sessionName = DATA_SESSION_NAME; variable 150 std::string sessionName = DATA_SESSION_NAME; variable 167 std::string sessionName = DATA_SESSION_NAME; variable 184 std::string sessionName = DATA_SESSION_NAME; variable 203 std::string sessionName = DATA_SESSION_NAME; variable 222 std::string sessionName = DATA_SESSION_NAME; variable 237 std::string sessionName = DATA_SESSION_NAME; variable 254 std::string sessionName = ""; variable 271 std::string sessionName = DATA_SESSION_NAME; variable [all …]
|
/ohos5.0/foundation/communication/dsoftbus/tests/core/transmission/trans_channel/proxy_channel/ |
H A D | softbus_proxy_network_test.cpp | 69 (void)sessionName; in TestNormalChannelOpened() 129 char sessionName[TEST_NUMBER_256] = {0}; in TestRegisterNetworkingChannelListener() local 148 char sessionName[TEST_NUMBER_256] = {0}; variable 153 NotifyNetworkingChannelOpenFailed(sessionName, 1, NULL); 155 NotifyNetworkingChannelClosed(sessionName, 1); 157 NotifyNetworkingMsgReceived(sessionName, 1, NULL, 0); 169 char sessionName[TEST_NUMBER_256] = {0}; variable 176 NotifyNetworkingChannelOpenFailed(sessionName, 1, NULL); 178 NotifyNetworkingChannelClosed(sessionName, 1); 180 NotifyNetworkingMsgReceived(sessionName, 1, NULL, 0); [all …]
|
/ohos5.0/foundation/communication/dsoftbus/core/frame/small/init/src/ |
H A D | trans_server_stub.c | 46 const char *sessionName = (const char *)ReadString(req, &size); in ServerCreateSessionServer() local 47 if (sessionName == NULL) { in ServerCreateSessionServer() 77 if (sessionName == NULL) { in ServerRemoveSessionServer() 88 int32_t ret = TransRemoveSessionServer(pkgName, sessionName); in ServerRemoveSessionServer() 218 param.sessionName = (const char*)ReadString(req, &size); in ServerOpenSession() 269 ret = CheckOpenSessionPremission(sessionName, sessionName); in ServerOpenAuthSession() 274 ret = TransOpenAuthChannel(sessionName, &connOpt, ""); in ServerOpenAuthSession() 293 char sessionName[SESSION_NAME_SIZE_MAX]; in ServerNotifyAuthSuccess() local 322 const char *sessionName = NULL; in ServerCloseChannel() local 327 sessionName = (const char*)ReadString(req, &size); in ServerCloseChannel() [all …]
|
/ohos5.0/foundation/communication/ipc/ipc/native/c/rpc/ipc_adapter/mini/ |
H A D | ipc_proxy_inner.c | 57 if (!WriteString(reply, proxyObject->sessionName)) { in MakeInvokerListenReply() 73 int32_t sessionNameLen = strlen(proxyObject->sessionName); in InvokerListenThread() 84 if (current->sessionName != NULL) { in InvokerListenThread() 85 free(current->sessionName); in InvokerListenThread() 86 current->sessionName = NULL; in InvokerListenThread() 92 current->sessionName = (char *)malloc(sessionNameLen + 1); in InvokerListenThread() 93 if (current->sessionName == NULL) { in InvokerListenThread() 96 if (strcpy_s(current->sessionName, sessionNameLen + 1, proxyObject->sessionName) != EOK) { in InvokerListenThread() 97 free(current->sessionName); in InvokerListenThread() 131 if (proxyObject->sessionName == NULL) { in GetPidAndUidInfo() [all …]
|
/ohos5.0/foundation/communication/dsoftbus/core/transmission/trans_channel/manager/src/ |
H A D | trans_lane_manager.c | 36 char sessionName[SESSION_NAME_SIZE_MAX]; member 380 … if (strcmp(socketItem->sessionName, sessionName) == 0 && socketItem->sessionId == sessionId) { in GetSocketWithChannelInfoBySession() 390 Anonymize(sessionName, &tmpName); in AnonymizeLogSessionNameWhenNotFound() 399 if (sessionName == NULL) { in TransAddSocketChannelInfo() 412 if (strcpy_s(newSocket->sessionName, SESSION_NAME_SIZE_MAX, sessionName) != EOK) { in TransAddSocketChannelInfo() 435 Anonymize(sessionName, &tmpName); in TransAddSocketChannelInfo() 454 if (sessionName == NULL) { in CheckParamIsValid() 468 int32_t ret = CheckParamIsValid(sessionName, sessionId); in TransUpdateSocketChannelInfoBySession() 495 int32_t ret = CheckParamIsValid(sessionName, sessionId); in TransUpdateSocketChannelLaneInfoBySession() 537 … if (strcmp(socketItem->sessionName, sessionName) == 0 && socketItem->sessionId == sessionId) { in TransDeleteSocketChannelInfoBySession() [all …]
|
/ohos5.0/foundation/distributedhardware/distributed_camera/services/channel/test/unittest/common/channel/ |
H A D | dcamera_softbus_adapter_test.cpp | 71 std::string sessionName = "sourcetest01"; variable 89 std::string sessionName = "sourcetest02"; variable 108 std::string sessionName = "sourcetest03"; variable 129 std::string sessionName = "sourcetest04"; variable 151 std::string sessionName = "sourcetest03"; variable 176 std::string sessionName = "sourcetest03"; variable 216 std::string sessionName = "sourcetest03"; variable 247 std::string sessionName = "sourcetest03"; variable 278 std::string sessionName = "sourcetest03"; variable 311 std::string sessionName = "sourcetest03"; variable [all …]
|