Lines Matching refs:serviceImpl

44 int16 DEFAULT_AddFeature(ServiceImpl *serviceImpl, Feature *feature)  in DEFAULT_AddFeature()  argument
46 if (serviceImpl == NULL || feature == NULL) { in DEFAULT_AddFeature()
50 if (VECTOR_Num(&(serviceImpl->features)) >= MAX_FEATURE_NUM) { in DEFAULT_AddFeature()
59 int16 featureId = VECTOR_Add(&(serviceImpl->features), impl); in DEFAULT_AddFeature()
90 void DEFAULT_MessageHandle(ServiceImpl *serviceImpl, const Identity *identity, Request *msg) in DEFAULT_MessageHandle() argument
92 if (serviceImpl->serviceId != identity->serviceId) { in DEFAULT_MessageHandle()
97 if (serviceImpl->service->MessageHandle != NULL) { in DEFAULT_MessageHandle()
98 serviceImpl->service->MessageHandle(serviceImpl->service, msg); in DEFAULT_MessageHandle()
103 if (VECTOR_Size(&serviceImpl->features) <= identity->featureId) { in DEFAULT_MessageHandle()
107 …FeatureImpl *featureImpl = (FeatureImpl *)VECTOR_At(&(serviceImpl->features), identity->featureId); in DEFAULT_MessageHandle()
134 FeatureImpl *DEFAULT_GetFeature(ServiceImpl *serviceImpl, const char *featureName) in DEFAULT_GetFeature() argument
136 if (serviceImpl == NULL || featureName == NULL) { in DEFAULT_GetFeature()
140 short pos = VECTOR_FindByKey(&(serviceImpl->features), (void *)featureName); in DEFAULT_GetFeature()
141 return (FeatureImpl *)VECTOR_At(&(serviceImpl->features), pos); in DEFAULT_GetFeature()
144 Identity DEFAULT_GetFeatureId(ServiceImpl *serviceImpl, const char *feature) in DEFAULT_GetFeatureId() argument
147 if (serviceImpl == NULL) { in DEFAULT_GetFeatureId()
151 identity.serviceId = serviceImpl->serviceId; in DEFAULT_GetFeatureId()
152 if (serviceImpl->taskPool != NULL) { in DEFAULT_GetFeatureId()
153 identity.queueId = serviceImpl->taskPool->queueId; in DEFAULT_GetFeatureId()
156 int16 pos = VECTOR_FindByKey(&(serviceImpl->features), (void *)feature); in DEFAULT_GetFeatureId()
157 FeatureImpl *featureImpl = (FeatureImpl *)VECTOR_At(&(serviceImpl->features), pos); in DEFAULT_GetFeatureId()
165 Feature *DEFAULT_DeleteFeature(ServiceImpl *serviceImpl, const char *featureName) in DEFAULT_DeleteFeature() argument
167 if (serviceImpl == NULL || featureName == NULL) { in DEFAULT_DeleteFeature()
171 int16 pos = VECTOR_FindByKey(&(serviceImpl->features), (void *)featureName); in DEFAULT_DeleteFeature()
172 if (pos < 0 || !SAMGR_IsNoInterface((FeatureImpl *)VECTOR_At(&serviceImpl->features, pos))) { in DEFAULT_DeleteFeature()
176 FeatureImpl *featureImpl = (FeatureImpl *)VECTOR_Swap(&(serviceImpl->features), pos, NULL); in DEFAULT_DeleteFeature()
181 Identity id = {serviceImpl->serviceId, INVALID_INDEX, NULL}; in DEFAULT_DeleteFeature()