/foundation/communication/dsoftbus/core/transmission/trans_channel/common/src/ |
H A D | trans_channel_limit.c | 28 const char *sessionName; member 34 .sessionName = "ohos.distributedhardware.devicemanager.resident", 38 .sessionName = "com.huawei.devicegroupmanage", 42 .sessionName = "IShareAuthSession", 46 .sessionName = "com.huawei.devicemanager.resident", 50 .sessionName = "com.huawei.plrdtest.dsoftbus", 54 .sessionName = "com.huawei.*CastPlusDiscoveryModule", 58 .sessionName = "com.huawei.dmsdp+dmsdp", 62 .sessionName = "com.huawei.devicemanager.dynamic", 72 bool CheckSessionNameValidOnAuthChannel(const char *sessionName) in CheckSessionNameValidOnAuthChannel() argument 93 IsNoPkgNameSession(const char *sessionName) IsNoPkgNameSession() argument [all...] |
/foundation/communication/ipc/ipc/native/c/rpc/ipc_adapter/small/ |
H A D | ipc_stub_inner.c | 38 const char *sessionName, const char *deviceID) in MakeStubCached() 59 WriteString(reply, sessionName); in MakeStubCached() 81 const char *sessionName = (const char*)ReadString(data, &sessionNameLen); in InvokerDataBusThread() local 83 IsDeviceIdIllegal(remoteDeviceID, remoteDeviceIDLen) != ERR_NONE || sessionName == NULL) { in InvokerDataBusThread() 93 if (CreateTransServer(sessionName) != ERR_NONE) { in InvokerDataBusThread() 97 if (current->sessionName != NULL) { in InvokerDataBusThread() 98 free(current->sessionName); in InvokerDataBusThread() 99 current->sessionName = NULL; in InvokerDataBusThread() 105 current->sessionName = (char *)malloc(sessionNameLen + 1); in InvokerDataBusThread() 106 if (current->sessionName in InvokerDataBusThread() 37 MakeStubCached(IpcIo *reply, OnRemoteRequest func, const char *sessionName, const char *deviceID) MakeStubCached() argument 143 char *sessionName = GetDataBusName(); GetPidAndUidInfoStub() local 177 char *sessionName = (char *)malloc(sessionNameLen + 1); GrantDataBusNameStub() local [all...] |
/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() 113 LOGE("sessionName is empty"); in OnReceiveFileProcess() 116 TransManager::GetInstance().NotifyFileProgress(sessionName, bytesTotal, bytesUpload); in OnReceiveFileProcess() 122 std::string sessionName = GetLocalSessionName(sessionId); in OnReceiveFileFinished() local 123 if (sessionName.empty()) { in OnReceiveFileFinished() 124 LOGE("sessionName i in OnReceiveFileFinished() 139 std::string sessionName = GetLocalSessionName(sessionId); OnFileTransError() local 152 std::string sessionName = GetLocalSessionName(sessionId); OnReceiveFileReport() local 163 std::string sessionName = GetLocalSessionName(sessionId); OnReceiveFileShutdown() local [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() 72 LOGE("sessionName is 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() 83 LOGE("sessionName i in OnFileTransError() 97 std::string sessionName = GetLocalSessionName(sessionId); 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 &sessionInfo) 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() [all...] |
H A D | softbus_handler.cpp | 78 std::string sessionName = ""; in GetSessionName() local 82 sessionName = iter->second; in GetSessionName() 83 return sessionName; in GetSessionName() 85 LOGE("sessionName not registered"); in GetSessionName() 86 return sessionName; in GetSessionName() 119 int32_t SoftBusHandler::CreateSessionServer(const std::string &packageName, const std::string &sessionName, in CreateSessionServer() argument 122 if (packageName.empty() || sessionName.empty() || physicalPath.empty()) { in CreateSessionServer() 128 .name = const_cast<char*>(sessionName.c_str()), in CreateSessionServer() 149 LOGE("Listen socket error for sessionName:%{public}s", sessionName in CreateSessionServer() 219 CopySendFile(int32_t socketId, const std::string &sessionName, const std::string &srcUri, const std::string &dstPath) CopySendFile() argument 262 ChangeOwnerIfNeeded(int32_t sessionId, const std::string sessionName) ChangeOwnerIfNeeded() argument 279 CloseSession(int32_t sessionId, const std::string sessionName) CloseSession() argument 311 CloseSessionWithSessionName(const std::string sessionName) CloseSessionWithSessionName() argument 364 IsService(std::string &sessionName) IsService() argument 379 std::string sessionName = GetSessionName(socketId); CopyOnStop() local [all...] |
/foundation/filemanagement/dfs_service/test/unittests/distributed_file_daemon/ |
H A D | trans_mananger_test.cpp | 59 string sessionName; in HWTEST_F() local 61 transManager_->AddTransTask(sessionName, listener); in HWTEST_F() 69 string sessionName; in HWTEST_F() local 71 TransManager::GetInstance().AddTransTask(sessionName, listener); in HWTEST_F() 79 string sessionName; in HWTEST_F() local 80 transManager_->DeleteTransTask(sessionName); in HWTEST_F() 88 string sessionName; in HWTEST_F() local 89 TransManager::GetInstance().DeleteTransTask(sessionName); in HWTEST_F() 105 string sessionName; in HWTEST_F() local 107 transManager_->NotifyFileFailed(sessionName, errorCod in HWTEST_F() 115 string sessionName; HWTEST_F() local 125 string sessionName; HWTEST_F() local 134 string sessionName; HWTEST_F() local 143 string sessionName; HWTEST_F() local 154 string sessionName; HWTEST_F() local [all...] |
/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 *filePort) in TransOnFileChannelOpened() argument 63 (void)sessionName; in TransOnFileChannelOpened() [all...] |
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() 99 if (strcpy_s(fileNode->mySessionName, SESSION_NAME_SIZE_MAX, sessionName) != EOK || in TransSetFileReceiveListener() 110 Anonymize(sessionName, &tmpName); in TransSetFileReceiveListener() 111 TRANS_LOGI(TRANS_FILE, "add sessionName=%{public}s", AnonymizeWrapper(tmpName)); in TransSetFileReceiveListener() 117 int32_t TransSetFileSendListener(const char *sessionName, const IFileSendListener *sendListener) in TransSetFileSendListener() argument 130 if (strcmp(fileNode->mySessionName, sessionName) == 0) { in TransSetFileSendListener() 152 if (strcpy_s(fileNode->mySessionName, SESSION_NAME_SIZE_MAX, sessionName) != EOK || in TransSetFileSendListener() 161 TRANS_LOGI(TRANS_FILE, "add sessionName = %{public}s", sessionName); in TransSetFileSendListener() 166 TransAddNewSocketFileListener(const char *sessionName, SocketFileCallbackFunc fileCallback, bool isReceiver) TransAddNewSocketFileListener() argument 192 TransSetSocketFileListener(const char *sessionName, SocketFileCallbackFunc fileCallback, bool isReceiver) TransSetSocketFileListener() argument 241 TransGetFileListener(const char *sessionName, FileListener *fileListener) TransGetFileListener() argument 268 TransDeleteFileListener(const char *sessionName) TransDeleteFileListener() argument [all...] |
/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() 45 const char *sessionName, int32_t channelId, const AppInfo *appInfo, unsigned char isServer) in NotifyNetworkingChannelOpened() 47 INetworkingListenerEntry *entry = FindListenerEntry(sessionName); in NotifyNetworkingChannelOpened() 61 void NotifyNetworkingChannelOpenFailed(const char *sessionName, int32_t channelId, const char *networkId) in NotifyNetworkingChannelOpenFailed() argument 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() 44 NotifyNetworkingChannelOpened( const char *sessionName, int32_t channelId, const AppInfo *appInfo, unsigned char isServer) NotifyNetworkingChannelOpened() argument 81 NotifyNetworkingMsgReceived(const char *sessionName, int32_t channelId, const char *data, uint32_t len) NotifyNetworkingMsgReceived() argument 90 TransRegisterNetworkingChannelListener(const char *sessionName, const INetworkingListener *listener) TransRegisterNetworkingChannelListener() argument [all...] |
/foundation/filemanagement/dfs_service/services/distributedfiledaemon/src/ipc/ |
H A D | trans_mananger.cpp | 29 void TransManager::NotifyFileProgress(const std::string &sessionName, uint64_t total, uint64_t processed) in NotifyFileProgress() argument 32 auto iter = sessionTransMap_.find(sessionName); in NotifyFileProgress() 34 LOGE("sessionName not registered!"); in NotifyFileProgress() 44 void TransManager::NotifyFileFailed(const std::string &sessionName, int32_t errorCode) in NotifyFileFailed() argument 47 auto iter = sessionTransMap_.find(sessionName); in NotifyFileFailed() 49 LOGE("sessionName not registered!"); 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() 64 LOGE("sessionName no in NotifyFileFinished() 74 AddTransTask(const std::string &sessionName, const sptr<IFileTransListener> &listener) AddTransTask() argument 85 DeleteTransTask(const std::string &sessionName) DeleteTransTask() argument [all...] |
/foundation/communication/dsoftbus/tests/sdk/transmission/trans_channel/permission/ |
H A D | trans_dynamic_permission_test.cpp | 128 std::string sessionName = "DBinder" + std::to_string(g_permUid) + std::string("_") + std::to_string(g_permPid); in HWTEST_F() local 129 ret = AddDynamicPermission(g_permUid, g_permPid, sessionName.c_str()); in HWTEST_F() 133 sessionName = "DBinder" + std::to_string(g_permUid) + std::string("_") + std::to_string(testPid); in HWTEST_F() 134 ret = AddDynamicPermission(g_permUid, testPid, sessionName.c_str()); in HWTEST_F() 141 sessionName = "DBinder" + std::to_string(g_permUid) + std::string("_") + std::to_string(testPid); in HWTEST_F() 142 ret = AddDynamicPermission(g_permUid, testPid, sessionName.c_str()); in HWTEST_F() 146 sessionName = "DBinder" + std::to_string(g_permUid) + std::string("_") + std::to_string(g_permPid); in HWTEST_F() 147 ret = DeleteDynamicPermission(sessionName.c_str()); in HWTEST_F() 150 sessionName = "DBinder" + std::to_string(g_permUid) + std::string("_") + std::to_string(testPid); in HWTEST_F() 151 ret = AddDynamicPermission(g_permUid, testPid, sessionName in HWTEST_F() 178 std::string sessionName = "DBinder" + std::to_string(g_permUid) + std::string("_") + std::to_string(testPid); HWTEST_F() local 193 std::string sessionName = "DBinder" + std::to_string(g_permUid) + std::string("_") + std::to_string(testPid); HWTEST_F() local 215 std::string sessionName = "DBinder" + std::to_string(g_permUid) + std::string("_") + std::to_string(testPid); HWTEST_F() local [all...] |
/foundation/filemanagement/dfs_service/services/cloudsyncservice/src/transport/softbus/ |
H A D | softbus_adapter.cpp | 39 int32_t SoftbusAdapter::CreateSessionServer(const char *packageName, const char *sessionName) in CreateSessionServer() argument 42 .name = const_cast<char*>(sessionName), in CreateSessionServer() 47 LOGE("Failed to CreateSessionServer ret:%{public}d, sessionName:%{public}s", socket, sessionName); in CreateSessionServer() 50 std::string saveKey = std::string(sessionName) + std::string(packageName); in CreateSessionServer() 75 LOGE("Failed to CreateSessionServer sessionName:%{public}s", sessionName); in CreateSessionServer() 78 LOGD("Succeed to CreateSessionServer, sessionName:%{public}s", sessionName); in CreateSessionServer() 82 int32_t SoftbusAdapter::RemoveSessionServer(const char *packageName, const char *sessionName) in RemoveSessionServer() argument 99 string sessionName = info.name; OnBind() local 119 string sessionName = SoftbusAdapter::GetInstance().GetSessionNameFromMap(socket); OnShutdown() local 138 string sessionName = SoftbusAdapter::GetInstance().GetSessionNameFromMap(socket); OnBytes() local 174 string sessionName = SoftbusAdapter::GetInstance().GetSessionNameFromMap(sessionId); OnReceiveFileFinished() local 207 OpenSession(char *sessionName, char *peerDeviceId, char *groupId, TransDataType dataType) OpenSession() argument 251 OpenSessionByP2P(char *sessionName, char *peerDeviceId, char *groupId, bool isFileType) OpenSessionByP2P() argument 327 RegisterSessionListener(std::string sessionName, std::shared_ptr<ISoftbusListener> listener) RegisterSessionListener() argument 333 UnRegisterSessionListener(std::string sessionName) UnRegisterSessionListener() argument 339 GetListener(std::string sessionName) GetListener() argument 358 AcceptSesion(int sessionId, const std::string &sessionName, const std::string &networkId) AcceptSesion() argument [all...] |
/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() 50 int32_t ServerIpcOpenAuthSession(const char *sessionName, const ConnectionAddr *addrInfo) in ServerIpcOpenAuthSession() argument 52 if ((sessionName == NULL) || (addrInfo == NULL)) { in ServerIpcOpenAuthSession() 60 return TransOpenAuthChannel(sessionName, &connOpt, ""); in ServerIpcOpenAuthSession() 68 int32_t ServerIpcCloseChannel(const char *sessionName, int32_t channelId, int32_t channelType) in ServerIpcCloseChannel() argument 70 return TransCloseChannel(sessionName, channelId, channelType); in ServerIpcCloseChannel() 103 int32_t ServerIpcGrantPermission(int uid, int pid, const char *sessionName) in ServerIpcGrantPermission() argument 111 ServerIpcRemovePermission(const char *sessionName) ServerIpcRemovePermission() argument [all...] |
/foundation/communication/dsoftbus/core/transmission/session/src/ |
H A D | trans_session_service.c | 90 int32_t TransCreateSessionServer(const char *pkgName, const char *sessionName, int32_t uid, int32_t pid) in TransCreateSessionServer() argument 93 !IsValidString(sessionName, SESSION_NAME_SIZE_MAX - 1)) { in TransCreateSessionServer() 97 Anonymize(sessionName, &tmpName); in TransCreateSessionServer() 98 TRANS_LOGI(TRANS_CTRL, "pkgName=%{public}s, sessionName=%{public}s, uid=%{public}d, pid=%{public}d", 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_MA in TransRemoveSessionServer() [all...] |
H A D | trans_session_manager.c | 52 SoftBusTransDumpRegisterSession(fd, pos->pkgName, pos->sessionName, pos->uid, pos->pid); in TransSessionForEachShowInfo() 81 bool TransSessionServerIsExist(const char *sessionName) in TransSessionServerIsExist() argument 83 if (sessionName == NULL) { in TransSessionServerIsExist() 99 if (strcmp(pos->sessionName, sessionName) == 0) { in TransSessionServerIsExist() 101 Anonymize(sessionName, &tmpName); in TransSessionServerIsExist() 102 TRANS_LOGW(TRANS_CTRL, "session server is exist. sessionName=%{public}s", AnonymizeWrapper(tmpName)); in TransSessionServerIsExist() 120 Anonymize(pos->sessionName, &tmpName); in ShowSessionServer() 122 "session server is exist. count=%{public}d, sessionName=%{public}s", count, AnonymizeWrapper(tmpName)); in ShowSessionServer() 147 if (strcmp(pos->sessionName, newNod in TransSessionServerAddItem() 182 TransSessionServerDelItem(const char *sessionName) TransSessionServerDelItem() argument 217 CheckUidAndPid(const char *sessionName, pid_t callingUid, pid_t callingPid) CheckUidAndPid() argument 273 TransGetPkgNameBySessionName(const char *sessionName, char *pkgName, uint16_t len) TransGetPkgNameBySessionName() argument 310 TransGetUidAndPid(const char *sessionName, int32_t *uid, int32_t *pid) TransGetUidAndPid() argument [all...] |
/foundation/filemanagement/dfs_service/services/distributedfiledaemon/test/unittest/network/softbus/ |
H A D | softbus_session_pool_test.cpp | 63 string sessionName = SoftBusSessionPool::GetInstance().GenerateSessionName(sessionInfo1); in HWTEST_F() local 64 EXPECT_EQ(sessionName, sessionName1); in HWTEST_F() 65 sessionName = SoftBusSessionPool::GetInstance().GenerateSessionName(sessionInfo2); in HWTEST_F() 66 EXPECT_EQ(sessionName, sessionName2); in HWTEST_F() 99 string sessionName = SoftBusSessionPool::GetInstance().GenerateSessionName(sessionInfo); in HWTEST_F() local 100 EXPECT_EQ(sessionName, "DistributedFileService0"); in HWTEST_F() 110 sessionName = SoftBusSessionPool::GetInstance().GenerateSessionName(sessionInfo1); in HWTEST_F() 111 EXPECT_EQ(sessionName, "DistributedFileService9"); in HWTEST_F() 112 SoftBusSessionPool::GetInstance().AddSessionInfo(sessionName, sessionInfo1); in HWTEST_F() 113 sessionName in HWTEST_F() [all...] |
H A D | softbus_handler_test.cpp | 121 std::string sessionName = "testSession"; in HWTEST_F() local 125 int32_t result = handler.CreateSessionServer(packageName, sessionName, role, physicalPath); in HWTEST_F() 126 handler.serverIdMap_.erase(sessionName); in HWTEST_F() 131 result = handler.CreateSessionServer(packageName, sessionName, role, physicalPath); in HWTEST_F() 132 handler.serverIdMap_.erase(sessionName); in HWTEST_F() 137 result = handler.CreateSessionServer(packageName, sessionName, role, physicalPath); in HWTEST_F() 139 if (handler.serverIdMap_.find(sessionName) != handler.serverIdMap_.end()) { in HWTEST_F() 144 handler.serverIdMap_.erase(sessionName); in HWTEST_F() 160 std::string sessionName = "testSession"; in HWTEST_F() local 164 auto result = handler.CreateSessionServer("", sessionName, rol in HWTEST_F() 186 std::string sessionName = "testSession"; HWTEST_F() local 225 std::string sessionName = "testSession"; HWTEST_F() local 284 string sessionName = handler.GetSessionName(sessionId); HWTEST_F() local 381 string sessionName = "sessionName"; HWTEST_F() local 424 string sessionName = "sessionName"; HWTEST_F() local 444 string sessionName = "sessionName"; HWTEST_F() local [all...] |
/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() 80 if (CreateTransServer(proxyObject->sessionName) != ERR_NONE) { 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) ! in InvokerListenThread() [all...] |
/foundation/communication/dsoftbus/core/transmission/session/include/ |
H A D | trans_session_manager.h | 29 char sessionName[SESSION_NAME_SIZE_MAX]; member 38 bool TransSessionServerIsExist(const char *sessionName); 42 int32_t TransSessionServerDelItem(const char *sessionName); 46 int32_t TransGetPkgNameBySessionName(const char *sessionName, char *pkgName, uint16_t len); 48 int32_t TransGetUidAndPid(const char *sessionName, int32_t *uid, int32_t *pid); 53 bool CheckUidAndPid(const char *sessionName, pid_t callingUid, pid_t callingPid);
|
/foundation/communication/dsoftbus/core/common/security/permission/common/ |
H A D | permission_entry.c | 251 if (!GetJsonObjectStringItem(object, SESSION_NAME_STR, permissionEntry->sessionName, SESSION_NAME_SIZE_MAX)) { in ProcessPermissionEntry() 398 Anonymize(pe->sessionName, &tmpName); in CheckPermissionAppInfo() 399 COMM_LOGE(COMM_PERM, "appinfo not find, sessionName=%{public}s", tmpName); in CheckPermissionAppInfo() 404 bool CheckDBinder(const char *sessionName) in CheckDBinder() argument 406 if (StrIsEmpty(sessionName)) { in CheckDBinder() 409 if (strcmp(DBINDER_SERVICE_NAME, sessionName) == 0) { in CheckDBinder() 412 if (StrStartWith(sessionName, DBINDER_BUS_NAME_PREFIX)) { in CheckDBinder() 418 static bool HaveGrantedPermission(const char *sessionName) in HaveGrantedPermission() argument 420 if (sessionName == NULL || g_dynamicPermissionList == NULL) { in HaveGrantedPermission() 426 if (CompareString(pe->sessionName, sessionNam in HaveGrantedPermission() 549 CheckPermissionEntry(const char *sessionName, const SoftBusPermissionItem *pItem) CheckPermissionEntry() argument 613 PermIsSecLevelPublic(const char *sessionName) PermIsSecLevelPublic() argument 655 NewDynamicPermissionEntry(SoftBusPermissionEntry *permissionEntry, const char *sessionName, int32_t callingUid, int32_t callingPid) NewDynamicPermissionEntry() argument 704 AddDynamicPermission(int32_t callingUid, int32_t callingPid, const char *sessionName) AddDynamicPermission() argument 750 DeleteDynamicPermission(const char *sessionName) DeleteDynamicPermission() argument [all...] |
/foundation/communication/dsoftbus/tests/core/transmission/trans_channel/proxy_channel/ |
H A D | softbus_proxy_network_test.cpp | 65 int32_t TestNormalChannelOpened(const char *pkgName, int32_t pid, const char *sessionName, const ChannelInfo *channel) in TestNormalChannelOpened() argument 69 (void)sessionName; in TestNormalChannelOpened() 129 char sessionName[TEST_NUMBER_256] = {0}; in TestRegisterNetworkingChannelListener() local 130 strcpy_s(sessionName, TEST_NUMBER_256, TEST_VALID_SESSIONNAME); in TestRegisterNetworkingChannelListener() 135 int32_t ret = TransRegisterNetworkingChannelListener(sessionName, &listener); in TestRegisterNetworkingChannelListener() 148 char sessionName[TEST_NUMBER_256] = {0}; in HWTEST_F() local 149 strcpy_s(sessionName, TEST_NUMBER_256, TEST_VALID_SESSIONNAME); in HWTEST_F() 150 int32_t ret = NotifyNetworkingChannelOpened(sessionName, 1, NULL, 0); in HWTEST_F() 153 NotifyNetworkingChannelOpenFailed(sessionName, 1, NULL); in HWTEST_F() 155 NotifyNetworkingChannelClosed(sessionName, in HWTEST_F() 169 char sessionName[TEST_NUMBER_256] = {0}; HWTEST_F() local 308 char sessionName[TEST_NUMBER_256] = {0}; HWTEST_F() local [all...] |
/foundation/communication/dsoftbus/core/transmission/trans_channel/manager/include/ |
H A D | trans_lane_manager.h | 60 const char *sessionName, int32_t sessionId, int32_t channelId, int32_t channelType, CoreSessionState state); 63 const char *sessionName, int32_t sessionId, int32_t channelId, int32_t channelType); 66 const char *sessionName, int32_t sessionId, uint32_t laneHandle, bool isQosLane, bool isAsync); 68 int32_t TransDeleteSocketChannelInfoBySession(const char *sessionName, int32_t sessionId); 74 int32_t TransSetSocketChannelStateBySession(const char *sessionName, int32_t sessionId, CoreSessionState state); 78 int32_t TransGetSocketChannelStateBySession(const char *sessionName, int32_t sessionId, CoreSessionState *state); 83 const char *sessionName, int32_t sessionId, uint32_t *laneHandle, bool *isQosLane, bool *isAsync); 85 int32_t TransGetPidFromSocketChannelInfoBySession(const char *sessionName, int32_t sessionId, int32_t *pid);
|
/foundation/communication/dsoftbus/tests/core/common/security/permission/common/unittest/ |
H A D | permission_entry_test.cpp | 58 const char *sessionName = ""; in HWTEST_F() local 61 ret = CheckPermissionEntry(sessionName, pItem); in HWTEST_F() 88 char sessionName[NUM] = "ABC"; in HWTEST_F() local 100 ret = CheckPermissionEntry(sessionName, NULL); in HWTEST_F() 107 ret = CheckPermissionEntry(sessionName, pItem); in HWTEST_F() 110 pItem->pkgName = sessionName; in HWTEST_F() 124 const char sessionName[NUM] = ""; in HWTEST_F() local 132 ret = PermIsSecLevelPublic(sessionName); in HWTEST_F() 172 const char sessionName[NUM] = "bbb"; in HWTEST_F() local 175 ret = DeleteDynamicPermission(sessionName); in HWTEST_F() [all...] |
/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/file/include/ |
H A D | client_trans_file_listener.h | 42 int32_t TransSetFileReceiveListener(const char *sessionName, 45 int32_t TransSetFileSendListener(const char *sessionName, const IFileSendListener *sendListener); 47 int32_t TransGetFileListener(const char *sessionName, FileListener *fileListener); 49 void TransDeleteFileListener(const char *sessionName); 51 int32_t TransSetSocketFileListener(const char *sessionName, SocketFileCallbackFunc fileCallback, bool isReceiver);
|