diff --git a/sdm845/android/location_api/GnssAPIClient.cpp b/sdm845/android/location_api/GnssAPIClient.cpp
index f0b6f76..61b8b38 100644
--- a/sdm845/android/location_api/GnssAPIClient.cpp
+++ b/sdm845/android/location_api/GnssAPIClient.cpp
@@ -166,6 +166,10 @@
     memset(&mTrackingOptions, 0, sizeof(TrackingOptions));
     mTrackingOptions.size = sizeof(TrackingOptions);
     mTrackingOptions.minInterval = minIntervalMs;
+    if (IGnss::GnssPositionRecurrence::RECURRENCE_SINGLE == recurrence) {
+        mTrackingOptions.minInterval =
+                std::numeric_limits<decltype(mTrackingOptions.minInterval)>::max();
+    }
     mTrackingOptions.minDistance = preferredAccuracyMeters;
     if (mode == IGnss::GnssPositionMode::STANDALONE)
         mTrackingOptions.mode = GNSS_SUPL_MODE_STANDALONE;
diff --git a/sdm845/core/LocApiBase.cpp b/sdm845/core/LocApiBase.cpp
index c317d59..d06fddf 100644
--- a/sdm845/core/LocApiBase.cpp
+++ b/sdm845/core/LocApiBase.cpp
@@ -273,7 +273,7 @@
     // print the location info before delivering
     LOC_LOGD("flags: %d\n  source: %d\n  latitude: %f\n  longitude: %f\n  "
              "altitude: %f\n  speed: %f\n  bearing: %f\n  accuracy: %f\n  "
-             "timestamp: %" PRId64 "\n  rawDataSize: %d\n  rawData: %p\n  "
+             "timestamp: %" PRId64 "\n"
              "Session status: %d\n Technology mask: %u\n "
              "SV used in fix (gps/glo/bds/gal/qzss) : \
              (%" PRIx64 "/%" PRIx64 "/%" PRIx64 "/%" PRIx64 "/%" PRIx64 ")",
@@ -281,8 +281,7 @@
              location.gpsLocation.latitude, location.gpsLocation.longitude,
              location.gpsLocation.altitude, location.gpsLocation.speed,
              location.gpsLocation.bearing, location.gpsLocation.accuracy,
-             location.gpsLocation.timestamp, location.rawDataSize,
-             location.rawData, status, loc_technology_mask,
+             location.gpsLocation.timestamp, status, loc_technology_mask,
              locationExtended.gnss_sv_used_ids.gps_sv_used_ids_mask,
              locationExtended.gnss_sv_used_ids.glo_sv_used_ids_mask,
              locationExtended.gnss_sv_used_ids.bds_sv_used_ids_mask,
diff --git a/sdm845/core/SystemStatus.cpp b/sdm845/core/SystemStatus.cpp
index d3f654a..2fea31e 100644
--- a/sdm845/core/SystemStatus.cpp
+++ b/sdm845/core/SystemStatus.cpp
@@ -1690,7 +1690,7 @@
 bool SystemStatus::eventConnectionStatus(bool connected, int8_t type)
 {
     // send networkinof dataitem to systemstatus observer clients
-    SystemStatusNetworkInfo s(type, "", "", false, connected, false);
+    SystemStatusNetworkInfo s(type, "", "", connected);
     mSysStatusObsvr.notify({&s});
 
     return true;
diff --git a/sdm845/core/SystemStatus.h b/sdm845/core/SystemStatus.h
index 8674b07..e86f94b 100644
--- a/sdm845/core/SystemStatus.h
+++ b/sdm845/core/SystemStatus.h
@@ -468,7 +468,6 @@
             int32_t type=0,
             std::string typeName="",
             string subTypeName="",
-            bool available=false,
             bool connected=false,
             bool roaming=false) :
             NetworkInfoDataItemBase(
@@ -476,7 +475,7 @@
                     type,
                     typeName,
                     subTypeName,
-                    available,
+                    connected && (!roaming),
                     connected,
                     roaming),
             mSrcObjPtr(nullptr) {}
@@ -486,15 +485,7 @@
         mType = itemBase.getType();
     }
     inline bool equals(const SystemStatusNetworkInfo& peer) {
-        if ((mAllTypes == peer.mAllTypes) &&
-            (mTypeName == peer.mTypeName) &&
-            (mSubTypeName == peer.mSubTypeName) &&
-            (mAvailable == peer.mAvailable) &&
-            (mConnected == peer.mConnected) &&
-            (mRoaming == peer.mRoaming)) {
-            return true;
-        }
-        return false;
+        return (mAllTypes == peer.mAllTypes);
     }
     inline virtual SystemStatusItemBase& collate(SystemStatusItemBase& curInfo) {
         uint64_t allTypes = (static_cast<SystemStatusNetworkInfo&>(curInfo)).mAllTypes;
@@ -525,8 +516,9 @@
             RilServiceInfoDataItemBase() {}
     inline SystemStatusServiceInfo(const RilServiceInfoDataItemBase& itemBase) :
             RilServiceInfoDataItemBase(itemBase) {}
-    inline bool equals(const SystemStatusServiceInfo& /*peer*/) {
-        return true;
+    inline bool equals(const SystemStatusServiceInfo& peer) {
+        return static_cast<const RilServiceInfoDataItemBase&>(peer) ==
+                static_cast<const RilServiceInfoDataItemBase&>(*this);
     }
 };
 
@@ -538,8 +530,9 @@
             RilCellInfoDataItemBase() {}
     inline SystemStatusRilCellInfo(const RilCellInfoDataItemBase& itemBase) :
             RilCellInfoDataItemBase(itemBase) {}
-    inline bool equals(const SystemStatusRilCellInfo& /*peer*/) {
-        return true;
+    inline bool equals(const SystemStatusRilCellInfo& peer) {
+        return static_cast<const RilCellInfoDataItemBase&>(peer) ==
+                static_cast<const RilCellInfoDataItemBase&>(*this);
     }
 };
 
diff --git a/sdm845/core/data-items/DataItemConcreteTypesBase.h b/sdm845/core/data-items/DataItemConcreteTypesBase.h
index 065366d..bcb8d72 100644
--- a/sdm845/core/data-items/DataItemConcreteTypesBase.h
+++ b/sdm845/core/data-items/DataItemConcreteTypesBase.h
@@ -236,8 +236,7 @@
     NetworkInfoDataItemBase(
     NetworkType initialType, int32_t type, string typeName, string subTypeName,
     bool available, bool connected, bool roaming ):
-            mAllTypes((initialType >= TYPE_UNKNOWN || initialType < TYPE_MOBILE) ?
-                      0 : (1<<initialType)),
+            mAllTypes(typeToAllTypes(initialType)),
             mType(type),
             mTypeName(typeName),
             mSubTypeName(subTypeName),
@@ -263,7 +262,9 @@
     bool mRoaming;
 protected:
     DataItemId mId;
-
+    inline uint64_t typeToAllTypes(NetworkType type) {
+        return (type >= TYPE_UNKNOWN || type < TYPE_MOBILE) ?  0 : (1<<type);
+    }
 };
 
 class ServiceStatusDataItemBase : public IDataItemCore {
@@ -313,24 +314,42 @@
 
 class RilServiceInfoDataItemBase : public IDataItemCore {
 public:
-    RilServiceInfoDataItemBase() :
-        mId(RILSERVICEINFO_DATA_ITEM_ID) {}
-    virtual ~RilServiceInfoDataItemBase() {}
+    inline RilServiceInfoDataItemBase() :
+            mData(nullptr), mId(RILSERVICEINFO_DATA_ITEM_ID) {}
+    inline virtual ~RilServiceInfoDataItemBase() { if (nullptr != mData) free(mData); }
     inline virtual DataItemId getId() { return mId; }
     virtual void stringify(string& /*valueStr*/) {}
     virtual int32_t copy(IDataItemCore* /*src*/, bool* /*dataItemCopied = NULL*/) {return 1;}
+    inline RilServiceInfoDataItemBase(const RilServiceInfoDataItemBase& peer) :
+            RilServiceInfoDataItemBase() {
+        peer.setPeerData(*this);
+    }
+    inline virtual bool operator==(const RilServiceInfoDataItemBase& other) const {
+        return other.mData == mData;
+    }
+    inline virtual void setPeerData(RilServiceInfoDataItemBase& /*peer*/) const {}
+    void* mData;
 protected:
     DataItemId mId;
 };
 
 class RilCellInfoDataItemBase : public IDataItemCore {
 public:
-    RilCellInfoDataItemBase() :
-        mId(RILCELLINFO_DATA_ITEM_ID) {}
-    virtual ~RilCellInfoDataItemBase() {}
+    inline RilCellInfoDataItemBase() :
+            mData(nullptr), mId(RILCELLINFO_DATA_ITEM_ID) {}
+    inline virtual ~RilCellInfoDataItemBase() { if (nullptr != mData) free(mData); }
     inline virtual DataItemId getId() { return mId; }
     virtual void stringify(string& /*valueStr*/) {}
     virtual int32_t copy(IDataItemCore* /*src*/, bool* /*dataItemCopied = NULL*/) {return 1;}
+    inline RilCellInfoDataItemBase(const RilCellInfoDataItemBase& peer) :
+            RilCellInfoDataItemBase() {
+        peer.setPeerData(*this);
+    }
+    inline virtual bool operator==(const RilCellInfoDataItemBase& other) const {
+        return other.mData == mData;
+    }
+    inline virtual void setPeerData(RilCellInfoDataItemBase& /*peer*/) const {}
+    void* mData;
 protected:
     DataItemId mId;
 };
diff --git a/sdm845/gnss/GnssAdapter.cpp b/sdm845/gnss/GnssAdapter.cpp
index 9cc4edf..04750b6 100644
--- a/sdm845/gnss/GnssAdapter.cpp
+++ b/sdm845/gnss/GnssAdapter.cpp
@@ -196,32 +196,32 @@
 }
 
 void
