Lines Matching refs:extInfo

102 static int32_t AddJobNode_(TriggerNode *trigger, const TriggerExtInfo *extInfo)

105 int ret = strcpy_s(node->name, strlen(extInfo->info.name) + 1, extInfo->info.name);
115 const char *condition, const TriggerExtInfo *extInfo)
118 PARAM_CHECK(extInfo != NULL && extInfo->addNode != NULL, return NULL, "extInfo is null");
119 PARAM_CHECK(extInfo->type <= TRIGGER_UNKNOW, return NULL, "Invalid type");
120 TriggerHeader *triggerHead = GetTriggerHeader(workSpace, extInfo->type);
121 PARAM_CHECK(triggerHead != NULL, return NULL, "Failed to get header %d", extInfo->type);
122 uint32_t nameLen = strlen(extInfo->info.name);
124 TriggerNode *node = (TriggerNode *)AddTriggerNode_(triggerHead, extInfo->type, condition, triggerNodeLen);
126 int ret = extInfo->addNode(node, extInfo);
129 if (extInfo->type == TRIGGER_BOOT) {
131 if (strncmp("boot-service:", extInfo->info.name, strlen("boot-service:")) != 0) {
177 const char *condition, const TriggerExtInfo *extInfo)
180 PARAM_CHECK(extInfo != NULL && extInfo->addNode != NULL, return NULL, "extInfo is null");
181 TriggerHeader *triggerHead = GetTriggerHeader(workSpace, extInfo->type);
182 PARAM_CHECK(triggerHead != NULL, return NULL, "Failed to get header %d", extInfo->type);
184 if (extInfo->type == TRIGGER_PARAM_WATCH) {
186 } else if (extInfo->type == TRIGGER_PARAM_WAIT) {
189 PARAM_LOGE("Invalid trigger type %d", extInfo->type);
192 TriggerNode *node = AddTriggerNode_(triggerHead, extInfo->type, condition, size);
194 int ret = extInfo->addNode(node, extInfo);
197 if (extInfo->type == TRIGGER_PARAM_WAIT) {
278 TriggerExtInfo extInfo = {};
279 extInfo.info.name = (char *)name;
280 extInfo.type = type;
281 extInfo.addNode = AddJobNode_;
282 return (JobNode *)triggerHead->addTrigger(workSpace, condition, &extInfo);