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 mAfwControlId;
154     uint32_t mNmeaMask;
155     GnssSvIdConfig mGnssSvIdConfig;
156     GnssSvTypeConfig mGnssSvTypeConfig;
157     GnssSvTypeConfigCallback mGnssSvTypeConfigCb;
158     bool mSupportNfwControl;
159 
160     /* ==== NI ============================================================================= */
161     NiData mNiData;
162 
163     /* ==== AGPS =========================================================================== */
164     // This must be initialized via initAgps()
165     AgpsManager mAgpsManager;
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 requestUlpCommand();
285     void initEngHubProxyCommand();
286     uint32_t* gnssUpdateConfigCommand(GnssConfig config);
287     uint32_t* gnssGetConfigCommand(GnssConfigFlagsMask mask);
288     uint32_t gnssDeleteAidingDataCommand(GnssAidingData& data);
289     void deleteAidingData(const GnssAidingData &data, uint32_t sessionId);
290     void gnssUpdateXtraThrottleCommand(const bool enabled);
291     std::vector<LocationError> gnssUpdateConfig(const std::string& oldMoServerUrl,
292             const GnssConfig& gnssConfigRequested,
293             const GnssConfig& gnssConfigNeedEngineUpdate, size_t count = 0);
294 
295     /* ==== GNSS SV TYPE CONFIG ============================================================ */
296     /* ==== COMMANDS ====(Called from Client Thread)======================================== */
297     /* ==== These commands are received directly from client bypassing Location API ======== */
298     void gnssUpdateSvTypeConfigCommand(GnssSvTypeConfig config);
299     void gnssGetSvTypeConfigCommand(GnssSvTypeConfigCallback callback);
300     void gnssResetSvTypeConfigCommand();
301 
302     /* ==== UTILITIES ====================================================================== */
303     LocationError gnssSvIdConfigUpdateSync(const std::vector<GnssSvIdSource>& blacklistedSvIds);
304     LocationError gnssSvIdConfigUpdateSync();
305     void gnssSvIdConfigUpdate(const std::vector<GnssSvIdSource>& blacklistedSvIds);
306     void gnssSvIdConfigUpdate();
307     void gnssSvTypeConfigUpdate(const GnssSvTypeConfig& config);
308     void gnssSvTypeConfigUpdate(bool sendReset = false);
gnssSetSvTypeConfig(const GnssSvTypeConfig & config)309     inline void gnssSetSvTypeConfig(const GnssSvTypeConfig& config)
310     { mGnssSvTypeConfig = config; }
gnssSetSvTypeConfigCallback(GnssSvTypeConfigCallback callback)311     inline void gnssSetSvTypeConfigCallback(GnssSvTypeConfigCallback callback)
312     { mGnssSvTypeConfigCb = callback; }
gnssGetSvTypeConfigCallback()313     inline GnssSvTypeConfigCallback gnssGetSvTypeConfigCallback()
314     { return mGnssSvTypeConfigCb; }
315     void setConfig();
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) { mAfwControlId = id; }
getAfwControlId()341     uint32_t getAfwControlId() { return mAfwControlId; }
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                                      GnssDataNotification* pDataNotify = nullptr,
354                                      int msInWeek = -1);
355     virtual void reportEnginePositionsEvent(unsigned int count,
356                                             EngineLocationInfo* locationArr);
357 
358     virtual void reportSvEvent(const GnssSvNotification& svNotify,
359                                bool fromEngineHub=false);
360     virtual void reportNmeaEvent(const char* nmea, size_t length);
361     virtual void reportDataEvent(const GnssDataNotification& dataNotify, int msInWeek);
362     virtual bool requestNiNotifyEvent(const GnssNiNotification& notify, const void* data,
363                                       const LocInEmergency emergencyState);
364     virtual void reportGnssMeasurementsEvent(const GnssMeasurements& gnssMeasurements,
365                                                 int msInWeek);
366     virtual void reportSvPolynomialEvent(GnssSvPolynomial &svPolynomial);
367     virtual void reportSvEphemerisEvent(GnssSvEphemerisReport & svEphemeris);
368     virtual void reportGnssSvIdConfigEvent(const GnssSvIdConfig& config);
369     virtual void reportGnssSvTypeConfigEvent(const GnssSvTypeConfig& config);
370     virtual bool reportGnssEngEnergyConsumedEvent(uint64_t energyConsumedSinceFirstBoot);
371     virtual void reportLocationSystemInfoEvent(const LocationSystemInfo& locationSystemInfo);
372 
373     virtual bool requestATL(int connHandle, LocAGpsType agps_type, LocApnTypeMask apn_type_mask);
374     virtual bool releaseATL(int connHandle);
375     virtual bool requestOdcpiEvent(OdcpiRequestInfo& request);
376     virtual bool reportDeleteAidingDataEvent(GnssAidingData& aidingData);
377     virtual bool reportKlobucharIonoModelEvent(GnssKlobucharIonoModel& ionoModel);
378     virtual bool reportGnssAdditionalSystemInfoEvent(
379             GnssAdditionalSystemInfo& additionalSystemInfo);
380     virtual void reportNfwNotificationEvent(GnssNfwNotification& notification);
381 
382     /* ======== UTILITIES ================================================================= */
383     bool needReportForGnssClient(const UlpLocation& ulpLocation,
384             enum loc_sess_status status, LocPosTechMask techMask);
385     bool needReportForFlpClient(enum loc_sess_status status, LocPosTechMask techMask);
386     void reportPosition(const UlpLocation &ulpLocation,
387                         const GpsLocationExtended &locationExtended,
388                         enum loc_sess_status status,
389                         LocPosTechMask techMask);
390     void reportEnginePositions(unsigned int count,
391                                const EngineLocationInfo* locationArr);
392     void reportSv(GnssSvNotification& svNotify);
393     void reportNmea(const char* nmea, size_t length);
394     void reportData(GnssDataNotification& dataNotify);
395     bool requestNiNotify(const GnssNiNotification& notify, const void* data,
396                          const bool bInformNiAccept);
397     void reportGnssMeasurementData(const GnssMeasurementsNotification& measurements);
398     void reportGnssSvIdConfig(const GnssSvIdConfig& config);
399     void reportGnssSvTypeConfig(const GnssSvTypeConfig& config);
400     void requestOdcpi(const OdcpiRequestInfo& request);
401     void invokeGnssEnergyConsumedCallback(uint64_t energyConsumedSinceFirstBoot);
402     void saveGnssEnergyConsumedCallback(GnssEnergyConsumedCallback energyConsumedCb);
403     void reportLocationSystemInfo(const LocationSystemInfo & locationSystemInfo);
reportNfwNotification(const GnssNfwNotification & notification)404     inline void reportNfwNotification(const GnssNfwNotification& notification) {
405         if (NULL != mNfwCb) {
406             mNfwCb(notification);
407         }
408     }
getE911State(void)409     inline bool getE911State(void) {
410         if (NULL != mIsE911Session) {
411             return mIsE911Session();
412         }
413         return false;
414     }
415 
416     /*======== GNSSDEBUG ================================================================*/
417     bool getDebugReport(GnssDebugReport& report);
418     /* get AGC information from system status and fill it */
419     void getAgcInformation(GnssMeasurementsNotification& measurements, int msInWeek);
420     /* get Data information from system status and fill it */
421     void getDataInformation(GnssDataNotification& data, int msInWeek);
422 
423     /*==== SYSTEM STATUS ================================================================*/
getSystemStatus(void)424     inline SystemStatus* getSystemStatus(void) { return mSystemStatus; }
getServerUrl(void)425     std::string& getServerUrl(void) { return mServerUrl; }
getMoServerUrl(void)426     std::string& getMoServerUrl(void) { return mMoServerUrl; }
427 
428     /*==== CONVERSION ===================================================================*/
429     static uint32_t convertSuplVersion(const GnssConfigSuplVersion suplVersion);
430     static uint32_t convertLppProfile(const GnssConfigLppProfile lppProfile);
431     static uint32_t convertEP4ES(const GnssConfigEmergencyPdnForEmergencySupl);
432     static uint32_t convertSuplEs(const GnssConfigSuplEmergencyServices suplEmergencyServices);
433     static uint32_t convertLppeCp(const GnssConfigLppeControlPlaneMask lppeControlPlaneMask);
434     static uint32_t convertLppeUp(const GnssConfigLppeUserPlaneMask lppeUserPlaneMask);
435     static uint32_t convertAGloProt(const GnssConfigAGlonassPositionProtocolMask);
436     static uint32_t convertSuplMode(const GnssConfigSuplModeMask suplModeMask);
437     static void convertSatelliteInfo(std::vector<GnssDebugSatelliteInfo>& out,
438                                      const GnssSvType& in_constellation,
439                                      const SystemStatusReports& in);
440     static bool convertToGnssSvIdConfig(
441             const std::vector<GnssSvIdSource>& blacklistedSvIds, GnssSvIdConfig& config);
442     static void convertFromGnssSvIdConfig(
443             const GnssSvIdConfig& svConfig, GnssConfig& config);
444     static void convertGnssSvIdMaskToList(
445             uint64_t svIdMask, std::vector<GnssSvIdSource>& svIds,
446             GnssSvId initialSvId, GnssSvType svType);
447 
448     void injectLocationCommand(double latitude, double longitude, float accuracy);
449     void injectLocationExtCommand(const GnssLocationInfoNotification &locationInfo);
450 
451     void injectTimeCommand(int64_t time, int64_t timeReference, int32_t uncertainty);
452     void blockCPICommand(double latitude, double longitude, float accuracy,
453                          int blockDurationMsec, double latLonDiffThreshold);
454 
455     /* ==== MISCELLANEOUS ================================================================== */
456     /* ======== COMMANDS ====(Called from Client Thread)==================================== */
457     void getPowerStateChangesCommand(void* powerStateCb);
458     /* ======== UTILITIES ================================================================== */
459     void reportPowerStateIfChanged();
savePowerStateCallback(powerStateCallback powerStateCb)460     void savePowerStateCallback(powerStateCallback powerStateCb){ mPowerStateCb = powerStateCb; }
getPowerState()461     bool getPowerState() { return mPowerOn; }
setAllowFlpNetworkFixes(uint32_t allow)462     void setAllowFlpNetworkFixes(uint32_t allow) { mAllowFlpNetworkFixes = allow; }
getAllowFlpNetworkFixes()463     uint32_t getAllowFlpNetworkFixes() { return mAllowFlpNetworkFixes; }
464     void setSuplHostServer(const char* server, int port, LocServerType type);
465     void notifyClientOfCachedLocationSystemInfo(LocationAPI* client,
466                                                 const LocationCallbacks& callbacks);
467 };
468 
469 #endif //GNSS_ADAPTER_H
470