-GnssAdapter::convertLocation(Location& out, const LocGpsLocation& locGpsLocation,
+GnssAdapter::convertLocation(Location& out, const UlpLocation& ulpLocation,
                              const GpsLocationExtended& locationExtended,
                              const LocPosTechMask techMask)
 {
     memset(&out, 0, sizeof(Location));
     out.size = sizeof(Location);
-    if (LOC_GPS_LOCATION_HAS_LAT_LONG & locGpsLocation.flags) {
+    if (LOC_GPS_LOCATION_HAS_LAT_LONG & ulpLocation.gpsLocation.flags) {
         out.flags |= LOCATION_HAS_LAT_LONG_BIT;
-        out.latitude = locGpsLocation.latitude;
-        out.longitude = locGpsLocation.longitude;
+        out.latitude = ulpLocation.gpsLocation.latitude;
+        out.longitude = ulpLocation.gpsLocation.longitude;
     }
-    if (LOC_GPS_LOCATION_HAS_ALTITUDE & locGpsLocation.flags) {
+    if (LOC_GPS_LOCATION_HAS_ALTITUDE & ulpLocation.gpsLocation.flags) {
         out.flags |= LOCATION_HAS_ALTITUDE_BIT;
-        out.altitude = locGpsLocation.altitude;
+        out.altitude = ulpLocation.gpsLocation.altitude;
     }
-    if (LOC_GPS_LOCATION_HAS_SPEED & locGpsLocation.flags) {
+    if (LOC_GPS_LOCATION_HAS_SPEED & ulpLocation.gpsLocation.flags) {
         out.flags |= LOCATION_HAS_SPEED_BIT;
-        out.speed = locGpsLocation.speed;
+        out.speed = ulpLocation.gpsLocation.speed;
     }
-    if (LOC_GPS_LOCATION_HAS_BEARING & locGpsLocation.flags) {
+    if (LOC_GPS_LOCATION_HAS_BEARING & ulpLocation.gpsLocation.flags) {
         out.flags |= LOCATION_HAS_BEARING_BIT;
-        out.bearing = locGpsLocation.bearing;
+        out.bearing = ulpLocation.gpsLocation.bearing;
     }
-    if (LOC_GPS_LOCATION_HAS_ACCURACY & locGpsLocation.flags) {
+    if (LOC_GPS_LOCATION_HAS_ACCURACY & ulpLocation.gpsLocation.flags) {
         out.flags |= LOCATION_HAS_ACCURACY_BIT;
-        out.accuracy = locGpsLocation.accuracy;
+        out.accuracy = ulpLocation.gpsLocation.accuracy;
     }
     if (GPS_LOCATION_EXTENDED_HAS_VERT_UNC & locationExtended.flags) {
         out.flags |= LOCATION_HAS_VERTICAL_ACCURACY_BIT;
@@ -235,7 +235,7 @@
         out.flags |= LOCATION_HAS_BEARING_ACCURACY_BIT;
         out.bearingAccuracy = locationExtended.bearing_unc;
     }
-    out.timestamp = locGpsLocation.timestamp;
+    out.timestamp = ulpLocation.gpsLocation.timestamp;
     if (LOC_POS_TECH_MASK_SATELLITE & techMask) {
         out.techMask |= LOCATION_TECHNOLOGY_GNSS_BIT;
     }
@@ -265,6 +265,11 @@
         out.hdop = locationExtended.hdop;
         out.vdop = locationExtended.vdop;
     }
+    if (GPS_LOCATION_EXTENDED_HAS_EXT_DOP & locationExtended.flags) {
+        out.flags |= GNSS_LOCATION_INFO_EXT_DOP_BIT;
+        out.gdop = locationExtended.extDOP.GDOP;
+        out.tdop = locationExtended.extDOP.TDOP;
+    }
     if (GPS_LOCATION_EXTENDED_HAS_MAG_DEV & locationExtended.flags) {
         out.flags |= GNSS_LOCATION_INFO_MAGNETIC_DEVIATION_BIT;
         out.magneticDeviation = locationExtended.magneticDeviation;
@@ -321,6 +326,53 @@
         out.flags |= GNSS_LOCATION_INFO_HOR_ACCURACY_ELIP_AZIMUTH_BIT;
         out.horUncEllipseOrientAzimuth = locationExtended.horUncEllipseOrientAzimuth;
     }
+    if (GPS_LOCATION_EXTENDED_HAS_GNSS_SV_USED_DATA & locationExtended.flags) {
+        out.flags |= GNSS_LOCATION_INFO_GNSS_SV_USED_DATA_BIT;
+        out.svUsedInPosition.gpsSvUsedIdsMask =
+                locationExtended.gnss_sv_used_ids.gps_sv_used_ids_mask;
+        out.svUsedInPosition.gloSvUsedIdsMask =
+                locationExtended.gnss_sv_used_ids.glo_sv_used_ids_mask;
+        out.svUsedInPosition.galSvUsedIdsMask =
+                locationExtended.gnss_sv_used_ids.gal_sv_used_ids_mask;
+        out.svUsedInPosition.bdsSvUsedIdsMask =
+                locationExtended.gnss_sv_used_ids.bds_sv_used_ids_mask;
+        out.svUsedInPosition.qzssSvUsedIdsMask =
+                locationExtended.gnss_sv_used_ids.qzss_sv_used_ids_mask;
+    }
+    if (GPS_LOCATION_EXTENDED_HAS_NAV_SOLUTION_MASK & locationExtended.flags) {
+        out.flags |= GNSS_LOCATION_INFO_NAV_SOLUTION_MASK_BIT;
+        out.navSolutionMask = locationExtended.navSolutionMask;
+    }
+    if (GPS_LOCATION_EXTENDED_HAS_POS_TECH_MASK & locationExtended.flags) {
+        out.flags |= GPS_LOCATION_EXTENDED_HAS_POS_TECH_MASK;
+        out.posTechMask = locationExtended.tech_mask;
+    }
+    if (GPS_LOCATION_EXTENDED_HAS_POS_DYNAMICS_DATA & locationExtended.flags) {
+        out.flags |= GPS_LOCATION_EXTENDED_HAS_POS_DYNAMICS_DATA;
+        if (locationExtended.bodyFrameData.bodyFrameDatamask &
+                LOCATION_NAV_DATA_HAS_LONG_ACCEL_BIT) {
+            out.bodyFrameData.bodyFrameDataMask |= LOCATION_NAV_DATA_HAS_LONG_ACCEL_BIT;
+        }
+        if (locationExtended.bodyFrameData.bodyFrameDatamask &
+                LOCATION_NAV_DATA_HAS_LAT_ACCEL_BIT) {
+            out.bodyFrameData.bodyFrameDataMask |= LOCATION_NAV_DATA_HAS_LAT_ACCEL_BIT;
+        }
+        if (locationExtended.bodyFrameData.bodyFrameDatamask &
+                LOCATION_NAV_DATA_HAS_VERT_ACCEL_BIT) {
+            out.bodyFrameData.bodyFrameDataMask |= LOCATION_NAV_DATA_HAS_VERT_ACCEL_BIT;
+        }
+        if (locationExtended.bodyFrameData.bodyFrameDatamask & LOCATION_NAV_DATA_HAS_YAW_RATE_BIT) {
+            out.bodyFrameData.bodyFrameDataMask |= LOCATION_NAV_DATA_HAS_YAW_RATE_BIT;
+        }
+        if (locationExtended.bodyFrameData.bodyFrameDatamask & LOCATION_NAV_DATA_HAS_PITCH_BIT) {
+            out.bodyFrameData.bodyFrameDataMask |= LOCATION_NAV_DATA_HAS_PITCH_BIT;
+        }
+        out.bodyFrameData.longAccel = locationExtended.bodyFrameData.longAccel;
+        out.bodyFrameData.latAccel = locationExtended.bodyFrameData.latAccel;
+        out.bodyFrameData.vertAccel = locationExtended.bodyFrameData.vertAccel;
+        out.bodyFrameData.yawRate = locationExtended.bodyFrameData.yawRate;
+        out.bodyFrameData.pitch = locationExtended.bodyFrameData.pitch;
+    }
 }
 
 inline uint32_t
@@ -1702,7 +1754,7 @@
 {
     LOC_API_ADAPTER_EVENT_MASK_T mask = 0;
     for (auto it=mClientData.begin(); it != mClientData.end(); ++it) {
-        if (it->second.trackingCb != nullptr) {
+        if (it->second.trackingCb != nullptr || it->second.gnssLocationInfoCb != nullptr) {
             mask |= LOC_API_ADAPTER_BIT_PARSED_POSITION_REPORT;
         }
         if (it->second.gnssNiCb != nullptr) {
@@ -1909,7 +1961,7 @@
 GnssAdapter::hasTrackingCallback(LocationAPI* client)
 {
     auto it = mClientData.find(client);
-    return (it != mClientData.end() && it->second.trackingCb);
+    return (it != mClientData.end() && (it->second.trackingCb || it->second.gnssLocationInfoCb));
 }
 
 bool
@@ -2740,15 +2792,15 @@
         }
 
         for (auto it=mClientData.begin(); it != mClientData.end(); ++it) {
-            if (nullptr != it->second.trackingCb) {
-                Location location = {};
-                convertLocation(location, ulpLocation.gpsLocation, locationExtended, techMask);
-                it->second.trackingCb(location);
-            }
             if (nullptr != it->second.gnssLocationInfoCb) {
                 GnssLocationInfoNotification locationInfo = {};
                 convertLocationInfo(locationInfo, locationExtended);
+                convertLocation(locationInfo.location, ulpLocation, locationExtended, techMask);
                 it->second.gnssLocationInfoCb(locationInfo);
+            } else if (nullptr != it->second.trackingCb) {
+                Location location = {};
+                convertLocation(location, ulpLocation, locationExtended, techMask);
+                it->second.trackingCb(location);
             }
         }
     }
@@ -2766,15 +2818,6 @@
             reportNmea(sentence.c_str(), sentence.length());
         }
     }
-
-    // Free the allocated memory for rawData
-    UlpLocation* gp = (UlpLocation*)&(ulpLocation);
-    if (gp != NULL && gp->rawData != NULL)
-    {
-        delete (char*)gp->rawData;
-        gp->rawData = NULL;
-        gp->rawDataSize = 0;
-    }
 }
 
 void
diff --git a/sdm845/gnss/GnssAdapter.h b/sdm845/gnss/GnssAdapter.h
index 9d54e6a..ad512da 100644
--- a/sdm845/gnss/GnssAdapter.h
+++ b/sdm845/gnss/GnssAdapter.h
@@ -156,7 +156,7 @@
 
     /*==== CONVERSION ===================================================================*/
     static void convertOptions(LocPosMode& out, const TrackingOptions& trackingOptions);
-    static void convertLocation(Location& out, const LocGpsLocation& locGpsLocation,
+    static void convertLocation(Location& out, const UlpLocation& ulpLocation,
                                 const GpsLocationExtended& locationExtended,
                                 const LocPosTechMask techMask);
     static void convertLocationInfo(GnssLocationInfoNotification& out,
diff --git a/sdm845/location/ILocationAPI.h b/sdm845/location/ILocationAPI.h
new file mode 100644
index 0000000..422bbe4
--- /dev/null
+++ b/sdm845/location/ILocationAPI.h
@@ -0,0 +1,194 @@
+/* Copyright (c) 2018 The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ *       copyright notice, this list of conditions and the following
+ *       disclaimer in the documentation and/or other materials provided
+ *       with the distribution.
+ *     * Neither the name of The Linux Foundation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ILOCATIONAPI_H
+#define ILOCATIONAPI_H
+
+#include "LocationDataTypes.h"
+
+class ILocationAPI
+{
+public:
+    virtual ~ILocationAPI(){};
+
+    /** @brief Updates/changes the callbacks that will be called.
+        mandatory callbacks must be present for callbacks to be successfully updated
+        no return value */
+    virtual void updateCallbacks(LocationCallbacks&) = 0;
+
+    /* ================================== TRACKING ================================== */
+
+    /** @brief Starts a tracking session, which returns a session id that will be
+       used by the other tracking APIs and also in the responseCallback to match command
+       with response. locations are reported on the registered trackingCallback
+       periodically according to TrackingOptions.
+       @return session id
+        responseCallback returns:
+                LOCATION_ERROR_SUCCESS if session was successfully started
+                LOCATION_ERROR_ALREADY_STARTED if a startTracking session is already in progress
+                LOCATION_ERROR_CALLBACK_MISSING if no trackingCallback was passed
+                LOCATION_ERROR_INVALID_PARAMETER if LocationOptions parameter is invalid */
+    virtual uint32_t startTracking(TrackingOptions&) = 0;
+
+    /** @brief Stops a tracking session associated with id parameter.
+        responseCallback returns:
+                LOCATION_ERROR_SUCCESS if successful
+                LOCATION_ERROR_ID_UNKNOWN if id is not associated with a tracking session */
+    virtual void stopTracking(uint32_t id) = 0;
+
+    /** @brief Changes the TrackingOptions of a tracking session associated with id.
+        responseCallback returns:
+                LOCATION_ERROR_SUCCESS if successful
+                LOCATION_ERROR_INVALID_PARAMETER if LocationOptions parameters are invalid
+                LOCATION_ERROR_ID_UNKNOWN if id is not associated with a tracking session */
+    virtual void updateTrackingOptions(uint32_t id, TrackingOptions&) = 0;
+
+    /* ================================== BATCHING ================================== */
+
+    /** @brief starts a batching session, which returns a session id that will be
+       used by the other batching APIs and also in the responseCallback to match command
+       with response. locations are reported on the batchingCallback passed in createInstance
+       periodically according to LocationOptions. A batching session starts tracking on
+       the low power processor and delivers them in batches by the batchingCallback when
+       the batch is full or when getBatchedLocations is called. This allows for the processor
+       that calls this API to sleep when the low power processor can batch locations in the
+       backgroup and wake up the processor calling the API only when the batch is full, thus
+       saving power.
+       @return session id
+        responseCallback returns:
+                LOCATION_ERROR_SUCCESS if session was successful
+                LOCATION_ERROR_ALREADY_STARTED if a startBatching session is already in progress
+                LOCATION_ERROR_CALLBACK_MISSING if no batchingCallback
+                LOCATION_ERROR_INVALID_PARAMETER if a parameter is invalid
+                LOCATION_ERROR_NOT_SUPPORTED if batching is not supported */
+    virtual uint32_t startBatching(BatchingOptions&) = 0;
+
+    /** @brief Stops a batching session associated with id parameter.
+        responseCallback returns:
+                LOCATION_ERROR_SUCCESS if successful
+                LOCATION_ERROR_ID_UNKNOWN if id is not associated with batching session */
+    virtual void stopBatching(uint32_t id) = 0;
+
+    /** @brief Changes the LocationOptions of a batching session associated with id.
+        responseCallback returns:
+                LOCATION_ERROR_SUCCESS if successful
+                LOCATION_ERROR_INVALID_PARAMETER if LocationOptions parameters are invalid
+                LOCATION_ERROR_ID_UNKNOWN if id is not associated with a batching session */
+    virtual void updateBatchingOptions(uint32_t id, BatchingOptions&) = 0;
+
+    /** @brief Gets a number of locations that are currently stored/batched
+       on the low power processor, delivered by the batchingCallback passed in createInstance.
+       Location are then deleted from the batch stored on the low power processor.
+        responseCallback returns:
+                LOCATION_ERROR_SUCCESS if successful, will be followed by batchingCallback call
+                LOCATION_ERROR_CALLBACK_MISSING if no batchingCallback
+                LOCATION_ERROR_ID_UNKNOWN if id is not associated with a batching session */
+    virtual void getBatchedLocations(uint32_t id, size_t count) = 0;
+
+    /* ================================== GEOFENCE ================================== */
+
+    /** @brief Adds any number of geofences and returns an array of geofence ids that
+       will be used by the other geofence APIs and also in the collectiveResponseCallback to
+       match command with response. The geofenceBreachCallback will deliver the status of each
+       geofence according to the GeofenceOption for each. The geofence id array returned will
+       be valid until the collectiveResponseCallback is called and has returned.
+       @return id array
+        collectiveResponseCallback returns:
+                LOCATION_ERROR_SUCCESS if session was successful
+                LOCATION_ERROR_CALLBACK_MISSING if no geofenceBreachCallback
+                LOCATION_ERROR_INVALID_PARAMETER if any parameters are invalid
+                LOCATION_ERROR_NOT_SUPPORTED if geofence is not supported */
+    virtual uint32_t* addGeofences(size_t count, GeofenceOption*, GeofenceInfo*) = 0;
+
+    /** @brief Removes any number of geofences. Caller should delete ids array after
+       removeGeofences returneds.
+        collectiveResponseCallback returns:
+                LOCATION_ERROR_SUCCESS if successful
+                LOCATION_ERROR_ID_UNKNOWN if id is not associated with a geofence session */
+    virtual void removeGeofences(size_t count, uint32_t* ids) = 0;
+
+    /** @brief Modifies any number of geofences. Caller should delete ids array after
+       modifyGeofences returns.
+        collectiveResponseCallback returns:
+                LOCATION_ERROR_SUCCESS if successful
+                LOCATION_ERROR_ID_UNKNOWN if id is not associated with a geofence session
+                LOCATION_ERROR_INVALID_PARAMETER if any parameters are invalid */
+    virtual void modifyGeofences(size_t count, uint32_t* ids, GeofenceOption* options) = 0;
+
+    /** @brief Pauses any number of geofences, which is similar to removeGeofences,
+       only that they can be resumed at any time. Caller should delete ids array after
+       pauseGeofences returns.
+        collectiveResponseCallback returns:
+                LOCATION_ERROR_SUCCESS if successful
+                LOCATION_ERROR_ID_UNKNOWN if id is not associated with a geofence session */
+    virtual void pauseGeofences(size_t count, uint32_t* ids) = 0;
+
+    /** @brief Resumes any number of geofences that are currently paused. Caller should
+       delete ids array after resumeGeofences returns.
+        collectiveResponseCallback returns:
+                LOCATION_ERROR_SUCCESS if successful
+                LOCATION_ERROR_ID_UNKNOWN if id is not associated with a geofence session */
+    virtual void resumeGeofences(size_t count, uint32_t* ids) = 0;
+
+    /* ================================== GNSS ====================================== */
+
+     /** @brief gnssNiResponse is called in response to a gnssNiCallback.
+        responseCallback returns:
+                LOCATION_ERROR_SUCCESS if session was successful
+                LOCATION_ERROR_INVALID_PARAMETER if any parameters in GnssNiResponse are invalid
+                LOCATION_ERROR_ID_UNKNOWN if id does not match a gnssNiCallback */
+    virtual void gnssNiResponse(uint32_t id, GnssNiResponse response) = 0;
+};
+
+class ILocationControlAPI
+{
+public:
+    virtual ~ILocationControlAPI(){};
+
+    /** @brief Updates the gnss specific configuration, which returns a session id array
+       with an id for each of the bits set in GnssConfig.flags, order from low bits to high bits.
+       The response for each config that is set will be returned in collectiveResponseCallback.
+       The session id array returned will be valid until the collectiveResponseCallback is called
+       and has returned. This effect is global for all clients of ILocationAPI.
+        collectiveResponseCallback returns:
+                LOCATION_ERROR_SUCCESS if session was successful
+                LOCATION_ERROR_INVALID_PARAMETER if any other parameters are invalid
+                LOCATION_ERROR_GENERAL_FAILURE if failure for any other reason */
+    virtual uint32_t* gnssUpdateConfig(GnssConfig config) = 0;
+
+    /** @brief Delete specific gnss aiding data for testing, which returns a session id
+       that will be returned in responseCallback to match command with response.
+       Only allowed in userdebug builds. This effect is global for all clients of ILocationAPI.
+        responseCallback returns:
+                LOCATION_ERROR_SUCCESS if successful
+                LOCATION_ERROR_INVALID_PARAMETER if any parameters are invalid
+                LOCATION_ERROR_NOT_SUPPORTED if build is not userdebug */
+    virtual uint32_t gnssDeleteAidingData(GnssAidingData& data) = 0;
+};
+
+#endif /* ILOCATIONAPI_H */
diff --git a/sdm845/location/LocationAPI.h b/sdm845/location/LocationAPI.h
index 682a376..f4f31f9 100644
--- a/sdm845/location/LocationAPI.h
+++ b/sdm845/location/LocationAPI.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017 The Linux Foundation. All rights reserved.
+/* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -26,862 +26,12 @@
  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef LOCATION_H
-#define LOCATION_H
+#ifndef LOCATIONAPI_H
+#define LOCATIONAPI_H
 
-#include <vector>
-#include <stdint.h>
-#include <functional>
-#include <list>
+#include "ILocationAPI.h"
 
-#define GNSS_NI_REQUESTOR_MAX  256
-#define GNSS_NI_MESSAGE_ID_MAX 2048
-#define GNSS_SV_MAX 64
-#define GNSS_MEASUREMENTS_MAX 64
-#define GNSS_UTC_TIME_OFFSET   (3657)
-
-#define GNSS_BUGREPORT_GPS_MIN  (1)
-#define GNSS_BUGREPORT_SBAS_MIN (120)
-#define GNSS_BUGREPORT_GLO_MIN  (1)
-#define GNSS_BUGREPORT_QZSS_MIN (193)
-#define GNSS_BUGREPORT_BDS_MIN  (1)
-#define GNSS_BUGREPORT_GAL_MIN  (1)
-
-typedef enum {
-    LOCATION_ERROR_SUCCESS = 0,
-    LOCATION_ERROR_GENERAL_FAILURE,
-    LOCATION_ERROR_CALLBACK_MISSING,
-    LOCATION_ERROR_INVALID_PARAMETER,
-    LOCATION_ERROR_ID_EXISTS,
-    LOCATION_ERROR_ID_UNKNOWN,
-    LOCATION_ERROR_ALREADY_STARTED,
-    LOCATION_ERROR_GEOFENCES_AT_MAX,
-    LOCATION_ERROR_NOT_SUPPORTED
-} LocationError;
-
-// Flags to indicate which values are valid in a Location
-typedef uint16_t LocationFlagsMask;
-typedef enum {
-    LOCATION_HAS_LAT_LONG_BIT          = (1<<0), // location has valid latitude and longitude
-    LOCATION_HAS_ALTITUDE_BIT          = (1<<1), // location has valid altitude
-    LOCATION_HAS_SPEED_BIT             = (1<<2), // location has valid speed
-    LOCATION_HAS_BEARING_BIT           = (1<<3), // location has valid bearing
-    LOCATION_HAS_ACCURACY_BIT          = (1<<4), // location has valid accuracy
-    LOCATION_HAS_VERTICAL_ACCURACY_BIT = (1<<5), // location has valid vertical accuracy
-    LOCATION_HAS_SPEED_ACCURACY_BIT    = (1<<6), // location has valid speed accuracy
-    LOCATION_HAS_BEARING_ACCURACY_BIT  = (1<<7), // location has valid bearing accuracy
-} LocationFlagsBits;
-
-typedef uint16_t LocationTechnologyMask;
-typedef enum {
-    LOCATION_TECHNOLOGY_GNSS_BIT     = (1<<0), // location was calculated using GNSS
-    LOCATION_TECHNOLOGY_CELL_BIT     = (1<<1), // location was calculated using Cell
-    LOCATION_TECHNOLOGY_WIFI_BIT     = (1<<2), // location was calculated using WiFi
-    LOCATION_TECHNOLOGY_SENSORS_BIT  = (1<<3), // location was calculated using Sensors
-} LocationTechnologyBits;
-
-typedef enum {
-    LOCATION_RELIABILITY_NOT_SET = 0,
-    LOCATION_RELIABILITY_VERY_LOW,
-    LOCATION_RELIABILITY_LOW,
-    LOCATION_RELIABILITY_MEDIUM,
-    LOCATION_RELIABILITY_HIGH,
-} LocationReliability;
-
-typedef uint32_t GnssLocationInfoFlagMask;
-typedef enum {
-    GNSS_LOCATION_INFO_ALTITUDE_MEAN_SEA_LEVEL_BIT      = (1<<0), // valid altitude mean sea level
-    GNSS_LOCATION_INFO_DOP_BIT                          = (1<<1), // valid pdop, hdop, and vdop
-    GNSS_LOCATION_INFO_MAGNETIC_DEVIATION_BIT           = (1<<2), // valid magnetic deviation
-    GNSS_LOCATION_INFO_HOR_RELIABILITY_BIT              = (1<<3), // valid horizontal reliability
-    GNSS_LOCATION_INFO_VER_RELIABILITY_BIT              = (1<<4), // valid vertical reliability
-    GNSS_LOCATION_INFO_HOR_ACCURACY_ELIP_SEMI_MAJOR_BIT = (1<<5), // valid elipsode semi major
-    GNSS_LOCATION_INFO_HOR_ACCURACY_ELIP_SEMI_MINOR_BIT = (1<<6), // valid elipsode semi minor
-    GNSS_LOCATION_INFO_HOR_ACCURACY_ELIP_AZIMUTH_BIT    = (1<<7),// valid accuracy elipsode azimuth
-} GnssLocationInfoFlagBits;
-
-typedef enum {
-    GEOFENCE_BREACH_ENTER = 0,
-    GEOFENCE_BREACH_EXIT,
-    GEOFENCE_BREACH_DWELL_IN,
-    GEOFENCE_BREACH_DWELL_OUT,
-    GEOFENCE_BREACH_UNKNOWN,
-} GeofenceBreachType;
-
-typedef uint16_t GeofenceBreachTypeMask;
-typedef enum {
-    GEOFENCE_BREACH_ENTER_BIT     = (1<<0),
-    GEOFENCE_BREACH_EXIT_BIT      = (1<<1),
-    GEOFENCE_BREACH_DWELL_IN_BIT  = (1<<2),
-    GEOFENCE_BREACH_DWELL_OUT_BIT = (1<<3),
-} GeofenceBreachTypeBits;
-
-typedef enum {
-    GEOFENCE_STATUS_AVAILABILE_NO = 0,
-    GEOFENCE_STATUS_AVAILABILE_YES,
-} GeofenceStatusAvailable;
-
-typedef uint32_t LocationCapabilitiesMask;
-typedef enum {
-    // supports startTracking API with minInterval param
-    LOCATION_CAPABILITIES_TIME_BASED_TRACKING_BIT           = (1<<0),
-    // supports startBatching API with minInterval param
-    LOCATION_CAPABILITIES_TIME_BASED_BATCHING_BIT           = (1<<1),
-    // supports startTracking API with minDistance param
-    LOCATION_CAPABILITIES_DISTANCE_BASED_TRACKING_BIT       = (1<<2),
-    // supports startBatching API with minDistance param
-    LOCATION_CAPABILITIES_DISTANCE_BASED_BATCHING_BIT       = (1<<3),
-    // supports addGeofences API
-    LOCATION_CAPABILITIES_GEOFENCE_BIT                      = (1<<4),
-    // supports GnssMeasurementsCallback
-    LOCATION_CAPABILITIES_GNSS_MEASUREMENTS_BIT             = (1<<5),
-    // supports startTracking/startBatching API with LocationOptions.mode of MSB (Ms Based)
-    LOCATION_CAPABILITIES_GNSS_MSB_BIT                      = (1<<6),
-    // supports startTracking/startBatching API with LocationOptions.mode of MSA (MS Assisted)
-    LOCATION_CAPABILITIES_GNSS_MSA_BIT                      = (1<<7),
-    // supports debug nmea sentences in the debugNmeaCallback
-    LOCATION_CAPABILITIES_DEBUG_NMEA_BIT                    = (1<<8),
-    // support outdoor trip batching
-    LOCATION_CAPABILITIES_OUTDOOR_TRIP_BATCHING_BIT         = (1<<9),
-    // support constellation enablement
-    LOCATION_CAPABILITIES_CONSTELLATION_ENABLEMENT_BIT      = (1<<10),
-    // support agpm
-    LOCATION_CAPABILITIES_AGPM_BIT                          = (1<<11),
-} LocationCapabilitiesBits;
-
-typedef enum {
-    LOCATION_TECHNOLOGY_TYPE_GNSS = 0,
-} LocationTechnologyType;
-
-// Configures how GPS is locked when GPS is disabled (through GnssDisable)
-typedef enum {
-    GNSS_CONFIG_GPS_LOCK_NONE = 0, // gps is not locked when GPS is disabled (GnssDisable)
-    GNSS_CONFIG_GPS_LOCK_MO,       // gps mobile originated (MO) is locked when GPS is disabled
-    GNSS_CONFIG_GPS_LOCK_NI,       // gps network initiated (NI) is locked when GPS is disabled
-    GNSS_CONFIG_GPS_LOCK_MO_AND_NI,// gps MO and NI is locked when GPS is disabled
-} GnssConfigGpsLock;
-
-// SUPL version
-typedef enum {
-    GNSS_CONFIG_SUPL_VERSION_1_0_0 = 1,
-    GNSS_CONFIG_SUPL_VERSION_2_0_0,
-    GNSS_CONFIG_SUPL_VERSION_2_0_2,
-} GnssConfigSuplVersion;
-
-// LTE Positioning Profile
-typedef enum {
-    GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE = 0,              // RRLP on LTE (Default)
-    GNSS_CONFIG_LPP_PROFILE_USER_PLANE,                   // LPP User Plane (UP) on LTE
-    GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE,                // LPP_Control_Plane (CP)
-    GNSS_CONFIG_LPP_PROFILE_USER_PLANE_AND_CONTROL_PLANE, // Both LPP UP and CP
-} GnssConfigLppProfile;
-
-// Technology for LPPe Control Plane
-typedef uint16_t GnssConfigLppeControlPlaneMask;
-typedef enum {
-    GNSS_CONFIG_LPPE_CONTROL_PLANE_DBH_BIT                  = (1<<0), // DBH
-    GNSS_CONFIG_LPPE_CONTROL_PLANE_WLAN_AP_MEASUREMENTS_BIT = (1<<1), // WLAN_AP_MEASUREMENTS
-    GNSS_CONFIG_LPPE_CONTROL_PLANE_SRN_AP_MEASUREMENTS_BIT = (1<<2), // SRN_AP_MEASUREMENTS
-    GNSS_CONFIG_LPPE_CONTROL_PLANE_SENSOR_BARO_MEASUREMENTS_BIT = (1<<3),
-                                                             // SENSOR_BARO_MEASUREMENTS
-} GnssConfigLppeControlPlaneBits;
-
-// Technology for LPPe User Plane
-typedef uint16_t GnssConfigLppeUserPlaneMask;
-typedef enum {
-    GNSS_CONFIG_LPPE_USER_PLANE_DBH_BIT                  = (1<<0), // DBH
-    GNSS_CONFIG_LPPE_USER_PLANE_WLAN_AP_MEASUREMENTS_BIT = (1<<1), // WLAN_AP_MEASUREMENTS
-    GNSS_CONFIG_LPPE_USER_PLANE_SRN_AP_MEASUREMENTS_BIT = (1<<2), // SRN_AP_MEASUREMENTS
-    GNSS_CONFIG_LPPE_USER_PLANE_SENSOR_BARO_MEASUREMENTS_BIT = (1<<3),
-                                                            // SENSOR_BARO_MEASUREMENTS
-} GnssConfigLppeUserPlaneBits;
-
-// Positioning Protocol on A-GLONASS system
-typedef uint16_t GnssConfigAGlonassPositionProtocolMask;
-typedef enum {
-    GNSS_CONFIG_RRC_CONTROL_PLANE_BIT = (1<<0),  // RRC Control Plane
-    GNSS_CONFIG_RRLP_USER_PLANE_BIT   = (1<<1),  // RRLP User Plane
-    GNSS_CONFIG_LLP_USER_PLANE_BIT    = (1<<2),  // LPP User Plane
-    GNSS_CONFIG_LLP_CONTROL_PLANE_BIT = (1<<3),  // LPP Control Plane
-} GnssConfigAGlonassPositionProtocolBits;
-
-typedef enum {
-    GNSS_CONFIG_EMERGENCY_PDN_FOR_EMERGENCY_SUPL_NO = 0,
-    GNSS_CONFIG_EMERGENCY_PDN_FOR_EMERGENCY_SUPL_YES,
-} GnssConfigEmergencyPdnForEmergencySupl;
-
-typedef enum {
-    GNSS_CONFIG_SUPL_EMERGENCY_SERVICES_NO = 0,
-    GNSS_CONFIG_SUPL_EMERGENCY_SERVICES_YES,
-} GnssConfigSuplEmergencyServices;
-
-typedef uint16_t GnssConfigSuplModeMask;
-typedef enum {
-    GNSS_CONFIG_SUPL_MODE_MSB_BIT = (1<<0),
-    GNSS_CONFIG_SUPL_MODE_MSA_BIT = (1<<1),
-} GnssConfigSuplModeBits;
-
-typedef uint32_t GnssConfigFlagsMask;
-typedef enum {
-    GNSS_CONFIG_FLAGS_GPS_LOCK_VALID_BIT                   = (1<<0),
-    GNSS_CONFIG_FLAGS_SUPL_VERSION_VALID_BIT               = (1<<1),
-    GNSS_CONFIG_FLAGS_SET_ASSISTANCE_DATA_VALID_BIT        = (1<<2),
-    GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT                = (1<<3),
-    GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT         = (1<<4),
-    GNSS_CONFIG_FLAGS_LPPE_USER_PLANE_VALID_BIT            = (1<<5),
-    GNSS_CONFIG_FLAGS_AGLONASS_POSITION_PROTOCOL_VALID_BIT = (1<<6),
-    GNSS_CONFIG_FLAGS_EM_PDN_FOR_EM_SUPL_VALID_BIT         = (1<<7),
-    GNSS_CONFIG_FLAGS_SUPL_EM_SERVICES_BIT                 = (1<<8),
-    GNSS_CONFIG_FLAGS_SUPL_MODE_BIT                        = (1<<9),
-    GNSS_CONFIG_FLAGS_BLACKLISTED_SV_IDS_BIT               = (1<<10)
-} GnssConfigFlagsBits;
-
-typedef enum {
-    GNSS_NI_ENCODING_TYPE_NONE = 0,
-    GNSS_NI_ENCODING_TYPE_GSM_DEFAULT,
-    GNSS_NI_ENCODING_TYPE_UTF8,
-    GNSS_NI_ENCODING_TYPE_UCS2,
-} GnssNiEncodingType;
-
-typedef enum {
-    GNSS_NI_TYPE_VOICE = 0,
-    GNSS_NI_TYPE_SUPL,
-    GNSS_NI_TYPE_CONTROL_PLANE,
-    GNSS_NI_TYPE_EMERGENCY_SUPL
-} GnssNiType;
-
-typedef uint16_t GnssNiOptionsMask;
-typedef enum {
-    GNSS_NI_OPTIONS_NOTIFICATION_BIT     = (1<<0),
-    GNSS_NI_OPTIONS_VERIFICATION_BIT     = (1<<1),
-    GNSS_NI_OPTIONS_PRIVACY_OVERRIDE_BIT = (1<<2),
-} GnssNiOptionsBits;
-
-typedef enum {
-    GNSS_NI_RESPONSE_ACCEPT = 1,
-    GNSS_NI_RESPONSE_DENY,
-    GNSS_NI_RESPONSE_NO_RESPONSE,
-    GNSS_NI_RESPONSE_IGNORE,
-} GnssNiResponse;
-
-typedef enum {
-    GNSS_SV_TYPE_UNKNOWN = 0,
-    GNSS_SV_TYPE_GPS,
-    GNSS_SV_TYPE_SBAS,
-    GNSS_SV_TYPE_GLONASS,
-    GNSS_SV_TYPE_QZSS,
-    GNSS_SV_TYPE_BEIDOU,
-    GNSS_SV_TYPE_GALILEO,
-} GnssSvType;
-
-typedef enum {
-    GNSS_EPH_TYPE_UNKNOWN = 0,
-    GNSS_EPH_TYPE_EPHEMERIS,
-    GNSS_EPH_TYPE_ALMANAC,
-} GnssEphemerisType;
-
-typedef enum {
-    GNSS_EPH_SOURCE_UNKNOWN = 0,
-    GNSS_EPH_SOURCE_DEMODULATED,
-    GNSS_EPH_SOURCE_SUPL_PROVIDED,
-    GNSS_EPH_SOURCE_OTHER_SERVER_PROVIDED,
-    GNSS_EPH_SOURCE_LOCAL,
-} GnssEphemerisSource;
-
-typedef enum {
-    GNSS_EPH_HEALTH_UNKNOWN = 0,
-    GNSS_EPH_HEALTH_GOOD,
-    GNSS_EPH_HEALTH_BAD,
-} GnssEphemerisHealth;
-
-typedef uint16_t GnssSvOptionsMask;
-typedef enum {
-    GNSS_SV_OPTIONS_HAS_EPHEMER_BIT =           (1<<0),
-    GNSS_SV_OPTIONS_HAS_ALMANAC_BIT =           (1<<1),
-    GNSS_SV_OPTIONS_USED_IN_FIX_BIT =           (1<<2),
-    GNSS_SV_OPTIONS_HAS_CARRIER_FREQUENCY_BIT = (1<<3),
-} GnssSvOptionsBits;
-
-typedef enum {
-    GNSS_ASSISTANCE_TYPE_SUPL = 0,
-    GNSS_ASSISTANCE_TYPE_C2K,
-} GnssAssistanceType;
-
-typedef enum {
-    GNSS_SUPL_MODE_STANDALONE = 0,
-    GNSS_SUPL_MODE_MSB,
-    GNSS_SUPL_MODE_MSA,
-} GnssSuplMode;
-
-typedef enum {
-    BATCHING_MODE_ROUTINE = 0,   // positions are reported when batched positions memory is full
-    BATCHING_MODE_TRIP,          // positions are reported when a certain distance is covered
-    BATCHING_MODE_NO_AUTO_REPORT // no report of positions automatically, instead queried on demand
-} BatchingMode;
-
-typedef enum {
-    BATCHING_STATUS_TRIP_COMPLETED = 0,
-    BATCHING_STATUS_POSITION_AVAILABE,
-    BATCHING_STATUS_POSITION_UNAVAILABLE
-} BatchingStatus;
-
-typedef uint16_t GnssMeasurementsAdrStateMask;
-typedef enum {
-    GNSS_MEASUREMENTS_ACCUMULATED_DELTA_RANGE_STATE_UNKNOWN         = 0,
-    GNSS_MEASUREMENTS_ACCUMULATED_DELTA_RANGE_STATE_VALID_BIT       = (1<<0),
-    GNSS_MEASUREMENTS_ACCUMULATED_DELTA_RANGE_STATE_RESET_BIT       = (1<<1),
-    GNSS_MEASUREMENTS_ACCUMULATED_DELTA_RANGE_STATE_CYCLE_SLIP_BIT  = (1<<2),
-} GnssMeasurementsAdrStateBits;
-
-typedef uint32_t GnssMeasurementsDataFlagsMask;
-typedef enum {
-    GNSS_MEASUREMENTS_DATA_SV_ID_BIT                        = (1<<0),
-    GNSS_MEASUREMENTS_DATA_SV_TYPE_BIT                      = (1<<1),
-    GNSS_MEASUREMENTS_DATA_STATE_BIT                        = (1<<2),
-    GNSS_MEASUREMENTS_DATA_RECEIVED_SV_TIME_BIT             = (1<<3),
-    GNSS_MEASUREMENTS_DATA_RECEIVED_SV_TIME_UNCERTAINTY_BIT = (1<<4),
-    GNSS_MEASUREMENTS_DATA_CARRIER_TO_NOISE_BIT             = (1<<5),
-    GNSS_MEASUREMENTS_DATA_PSEUDORANGE_RATE_BIT             = (1<<6),
-    GNSS_MEASUREMENTS_DATA_PSEUDORANGE_RATE_UNCERTAINTY_BIT = (1<<7),
-    GNSS_MEASUREMENTS_DATA_ADR_STATE_BIT                    = (1<<8),
-    GNSS_MEASUREMENTS_DATA_ADR_BIT                          = (1<<9),
-    GNSS_MEASUREMENTS_DATA_ADR_UNCERTAINTY_BIT              = (1<<10),
-    GNSS_MEASUREMENTS_DATA_CARRIER_FREQUENCY_BIT            = (1<<11),
-    GNSS_MEASUREMENTS_DATA_CARRIER_CYCLES_BIT               = (1<<12),
-    GNSS_MEASUREMENTS_DATA_CARRIER_PHASE_BIT                = (1<<13),
-    GNSS_MEASUREMENTS_DATA_CARRIER_PHASE_UNCERTAINTY_BIT    = (1<<14),
-    GNSS_MEASUREMENTS_DATA_MULTIPATH_INDICATOR_BIT          = (1<<15),
-    GNSS_MEASUREMENTS_DATA_SIGNAL_TO_NOISE_RATIO_BIT        = (1<<16),
-    GNSS_MEASUREMENTS_DATA_AUTOMATIC_GAIN_CONTROL_BIT       = (1<<17),
-} GnssMeasurementsDataFlagsBits;
-
-typedef uint32_t GnssMeasurementsStateMask;
-typedef enum {
-    GNSS_MEASUREMENTS_STATE_UNKNOWN_BIT               = 0,
-    GNSS_MEASUREMENTS_STATE_CODE_LOCK_BIT             = (1<<0),
-    GNSS_MEASUREMENTS_STATE_BIT_SYNC_BIT              = (1<<1),
-    GNSS_MEASUREMENTS_STATE_SUBFRAME_SYNC_BIT         = (1<<2),
-    GNSS_MEASUREMENTS_STATE_TOW_DECODED_BIT           = (1<<3),
-    GNSS_MEASUREMENTS_STATE_MSEC_AMBIGUOUS_BIT        = (1<<4),
-    GNSS_MEASUREMENTS_STATE_SYMBOL_SYNC_BIT           = (1<<5),
-    GNSS_MEASUREMENTS_STATE_GLO_STRING_SYNC_BIT       = (1<<6),
-    GNSS_MEASUREMENTS_STATE_GLO_TOD_DECODED_BIT       = (1<<7),
-    GNSS_MEASUREMENTS_STATE_BDS_D2_BIT_SYNC_BIT       = (1<<8),
-    GNSS_MEASUREMENTS_STATE_BDS_D2_SUBFRAME_SYNC_BIT  = (1<<9),
-    GNSS_MEASUREMENTS_STATE_GAL_E1BC_CODE_LOCK_BIT    = (1<<10),
-    GNSS_MEASUREMENTS_STATE_GAL_E1C_2ND_CODE_LOCK_BIT = (1<<11),
-    GNSS_MEASUREMENTS_STATE_GAL_E1B_PAGE_SYNC_BIT     = (1<<12),
-    GNSS_MEASUREMENTS_STATE_SBAS_SYNC_BIT             = (1<<13),
-} GnssMeasurementsStateBits;
-
-typedef enum {
-    GNSS_MEASUREMENTS_MULTIPATH_INDICATOR_UNKNOWN = 0,
-    GNSS_MEASUREMENTS_MULTIPATH_INDICATOR_PRESENT,
-    GNSS_MEASUREMENTS_MULTIPATH_INDICATOR_NOT_PRESENT,
-} GnssMeasurementsMultipathIndicator;
-
-typedef uint32_t GnssMeasurementsClockFlagsMask;
-typedef enum {
-    GNSS_MEASUREMENTS_CLOCK_FLAGS_LEAP_SECOND_BIT                  = (1<<0),
-    GNSS_MEASUREMENTS_CLOCK_FLAGS_TIME_BIT                         = (1<<1),
-    GNSS_MEASUREMENTS_CLOCK_FLAGS_TIME_UNCERTAINTY_BIT             = (1<<2),
-    GNSS_MEASUREMENTS_CLOCK_FLAGS_FULL_BIAS_BIT                    = (1<<3),
-    GNSS_MEASUREMENTS_CLOCK_FLAGS_BIAS_BIT                         = (1<<4),
-    GNSS_MEASUREMENTS_CLOCK_FLAGS_BIAS_UNCERTAINTY_BIT             = (1<<5),
-    GNSS_MEASUREMENTS_CLOCK_FLAGS_DRIFT_BIT                        = (1<<6),
-    GNSS_MEASUREMENTS_CLOCK_FLAGS_DRIFT_UNCERTAINTY_BIT            = (1<<7),
-    GNSS_MEASUREMENTS_CLOCK_FLAGS_HW_CLOCK_DISCONTINUITY_COUNT_BIT = (1<<8),
-} GnssMeasurementsClockFlagsBits;
-
-typedef uint32_t GnssAidingDataSvMask;
-typedef enum {
-    GNSS_AIDING_DATA_SV_EPHEMERIS_BIT    = (1<<0), // ephemeris
-    GNSS_AIDING_DATA_SV_ALMANAC_BIT      = (1<<1), // almanac
-    GNSS_AIDING_DATA_SV_HEALTH_BIT       = (1<<2), // health
-    GNSS_AIDING_DATA_SV_DIRECTION_BIT    = (1<<3), // direction
-    GNSS_AIDING_DATA_SV_STEER_BIT        = (1<<4), // steer
-    GNSS_AIDING_DATA_SV_ALMANAC_CORR_BIT = (1<<5), // almanac correction
-    GNSS_AIDING_DATA_SV_BLACKLIST_BIT    = (1<<6), // blacklist SVs
-    GNSS_AIDING_DATA_SV_SA_DATA_BIT      = (1<<7), // sensitivity assistance data
-    GNSS_AIDING_DATA_SV_NO_EXIST_BIT     = (1<<8), // SV does not exist
-    GNSS_AIDING_DATA_SV_IONOSPHERE_BIT   = (1<<9), // ionosphere correction
-    GNSS_AIDING_DATA_SV_TIME_BIT         = (1<<10),// reset satellite time
-} GnssAidingDataSvBits;
-
-typedef uint32_t GnssAidingDataSvTypeMask;
-typedef enum {
-    GNSS_AIDING_DATA_SV_TYPE_GPS_BIT      = (1<<0),
-    GNSS_AIDING_DATA_SV_TYPE_GLONASS_BIT  = (1<<1),
-    GNSS_AIDING_DATA_SV_TYPE_QZSS_BIT     = (1<<2),
-    GNSS_AIDING_DATA_SV_TYPE_BEIDOU_BIT   = (1<<3),
-    GNSS_AIDING_DATA_SV_TYPE_GALILEO_BIT  = (1<<4),
-} GnssAidingDataSvTypeBits;
-
-typedef struct {
-    GnssAidingDataSvMask svMask;         // bitwise OR of GnssAidingDataSvBits
-    GnssAidingDataSvTypeMask svTypeMask; // bitwise OR of GnssAidingDataSvTypeBits
-} GnssAidingDataSv;
-
-typedef uint32_t GnssAidingDataCommonMask;
-typedef enum {
-    GNSS_AIDING_DATA_COMMON_POSITION_BIT      = (1<<0), // position estimate
-    GNSS_AIDING_DATA_COMMON_TIME_BIT          = (1<<1), // reset all clock values
-    GNSS_AIDING_DATA_COMMON_UTC_BIT           = (1<<2), // UTC estimate
-    GNSS_AIDING_DATA_COMMON_RTI_BIT           = (1<<3), // RTI
-    GNSS_AIDING_DATA_COMMON_FREQ_BIAS_EST_BIT = (1<<4), // frequency bias estimate
-    GNSS_AIDING_DATA_COMMON_CELLDB_BIT        = (1<<5), // all celldb info
-} GnssAidingDataCommonBits;
-
-typedef struct {
-    GnssAidingDataCommonMask mask; // bitwise OR of GnssAidingDataCommonBits
-} GnssAidingDataCommon;
-
-typedef struct {
-    bool deleteAll;              // if true, delete all aiding data and ignore other params
-    GnssAidingDataSv sv;         // SV specific aiding data
-    GnssAidingDataCommon common; // common aiding data
-} GnssAidingData;
-
-typedef struct {
-    size_t size;             // set to sizeof(Location)
-    LocationFlagsMask flags; // bitwise OR of LocationFlagsBits to mark which params are valid
-    uint64_t timestamp;      // UTC timestamp for location fix, milliseconds since January 1, 1970
-    double latitude;         // in degrees
-    double longitude;        // in degrees
-    double altitude;         // in meters above the WGS 84 reference ellipsoid
-    float speed;             // in meters per second
-    float bearing;           // in degrees; range [0, 360)
-    float accuracy;          // in meters
-    float verticalAccuracy;  // in meters
-    float speedAccuracy;     // in meters/second
-    float bearingAccuracy;   // in degrees (0 to 359.999)
-    LocationTechnologyMask techMask;
-} Location;
-
-struct LocationOptions {
-    size_t size;          // set to sizeof(LocationOptions)
-    uint32_t minInterval; // in milliseconds
-    uint32_t minDistance; // in meters. if minDistance > 0, gnssSvCallback/gnssNmeaCallback/
-                          // gnssMeasurementsCallback may not be called
-    GnssSuplMode mode;    // Standalone/MS-Based/MS-Assisted
-
-    inline LocationOptions() :
-            size(0), minInterval(0), minDistance(0), mode(GNSS_SUPL_MODE_STANDALONE) {}
-};
-
-typedef enum {
-    GNSS_POWER_MODE_INVALID = 0,
-    GNSS_POWER_MODE_M1,  /* Improved Accuracy Mode */
-    GNSS_POWER_MODE_M2,  /* Normal Mode */
-    GNSS_POWER_MODE_M3,  /* Background Mode */
-    GNSS_POWER_MODE_M4,  /* Background Mode */
-    GNSS_POWER_MODE_M5   /* Background Mode */
-} GnssPowerMode;
-
-struct TrackingOptions : LocationOptions {
-    GnssPowerMode powerMode; /* Power Mode to be used for time based tracking
-                                sessions */
-    uint32_t tbm;  /* Time interval between measurements specified in millis.
-                      Applicable to background power modes */
-
-    inline TrackingOptions() :
-            LocationOptions(), powerMode(GNSS_POWER_MODE_INVALID), tbm(0) {}
-    inline TrackingOptions(size_t s, GnssPowerMode m, uint32_t t) :
-            LocationOptions(), powerMode(m), tbm(t) { LocationOptions::size = s; }
-    inline TrackingOptions(const LocationOptions& options) :
-            LocationOptions(options), powerMode(GNSS_POWER_MODE_INVALID), tbm(0) {}
-    inline void setLocationOptions(const LocationOptions& options) {
-        minInterval = options.minInterval;
-        minDistance = options.minDistance;
-        mode = options.mode;
-    }
-};
-
-struct BatchingOptions : LocationOptions {
-    BatchingMode batchingMode;
-
-    inline BatchingOptions() :
-            LocationOptions(), batchingMode(BATCHING_MODE_ROUTINE) {}
-    inline BatchingOptions(size_t s, BatchingMode m) :
-            LocationOptions(), batchingMode(m) { LocationOptions::size = s; }
-    inline BatchingOptions(const LocationOptions& options) :
-            LocationOptions(options), batchingMode(BATCHING_MODE_ROUTINE) {}
-    inline void setLocationOptions(const LocationOptions& options) {
-        minInterval = options.minInterval;
-        minDistance = options.minDistance;
-        mode = options.mode;
-    }
-};
-
-typedef struct {
-    size_t size;
-    BatchingStatus batchingStatus;
-} BatchingStatusInfo;
-
-typedef struct {
-    size_t size;                            // set to sizeof(GeofenceOption)
-    GeofenceBreachTypeMask breachTypeMask;  // bitwise OR of GeofenceBreachTypeBits
-    uint32_t responsiveness;                // in milliseconds
-    uint32_t dwellTime;                     // in seconds
-} GeofenceOption;
-
-typedef struct  {
-    size_t size;      // set to sizeof(GeofenceInfo)
-    double latitude;  // in degrees
-    double longitude; // in degrees
-    double radius;    // in meters
-} GeofenceInfo;
-
-typedef struct {
-    size_t size;             // set to sizeof(GeofenceBreachNotification)
-    size_t count;            // number of ids in array
-    uint32_t* ids;           // array of ids that have breached
-    Location location;       // location associated with breach
-    GeofenceBreachType type; // type of breach
-    uint64_t timestamp;      // timestamp of breach
-} GeofenceBreachNotification;
-
-typedef struct {
-    size_t size;                       // set to sizeof(GeofenceBreachNotification)
-    GeofenceStatusAvailable available; // GEOFENCE_STATUS_AVAILABILE_NO/_YES
-    LocationTechnologyType techType;   // GNSS
-} GeofenceStatusNotification;
-
-typedef struct {
-    size_t size;                        // set to sizeof(GnssLocationInfo)
-    GnssLocationInfoFlagMask flags;     // bitwise OR of GnssLocationInfoBits for param validity
-    float altitudeMeanSeaLevel;         // altitude wrt mean sea level
-    float pdop;                         // position dilusion of precision
-    float hdop;                         // horizontal dilusion of precision
-    float vdop;                         // vertical dilusion of precision
-    float magneticDeviation;            // magnetic deviation
-    LocationReliability horReliability; // horizontal reliability
-    LocationReliability verReliability; // vertical reliability
-    float horUncEllipseSemiMajor;       // horizontal elliptical accuracy semi-major axis
-    float horUncEllipseSemiMinor;       // horizontal elliptical accuracy semi-minor axis
-    float horUncEllipseOrientAzimuth;   // horizontal elliptical accuracy azimuth
-} GnssLocationInfoNotification;
-
-typedef struct {
-    size_t size;                           // set to sizeof(GnssNiNotification)
-    GnssNiType type;                       // type of NI (Voice, SUPL, Control Plane)
-    GnssNiOptionsMask options;             // bitwise OR of GnssNiOptionsBits
-    uint32_t timeout;                      // time (seconds) to wait for user input
-    GnssNiResponse timeoutResponse;        // the response that should be sent when timeout expires
-    char requestor[GNSS_NI_REQUESTOR_MAX]; // the requestor that is making the request
-    GnssNiEncodingType requestorEncoding;  // the encoding type for requestor
-    char message[GNSS_NI_MESSAGE_ID_MAX];  // the message to show user
-    GnssNiEncodingType messageEncoding;    // the encoding type for message
-    char extras[GNSS_NI_MESSAGE_ID_MAX];
-} GnssNiNotification;
-
-typedef struct {
-    size_t size;       // set to sizeof(GnssSv)
-    uint16_t svId;     // Unique Identifier
-    GnssSvType type;   // type of SV (GPS, SBAS, GLONASS, QZSS, BEIDOU, GALILEO)
-    float cN0Dbhz;     // signal strength
-    float elevation;   // elevation of SV (in degrees)
-    float azimuth;     // azimuth of SV (in degrees)
-    GnssSvOptionsMask gnssSvOptionsMask; // Bitwise OR of GnssSvOptionsBits
-    float carrierFrequencyHz; // carrier frequency of the signal tracked
-} GnssSv;
-
-struct GnssConfigSetAssistanceServer {
-    size_t size;             // set to sizeof(GnssConfigSetAssistanceServer)
-    GnssAssistanceType type; // SUPL or C2K
-    const char* hostName;    // null terminated string
-    uint32_t port;           // port of server
-
-    inline bool equals(const GnssConfigSetAssistanceServer& config) {
-        if (config.type == type && config.port == port &&
-               ((NULL == config.hostName && NULL == hostName) ||
-                (NULL != config.hostName && NULL != hostName &&
-                     0 == strcmp(config.hostName, hostName)))) {
-            return true;
-        }
-        return false;
-    }
-};
-
-typedef struct {
-    size_t size;                               // set to sizeof(GnssMeasurementsData)
-    GnssMeasurementsDataFlagsMask flags;       // bitwise OR of GnssMeasurementsDataFlagsBits
-    int16_t svId;
-    GnssSvType svType;
-    double timeOffsetNs;
-    GnssMeasurementsStateMask stateMask;       // bitwise OR of GnssMeasurementsStateBits
-    int64_t receivedSvTimeNs;
-    int64_t receivedSvTimeUncertaintyNs;
-    double carrierToNoiseDbHz;
-    double pseudorangeRateMps;
-    double pseudorangeRateUncertaintyMps;
-    GnssMeasurementsAdrStateMask adrStateMask; // bitwise OR of GnssMeasurementsAdrStateBits
-    double adrMeters;
-    double adrUncertaintyMeters;
-    float carrierFrequencyHz;
-    int64_t carrierCycles;
-    double carrierPhase;
-    double carrierPhaseUncertainty;
-    GnssMeasurementsMultipathIndicator multipathIndicator;
-    double signalToNoiseRatioDb;
-    double agcLevelDb;
-} GnssMeasurementsData;
-
-typedef struct {
-    size_t size;                          // set to sizeof(GnssMeasurementsClock)
-    GnssMeasurementsClockFlagsMask flags; // bitwise OR of GnssMeasurementsClockFlagsBits
-    int16_t leapSecond;
-    int64_t timeNs;
-    double timeUncertaintyNs;
-    int64_t fullBiasNs;
-    double biasNs;
-    double biasUncertaintyNs;
-    double driftNsps;
-    double driftUncertaintyNsps;
-    uint32_t hwClockDiscontinuityCount;
-} GnssMeasurementsClock;
-
-typedef struct {
-    size_t size;                 // set to sizeof(GnssSvNotification)
-    size_t count;                // number of SVs in the GnssSv array
-    GnssSv gnssSvs[GNSS_SV_MAX]; // information on a number of SVs
-} GnssSvNotification;
-
-typedef struct {
-    size_t size;         // set to sizeof(GnssNmeaNotification)
-    uint64_t timestamp;  // timestamp
-    const char* nmea;    // nmea text
-    size_t length;       // length of the nmea text
-} GnssNmeaNotification;
-
-typedef struct {
-    size_t size;         // set to sizeof(GnssMeasurementsNotification)
-    size_t count;        // number of items in GnssMeasurements array
-    GnssMeasurementsData measurements[GNSS_MEASUREMENTS_MAX];
-    GnssMeasurementsClock clock; // clock
-} GnssMeasurementsNotification;
-
-typedef uint32_t GnssSvId;
-
-struct GnssSvIdSource{
-    size_t size;                 // set to sizeof(GnssSvIdSource)
-    GnssSvType constellation;    // constellation for the sv to blacklist
-    GnssSvId svId;           // sv id to blacklist
-};
-inline bool operator ==(GnssSvIdSource const& left, GnssSvIdSource const& right) {
-    return left.size == right.size &&
-            left.constellation == right.constellation && left.svId == right.svId;
-}
-
-#define GNSS_SV_CONFIG_ALL_BITS_ENABLED_MASK ((uint64_t)0xFFFFFFFFFFFFFFFF)
-typedef struct {
-    size_t size; // set to sizeof(GnssSvIdConfig)
-
-    // GLONASS - SV 65 maps to bit 0
-#define GNSS_SV_CONFIG_GLO_INITIAL_SV_ID 65
-#define GNSS_SV_CONFIG_GLO_LAST_SV_ID 88
-    uint64_t gloBlacklistSvMask;
-
-    // BEIDOU - SV 201 maps to bit 0
-#define GNSS_SV_CONFIG_BDS_INITIAL_SV_ID 201
-#define GNSS_SV_CONFIG_BDS_LAST_SV_ID 237
-    uint64_t bdsBlacklistSvMask;
-
-    // QZSS - SV 193 maps to bit 0
-#define GNSS_SV_CONFIG_QZSS_INITIAL_SV_ID 193
-#define GNSS_SV_CONFIG_QZSS_LAST_SV_ID 200
-    uint64_t qzssBlacklistSvMask;
-
-    // GAL - SV 301 maps to bit 0
-#define GNSS_SV_CONFIG_GAL_INITIAL_SV_ID 301
-#define GNSS_SV_CONFIG_GAL_LAST_SV_ID 336
-    uint64_t galBlacklistSvMask;
-} GnssSvIdConfig;
-
-struct GnssConfig{
-    size_t size;  // set to sizeof(GnssConfig)
-    GnssConfigFlagsMask flags; // bitwise OR of GnssConfigFlagsBits to mark which params are valid
-    GnssConfigGpsLock gpsLock;
-    GnssConfigSuplVersion suplVersion;
-    GnssConfigSetAssistanceServer assistanceServer;
-    GnssConfigLppProfile lppProfile;
-    GnssConfigLppeControlPlaneMask lppeControlPlaneMask;
-    GnssConfigLppeUserPlaneMask lppeUserPlaneMask;
-    GnssConfigAGlonassPositionProtocolMask aGlonassPositionProtocolMask;
-    GnssConfigEmergencyPdnForEmergencySupl emergencyPdnForEmergencySupl;
-    GnssConfigSuplEmergencyServices suplEmergencyServices;
-    GnssConfigSuplModeMask suplModeMask; //bitwise OR of GnssConfigSuplModeBits
-    std::vector<GnssSvIdSource> blacklistedSvIds;
-
-    inline bool equals(const GnssConfig& config) {
-        if (flags == config.flags &&
-                gpsLock == config.gpsLock &&
-                suplVersion == config.suplVersion &&
-                assistanceServer.equals(config.assistanceServer) &&
-                lppProfile == config.lppProfile &&
-                lppeControlPlaneMask == config.lppeControlPlaneMask &&
-                lppeUserPlaneMask == config.lppeUserPlaneMask &&
-                aGlonassPositionProtocolMask == config.aGlonassPositionProtocolMask &&
-                emergencyPdnForEmergencySupl == config.emergencyPdnForEmergencySupl &&
-                suplEmergencyServices == config.suplEmergencyServices &&
-                suplModeMask == config.suplModeMask  &&
-                blacklistedSvIds == config.blacklistedSvIds) {
-            return true;
-        }
-        return false;
-    }
-};
-
-typedef struct {
-    size_t size;                        // set to sizeof
-    bool                                mValid;
-    Location                            mLocation;
-    double                              verticalAccuracyMeters;
-    double                              speedAccuracyMetersPerSecond;
-    double                              bearingAccuracyDegrees;
-    timespec                            mUtcReported;
-} GnssDebugLocation;
-
-typedef struct {
-    size_t size;                        // set to sizeof
-    bool                                mValid;
-    int64_t                             timeEstimate;
-    float                               timeUncertaintyNs;
-    float                               frequencyUncertaintyNsPerSec;
-} GnssDebugTime;
-
-typedef struct {
-    size_t size;                        // set to sizeof
-    uint32_t                            svid;
-    GnssSvType                          constellation;
-    GnssEphemerisType                   mEphemerisType;
-    GnssEphemerisSource                 mEphemerisSource;
-    GnssEphemerisHealth                 mEphemerisHealth;
-    float                               ephemerisAgeSeconds;
-    bool                                serverPredictionIsAvailable;
-    float                               serverPredictionAgeSeconds;
-} GnssDebugSatelliteInfo;
-
-typedef struct {
-    size_t size;                        // set to sizeof
-    GnssDebugLocation                   mLocation;
-    GnssDebugTime                       mTime;
-    std::vector<GnssDebugSatelliteInfo> mSatelliteInfo;
-} GnssDebugReport;
-
-/* Provides the capabilities of the system
-   capabilities callback is called once soon after createInstance is called */
-typedef std::function<void(
-    LocationCapabilitiesMask capabilitiesMask // bitwise OR of LocationCapabilitiesBits
-)> capabilitiesCallback;
-
-/* Used by tracking, batching, and miscellanous APIs
-   responseCallback is called for every Tracking, Batching API, and Miscellanous API */
-typedef std::function<void(
-    LocationError err, // if not SUCCESS, then id is not valid
-    uint32_t id        // id to be associated to the request
-)> responseCallback;
-
-/* Used by APIs that gets more than one LocationError in it's response
-   collectiveResponseCallback is called for every geofence API call.
-   ids array and LocationError array are only valid until collectiveResponseCallback returns. */
-typedef std::function<void(
-    size_t count, // number of locations in arrays
-    LocationError* errs, // array of LocationError associated to the request
-    uint32_t* ids // array of ids to be associated to the request
-)> collectiveResponseCallback;
-
-/* Used for startTracking API, optional can be NULL
-   trackingCallback is called when delivering a location in a tracking session
-   broadcasted to all clients, no matter if a session has started by client */
-typedef std::function<void(
-    Location location
-)> trackingCallback;
-
-/* Used for startBatching API, optional can be NULL
-   batchingCallback is called when delivering locations in a batching session.
-   broadcasted to all clients, no matter if a session has started by client */
-typedef std::function<void(
-    size_t count,      // number of locations in array
-    Location* location, // array of locations
-    BatchingOptions batchingOptions // Batching options
-)> batchingCallback;
-
-typedef std::function<void(
-    BatchingStatusInfo batchingStatus, // batch status
-    std::list<uint32_t> & listOfCompletedTrips
-)> batchingStatusCallback;
-
-/* Gives GNSS Location information, optional can be NULL
-    gnssLocationInfoCallback is called only during a tracking session
-    broadcasted to all clients, no matter if a session has started by client */
-typedef std::function<void(
-    GnssLocationInfoNotification gnssLocationInfoNotification
-)> gnssLocationInfoCallback;
-
-/* Used for addGeofences API, optional can be NULL
-   geofenceBreachCallback is called when any number of geofences have a state change */
-typedef std::function<void(
-    GeofenceBreachNotification geofenceBreachNotification
-)> geofenceBreachCallback;
-
-/* Used for addGeofences API, optional can be NULL
-       geofenceStatusCallback is called when any number of geofences have a status change */
-typedef std::function<void(
-    GeofenceStatusNotification geofenceStatusNotification
-)> geofenceStatusCallback;
-
-/* Network Initiated request, optional can be NULL
-   This callback should be responded to by calling gnssNiResponse */
-typedef std::function<void(
-    uint32_t id, // id that should be used to respond by calling gnssNiResponse
-    GnssNiNotification gnssNiNotification
-)> gnssNiCallback;
-
-/* Gives GNSS SV information, optional can be NULL
-    gnssSvCallback is called only during a tracking session
-    broadcasted to all clients, no matter if a session has started by client */
-typedef std::function<void(
-    GnssSvNotification gnssSvNotification
-)> gnssSvCallback;
-
-/* Gives GNSS NMEA data, optional can be NULL
-    gnssNmeaCallback is called only during a tracking session
-    broadcasted to all clients, no matter if a session has started by client */
-typedef std::function<void(
-    GnssNmeaNotification gnssNmeaNotification
-)> gnssNmeaCallback;
-
-/* Gives GNSS Measurements information, optional can be NULL
-    gnssMeasurementsCallback is called only during a tracking session
-    broadcasted to all clients, no matter if a session has started by client */
-typedef std::function<void(
-    GnssMeasurementsNotification gnssMeasurementsNotification
-)> gnssMeasurementsCallback;
-
-/* Provides the current GNSS configuration to the client */
-typedef std::function<void(
-    GnssConfig& config
-)> gnssConfigCallback;
-
-typedef struct {
-    size_t size; // set to sizeof(LocationCallbacks)
-    capabilitiesCallback capabilitiesCb;             // mandatory
-    responseCallback responseCb;                     // mandatory
-    collectiveResponseCallback collectiveResponseCb; // mandatory
-    trackingCallback trackingCb;                     // optional
-    batchingCallback batchingCb;                     // optional
-    geofenceBreachCallback geofenceBreachCb;         // optional
-    geofenceStatusCallback geofenceStatusCb;         // optional
-    gnssLocationInfoCallback gnssLocationInfoCb;     // optional
-    gnssNiCallback gnssNiCb;                         // optional
-    gnssSvCallback gnssSvCb;                         // optional
-    gnssNmeaCallback gnssNmeaCb;                     // optional
-    gnssMeasurementsCallback gnssMeasurementsCb;     // optional
-    batchingStatusCallback batchingStatusCb;         // optional
-} LocationCallbacks;
-
-class LocationAPI
+class LocationAPI : public ILocationAPI
 {
 private:
     LocationAPI();
@@ -901,7 +51,7 @@
     /* updates/changes the callbacks that will be called.
         mandatory callbacks must be present for callbacks to be successfully updated
         no return value */
-    void updateCallbacks(LocationCallbacks&);
+    virtual void updateCallbacks(LocationCallbacks&) override;
 
     /* ================================== TRACKING ================================== */
 
@@ -914,20 +64,20 @@
                 LOCATION_ERROR_ALREADY_STARTED if a startTracking session is already in progress
                 LOCATION_ERROR_CALLBACK_MISSING if no trackingCallback was passed in createInstance
                 LOCATION_ERROR_INVALID_PARAMETER if TrackingOptions parameter is invalid */
-    uint32_t startTracking(TrackingOptions&); // returns session id
+    virtual uint32_t startTracking(TrackingOptions&) override;
 
     /* stopTracking stops a tracking session associated with id parameter.
         responseCallback returns:
                 LOCATION_ERROR_SUCCESS if successful
                 LOCATION_ERROR_ID_UNKNOWN if id is not associated with a tracking session */
-    void stopTracking(uint32_t id);
+    virtual void stopTracking(uint32_t id) override;
 
     /* updateTrackingOptions changes the TrackingOptions of a tracking session associated with id
         responseCallback returns:
                 LOCATION_ERROR_SUCCESS if successful
                 LOCATION_ERROR_INVALID_PARAMETER if TrackingOptions parameters are invalid
                 LOCATION_ERROR_ID_UNKNOWN if id is not associated with a tracking session */
-    void updateTrackingOptions(uint32_t id, TrackingOptions&);
+    virtual void updateTrackingOptions(uint32_t id, TrackingOptions&) override;
 
     /* ================================== BATCHING ================================== */
 
@@ -946,20 +96,20 @@
                 LOCATION_ERROR_CALLBACK_MISSING if no batchingCallback was passed in createInstance
                 LOCATION_ERROR_INVALID_PARAMETER if a parameter is invalid
                 LOCATION_ERROR_NOT_SUPPORTED if batching is not supported */
-    uint32_t startBatching(BatchingOptions&); // returns session id
+    virtual uint32_t startBatching(BatchingOptions&) override;
 
     /* stopBatching stops a batching session associated with id parameter.
         responseCallback returns:
                 LOCATION_ERROR_SUCCESS if successful
                 LOCATION_ERROR_ID_UNKNOWN if id is not associated with batching session */
-    void stopBatching(uint32_t id);
+    virtual void stopBatching(uint32_t id) override;
 
     /* updateBatchingOptions changes the BatchingOptions of a batching session associated with id
         responseCallback returns:
                 LOCATION_ERROR_SUCCESS if successful
                 LOCATION_ERROR_INVALID_PARAMETER if BatchingOptions parameters are invalid
                 LOCATION_ERROR_ID_UNKNOWN if id is not associated with a batching session */
-    void updateBatchingOptions(uint32_t id, BatchingOptions&);
+    virtual void updateBatchingOptions(uint32_t id, BatchingOptions&) override;
 
     /* getBatchedLocations gets a number of locations that are currently stored/batched
        on the low power processor, delivered by the batchingCallback passed in createInstance.
@@ -968,7 +118,7 @@
                 LOCATION_ERROR_SUCCESS if successful, will be followed by batchingCallback call
                 LOCATION_ERROR_CALLBACK_MISSING if no batchingCallback was passed in createInstance
                 LOCATION_ERROR_ID_UNKNOWN if id is not associated with a batching session */
-    void getBatchedLocations(uint32_t id, size_t count);
+    virtual void getBatchedLocations(uint32_t id, size_t count) override;
 
     /* ================================== GEOFENCE ================================== */
 
@@ -982,14 +132,14 @@
                 LOCATION_ERROR_CALLBACK_MISSING if no geofenceBreachCallback
                 LOCATION_ERROR_INVALID_PARAMETER if any parameters are invalid
                 LOCATION_ERROR_NOT_SUPPORTED if geofence is not supported */
-    uint32_t* addGeofences(size_t count, GeofenceOption*, GeofenceInfo*); // returns id array
+    virtual uint32_t* addGeofences(size_t count, GeofenceOption*, GeofenceInfo*) override;
 
     /* removeGeofences removes any number of geofences. Caller should delete ids array after
        removeGeofences returneds.
         collectiveResponseCallback returns:
                 LOCATION_ERROR_SUCCESS if successful
                 LOCATION_ERROR_ID_UNKNOWN if id is not associated with a geofence session */
-    void removeGeofences(size_t count, uint32_t* ids);
+    virtual void removeGeofences(size_t count, uint32_t* ids) override;
 
     /* modifyGeofences modifies any number of geofences. Caller should delete ids array after
        modifyGeofences returns.
@@ -997,7 +147,7 @@
                 LOCATION_ERROR_SUCCESS if successful
                 LOCATION_ERROR_ID_UNKNOWN if id is not associated with a geofence session
                 LOCATION_ERROR_INVALID_PARAMETER if any parameters are invalid */
-    void modifyGeofences(size_t count, uint32_t* ids, GeofenceOption* options);
+    virtual void modifyGeofences(size_t count, uint32_t* ids, GeofenceOption* options) override;
 
     /* pauseGeofences pauses any number of geofences, which is similar to removeGeofences,
        only that they can be resumed at any time. Caller should delete ids array after
@@ -1005,14 +155,14 @@
         collectiveResponseCallback returns:
                 LOCATION_ERROR_SUCCESS if successful
                 LOCATION_ERROR_ID_UNKNOWN if id is not associated with a geofence session */
-    void pauseGeofences(size_t count, uint32_t* ids);
+    virtual void pauseGeofences(size_t count, uint32_t* ids) override;
 
     /* resumeGeofences resumes any number of geofences that are currently paused. Caller should
        delete ids array after resumeGeofences returns.
         collectiveResponseCallback returns:
                 LOCATION_ERROR_SUCCESS if successful
                 LOCATION_ERROR_ID_UNKNOWN if id is not associated with a geofence session */
-    void resumeGeofences(size_t count, uint32_t* ids);
+    virtual void resumeGeofences(size_t count, uint32_t* ids) override;
 
     /* ================================== GNSS ====================================== */
 
@@ -1021,7 +171,7 @@
                 LOCATION_ERROR_SUCCESS if session was successful
                 LOCATION_ERROR_INVALID_PARAMETER if any parameters in GnssNiResponse are invalid
                 LOCATION_ERROR_ID_UNKNOWN if id does not match a gnssNiCallback */
-    void gnssNiResponse(uint32_t id, GnssNiResponse response);
+    virtual void gnssNiResponse(uint32_t id, GnssNiResponse response) override;
 };
 
 typedef struct {
@@ -1031,7 +181,7 @@
     gnssConfigCallback gnssConfigCb;                 // optional
 } LocationControlCallbacks;
 
-class LocationControlAPI
+class LocationControlAPI : public ILocationControlAPI
 {
 private:
     LocationControlAPI();
@@ -1080,7 +230,7 @@
                 LOCATION_ERROR_SUCCESS if session was successful
                 LOCATION_ERROR_INVALID_PARAMETER if any other parameters are invalid
                 LOCATION_ERROR_GENERAL_FAILURE if failure for any other reason */
-    uint32_t* gnssUpdateConfig(GnssConfig config);
+    virtual uint32_t* gnssUpdateConfig(GnssConfig config) override;
 
     /* gnssGetConfig fetches the current constellation and SV configuration
        on the GNSS engine.
@@ -1104,7 +254,7 @@
                 LOCATION_ERROR_SUCCESS if successful
                 LOCATION_ERROR_INVALID_PARAMETER if any parameters are invalid
                 LOCATION_ERROR_NOT_SUPPORTED if build is not userdebug */
-    uint32_t gnssDeleteAidingData(GnssAidingData& data);
+    virtual uint32_t gnssDeleteAidingData(GnssAidingData& data) override;
 };
 
-#endif /* LOCATION_H */
+#endif /* LOCATIONAPI_H */
diff --git a/sdm845/location/LocationDataTypes.h b/sdm845/location/LocationDataTypes.h
new file mode 100644
index 0000000..7152151
--- /dev/null
+++ b/sdm845/location/LocationDataTypes.h
@@ -0,0 +1,1087 @@
+/* Copyright (c) 2018 The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ *       copyright notice, this list of conditions and the following
+ *       disclaimer in the documentation and/or other materials provided
+ *       with the distribution.
+ *     * Neither the name of The Linux Foundation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef LOCATIONDATATYPES_H
+#define LOCATIONDATATYPES_H
+
+#include <vector>
+#include <stdint.h>
+#include <functional>
+#include <list>
+
+#define GNSS_NI_REQUESTOR_MAX  (256)
+#define GNSS_NI_MESSAGE_ID_MAX (2048)
+#define GNSS_SV_MAX            (64)
+#define GNSS_MEASUREMENTS_MAX  (64)
+#define GNSS_UTC_TIME_OFFSET   (3657)
+
+#define GNSS_BUGREPORT_GPS_MIN  (1)
+#define GNSS_BUGREPORT_SBAS_MIN (120)
+#define GNSS_BUGREPORT_GLO_MIN  (1)
+#define GNSS_BUGREPORT_QZSS_MIN (193)
+#define GNSS_BUGREPORT_BDS_MIN  (1)
+#define GNSS_BUGREPORT_GAL_MIN  (1)
+
+typedef enum {
+    LOCATION_ERROR_SUCCESS = 0,
+    LOCATION_ERROR_GENERAL_FAILURE,
+    LOCATION_ERROR_CALLBACK_MISSING,
+    LOCATION_ERROR_INVALID_PARAMETER,
+    LOCATION_ERROR_ID_EXISTS,
+    LOCATION_ERROR_ID_UNKNOWN,
+    LOCATION_ERROR_ALREADY_STARTED,
+    LOCATION_ERROR_GEOFENCES_AT_MAX,
+    LOCATION_ERROR_NOT_SUPPORTED
+} LocationError;
+
+// Flags to indicate which values are valid in a Location
+typedef uint16_t LocationFlagsMask;
+typedef enum {
+    LOCATION_HAS_LAT_LONG_BIT          = (1<<0), // location has valid latitude and longitude
+    LOCATION_HAS_ALTITUDE_BIT          = (1<<1), // location has valid altitude
+    LOCATION_HAS_SPEED_BIT             = (1<<2), // location has valid speed
+    LOCATION_HAS_BEARING_BIT           = (1<<3), // location has valid bearing
+    LOCATION_HAS_ACCURACY_BIT          = (1<<4), // location has valid accuracy
+    LOCATION_HAS_VERTICAL_ACCURACY_BIT = (1<<5), // location has valid vertical accuracy
+    LOCATION_HAS_SPEED_ACCURACY_BIT    = (1<<6), // location has valid speed accuracy
+    LOCATION_HAS_BEARING_ACCURACY_BIT  = (1<<7), // location has valid bearing accuracy
+} LocationFlagsBits;
+
+typedef uint16_t LocationTechnologyMask;
+typedef enum {
+    LOCATION_TECHNOLOGY_GNSS_BIT     = (1<<0), // location was calculated using GNSS
+    LOCATION_TECHNOLOGY_CELL_BIT     = (1<<1), // location was calculated using Cell
+    LOCATION_TECHNOLOGY_WIFI_BIT     = (1<<2), // location was calculated using WiFi
+    LOCATION_TECHNOLOGY_SENSORS_BIT  = (1<<3), // location was calculated using Sensors
+} LocationTechnologyBits;
+
+typedef enum {
+    LOCATION_RELIABILITY_NOT_SET = 0,
+    LOCATION_RELIABILITY_VERY_LOW,
+    LOCATION_RELIABILITY_LOW,
+    LOCATION_RELIABILITY_MEDIUM,
+    LOCATION_RELIABILITY_HIGH,
+} LocationReliability;
+
+typedef uint32_t GnssLocationNavSolutionMask;
+typedef enum {
+    LOCATION_SBAS_CORRECTION_IONO_BIT  = (1<<0), // SBAS ionospheric correction is used
+    LOCATION_SBAS_CORRECTION_FAST_BIT  = (1<<1), // SBAS fast correction is used
+    LOCATION_SBAS_CORRECTION_LONG_BIT  = (1<<2), // SBAS long-tem correction is used
+    LOCATION_SBAS_INTEGRITY_BIT        = (1<<3), // SBAS integrity information is used
+    LOCATION_NAV_CORRECTION_DGNSS_BIT  = (1<<4), // Position Report is DGNSS corrected
+    LOCATION_NAV_CORRECTION_RTK_BIT    = (1<<5), // Position Report is RTK corrected
+    LOCATION_NAV_CORRECTION_PPP_BIT    = (1<<6) // Position Report is PPP corrected
+} GnssLocationNavSolutionBits;
+
+typedef uint32_t GnssLocationPosTechMask;
+typedef enum {
+    LOCATION_POS_TECH_DEFAULT_BIT                  = 0,
+    LOCATION_POS_TECH_SATELLITE_BIT                = (1<<0),
+    LOCATION_POS_TECH_CELLID_BIT                   = (1<<1),
+    LOCATION_POS_TECH_WIFI_BIT                     = (1<<2),
+    LOCATION_POS_TECH_SENSORS_BIT                  = (1<<3),
+    LOCATION_POS_TECH_REFERENCE_LOCATION_BIT       = (1<<4),
+    LOCATION_POS_TECH_INJECTED_COARSE_POSITION_BIT = (1<<5),
+    LOCATION_POS_TECH_AFLT_BIT                     = (1<<6),
+    LOCATION_POS_TECH_HYBRID_BIT                   = (1<<7),
+    LOCATION_POS_TECH_PPE_BIT                      = (1<<8)
+} GnssLocationPosTechBits;
+
+typedef uint32_t GnssLocationPosDataMask;
+typedef enum {
+    LOCATION_NAV_DATA_HAS_LONG_ACCEL_BIT  = (1<<0), // Navigation data has Forward Acceleration
+    LOCATION_NAV_DATA_HAS_LAT_ACCEL_BIT   = (1<<1), // Navigation data has Sideward Acceleration
+    LOCATION_NAV_DATA_HAS_VERT_ACCEL_BIT  = (1<<2), // Navigation data has Vertical Acceleration
+    LOCATION_NAV_DATA_HAS_YAW_RATE_BIT    = (1<<3), // Navigation data has Heading Rate
+    LOCATION_NAV_DATA_HAS_PITCH_BIT       = (1<<4)  // Navigation data has Body pitch
+} GnssLocationPosDataBits;
+
+typedef uint32_t GnssLocationInfoFlagMask;
+typedef enum {
+    GNSS_LOCATION_INFO_ALTITUDE_MEAN_SEA_LEVEL_BIT      = (1<<0), // valid altitude mean sea level
+    GNSS_LOCATION_INFO_DOP_BIT                          = (1<<1), // valid pdop, hdop, and vdop
+    GNSS_LOCATION_INFO_MAGNETIC_DEVIATION_BIT           = (1<<2), // valid magnetic deviation
+    GNSS_LOCATION_INFO_HOR_RELIABILITY_BIT              = (1<<3), // valid horizontal reliability
+    GNSS_LOCATION_INFO_VER_RELIABILITY_BIT              = (1<<4), // valid vertical reliability
+    GNSS_LOCATION_INFO_HOR_ACCURACY_ELIP_SEMI_MAJOR_BIT = (1<<5), // valid elipsode semi major
+    GNSS_LOCATION_INFO_HOR_ACCURACY_ELIP_SEMI_MINOR_BIT = (1<<6), // valid elipsode semi minor
+    GNSS_LOCATION_INFO_HOR_ACCURACY_ELIP_AZIMUTH_BIT    = (1<<7), // valid accuracy elipsode azimuth
+    GNSS_LOCATION_INFO_GNSS_SV_USED_DATA_BIT            = (1<<8), // valid gnss sv used in pos data
+    GNSS_LOCATION_INFO_NAV_SOLUTION_MASK_BIT            = (1<<9), // valid navSolutionMask
+    GNSS_LOCATION_INFO_POS_TECH_MASK_BIT                = (1<<10),// valid LocPosTechMask
+    GNSS_LOCATION_INFO_SV_SOURCE_INFO_BIT               = (1<<11),// valid LocSvInfoSource
+    GNSS_LOCATION_INFO_POS_DYNAMICS_DATA_BIT            = (1<<12),// valid position dynamics data
+    GNSS_LOCATION_INFO_GPS_TIME_BIT                     = (1<<13),// valid GPS Time
+    GNSS_LOCATION_INFO_EXT_DOP_BIT                      = (1<<14) // valid gdop, tdop
+} GnssLocationInfoFlagBits;
+
+typedef enum {
+    GEOFENCE_BREACH_ENTER = 0,
+    GEOFENCE_BREACH_EXIT,
+    GEOFENCE_BREACH_DWELL_IN,
+    GEOFENCE_BREACH_DWELL_OUT,
+    GEOFENCE_BREACH_UNKNOWN,
+} GeofenceBreachType;
+
+typedef uint16_t GeofenceBreachTypeMask;
+typedef enum {
+    GEOFENCE_BREACH_ENTER_BIT     = (1<<0),
+    GEOFENCE_BREACH_EXIT_BIT      = (1<<1),
+    GEOFENCE_BREACH_DWELL_IN_BIT  = (1<<2),
+    GEOFENCE_BREACH_DWELL_OUT_BIT = (1<<3),
+} GeofenceBreachTypeBits;
+
+typedef enum {
+    GEOFENCE_STATUS_AVAILABILE_NO = 0,
+    GEOFENCE_STATUS_AVAILABILE_YES,
+} GeofenceStatusAvailable;
+
+typedef uint32_t LocationCapabilitiesMask;
+typedef enum {
+    // supports startTracking API with minInterval param
+    LOCATION_CAPABILITIES_TIME_BASED_TRACKING_BIT           = (1<<0),
+    // supports startBatching API with minInterval param
+    LOCATION_CAPABILITIES_TIME_BASED_BATCHING_BIT           = (1<<1),
+    // supports startTracking API with minDistance param
+    LOCATION_CAPABILITIES_DISTANCE_BASED_TRACKING_BIT       = (1<<2),
+    // supports startBatching API with minDistance param
+    LOCATION_CAPABILITIES_DISTANCE_BASED_BATCHING_BIT       = (1<<3),
+    // supports addGeofences API
+    LOCATION_CAPABILITIES_GEOFENCE_BIT                      = (1<<4),
+    // supports GnssMeasurementsCallback
+    LOCATION_CAPABILITIES_GNSS_MEASUREMENTS_BIT             = (1<<5),
+    // supports startTracking/startBatching API with LocationOptions.mode of MSB (Ms Based)
+    LOCATION_CAPABILITIES_GNSS_MSB_BIT                      = (1<<6),
+    // supports startTracking/startBatching API with LocationOptions.mode of MSA (MS Assisted)
+    LOCATION_CAPABILITIES_GNSS_MSA_BIT                      = (1<<7),
+    // supports debug nmea sentences in the debugNmeaCallback
+    LOCATION_CAPABILITIES_DEBUG_NMEA_BIT                    = (1<<8),
+    // support outdoor trip batching
+    LOCATION_CAPABILITIES_OUTDOOR_TRIP_BATCHING_BIT         = (1<<9),
+    // support constellation enablement
+    LOCATION_CAPABILITIES_CONSTELLATION_ENABLEMENT_BIT      = (1<<10),
+    // support agpm
+    LOCATION_CAPABILITIES_AGPM_BIT                          = (1<<11),
+} LocationCapabilitiesBits;
+
+typedef enum {
+    LOCATION_TECHNOLOGY_TYPE_GNSS = 0,
+} LocationTechnologyType;
+
+// Configures how GPS is locked when GPS is disabled (through GnssDisable)
+typedef enum {
+    GNSS_CONFIG_GPS_LOCK_NONE = 0, // gps is not locked when GPS is disabled (GnssDisable)
+    GNSS_CONFIG_GPS_LOCK_MO,       // gps mobile originated (MO) is locked when GPS is disabled
+    GNSS_CONFIG_GPS_LOCK_NI,       // gps network initiated (NI) is locked when GPS is disabled
+    GNSS_CONFIG_GPS_LOCK_MO_AND_NI,// gps MO and NI is locked when GPS is disabled
+} GnssConfigGpsLock;
+
+// SUPL version
+typedef enum {
+    GNSS_CONFIG_SUPL_VERSION_1_0_0 = 1,
+    GNSS_CONFIG_SUPL_VERSION_2_0_0,
+    GNSS_CONFIG_SUPL_VERSION_2_0_2,
+} GnssConfigSuplVersion;
+
+// LTE Positioning Profile
+typedef enum {
+    GNSS_CONFIG_LPP_PROFILE_RRLP_ON_LTE = 0,              // RRLP on LTE (Default)
+    GNSS_CONFIG_LPP_PROFILE_USER_PLANE,                   // LPP User Plane (UP) on LTE
+    GNSS_CONFIG_LPP_PROFILE_CONTROL_PLANE,                // LPP_Control_Plane (CP)
+    GNSS_CONFIG_LPP_PROFILE_USER_PLANE_AND_CONTROL_PLANE, // Both LPP UP and CP
+} GnssConfigLppProfile;
+
+// Technology for LPPe Control Plane
+typedef uint16_t GnssConfigLppeControlPlaneMask;
+typedef enum {
+    GNSS_CONFIG_LPPE_CONTROL_PLANE_DBH_BIT                  = (1<<0), // DBH
+    GNSS_CONFIG_LPPE_CONTROL_PLANE_WLAN_AP_MEASUREMENTS_BIT = (1<<1), // WLAN_AP_MEASUREMENTS
+    GNSS_CONFIG_LPPE_CONTROL_PLANE_SRN_AP_MEASUREMENTS_BIT = (1<<2), // SRN_AP_MEASUREMENTS
+    GNSS_CONFIG_LPPE_CONTROL_PLANE_SENSOR_BARO_MEASUREMENTS_BIT = (1<<3),
+                                                             // SENSOR_BARO_MEASUREMENTS
+} GnssConfigLppeControlPlaneBits;
+
+// Technology for LPPe User Plane
+typedef uint16_t GnssConfigLppeUserPlaneMask;
+typedef enum {
+    GNSS_CONFIG_LPPE_USER_PLANE_DBH_BIT                  = (1<<0), // DBH
+    GNSS_CONFIG_LPPE_USER_PLANE_WLAN_AP_MEASUREMENTS_BIT = (1<<1), // WLAN_AP_MEASUREMENTS
+    GNSS_CONFIG_LPPE_USER_PLANE_SRN_AP_MEASUREMENTS_BIT = (1<<2), // SRN_AP_MEASUREMENTS
+    GNSS_CONFIG_LPPE_USER_PLANE_SENSOR_BARO_MEASUREMENTS_BIT = (1<<3),
+                                                            // SENSOR_BARO_MEASUREMENTS
+} GnssConfigLppeUserPlaneBits;
+
+// Positioning Protocol on A-GLONASS system
+typedef uint16_t GnssConfigAGlonassPositionProtocolMask;
+typedef enum {
+    GNSS_CONFIG_RRC_CONTROL_PLANE_BIT = (1<<0),  // RRC Control Plane
+    GNSS_CONFIG_RRLP_USER_PLANE_BIT   = (1<<1),  // RRLP User Plane
+    GNSS_CONFIG_LLP_USER_PLANE_BIT    = (1<<2),  // LPP User Plane
+    GNSS_CONFIG_LLP_CONTROL_PLANE_BIT = (1<<3),  // LPP Control Plane
+} GnssConfigAGlonassPositionProtocolBits;
+
+typedef enum {
+    GNSS_CONFIG_EMERGENCY_PDN_FOR_EMERGENCY_SUPL_NO = 0,
+    GNSS_CONFIG_EMERGENCY_PDN_FOR_EMERGENCY_SUPL_YES,
+} GnssConfigEmergencyPdnForEmergencySupl;
+
+typedef enum {
+    GNSS_CONFIG_SUPL_EMERGENCY_SERVICES_NO = 0,
+    GNSS_CONFIG_SUPL_EMERGENCY_SERVICES_YES,
+} GnssConfigSuplEmergencyServices;
+
+typedef uint16_t GnssConfigSuplModeMask;
+typedef enum {
+    GNSS_CONFIG_SUPL_MODE_MSB_BIT = (1<<0),
+    GNSS_CONFIG_SUPL_MODE_MSA_BIT = (1<<1),
+} GnssConfigSuplModeBits;
+
+typedef uint32_t GnssConfigFlagsMask;
+typedef enum {
+    GNSS_CONFIG_FLAGS_GPS_LOCK_VALID_BIT                   = (1<<0),
+    GNSS_CONFIG_FLAGS_SUPL_VERSION_VALID_BIT               = (1<<1),
+    GNSS_CONFIG_FLAGS_SET_ASSISTANCE_DATA_VALID_BIT        = (1<<2),
+    GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT                = (1<<3),
+    GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT         = (1<<4),
+    GNSS_CONFIG_FLAGS_LPPE_USER_PLANE_VALID_BIT            = (1<<5),
+    GNSS_CONFIG_FLAGS_AGLONASS_POSITION_PROTOCOL_VALID_BIT = (1<<6),
+    GNSS_CONFIG_FLAGS_EM_PDN_FOR_EM_SUPL_VALID_BIT         = (1<<7),
+    GNSS_CONFIG_FLAGS_SUPL_EM_SERVICES_BIT                 = (1<<8),
+    GNSS_CONFIG_FLAGS_SUPL_MODE_BIT                        = (1<<9),
+    GNSS_CONFIG_FLAGS_BLACKLISTED_SV_IDS_BIT               = (1<<10)
+} GnssConfigFlagsBits;
+
+typedef enum {
+    GNSS_NI_ENCODING_TYPE_NONE = 0,
+    GNSS_NI_ENCODING_TYPE_GSM_DEFAULT,
+    GNSS_NI_ENCODING_TYPE_UTF8,
+    GNSS_NI_ENCODING_TYPE_UCS2,
+} GnssNiEncodingType;
+
+typedef enum {
+    GNSS_NI_TYPE_VOICE = 0,
+    GNSS_NI_TYPE_SUPL,
+    GNSS_NI_TYPE_CONTROL_PLANE,
+    GNSS_NI_TYPE_EMERGENCY_SUPL
+} GnssNiType;
+
+typedef uint16_t GnssNiOptionsMask;
+typedef enum {
+    GNSS_NI_OPTIONS_NOTIFICATION_BIT     = (1<<0),
+    GNSS_NI_OPTIONS_VERIFICATION_BIT     = (1<<1),
+    GNSS_NI_OPTIONS_PRIVACY_OVERRIDE_BIT = (1<<2),
+} GnssNiOptionsBits;
+
+typedef enum {
+    GNSS_NI_RESPONSE_ACCEPT = 1,
+    GNSS_NI_RESPONSE_DENY,
+    GNSS_NI_RESPONSE_NO_RESPONSE,
+    GNSS_NI_RESPONSE_IGNORE,
+} GnssNiResponse;
+
+typedef enum {
+    GNSS_SV_TYPE_UNKNOWN = 0,
+    GNSS_SV_TYPE_GPS,
+    GNSS_SV_TYPE_SBAS,
+    GNSS_SV_TYPE_GLONASS,
+    GNSS_SV_TYPE_QZSS,
+    GNSS_SV_TYPE_BEIDOU,
+    GNSS_SV_TYPE_GALILEO,
+} GnssSvType;
+
+typedef enum {
+    GNSS_EPH_TYPE_UNKNOWN = 0,
+    GNSS_EPH_TYPE_EPHEMERIS,
+    GNSS_EPH_TYPE_ALMANAC,
+} GnssEphemerisType;
+
+typedef enum {
+    GNSS_EPH_SOURCE_UNKNOWN = 0,
+    GNSS_EPH_SOURCE_DEMODULATED,
+    GNSS_EPH_SOURCE_SUPL_PROVIDED,
+    GNSS_EPH_SOURCE_OTHER_SERVER_PROVIDED,
+    GNSS_EPH_SOURCE_LOCAL,
+} GnssEphemerisSource;
+
+typedef enum {
+    GNSS_EPH_HEALTH_UNKNOWN = 0,
+    GNSS_EPH_HEALTH_GOOD,
+    GNSS_EPH_HEALTH_BAD,
+} GnssEphemerisHealth;
+
+typedef uint16_t GnssSvOptionsMask;
+typedef enum {
+    GNSS_SV_OPTIONS_HAS_EPHEMER_BIT = (1<<0),
+    GNSS_SV_OPTIONS_HAS_ALMANAC_BIT = (1<<1),
+    GNSS_SV_OPTIONS_USED_IN_FIX_BIT = (1<<2),
+    GNSS_SV_OPTIONS_HAS_CARRIER_FREQUENCY_BIT = (1<<3),
+} GnssSvOptionsBits;
+
+typedef enum {
+    GNSS_ASSISTANCE_TYPE_SUPL = 0,
+    GNSS_ASSISTANCE_TYPE_C2K,
+} GnssAssistanceType;
+
+typedef enum {
+    GNSS_SUPL_MODE_STANDALONE = 0,
+    GNSS_SUPL_MODE_MSB,
+    GNSS_SUPL_MODE_MSA,
+} GnssSuplMode;
+
+typedef enum {
+    BATCHING_MODE_ROUTINE = 0,   // positions are reported when batched positions memory is full
+    BATCHING_MODE_TRIP,          // positions are reported when a certain distance is covered
+    BATCHING_MODE_NO_AUTO_REPORT // no report of positions automatically, instead queried on demand
+} BatchingMode;
+
+typedef enum {
+    BATCHING_STATUS_TRIP_COMPLETED = 0,
+    BATCHING_STATUS_POSITION_AVAILABE,
+    BATCHING_STATUS_POSITION_UNAVAILABLE
+} BatchingStatus;
+
+typedef uint16_t GnssMeasurementsAdrStateMask;
+typedef enum {
+    GNSS_MEASUREMENTS_ACCUMULATED_DELTA_RANGE_STATE_UNKNOWN         = 0,
+    GNSS_MEASUREMENTS_ACCUMULATED_DELTA_RANGE_STATE_VALID_BIT       = (1<<0),
+    GNSS_MEASUREMENTS_ACCUMULATED_DELTA_RANGE_STATE_RESET_BIT       = (1<<1),
+    GNSS_MEASUREMENTS_ACCUMULATED_DELTA_RANGE_STATE_CYCLE_SLIP_BIT  = (1<<2),
+} GnssMeasurementsAdrStateBits;
+
+typedef uint32_t GnssMeasurementsDataFlagsMask;
+typedef enum {
+    GNSS_MEASUREMENTS_DATA_SV_ID_BIT                        = (1<<0),
+    GNSS_MEASUREMENTS_DATA_SV_TYPE_BIT                      = (1<<1),
+    GNSS_MEASUREMENTS_DATA_STATE_BIT                        = (1<<2),
+    GNSS_MEASUREMENTS_DATA_RECEIVED_SV_TIME_BIT             = (1<<3),
+    GNSS_MEASUREMENTS_DATA_RECEIVED_SV_TIME_UNCERTAINTY_BIT = (1<<4),
+    GNSS_MEASUREMENTS_DATA_CARRIER_TO_NOISE_BIT             = (1<<5),
+    GNSS_MEASUREMENTS_DATA_PSEUDORANGE_RATE_BIT             = (1<<6),
+    GNSS_MEASUREMENTS_DATA_PSEUDORANGE_RATE_UNCERTAINTY_BIT = (1<<7),
+    GNSS_MEASUREMENTS_DATA_ADR_STATE_BIT                    = (1<<8),
+    GNSS_MEASUREMENTS_DATA_ADR_BIT                          = (1<<9),
+    GNSS_MEASUREMENTS_DATA_ADR_UNCERTAINTY_BIT              = (1<<10),
+    GNSS_MEASUREMENTS_DATA_CARRIER_FREQUENCY_BIT            = (1<<11),
+    GNSS_MEASUREMENTS_DATA_CARRIER_CYCLES_BIT               = (1<<12),
+    GNSS_MEASUREMENTS_DATA_CARRIER_PHASE_BIT                = (1<<13),
+    GNSS_MEASUREMENTS_DATA_CARRIER_PHASE_UNCERTAINTY_BIT    = (1<<14),
+    GNSS_MEASUREMENTS_DATA_MULTIPATH_INDICATOR_BIT          = (1<<15),
+    GNSS_MEASUREMENTS_DATA_SIGNAL_TO_NOISE_RATIO_BIT        = (1<<16),
+    GNSS_MEASUREMENTS_DATA_AUTOMATIC_GAIN_CONTROL_BIT       = (1<<17),
+} GnssMeasurementsDataFlagsBits;
+
+typedef uint32_t GnssMeasurementsStateMask;
+typedef enum {
+    GNSS_MEASUREMENTS_STATE_UNKNOWN_BIT               = 0,
+    GNSS_MEASUREMENTS_STATE_CODE_LOCK_BIT             = (1<<0),
+    GNSS_MEASUREMENTS_STATE_BIT_SYNC_BIT              = (1<<1),
+    GNSS_MEASUREMENTS_STATE_SUBFRAME_SYNC_BIT         = (1<<2),
+    GNSS_MEASUREMENTS_STATE_TOW_DECODED_BIT           = (1<<3),
+    GNSS_MEASUREMENTS_STATE_MSEC_AMBIGUOUS_BIT        = (1<<4),
+    GNSS_MEASUREMENTS_STATE_SYMBOL_SYNC_BIT           = (1<<5),
+    GNSS_MEASUREMENTS_STATE_GLO_STRING_SYNC_BIT       = (1<<6),
+    GNSS_MEASUREMENTS_STATE_GLO_TOD_DECODED_BIT       = (1<<7),
+    GNSS_MEASUREMENTS_STATE_BDS_D2_BIT_SYNC_BIT       = (1<<8),
+    GNSS_MEASUREMENTS_STATE_BDS_D2_SUBFRAME_SYNC_BIT  = (1<<9),
+    GNSS_MEASUREMENTS_STATE_GAL_E1BC_CODE_LOCK_BIT    = (1<<10),
+    GNSS_MEASUREMENTS_STATE_GAL_E1C_2ND_CODE_LOCK_BIT = (1<<11),
+    GNSS_MEASUREMENTS_STATE_GAL_E1B_PAGE_SYNC_BIT     = (1<<12),
+    GNSS_MEASUREMENTS_STATE_SBAS_SYNC_BIT             = (1<<13),
+} GnssMeasurementsStateBits;
+
+typedef enum {
+    GNSS_MEASUREMENTS_MULTIPATH_INDICATOR_UNKNOWN = 0,
+    GNSS_MEASUREMENTS_MULTIPATH_INDICATOR_PRESENT,
+    GNSS_MEASUREMENTS_MULTIPATH_INDICATOR_NOT_PRESENT,
+} GnssMeasurementsMultipathIndicator;
+
+typedef uint32_t GnssMeasurementsClockFlagsMask;
+typedef enum {
+    GNSS_MEASUREMENTS_CLOCK_FLAGS_LEAP_SECOND_BIT                  = (1<<0),
+    GNSS_MEASUREMENTS_CLOCK_FLAGS_TIME_BIT                         = (1<<1),
+    GNSS_MEASUREMENTS_CLOCK_FLAGS_TIME_UNCERTAINTY_BIT             = (1<<2),
+    GNSS_MEASUREMENTS_CLOCK_FLAGS_FULL_BIAS_BIT                    = (1<<3),
+    GNSS_MEASUREMENTS_CLOCK_FLAGS_BIAS_BIT                         = (1<<4),
+    GNSS_MEASUREMENTS_CLOCK_FLAGS_BIAS_UNCERTAINTY_BIT             = (1<<5),
+    GNSS_MEASUREMENTS_CLOCK_FLAGS_DRIFT_BIT                        = (1<<6),
+    GNSS_MEASUREMENTS_CLOCK_FLAGS_DRIFT_UNCERTAINTY_BIT            = (1<<7),
+    GNSS_MEASUREMENTS_CLOCK_FLAGS_HW_CLOCK_DISCONTINUITY_COUNT_BIT = (1<<8),
+} GnssMeasurementsClockFlagsBits;
+
+typedef uint32_t GnssAidingDataSvMask;
+typedef enum {
+    GNSS_AIDING_DATA_SV_EPHEMERIS_BIT    = (1<<0), // ephemeris
+    GNSS_AIDING_DATA_SV_ALMANAC_BIT      = (1<<1), // almanac
+    GNSS_AIDING_DATA_SV_HEALTH_BIT       = (1<<2), // health
+    GNSS_AIDING_DATA_SV_DIRECTION_BIT    = (1<<3), // direction
+    GNSS_AIDING_DATA_SV_STEER_BIT        = (1<<4), // steer
+    GNSS_AIDING_DATA_SV_ALMANAC_CORR_BIT = (1<<5), // almanac correction
+    GNSS_AIDING_DATA_SV_BLACKLIST_BIT    = (1<<6), // blacklist SVs
+    GNSS_AIDING_DATA_SV_SA_DATA_BIT      = (1<<7), // sensitivity assistance data
+    GNSS_AIDING_DATA_SV_NO_EXIST_BIT     = (1<<8), // SV does not exist
+    GNSS_AIDING_DATA_SV_IONOSPHERE_BIT   = (1<<9), // ionosphere correction
+    GNSS_AIDING_DATA_SV_TIME_BIT         = (1<<10),// reset satellite time
+} GnssAidingDataSvBits;
+
+typedef uint32_t GnssAidingDataSvTypeMask;
+typedef enum {
+    GNSS_AIDING_DATA_SV_TYPE_GPS_BIT      = (1<<0),
+    GNSS_AIDING_DATA_SV_TYPE_GLONASS_BIT  = (1<<1),
+    GNSS_AIDING_DATA_SV_TYPE_QZSS_BIT     = (1<<2),
+    GNSS_AIDING_DATA_SV_TYPE_BEIDOU_BIT   = (1<<3),
+    GNSS_AIDING_DATA_SV_TYPE_GALILEO_BIT  = (1<<4),
+} GnssAidingDataSvTypeBits;
+
+typedef enum
+{
+    GNSS_LOC_SV_SYSTEM_GPS                    = 1,
+    /**< GPS satellite. */
+    GNSS_LOC_SV_SYSTEM_GALILEO                = 2,
+    /**< GALILEO satellite. */
+    GNSS_LOC_SV_SYSTEM_SBAS                   = 3,
+    /**< SBAS satellite. */
+    GNSS_LOC_SV_SYSTEM_COMPASS                = 4,
+    /**< COMPASS satellite. */
+    GNSS_LOC_SV_SYSTEM_GLONASS                = 5,
+    /**< GLONASS satellite. */
+    GNSS_LOC_SV_SYSTEM_BDS                    = 6,
+    /**< BDS satellite. */
+    GNSS_LOC_SV_SYSTEM_QZSS                   = 7
+    /**< QZSS satellite. */
+} Gnss_LocSvSystemEnumType;
+
+typedef uint32_t GnssSystemTimeStructTypeFlags;
+typedef enum {
+    GNSS_SYSTEM_TIME_WEEK_VALID             = (1 << 0),
+    GNSS_SYSTEM_TIME_WEEK_MS_VALID          = (1 << 1),
+    GNSS_SYSTEM_CLK_TIME_BIAS_VALID         = (1 << 2),
+    GNSS_SYSTEM_CLK_TIME_BIAS_UNC_VALID     = (1 << 3),
+    GNSS_SYSTEM_REF_FCOUNT_VALID            = (1 << 4),
+    GNSS_SYSTEM_NUM_CLOCK_RESETS_VALID      = (1 << 5)
+} GnssSystemTimeTypeBits;
+
+typedef uint32_t GnssGloTimeStructTypeFlags;
+typedef enum {
+    GNSS_CLO_DAYS_VALID                     = (1 << 0),
+    GNSS_GLOS_MSEC_VALID                    = (1 << 1),
+    GNSS_GLO_CLK_TIME_BIAS_VALID            = (1 << 2),
+    GNSS_GLO_CLK_TIME_BIAS_UNC_VALID        = (1 << 3),
+    GNSS_GLO_REF_FCOUNT_VALID               = (1 << 4),
+    GNSS_GLO_NUM_CLOCK_RESETS_VALID         = (1 << 5),
+    GNSS_GLO_FOUR_YEAR_VALID                = (1 << 6)
+} GnssGloTimeTypeBits;
+
+typedef struct {
+    GnssAidingDataSvMask svMask;         // bitwise OR of GnssAidingDataSvBits
+    GnssAidingDataSvTypeMask svTypeMask; // bitwise OR of GnssAidingDataSvTypeBits
+} GnssAidingDataSv;
+
+typedef uint32_t GnssAidingDataCommonMask;
+typedef enum {
+    GNSS_AIDING_DATA_COMMON_POSITION_BIT      = (1<<0), // position estimate
+    GNSS_AIDING_DATA_COMMON_TIME_BIT          = (1<<1), // reset all clock values
+    GNSS_AIDING_DATA_COMMON_UTC_BIT           = (1<<2), // UTC estimate
+    GNSS_AIDING_DATA_COMMON_RTI_BIT           = (1<<3), // RTI
+    GNSS_AIDING_DATA_COMMON_FREQ_BIAS_EST_BIT = (1<<4), // frequency bias estimate
+    GNSS_AIDING_DATA_COMMON_CELLDB_BIT        = (1<<5), // all celldb info
+} GnssAidingDataCommonBits;
+
+typedef struct {
+    GnssAidingDataCommonMask mask; // bitwise OR of GnssAidingDataCommonBits
+} GnssAidingDataCommon;
+
+typedef struct {
+    bool deleteAll;              // if true, delete all aiding data and ignore other params
+    GnssAidingDataSv sv;         // SV specific aiding data
+    GnssAidingDataCommon common; // common aiding data
+} GnssAidingData;
+
+typedef struct {
+    size_t size;             // set to sizeof(Location)
+    LocationFlagsMask flags; // bitwise OR of LocationFlagsBits to mark which params are valid
+    uint64_t timestamp;      // UTC timestamp for location fix, milliseconds since January 1, 1970
+    double latitude;         // in degrees
+    double longitude;        // in degrees
+    double altitude;         // in meters above the WGS 84 reference ellipsoid
+    float speed;             // in meters per second
+    float bearing;           // in degrees; range [0, 360)
+    float accuracy;          // in meters
+    float verticalAccuracy;  // in meters
+    float speedAccuracy;     // in meters/second
+    float bearingAccuracy;   // in degrees (0 to 359.999)
+    LocationTechnologyMask techMask;
+} Location;
+
+struct LocationOptions {
+    size_t size;          // set to sizeof(LocationOptions)
+    uint32_t minInterval; // in milliseconds
+    uint32_t minDistance; // in meters. if minDistance > 0, gnssSvCallback/gnssNmeaCallback/
+                          // gnssMeasurementsCallback may not be called
+    GnssSuplMode mode;    // Standalone/MS-Based/MS-Assisted
+
+    inline LocationOptions() :
+            size(0), minInterval(0), minDistance(0), mode(GNSS_SUPL_MODE_STANDALONE) {}
+};
+
+typedef enum {
+    GNSS_POWER_MODE_INVALID = 0,
+    GNSS_POWER_MODE_M1,  /* Improved Accuracy Mode */
+    GNSS_POWER_MODE_M2,  /* Normal Mode */
+    GNSS_POWER_MODE_M3,  /* Background Mode */
+    GNSS_POWER_MODE_M4,  /* Background Mode */
+    GNSS_POWER_MODE_M5   /* Background Mode */
+} GnssPowerMode;
+
+struct TrackingOptions : LocationOptions {
+    GnssPowerMode powerMode; /* Power Mode to be used for time based tracking
+                                sessions */
+    uint32_t tbm;  /* Time interval between measurements.
+                      Applicable to background power modes */
+
+    inline TrackingOptions() :
+            LocationOptions(), powerMode(GNSS_POWER_MODE_INVALID), tbm(0) {}
+    inline TrackingOptions(size_t s, GnssPowerMode m, uint32_t t) :
+            LocationOptions(), powerMode(m), tbm(t) { LocationOptions::size = s; }
+    inline TrackingOptions(const LocationOptions& options) :
+            LocationOptions(options), powerMode(GNSS_POWER_MODE_INVALID), tbm(0) {}
+    inline void setLocationOptions(const LocationOptions& options) {
+        minInterval = options.minInterval;
+        minDistance = options.minDistance;
+        mode = options.mode;
+    }
+};
+
+struct BatchingOptions : LocationOptions {
+    BatchingMode batchingMode;
+
+    inline BatchingOptions() :
+            LocationOptions(), batchingMode(BATCHING_MODE_ROUTINE) {}
+    inline BatchingOptions(size_t s, BatchingMode m) :
+            LocationOptions(), batchingMode(m) { LocationOptions::size = s; }
+    inline BatchingOptions(const LocationOptions& options) :
+            LocationOptions(options), batchingMode(BATCHING_MODE_ROUTINE) {}
+    inline void setLocationOptions(const LocationOptions& options) {
+        minInterval = options.minInterval;
+        minDistance = options.minDistance;
+        mode = options.mode;
+    }
+};
+
+typedef struct {
+    size_t size;
+    BatchingStatus batchingStatus;
+} BatchingStatusInfo;
+
+typedef struct {
+    size_t size;                            // set to sizeof(GeofenceOption)
+    GeofenceBreachTypeMask breachTypeMask;  // bitwise OR of GeofenceBreachTypeBits
+    uint32_t responsiveness;                // in milliseconds
+    uint32_t dwellTime;                     // in seconds
+} GeofenceOption;
+
+typedef struct {
+    size_t size;      // set to sizeof(GeofenceInfo)
+    double latitude;  // in degrees
+    double longitude; // in degrees
+    double radius;    // in meters
+} GeofenceInfo;
+
+typedef struct {
+    size_t size;             // set to sizeof(GeofenceBreachNotification)
+    size_t count;            // number of ids in array
+    uint32_t* ids;           // array of ids that have breached
+    Location location;       // location associated with breach
+    GeofenceBreachType type; // type of breach
+    uint64_t timestamp;      // timestamp of breach
+} GeofenceBreachNotification;
+
+typedef struct {
+    size_t size;                       // set to sizeof(GeofenceBreachNotification)
+    GeofenceStatusAvailable available; // GEOFENCE_STATUS_AVAILABILE_NO/_YES
+    LocationTechnologyType techType;   // GNSS
+} GeofenceStatusNotification;
+
+typedef struct {
+    uint64_t gpsSvUsedIdsMask;
+    uint64_t gloSvUsedIdsMask;
+    uint64_t galSvUsedIdsMask;
+    uint64_t bdsSvUsedIdsMask;
+    uint64_t qzssSvUsedIdsMask;
+} GnssLocationSvUsedInPosition;
+
+/** @struct
+    Body Frame parameters
+*/
+typedef struct {
+    GnssLocationPosDataMask bodyFrameDataMask; // Contains Body frame LocPosDataMask bits
+    float longAccel;                           // Forward Acceleration in body frame (m/s2)
+    float latAccel;                            // Sideward Acceleration in body frame (m/s2)
+    float vertAccel;                           // Vertical Acceleration in body frame (m/s2)
+    float yawRate;                             // Heading Rate (Radians/second)
+    float pitch;                               // Body pitch (Radians)
+} GnssLocationPositionDynamics;
+
+typedef struct {
+    /** Validity mask for below fields */
+    GnssSystemTimeStructTypeFlags validityMask;
+    /** Extended week number at reference tick.
+    Unit: Week.
+    Set to 65535 if week number is unknown.
+    For GPS:
+      Calculated from midnight, Jan. 6, 1980.
+      OTA decoded 10 bit GPS week is extended to map between:
+      [NV6264 to (NV6264 + 1023)].
+      NV6264: Minimum GPS week number configuration.
+      Default value of NV6264: 1738
+    For BDS:
+      Calculated from 00:00:00 on January 1, 2006 of Coordinated Universal Time (UTC).
+    For GAL:
+      Calculated from 00:00 UT on Sunday August 22, 1999 (midnight between August 21 and August 22).
+   */
+    uint16_t systemWeek;
+    /** Time in to the current week at reference tick.
+       Unit: Millisecond. Range: 0 to 604799999.
+       Check for systemClkTimeUncMs before use */
+    uint32_t systemMsec;
+    /** System clock time bias (sub-millisecond)
+        Units: Millisecond
+        Note: System time (TOW Millisecond) = systemMsec - systemClkTimeBias.
+        Check for systemClkTimeUncMs before use. */
+    float systemClkTimeBias;
+    /** Single sided maximum time bias uncertainty
+        Units: Millisecond */
+    float systemClkTimeUncMs;
+    /** FCount (free running HW timer) value. Don't use for relative time purpose
+         due to possible discontinuities.
+         Unit: Millisecond */
+    uint32_t refFCount;
+    /** Number of clock resets/discontinuities detected, affecting the local hardware counter value. */
+    uint32_t numClockResets;
+} GnssSystemTimeStructType;
+
+typedef struct {
+    /** GLONASS day number in four years. Refer to GLONASS ICD.
+        Applicable only for GLONASS and shall be ignored for other constellations.
+        If unknown shall be set to 65535 */
+    uint16_t gloDays;
+    /** Validity mask for below fields */
+    GnssGloTimeStructTypeFlags validityMask;
+    /** GLONASS time of day in Millisecond. Refer to GLONASS ICD.
+        Units: Millisecond
+        Check for gloClkTimeUncMs before use */
+    uint32_t gloMsec;
+    /** GLONASS clock time bias (sub-millisecond)
+        Units: Millisecond
+        Note: GLO time (TOD Millisecond) = gloMsec - gloClkTimeBias.
+        Check for gloClkTimeUncMs before use. */
+    float gloClkTimeBias;
+    /** Single sided maximum time bias uncertainty
+        Units: Millisecond */
+    float gloClkTimeUncMs;
+    /** FCount (free running HW timer) value. Don't use for relative time purpose
+        due to possible discontinuities.
+        Unit: Millisecond */
+    uint32_t  refFCount;
+    /** Number of clock resets/discontinuities detected, affecting the local hardware counter value. */
+    uint32_t numClockResets;
+    /** GLONASS four year number from 1996. Refer to GLONASS ICD.
+        Applicable only for GLONASS and shall be ignored for other constellations.
+        If unknown shall be set to 255 */
+    uint8_t gloFourYear;
+} GnssGloTimeStructType;
+
+typedef union {
+    GnssSystemTimeStructType gpsSystemTime;
+    GnssSystemTimeStructType galSystemTime;
+    GnssSystemTimeStructType bdsSystemTime;
+    GnssSystemTimeStructType qzssSystemTime;
+    GnssGloTimeStructType gloSytemTime;
+} SystemTimeStructUnion;
+    /** Time applicability of PVT report */
+typedef struct {
+    /** Specifies GNSS system time reported. Mandatory field */
+    Gnss_LocSvSystemEnumType gnssSystemTimeSrc;
+    /** Reporting of GPS system time is recommended.
+      If GPS time is unknown & other satellite system time is known,
+      it should be reported.
+      Mandatory field
+     */
+    SystemTimeStructUnion u;
+} GnssSystemTime;
+
+typedef struct {
+    size_t size;                        // set to sizeof(GnssLocationInfo)
+    GnssLocationInfoFlagMask flags;     // bitwise OR of GnssLocationInfoBits for param validity
+    float altitudeMeanSeaLevel;         // altitude wrt mean sea level
+    float pdop;                         // position dilusion of precision
+    float hdop;                         // horizontal dilusion of precision
+    float vdop;                         // vertical dilusion of precision
+    float gdop;                         // geometric  dilution of precision
+    float tdop;                         // time dilution of precision
+    float magneticDeviation;            // magnetic deviation
+    LocationReliability horReliability; // horizontal reliability
+    LocationReliability verReliability; // vertical reliability
+    float horUncEllipseSemiMajor;       // horizontal elliptical accuracy semi-major axis
+    float horUncEllipseSemiMinor;       // horizontal elliptical accuracy semi-minor axis
+    float horUncEllipseOrientAzimuth;   // horizontal elliptical accuracy azimuth
+    float northVelocity;                // North Velocity.Unit: Meters/sec
+    float eastVelocity;                 // East Velocity
+    float upVelocity;
+    float northVelocityStdDeviation;
+    float eastVelocityStdDeviation;
+    float upVelocityStdDeviation;
+    GnssLocationSvUsedInPosition svUsedInPosition;// Gnss sv used in position data
+    GnssLocationNavSolutionMask navSolutionMask;  // Nav solution mask to indicate sbas corrections
+    GnssLocationPosTechMask posTechMask;          // Position technology used in computing this fix
+    GnssLocationPositionDynamics bodyFrameData;   // Body Frame Dynamics: 4wayAcceleration and
+                                                  // pitch set with validity
+    GnssSystemTime gnssSystemTime;            // GNSS System Time
+    Location location;
+} GnssLocationInfoNotification;
+
+typedef struct {
+    size_t size;                           // set to sizeof(GnssNiNotification)
+    GnssNiType type;                       // type of NI (Voice, SUPL, Control Plane)
+    GnssNiOptionsMask options;             // bitwise OR of GnssNiOptionsBits
+    uint32_t timeout;                      // time (seconds) to wait for user input
+    GnssNiResponse timeoutResponse;        // the response that should be sent when timeout expires
+    char requestor[GNSS_NI_REQUESTOR_MAX]; // the requestor that is making the request
+    GnssNiEncodingType requestorEncoding;  // the encoding type for requestor
+    char message[GNSS_NI_MESSAGE_ID_MAX];  // the message to show user
+    GnssNiEncodingType messageEncoding;    // the encoding type for message
+    char extras[GNSS_NI_MESSAGE_ID_MAX];
+} GnssNiNotification;
+
+typedef struct {
+    size_t size;       // set to sizeof(GnssSv)
+    uint16_t svId;     // Unique Identifier
+    GnssSvType type;   // type of SV (GPS, SBAS, GLONASS, QZSS, BEIDOU, GALILEO)
+    float cN0Dbhz;     // signal strength
+    float elevation;   // elevation of SV (in degrees)
+    float azimuth;     // azimuth of SV (in degrees)
+    GnssSvOptionsMask gnssSvOptionsMask; // Bitwise OR of GnssSvOptionsBits
+    float carrierFrequencyHz; // carrier frequency of the signal tracked
+} GnssSv;
+
+struct GnssConfigSetAssistanceServer {
+    size_t size;             // set to sizeof(GnssConfigSetAssistanceServer)
+    GnssAssistanceType type; // SUPL or C2K
+    const char* hostName;    // null terminated string
+    uint32_t port;           // port of server
+
+    inline bool equals(const GnssConfigSetAssistanceServer& config) {
+        if (config.type == type && config.port == port &&
+               ((NULL == config.hostName && NULL == hostName) ||
+                (NULL != config.hostName && NULL != hostName &&
+                     0 == strcmp(config.hostName, hostName)))) {
+            return true;
+        }
+        return false;
+    }
+};
+
+typedef struct {
+    size_t size;                               // set to sizeof(GnssMeasurementsData)
+    GnssMeasurementsDataFlagsMask flags;       // bitwise OR of GnssMeasurementsDataFlagsBits
+    int16_t svId;
+    GnssSvType svType;
+    double timeOffsetNs;
+    GnssMeasurementsStateMask stateMask;       // bitwise OR of GnssMeasurementsStateBits
+    int64_t receivedSvTimeNs;
+    int64_t receivedSvTimeUncertaintyNs;
+    double carrierToNoiseDbHz;
+    double pseudorangeRateMps;
+    double pseudorangeRateUncertaintyMps;
+    GnssMeasurementsAdrStateMask adrStateMask; // bitwise OR of GnssMeasurementsAdrStateBits
+    double adrMeters;
+    double adrUncertaintyMeters;
+    float carrierFrequencyHz;
+    int64_t carrierCycles;
+    double carrierPhase;
+    double carrierPhaseUncertainty;
+    GnssMeasurementsMultipathIndicator multipathIndicator;
+    double signalToNoiseRatioDb;
+    double agcLevelDb;
+} GnssMeasurementsData;
+
+typedef struct {
+    size_t size;                          // set to sizeof(GnssMeasurementsClock)
+    GnssMeasurementsClockFlagsMask flags; // bitwise OR of GnssMeasurementsClockFlagsBits
+    int16_t leapSecond;
+    int64_t timeNs;
+    double timeUncertaintyNs;
+    int64_t fullBiasNs;
+    double biasNs;
+    double biasUncertaintyNs;
+    double driftNsps;
+    double driftUncertaintyNsps;
+    uint32_t hwClockDiscontinuityCount;
+} GnssMeasurementsClock;
+
+typedef struct {
+    size_t size;                 // set to sizeof(GnssSvNotification)
+    size_t count;                // number of SVs in the GnssSv array
+    GnssSv gnssSvs[GNSS_SV_MAX]; // information on a number of SVs
+} GnssSvNotification;
+
+typedef struct {
+    size_t size;         // set to sizeof(GnssNmeaNotification)
+    uint64_t timestamp;  // timestamp
+    const char* nmea;    // nmea text
+    size_t length;       // length of the nmea text
+} GnssNmeaNotification;
+
+typedef struct {
+    size_t size;         // set to sizeof(GnssMeasurementsNotification)
+    size_t count;        // number of items in GnssMeasurements array
+    GnssMeasurementsData measurements[GNSS_MEASUREMENTS_MAX];
+    GnssMeasurementsClock clock; // clock
+} GnssMeasurementsNotification;
+
+typedef uint32_t GnssSvId;
+
+struct GnssSvIdSource{
+    size_t size;                 // set to sizeof(GnssSvIdSource)
+    GnssSvType constellation;    // constellation for the sv to blacklist
+    GnssSvId svId;           // sv id to blacklist
+};
+inline bool operator ==(GnssSvIdSource const& left, GnssSvIdSource const& right) {
+    return left.size == right.size &&
+            left.constellation == right.constellation && left.svId == right.svId;
+}
+
+#define GNSS_SV_CONFIG_ALL_BITS_ENABLED_MASK ((uint64_t)0xFFFFFFFFFFFFFFFF)
+typedef struct {
+    size_t size; // set to sizeof(GnssSvIdConfig)
+
+    // GLONASS - SV 65 maps to bit 0
+#define GNSS_SV_CONFIG_GLO_INITIAL_SV_ID 65
+#define GNSS_SV_CONFIG_GLO_LAST_SV_ID 88
+    uint64_t gloBlacklistSvMask;
+
+    // BEIDOU - SV 201 maps to bit 0
+#define GNSS_SV_CONFIG_BDS_INITIAL_SV_ID 201
+#define GNSS_SV_CONFIG_BDS_LAST_SV_ID 237
+    uint64_t bdsBlacklistSvMask;
+
+    // QZSS - SV 193 maps to bit 0
+#define GNSS_SV_CONFIG_QZSS_INITIAL_SV_ID 193
+#define GNSS_SV_CONFIG_QZSS_LAST_SV_ID 200
+    uint64_t qzssBlacklistSvMask;
+
+    // GAL - SV 301 maps to bit 0
+#define GNSS_SV_CONFIG_GAL_INITIAL_SV_ID 301
+#define GNSS_SV_CONFIG_GAL_LAST_SV_ID 336
+    uint64_t galBlacklistSvMask;
+} GnssSvIdConfig;
+
+struct GnssConfig{
+    size_t size;  // set to sizeof(GnssConfig)
+    GnssConfigFlagsMask flags; // bitwise OR of GnssConfigFlagsBits to mark which params are valid
+    GnssConfigGpsLock gpsLock;
+    GnssConfigSuplVersion suplVersion;
+    GnssConfigSetAssistanceServer assistanceServer;
+    GnssConfigLppProfile lppProfile;
+    GnssConfigLppeControlPlaneMask lppeControlPlaneMask;
+    GnssConfigLppeUserPlaneMask lppeUserPlaneMask;
+    GnssConfigAGlonassPositionProtocolMask aGlonassPositionProtocolMask;
+    GnssConfigEmergencyPdnForEmergencySupl emergencyPdnForEmergencySupl;
+    GnssConfigSuplEmergencyServices suplEmergencyServices;
+    GnssConfigSuplModeMask suplModeMask; //bitwise OR of GnssConfigSuplModeBits
+    std::vector<GnssSvIdSource> blacklistedSvIds;
+
+    inline bool equals(const GnssConfig& config) {
+        if (flags == config.flags &&
+                gpsLock == config.gpsLock &&
+                suplVersion == config.suplVersion &&
+                assistanceServer.equals(config.assistanceServer) &&
+                lppProfile == config.lppProfile &&
+                lppeControlPlaneMask == config.lppeControlPlaneMask &&
+                lppeUserPlaneMask == config.lppeUserPlaneMask &&
+                aGlonassPositionProtocolMask == config.aGlonassPositionProtocolMask &&
+                emergencyPdnForEmergencySupl == config.emergencyPdnForEmergencySupl &&
+                suplEmergencyServices == config.suplEmergencyServices &&
+                suplModeMask == config.suplModeMask  &&
+                blacklistedSvIds == config.blacklistedSvIds) {
+            return true;
+        }
+        return false;
+    }
+};
+
+typedef struct {
+    size_t size;                        // set to sizeof
+    bool                                mValid;
+    Location                            mLocation;
+    double                              verticalAccuracyMeters;
+    double                              speedAccuracyMetersPerSecond;
+    double                              bearingAccuracyDegrees;
+    timespec                            mUtcReported;
+} GnssDebugLocation;
+
+typedef struct {
+    size_t size;                        // set to sizeof
+    bool                                mValid;
+    int64_t                             timeEstimate;
+    float                               timeUncertaintyNs;
+    float                               frequencyUncertaintyNsPerSec;
+} GnssDebugTime;
+
+typedef struct {
+    size_t size;                        // set to sizeof
+    uint32_t                            svid;
+    GnssSvType                          constellation;
+    GnssEphemerisType                   mEphemerisType;
+    GnssEphemerisSource                 mEphemerisSource;
+    GnssEphemerisHealth                 mEphemerisHealth;
+    float                               ephemerisAgeSeconds;
+    bool                                serverPredictionIsAvailable;
+    float                               serverPredictionAgeSeconds;
+} GnssDebugSatelliteInfo;
+
+typedef struct {
+    size_t size;                        // set to sizeof
+    GnssDebugLocation                   mLocation;
+    GnssDebugTime                       mTime;
+    std::vector<GnssDebugSatelliteInfo> mSatelliteInfo;
+} GnssDebugReport;
+
+/* Provides the capabilities of the system
+   capabilities callback is called once soon after createInstance is called */
+typedef std::function<void(
+    LocationCapabilitiesMask capabilitiesMask // bitwise OR of LocationCapabilitiesBits
+)> capabilitiesCallback;
+
+/* Used by tracking, batching, and miscellanous APIs
+   responseCallback is called for every Tracking, Batching API, and Miscellanous API */
+typedef std::function<void(
+    LocationError err, // if not SUCCESS, then id is not valid
+    uint32_t id        // id to be associated to the request
+)> responseCallback;
+
+/* Used by APIs that gets more than one LocationError in it's response
+   collectiveResponseCallback is called for every geofence API call.
+   ids array and LocationError array are only valid until collectiveResponseCallback returns. */
+typedef std::function<void(
+    size_t count, // number of locations in arrays
+    LocationError* errs, // array of LocationError associated to the request
+    uint32_t* ids // array of ids to be associated to the request
+)> collectiveResponseCallback;
+
+/* Used for startTracking API, optional can be NULL
+   trackingCallback is called when delivering a location in a tracking session
+   broadcasted to all clients, no matter if a session has started by client */
+typedef std::function<void(
+    Location location
+)> trackingCallback;
+
+/* Used for startBatching API, optional can be NULL
+   batchingCallback is called when delivering locations in a batching session.
+   broadcasted to all clients, no matter if a session has started by client */
+typedef std::function<void(
+    size_t count,      // number of locations in array
+    Location* location, // array of locations
+    BatchingOptions batchingOptions // Batching options
+)> batchingCallback;
+
+typedef std::function<void(
+    BatchingStatusInfo batchingStatus, // batch status
+    std::list<uint32_t> & listOfCompletedTrips
+)> batchingStatusCallback;
+
+/* Gives GNSS Location information, optional can be NULL
+    gnssLocationInfoCallback is called only during a tracking session
+    broadcasted to all clients, no matter if a session has started by client */
+typedef std::function<void(
+    GnssLocationInfoNotification gnssLocationInfoNotification
+)> gnssLocationInfoCallback;
+
+/* Used for addGeofences API, optional can be NULL
+   geofenceBreachCallback is called when any number of geofences have a state change */
+typedef std::function<void(
+    GeofenceBreachNotification geofenceBreachNotification
+)> geofenceBreachCallback;
+
+/* Used for addGeofences API, optional can be NULL
+       geofenceStatusCallback is called when any number of geofences have a status change */
+typedef std::function<void(
+    GeofenceStatusNotification geofenceStatusNotification
+)> geofenceStatusCallback;
+
+/* Network Initiated request, optional can be NULL
+   This callback should be responded to by calling gnssNiResponse */
+typedef std::function<void(
+    uint32_t id, // id that should be used to respond by calling gnssNiResponse
+    GnssNiNotification gnssNiNotification
+)> gnssNiCallback;
+
+/* Gives GNSS SV information, optional can be NULL
+    gnssSvCallback is called only during a tracking session
+    broadcasted to all clients, no matter if a session has started by client */
+typedef std::function<void(
+    GnssSvNotification gnssSvNotification
+)> gnssSvCallback;
+
+/* Gives GNSS NMEA data, optional can be NULL
+    gnssNmeaCallback is called only during a tracking session
+    broadcasted to all clients, no matter if a session has started by client */
+typedef std::function<void(
+    GnssNmeaNotification gnssNmeaNotification
+)> gnssNmeaCallback;
+
+/* Gives GNSS Measurements information, optional can be NULL
+    gnssMeasurementsCallback is called only during a tracking session
+    broadcasted to all clients, no matter if a session has started by client */
+typedef std::function<void(
+    GnssMeasurementsNotification gnssMeasurementsNotification
+)> gnssMeasurementsCallback;
+
+/* Provides the current GNSS configuration to the client */
+typedef std::function<void(
+    GnssConfig& config
+)> gnssConfigCallback;
+
+typedef struct {
+    size_t size; // set to sizeof(LocationCallbacks)
+    capabilitiesCallback capabilitiesCb;             // mandatory
+    responseCallback responseCb;                     // mandatory
+    collectiveResponseCallback collectiveResponseCb; // mandatory
+    trackingCallback trackingCb;                     // optional
+    batchingCallback batchingCb;                     // optional
+    geofenceBreachCallback geofenceBreachCb;         // optional
+    geofenceStatusCallback geofenceStatusCb;         // optional
+    gnssLocationInfoCallback gnssLocationInfoCb;     // optional
+    gnssNiCallback gnssNiCb;                         // optional
+    gnssSvCallback gnssSvCb;                         // optional
+    gnssNmeaCallback gnssNmeaCb;                     // optional
+    gnssMeasurementsCallback gnssMeasurementsCb;     // optional
+    batchingStatusCallback batchingStatusCb;         // optional
+} LocationCallbacks;
+
+#endif /* LOCATIONDATATYPES_H */
diff --git a/sdm845/location/Makefile.am b/sdm845/location/Makefile.am
index 3688cc8..fccdf94 100644
--- a/sdm845/location/Makefile.am
+++ b/sdm845/location/Makefile.am
@@ -26,7 +26,9 @@
 library_include_HEADERS = \
     LocationAPI.h \
     LocationAPIClientBase.h \
-    location_interface.h
+    location_interface.h \
+    LocationDataTypes.h \
+    ILocationAPI.h
 
 #Create and Install libraries
 lib_LTLIBRARIES = liblocation_api.la
diff --git a/sdm845/utils/gps_extended_c.h b/sdm845/utils/gps_extended_c.h
index 01f469d..66ca61b 100644
--- a/sdm845/utils/gps_extended_c.h
+++ b/sdm845/utils/gps_extended_c.h
@@ -133,13 +133,6 @@
     /* Provider indicator for HYBRID or GPS */
     uint16_t        position_source;
     LocPosTechMask  tech_mask;
-    /*allows HAL to pass additional information related to the location */
-    int             rawDataSize;         /* in # of bytes */
-    void            * rawData;
-    bool            is_indoor;
-    float           floor_number;
-    char            map_url[GPS_LOCATION_MAP_URL_SIZE];
-    unsigned char   map_index[GPS_LOCATION_MAP_INDEX_SIZE];
 } UlpLocation;
 
 typedef struct {
@@ -746,25 +739,6 @@
 #define ULP_GNSS_SV_POLY_BIT_VELO_COEFF             (1<<ULP_GNSS_SV_POLY_VELO_COEFF)
 #define ULP_GNSS_SV_POLY_BIT_ENHANCED_IOD           (1<<ULP_GNSS_SV_POLY_ENHANCED_IOD)
 
-
-typedef enum
-{
-    GNSS_LOC_SV_SYSTEM_GPS                    = 1,
-    /**< GPS satellite. */
-    GNSS_LOC_SV_SYSTEM_GALILEO                = 2,
-    /**< GALILEO satellite. */
-    GNSS_LOC_SV_SYSTEM_SBAS                   = 3,
-    /**< SBAS satellite. */
-    GNSS_LOC_SV_SYSTEM_COMPASS                = 4,
-    /**< COMPASS satellite. */
-    GNSS_LOC_SV_SYSTEM_GLONASS                = 5,
-    /**< GLONASS satellite. */
-    GNSS_LOC_SV_SYSTEM_BDS                    = 6,
-    /**< BDS satellite. */
-    GNSS_LOC_SV_SYSTEM_QZSS                   = 7
-    /**< QZSS satellite. */
-} Gnss_LocSvSystemEnumType;
-
 typedef enum
 {
     GNSS_LOC_FREQ_SOURCE_INVALID = 0,
diff --git a/sdm845/utils/loc_cfg.cpp b/sdm845/utils/loc_cfg.cpp
index 8037979..ad7aba2 100644
--- a/sdm845/utils/loc_cfg.cpp
+++ b/sdm845/utils/loc_cfg.cpp
@@ -454,7 +454,6 @@
     unsigned int loc_feature_mask;
     char platform_list[LOC_MAX_PARAM_STRING];
     char baseband[LOC_MAX_PARAM_STRING];
-    char lean_targets[LOC_MAX_PARAM_STRING];
     unsigned int sglte_target;
     char feature_gtp_cell_proc[LOC_MAX_PARAM_STRING];
     char feature_gtp_waa[LOC_MAX_PARAM_STRING];
@@ -499,7 +498,6 @@
     {"IZAT_FEATURE_MASK",   &conf.loc_feature_mask,    NULL, 'n'},
     {"PLATFORMS",           &conf.platform_list,       NULL, 's'},
     {"BASEBAND",            &conf.baseband,            NULL, 's'},
-    {"LEAN_TARGETS",        &conf.lean_targets,        NULL, 's'},
     {"HARDWARE_TYPE",       &conf.auto_platform,       NULL, 's'},
 };
 
@@ -541,7 +539,6 @@
     FILE* conf_fp = nullptr;
     char platform_name[PROPERTY_VALUE_MAX], baseband_name[PROPERTY_VALUE_MAX];
     char autoplatform_name[PROPERTY_VALUE_MAX];
-    int lean_target=0;
     unsigned int loc_service_mask=0;
     char config_mask = 0;
     unsigned char proc_list_length=0;
@@ -573,8 +570,6 @@
     loc_get_platform_name(platform_name, sizeof(platform_name));
     //Get baseband name from ro.baseband property
     loc_get_target_baseband(baseband_name, sizeof(baseband_name));
-    lean_target = loc_identify_lean_target();
-    LOC_LOGD("%s:%d]: lean target:%d", __func__, __LINE__, lean_target);
     //Identify if this is an automotive platform
     loc_get_auto_platform_name(autoplatform_name,sizeof(autoplatform_name));
 
@@ -915,13 +910,6 @@
             }
         }
 
-        nstrings = loc_util_split_string(conf.lean_targets, split_strings, MAX_NUM_STRINGS, ' ');
-        if(!strcmp("DISABLED", split_strings[0]) && lean_target) {
-            LOC_LOGD("%s:%d]: Disabled for lean targets\n", __func__, __LINE__);
-            child_proc[j].proc_status = DISABLED;
-            continue;
-        }
-
         if((config_mask & CONFIG_MASK_TARGET_CHECK) &&
            (config_mask & CONFIG_MASK_BASEBAND_CHECK) &&
            (config_mask & CONFIG_MASK_AUTOPLATFORM_CHECK) &&
diff --git a/sdm845/utils/loc_target.cpp b/sdm845/utils/loc_target.cpp
index 0855528..569f3a7 100644
--- a/sdm845/utils/loc_target.cpp
+++ b/sdm845/utils/loc_target.cpp
@@ -206,16 +206,3 @@
     LOC_LOGW("HAL: %s returned %d", __FUNCTION__, gTarget);
     return gTarget;
 }
-
-/*Reads the property ro.lean to identify if this is a lean target
-  Returns:
-  0 if not a lean and mean target
-  1 if this is a lean and mean target
-*/
-int loc_identify_lean_target()
-{
-    char lean_target[PROPERTY_VALUE_MAX];
-    property_get("ro.lean", lean_target, "");
-    LOC_LOGD("%s:%d]: lean target: %s\n", __func__, __LINE__, lean_target);
-    return !(strncmp(lean_target, "true", PROPERTY_VALUE_MAX));
-}
diff --git a/sdm845/utils/loc_target.h b/sdm845/utils/loc_target.h
index 47a67d9..172b475 100644
--- a/sdm845/utils/loc_target.h
+++ b/sdm845/utils/loc_target.h
@@ -55,12 +55,6 @@
   of atleast PROPERTY_VALUE_MAX*/
 void loc_get_auto_platform_name(char *platform_name, int array_length);
 
-/*Reads the property ro.lean to identify if this is a lean target
-  Returns:
-  0 if not a lean and mean target
-  1 if this is a lean and mean target*/
-int loc_identify_lean_target();
-
 /* Please remember to update 'target_name' in loc_log.cpp,
    if do any changes to this enum. */
 typedef enum {
