Lines Matching refs:gData

46 static LocationAPIData gData = {};  variable
120 if (NULL == gData.gnssInterface && !gGnssLoadFailed) { in createInstance()
121 gData.gnssInterface = in createInstance()
123 if (NULL == gData.gnssInterface) { in createInstance()
127 gData.gnssInterface->initialize(); in createInstance()
130 if (NULL != gData.gnssInterface) { in createInstance()
131 gData.gnssInterface->addClient(newLocationAPI, locationCallbacks); in createInstance()
133 gData.gnssInterface->requestCapabilities(newLocationAPI); in createInstance()
140 if (NULL == gData.flpInterface && !gFlpLoadFailed) { in createInstance()
141 gData.flpInterface = in createInstance()
143 if (NULL == gData.flpInterface) { in createInstance()
147 gData.flpInterface->initialize(); in createInstance()
150 if (NULL != gData.flpInterface) { in createInstance()
151 gData.flpInterface->addClient(newLocationAPI, locationCallbacks); in createInstance()
153 gData.flpInterface->requestCapabilities(newLocationAPI); in createInstance()
160 if (NULL == gData.geofenceInterface && !gGeofenceLoadFailed) { in createInstance()
161 gData.geofenceInterface = in createInstance()
163 if (NULL == gData.geofenceInterface) { in createInstance()
167 gData.geofenceInterface->initialize(); in createInstance()
170 if (NULL != gData.geofenceInterface) { in createInstance()
171 gData.geofenceInterface->addClient(newLocationAPI, locationCallbacks); in createInstance()
173 gData.geofenceInterface->requestCapabilities(newLocationAPI); in createInstance()
179 gData.clientData[newLocationAPI] = locationCallbacks; in createInstance()
202 auto it = gData.clientData.find(this); in ~LocationAPI()
203 if (it != gData.clientData.end()) { in ~LocationAPI()
204 if (isGnssClient(it->second) && NULL != gData.gnssInterface) { in ~LocationAPI()
205 gData.gnssInterface->removeClient(it->first); in ~LocationAPI()
207 if (isFlpClient(it->second) && NULL != gData.flpInterface) { in ~LocationAPI()
208 gData.flpInterface->removeClient(it->first); in ~LocationAPI()
210 if (isGeofenceClient(it->second) && NULL != gData.geofenceInterface) { in ~LocationAPI()
211 gData.geofenceInterface->removeClient(it->first); in ~LocationAPI()
213 gData.clientData.erase(it); in ~LocationAPI()
234 if (NULL == gData.gnssInterface && !gGnssLoadFailed) { in updateCallbacks()
235 gData.gnssInterface = in updateCallbacks()
237 if (NULL == gData.gnssInterface) { in updateCallbacks()
241 gData.gnssInterface->initialize(); in updateCallbacks()
244 if (NULL != gData.gnssInterface) { in updateCallbacks()
246 gData.gnssInterface->addClient(this, locationCallbacks); in updateCallbacks()
251 if (NULL == gData.flpInterface && !gFlpLoadFailed) { in updateCallbacks()
252 gData.flpInterface = in updateCallbacks()
254 if (NULL == gData.flpInterface) { in updateCallbacks()
258 gData.flpInterface->initialize(); in updateCallbacks()
261 if (NULL != gData.flpInterface) { in updateCallbacks()
263 gData.flpInterface->addClient(this, locationCallbacks); in updateCallbacks()
268 if (NULL == gData.geofenceInterface && !gGeofenceLoadFailed) { in updateCallbacks()
269 gData.geofenceInterface = in updateCallbacks()
271 if (NULL == gData.geofenceInterface) { in updateCallbacks()
275 gData.geofenceInterface->initialize(); in updateCallbacks()
278 if (NULL != gData.geofenceInterface) { in updateCallbacks()
280 gData.geofenceInterface->addClient(this, locationCallbacks); in updateCallbacks()
284 gData.clientData[this] = locationCallbacks; in updateCallbacks()
295 auto it = gData.clientData.find(this); in startTracking()
296 if (it != gData.clientData.end()) { in startTracking()
297 if (gData.flpInterface != NULL && locationOptions.minDistance > 0) { in startTracking()
298 id = gData.flpInterface->startTracking(this, locationOptions); in startTracking()
299 } else if (gData.gnssInterface != NULL && needsGnssTrackingInfo(it->second)) { in startTracking()
300 id = gData.gnssInterface->startTracking(this, locationOptions); in startTracking()
301 } else if (gData.flpInterface != NULL) { in startTracking()
302 id = gData.flpInterface->startTracking(this, locationOptions); in startTracking()
303 } else if (gData.gnssInterface != NULL) { in startTracking()
304 id = gData.gnssInterface->startTracking(this, locationOptions); in startTracking()
323 auto it = gData.clientData.find(this); in stopTracking()
324 if (it != gData.clientData.end()) { in stopTracking()
327 if (gData.gnssInterface != NULL) { in stopTracking()
328 gData.gnssInterface->stopTracking(this, id); in stopTracking()
330 if (gData.flpInterface != NULL) { in stopTracking()
331 gData.flpInterface->stopTracking(this, id); in stopTracking()
333 if (gData.flpInterface == NULL && gData.gnssInterface == NULL) { in stopTracking()
350 auto it = gData.clientData.find(this); in updateTrackingOptions()
351 if (it != gData.clientData.end()) { in updateTrackingOptions()
354 if (gData.gnssInterface != NULL) { in updateTrackingOptions()
355 gData.gnssInterface->updateTrackingOptions(this, id, locationOptions); in updateTrackingOptions()
357 if (gData.flpInterface != NULL) { in updateTrackingOptions()
358 gData.flpInterface->updateTrackingOptions(this, id, locationOptions); in updateTrackingOptions()
360 if (gData.flpInterface == NULL && gData.gnssInterface == NULL) { in updateTrackingOptions()
378 if (gData.flpInterface != NULL) { in startBatching()
379 id = gData.flpInterface->startBatching(this, locationOptions); in startBatching()
394 if (gData.flpInterface != NULL) { in stopBatching()
395 gData.flpInterface->stopBatching(this, id); in stopBatching()
409 if (gData.flpInterface != NULL) { in updateBatchingOptions()
410 gData.flpInterface->updateBatchingOptions(this, in updateBatchingOptions()
426 if (gData.flpInterface != NULL) { in getBatchedLocations()
427 gData.flpInterface->getBatchedLocations(this, id, count); in getBatchedLocations()
442 if (gData.geofenceInterface != NULL) { in addGeofences()
443 ids = gData.geofenceInterface->addGeofences(this, count, options, info); in addGeofences()
458 if (gData.geofenceInterface != NULL) { in removeGeofences()
459 gData.geofenceInterface->removeGeofences(this, count, ids); in removeGeofences()
473 if (gData.geofenceInterface != NULL) { in modifyGeofences()
474 gData.geofenceInterface->modifyGeofences(this, count, ids, options); in modifyGeofences()
488 if (gData.geofenceInterface != NULL) { in pauseGeofences()
489 gData.geofenceInterface->pauseGeofences(this, count, ids); in pauseGeofences()
503 if (gData.geofenceInterface != NULL) { in resumeGeofences()
504 gData.geofenceInterface->resumeGeofences(this, count, ids); in resumeGeofences()
518 if (gData.gnssInterface != NULL) { in gnssNiResponse()
519 gData.gnssInterface->gnssNiResponse(this, id, response); in gnssNiResponse()
534 if (nullptr != locationControlCallbacks.responseCb && NULL == gData.controlAPI) { in createInstance()
535 if (NULL == gData.gnssInterface && !gGnssLoadFailed) { in createInstance()
536 gData.gnssInterface = in createInstance()
538 if (NULL == gData.gnssInterface) { in createInstance()
542 gData.gnssInterface->initialize(); in createInstance()
545 if (NULL != gData.gnssInterface) { in createInstance()
546 gData.controlAPI = new LocationControlAPI(); in createInstance()
547 gData.controlCallbacks = locationControlCallbacks; in createInstance()
548 gData.gnssInterface->setControlCallbacks(locationControlCallbacks); in createInstance()
549 controlAPI = gData.controlAPI; in createInstance()
573 gData.controlAPI = NULL; in ~LocationControlAPI()
584 if (gData.gnssInterface != NULL) { in enable()
585 id = gData.gnssInterface->enable(techType); in enable()
600 if (gData.gnssInterface != NULL) { in disable()
601 gData.gnssInterface->disable(id); in disable()
616 if (gData.gnssInterface != NULL) { in gnssUpdateConfig()
617 ids = gData.gnssInterface->gnssUpdateConfig(config); in gnssUpdateConfig()
633 if (gData.gnssInterface != NULL) { in gnssDeleteAidingData()
634 id = gData.gnssInterface->gnssDeleteAidingData(data); in gnssDeleteAidingData()