1 /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
2  *
3  * Redistribution and use in source and binary forms, with or without
4  * modification, are permitted provided that the following conditions are
5  * met:
6  *     * Redistributions of source code must retain the above copyright
7  *       notice, this list of conditions and the following disclaimer.
8  *     * Redistributions in binary form must reproduce the above
9  *       copyright notice, this list of conditions and the following
10  *       disclaimer in the documentation and/or other materials provided
11  *       with the distribution.
12  *     * Neither the name of The Linux Foundation, nor the names of its
13  *       contributors may be used to endorse or promote products derived
14  *       from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19  * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  */
29 #ifndef GNSS_ADAPTER_H
30 #define GNSS_ADAPTER_H
31 
32 #include <LocAdapterBase.h>
33 #include <LocContext.h>
34 #include <IOsObserver.h>
35 #include <EngineHubProxyBase.h>
36 #include <LocationAPI.h>
37 #include <Agps.h>
38 #include <SystemStatus.h>
39 #include <XtraSystemStatusObserver.h>
40 #include <map>
41 
42 #define MAX_URL_LEN 256
43 #define NMEA_SENTENCE_MAX_LENGTH 200
44 #define GLONASS_SV_ID_OFFSET 64
45 #define MAX_SATELLITES_IN_USE 12
46 #define LOC_NI_NO_RESPONSE_TIME 20
47 #define LOC_GPS_NI_RESPONSE_IGNORE 4
48 #define ODCPI_EXPECTED_INJECTION_TIME_MS 10000
49 
50 class GnssAdapter;
51 
52 typedef std::map<LocationSessionKey, LocationOptions> LocationSessionMap;
53 typedef std::map<LocationSessionKey, TrackingOptions> TrackingOptionsMap;
54 
55 class OdcpiTimer : public LocTimer {
56 public:
OdcpiTimer(GnssAdapter * adapter)57     OdcpiTimer(GnssAdapter* adapter) :
58             LocTimer(), mAdapter(adapter), mActive(false) {}
59 
start()60     inline void start() {
61         mActive = true;
62         LocTimer::start(ODCPI_EXPECTED_INJECTION_TIME_MS, false);
63     }
stop()64     inline void stop() {
65         mActive = false;
66         LocTimer::stop();
67     }
restart()68     inline void restart() {
69         stop();
70         start();
71     }
isActive()72     inline bool isActive() {
73         return mActive;
74     }
75 
76 private:
77     // Override
78     virtual void timeOutCallback() override;
79 
80     GnssAdapter* mAdapter;
81     bool mActive;
82 };
83 
84 typedef struct {
85     pthread_t               thread;        /* NI thread */
86     uint32_t                respTimeLeft;  /* examine time for NI response */
87     bool                    respRecvd;     /* NI User reponse received or not from Java layer*/
88     void*                   rawRequest;
89     uint32_t                reqID;         /* ID to check against response */
90     GnssNiResponse          resp;
91     pthread_cond_t          tCond;
92     pthread_mutex_t         tLock;
93     GnssAdapter*            adapter;
94 } NiSession;
95 typedef struct {
96     NiSession session;    /* SUPL NI Session */
97     NiSession sessionEs;  /* Emergency SUPL NI Session */
98     uint32_t reqIDCounter;
99 } NiData;
100 
101 typedef enum {
102     NMEA_PROVIDER_AP = 0, // Application Processor Provider of NMEA
103     NMEA_PROVIDER_MP      // Modem Processor Provider of NMEA
104 } NmeaProviderType;
105 typedef struct {
106     GnssSvType svType;
107     const char* talker;
108     uint64_t mask;
109     uint32_t svIdOffset;
110 } NmeaSvMeta;
111 
112 typedef struct {
113     double latitude;
114     double longitude;
115     float  accuracy;
116     // the CPI will be blocked until the boot time
117     // specified in blockedTillTsMs
118     int64_t blockedTillTsMs;
119     // CPIs whose both latitude and longitude differ
120     // no more than latLonThreshold will be blocked
121     // in units of degree
122     double latLonDiffThreshold;
123 } BlockCPIInfo;
124 
125 using namespace loc_core;
126 
127 namespace loc_core {
128     class SystemStatus;
129 }
130 
131 typedef std::function<void(
132     uint64_t gnssEnergyConsumedFromFirstBoot
133 )> GnssEnergyConsumedCallback;
134 
135 typedef void (*powerStateCallback)(bool on);
136 
137 class GnssAdapter : public LocAdapterBase {
138 
139     /* ==== Engine Hub ===================================================================== */
140     EngineHubProxyBase* mEngHubProxy;
141 
142     /* ==== TRACKING ======================================================================= */
143     TrackingOptionsMap mTimeBasedTrackingSessions;
144     LocationSessionMap mDistanceBasedTrackingSessions;
145     LocPosMode mLocPositionMode;
146     GnssSvUsedInPosition mGnssSvIdUsedInPosition;
147     bool mGnssSvIdUsedInPosAvail;
148     GnssSvMbUsedInPosition mGnssMbSvIdUsedInPosition;
149     bool mGnssMbSvIdUsedInPosAvail;
150 
151     /* ==== CONTROL ======================================================================== */
152     LocationControlCallbacks mControlCallbacks;
153     uint32_t mPowerVoteId;
154     uint32_t mNmeaMask;
155     GnssSvIdConfig mGnssSvIdConfig;
156     GnssSvTypeConfig mGnssSvTypeConfig;
157     GnssSvTypeConfigCallback mGnssSvTypeConfigCb;
158 
159     /* ==== NI ============================================================================= */
160     NiData mNiData;
161 
162     /* ==== AGPS =========================================================================== */
163     // This must be initialized via initAgps()
164     AgpsManager mAgpsManager;
165     AgpsCbInfo mAgpsCbInfo;
166     void initAgps(const AgpsCbInfo& cbInfo);
167 
168     /* ==== NFW =========================================================================== */
169     NfwStatusCb mNfwCb;
170     IsInEmergencySession mIsE911Session;
initNfw(const NfwCbInfo & cbInfo)171     inline void initNfw(const NfwCbInfo& cbInfo) {
172         mNfwCb = (NfwStatusCb)cbInfo.visibilityControlCb;
173         mIsE911Session = (IsInEmergencySession)cbInfo.isInEmergencySession;
174     }
175 
176     /* ==== ODCPI ========================================================================== */
177     OdcpiRequestCallback mOdcpiRequestCb;
178     bool mOdcpiRequestActive;
179     OdcpiTimer mOdcpiTimer;
180     OdcpiRequestInfo mOdcpiRequest;
181     void odcpiTimerExpire();
182 
183     /* === SystemStatus ===================================================================== */
184     SystemStatus* mSystemStatus;
185     std::string mServerUrl;
186     std::string mMoServerUrl;
187     XtraSystemStatusObserver mXtraObserver;
188     LocationSystemInfo mLocSystemInfo;
189     std::vector<GnssSvIdSource> mBlacklistedSvIds;
190 
191     /* === Misc ===================================================================== */
192     BlockCPIInfo mBlockCPIInfo;
193     bool mPowerOn;
194     uint32_t mAllowFlpNetworkFixes;
195 
196     /* === Misc callback from QMI LOC API ============================================== */
197     GnssEnergyConsumedCallback mGnssEnergyConsumedCb;
198     powerStateCallback mPowerStateCb;
199 
200     /*==== CONVERSION ===================================================================*/
201     static void convertOptions(LocPosMode& out, const TrackingOptions& trackingOptions);
202     static void convertLocation(Location& out, const UlpLocation& ulpLocation,
203                                 const GpsLocationExtended& locationExtended,
204                                 const LocPosTechMask techMask);
205     static void convertLocationInfo(GnssLocationInfoNotification& out,
206                                     const GpsLocationExtended& locationExtended);
207     static uint16_t getNumSvUsed(uint64_t svUsedIdsMask,
208                                  int totalSvCntInThisConstellation);
209 
210     /* ======== UTILITIES ================================================================== */
211     inline void initOdcpi(const OdcpiRequestCallback& callback);
212     inline void injectOdcpi(const Location& location);
213     static bool isFlpClient(LocationCallbacks& locationCallbacks);
214 
215 protected:
216 
217     /* ==== CLIENT ========================================================================= */
218     virtual void updateClientsEventMask();
219     virtual void stopClientSessions(LocationAPI* client);
220 
221 public:
222 
223     GnssAdapter();
~GnssAdapter()224     virtual inline ~GnssAdapter() { }
225 
226     /* ==== SSR ============================================================================ */
227     /* ======== EVENTS ====(Called from QMI Thread)========================================= */
228     virtual void handleEngineUpEvent();
229     /* ======== UTILITIES ================================================================== */
230     void restartSessions();
231 
232     /* ==== CLIENT ========================================================================= */
233     /* ======== COMMANDS ====(Called from Client Thread)==================================== */
234     virtual void addClientCommand(LocationAPI* client, const LocationCallbacks& callbacks);
235 
236     /* ==== TRACKING ======================================================================= */
237     /* ======== COMMANDS ====(Called from Client Thread)==================================== */
238     uint32_t startTrackingCommand(
239             LocationAPI* client, TrackingOptions& trackingOptions);
240     void updateTrackingOptionsCommand(
241             LocationAPI* client, uint32_t id, TrackingOptions& trackingOptions);
242     void stopTrackingCommand(LocationAPI* client, uint32_t id);
243     /* ======== RESPONSES ================================================================== */
244     void reportResponse(LocationAPI* client, LocationError err, uint32_t sessionId);
245     /* ======== UTILITIES ================================================================== */
246     bool hasTrackingCallback(LocationAPI* client);
247     bool isTimeBasedTrackingSession(LocationAPI* client, uint32_t sessionId);
248     bool isDistanceBasedTrackingSession(LocationAPI* client, uint32_t sessionId);
249     bool hasMeasurementsCallback(LocationAPI* client);
250     bool isTrackingSession(LocationAPI* client, uint32_t sessionId);
251     void saveTrackingSession(LocationAPI* client, uint32_t sessionId,
252                              const TrackingOptions& trackingOptions);
253     void eraseTrackingSession(LocationAPI* client, uint32_t sessionId);
254 
255     bool setLocPositionMode(const LocPosMode& mode);
getLocPositionMode()256     LocPosMode& getLocPositionMode() { return mLocPositionMode; }
257 
258     bool startTimeBasedTrackingMultiplex(LocationAPI* client, uint32_t sessionId,
259                                          const TrackingOptions& trackingOptions);
260     void startTimeBasedTracking(LocationAPI* client, uint32_t sessionId,
261             const TrackingOptions& trackingOptions);
262     bool stopTimeBasedTrackingMultiplex(LocationAPI* client, uint32_t id);
263     void stopTracking(LocationAPI* client, uint32_t id);
264     bool updateTrackingMultiplex(LocationAPI* client, uint32_t id,
265             const TrackingOptions& trackingOptions);
266     void updateTracking(LocationAPI* client, uint32_t sessionId,
267             const TrackingOptions& updatedOptions, const TrackingOptions& oldOptions);
268 
269     /* ==== NI ============================================================================= */
270     /* ======== COMMANDS ====(Called from Client Thread)==================================== */
271     void gnssNiResponseCommand(LocationAPI* client, uint32_t id, GnssNiResponse response);
272     /* ======================(Called from NI Thread)======================================== */
273     void gnssNiResponseCommand(GnssNiResponse response, void* rawRequest);
274     /* ======== UTILITIES ================================================================== */
275     bool hasNiNotifyCallback(LocationAPI* client);
getNiData()276     NiData& getNiData() { return mNiData; }
277 
278     /* ==== CONTROL CLIENT ================================================================= */
279     /* ======== COMMANDS ====(Called from Client Thread)==================================== */
280     uint32_t enableCommand(LocationTechnologyType techType);
281     void disableCommand(uint32_t id);
282     void setControlCallbacksCommand(LocationControlCallbacks& controlCallbacks);
283     void readConfigCommand();
284     void setConfigCommand();
285     void requestUlpCommand();
286     void initEngHubProxyCommand();
287     uint32_t* gnssUpdateConfigCommand(GnssConfig config);
288     uint32_t* gnssGetConfigCommand(GnssConfigFlagsMask mask);
289     uint32_t gnssDeleteAidingDataCommand(GnssAidingData& data);
290     void deleteAidingData(const GnssAidingData &data, uint32_t sessionId);
291     void gnssUpdateXtraThrottleCommand(const bool enabled);
292     std::vector<LocationError> gnssUpdateConfig(const std::string& oldMoServerUrl,
293             const GnssConfig& gnssConfigRequested,
294             const GnssConfig& gnssConfigNeedEngineUpdate, size_t count = 0);
295 
296     /* ==== GNSS SV TYPE CONFIG ============================================================ */
297     /* ==== COMMANDS ====(Called from Client Thread)======================================== */
298     /* ==== These commands are received directly from client bypassing Location API ======== */
299     void gnssUpdateSvTypeConfigCommand(GnssSvTypeConfig config);
300     void gnssGetSvTypeConfigCommand(GnssSvTypeConfigCallback callback);
301     void gnssResetSvTypeConfigCommand();
302 
303     /* ==== UTILITIES ====================================================================== */
304     LocationError gnssSvIdConfigUpdateSync(const std::vector<GnssSvIdSource>& blacklistedSvIds);
305     LocationError gnssSvIdConfigUpdateSync();
306     void gnssSvIdConfigUpdate(const std::vector<GnssSvIdSource>& blacklistedSvIds);
307     void gnssSvIdConfigUpdate();
308     void gnssSvTypeConfigUpdate(const GnssSvTypeConfig& config);
309     void gnssSvTypeConfigUpdate(bool sendReset = false);
gnssSetSvTypeConfig(const GnssSvTypeConfig & config)310     inline void gnssSetSvTypeConfig(const GnssSvTypeConfig& config)
311     { mGnssSvTypeConfig = config; }
gnssSetSvTypeConfigCallback(GnssSvTypeConfigCallback callback)312     inline void gnssSetSvTypeConfigCallback(GnssSvTypeConfigCallback callback)
313     { mGnssSvTypeConfigCb = callback; }
gnssGetSvTypeConfigCallback()314     inline GnssSvTypeConfigCallback gnssGetSvTypeConfigCallback()
315     { return mGnssSvTypeConfigCb; }
316 
317     /* ========= AGPS ====================================================================== */
318     /* ======== COMMANDS ====(Called from Client Thread)==================================== */
319     void initDefaultAgpsCommand();
320     void initAgpsCommand(const AgpsCbInfo& cbInfo);
321     void initNfwCommand(const NfwCbInfo& cbInfo);
322     void dataConnOpenCommand(AGpsExtType agpsType,
323             const char* apnName, int apnLen, AGpsBearerType bearerType);
324     void dataConnClosedCommand(AGpsExtType agpsType);
325     void dataConnFailedCommand(AGpsExtType agpsType);
326     void getGnssEnergyConsumedCommand(GnssEnergyConsumedCallback energyConsumedCb);
327     void nfwControlCommand(bool enable);
328 
329     /* ========= ODCPI ===================================================================== */
330     /* ======== COMMANDS ====(Called from Client Thread)==================================== */
331     void initOdcpiCommand(const OdcpiRequestCallback& callback);
332     void injectOdcpiCommand(const Location& location);
333     /* ======== RESPONSES ================================================================== */
334     void reportResponse(LocationError err, uint32_t sessionId);
335     void reportResponse(size_t count, LocationError* errs, uint32_t* ids);
336     /* ======== UTILITIES ================================================================== */
getControlCallbacks()337     LocationControlCallbacks& getControlCallbacks() { return mControlCallbacks; }
setControlCallbacks(const LocationControlCallbacks & controlCallbacks)338     void setControlCallbacks(const LocationControlCallbacks& controlCallbacks)
339     { mControlCallbacks = controlCallbacks; }
setAfwControlId(uint32_t id)340     void setAfwControlId(uint32_t id) { mPowerVoteId = id; }
getAfwControlId()341     uint32_t getAfwControlId() { return mPowerVoteId; }
isInSession()342     virtual bool isInSession() { return !mTimeBasedTrackingSessions.empty(); }
343     void initDefaultAgps();
344     bool initEngHubProxy();
345     void odcpiTimerExpireEvent();
346 
347     /* ==== REPORTS ======================================================================== */
348     /* ======== EVENTS ====(Called from QMI/EngineHub Thread)===================================== */
349     virtual void reportPositionEvent(const UlpLocation& ulpLocation,
350                                      const GpsLocationExtended& locationExtended,
351                                      enum loc_sess_status status,
352                                      LocPosTechMask techMask,
353                                      bool fromEngineHub = false,
354                                      GnssDataNotification* pDataNotify = nullptr,
355                                      int msInWeek = -1);
356     virtual void reportSvEvent(const GnssSvNotification& svNotify,
357                                bool fromEngineHub=false);
358     virtual void reportNmeaEvent(const char* nmea, size_t length);
359     virtual void reportDataEvent(const GnssDataNotification& dataNotify, int msInWeek);
360     virtual bool requestNiNotifyEvent(const GnssNiNotification& notify, const void* data);
361     virtual void reportGnssMeasurementsEvent(const GnssMeasurements& gnssMeasurements,
362                                                 int msInWeek);
363     virtual void reportSvPolynomialEvent(GnssSvPolynomial &svPolynomial);
364     virtual void reportSvEphemerisEvent(GnssSvEphemerisReport & svEphemeris);
365     virtual void reportGnssSvIdConfigEvent(const GnssSvIdConfig& config);
366     virtual void reportGnssSvTypeConfigEvent(const GnssSvTypeConfig& config);
367     virtual bool reportGnssEngEnergyConsumedEvent(uint64_t energyConsumedSinceFirstBoot);
368     virtual void reportLocationSystemInfoEvent(const LocationSystemInfo& locationSystemInfo);
369 
370     virtual bool requestATL(int connHandle, LocAGpsType agps_type, LocApnTypeMask apn_type_mask);
371     virtual bool releaseATL(int connHandle);
372     virtual bool requestOdcpiEvent(OdcpiRequestInfo& request);
373     virtual bool reportDeleteAidingDataEvent(GnssAidingData& aidingData);
374     virtual bool reportKlobucharIonoModelEvent(GnssKlobucharIonoModel& ionoModel);
375     virtual bool reportGnssAdditionalSystemInfoEvent(
376             GnssAdditionalSystemInfo& additionalSystemInfo);
377     virtual void reportNfwNotificationEvent(GnssNfwNotification& notification);
378 
379     /* ======== UTILITIES ================================================================= */
380     bool needReportForGnssClient(const UlpLocation& ulpLocation,
381             enum loc_sess_status status, LocPosTechMask techMask);
382     bool needReportForFlpClient(enum loc_sess_status status, LocPosTechMask techMask);
383     void reportPosition(const UlpLocation &ulpLocation,
384                         const GpsLocationExtended &locationExtended,
385                         enum loc_sess_status status,
386                         LocPosTechMask techMask);
387     void reportSv(GnssSvNotification& svNotify);
388     void reportNmea(const char* nmea, size_t length);
389     void reportData(GnssDataNotification& dataNotify);
390     bool requestNiNotify(const GnssNiNotification& notify, const void* data);
391     void reportGnssMeasurementData(const GnssMeasurementsNotification& measurements);
392     void reportGnssSvIdConfig(const GnssSvIdConfig& config);
393     void reportGnssSvTypeConfig(const GnssSvTypeConfig& config);
394     void requestOdcpi(const OdcpiRequestInfo& request);
395     void invokeGnssEnergyConsumedCallback(uint64_t energyConsumedSinceFirstBoot);
396     void saveGnssEnergyConsumedCallback(GnssEnergyConsumedCallback energyConsumedCb);
397     void reportLocationSystemInfo(const LocationSystemInfo & locationSystemInfo);
reportNfwNotification(const GnssNfwNotification & notification)398     inline void reportNfwNotification(const GnssNfwNotification& notification) {
399         if (NULL != mNfwCb) {
400             mNfwCb(notification);
401         }
402     }
getE911State(void)403     inline bool getE911State(void) {
404         if (NULL != mIsE911Session) {
405             return mIsE911Session();
406         }
407         return false;
408     }
409 
410     /*======== GNSSDEBUG ================================================================*/
411     bool getDebugReport(GnssDebugReport& report);
412     /* get AGC information from system status and fill it */
413     void getAgcInformation(GnssMeasurementsNotification& measurements, int msInWeek);
414     /* get Data information from system status and fill it */
415     void getDataInformation(GnssDataNotification& data, int msInWeek);
416 
417     /*==== SYSTEM STATUS ================================================================*/
getSystemStatus(void)418     inline SystemStatus* getSystemStatus(void) { return mSystemStatus; }
getServerUrl(void)419     std::string& getServerUrl(void) { return mServerUrl; }
getMoServerUrl(void)420     std::string& getMoServerUrl(void) { return mMoServerUrl; }
421 
422     /*==== CONVERSION ===================================================================*/
423     static uint32_t convertSuplVersion(const GnssConfigSuplVersion suplVersion);
424     static uint32_t convertLppProfile(const GnssConfigLppProfile lppProfile);
425     static uint32_t convertEP4ES(const GnssConfigEmergencyPdnForEmergencySupl);
426     static uint32_t convertSuplEs(const GnssConfigSuplEmergencyServices suplEmergencyServices);
427     static uint32_t convertLppeCp(const GnssConfigLppeControlPlaneMask lppeControlPlaneMask);
428     static uint32_t convertLppeUp(const GnssConfigLppeUserPlaneMask lppeUserPlaneMask);
429     static uint32_t convertAGloProt(const GnssConfigAGlonassPositionProtocolMask);
430     static uint32_t convertSuplMode(const GnssConfigSuplModeMask suplModeMask);
431     static void convertSatelliteInfo(std::vector<GnssDebugSatelliteInfo>& out,
432                                      const GnssSvType& in_constellation,
433                                      const SystemStatusReports& in);
434     static bool convertToGnssSvIdConfig(
435             const std::vector<GnssSvIdSource>& blacklistedSvIds, GnssSvIdConfig& config);
436     static void convertFromGnssSvIdConfig(
437             const GnssSvIdConfig& svConfig, GnssConfig& config);
438     static void convertGnssSvIdMaskToList(
439             uint64_t svIdMask, std::vector<GnssSvIdSource>& svIds,
440             GnssSvId initialSvId, GnssSvType svType);
441 
442     void injectLocationCommand(double latitude, double longitude, float accuracy);
443     void injectLocationExtCommand(const GnssLocationInfoNotification &locationInfo);
444 
445     void injectTimeCommand(int64_t time, int64_t timeReference, int32_t uncertainty);
446     void blockCPICommand(double latitude, double longitude, float accuracy,
447                          int blockDurationMsec, double latLonDiffThreshold);
448 
449     /* ==== MISCELLANEOUS ================================================================== */
450     /* ======== COMMANDS ====(Called from Client Thread)==================================== */
451     void getPowerStateChangesCommand(void* powerStateCb);
452     /* ======== UTILITIES ================================================================== */
453     void reportPowerStateIfChanged();
savePowerStateCallback(powerStateCallback powerStateCb)454     void savePowerStateCallback(powerStateCallback powerStateCb){ mPowerStateCb = powerStateCb; }
getPowerState()455     bool getPowerState() { return mPowerOn; }
setAllowFlpNetworkFixes(uint32_t allow)456     void setAllowFlpNetworkFixes(uint32_t allow) { mAllowFlpNetworkFixes = allow; }
getAllowFlpNetworkFixes()457     uint32_t getAllowFlpNetworkFixes() { return mAllowFlpNetworkFixes; }
458     void setSuplHostServer(const char* server, int port, LocServerType type);
459     void notifyClientOfCachedLocationSystemInfo(LocationAPI* client,
460                                                 const LocationCallbacks& callbacks);
461 };
462 
463 #endif //GNSS_ADAPTER_H
464