Lines Matching refs:locationCallbacks
37 typedef std::map<LocationAPI*, LocationCallbacks> LocationClientMap;
52 static bool needsGnssTrackingInfo(LocationCallbacks& locationCallbacks)
54 return (locationCallbacks.gnssLocationInfoCb != nullptr ||
55 locationCallbacks.gnssSvCb != nullptr ||
56 locationCallbacks.gnssNmeaCb != nullptr ||
57 locationCallbacks.gnssMeasurementsCb != nullptr);
60 static bool isGnssClient(LocationCallbacks& locationCallbacks)
62 return (locationCallbacks.gnssNiCb != nullptr ||
63 locationCallbacks.trackingCb != nullptr ||
64 locationCallbacks.gnssMeasurementsCb != nullptr);
67 static bool isFlpClient(LocationCallbacks& locationCallbacks)
69 return (locationCallbacks.trackingCb != nullptr ||
70 locationCallbacks.batchingCb != nullptr);
73 static bool isGeofenceClient(LocationCallbacks& locationCallbacks)
75 return (locationCallbacks.geofenceBreachCb != nullptr ||
76 locationCallbacks.geofenceStatusCb != nullptr);
106 LocationAPI::createInstance(LocationCallbacks& locationCallbacks)
108 if (nullptr == locationCallbacks.capabilitiesCb ||
109 nullptr == locationCallbacks.responseCb ||
110 nullptr == locationCallbacks.collectiveResponseCb) {
119 if (isGnssClient(locationCallbacks)) {
131 gData.gnssInterface->addClient(newLocationAPI, locationCallbacks);
139 if (isFlpClient(locationCallbacks)) {
151 gData.flpInterface->addClient(newLocationAPI, locationCallbacks);
159 if (isGeofenceClient(locationCallbacks)) {
171 gData.geofenceInterface->addClient(newLocationAPI, locationCallbacks);
179 gData.clientData[newLocationAPI] = locationCallbacks;
246 LocationAPI::updateCallbacks(LocationCallbacks& locationCallbacks)
248 if (nullptr == locationCallbacks.capabilitiesCb ||
249 nullptr == locationCallbacks.responseCb ||
250 nullptr == locationCallbacks.collectiveResponseCb) {
256 if (isGnssClient(locationCallbacks)) {
269 gData.gnssInterface->addClient(this, locationCallbacks);
273 if (isFlpClient(locationCallbacks)) {
286 gData.flpInterface->addClient(this, locationCallbacks);
290 if (isGeofenceClient(locationCallbacks)) {
303 gData.geofenceInterface->addClient(this, locationCallbacks);
307 gData.clientData[this] = locationCallbacks;