Lines Matching refs:task
35 static void DestroyGroupAuthTask(HcTaskBase *task) in DestroyGroupAuthTask() argument
37 AuthDeviceTask *realTask = (AuthDeviceTask *)task; in DestroyGroupAuthTask()
41 static bool InitAuthDeviceTask(int32_t osAccountId, AuthDeviceTask *task, int64_t authReqId, CJson … in InitAuthDeviceTask() argument
44 task->base.doAction = DoAuthDevice; in InitAuthDeviceTask()
45 task->base.destroy = DestroyGroupAuthTask; in InitAuthDeviceTask()
46 task->authReqId = authReqId; in InitAuthDeviceTask()
55 task->authParams = authParams; in InitAuthDeviceTask()
56 task->callback = gaCallback; in InitAuthDeviceTask()
57 if (task->callback == NULL) { in InitAuthDeviceTask()
64 static bool InitProcessDataTask(AuthDeviceTask *task, int64_t authReqId, in InitProcessDataTask() argument
67 task->base.doAction = DoProcessAuthData; in InitProcessDataTask()
68 task->base.destroy = DestroyGroupAuthTask; in InitProcessDataTask()
69 task->authReqId = authReqId; in InitProcessDataTask()
78 task->authParams = receivedData; in InitProcessDataTask()
79 task->callback = gaCallback; in InitProcessDataTask()
80 if (task->callback == NULL) { in InitProcessDataTask()
101 AuthDeviceTask *task = (AuthDeviceTask *)HcMalloc(sizeof(AuthDeviceTask), 0); in AuthDevice() local
102 if (task == NULL) { in AuthDevice()
107 if (!InitAuthDeviceTask(osAccountId, task, authReqId, jsonParams, gaCallback)) { in AuthDevice()
110 HcFree(task); in AuthDevice()
113 if (PushTask((HcTaskBase*)task) != HC_SUCCESS) { in AuthDevice()
115 HcFree(task); in AuthDevice()
135 AuthDeviceTask *task = (AuthDeviceTask *)HcMalloc(sizeof(AuthDeviceTask), 0); in ProcessData() local
136 if (task == NULL) { in ProcessData()
141 if (!InitProcessDataTask(task, authReqId, receivedData, gaCallback)) { in ProcessData()
144 HcFree(task); in ProcessData()
147 if (PushTask((HcTaskBase*)task) != HC_SUCCESS) { in ProcessData()
149 HcFree(task); in ProcessData()
156 static void DoCancelAuthRequest(HcTaskBase *task) in DoCancelAuthRequest() argument
158 if (task == NULL) { in DoCancelAuthRequest()
162 AuthCancelTask *realTask = (AuthCancelTask *)task; in DoCancelAuthRequest()
166 static void DestroyAuthCancelTask(HcTaskBase *task) in DestroyAuthCancelTask() argument
168 if (task == NULL) { in DestroyAuthCancelTask()
172 AuthCancelTask *realTask = (AuthCancelTask *)task; in DestroyAuthCancelTask()
193 AuthCancelTask *task = (AuthCancelTask *)HcMalloc(sizeof(AuthCancelTask), 0); in CancelAuthRequest() local
194 if (task == NULL) { in CancelAuthRequest()
199 task->base.doAction = DoCancelAuthRequest; in CancelAuthRequest()
200 task->base.destroy = DestroyAuthCancelTask; in CancelAuthRequest()
201 task->reqId = requestId; in CancelAuthRequest()
202 task->appId = copyAppId; in CancelAuthRequest()
203 if (PushTask((HcTaskBase *)task) != HC_SUCCESS) { in CancelAuthRequest()
205 HcFree(task); in CancelAuthRequest()