Lines Matching refs:ret
44 int32_t ret; in BindRequestIdWithAppId() local
59 ret = AddReqIdByAppId(appId, requestId); in BindRequestIdWithAppId()
61 return ret; in BindRequestIdWithAppId()
67 int32_t ret; in IpcServiceGmRegCallback() local
74 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmRegCallback()
75 if (ret != HC_SUCCESS) { in IpcServiceGmRegCallback()
77 return ret; in IpcServiceGmRegCallback()
80 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_DEV_AUTH_CB, (uint8_t *)&callback, … in IpcServiceGmRegCallback()
81 if (ret != HC_SUCCESS) { in IpcServiceGmRegCallback()
83 return ret; in IpcServiceGmRegCallback()
85 …ret = AddIpcCallBackByAppId(appId, (const uint8_t *)callback, sizeof(DeviceAuthCallback), CB_TYPE_… in IpcServiceGmRegCallback()
86 if (ret != HC_SUCCESS) { in IpcServiceGmRegCallback()
92 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_CB_OBJECT, (uint8_t *)&cbObjIdx, &i… in IpcServiceGmRegCallback()
93 if (ret != HC_SUCCESS) { in IpcServiceGmRegCallback()
96 return ret; in IpcServiceGmRegCallback()
104 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmRegCallback()
105 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmRegCallback()
106 return ret; in IpcServiceGmRegCallback()
112 int32_t ret; in IpcServiceGmUnRegCallback() local
116 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmUnRegCallback()
117 if (ret != HC_SUCCESS) { in IpcServiceGmUnRegCallback()
119 return ret; in IpcServiceGmUnRegCallback()
123 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmUnRegCallback()
124 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmUnRegCallback()
125 return ret; in IpcServiceGmUnRegCallback()
131 int32_t ret; in IpcServiceGmRegDataChangeListener() local
139 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmRegDataChangeListener()
140 if (ret != HC_SUCCESS) { in IpcServiceGmRegDataChangeListener()
142 return ret; in IpcServiceGmRegDataChangeListener()
145 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_LISTERNER, (uint8_t *)&callback, NU… in IpcServiceGmRegDataChangeListener()
146 if (ret != HC_SUCCESS) { in IpcServiceGmRegDataChangeListener()
148 return ret; in IpcServiceGmRegDataChangeListener()
151 …ret = AddIpcCallBackByAppId(appId, (const uint8_t *)callback, sizeof(DataChangeListener), CB_TYPE_… in IpcServiceGmRegDataChangeListener()
152 if (ret != HC_SUCCESS) { in IpcServiceGmRegDataChangeListener()
158 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_CB_OBJECT, (uint8_t *)&cbObjIdx, &i… in IpcServiceGmRegDataChangeListener()
159 if (ret != HC_SUCCESS) { in IpcServiceGmRegDataChangeListener()
162 return ret; in IpcServiceGmRegDataChangeListener()
176 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmRegDataChangeListener()
177 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmRegDataChangeListener()
178 return ret; in IpcServiceGmRegDataChangeListener()
184 int32_t ret; in IpcServiceGmUnRegDataChangeListener() local
188 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmUnRegDataChangeListener()
189 if (ret != HC_SUCCESS) { in IpcServiceGmUnRegDataChangeListener()
191 return ret; in IpcServiceGmUnRegDataChangeListener()
194 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmUnRegDataChangeListener()
195 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmUnRegDataChangeListener()
196 return ret; in IpcServiceGmUnRegDataChangeListener()
202 int32_t ret; in IpcServiceGmCreateGroup() local
211 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGmCreateGroup()
212 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmCreateGroup()
217 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_REQID, (uint8_t *)&requestId, &inOu… in IpcServiceGmCreateGroup()
218 if ((inOutLen != sizeof(int64_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmCreateGroup()
222 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmCreateGroup()
223 if (ret != HC_SUCCESS) { in IpcServiceGmCreateGroup()
225 return ret; in IpcServiceGmCreateGroup()
227 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_CREATE_PARAMS, (uint8_t *)&createPa… in IpcServiceGmCreateGroup()
228 if (ret != HC_SUCCESS) { in IpcServiceGmCreateGroup()
230 return ret; in IpcServiceGmCreateGroup()
232 ret = AddReqIdByAppId(appId, requestId); in IpcServiceGmCreateGroup()
233 if (ret != 0) { in IpcServiceGmCreateGroup()
235 return ret; in IpcServiceGmCreateGroup()
238 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmCreateGroup()
239 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmCreateGroup()
240 return ret; in IpcServiceGmCreateGroup()
246 int32_t ret; in IpcServiceGmDelGroup() local
255 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGmDelGroup()
256 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmDelGroup()
261 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_REQID, (uint8_t *)&requestId, &inOu… in IpcServiceGmDelGroup()
262 if ((inOutLen != sizeof(int64_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmDelGroup()
266 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmDelGroup()
267 if (ret != HC_SUCCESS) { in IpcServiceGmDelGroup()
269 return ret; in IpcServiceGmDelGroup()
271 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_DEL_PARAMS, (uint8_t *)&delParams, … in IpcServiceGmDelGroup()
272 if (ret != HC_SUCCESS) { in IpcServiceGmDelGroup()
274 return ret; in IpcServiceGmDelGroup()
276 ret = AddReqIdByAppId(appId, requestId); in IpcServiceGmDelGroup()
277 if (ret != 0) { in IpcServiceGmDelGroup()
279 return ret; in IpcServiceGmDelGroup()
282 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmDelGroup()
283 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmDelGroup()
284 return ret; in IpcServiceGmDelGroup()
290 int32_t ret; in IpcServiceGmAddMemberToGroup() local
299 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGmAddMemberToGroup()
300 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmAddMemberToGroup()
305 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_REQID, (uint8_t *)&requestId, &inOu… in IpcServiceGmAddMemberToGroup()
306 if ((inOutLen != sizeof(int64_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmAddMemberToGroup()
310 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_ADD_PARAMS, (uint8_t *)&addParams, … in IpcServiceGmAddMemberToGroup()
311 if (ret != HC_SUCCESS) { in IpcServiceGmAddMemberToGroup()
313 return ret; in IpcServiceGmAddMemberToGroup()
315 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmAddMemberToGroup()
316 if (ret != HC_SUCCESS) { in IpcServiceGmAddMemberToGroup()
318 return ret; in IpcServiceGmAddMemberToGroup()
320 ret = AddReqIdByAppId(appId, requestId); in IpcServiceGmAddMemberToGroup()
321 if (ret != HC_SUCCESS) { in IpcServiceGmAddMemberToGroup()
322 return ret; in IpcServiceGmAddMemberToGroup()
325 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmAddMemberToGroup()
326 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmAddMemberToGroup()
327 return ret; in IpcServiceGmAddMemberToGroup()
333 int32_t ret; in IpcServiceGmDelMemberFromGroup() local
342 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGmDelMemberFromGroup()
343 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmDelMemberFromGroup()
348 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_REQID, (uint8_t *)&requestId, &inOu… in IpcServiceGmDelMemberFromGroup()
349 if ((inOutLen != sizeof(int64_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmDelMemberFromGroup()
353 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmDelMemberFromGroup()
354 if (ret != HC_SUCCESS) { in IpcServiceGmDelMemberFromGroup()
356 return ret; in IpcServiceGmDelMemberFromGroup()
358 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_DEL_PARAMS, (uint8_t *)&delParams, … in IpcServiceGmDelMemberFromGroup()
359 if (ret != HC_SUCCESS) { in IpcServiceGmDelMemberFromGroup()
361 return ret; in IpcServiceGmDelMemberFromGroup()
363 ret = AddReqIdByAppId(appId, requestId); in IpcServiceGmDelMemberFromGroup()
364 if (ret != 0) { in IpcServiceGmDelMemberFromGroup()
366 return ret; in IpcServiceGmDelMemberFromGroup()
369 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmDelMemberFromGroup()
370 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmDelMemberFromGroup()
371 return ret; in IpcServiceGmDelMemberFromGroup()
377 int32_t ret; in IpcServiceGmProcessData() local
385 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_REQID, (uint8_t *)&requestId, &inOu… in IpcServiceGmProcessData()
386 if ((inOutLen != sizeof(int64_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmProcessData()
392 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_COMM_DATA, (uint8_t *)&data, &dataL… in IpcServiceGmProcessData()
393 if ((dataLen <= 0) || (ret != HC_SUCCESS)) { in IpcServiceGmProcessData()
397 ret = BindRequestIdWithAppId((const char *)data); in IpcServiceGmProcessData()
398 if (ret != HC_SUCCESS) { in IpcServiceGmProcessData()
399 return ret; in IpcServiceGmProcessData()
402 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmProcessData()
403 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmProcessData()
404 return ret; in IpcServiceGmProcessData()
410 int32_t ret; in IpcServiceGmSaveCredential() local
418 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OPCODE, (uint8_t *)&opCode, &inOutL… in IpcServiceGmSaveCredential()
419 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmSaveCredential()
423 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_CREDENTIAL, (uint8_t *)&credential,… in IpcServiceGmSaveCredential()
424 if ((credential == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmSaveCredential()
429 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmSaveCredential()
430 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmSaveCredential()
431 if ((ret == HC_SUCCESS) && (returnJsonStr != NULL)) { in IpcServiceGmSaveCredential()
432 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_REG_INFO, in IpcServiceGmSaveCredential()
436 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_REG_INFO, NULL, 0); in IpcServiceGmSaveCredential()
438 return (ret == HC_SUCCESS) ? ret : HC_ERROR; in IpcServiceGmSaveCredential()
444 int32_t ret; in IpcServiceGmApplyRegisterInfo() local
451 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmApplyRegisterInfo()
452 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT_NUM, in IpcServiceGmApplyRegisterInfo()
455 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_REG_INFO, in IpcServiceGmApplyRegisterInfo()
459 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_REG_INFO, NULL, 0); in IpcServiceGmApplyRegisterInfo()
461 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmApplyRegisterInfo()
462 return (ret == HC_SUCCESS) ? ret : HC_ERROR; in IpcServiceGmApplyRegisterInfo()
468 int32_t ret; in IpcServiceGmCheckAccessToGroup() local
476 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGmCheckAccessToGroup()
477 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmCheckAccessToGroup()
481 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmCheckAccessToGroup()
482 if ((appId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmCheckAccessToGroup()
486 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_GROUPID, (uint8_t *)&groupId, NULL); in IpcServiceGmCheckAccessToGroup()
487 if ((groupId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmCheckAccessToGroup()
493 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmCheckAccessToGroup()
494 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmCheckAccessToGroup()
495 return ret; in IpcServiceGmCheckAccessToGroup()
501 int32_t ret; in IpcServiceGmGetPkInfoList() local
511 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGmGetPkInfoList()
512 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmGetPkInfoList()
516 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmGetPkInfoList()
517 if ((appId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetPkInfoList()
521 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_QUERY_PARAMS, (uint8_t *)&queryPara… in IpcServiceGmGetPkInfoList()
522 if ((queryParams == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetPkInfoList()
528 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmGetPkInfoList()
529 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT_NUM, in IpcServiceGmGetPkInfoList()
532 … ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_RETURN_DATA, (const uint8_t *)returnInfoList, in IpcServiceGmGetPkInfoList()
535 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_RETURN_DATA, NULL, 0); in IpcServiceGmGetPkInfoList()
537 …ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_DATA_NUM, (const uint8_t *)&returnInfoNum, sizeof(… in IpcServiceGmGetPkInfoList()
538 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmGetPkInfoList()
540 return (ret == HC_SUCCESS) ? ret : HC_ERROR; in IpcServiceGmGetPkInfoList()
546 int32_t ret; in IpcServiceGmGetGroupInfoById() local
555 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGmGetGroupInfoById()
556 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmGetGroupInfoById()
560 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmGetGroupInfoById()
561 if ((appId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetGroupInfoById()
565 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_GROUPID, (uint8_t *)&groupId, NULL); in IpcServiceGmGetGroupInfoById()
566 if ((groupId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetGroupInfoById()
572 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmGetGroupInfoById()
573 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT_NUM, in IpcServiceGmGetGroupInfoById()
576 …ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_GROUP_INFO, (const uint8_t *)groupInfo, strlen(gro… in IpcServiceGmGetGroupInfoById()
579 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_GROUP_INFO, NULL, 0); in IpcServiceGmGetGroupInfoById()
581 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmGetGroupInfoById()
582 return (ret == HC_SUCCESS) ? ret : HC_ERROR; in IpcServiceGmGetGroupInfoById()
588 int32_t ret; in IpcServiceGmGetGroupInfo() local
598 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGmGetGroupInfo()
599 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmGetGroupInfo()
603 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmGetGroupInfo()
604 if ((appId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetGroupInfo()
608 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_QUERY_PARAMS, (uint8_t *)&queryPara… in IpcServiceGmGetGroupInfo()
609 if ((queryParams == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetGroupInfo()
615 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmGetGroupInfo()
616 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT_NUM, in IpcServiceGmGetGroupInfo()
619 …ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_GROUP_INFO, (const uint8_t *)outGroups, strlen(out… in IpcServiceGmGetGroupInfo()
621 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_GROUP_INFO, NULL, 0); in IpcServiceGmGetGroupInfo()
623 …ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_DATA_NUM, (const uint8_t *)&groupNum, sizeof(int32… in IpcServiceGmGetGroupInfo()
624 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmGetGroupInfo()
626 return (ret == HC_SUCCESS) ? ret : HC_ERROR; in IpcServiceGmGetGroupInfo()
632 int32_t ret; in IpcServiceGmGetJoinedGroups() local
642 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGmGetJoinedGroups()
643 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmGetJoinedGroups()
647 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmGetJoinedGroups()
648 if ((appId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetJoinedGroups()
653 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_GROUP_TYPE, (uint8_t *)&groupType, … in IpcServiceGmGetJoinedGroups()
654 if ((inOutLen != sizeof(groupType)) || (ret != HC_SUCCESS)) { in IpcServiceGmGetJoinedGroups()
660 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmGetJoinedGroups()
661 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT_NUM, in IpcServiceGmGetJoinedGroups()
664 …ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_GROUP_INFO, (const uint8_t *)outGroups, strlen(out… in IpcServiceGmGetJoinedGroups()
667 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_GROUP_INFO, NULL, 0); in IpcServiceGmGetJoinedGroups()
669 …ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_DATA_NUM, (const uint8_t *)&groupNum, sizeof(int32… in IpcServiceGmGetJoinedGroups()
670 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmGetJoinedGroups()
671 return (ret == HC_SUCCESS) ? ret : HC_ERROR; in IpcServiceGmGetJoinedGroups()
677 int32_t ret; in IpcServiceGmGetRelatedGroups() local
687 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGmGetRelatedGroups()
688 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmGetRelatedGroups()
692 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmGetRelatedGroups()
693 if ((appId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetRelatedGroups()
697 … ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_UDID, (uint8_t *)&peerUdid, NULL); in IpcServiceGmGetRelatedGroups()
698 if ((peerUdid == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetRelatedGroups()
704 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmGetRelatedGroups()
705 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT_NUM, in IpcServiceGmGetRelatedGroups()
708 …ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_GROUP_INFO, (const uint8_t *)outGroups, strlen(out… in IpcServiceGmGetRelatedGroups()
710 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_GROUP_INFO, NULL, 0); in IpcServiceGmGetRelatedGroups()
712 …ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_DATA_NUM, (const uint8_t *)&groupNum, sizeof(int32… in IpcServiceGmGetRelatedGroups()
713 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmGetRelatedGroups()
715 return (ret == HC_SUCCESS) ? ret : HC_ERROR; in IpcServiceGmGetRelatedGroups()
721 int32_t ret; in IpcServiceGmGetDeviceInfoById() local
731 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGmGetDeviceInfoById()
732 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmGetDeviceInfoById()
736 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmGetDeviceInfoById()
737 if ((appId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetDeviceInfoById()
741 … ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_UDID, (uint8_t *)&peerUdid, NULL); in IpcServiceGmGetDeviceInfoById()
742 if ((peerUdid == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetDeviceInfoById()
746 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_GROUPID, (uint8_t *)&groupId, NULL); in IpcServiceGmGetDeviceInfoById()
747 if ((groupId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetDeviceInfoById()
753 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmGetDeviceInfoById()
754 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT_NUM, in IpcServiceGmGetDeviceInfoById()
757 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_DEVICE_INFO, in IpcServiceGmGetDeviceInfoById()
761 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_DEVICE_INFO, NULL, 0); in IpcServiceGmGetDeviceInfoById()
763 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmGetDeviceInfoById()
764 return (ret == HC_SUCCESS) ? ret : HC_ERROR; in IpcServiceGmGetDeviceInfoById()
770 int32_t ret; in IpcServiceGmGetTrustedDevices() local
780 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGmGetTrustedDevices()
781 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmGetTrustedDevices()
785 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmGetTrustedDevices()
786 if ((appId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetTrustedDevices()
790 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_GROUPID, (uint8_t *)&groupId, NULL); in IpcServiceGmGetTrustedDevices()
791 if ((groupId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetTrustedDevices()
797 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmGetTrustedDevices()
798 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT_NUM, in IpcServiceGmGetTrustedDevices()
801 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_DEVICE_INFO, in IpcServiceGmGetTrustedDevices()
804 ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_DEVICE_INFO, NULL, 0); in IpcServiceGmGetTrustedDevices()
806 …ret += IpcEncodeCallReplay(outCache, PARAM_TYPE_DATA_NUM, (const uint8_t *)&outDevNum, sizeof(int3… in IpcServiceGmGetTrustedDevices()
807 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmGetTrustedDevices()
809 return (ret == HC_SUCCESS) ? ret : HC_ERROR; in IpcServiceGmGetTrustedDevices()
815 int32_t ret; in IpcServiceGmIsDeviceInGroup() local
825 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGmIsDeviceInGroup()
826 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGmIsDeviceInGroup()
830 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_APPID, (uint8_t *)&appId, NULL); in IpcServiceGmIsDeviceInGroup()
831 if ((appId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmIsDeviceInGroup()
835 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_UDID, (uint8_t *)&udid, NULL); in IpcServiceGmIsDeviceInGroup()
836 if ((udid == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmIsDeviceInGroup()
840 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_GROUPID, (uint8_t *)&groupId, NULL); in IpcServiceGmIsDeviceInGroup()
841 if ((groupId == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmIsDeviceInGroup()
848 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGmIsDeviceInGroup()
849 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGmIsDeviceInGroup()
850 return ret; in IpcServiceGmIsDeviceInGroup()
856 int32_t ret; in IpcServiceGaProcessData() local
866 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_REQID, (uint8_t *)&authReqId, &inOu… in IpcServiceGaProcessData()
867 if ((inOutLen != sizeof(authReqId)) || (ret != HC_SUCCESS)) { in IpcServiceGaProcessData()
871 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_COMM_DATA, (uint8_t *)&data, (int32… in IpcServiceGaProcessData()
872 if ((data == NULL) || (dataLen == 0) || (ret != HC_SUCCESS)) { in IpcServiceGaProcessData()
876 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_DEV_AUTH_CB, (uint8_t *)&gaCallback… in IpcServiceGaProcessData()
877 if (ret != HC_SUCCESS) { in IpcServiceGaProcessData()
879 return ret; in IpcServiceGaProcessData()
882 ret = AddIpcCallBackByReqId(authReqId, (const uint8_t *)gaCallback, in IpcServiceGaProcessData()
884 if (ret != HC_SUCCESS) { in IpcServiceGaProcessData()
889 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_CB_OBJECT, (uint8_t *)&cbObjIdx, &i… in IpcServiceGaProcessData()
890 if (ret != HC_SUCCESS) { in IpcServiceGaProcessData()
893 return ret; in IpcServiceGaProcessData()
901 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGaProcessData()
902 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGaProcessData()
903 return ret; in IpcServiceGaProcessData()
909 int32_t ret; in IpcServiceGaAuthDevice() local
919 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_OS_ACCOUNT_ID, (uint8_t *)&osAccoun… in IpcServiceGaAuthDevice()
920 if ((inOutLen != sizeof(int32_t)) || (ret != HC_SUCCESS)) { in IpcServiceGaAuthDevice()
925 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_REQID, (uint8_t *)&authReqId, &inOu… in IpcServiceGaAuthDevice()
926 if ((inOutLen != sizeof(authReqId)) || (ret != HC_SUCCESS)) { in IpcServiceGaAuthDevice()
930 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_AUTH_PARAMS, (uint8_t *)&authParams… in IpcServiceGaAuthDevice()
931 if ((authParams == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGaAuthDevice()
935 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_DEV_AUTH_CB, (uint8_t *)&gaCallback… in IpcServiceGaAuthDevice()
936 if (ret != HC_SUCCESS) { in IpcServiceGaAuthDevice()
938 return ret; in IpcServiceGaAuthDevice()
942 ret = AddIpcCallBackByReqId(authReqId, (const uint8_t *)gaCallback, in IpcServiceGaAuthDevice()
944 if (ret != HC_SUCCESS) { in IpcServiceGaAuthDevice()
949 …ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_CB_OBJECT, (uint8_t *)&cbObjIdx, &i… in IpcServiceGaAuthDevice()
950 if (ret != HC_SUCCESS) { in IpcServiceGaAuthDevice()
953 return ret; in IpcServiceGaAuthDevice()
961 …ret = IpcEncodeCallReplay(outCache, PARAM_TYPE_IPC_RESULT, (const uint8_t *)&callRet, sizeof(int32… in IpcServiceGaAuthDevice()
962 LOGI("process done, call ret %d, ipc ret %d", callRet, ret); in IpcServiceGaAuthDevice()
963 return ret; in IpcServiceGaAuthDevice()
968 uint32_t ret; in AddMethodMap() local
971 ret = SetIpcCallMap(ipcInstance, IpcServiceGmRegCallback, IPC_CALL_ID_REG_CB); in AddMethodMap()
972 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmUnRegCallback, IPC_CALL_ID_UNREG_CB); in AddMethodMap()
973 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmRegDataChangeListener, IPC_CALL_ID_REG_LISTENER); in AddMethodMap()
974 …ret &= SetIpcCallMap(ipcInstance, IpcServiceGmUnRegDataChangeListener, IPC_CALL_ID_UNREG_LISTENER); in AddMethodMap()
975 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmCreateGroup, IPC_CALL_ID_CREATE_GROUP); in AddMethodMap()
976 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmDelGroup, IPC_CALL_ID_DEL_GROUP); in AddMethodMap()
977 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmAddMemberToGroup, IPC_CALL_ID_ADD_GROUP_MEMBER); in AddMethodMap()
978 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmDelMemberFromGroup, IPC_CALL_ID_DEL_GROUP_MEMBER); in AddMethodMap()
979 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmProcessData, IPC_CALL_ID_GM_PROC_DATA); in AddMethodMap()
980 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmSaveCredential, IPC_CALL_ID_SAVE_CREDENTIAL); in AddMethodMap()
981 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmApplyRegisterInfo, IPC_CALL_ID_APPLY_REG_INFO); in AddMethodMap()
982 …ret &= SetIpcCallMap(ipcInstance, IpcServiceGmCheckAccessToGroup, IPC_CALL_ID_CHECK_ACCESS_TO_GROU… in AddMethodMap()
983 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmGetPkInfoList, IPC_CALL_ID_GET_PK_INFO_LIST); in AddMethodMap()
984 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmGetGroupInfoById, IPC_CALL_ID_GET_GROUP_INFO); in AddMethodMap()
985 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmGetGroupInfo, IPC_CALL_ID_SEARCH_GROUPS); in AddMethodMap()
986 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmGetJoinedGroups, IPC_CALL_ID_GET_JOINED_GROUPS); in AddMethodMap()
987 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmGetRelatedGroups, IPC_CALL_ID_GET_RELATED_GROUPS); in AddMethodMap()
988 … ret &= SetIpcCallMap(ipcInstance, IpcServiceGmGetDeviceInfoById, IPC_CALL_ID_GET_DEV_INFO_BY_ID); in AddMethodMap()
989 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmGetTrustedDevices, IPC_CALL_ID_GET_TRUST_DEVICES); in AddMethodMap()
990 ret &= SetIpcCallMap(ipcInstance, IpcServiceGmIsDeviceInGroup, IPC_CALL_ID_IS_DEV_IN_GROUP); in AddMethodMap()
993 ret &= SetIpcCallMap(ipcInstance, IpcServiceGaProcessData, IPC_CALL_ID_GA_PROC_DATA); in AddMethodMap()
994 ret &= SetIpcCallMap(ipcInstance, IpcServiceGaAuthDevice, IPC_CALL_ID_AUTH_DEVICE); in AddMethodMap()
995 LOGI("process done, ret %u", ret); in AddMethodMap()
996 return ret; in AddMethodMap()
1011 int32_t ret; in MainRescInit() local
1016 ret = InitIpcCallBackList(); in MainRescInit()
1017 if (ret != HC_SUCCESS) { in MainRescInit()
1018 return ret; in MainRescInit()
1030 ret = gmInst->regDataChangeListener(g_serviceAppId, &g_listenCbAdt); in MainRescInit()
1031 if (ret != HC_SUCCESS) { in MainRescInit()
1033 LOGE("MainInit, register ipc listener failed, ret %d", ret); in MainRescInit()
1044 int32_t ret; in main() local
1050 ret = InitDeviceAuthService(); in main()
1051 if (ret != HC_SUCCESS) { in main()
1052 LOGE("device auth service main, InitDeviceAuthService failed, ret %d", ret); in main()
1056 ret = MainRescInit(); in main()
1057 if (ret != HC_SUCCESS) { in main()
1063 ret = AddDevAuthServiceToManager(&serviceCtx); in main()
1064 if (ret != HC_SUCCESS) { in main()
1068 LOGE("device auth service main, AddDevAuthServiceToManager failed, ret %d", ret); in main()