Lines Matching refs:locationCallbacks
52 static bool needsGnssTrackingInfo(LocationCallbacks& locationCallbacks) in needsGnssTrackingInfo() argument
54 return (locationCallbacks.gnssLocationInfoCb != nullptr || in needsGnssTrackingInfo()
55 locationCallbacks.gnssSvCb != nullptr || in needsGnssTrackingInfo()
56 locationCallbacks.gnssNmeaCb != nullptr || in needsGnssTrackingInfo()
57 locationCallbacks.gnssMeasurementsCb != nullptr); in needsGnssTrackingInfo()
60 static bool isGnssClient(LocationCallbacks& locationCallbacks) in isGnssClient() argument
62 return (locationCallbacks.gnssNiCb != nullptr || in isGnssClient()
63 locationCallbacks.trackingCb != nullptr || in isGnssClient()
64 locationCallbacks.gnssMeasurementsCb != nullptr); in isGnssClient()
67 static bool isFlpClient(LocationCallbacks& locationCallbacks) in isFlpClient() argument
69 return (locationCallbacks.trackingCb != nullptr || in isFlpClient()
70 locationCallbacks.batchingCb != nullptr); in isFlpClient()
73 static bool isGeofenceClient(LocationCallbacks& locationCallbacks) in isGeofenceClient() argument
75 return (locationCallbacks.geofenceBreachCb != nullptr || in isGeofenceClient()
76 locationCallbacks.geofenceStatusCb != nullptr); in isGeofenceClient()
106 LocationAPI::createInstance(LocationCallbacks& locationCallbacks) in createInstance() argument
108 if (nullptr == locationCallbacks.capabilitiesCb || in createInstance()
109 nullptr == locationCallbacks.responseCb || in createInstance()
110 nullptr == locationCallbacks.collectiveResponseCb) { in createInstance()
119 if (isGnssClient(locationCallbacks)) { in createInstance()
131 gData.gnssInterface->addClient(newLocationAPI, locationCallbacks); in createInstance()
139 if (isFlpClient(locationCallbacks)) { in createInstance()
151 gData.flpInterface->addClient(newLocationAPI, locationCallbacks); in createInstance()
159 if (isGeofenceClient(locationCallbacks)) { in createInstance()
171 gData.geofenceInterface->addClient(newLocationAPI, locationCallbacks); in createInstance()
179 gData.clientData[newLocationAPI] = locationCallbacks; in createInstance()
223 LocationAPI::updateCallbacks(LocationCallbacks& locationCallbacks) in updateCallbacks() argument
225 if (nullptr == locationCallbacks.capabilitiesCb || in updateCallbacks()
226 nullptr == locationCallbacks.responseCb || in updateCallbacks()
227 nullptr == locationCallbacks.collectiveResponseCb) { in updateCallbacks()
233 if (isGnssClient(locationCallbacks)) { in updateCallbacks()
246 gData.gnssInterface->addClient(this, locationCallbacks); in updateCallbacks()
250 if (isFlpClient(locationCallbacks)) { in updateCallbacks()
263 gData.flpInterface->addClient(this, locationCallbacks); in updateCallbacks()
267 if (isGeofenceClient(locationCallbacks)) { in updateCallbacks()
280 gData.geofenceInterface->addClient(this, locationCallbacks); in updateCallbacks()
284 gData.clientData[this] = locationCallbacks; in updateCallbacks()