/base/startup/appspawn/interfaces/innerkits/client/ |
H A D | appspawn_msg.c | 38 static inline int CheckMsg(const AppSpawnReqMsgNode *reqNode, const AppSpawnTlv *tlv, const char *name) in CheckMsg() argument 40 if ((reqNode->msg->msgLen + tlv->tlvLen) > MAX_MSG_TOTAL_LENGTH) { in CheckMsg() 44 if (reqNode->msg->msgType == MSG_GET_RENDER_TERMINATION_STATUS) { in CheckMsg() 62 static AppSpawnMsgBlock *CreateAppSpawnMsgBlock(AppSpawnReqMsgNode *reqNode) in CreateAppSpawnMsgBlock() argument 69 OH_ListAddTail(&reqNode->msgBlocks, &block->node); in CreateAppSpawnMsgBlock() 73 static AppSpawnMsgBlock *GetValidMsgBlock(const AppSpawnReqMsgNode *reqNode, uint32_t realLen) in GetValidMsgBlock() argument 76 struct ListNode *node = reqNode->msgBlocks.next; in GetValidMsgBlock() 77 while (node != &reqNode->msgBlocks) { in GetValidMsgBlock() 87 static AppSpawnMsgBlock *GetTailMsgBlock(const AppSpawnReqMsgNode *reqNode) in GetTailMsgBlock() argument 90 struct ListNode *node = reqNode in GetTailMsgBlock() 121 AddAppDataToTail(AppSpawnReqMsgNode *reqNode, const uint8_t *data, uint32_t dataLen, int32_t dataType) AddAppDataToTail() argument 150 AddAppDataEx(AppSpawnReqMsgNode *reqNode, const char *name, const AppSpawnAppData *data) AddAppDataEx() argument 188 AddAppData(AppSpawnReqMsgNode *reqNode, uint32_t tlvType, const AppSpawnAppData *data, uint32_t count, const char *name) AddAppData() argument 232 SetFlagsTlv(AppSpawnReqMsgNode *reqNode, AppSpawnMsgBlock *block, AppSpawnMsgFlags **msgFlags, int type, int maxCount) SetFlagsTlv() argument 252 CreateBaseMsg(AppSpawnReqMsgNode *reqNode, uint32_t msgType, const char *processName) CreateBaseMsg() argument 278 DeleteAppSpawnReqMsg(AppSpawnReqMsgNode *reqNode) DeleteAppSpawnReqMsg() argument 293 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)malloc(sizeof(AppSpawnReqMsgNode)); CreateAppSpawnReqMsg() local 315 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnReqMsgAddFd() local 349 AppSpawnReqMsgNode *reqNode = CreateAppSpawnReqMsg(msgType, processName); AppSpawnReqMsgCreate() local 358 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnReqMsgFree() local 365 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnReqMsgSetAppDacInfo() local 381 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnReqMsgSetBundleInfo() local 408 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnReqMsgSetAppFlag() local 425 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnReqMsgAddExtInfo() local 441 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnReqMsgAddStringInfo() local 458 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnReqMsgAddPermission() local 475 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnReqMsgSetAppDomainInfo() local 493 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnReqMsgSetAppInternetPermissionInfo() local 507 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnReqMsgSetAppOwnerId() local 521 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnReqMsgSetAppAccessToken() local 533 AppSpawnReqMsgNode *reqNode = CreateAppSpawnReqMsg(MSG_GET_RENDER_TERMINATION_STATUS, "terminate-process"); AppSpawnTerminateMsgCreate() local 550 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnClientAddPermission() local [all...] |
H A D | appspawn_client.c | 212 static int HandleMsgSend(AppSpawnReqMsgMgr *reqMgr, int socketId, AppSpawnReqMsgNode *reqNode) in HandleMsgSend() argument 214 APPSPAWN_LOGV("HandleMsgSend reqId: %{public}u msgId: %{public}d", reqNode->reqId, reqNode->msg->msgId); in HandleMsgSend() 215 ListNode *sendNode = reqNode->msgBlocks.next; in HandleMsgSend() 218 while (sendNode != NULL && sendNode != &reqNode->msgBlocks) { in HandleMsgSend() 221 sendFd ? reqNode->fds : NULL, in HandleMsgSend() 222 sendFd ? &reqNode->fdCount : NULL); in HandleMsgSend() 225 ret, reqNode->msg->msgId, reqNode->msg->msgLen, currentIndex); in HandleMsgSend() 232 reqNode in HandleMsgSend() 255 ClientSendMsg(AppSpawnReqMsgMgr *reqMgr, AppSpawnReqMsgNode *reqNode, AppSpawnResult *result) ClientSendMsg() argument 344 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; AppSpawnClientSendMsg() local [all...] |
/base/startup/init/test/systest/ |
H A D | loopclient_systest.c | 291 static int HandleMsgSend(ReqMsgMgr *reqMgr, int socketId, ReqMsgNode *reqNode) in HandleMsgSend() argument 293 printf("HandleMsgSend reqId: %u msgId: %d \n", reqNode->reqId, reqNode->msg->msgId); in HandleMsgSend() 294 ListNode *sendNode = reqNode->msgBlocks.next; in HandleMsgSend() 297 while (sendNode != NULL && sendNode != &reqNode->msgBlocks) { in HandleMsgSend() 300 sendFd ? reqNode->fds : NULL, in HandleMsgSend() 301 sendFd ? &reqNode->fdCount : NULL); in HandleMsgSend() 304 ret, reqNode->msg->msgId, reqNode->msg->msgLen, currentIndex); in HandleMsgSend() 311 reqNode in HandleMsgSend() 335 ClientSendMsg(ReqMsgMgr *reqMgr, ReqMsgNode *reqNode, Result *result) ClientSendMsg() argument [all...] |
/base/startup/appspawn/test/unittest/ |
H A D | app_spawn_test_helper.h | 130 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; in AppSpawnReqMsgSetFlags() local 131 APPSPAWN_CHECK_ONLY_EXPER(reqNode != nullptr, return APPSPAWN_ARG_INVALID); in AppSpawnReqMsgSetFlags() 133 *(uint32_t *)reqNode->msgFlags->flags = flags; in AppSpawnReqMsgSetFlags() 135 *(uint32_t *)reqNode->permissionFlags->flags = flags; in AppSpawnReqMsgSetFlags()
|
H A D | app_spawn_test_helper.cpp | 549 AppSpawnReqMsgNode *reqNode = static_cast<AppSpawnReqMsgNode *>(reqHandle); in GetAppProperty() local 550 APPSPAWN_CHECK(reqNode != nullptr && reqNode->msg != nullptr, AppSpawnReqMsgFree(reqHandle); in GetAppProperty() 551 return nullptr, "Invalid reqNode"); in GetAppProperty() 553 AppSpawnMsgNode *msgNode = CreateAppSpawnMsg(reqNode->msg); in GetAppProperty() 556 uint32_t bufferSize = reqNode->msg->msgLen; in GetAppProperty() 559 ListNode *node = reqNode->msgBlocks.next; in GetAppProperty() 560 while (node != &reqNode->msgBlocks) { in GetAppProperty()
|
/base/startup/appspawn/test/unittest/app_spawn_client_test/ |
H A D | app_spawn_client_test.cpp | 197 AppSpawnReqMsgNode *reqNode = (AppSpawnReqMsgNode *)reqHandle; in HWTEST_F() local 198 APPSPAWN_CHECK(reqNode != nullptr, break, "Invalid reqNode"); in HWTEST_F() 199 APPSPAWN_CHECK(reqNode->msgFlags != nullptr, break, "Invalid reqNode"); in HWTEST_F() 201 APPSPAWN_CHECK(reqNode->msgFlags->count == maxUnit, in HWTEST_F() 202 break, "Invalid reqNode %{public}d", reqNode->msgFlags->count); in HWTEST_F() 208 uint32_t result = (reqNode->msgFlags->flags[index] & bits) == bits; in HWTEST_F()
|