Lines Matching refs:manager

136     struct SensorDevManager *manager = GetSensorDevManager();
141 (void)OsalMutexLock(&manager->eventMutex);
144 (void)OsalMutexUnlock(&manager->eventMutex);
150 (void)OsalMutexUnlock(&manager->eventMutex);
169 if (manager->recordDataCb[groupType] != NULL) {
170 manager->recordDataCb[groupType](event);
173 (void)OsalMutexUnlock(&manager->eventMutex);
191 struct SensorDevManager *manager = GetSensorDevManager();
193 manager->serviceGroup = HdfIoServiceGroupObtain();
194 if (manager->serviceGroup == NULL) {
198 DLIST_FOR_EACH_ENTRY(pos, &manager->managerHead, struct SensorManagerNode, node) {
200 (HdfIoServiceGroupAddService(manager->serviceGroup, pos->ioService) != SENSOR_SUCCESS)) {
201 HdfIoServiceGroupRecycle(manager->serviceGroup);
202 manager->serviceGroup = NULL;
208 int32_t ret = HdfIoServiceGroupRegisterListener(manager->serviceGroup, &g_listener);
211 HdfIoServiceGroupRecycle(manager->serviceGroup);
212 manager->serviceGroup = NULL;
225 struct SensorDevManager *manager = NULL;
227 manager = GetSensorDevManager();
228 (void)OsalMutexLock(&manager->eventMutex);
229 if (manager->recordDataCb[groupId] != NULL) {
231 (void)OsalMutexUnlock(&manager->eventMutex);
235 if (manager->serviceGroup != NULL) {
236 manager->recordDataCb[groupId] = cb;
237 (void)OsalMutexUnlock(&manager->eventMutex);
242 manager->recordDataCb[groupId] = cb;
244 (void)OsalMutexUnlock(&manager->eventMutex);
255 struct SensorDevManager *manager = GetSensorDevManager();
257 (void)OsalMutexLock(&manager->eventMutex);
258 if (manager->recordDataCb[groupId] != cb) {
260 (void)OsalMutexUnlock(&manager->eventMutex);
264 if (manager->recordDataCb[TRADITIONAL_SENSOR_TYPE] != NULL &&
265 manager->recordDataCb[MEDICAL_SENSOR_TYPE] != NULL) {
266 manager->recordDataCb[groupId] = NULL;
267 (void)OsalMutexUnlock(&manager->eventMutex);
271 int32_t ret = HdfIoServiceGroupUnregisterListener(manager->serviceGroup, &g_listener);
274 (void)OsalMutexUnlock(&manager->eventMutex);
278 manager->hasSensorListener = false;
279 HdfIoServiceGroupRecycle(manager->serviceGroup);
280 manager->serviceGroup = NULL;
281 manager->recordDataCb[groupId] = NULL;
282 (void)OsalMutexUnlock(&manager->eventMutex);