diff --git a/gps/Android.mk b/gps/Android.mk
new file mode 100644
index 0000000..f530764
--- /dev/null
+++ b/gps/Android.mk
@@ -0,0 +1,21 @@
+#
+# Copyright (C) 2015 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+ifeq ($(TARGET_DEVICE),fortuna)
+include $(call all-subdir-makefiles,$(LOCAL_PATH))
+endif
diff --git a/gps/core/Android.mk b/gps/core/Android.mk
new file mode 100644
index 0000000..3a23c1e
--- /dev/null
+++ b/gps/core/Android.mk
@@ -0,0 +1,55 @@
+ifneq ($(BUILD_TINY_ANDROID),true)
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libloc_core
+LOCAL_MODULE_OWNER := qcom
+
+LOCAL_MODULE_TAGS := optional
+
+ifeq ($(TARGET_DEVICE),apq8026_lw)
+LOCAL_CFLAGS += -DPDK_FEATURE_SET
+endif
+
+LOCAL_SHARED_LIBRARIES := \
+    libutils \
+    libcutils \
+    libgps.utils \
+    libdl
+
+LOCAL_SRC_FILES += \
+    MsgTask.cpp \
+    LocApiBase.cpp \
+    LocAdapterBase.cpp \
+    ContextBase.cpp \
+    LocDualContext.cpp \
+    loc_core_log.cpp
+
+LOCAL_CFLAGS += \
+     -fno-short-enums \
+     -D_ANDROID_
+
+LOCAL_C_INCLUDES:= \
+    $(TARGET_OUT_HEADERS)/gps.utils
+
+LOCAL_COPY_HEADERS_TO:= libloc_core/
+LOCAL_COPY_HEADERS:= \
+    MsgTask.h \
+    LocApiBase.h \
+    LocAdapterBase.h \
+    ContextBase.h \
+    LocDualContext.h \
+    LBSProxyBase.h \
+    UlpProxyBase.h \
+    gps_extended_c.h \
+    gps_extended.h \
+    loc_core_log.h \
+    LocAdapterProxyBase.h
+
+LOCAL_PRELINK_MODULE := false
+
+include $(BUILD_SHARED_LIBRARY)
+
+endif # not BUILD_TINY_ANDROID
diff --git a/gps/core/ContextBase.cpp b/gps/core/ContextBase.cpp
new file mode 100644
index 0000000..9f6c4aa
--- /dev/null
+++ b/gps/core/ContextBase.cpp
@@ -0,0 +1,114 @@
+/* Copyright (c) 2011-2014, 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.
+ *
+ */
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_CtxBase"
+
+#include <dlfcn.h>
+#include <cutils/sched_policy.h>
+#include <unistd.h>
+#include <ContextBase.h>
+#include <msg_q.h>
+#include <loc_target.h>
+#include <log_util.h>
+#include <loc_log.h>
+
+namespace loc_core {
+
+LBSProxyBase* ContextBase::getLBSProxy(const char* libName)
+{
+    LBSProxyBase* proxy = NULL;
+    LOC_LOGD("%s:%d]: getLBSProxy libname: %s\n", __func__, __LINE__, libName);
+    void* lib = dlopen(libName, RTLD_NOW);
+
+    if ((void*)NULL != lib) {
+        getLBSProxy_t* getter = (getLBSProxy_t*)dlsym(lib, "getLBSProxy");
+        if (NULL != getter) {
+            proxy = (*getter)();
+        }
+    }
+    if (NULL == proxy) {
+        proxy = new LBSProxyBase();
+    }
+    LOC_LOGD("%s:%d]: Exiting\n", __func__, __LINE__);
+    return proxy;
+}
+
+LocApiBase* ContextBase::createLocApi(LOC_API_ADAPTER_EVENT_MASK_T exMask)
+{
+    LocApiBase* locApi = NULL;
+
+    // first if can not be MPQ
+    if (TARGET_MPQ != loc_get_target()) {
+        if (NULL == (locApi = mLBSProxy->getLocApi(mMsgTask, exMask, this))) {
+            void *handle = NULL;
+            //try to see if LocApiV02 is present
+            if((handle = dlopen("libloc_api_v02.so", RTLD_NOW)) != NULL) {
+                LOC_LOGD("%s:%d]: libloc_api_v02.so is present", __func__, __LINE__);
+                getLocApi_t* getter = (getLocApi_t*)dlsym(handle, "getLocApi");
+                if(getter != NULL) {
+                    LOC_LOGD("%s:%d]: getter is not NULL for LocApiV02", __func__, __LINE__);
+                    locApi = (*getter)(mMsgTask, exMask, this);
+                }
+            }
+            // only RPC is the option now
+            else {
+                LOC_LOGD("%s:%d]: libloc_api_v02.so is NOT present. Trying RPC",
+                         __func__, __LINE__);
+                handle = dlopen("libloc_api-rpc-qc.so", RTLD_NOW);
+                if (NULL != handle) {
+                    getLocApi_t* getter = (getLocApi_t*)dlsym(handle, "getLocApi");
+                    if (NULL != getter) {
+                        LOC_LOGD("%s:%d]: getter is not NULL in RPC", __func__, __LINE__);
+                        locApi = (*getter)(mMsgTask, exMask, this);
+                    }
+                }
+            }
+        }
+    }
+
+    // locApi could still be NULL at this time
+    // we would then create a dummy one
+    if (NULL == locApi) {
+        locApi = new LocApiBase(mMsgTask, exMask, this);
+    }
+
+    return locApi;
+}
+
+ContextBase::ContextBase(const MsgTask* msgTask,
+                         LOC_API_ADAPTER_EVENT_MASK_T exMask,
+                         const char* libName) :
+    mLBSProxy(getLBSProxy(libName)),
+    mMsgTask(msgTask),
+    mLocApi(createLocApi(exMask)),
+    mLocApiProxy(mLocApi->getLocApiProxy())
+{
+}
+
+}
diff --git a/gps/core/ContextBase.h b/gps/core/ContextBase.h
new file mode 100644
index 0000000..2adbedd
--- /dev/null
+++ b/gps/core/ContextBase.h
@@ -0,0 +1,70 @@
+/* Copyright (c) 2011-2014, 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 __LOC_CONTEXT_BASE__
+#define __LOC_CONTEXT_BASE__
+
+#include <stdbool.h>
+#include <ctype.h>
+#include <MsgTask.h>
+#include <LocApiBase.h>
+#include <LBSProxyBase.h>
+
+namespace loc_core {
+
+class LocAdapterBase;
+
+class ContextBase {
+    static LBSProxyBase* getLBSProxy(const char* libName);
+    LocApiBase* createLocApi(LOC_API_ADAPTER_EVENT_MASK_T excludedMask);
+protected:
+    const LBSProxyBase* mLBSProxy;
+    const MsgTask* mMsgTask;
+    LocApiBase* mLocApi;
+    LocApiProxyBase *mLocApiProxy;
+public:
+    ContextBase(const MsgTask* msgTask,
+                LOC_API_ADAPTER_EVENT_MASK_T exMask,
+                const char* libName);
+    inline virtual ~ContextBase() { delete mLocApi; delete mLBSProxy; }
+
+    inline const MsgTask* getMsgTask() { return mMsgTask; }
+    inline LocApiBase* getLocApi() { return mLocApi; }
+    inline LocApiProxyBase* getLocApiProxy() { return mLocApiProxy; }
+    inline bool hasAgpsExtendedCapabilities() { return mLBSProxy->hasAgpsExtendedCapabilities(); }
+    inline bool hasCPIExtendedCapabilities() { return mLBSProxy->hasCPIExtendedCapabilities(); }
+    inline void requestUlp(LocAdapterBase* adapter,
+                           unsigned long capabilities) {
+        mLBSProxy->requestUlp(adapter, capabilities);
+    }
+    inline void sendMsg(const LocMsg *msg) { getMsgTask()->sendMsg(msg); }
+};
+
+} // namespace loc_core
+
+#endif //__LOC_CONTEXT_BASE__
diff --git a/gps/core/LBSProxyBase.h b/gps/core/LBSProxyBase.h
new file mode 100644
index 0000000..0b7dbdf
--- /dev/null
+++ b/gps/core/LBSProxyBase.h
@@ -0,0 +1,63 @@
+/* Copyright (c) 2013-2014, 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 IZAT_PROXY_BASE_H
+#define IZAT_PROXY_BASE_H
+#include <gps_extended.h>
+#include <MsgTask.h>
+
+namespace loc_core {
+
+class LocApiBase;
+class LocAdapterBase;
+class ContextBase;
+
+class LBSProxyBase {
+    friend class ContextBase;
+    inline virtual LocApiBase*
+        getLocApi(const MsgTask* msgTask,
+                  LOC_API_ADAPTER_EVENT_MASK_T exMask,
+                  ContextBase* context) const {
+        return NULL;
+    }
+protected:
+    inline LBSProxyBase() {}
+public:
+    inline virtual ~LBSProxyBase() {}
+    inline virtual void requestUlp(LocAdapterBase* adapter,
+                                   unsigned long capabilities) const {}
+    inline virtual bool hasAgpsExtendedCapabilities() const { return false; }
+    inline virtual bool hasCPIExtendedCapabilities() const { return false; }
+    virtual void injectFeatureConfig(ContextBase* context) const {}
+};
+
+typedef LBSProxyBase* (getLBSProxy_t)();
+
+} // namespace loc_core
+
+#endif // IZAT_PROXY_BASE_H
diff --git a/gps/core/LocAdapterBase.cpp b/gps/core/LocAdapterBase.cpp
new file mode 100644
index 0000000..b304653
--- /dev/null
+++ b/gps/core/LocAdapterBase.cpp
@@ -0,0 +1,145 @@
+/* Copyright (c) 2011-2014, 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.
+ *
+ */
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_LocAdapterBase"
+
+#include <dlfcn.h>
+#include <LocAdapterBase.h>
+#include <loc_target.h>
+#include <log_util.h>
+#include <LocAdapterProxyBase.h>
+
+namespace loc_core {
+
+// This is the top level class, so the constructor will
+// always gets called. Here we prepare for the default.
+// But if getLocApi(targetEnumType target) is overriden,
+// the right locApi should get created.
+LocAdapterBase::LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
+                               ContextBase* context, LocAdapterProxyBase *adapterProxyBase) :
+    mEvtMask(mask), mContext(context),
+    mLocApi(context->getLocApi()), mLocAdapterProxyBase(adapterProxyBase),
+    mMsgTask(context->getMsgTask())
+{
+    mLocApi->addAdapter(this);
+}
+
+void LocAdapterBase::handleEngineUpEvent()
+{
+    if (mLocAdapterProxyBase) {
+        mLocAdapterProxyBase->handleEngineUpEvent();
+    }
+}
+
+void LocAdapterBase::handleEngineDownEvent()
+{
+    if (mLocAdapterProxyBase) {
+        mLocAdapterProxyBase->handleEngineDownEvent();
+    }
+}
+
+void LocAdapterBase::
+    reportPosition(UlpLocation &location,
+                   GpsLocationExtended &locationExtended,
+                   void* locationExt,
+                   enum loc_sess_status status,
+                   LocPosTechMask loc_technology_mask) {
+    if (mLocAdapterProxyBase == NULL ||
+        !mLocAdapterProxyBase->reportPosition(location,
+                                              status,
+                                              loc_technology_mask)) {
+        DEFAULT_IMPL()
+    }
+}
+
+void LocAdapterBase::
+    reportSv(GpsSvStatus &svStatus,
+             GpsLocationExtended &locationExtended,
+             void* svExt)
+DEFAULT_IMPL()
+
+
+void LocAdapterBase::
+    reportStatus(GpsStatusValue status)
+DEFAULT_IMPL()
+
+
+void LocAdapterBase::
+    reportNmea(const char* nmea, int length)
+DEFAULT_IMPL()
+
+bool LocAdapterBase::
+    reportXtraServer(const char* url1, const char* url2,
+                     const char* url3, const int maxlength)
+DEFAULT_IMPL(false)
+
+bool LocAdapterBase::
+    requestXtraData()
+DEFAULT_IMPL(false)
+
+bool LocAdapterBase::
+    requestTime()
+DEFAULT_IMPL(false)
+
+bool LocAdapterBase::
+    requestLocation()
+DEFAULT_IMPL(false)
+
+bool LocAdapterBase::
+    requestATL(int connHandle, AGpsType agps_type)
+DEFAULT_IMPL(false)
+
+bool LocAdapterBase::
+    releaseATL(int connHandle)
+DEFAULT_IMPL(false)
+
+bool LocAdapterBase::
+    requestSuplES(int connHandle)
+DEFAULT_IMPL(false)
+
+bool LocAdapterBase::
+    reportDataCallOpened()
+DEFAULT_IMPL(false)
+
+bool LocAdapterBase::
+    reportDataCallClosed()
+DEFAULT_IMPL(false)
+
+bool LocAdapterBase::
+    requestNiNotify(GpsNiNotification &notify, const void* data)
+DEFAULT_IMPL(false)
+
+void LocAdapterBase::
+    shutdown()
+DEFAULT_IMPL()
+
+void LocAdapterBase::
+    reportGpsMeasurementData(GpsData &gpsMeasurementData)
+DEFAULT_IMPL()
+} // namespace loc_core
diff --git a/gps/core/LocAdapterBase.h b/gps/core/LocAdapterBase.h
new file mode 100644
index 0000000..9d5f6a8
--- /dev/null
+++ b/gps/core/LocAdapterBase.h
@@ -0,0 +1,120 @@
+/* Copyright (c) 2011-2014, 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 LOC_API_ADAPTER_BASE_H
+#define LOC_API_ADAPTER_BASE_H
+
+#include <gps_extended.h>
+#include <UlpProxyBase.h>
+#include <ContextBase.h>
+
+namespace loc_core {
+
+class LocAdapterProxyBase;
+
+class LocAdapterBase {
+protected:
+    LOC_API_ADAPTER_EVENT_MASK_T mEvtMask;
+    ContextBase* mContext;
+    LocApiBase* mLocApi;
+    LocAdapterProxyBase* mLocAdapterProxyBase;
+    const MsgTask* mMsgTask;
+
+    inline LocAdapterBase(const MsgTask* msgTask) :
+        mEvtMask(0), mContext(NULL), mLocApi(NULL),
+        mLocAdapterProxyBase(NULL), mMsgTask(msgTask) {}
+public:
+    inline virtual ~LocAdapterBase() { mLocApi->removeAdapter(this); }
+    LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
+                   ContextBase* context, LocAdapterProxyBase *adapterProxyBase = NULL);
+    inline LOC_API_ADAPTER_EVENT_MASK_T
+        checkMask(LOC_API_ADAPTER_EVENT_MASK_T mask) const {
+        return mEvtMask & mask;
+    }
+
+    inline LOC_API_ADAPTER_EVENT_MASK_T getEvtMask() const {
+        return mEvtMask;
+    }
+
+    inline void sendMsg(const LocMsg* msg) const {
+        mMsgTask->sendMsg(msg);
+    }
+
+    inline void sendMsg(const LocMsg* msg) {
+        mMsgTask->sendMsg(msg);
+    }
+
+    inline void updateEvtMask(LOC_API_ADAPTER_EVENT_MASK_T event,
+                       loc_registration_mask_status isEnabled)
+    {
+        mEvtMask =
+            isEnabled == LOC_REGISTRATION_MASK_ENABLED ? (mEvtMask|event):(mEvtMask&~event);
+
+        mLocApi->updateEvtMask();
+    }
+
+    // This will be overridden by the individual adapters
+    // if necessary.
+    inline virtual void setUlpProxy(UlpProxyBase* ulp) {}
+    virtual void handleEngineUpEvent();
+    virtual void handleEngineDownEvent();
+    inline virtual void setPositionModeInt(LocPosMode& posMode) {}
+    virtual void startFixInt() {}
+    virtual void stopFixInt() {}
+    virtual void getZppInt() {}
+    virtual void reportPosition(UlpLocation &location,
+                                GpsLocationExtended &locationExtended,
+                                void* locationExt,
+                                enum loc_sess_status status,
+                                LocPosTechMask loc_technology_mask);
+    virtual void reportSv(GpsSvStatus &svStatus,
+                          GpsLocationExtended &locationExtended,
+                          void* svExt);
+    virtual void reportStatus(GpsStatusValue status);
+    virtual void reportNmea(const char* nmea, int length);
+    virtual bool reportXtraServer(const char* url1, const char* url2,
+                                  const char* url3, const int maxlength);
+    virtual bool requestXtraData();
+    virtual bool requestTime();
+    virtual bool requestLocation();
+    virtual bool requestATL(int connHandle, AGpsType agps_type);
+    virtual bool releaseATL(int connHandle);
+    virtual bool requestSuplES(int connHandle);
+    virtual bool reportDataCallOpened();
+    virtual bool reportDataCallClosed();
+    virtual bool requestNiNotify(GpsNiNotification &notify,
+                                 const void* data);
+    inline virtual bool isInSession() { return false; }
+    virtual void shutdown();
+    ContextBase* getContext() const { return mContext; }
+    virtual void reportGpsMeasurementData(GpsData &gpsMeasurementData);
+};
+
+} // namespace loc_core
+
+#endif //LOC_API_ADAPTER_BASE_H
diff --git a/gps/core/LocAdapterProxyBase.h b/gps/core/LocAdapterProxyBase.h
new file mode 100644
index 0000000..f6c22af
--- /dev/null
+++ b/gps/core/LocAdapterProxyBase.h
@@ -0,0 +1,69 @@
+/* Copyright (c) 2014 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 LOC_ADAPTER_PROXY_BASE_H
+#define LOC_ADAPTER_PROXY_BASE_H
+
+#include <ContextBase.h>
+#include <gps_extended.h>
+
+namespace loc_core {
+
+class LocAdapterProxyBase {
+private:
+    LocAdapterBase *mLocAdapterBase;
+protected:
+    inline LocAdapterProxyBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
+                   ContextBase* context):
+                   mLocAdapterBase(new LocAdapterBase(mask, context, this)) {
+    }
+    inline virtual ~LocAdapterProxyBase() {
+        delete mLocAdapterBase;
+    }
+    ContextBase* getContext() const {
+        return mLocAdapterBase->getContext();
+    }
+    inline void updateEvtMask(LOC_API_ADAPTER_EVENT_MASK_T event,
+                              loc_registration_mask_status isEnabled) {
+        mLocAdapterBase->updateEvtMask(event,isEnabled);
+    }
+
+public:
+    inline virtual void handleEngineUpEvent() {};
+    inline virtual void handleEngineDownEvent() {};
+    inline virtual bool reportPosition(UlpLocation &location,
+                                       enum loc_sess_status status,
+                                       LocPosTechMask loc_technology_mask) {
+        return false;
+    }
+};
+
+} // namespace loc_core
+
+#endif //LOC_ADAPTER_PROXY_BASE_H
diff --git a/gps/core/LocApiBase.cpp b/gps/core/LocApiBase.cpp
new file mode 100644
index 0000000..f56694e
--- /dev/null
+++ b/gps/core/LocApiBase.cpp
@@ -0,0 +1,545 @@
+/* Copyright (c) 2011-2014, 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.
+ *
+ */
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_LocApiBase"
+
+#include <dlfcn.h>
+#include <LocApiBase.h>
+#include <LocAdapterBase.h>
+#include <log_util.h>
+#include <LocDualContext.h>
+
+namespace loc_core {
+
+#define TO_ALL_LOCADAPTERS(call) TO_ALL_ADAPTERS(mLocAdapters, (call))
+#define TO_1ST_HANDLING_LOCADAPTERS(call) TO_1ST_HANDLING_ADAPTER(mLocAdapters, (call))
+
+int hexcode(char *hexstring, int string_size,
+            const char *data, int data_size)
+{
+   int i;
+   for (i = 0; i < data_size; i++)
+   {
+      char ch = data[i];
+      if (i*2 + 3 <= string_size)
+      {
+         snprintf(&hexstring[i*2], 3, "%02X", ch);
+      }
+      else {
+         break;
+      }
+   }
+   return i;
+}
+
+int decodeAddress(char *addr_string, int string_size,
+                   const char *data, int data_size)
+{
+    const char addr_prefix = 0x91;
+    int i, idxOutput = 0;
+
+    if (!data || !addr_string) { return 0; }
+
+    if (data[0] != addr_prefix)
+    {
+        LOC_LOGW("decodeAddress: address prefix is not 0x%x but 0x%x", addr_prefix, data[0]);
+        addr_string[0] = '\0';
+        return 0; // prefix not correct
+    }
+
+    for (i = 1; i < data_size; i++)
+    {
+        unsigned char ch = data[i], low = ch & 0x0F, hi = ch >> 4;
+        if (low <= 9 && idxOutput < string_size - 1) { addr_string[idxOutput++] = low + '0'; }
+        if (hi <= 9 && idxOutput < string_size - 1) { addr_string[idxOutput++] = hi + '0'; }
+    }
+
+    addr_string[idxOutput] = '\0'; // Terminates the string
+
+    return idxOutput;
+}
+
+struct LocSsrMsg : public LocMsg {
+    LocApiBase* mLocApi;
+    inline LocSsrMsg(LocApiBase* locApi) :
+        LocMsg(), mLocApi(locApi)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mLocApi->close();
+        mLocApi->open(mLocApi->getEvtMask());
+    }
+    inline void locallog() {
+        LOC_LOGV("LocSsrMsg");
+    }
+    inline virtual void log() {
+        locallog();
+    }
+};
+
+struct LocOpenMsg : public LocMsg {
+    LocApiBase* mLocApi;
+    LOC_API_ADAPTER_EVENT_MASK_T mMask;
+    inline LocOpenMsg(LocApiBase* locApi,
+                      LOC_API_ADAPTER_EVENT_MASK_T mask) :
+        LocMsg(), mLocApi(locApi), mMask(mask)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mLocApi->open(mMask);
+    }
+    inline void locallog() {
+        LOC_LOGV("%s:%d]: LocOpen Mask: %x\n",
+                 __func__, __LINE__, mMask);
+    }
+    inline virtual void log() {
+        locallog();
+    }
+};
+
+LocApiBase::LocApiBase(const MsgTask* msgTask,
+                       LOC_API_ADAPTER_EVENT_MASK_T excludedMask,
+                       ContextBase* context) :
+    mExcludedMask(excludedMask), mMsgTask(msgTask),
+    mMask(0), mSupportedMsg(0), mContext(context)
+{
+    memset(mLocAdapters, 0, sizeof(mLocAdapters));
+}
+
+LOC_API_ADAPTER_EVENT_MASK_T LocApiBase::getEvtMask()
+{
+    LOC_API_ADAPTER_EVENT_MASK_T mask = 0;
+
+    TO_ALL_LOCADAPTERS(mask |= mLocAdapters[i]->getEvtMask());
+
+    return mask & ~mExcludedMask;
+}
+
+bool LocApiBase::isInSession()
+{
+    bool inSession = false;
+
+    for (int i = 0;
+         !inSession && i < MAX_ADAPTERS && NULL != mLocAdapters[i];
+         i++) {
+        inSession = mLocAdapters[i]->isInSession();
+    }
+
+    return inSession;
+}
+
+void LocApiBase::addAdapter(LocAdapterBase* adapter)
+{
+    for (int i = 0; i < MAX_ADAPTERS && mLocAdapters[i] != adapter; i++) {
+        if (mLocAdapters[i] == NULL) {
+            mLocAdapters[i] = adapter;
+            mMsgTask->sendMsg(new LocOpenMsg(this,
+                                             (adapter->getEvtMask())));
+            break;
+        }
+    }
+}
+
+void LocApiBase::removeAdapter(LocAdapterBase* adapter)
+{
+    for (int i = 0;
+         i < MAX_ADAPTERS && NULL != mLocAdapters[i];
+         i++) {
+        if (mLocAdapters[i] == adapter) {
+            mLocAdapters[i] = NULL;
+
+            // shift the rest of the adapters up so that the pointers
+            // in the array do not have holes.  This should be more
+            // performant, because the array maintenance is much much
+            // less frequent than event handlings, which need to linear
+            // search all the adapters
+            int j = i;
+            while (++i < MAX_ADAPTERS && mLocAdapters[i] != NULL);
+
+            // i would be MAX_ADAPTERS or point to a NULL
+            i--;
+            // i now should point to a none NULL adapter within valid
+            // range although i could be equal to j, but it won't hurt.
+            // No need to check it, as it gains nothing.
+            mLocAdapters[j] = mLocAdapters[i];
+            // this makes sure that we exit the for loop
+            mLocAdapters[i] = NULL;
+
+            // if we have an empty list of adapters
+            if (0 == i) {
+                close();
+            } else {
+                // else we need to remove the bit
+                mMsgTask->sendMsg(new LocOpenMsg(this, getEvtMask()));
+            }
+        }
+    }
+}
+
+void LocApiBase::updateEvtMask()
+{
+    mMsgTask->sendMsg(new LocOpenMsg(this, getEvtMask()));
+}
+
+void LocApiBase::handleEngineUpEvent()
+{
+    // This will take care of renegotiating the loc handle
+    mMsgTask->sendMsg(new LocSsrMsg(this));
+
+    LocDualContext::injectFeatureConfig(mContext);
+
+    // loop through adapters, and deliver to all adapters.
+    TO_ALL_LOCADAPTERS(mLocAdapters[i]->handleEngineUpEvent());
+}
+
+void LocApiBase::handleEngineDownEvent()
+{
+    // loop through adapters, and deliver to all adapters.
+    TO_ALL_LOCADAPTERS(mLocAdapters[i]->handleEngineDownEvent());
+}
+
+void LocApiBase::reportPosition(UlpLocation &location,
+                                GpsLocationExtended &locationExtended,
+                                void* locationExt,
+                                enum loc_sess_status status,
+                                LocPosTechMask loc_technology_mask)
+{
+    // print the location info before delivering
+    LOC_LOGV("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: %lld\n  rawDataSize: %d\n  rawData: %p\n  "
+             "Session status: %d\n Technology mask: %u",
+             location.gpsLocation.flags, location.position_source,
+             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);
+    // loop through adapters, and deliver to all adapters.
+    TO_ALL_LOCADAPTERS(
+        mLocAdapters[i]->reportPosition(location,
+                                        locationExtended,
+                                        locationExt,
+                                        status,
+                                        loc_technology_mask)
+    );
+}
+
+void LocApiBase::reportSv(GpsSvStatus &svStatus,
+                  GpsLocationExtended &locationExtended,
+                  void* svExt)
+{
+    // print the SV info before delivering
+    LOC_LOGV("num sv: %d\n  ephemeris mask: %dxn  almanac mask: %x\n  used"
+             " in fix mask: %x\n      sv: prn         snr       elevation      azimuth",
+             svStatus.num_svs, svStatus.ephemeris_mask,
+             svStatus.almanac_mask, svStatus.used_in_fix_mask);
+    for (int i = 0; i < svStatus.num_svs && i < GPS_MAX_SVS; i++) {
+        LOC_LOGV("   %d:   %d    %f    %f    %f",
+                 i,
+                 svStatus.sv_list[i].prn,
+                 svStatus.sv_list[i].snr,
+                 svStatus.sv_list[i].elevation,
+                 svStatus.sv_list[i].azimuth);
+    }
+    // loop through adapters, and deliver to all adapters.
+    TO_ALL_LOCADAPTERS(
+        mLocAdapters[i]->reportSv(svStatus,
+                                     locationExtended,
+                                     svExt)
+    );
+}
+
+void LocApiBase::reportStatus(GpsStatusValue status)
+{
+    // loop through adapters, and deliver to all adapters.
+    TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportStatus(status));
+}
+
+void LocApiBase::reportNmea(const char* nmea, int length)
+{
+    // loop through adapters, and deliver to all adapters.
+    TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportNmea(nmea, length));
+}
+
+void LocApiBase::reportXtraServer(const char* url1, const char* url2,
+                                  const char* url3, const int maxlength)
+{
+    // loop through adapters, and deliver to the first handling adapter.
+    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->reportXtraServer(url1, url2, url3, maxlength));
+
+}
+
+void LocApiBase::requestXtraData()
+{
+    // loop through adapters, and deliver to the first handling adapter.
+    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestXtraData());
+}
+
+void LocApiBase::requestTime()
+{
+    // loop through adapters, and deliver to the first handling adapter.
+    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestTime());
+}
+
+void LocApiBase::requestLocation()
+{
+    // loop through adapters, and deliver to the first handling adapter.
+    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestLocation());
+}
+
+void LocApiBase::requestATL(int connHandle, AGpsType agps_type)
+{
+    // loop through adapters, and deliver to the first handling adapter.
+    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestATL(connHandle, agps_type));
+}
+
+void LocApiBase::releaseATL(int connHandle)
+{
+    // loop through adapters, and deliver to the first handling adapter.
+    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->releaseATL(connHandle));
+}
+
+void LocApiBase::requestSuplES(int connHandle)
+{
+    // loop through adapters, and deliver to the first handling adapter.
+    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestSuplES(connHandle));
+}
+
+void LocApiBase::reportDataCallOpened()
+{
+    // loop through adapters, and deliver to the first handling adapter.
+    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->reportDataCallOpened());
+}
+
+void LocApiBase::reportDataCallClosed()
+{
+    // loop through adapters, and deliver to the first handling adapter.
+    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->reportDataCallClosed());
+}
+
+void LocApiBase::requestNiNotify(GpsNiNotification &notify, const void* data)
+{
+    // loop through adapters, and deliver to the first handling adapter.
+    TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestNiNotify(notify, data));
+}
+
+void LocApiBase::saveSupportedMsgList(uint64_t supportedMsgList)
+{
+    mSupportedMsg = supportedMsgList;
+}
+
+void* LocApiBase :: getSibling()
+    DEFAULT_IMPL(NULL)
+
+LocApiProxyBase* LocApiBase :: getLocApiProxy()
+    DEFAULT_IMPL(NULL)
+
+void LocApiBase::reportGpsMeasurementData(GpsData &gpsMeasurementData)
+{
+    // loop through adapters, and deliver to all adapters.
+    TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportGpsMeasurementData(gpsMeasurementData));
+}
+
+enum loc_api_adapter_err LocApiBase::
+   open(LOC_API_ADAPTER_EVENT_MASK_T mask)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    close()
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    startFix(const LocPosMode& posMode)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    stopFix()
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    deleteAidingData(GpsAidingData f)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    enableData(int enable)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    setAPN(char* apn, int len)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    injectPosition(double latitude, double longitude, float accuracy)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    setTime(GpsUtcTime time, int64_t timeReference, int uncertainty)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    setXtraData(char* data, int length)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    requestXtraServer()
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+   atlOpenStatus(int handle, int is_succ, char* apn,
+                 AGpsBearerType bear, AGpsType agpsType)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    atlCloseStatus(int handle, int is_succ)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    setPositionMode(const LocPosMode& posMode)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    setServer(const char* url, int len)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    setServer(unsigned int ip, int port,
+              LocServerType type)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    informNiResponse(GpsUserResponseType userResponse,
+                     const void* passThroughData)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    setSUPLVersion(uint32_t version)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    setLPPConfig(uint32_t profile)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    setSensorControlConfig(int sensorUsage,
+                           int sensorProvider)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    setSensorProperties(bool gyroBiasVarianceRandomWalk_valid,
+                        float gyroBiasVarianceRandomWalk,
+                        bool accelBiasVarianceRandomWalk_valid,
+                        float accelBiasVarianceRandomWalk,
+                        bool angleBiasVarianceRandomWalk_valid,
+                        float angleBiasVarianceRandomWalk,
+                        bool rateBiasVarianceRandomWalk_valid,
+                        float rateBiasVarianceRandomWalk,
+                        bool velocityBiasVarianceRandomWalk_valid,
+                        float velocityBiasVarianceRandomWalk)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    setSensorPerfControlConfig(int controlMode,
+                               int accelSamplesPerBatch,
+                               int accelBatchesPerSec,
+                               int gyroSamplesPerBatch,
+                               int gyroBatchesPerSec,
+                               int accelSamplesPerBatchHigh,
+                               int accelBatchesPerSecHigh,
+                               int gyroSamplesPerBatchHigh,
+                               int gyroBatchesPerSecHigh,
+                               int algorithmConfig)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    setExtPowerConfig(int isBatteryCharging)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+    setAGLONASSProtocol(unsigned long aGlonassProtocol)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+   getWwanZppFix(GpsLocation & zppLoc)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+   getBestAvailableZppFix(GpsLocation & zppLoc)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+enum loc_api_adapter_err LocApiBase::
+   getBestAvailableZppFix(GpsLocation & zppLoc, LocPosTechMask & tech_mask)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+int LocApiBase::
+    initDataServiceClient()
+DEFAULT_IMPL(-1)
+
+int LocApiBase::
+    openAndStartDataCall()
+DEFAULT_IMPL(-1)
+
+void LocApiBase::
+    stopDataCall()
+DEFAULT_IMPL()
+
+void LocApiBase::
+    closeDataCall()
+DEFAULT_IMPL()
+
+int LocApiBase::
+    setGpsLock(LOC_GPS_LOCK_MASK lock)
+DEFAULT_IMPL(-1)
+
+void LocApiBase::
+    installAGpsCert(const DerEncodedCertificate* pData,
+                    size_t length,
+                    uint32_t slotBitMask)
+DEFAULT_IMPL()
+
+int LocApiBase::
+    getGpsLock()
+DEFAULT_IMPL(-1)
+
+enum loc_api_adapter_err LocApiBase::
+    setXtraVersionCheck(enum xtra_version_check check)
+DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+int LocApiBase::
+    updateRegistrationMask(LOC_API_ADAPTER_EVENT_MASK_T event,
+                           loc_registration_mask_status isEnabled)
+DEFAULT_IMPL(-1)
+
+bool LocApiBase::
+    gnssConstellationConfig()
+DEFAULT_IMPL(false)
+
+} // namespace loc_core
diff --git a/gps/core/LocApiBase.h b/gps/core/LocApiBase.h
new file mode 100644
index 0000000..414769b
--- /dev/null
+++ b/gps/core/LocApiBase.h
@@ -0,0 +1,261 @@
+/* Copyright (c) 2011-2014, 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 LOC_API_BASE_H
+#define LOC_API_BASE_H
+
+#include <stddef.h>
+#include <ctype.h>
+#include <gps_extended.h>
+#include <MsgTask.h>
+#include <log_util.h>
+
+namespace loc_core {
+class ContextBase;
+
+int hexcode(char *hexstring, int string_size,
+            const char *data, int data_size);
+int decodeAddress(char *addr_string, int string_size,
+                  const char *data, int data_size);
+
+#define MAX_ADAPTERS          10
+
+#define TO_ALL_ADAPTERS(adapters, call)                                \
+    for (int i = 0; i < MAX_ADAPTERS && NULL != (adapters)[i]; i++) {  \
+        call;                                                          \
+    }
+
+#define TO_1ST_HANDLING_ADAPTER(adapters, call)                              \
+    for (int i = 0; i <MAX_ADAPTERS && NULL != (adapters)[i] && !(call); i++);
+
+enum xtra_version_check {
+    DISABLED,
+    AUTO,
+    XTRA2,
+    XTRA3
+};
+
+class LocAdapterBase;
+struct LocSsrMsg;
+struct LocOpenMsg;
+
+class LocApiProxyBase {
+public:
+    inline LocApiProxyBase() {}
+    inline virtual ~LocApiProxyBase() {}
+    inline virtual void* getSibling2() { return NULL; }
+};
+
+class LocApiBase {
+    friend struct LocSsrMsg;
+    //LocOpenMsg calls open() which makes it necessary to declare
+    //it as a friend
+    friend struct LocOpenMsg;
+    friend class ContextBase;
+    const MsgTask* mMsgTask;
+    ContextBase *mContext;
+    LocAdapterBase* mLocAdapters[MAX_ADAPTERS];
+    uint64_t mSupportedMsg;
+
+protected:
+    virtual enum loc_api_adapter_err
+        open(LOC_API_ADAPTER_EVENT_MASK_T mask);
+    virtual enum loc_api_adapter_err
+        close();
+    LOC_API_ADAPTER_EVENT_MASK_T getEvtMask();
+    LOC_API_ADAPTER_EVENT_MASK_T mMask;
+    LocApiBase(const MsgTask* msgTask,
+               LOC_API_ADAPTER_EVENT_MASK_T excludedMask,
+               ContextBase* context = NULL);
+    inline virtual ~LocApiBase() { close(); }
+    bool isInSession();
+    const LOC_API_ADAPTER_EVENT_MASK_T mExcludedMask;
+
+public:
+    inline void sendMsg(const LocMsg* msg) const {
+        mMsgTask->sendMsg(msg);
+    }
+
+    void addAdapter(LocAdapterBase* adapter);
+    void removeAdapter(LocAdapterBase* adapter);
+
+    // upward calls
+    void handleEngineUpEvent();
+    void handleEngineDownEvent();
+    void reportPosition(UlpLocation &location,
+                        GpsLocationExtended &locationExtended,
+                        void* locationExt,
+                        enum loc_sess_status status,
+                        LocPosTechMask loc_technology_mask =
+                                  LOC_POS_TECH_MASK_DEFAULT);
+    void reportSv(GpsSvStatus &svStatus,
+                  GpsLocationExtended &locationExtended,
+                  void* svExt);
+    void reportStatus(GpsStatusValue status);
+    void reportNmea(const char* nmea, int length);
+    void reportXtraServer(const char* url1, const char* url2,
+                          const char* url3, const int maxlength);
+    void requestXtraData();
+    void requestTime();
+    void requestLocation();
+    void requestATL(int connHandle, AGpsType agps_type);
+    void releaseATL(int connHandle);
+    void requestSuplES(int connHandle);
+    void reportDataCallOpened();
+    void reportDataCallClosed();
+    void requestNiNotify(GpsNiNotification &notify, const void* data);
+    void saveSupportedMsgList(uint64_t supportedMsgList);
+    void reportGpsMeasurementData(GpsData &gpsMeasurementData);
+
+    // downward calls
+    // All below functions are to be defined by adapter specific modules:
+    // RPC, QMI, etc.  The default implementation is empty.
+
+    virtual void* getSibling();
+    virtual LocApiProxyBase* getLocApiProxy();
+    virtual enum loc_api_adapter_err
+        startFix(const LocPosMode& posMode);
+    virtual enum loc_api_adapter_err
+        stopFix();
+    virtual enum loc_api_adapter_err
+        deleteAidingData(GpsAidingData f);
+    virtual enum loc_api_adapter_err
+        enableData(int enable);
+    virtual enum loc_api_adapter_err
+        setAPN(char* apn, int len);
+    virtual enum loc_api_adapter_err
+        injectPosition(double latitude, double longitude, float accuracy);
+    virtual enum loc_api_adapter_err
+        setTime(GpsUtcTime time, int64_t timeReference, int uncertainty);
+    virtual enum loc_api_adapter_err
+        setXtraData(char* data, int length);
+    virtual enum loc_api_adapter_err
+        requestXtraServer();
+    virtual enum loc_api_adapter_err
+        atlOpenStatus(int handle, int is_succ, char* apn, AGpsBearerType bear, AGpsType agpsType);
+    virtual enum loc_api_adapter_err
+        atlCloseStatus(int handle, int is_succ);
+    virtual enum loc_api_adapter_err
+        setPositionMode(const LocPosMode& posMode);
+    virtual enum loc_api_adapter_err
+        setServer(const char* url, int len);
+    virtual enum loc_api_adapter_err
+        setServer(unsigned int ip, int port,
+                  LocServerType type);
+    virtual enum loc_api_adapter_err
+        informNiResponse(GpsUserResponseType userResponse, const void* passThroughData);
+    virtual enum loc_api_adapter_err
+        setSUPLVersion(uint32_t version);
+    virtual enum loc_api_adapter_err
+        setLPPConfig(uint32_t profile);
+    virtual enum loc_api_adapter_err
+        setSensorControlConfig(int sensorUsage, int sensorProvider);
+    virtual enum loc_api_adapter_err
+        setSensorProperties(bool gyroBiasVarianceRandomWalk_valid,
+                            float gyroBiasVarianceRandomWalk,
+                            bool accelBiasVarianceRandomWalk_valid,
+                            float accelBiasVarianceRandomWalk,
+                            bool angleBiasVarianceRandomWalk_valid,
+                            float angleBiasVarianceRandomWalk,
+                            bool rateBiasVarianceRandomWalk_valid,
+                            float rateBiasVarianceRandomWalk,
+                            bool velocityBiasVarianceRandomWalk_valid,
+                            float velocityBiasVarianceRandomWalk);
+    virtual enum loc_api_adapter_err
+        setSensorPerfControlConfig(int controlMode,
+                               int accelSamplesPerBatch,
+                               int accelBatchesPerSec,
+                               int gyroSamplesPerBatch,
+                               int gyroBatchesPerSec,
+                               int accelSamplesPerBatchHigh,
+                               int accelBatchesPerSecHigh,
+                               int gyroSamplesPerBatchHigh,
+                               int gyroBatchesPerSecHigh,
+                               int algorithmConfig);
+    virtual enum loc_api_adapter_err
+        setExtPowerConfig(int isBatteryCharging);
+    virtual enum loc_api_adapter_err
+        setAGLONASSProtocol(unsigned long aGlonassProtocol);
+    virtual enum loc_api_adapter_err
+        getWwanZppFix(GpsLocation & zppLoc);
+    virtual enum loc_api_adapter_err
+        getBestAvailableZppFix(GpsLocation & zppLoc);
+    virtual enum loc_api_adapter_err
+        getBestAvailableZppFix(GpsLocation & zppLoc, LocPosTechMask & tech_mask);
+    virtual int initDataServiceClient();
+    virtual int openAndStartDataCall();
+    virtual void stopDataCall();
+    virtual void closeDataCall();
+    virtual void installAGpsCert(const DerEncodedCertificate* pData,
+                                 size_t length,
+                                 uint32_t slotBitMask);
+    inline virtual void setInSession(bool inSession) {}
+    inline bool isMessageSupported (LocCheckingMessagesID msgID) const {
+        if (msgID > (sizeof(mSupportedMsg) << 3)) {
+            return false;
+        } else {
+            uint32_t messageChecker = 1 << msgID;
+            return (messageChecker & mSupportedMsg) == messageChecker;
+        }
+    }
+    void updateEvtMask();
+
+    /*Values for lock
+      1 = Do not lock any position sessions
+      2 = Lock MI position sessions
+      3 = Lock MT position sessions
+      4 = Lock all position sessions
+     */
+    virtual int setGpsLock(LOC_GPS_LOCK_MASK lock);
+    /*
+      Returns
+      Current value of GPS Lock on success
+      -1 on failure
+     */
+    virtual int getGpsLock(void);
+
+    virtual enum loc_api_adapter_err setXtraVersionCheck(enum xtra_version_check check);
+
+    /*
+      Update gps reporting events
+     */
+    virtual int updateRegistrationMask(LOC_API_ADAPTER_EVENT_MASK_T event,
+                                       loc_registration_mask_status isEnabled);
+    /*
+      Check if the modem support the service
+     */
+    virtual bool gnssConstellationConfig();
+};
+
+typedef LocApiBase* (getLocApi_t)(const MsgTask* msgTask,
+                                  LOC_API_ADAPTER_EVENT_MASK_T exMask,
+                                  ContextBase *context);
+
+} // namespace loc_core
+
+#endif //LOC_API_BASE_H
diff --git a/gps/core/LocDualContext.cpp b/gps/core/LocDualContext.cpp
new file mode 100644
index 0000000..d68cb3b
--- /dev/null
+++ b/gps/core/LocDualContext.cpp
@@ -0,0 +1,183 @@
+/* Copyright (c) 2011-2014, 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.
+ *
+ */
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_DualCtx"
+
+#include <cutils/sched_policy.h>
+#include <unistd.h>
+#include <LocDualContext.h>
+#include <msg_q.h>
+#include <log_util.h>
+#include <loc_log.h>
+
+namespace loc_core {
+
+// nothing exclude for foreground
+const LOC_API_ADAPTER_EVENT_MASK_T
+LocDualContext::mFgExclMask = 0;
+// excluded events for background clients
+const LOC_API_ADAPTER_EVENT_MASK_T
+LocDualContext::mBgExclMask =
+    (LOC_API_ADAPTER_BIT_PARSED_POSITION_REPORT |
+     LOC_API_ADAPTER_BIT_SATELLITE_REPORT |
+     LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT |
+     LOC_API_ADAPTER_BIT_NMEA_POSITION_REPORT |
+     LOC_API_ADAPTER_BIT_IOCTL_REPORT |
+     LOC_API_ADAPTER_BIT_STATUS_REPORT |
+     LOC_API_ADAPTER_BIT_GEOFENCE_GEN_ALERT |
+     LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT);
+
+const MsgTask* LocDualContext::mMsgTask = NULL;
+ContextBase* LocDualContext::mFgContext = NULL;
+ContextBase* LocDualContext::mBgContext = NULL;
+ContextBase* LocDualContext::mInjectContext = NULL;
+// the name must be shorter than 15 chars
+const char* LocDualContext::mLocationHalName = "Loc_hal_worker";
+const char* LocDualContext::mLBSLibName = "liblbs_core.so";
+
+pthread_mutex_t LocDualContext::mGetLocContextMutex = PTHREAD_MUTEX_INITIALIZER;
+
+const MsgTask* LocDualContext::getMsgTask(MsgTask::tCreate tCreator,
+                                          const char* name)
+{
+    if (NULL == mMsgTask) {
+        mMsgTask = new MsgTask(tCreator, name);
+    }
+    return mMsgTask;
+}
+
+const MsgTask* LocDualContext::getMsgTask(MsgTask::tAssociate tAssociate,
+                                          const char* name)
+{
+    if (NULL == mMsgTask) {
+        mMsgTask = new MsgTask(tAssociate, name);
+    } else if (tAssociate) {
+        mMsgTask->associate(tAssociate);
+    }
+    return mMsgTask;
+}
+
+ContextBase* LocDualContext::getLocFgContext(MsgTask::tCreate tCreator,
+                                             const char* name)
+{
+    pthread_mutex_lock(&LocDualContext::mGetLocContextMutex);
+    LOC_LOGD("%s:%d]: querying ContextBase with tCreator", __func__, __LINE__);
+    if (NULL == mFgContext) {
+        LOC_LOGD("%s:%d]: creating msgTask with tCreator", __func__, __LINE__);
+        const MsgTask* msgTask = getMsgTask(tCreator, name);
+        mFgContext = new LocDualContext(msgTask,
+                                        mFgExclMask);
+    }
+    if(NULL == mInjectContext) {
+        LOC_LOGD("%s:%d]: mInjectContext is FgContext", __func__, __LINE__);
+        mInjectContext = mFgContext;
+        injectFeatureConfig(mInjectContext);
+    }
+    pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex);
+    return mFgContext;
+}
+
+ContextBase* LocDualContext::getLocFgContext(MsgTask::tAssociate tAssociate,
+                                             const char* name)
+{
+    pthread_mutex_lock(&LocDualContext::mGetLocContextMutex);
+    LOC_LOGD("%s:%d]: querying ContextBase with tAssociate", __func__, __LINE__);
+    if (NULL == mFgContext) {
+        LOC_LOGD("%s:%d]: creating msgTask with tAssociate", __func__, __LINE__);
+        const MsgTask* msgTask = getMsgTask(tAssociate, name);
+        mFgContext = new LocDualContext(msgTask,
+                                        mFgExclMask);
+    }
+    if(NULL == mInjectContext) {
+        LOC_LOGD("%s:%d]: mInjectContext is FgContext", __func__, __LINE__);
+        mInjectContext = mFgContext;
+        injectFeatureConfig(mInjectContext);
+    }
+    pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex);
+    return mFgContext;
+}
+
+ContextBase* LocDualContext::getLocBgContext(MsgTask::tCreate tCreator,
+                                             const char* name)
+{
+    pthread_mutex_lock(&LocDualContext::mGetLocContextMutex);
+    LOC_LOGD("%s:%d]: querying ContextBase with tCreator", __func__, __LINE__);
+    if (NULL == mBgContext) {
+        LOC_LOGD("%s:%d]: creating msgTask with tCreator", __func__, __LINE__);
+        const MsgTask* msgTask = getMsgTask(tCreator, name);
+        mBgContext = new LocDualContext(msgTask,
+                                        mBgExclMask);
+    }
+    if(NULL == mInjectContext) {
+        LOC_LOGD("%s:%d]: mInjectContext is BgContext", __func__, __LINE__);
+        mInjectContext = mBgContext;
+        injectFeatureConfig(mInjectContext);
+    }
+    pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex);
+    return mBgContext;
+}
+
+ContextBase* LocDualContext::getLocBgContext(MsgTask::tAssociate tAssociate,
+                                             const char* name)
+{
+    pthread_mutex_lock(&LocDualContext::mGetLocContextMutex);
+    LOC_LOGD("%s:%d]: querying ContextBase with tAssociate", __func__, __LINE__);
+    if (NULL == mBgContext) {
+        LOC_LOGD("%s:%d]: creating msgTask with tAssociate", __func__, __LINE__);
+        const MsgTask* msgTask = getMsgTask(tAssociate, name);
+        mBgContext = new LocDualContext(msgTask,
+                                        mBgExclMask);
+    }
+    if(NULL == mInjectContext) {
+        LOC_LOGD("%s:%d]: mInjectContext is BgContext", __func__, __LINE__);
+        mInjectContext = mBgContext;
+        injectFeatureConfig(mInjectContext);
+    }
+    pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex);
+    return mBgContext;
+}
+
+void LocDualContext :: injectFeatureConfig(ContextBase *curContext)
+{
+    LOC_LOGD("%s:%d]: Enter", __func__, __LINE__);
+    if(curContext == mInjectContext) {
+        LOC_LOGD("%s:%d]: Calling LBSProxy (%p) to inject feature config",
+                 __func__, __LINE__, ((LocDualContext *)mInjectContext)->mLBSProxy);
+        ((LocDualContext *)mInjectContext)->mLBSProxy->injectFeatureConfig(curContext);
+    }
+    LOC_LOGD("%s:%d]: Exit", __func__, __LINE__);
+}
+
+LocDualContext::LocDualContext(const MsgTask* msgTask,
+                               LOC_API_ADAPTER_EVENT_MASK_T exMask) :
+    ContextBase(msgTask, exMask, mLBSLibName)
+{
+}
+
+}
diff --git a/gps/core/LocDualContext.h b/gps/core/LocDualContext.h
new file mode 100644
index 0000000..1e96ea5
--- /dev/null
+++ b/gps/core/LocDualContext.h
@@ -0,0 +1,74 @@
+/* Copyright (c) 2011-2014, 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 __LOC_ENG_CONTEXT__
+#define __LOC_ENG_CONTEXT__
+
+#include <stdbool.h>
+#include <ctype.h>
+#include <dlfcn.h>
+#include <ContextBase.h>
+
+namespace loc_core {
+
+class LocDualContext : public ContextBase {
+    static const MsgTask* mMsgTask;
+    static ContextBase* mFgContext;
+    static ContextBase* mBgContext;
+    static ContextBase* mInjectContext;
+    static const MsgTask* getMsgTask(MsgTask::tCreate tCreator,
+                                     const char* name);
+    static const MsgTask* getMsgTask(MsgTask::tAssociate tAssociate,
+                                     const char* name);
+    static pthread_mutex_t mGetLocContextMutex;
+
+protected:
+    LocDualContext(const MsgTask* msgTask,
+                   LOC_API_ADAPTER_EVENT_MASK_T exMask);
+    inline virtual ~LocDualContext() {}
+
+public:
+    static const char* mLBSLibName;
+    static const LOC_API_ADAPTER_EVENT_MASK_T mFgExclMask;
+    static const LOC_API_ADAPTER_EVENT_MASK_T mBgExclMask;
+    static const char* mLocationHalName;
+
+    static ContextBase* getLocFgContext(MsgTask::tCreate tCreator,
+                                        const char* name);
+    static ContextBase* getLocFgContext(MsgTask::tAssociate tAssociate,
+                                        const char* name);
+    static ContextBase* getLocBgContext(MsgTask::tCreate tCreator,
+                                        const char* name);
+    static ContextBase* getLocBgContext(MsgTask::tAssociate tAssociate,
+                                        const char* name);
+    static void injectFeatureConfig(ContextBase *context);
+};
+
+}
+
+#endif //__LOC_ENG_CONTEXT__
diff --git a/gps/core/MsgTask.cpp b/gps/core/MsgTask.cpp
new file mode 100644
index 0000000..5d375aa
--- /dev/null
+++ b/gps/core/MsgTask.cpp
@@ -0,0 +1,147 @@
+/* Copyright (c) 2011-2013, 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.
+ *
+ */
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_MsgTask"
+
+#include <cutils/sched_policy.h>
+#include <unistd.h>
+#include <MsgTask.h>
+#include <msg_q.h>
+#include <log_util.h>
+#include <loc_log.h>
+
+namespace loc_core {
+
+#define MAX_TASK_COMM_LEN 15
+
+static void LocMsgDestroy(void* msg) {
+    delete (LocMsg*)msg;
+}
+
+MsgTask::MsgTask(tCreate tCreator, const char* threadName) :
+    mQ(msg_q_init2()), mAssociator(NULL){
+    if (tCreator) {
+        tCreator(threadName, loopMain,
+                 (void*)new MsgTask(mQ, mAssociator));
+    } else {
+        createPThread(threadName);
+    }
+}
+
+MsgTask::MsgTask(tAssociate tAssociator, const char* threadName) :
+    mQ(msg_q_init2()), mAssociator(tAssociator){
+    createPThread(threadName);
+}
+
+inline
+MsgTask::MsgTask(const void* q, tAssociate associator) :
+    mQ(q), mAssociator(associator){
+}
+
+MsgTask::~MsgTask() {
+    msg_q_unblock((void*)mQ);
+}
+
+void MsgTask::associate(tAssociate tAssociator) const {
+    struct LocAssociateMsg : public LocMsg {
+        tAssociate mAssociator;
+        inline LocAssociateMsg(tAssociate associator) :
+            LocMsg(), mAssociator(associator) {}
+        inline virtual void proc() const {
+            if (mAssociator) {
+                LOC_LOGD("MsgTask::associate");
+                mAssociator();
+            }
+        }
+    };
+    sendMsg(new LocAssociateMsg(tAssociator));
+}
+
+void MsgTask::createPThread(const char* threadName) {
+    pthread_attr_t attr;
+    pthread_attr_init(&attr);
+    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+
+    pthread_t tid;
+    // create the thread here, then if successful
+    // and a name is given, we set the thread name
+    if (!pthread_create(&tid, &attr, loopMain,
+                        (void*)new MsgTask(mQ, mAssociator)) &&
+        NULL != threadName) {
+        char lname[MAX_TASK_COMM_LEN+1];
+        memcpy(lname, threadName, MAX_TASK_COMM_LEN);
+        lname[MAX_TASK_COMM_LEN] = 0;
+        pthread_setname_np(tid, lname);
+    }
+}
+
+void MsgTask::sendMsg(const LocMsg* msg) const {
+    msg_q_snd((void*)mQ, (void*)msg, LocMsgDestroy);
+}
+
+void* MsgTask::loopMain(void* arg) {
+    MsgTask* copy = (MsgTask*)arg;
+
+    // make sure we do not run in background scheduling group
+    set_sched_policy(gettid(), SP_FOREGROUND);
+
+    if (NULL != copy->mAssociator) {
+        copy->mAssociator();
+    }
+
+    LocMsg* msg;
+    int cnt = 0;
+
+    while (1) {
+        LOC_LOGD("MsgTask::loop() %d listening ...\n", cnt++);
+
+        msq_q_err_type result = msg_q_rcv((void*)copy->mQ, (void **)&msg);
+
+        if (eMSG_Q_SUCCESS != result) {
+            LOC_LOGE("%s:%d] fail receiving msg: %s\n", __func__, __LINE__,
+                     loc_get_msg_q_status(result));
+            // destroy the Q and exit
+            msg_q_destroy((void**)&(copy->mQ));
+            delete copy;
+            return NULL;
+        }
+
+        msg->log();
+        // there is where each individual msg handling is invoked
+        msg->proc();
+
+        delete msg;
+    }
+
+    delete copy;
+
+    return NULL;
+}
+
+}
diff --git a/gps/core/MsgTask.h b/gps/core/MsgTask.h
new file mode 100644
index 0000000..d50bb31
--- /dev/null
+++ b/gps/core/MsgTask.h
@@ -0,0 +1,67 @@
+/* Copyright (c) 2011-2013, 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 __MSG_TASK__
+#define __MSG_TASK__
+
+#include <stdbool.h>
+#include <ctype.h>
+#include <string.h>
+#include <pthread.h>
+
+namespace loc_core {
+
+struct LocMsg {
+    inline LocMsg() {}
+    inline virtual ~LocMsg() {}
+    virtual void proc() const = 0;
+    inline virtual void log() const {}
+};
+
+class MsgTask {
+public:
+    typedef void* (*tStart)(void*);
+    typedef pthread_t (*tCreate)(const char* name, tStart start, void* arg);
+    typedef int (*tAssociate)();
+    MsgTask(tCreate tCreator, const char* threadName);
+    MsgTask(tAssociate tAssociator, const char* threadName);
+    ~MsgTask();
+    void sendMsg(const LocMsg* msg) const;
+    void associate(tAssociate tAssociator) const;
+
+private:
+    const void* mQ;
+    tAssociate mAssociator;
+    MsgTask(const void* q, tAssociate associator);
+    static void* loopMain(void* copy);
+    void createPThread(const char* name);
+};
+
+} // namespace loc_core
+
+#endif //__MSG_TASK__
diff --git a/gps/core/UlpProxyBase.h b/gps/core/UlpProxyBase.h
new file mode 100644
index 0000000..b9a8224
--- /dev/null
+++ b/gps/core/UlpProxyBase.h
@@ -0,0 +1,85 @@
+/* Copyright (c) 2013-2014, 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 ULP_PROXY_BASE_H
+#define ULP_PROXY_BASE_H
+
+#include <gps_extended.h>
+
+namespace loc_core {
+
+class LocAdapterBase;
+
+class UlpProxyBase {
+public:
+    LocPosMode mPosMode;
+    bool mFixSet;
+    inline UlpProxyBase() {
+        mPosMode.mode = LOC_POSITION_MODE_INVALID;
+        mFixSet = false;
+    }
+    inline virtual ~UlpProxyBase() {}
+    inline virtual bool sendStartFix() { mFixSet = true; return false; }
+    inline virtual bool sendStopFix() { mFixSet = false; return false; }
+    inline virtual bool sendFixMode(LocPosMode &params) {
+        mPosMode = params;
+        return false;
+    }
+
+    inline virtual bool reportPosition(UlpLocation &location,
+                                       GpsLocationExtended &locationExtended,
+                                       void* locationExt,
+                                       enum loc_sess_status status,
+                                       LocPosTechMask loc_technology_mask) {
+        return false;
+    }
+    inline virtual bool reportSv(GpsSvStatus &svStatus,
+                                 GpsLocationExtended &locationExtended,
+                                 void* svExt) {
+        return false;
+    }
+    inline virtual bool reportStatus(GpsStatusValue status) {
+        return false;
+    }
+    inline virtual void setAdapter(LocAdapterBase* adapter) {}
+    inline virtual void setCapabilities(unsigned long capabilities) {}
+    inline virtual bool reportBatchingSession(GpsExtBatchOptions &options,
+                                              bool active) {
+        return false;
+    }
+    inline virtual bool reportPositions(GpsExtLocation * locations,
+                                        int32_t number_of_locations,
+                                        enum loc_sess_status status,
+                                        LocPosTechMask techMask) {
+        return false;
+    }
+};
+
+} // namespace loc_core
+
+#endif // ULP_PROXY_BASE_H
diff --git a/gps/core/gps_extended.h b/gps/core/gps_extended.h
new file mode 100644
index 0000000..88b0415
--- /dev/null
+++ b/gps/core/gps_extended.h
@@ -0,0 +1,92 @@
+/* Copyright (c) 2013, 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 GPS_EXTENDED_H
+#define GPS_EXTENDED_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <gps_extended_c.h>
+
+struct LocPosMode
+{
+    LocPositionMode mode;
+    GpsPositionRecurrence recurrence;
+    uint32_t min_interval;
+    uint32_t preferred_accuracy;
+    uint32_t preferred_time;
+    char credentials[14];
+    char provider[8];
+    LocPosMode(LocPositionMode m, GpsPositionRecurrence recr,
+               uint32_t gap, uint32_t accu, uint32_t time,
+               const char* cred, const char* prov) :
+        mode(m), recurrence(recr),
+        min_interval(gap < MIN_POSSIBLE_FIX_INTERVAL ? MIN_POSSIBLE_FIX_INTERVAL : gap),
+        preferred_accuracy(accu), preferred_time(time) {
+        memset(credentials, 0, sizeof(credentials));
+        memset(provider, 0, sizeof(provider));
+        if (NULL != cred) {
+            memcpy(credentials, cred, sizeof(credentials)-1);
+        }
+        if (NULL != prov) {
+            memcpy(provider, prov, sizeof(provider)-1);
+        }
+    }
+
+    inline LocPosMode() :
+        mode(LOC_POSITION_MODE_MS_BASED),
+        recurrence(GPS_POSITION_RECURRENCE_PERIODIC),
+        min_interval(MIN_POSSIBLE_FIX_INTERVAL),
+        preferred_accuracy(50), preferred_time(120000) {
+        memset(credentials, 0, sizeof(credentials));
+        memset(provider, 0, sizeof(provider));
+    }
+
+    inline bool equals(const LocPosMode &anotherMode) const
+    {
+        return anotherMode.mode == mode &&
+            anotherMode.recurrence == recurrence &&
+            anotherMode.min_interval == min_interval &&
+            anotherMode.preferred_accuracy == preferred_accuracy &&
+            anotherMode.preferred_time == preferred_time &&
+            !strncmp(anotherMode.credentials, credentials, sizeof(credentials)-1) &&
+            !strncmp(anotherMode.provider, provider, sizeof(provider)-1);
+    }
+
+    void logv() const;
+};
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* GPS_EXTENDED_H */
+
diff --git a/gps/core/gps_extended_c.h b/gps/core/gps_extended_c.h
new file mode 100644
index 0000000..ff66ef5
--- /dev/null
+++ b/gps/core/gps_extended_c.h
@@ -0,0 +1,425 @@
+/* Copyright (c) 2013-2014, 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 GPS_EXTENDED_C_H
+#define GPS_EXTENDED_C_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <ctype.h>
+#include <stdbool.h>
+#include <hardware/gps.h>
+
+/** Location has valid source information. */
+#define LOCATION_HAS_SOURCE_INFO   0x0020
+/** GpsLocation has valid "is indoor?" flag */
+#define GPS_LOCATION_HAS_IS_INDOOR   0x0040
+/** GpsLocation has valid floor number */
+#define GPS_LOCATION_HAS_FLOOR_NUMBER   0x0080
+/** GpsLocation has valid map URL*/
+#define GPS_LOCATION_HAS_MAP_URL   0x0100
+/** GpsLocation has valid map index */
+#define GPS_LOCATION_HAS_MAP_INDEX   0x0200
+
+/** Sizes for indoor fields */
+#define GPS_LOCATION_MAP_URL_SIZE 400
+#define GPS_LOCATION_MAP_INDEX_SIZE 16
+
+/** Position source is ULP */
+#define ULP_LOCATION_IS_FROM_HYBRID   0x0001
+/** Position source is GNSS only */
+#define ULP_LOCATION_IS_FROM_GNSS     0x0002
+/** Position source is ZPP only */
+#define ULP_LOCATION_IS_FROM_ZPP      0x0004
+/** Position is from a Geofence Breach Event */
+#define ULP_LOCATION_IS_FROM_GEOFENCE 0X0008
+/** Positioin is from Hardware FLP */
+#define ULP_LOCATION_IS_FROM_HW_FLP   0x0010
+#define ULP_LOCATION_IS_FROM_NLP   0x0020
+
+#define ULP_MIN_INTERVAL_INVALID 0xffffffff
+
+/*Emergency SUPL*/
+#define GPS_NI_TYPE_EMERGENCY_SUPL    4
+
+#define AGPS_CERTIFICATE_MAX_LENGTH 2000
+#define AGPS_CERTIFICATE_MAX_SLOTS 10
+
+/** Batching default ID for dummy batching session*/
+#define GPS_BATCHING_DEFAULT_ID                 1
+
+/** This cap is used to decide the FLP session cache
+size on AP. If the BATCH_SIZE in flp.conf is less than
+GPS_AP_BATCHING_SIZE_CAP, FLP session cache size will
+be twice the BATCH_SIZE defined in flp.conf. Otherwise,
+FLP session cache size will be equal to the BATCH_SIZE.*/
+#define GPS_AP_BATCHING_SIZE_CAP               40
+
+#define GPS_BATCHING_OPERATION_SUCCEESS         1
+#define GPS_BATCHING_OPERATION_FAILURE          0
+
+/** GPS extended batching flags*/
+#define GPS_EXT_BATCHING_ON_FULL        0x0000001
+#define GPS_EXT_BATCHING_ON_FIX         0x0000002
+
+/** Reasons of GPS reports batched locations*/
+typedef enum loc_batching_reported_type {
+    LOC_BATCHING_ON_FULL_IND_REPORT,
+    LOC_BATCHING_ON_FIX_IND_REPORT,
+    LOC_BATCHING_ON_QUERY_REPORT
+}LocBatchingReportedType;
+
+enum loc_registration_mask_status {
+    LOC_REGISTRATION_MASK_ENABLED,
+    LOC_REGISTRATION_MASK_DISABLED
+};
+
+typedef struct {
+    /** set to sizeof(UlpLocation) */
+    size_t          size;
+    GpsLocation     gpsLocation;
+    /* Provider indicator for HYBRID or GPS */
+    uint16_t        position_source;
+    /*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;
+
+/** AGPS type */
+typedef int16_t AGpsExtType;
+#define AGPS_TYPE_INVALID       -1
+#define AGPS_TYPE_ANY           0
+#define AGPS_TYPE_SUPL          1
+#define AGPS_TYPE_C2K           2
+#define AGPS_TYPE_WWAN_ANY      3
+#define AGPS_TYPE_WIFI          4
+#define AGPS_TYPE_SUPL_ES       5
+
+/** SSID length */
+#define SSID_BUF_SIZE (32+1)
+
+typedef int16_t AGpsBearerType;
+#define AGPS_APN_BEARER_INVALID    -1
+#define AGPS_APN_BEARER_IPV4        0
+#define AGPS_APN_BEARER_IPV6        1
+#define AGPS_APN_BEARER_IPV4V6      2
+
+/** GPS extended callback structure. */
+typedef struct {
+    /** set to sizeof(GpsCallbacks) */
+    size_t      size;
+    gps_set_capabilities set_capabilities_cb;
+    gps_acquire_wakelock acquire_wakelock_cb;
+    gps_release_wakelock release_wakelock_cb;
+    gps_create_thread create_thread_cb;
+    gps_request_utc_time request_utc_time_cb;
+} GpsExtCallbacks;
+
+/** GPS extended batch options */
+typedef struct {
+    double max_power_allocation_mW;
+    uint32_t sources_to_use;
+    uint32_t flags;
+    int64_t period_ns;
+} GpsExtBatchOptions;
+
+/** Callback to report the xtra server url to the client.
+ *  The client should use this url when downloading xtra unless overwritten
+ *  in the gps.conf file
+ */
+typedef void (* report_xtra_server)(const char*, const char*, const char*);
+
+/** Callback structure for the XTRA interface. */
+typedef struct {
+    gps_xtra_download_request download_request_cb;
+    gps_create_thread create_thread_cb;
+    report_xtra_server report_xtra_server_cb;
+} GpsXtraExtCallbacks;
+
+/** Represents the status of AGPS. */
+typedef struct {
+    /** set to sizeof(AGpsExtStatus) */
+    size_t          size;
+
+    AGpsExtType type;
+    AGpsStatusValue status;
+    uint32_t        ipv4_addr;
+    char            ipv6_addr[16];
+    char            ssid[SSID_BUF_SIZE];
+    char            password[SSID_BUF_SIZE];
+} AGpsExtStatus;
+
+/** Callback with AGPS status information.
+ *  Can only be called from a thread created by create_thread_cb.
+ */
+typedef void (* agps_status_extended)(AGpsExtStatus* status);
+
+/** Callback structure for the AGPS interface. */
+typedef struct {
+    agps_status_extended status_cb;
+    gps_create_thread create_thread_cb;
+} AGpsExtCallbacks;
+
+
+/** GPS NI callback structure. */
+typedef struct
+{
+    /**
+     * Sends the notification request from HAL to GPSLocationProvider.
+     */
+    gps_ni_notify_callback notify_cb;
+    gps_create_thread create_thread_cb;
+} GpsNiExtCallbacks;
+
+typedef enum loc_server_type {
+    LOC_AGPS_CDMA_PDE_SERVER,
+    LOC_AGPS_CUSTOM_PDE_SERVER,
+    LOC_AGPS_MPC_SERVER,
+    LOC_AGPS_SUPL_SERVER
+} LocServerType;
+
+typedef enum loc_position_mode_type {
+    LOC_POSITION_MODE_INVALID = -1,
+    LOC_POSITION_MODE_STANDALONE = 0,
+    LOC_POSITION_MODE_MS_BASED,
+    LOC_POSITION_MODE_MS_ASSISTED,
+    LOC_POSITION_MODE_RESERVED_1,
+    LOC_POSITION_MODE_RESERVED_2,
+    LOC_POSITION_MODE_RESERVED_3,
+    LOC_POSITION_MODE_RESERVED_4,
+    LOC_POSITION_MODE_RESERVED_5
+
+} LocPositionMode;
+
+#define MIN_POSSIBLE_FIX_INTERVAL 1000 /* msec */
+
+/** GpsLocationExtended has valid latitude and longitude. */
+#define GPS_LOCATION_EXTENDED_HAS_LAT_LONG   (1U<<0)
+/** GpsLocationExtended has valid altitude. */
+#define GPS_LOCATION_EXTENDED_HAS_ALTITUDE   (1U<<1)
+/** GpsLocationExtended has valid speed. */
+#define GPS_LOCATION_EXTENDED_HAS_SPEED      (1U<<2)
+/** GpsLocationExtended has valid bearing. */
+#define GPS_LOCATION_EXTENDED_HAS_BEARING    (1U<<4)
+/** GpsLocationExtended has valid accuracy. */
+#define GPS_LOCATION_EXTENDED_HAS_ACCURACY   (1U<<8)
+
+/** GPS extended supports geofencing */
+#define GPS_EXTENDED_CAPABILITY_GEOFENCE     0x0000001
+/** GPS extended supports batching */
+#define GPS_EXTENDED_CAPABILITY_BATCHING     0x0000002
+
+/** Flags to indicate which values are valid in a GpsLocationExtended. */
+typedef uint16_t GpsLocationExtendedFlags;
+/** GpsLocationExtended has valid pdop, hdop, vdop. */
+#define GPS_LOCATION_EXTENDED_HAS_DOP 0x0001
+/** GpsLocationExtended has valid altitude mean sea level. */
+#define GPS_LOCATION_EXTENDED_HAS_ALTITUDE_MEAN_SEA_LEVEL 0x0002
+/** UlpLocation has valid magnetic deviation. */
+#define GPS_LOCATION_EXTENDED_HAS_MAG_DEV 0x0004
+/** UlpLocation has valid mode indicator. */
+#define GPS_LOCATION_EXTENDED_HAS_MODE_IND 0x0008
+/** GpsLocationExtended has valid vertical uncertainty */
+#define GPS_LOCATION_EXTENDED_HAS_VERT_UNC 0x0010
+/** GpsLocationExtended has valid speed uncertainty */
+#define GPS_LOCATION_EXTENDED_HAS_SPEED_UNC 0x0020
+
+/** Represents gps location extended. */
+typedef struct {
+    /** set to sizeof(GpsLocationExtended) */
+    size_t          size;
+    /** Contains GpsLocationExtendedFlags bits. */
+    uint16_t        flags;
+    /** Contains the Altitude wrt mean sea level */
+    float           altitudeMeanSeaLevel;
+    /** Contains Position Dilusion of Precision. */
+    float           pdop;
+    /** Contains Horizontal Dilusion of Precision. */
+    float           hdop;
+    /** Contains Vertical Dilusion of Precision. */
+    float           vdop;
+    /** Contains Magnetic Deviation. */
+    float           magneticDeviation;
+    /** vertical uncertainty in meters */
+    float           vert_unc;
+    /** speed uncertainty in m/s */
+    float           speed_unc;
+} GpsLocationExtended;
+
+typedef struct GpsExtLocation_s {
+    size_t          size;
+    uint16_t        flags;
+    double          latitude;
+    double          longitude;
+    double          altitude;
+    float           speed;
+    float           bearing;
+    float           accuracy;
+    int64_t         timestamp;
+    uint32_t        sources_used;
+} GpsExtLocation;
+
+enum loc_sess_status {
+    LOC_SESS_SUCCESS,
+    LOC_SESS_INTERMEDIATE,
+    LOC_SESS_FAILURE
+};
+
+typedef uint32_t LocPosTechMask;
+#define LOC_POS_TECH_MASK_DEFAULT ((LocPosTechMask)0x00000000)
+#define LOC_POS_TECH_MASK_SATELLITE ((LocPosTechMask)0x00000001)
+#define LOC_POS_TECH_MASK_CELLID ((LocPosTechMask)0x00000002)
+#define LOC_POS_TECH_MASK_WIFI ((LocPosTechMask)0x00000004)
+#define LOC_POS_TECH_MASK_SENSORS ((LocPosTechMask)0x00000008)
+#define LOC_POS_TECH_MASK_REFERENCE_LOCATION ((LocPosTechMask)0x00000010)
+#define LOC_POS_TECH_MASK_INJECTED_COARSE_POSITION ((LocPosTechMask)0x00000020)
+#define LOC_POS_TECH_MASK_AFLT ((LocPosTechMask)0x00000040)
+#define LOC_POS_TECH_MASK_HYBRID ((LocPosTechMask)0x00000080)
+
+typedef enum {
+  LOC_ENG_IF_REQUEST_SENDER_ID_QUIPC = 0,
+  LOC_ENG_IF_REQUEST_SENDER_ID_MSAPM,
+  LOC_ENG_IF_REQUEST_SENDER_ID_MSAPU,
+  LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON,
+  LOC_ENG_IF_REQUEST_SENDER_ID_MODEM,
+  LOC_ENG_IF_REQUEST_SENDER_ID_UNKNOWN
+} loc_if_req_sender_id_e_type;
+
+
+#define smaller_of(a, b) (((a) > (b)) ? (b) : (a))
+#define MAX_APN_LEN 100
+
+// This will be overridden by the individual adapters
+// if necessary.
+#define DEFAULT_IMPL(rtv)                                     \
+{                                                             \
+    LOC_LOGD("%s: default implementation invoked", __func__); \
+    return rtv;                                               \
+}
+
+enum loc_api_adapter_err {
+    LOC_API_ADAPTER_ERR_SUCCESS             = 0,
+    LOC_API_ADAPTER_ERR_GENERAL_FAILURE     = 1,
+    LOC_API_ADAPTER_ERR_UNSUPPORTED         = 2,
+    LOC_API_ADAPTER_ERR_INVALID_HANDLE      = 4,
+    LOC_API_ADAPTER_ERR_INVALID_PARAMETER   = 5,
+    LOC_API_ADAPTER_ERR_ENGINE_BUSY         = 6,
+    LOC_API_ADAPTER_ERR_PHONE_OFFLINE       = 7,
+    LOC_API_ADAPTER_ERR_TIMEOUT             = 8,
+    LOC_API_ADAPTER_ERR_SERVICE_NOT_PRESENT = 9,
+    LOC_API_ADAPTER_ERR_INTERNAL            = 10,
+
+    /* equating engine down to phone offline, as they are the same errror */
+    LOC_API_ADAPTER_ERR_ENGINE_DOWN         = LOC_API_ADAPTER_ERR_PHONE_OFFLINE,
+    LOC_API_ADAPTER_ERR_FAILURE             = 101,
+    LOC_API_ADAPTER_ERR_UNKNOWN
+};
+
+enum loc_api_adapter_event_index {
+    LOC_API_ADAPTER_REPORT_POSITION = 0,               // Position report comes in loc_parsed_position_s_type
+    LOC_API_ADAPTER_REPORT_SATELLITE,                  // Satellite in view report
+    LOC_API_ADAPTER_REPORT_NMEA_1HZ,                   // NMEA report at 1HZ rate
+    LOC_API_ADAPTER_REPORT_NMEA_POSITION,              // NMEA report at position report rate
+    LOC_API_ADAPTER_REQUEST_NI_NOTIFY_VERIFY,          // NI notification/verification request
+    LOC_API_ADAPTER_REQUEST_ASSISTANCE_DATA,           // Assistance data, eg: time, predicted orbits request
+    LOC_API_ADAPTER_REQUEST_LOCATION_SERVER,           // Request for location server
+    LOC_API_ADAPTER_REPORT_IOCTL,                      // Callback report for loc_ioctl
+    LOC_API_ADAPTER_REPORT_STATUS,                     // Misc status report: eg, engine state
+    LOC_API_ADAPTER_REQUEST_WIFI,                      //
+    LOC_API_ADAPTER_SENSOR_STATUS,                     //
+    LOC_API_ADAPTER_REQUEST_TIME_SYNC,                 //
+    LOC_API_ADAPTER_REPORT_SPI,                        //
+    LOC_API_ADAPTER_REPORT_NI_GEOFENCE,                //
+    LOC_API_ADAPTER_GEOFENCE_GEN_ALERT,                //
+    LOC_API_ADAPTER_REPORT_GENFENCE_BREACH,            //
+    LOC_API_ADAPTER_PEDOMETER_CTRL,                    //
+    LOC_API_ADAPTER_MOTION_CTRL,                       //
+    LOC_API_ADAPTER_REQUEST_WIFI_AP_DATA,              // Wifi ap data
+    LOC_API_ADAPTER_BATCH_FULL,                        // Batching on full
+    LOC_API_ADAPTER_BATCHED_POSITION_REPORT,           // Batching on fix
+    LOC_API_ADAPTER_BATCHED_GENFENCE_BREACH_REPORT,    //
+    LOC_API_ADAPTER_GDT_UPLOAD_BEGIN_REQ,              // GDT upload start request
+    LOC_API_ADAPTER_GDT_UPLOAD_END_REQ,                // GDT upload end request
+    LOC_API_ADAPTER_GNSS_MEASUREMENT,                  // GNSS Measurement report
+
+    LOC_API_ADAPTER_EVENT_MAX
+};
+
+#define LOC_API_ADAPTER_BIT_PARSED_POSITION_REPORT           (1<<LOC_API_ADAPTER_REPORT_POSITION)
+#define LOC_API_ADAPTER_BIT_SATELLITE_REPORT                 (1<<LOC_API_ADAPTER_REPORT_SATELLITE)
+#define LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT                  (1<<LOC_API_ADAPTER_REPORT_NMEA_1HZ)
+#define LOC_API_ADAPTER_BIT_NMEA_POSITION_REPORT             (1<<LOC_API_ADAPTER_REPORT_NMEA_POSITION)
+#define LOC_API_ADAPTER_BIT_NI_NOTIFY_VERIFY_REQUEST         (1<<LOC_API_ADAPTER_REQUEST_NI_NOTIFY_VERIFY)
+#define LOC_API_ADAPTER_BIT_ASSISTANCE_DATA_REQUEST          (1<<LOC_API_ADAPTER_REQUEST_ASSISTANCE_DATA)
+#define LOC_API_ADAPTER_BIT_LOCATION_SERVER_REQUEST          (1<<LOC_API_ADAPTER_REQUEST_LOCATION_SERVER)
+#define LOC_API_ADAPTER_BIT_IOCTL_REPORT                     (1<<LOC_API_ADAPTER_REPORT_IOCTL)
+#define LOC_API_ADAPTER_BIT_STATUS_REPORT                    (1<<LOC_API_ADAPTER_REPORT_STATUS)
+#define LOC_API_ADAPTER_BIT_REQUEST_WIFI                     (1<<LOC_API_ADAPTER_REQUEST_WIFI)
+#define LOC_API_ADAPTER_BIT_SENSOR_STATUS                    (1<<LOC_API_ADAPTER_SENSOR_STATUS)
+#define LOC_API_ADAPTER_BIT_REQUEST_TIME_SYNC                (1<<LOC_API_ADAPTER_REQUEST_TIME_SYNC)
+#define LOC_API_ADAPTER_BIT_REPORT_SPI                       (1<<LOC_API_ADAPTER_REPORT_SPI)
+#define LOC_API_ADAPTER_BIT_REPORT_NI_GEOFENCE               (1<<LOC_API_ADAPTER_REPORT_NI_GEOFENCE)
+#define LOC_API_ADAPTER_BIT_GEOFENCE_GEN_ALERT               (1<<LOC_API_ADAPTER_GEOFENCE_GEN_ALERT)
+#define LOC_API_ADAPTER_BIT_REPORT_GENFENCE_BREACH           (1<<LOC_API_ADAPTER_REPORT_GENFENCE_BREACH)
+#define LOC_API_ADAPTER_BIT_BATCHED_GENFENCE_BREACH_REPORT   (1<<LOC_API_ADAPTER_BATCHED_GENFENCE_BREACH_REPORT)
+#define LOC_API_ADAPTER_BIT_PEDOMETER_CTRL                   (1<<LOC_API_ADAPTER_PEDOMETER_CTRL)
+#define LOC_API_ADAPTER_BIT_MOTION_CTRL                      (1<<LOC_API_ADAPTER_MOTION_CTRL)
+#define LOC_API_ADAPTER_BIT_REQUEST_WIFI_AP_DATA             (1<<LOC_API_ADAPTER_REQUEST_WIFI_AP_DATA)
+#define LOC_API_ADAPTER_BIT_BATCH_FULL                       (1<<LOC_API_ADAPTER_BATCH_FULL)
+#define LOC_API_ADAPTER_BIT_BATCHED_POSITION_REPORT          (1<<LOC_API_ADAPTER_BATCHED_POSITION_REPORT)
+#define LOC_API_ADAPTER_BIT_GDT_UPLOAD_BEGIN_REQ             (1<<LOC_API_ADAPTER_GDT_UPLOAD_BEGIN_REQ)
+#define LOC_API_ADAPTER_BIT_GDT_UPLOAD_END_REQ               (1<<LOC_API_ADAPTER_GDT_UPLOAD_END_REQ)
+#define LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT                 (1<<LOC_API_ADAPTER_GNSS_MEASUREMENT)
+
+typedef unsigned int LOC_API_ADAPTER_EVENT_MASK_T;
+
+typedef enum loc_api_adapter_msg_to_check_supported {
+    LOC_API_ADAPTER_MESSAGE_LOCATION_BATCHING,               // Batching
+    LOC_API_ADAPTER_MESSAGE_BATCHED_GENFENCE_BREACH,         // Geofence Batched Breach
+
+    LOC_API_ADAPTER_MESSAGE_MAX
+} LocCheckingMessagesID;
+
+typedef uint32_t LOC_GPS_LOCK_MASK;
+#define isGpsLockNone(lock) ((lock) == 0)
+#define isGpsLockMO(lock) ((lock) & ((LOC_GPS_LOCK_MASK)1))
+#define isGpsLockMT(lock) ((lock) & ((LOC_GPS_LOCK_MASK)2))
+#define isGpsLockAll(lock) (((lock) & ((LOC_GPS_LOCK_MASK)3)) == 3)
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* GPS_EXTENDED_C_H */
+
diff --git a/gps/core/loc_core_log.cpp b/gps/core/loc_core_log.cpp
new file mode 100644
index 0000000..1b22010
--- /dev/null
+++ b/gps/core/loc_core_log.cpp
@@ -0,0 +1,260 @@
+/* Copyright (c) 2011-2014, 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.
+ *
+ */
+
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_core_log"
+
+#include <loc_log.h>
+#include <log_util.h>
+#include <loc_core_log.h>
+
+void LocPosMode::logv() const
+{
+    LOC_LOGV ("Position mode: %s\n  Position recurrence: %s\n  "
+              "min interval: %d\n  preferred accuracy: %d\n  "
+              "preferred time: %d\n  credentials: %s  provider: %s",
+              loc_get_position_mode_name(mode),
+              loc_get_position_recurrence_name(recurrence),
+              min_interval,
+              preferred_accuracy,
+              preferred_time,
+              credentials,
+              provider);
+}
+
+/* GPS status names */
+static loc_name_val_s_type gps_status_name[] =
+{
+    NAME_VAL( GPS_STATUS_NONE ),
+    NAME_VAL( GPS_STATUS_SESSION_BEGIN ),
+    NAME_VAL( GPS_STATUS_SESSION_END ),
+    NAME_VAL( GPS_STATUS_ENGINE_ON ),
+    NAME_VAL( GPS_STATUS_ENGINE_OFF ),
+};
+static int gps_status_num = sizeof(gps_status_name) / sizeof(loc_name_val_s_type);
+
+/* Find Android GPS status name */
+const char* loc_get_gps_status_name(GpsStatusValue gps_status)
+{
+   return loc_get_name_from_val(gps_status_name, gps_status_num,
+         (long) gps_status);
+}
+
+
+
+static loc_name_val_s_type loc_eng_position_modes[] =
+{
+    NAME_VAL( LOC_POSITION_MODE_STANDALONE ),
+    NAME_VAL( LOC_POSITION_MODE_MS_BASED ),
+    NAME_VAL( LOC_POSITION_MODE_MS_ASSISTED ),
+    NAME_VAL( LOC_POSITION_MODE_RESERVED_1 ),
+    NAME_VAL( LOC_POSITION_MODE_RESERVED_2 ),
+    NAME_VAL( LOC_POSITION_MODE_RESERVED_3 ),
+    NAME_VAL( LOC_POSITION_MODE_RESERVED_4 ),
+    NAME_VAL( LOC_POSITION_MODE_RESERVED_5 )
+};
+static int loc_eng_position_mode_num = sizeof(loc_eng_position_modes) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_position_mode_name(GpsPositionMode mode)
+{
+    return loc_get_name_from_val(loc_eng_position_modes, loc_eng_position_mode_num, (long) mode);
+}
+
+
+
+static loc_name_val_s_type loc_eng_position_recurrences[] =
+{
+    NAME_VAL( GPS_POSITION_RECURRENCE_PERIODIC ),
+    NAME_VAL( GPS_POSITION_RECURRENCE_SINGLE )
+};
+static int loc_eng_position_recurrence_num = sizeof(loc_eng_position_recurrences) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_position_recurrence_name(GpsPositionRecurrence recur)
+{
+    return loc_get_name_from_val(loc_eng_position_recurrences, loc_eng_position_recurrence_num, (long) recur);
+}
+
+
+
+static loc_name_val_s_type loc_eng_aiding_data_bits[] =
+{
+    NAME_VAL( GPS_DELETE_EPHEMERIS ),
+    NAME_VAL( GPS_DELETE_ALMANAC ),
+    NAME_VAL( GPS_DELETE_POSITION ),
+    NAME_VAL( GPS_DELETE_TIME ),
+    NAME_VAL( GPS_DELETE_IONO ),
+    NAME_VAL( GPS_DELETE_UTC ),
+    NAME_VAL( GPS_DELETE_HEALTH ),
+    NAME_VAL( GPS_DELETE_SVDIR ),
+    NAME_VAL( GPS_DELETE_SVSTEER ),
+    NAME_VAL( GPS_DELETE_SADATA ),
+    NAME_VAL( GPS_DELETE_RTI ),
+    NAME_VAL( GPS_DELETE_CELLDB_INFO ),
+#ifndef PDK_FEATURE_SET
+    NAME_VAL( GPS_DELETE_ALMANAC_CORR ),
+    NAME_VAL( GPS_DELETE_FREQ_BIAS_EST ),
+    NAME_VAL( GLO_DELETE_EPHEMERIS ),
+    NAME_VAL( GLO_DELETE_ALMANAC ),
+    NAME_VAL( GLO_DELETE_SVDIR ),
+    NAME_VAL( GLO_DELETE_SVSTEER ),
+    NAME_VAL( GLO_DELETE_ALMANAC_CORR ),
+    NAME_VAL( GPS_DELETE_TIME_GPS ),
+    NAME_VAL( GLO_DELETE_TIME ),
+    NAME_VAL( BDS_DELETE_SVDIR ),
+    NAME_VAL( BDS_DELETE_SVSTEER ),
+    NAME_VAL( BDS_DELETE_TIME ),
+    NAME_VAL( BDS_DELETE_ALMANAC_CORR ),
+    NAME_VAL( BDS_DELETE_EPHEMERIS ),
+    NAME_VAL( BDS_DELETE_ALMANAC ),
+#endif
+    NAME_VAL( GPS_DELETE_ALL)
+};
+static int loc_eng_aiding_data_bit_num = sizeof(loc_eng_aiding_data_bits) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_aiding_data_mask_names(GpsAidingData data)
+{
+    return NULL;
+}
+
+
+static loc_name_val_s_type loc_eng_agps_types[] =
+{
+    NAME_VAL( AGPS_TYPE_INVALID ),
+    NAME_VAL( AGPS_TYPE_ANY ),
+    NAME_VAL( AGPS_TYPE_SUPL ),
+    NAME_VAL( AGPS_TYPE_C2K ),
+    NAME_VAL( AGPS_TYPE_WWAN_ANY )
+};
+static int loc_eng_agps_type_num = sizeof(loc_eng_agps_types) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_agps_type_name(AGpsType type)
+{
+    return loc_get_name_from_val(loc_eng_agps_types, loc_eng_agps_type_num, (long) type);
+}
+
+
+static loc_name_val_s_type loc_eng_ni_types[] =
+{
+    NAME_VAL( GPS_NI_TYPE_VOICE ),
+    NAME_VAL( GPS_NI_TYPE_UMTS_SUPL ),
+    NAME_VAL( GPS_NI_TYPE_UMTS_CTRL_PLANE ),
+    NAME_VAL( GPS_NI_TYPE_EMERGENCY_SUPL )
+};
+static int loc_eng_ni_type_num = sizeof(loc_eng_ni_types) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_ni_type_name(GpsNiType type)
+{
+    return loc_get_name_from_val(loc_eng_ni_types, loc_eng_ni_type_num, (long) type);
+}
+
+
+static loc_name_val_s_type loc_eng_ni_responses[] =
+{
+    NAME_VAL( GPS_NI_RESPONSE_ACCEPT ),
+    NAME_VAL( GPS_NI_RESPONSE_DENY ),
+    NAME_VAL( GPS_NI_RESPONSE_DENY )
+};
+static int loc_eng_ni_reponse_num = sizeof(loc_eng_ni_responses) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_ni_response_name(GpsUserResponseType response)
+{
+    return loc_get_name_from_val(loc_eng_ni_responses, loc_eng_ni_reponse_num, (long) response);
+}
+
+
+static loc_name_val_s_type loc_eng_ni_encodings[] =
+{
+    NAME_VAL( GPS_ENC_NONE ),
+    NAME_VAL( GPS_ENC_SUPL_GSM_DEFAULT ),
+    NAME_VAL( GPS_ENC_SUPL_UTF8 ),
+    NAME_VAL( GPS_ENC_SUPL_UCS2 ),
+    NAME_VAL( GPS_ENC_UNKNOWN )
+};
+static int loc_eng_ni_encoding_num = sizeof(loc_eng_ni_encodings) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_ni_encoding_name(GpsNiEncodingType encoding)
+{
+    return loc_get_name_from_val(loc_eng_ni_encodings, loc_eng_ni_encoding_num, (long) encoding);
+}
+
+static loc_name_val_s_type loc_eng_agps_bears[] =
+{
+    NAME_VAL( AGPS_APN_BEARER_INVALID ),
+    NAME_VAL( AGPS_APN_BEARER_IPV4 ),
+    NAME_VAL( AGPS_APN_BEARER_IPV6 ),
+    NAME_VAL( AGPS_APN_BEARER_IPV4V6 )
+};
+static int loc_eng_agps_bears_num = sizeof(loc_eng_agps_bears) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_agps_bear_name(AGpsBearerType bearer)
+{
+    return loc_get_name_from_val(loc_eng_agps_bears, loc_eng_agps_bears_num, (long) bearer);
+}
+
+static loc_name_val_s_type loc_eng_server_types[] =
+{
+    NAME_VAL( LOC_AGPS_CDMA_PDE_SERVER ),
+    NAME_VAL( LOC_AGPS_CUSTOM_PDE_SERVER ),
+    NAME_VAL( LOC_AGPS_MPC_SERVER ),
+    NAME_VAL( LOC_AGPS_SUPL_SERVER )
+};
+static int loc_eng_server_types_num = sizeof(loc_eng_server_types) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_server_type_name(LocServerType type)
+{
+    return loc_get_name_from_val(loc_eng_server_types, loc_eng_server_types_num, (long) type);
+}
+
+static loc_name_val_s_type loc_eng_position_sess_status_types[] =
+{
+    NAME_VAL( LOC_SESS_SUCCESS ),
+    NAME_VAL( LOC_SESS_INTERMEDIATE ),
+    NAME_VAL( LOC_SESS_FAILURE )
+};
+static int loc_eng_position_sess_status_num = sizeof(loc_eng_position_sess_status_types) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_position_sess_status_name(enum loc_sess_status status)
+{
+    return loc_get_name_from_val(loc_eng_position_sess_status_types, loc_eng_position_sess_status_num, (long) status);
+}
+
+static loc_name_val_s_type loc_eng_agps_status_names[] =
+{
+    NAME_VAL( GPS_REQUEST_AGPS_DATA_CONN ),
+    NAME_VAL( GPS_RELEASE_AGPS_DATA_CONN ),
+    NAME_VAL( GPS_AGPS_DATA_CONNECTED ),
+    NAME_VAL( GPS_AGPS_DATA_CONN_DONE ),
+    NAME_VAL( GPS_AGPS_DATA_CONN_FAILED )
+};
+static int loc_eng_agps_status_num = sizeof(loc_eng_agps_status_names) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_agps_status_name(AGpsStatusValue status)
+{
+    return loc_get_name_from_val(loc_eng_agps_status_names, loc_eng_agps_status_num, (long) status);
+}
diff --git a/gps/core/loc_core_log.h b/gps/core/loc_core_log.h
new file mode 100644
index 0000000..8a1825a
--- /dev/null
+++ b/gps/core/loc_core_log.h
@@ -0,0 +1,58 @@
+/* Copyright (c) 2011-2013, 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 LOC_CORE_LOG_H
+#define LOC_CORE_LOG_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <ctype.h>
+#include <gps_extended.h>
+
+const char* loc_get_gps_status_name(GpsStatusValue gps_status);
+const char* loc_get_position_mode_name(GpsPositionMode mode);
+const char* loc_get_position_recurrence_name(GpsPositionRecurrence recur);
+const char* loc_get_aiding_data_mask_names(GpsAidingData data);
+const char* loc_get_agps_type_name(AGpsType type);
+const char* loc_get_ni_type_name(GpsNiType type);
+const char* loc_get_ni_response_name(GpsUserResponseType response);
+const char* loc_get_ni_encoding_name(GpsNiEncodingType encoding);
+const char* loc_get_agps_bear_name(AGpsBearerType bear);
+const char* loc_get_server_type_name(LocServerType type);
+const char* loc_get_position_sess_status_name(enum loc_sess_status status);
+const char* loc_get_agps_status_name(AGpsStatusValue status);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LOC_CORE_LOG_H */
diff --git a/gps/flp.conf b/gps/flp.conf
new file mode 100644
index 0000000..7d6002f
--- /dev/null
+++ b/gps/flp.conf
@@ -0,0 +1,60 @@
+###################################
+#####       FLP settings      #####
+###################################
+
+###################################
+# FLP BATCHING SIZE
+###################################
+# The number of batched locations
+# requested to modem. The desired number
+# defined below may not be satisfied, as
+# the modem can only return the number
+# of batched locations that can be allocated,
+# which is limited by memory. The default
+# batch size defined as 20 as below.
+BATCH_SIZE=20
+
+###################################
+# FLP BATCHING SESSION TIMEOUT
+###################################
+# Duration with which batch session timeout
+# happens in milliseconds. If not specified
+# or set to zero, batching session timeout
+# defaults to 20 seconds by the modem.
+# BATCH_SESSION_TIMEOUT=20000
+
+###################################
+# FLP CAPABILITIES BIT MASK
+###################################
+# GEOFENCE = 0x01
+# BATCHING = 0x02
+# default = GEOFENCE | BATCHING
+CAPABILITIES=0x03
+
+###################################
+# FLP BATCHING ACCURACY
+###################################
+# Set to one of the defined values below
+# to define the accuracy of batching.
+# If not specified, accuracy defaults
+# to LOW.
+# FLP BATCHING ACCURACY values:
+# Low accuracy = 0
+# Medium accuracy = 1
+# High accuracy = 2
+ACCURACY=0
+
+###################################
+# FLP GEOFENCE RESPONSIVENESS
+###################################
+# If set to one of the defined values below,
+# it will override the responsiveness for
+# FLP geofence, which implements the fused
+# location API. If not set to a value defined
+# below, which is default, it will not
+# override the responsivness.
+# FLP_GEOFENCE_RESPONSIVENESS_OVERRIDE Values:
+# 1: LOW responsiveness
+# 2: MEDIUM responsiveness
+# 3: HIGH responsiveness
+FLP_GEOFENCE_RESPONSIVENESS_OVERRIDE = 0
diff --git a/gps/gps.conf b/gps/gps.conf
new file mode 100644
index 0000000..be9755d
--- /dev/null
+++ b/gps/gps.conf
@@ -0,0 +1,119 @@
+#Uncommenting these urls would only enable
+#the power up auto injection and force injection(test case).
+XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin
+XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin
+XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin
+
+#Version check for XTRA
+#DISABLE = 0
+#AUTO    = 1
+#XTRA2   = 2
+#XTRA3   = 3
+XTRA_VERSION_CHECK=0
+
+# Error Estimate
+# _SET = 1
+# _CLEAR = 0
+ERR_ESTIMATE=0
+
+#Test
+NTP_SERVER=time.izatcloud.net
+#Asia
+# NTP_SERVER=asia.pool.ntp.org
+#Europe
+# NTP_SERVER=europe.pool.ntp.org
+#North America
+# NTP_SERVER=north-america.pool.ntp.org
+
+# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
+#               4 - Debug, 5 - Verbose
+# If DEBUG_LEVEL is commented, Android's logging levels will be used
+DEBUG_LEVEL = 4
+
+# Intermediate position report, 1=enable, 0=disable
+INTERMEDIATE_POS=0
+
+# Below bit mask configures how GPS functionalities
+# should be locked when user turns off GPS on Settings
+# Set bit 0x1 if MO GPS functionalities are to be locked
+# Set bit 0x2 if NI GPS functionalities are to be locked
+# default - non is locked for backward compatibility
+#GPS_LOCK = 0
+
+# supl version 1.0
+SUPL_VER=0x10000
+
+# Emergency SUPL, 1=enable, 0=disable
+SUPL_ES=0
+# Sensor R&D : Non-SUPL ES should be default
+
+#Choose PDN for Emergency SUPL
+#1 - Use emergency PDN
+#0 - Use regular SUPL PDN for Emergency SUPL
+USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1
+
+#SUPL_MODE is a bit mask set in config.xml per carrier by default.
+#If it is uncommented here, this value will over write the value from
+#config.xml.
+#MSA=0X2
+#MSB=0X1
+#Sensor R&D : Change default bit mask
+SUPL_MODE=3
+
+# GPS Capabilities bit mask
+# SCHEDULING = 0x01
+# MSB = 0x02
+# MSA = 0x04
+# ON_DEMAND_TIME = 0x10
+# GEOFENCE = 0x20
+# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING | GEOFENCE
+CAPABILITIES=0x37
+
+# Accuracy threshold for intermediate positions
+# less accurate positions are ignored, 0 for passing all positions
+# ACCURACY_THRES=5000
+
+################################
+##### AGPS server settings #####
+################################
+
+# FOR SUPL SUPPORT, set the following
+# SUPL_HOST=supl.host.com or IP
+# SUPL_PORT=1234
+
+# FOR C2K PDE SUPPORT, set the following
+# C2K_HOST=c2k.pde.com or IP
+# C2K_PORT=1234
+
+# Bitmask of slots that are available
+# for write/install to, where 1s indicate writable,
+# and the default value is 0 where no slots
+# are writable. For example, AGPS_CERT_WRITABLE_MASK
+# of b1000001010 makes 3 slots available
+# and the remaining 7 slots unwritable.
+#AGPS_CERT_WRITABLE_MASK=0
+
+####################################
+#  LTE Positioning Profile Settings
+####################################
+# 0: Enable RRLP on LTE(Default)
+# 1: Enable LPP_User_Plane on LTE
+# 2: Enable LPP_Control_Plane
+# 3: Enable both LPP_User_Plane and LPP_Control_Plane
+LPP_PROFILE = 0 # Sensor R&D : This will not be injected to MODEM
+
+################################
+# EXTRA SETTINGS
+################################
+# NMEA provider (1=Modem Processor, 0=Application Processor)
+NMEA_PROVIDER=1
+# Mark if it is a SGLTE target (1=SGLTE, 0=nonSGLTE)
+SGLTE_TARGET=0
+
+##################################################
+# Select Positioning Protocol on A-GLONASS system
+##################################################
+# 0x1: RRC CPlane
+# 0x2: RRLP UPlane
+# 0x4: LLP Uplane
+A_GLONASS_POS_PROTOCOL_SELECT = 0 #Sensor R&D : This will not be injected to MODEM
diff --git a/gps/izat.conf b/gps/izat.conf
new file mode 100644
index 0000000..52dd983
--- /dev/null
+++ b/gps/izat.conf
@@ -0,0 +1,170 @@
+########################################
+# NLP/WIFI positioning options bit mask
+########################################
+# Enable NLP fixes for WIPER/ODCPI feature => WIPER = 0x1
+# Enable free wifi scan injections for GEOFENCE => FREE_WIFI = 0x2
+# Enable SUPL2 MLD wifi => SUPL_WIFI = 0x4
+# Enable Attached Wifi AP info injection for GEOFENCE => FREE_AP_INFO = 0x8
+# default = WIPER | FREE_WIFI | SUPL_WIFI | FREE_AP_INFO
+NLP_WIFI_LISTENER_MODE = 0
+
+##################################################
+# Select WIFI Wait Timeout value in seconds for SUPL
+##################################################
+WIFI_WAIT_TIMEOUT_SELECT = 0
+
+################################
+# NLP Settings
+################################
+# NLP_MODE  1: GNP Only, 2: QNP Only, 3: Combo
+# NLP_TOLERANCE_TIME_FIRST: Time in ms used in Combo mode
+# to determine how much Tolerance for first position
+# NLP_TOLERANCE_TIME_AFTER: Time in ms used in Combo mode
+# to determine how much Tolerance for positions after first
+# NLP_THRESHOLD: Sets how many failures needed before
+# switching preferred NLP in Combo mode
+# NLP_ACCURACY_MULTIPLE: Determines how far off the accuracy
+# must be, in multiples, between two NLP location reports to
+# be considered much worse accuracy. Used in switching logic
+NLP_MODE = 1
+NLP_TOLERANCE_TIME_FIRST = 5000
+NLP_TOLERANCE_TIME_AFTER = 20000
+NLP_THRESHOLD = 3
+NLP_ACCURACY_MULTIPLE = 2
+
+# Threshold period for ZPP triggers
+ZPP_TRIGGER_THRESHOLD=10000
+
+###################################
+# GEOFENCE SERVICES
+###################################
+# If set to one of the defined values below, it will override
+# the responsiveness for geofence services, which implements
+# the Proximity Alert API. If not set to a value defined below,
+# which is default, it will not override the responsivness.
+# The geofence HAL API is unaffected by this value.
+# GEOFENCE_SERVICES_RESPONSIVENESS_OVERRIDE Values:
+# 1: LOW responsiveness
+# 2: MEDIUM responsiveness
+# 3: HIGH responsiveness
+GEOFENCE_SERVICES_RESPONSIVENESS_OVERRIDE = 0
+
+#####################################
+# IZAT PREMIUM FEATURE SETTINGS
+#####################################
+#Possible states of a feature:
+#DISABLED
+#BASIC
+#PREMIUM
+
+#GTP_CELL_PROC valid options:
+# AP
+# MODEM
+GTP_CELL_PROC=MODEM
+
+#GTP_CELL valid modes:
+# DISABLED
+# BASIC
+GTP_CELL=BASIC
+
+#GTP_WIFI valid modes:
+# DISABLED
+# BASIC
+GTP_WIFI=BASIC
+
+#SAP valid modes:
+# DISABLED
+# BASIC
+# PREMIUM
+SAP=BASIC
+
+#PIP valid modes:
+# DISABLED
+# PREMIUM
+PIP=DISABLED
+
+#####################################
+# Location process launcher settings
+#####################################
+
+#Values for PROCESS_STATE:
+# ENABLED
+# DISABLED
+
+#FEATURE MASKS:
+# GTP-WIFI 0X03
+# GTP-CELL 0X0c
+# PIP      0x30
+# SAP      0Xc0
+
+#Values for PLATFORMS can be:
+#1. Any valid values obtained from ro.board.platform separated by single space. For example: msm8960 msm8226
+#2. all -> for All platforms
+
+#Values for BASEBAND can be:
+#1. Any valid values obtained from ro.baseband separated by single space. For example: sglte sglte2
+#2. all -> for all basebands
+
+PROCESS_NAME=/system/bin/gpsone_daemon
+PROCESS_STATE=DISABLED
+PROCESS_GROUPS=inet net_raw
+PREMIUM_FEATURE=0
+IZAT_FEATURE_MASK=0
+PLATFORMS=msm7630_fusion
+BASEBAND=svlte2a sglte sglte2
+
+PROCESS_NAME=/system/bin/location-mq
+PROCESS_STATE=ENABLED
+PROCESS_GROUPS=gps
+PREMIUM_FEATURE=1
+IZAT_FEATURE_MASK=0x3f
+PLATFORMS=all
+BASEBAND=all
+
+PROCESS_NAME=/system/bin/lowi-server
+PROCESS_STATE=ENABLED
+PROCESS_GROUPS=gps net_admin wifi inet qcom_diag net_raw
+PREMIUM_FEATURE=1
+IZAT_FEATURE_MASK=0x33
+PLATFORMS=all
+BASEBAND=all
+
+PROCESS_NAME=/system/bin/quipc_igsn
+PROCESS_STATE=ENABLED
+PROCESS_GROUPS=inet gps qcom_diag
+PREMIUM_FEATURE=1
+IZAT_FEATURE_MASK=0x30
+PLATFORMS=all
+BASEBAND=all
+
+PROCESS_NAME=/system/bin/quipc_main
+PROCESS_STATE=ENABLED
+PROCESS_GROUPS=gps net_admin wifi inet qcom_diag
+PREMIUM_FEATURE=1
+IZAT_FEATURE_MASK=0x30
+PLATFORMS=all
+BASEBAND=all
+
+PROCESS_NAME=/system/bin/xtwifi-inet-agent
+PROCESS_STATE=ENABLED
+PROCESS_GROUPS=inet gps
+PREMIUM_FEATURE=1
+IZAT_FEATURE_MASK=0x0f
+PLATFORMS=all
+BASEBAND=all
+
+PROCESS_NAME=/system/bin/xtwifi-client
+PROCESS_STATE=ENABLED
+PROCESS_GROUPS=net_admin wifi inet gps
+PREMIUM_FEATURE=1
+IZAT_FEATURE_MASK=0x0f
+PLATFORMS=all
+BASEBAND=all
+
+PROCESS_NAME=/system/bin/gsiff_daemon
+PROCESS_STATE=ENABLED
+PROCESS_GROUPS=gps net_raw misc qcom_oncrpc
+PREMIUM_FEATURE=1
+IZAT_FEATURE_MASK=0xf0
+PLATFORMS=all
+BASEBAND=all
diff --git a/gps/loc_api/Android.mk b/gps/loc_api/Android.mk
new file mode 100644
index 0000000..d9ff0e5
--- /dev/null
+++ b/gps/loc_api/Android.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2014 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles,$(LOCAL_PATH))
diff --git a/gps/loc_api/ds_api/Android.mk b/gps/loc_api/ds_api/Android.mk
new file mode 100644
index 0000000..6400cc4
--- /dev/null
+++ b/gps/loc_api/ds_api/Android.mk
@@ -0,0 +1,51 @@
+ifneq ($(QCPATH),)
+ifneq ($(BUILD_TINY_ANDROID),true)
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libloc_ds_api
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := \
+    libutils \
+    libcutils \
+    libqmi_cci \
+    libqmi_csi \
+    libqmi_common_so \
+    libgps.utils \
+    libdsi_netctrl \
+    libqmiservices
+
+
+LOCAL_SRC_FILES += \
+    ds_client.c
+
+LOCAL_CFLAGS += \
+    -fno-short-enums \
+    -D_ANDROID_
+
+LOCAL_COPY_HEADERS_TO:= libloc_ds_api/
+
+LOCAL_COPY_HEADERS:= \
+    ds_client.h
+
+LOCAL_LDFLAGS += -Wl,--export-dynamic
+
+## Includes
+LOCAL_C_INCLUDES := \
+    $(TARGET_OUT_HEADERS)/libloc_eng \
+    $(TARGET_OUT_HEADERS)/qmi-framework/inc \
+    $(TARGET_OUT_HEADERS)/qmi/inc \
+    $(TARGET_OUT_HEADERS)/gps.utils \
+    $(TARGET_OUT_HEADERS)/data/inc
+
+
+LOCAL_PRELINK_MODULE := false
+
+include $(BUILD_SHARED_LIBRARY)
+
+endif # not BUILD_TINY_ANDROID
+endif # QCPATH
diff --git a/gps/loc_api/ds_api/ds_client.c b/gps/loc_api/ds_api/ds_client.c
new file mode 100644
index 0000000..e31f2af
--- /dev/null
+++ b/gps/loc_api/ds_api/ds_client.c
@@ -0,0 +1,740 @@
+/* Copyright (c) 2013, 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.
+ */
+
+#define LOG_NDEBUG 0
+#define LOG_TAG "LocSvc_ds_client"
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <wireless_data_service_v01.h>
+#include <utils/Log.h>
+#include <log_util.h>
+#include <loc_log.h>
+#include <qmi_client.h>
+#include <qmi_idl_lib.h>
+#include <qmi_cci_target_ext.h>
+#include <qmi_cci_target.h>
+#include <qmi_cci_common.h>
+#include <dsi_netctrl.h>
+#include <ds_client.h>
+
+#include<sys/time.h>
+
+//Timeout to wait for wds service notification from qmi
+#define DS_CLIENT_SERVICE_TIMEOUT (4000)
+//Max timeout for the service to come up
+#define DS_CLIENT_SERVICE_TIMEOUT_TOTAL (40000)
+//Timeout for the service to respond to sync msg
+#define DS_CLIENT_SYNC_MSG_TIMEOUT (5000)
+/*Request messages the WDS client can send to the WDS service*/
+typedef union
+{
+    /*Requests the service for a list of all profiles present*/
+    wds_get_profile_list_req_msg_v01 *p_get_profile_list_req;
+    /*Requests the service for a profile's settings*/
+    wds_get_profile_settings_req_msg_v01 *p_get_profile_settings_req;
+}ds_client_req_union_type;
+
+/*Response indications that are sent by the WDS service*/
+typedef union
+{
+    wds_get_profile_list_resp_msg_v01 *p_get_profile_list_resp;
+    wds_get_profile_settings_resp_msg_v01 *p_get_profile_setting_resp;
+}ds_client_resp_union_type;
+
+struct event_strings_s
+{
+  char * str;
+  dsi_net_evt_t evt;
+};
+
+struct event_strings_s event_string_tbl[DSI_EVT_MAX] =
+{
+    NAME_VAL(DSI_EVT_INVALID),
+    NAME_VAL(DSI_EVT_NET_IS_CONN),
+    NAME_VAL(DSI_EVT_NET_NO_NET),
+    NAME_VAL(DSI_EVT_PHYSLINK_DOWN_STATE),
+    NAME_VAL(DSI_EVT_PHYSLINK_UP_STATE),
+    NAME_VAL(DSI_EVT_NET_RECONFIGURED),
+    NAME_VAL(DSI_EVT_WDS_CONNECTED)
+};
+
+typedef struct
+{
+    ds_client_event_ind_cb_type event_cb;
+    void *caller_cookie;
+}ds_caller_data;
+
+typedef struct {
+    //Global dsi handle
+    dsi_hndl_t dsi_net_handle;
+    //Handle to caller's data
+    ds_caller_data caller_data;
+} ds_client_session_data;
+
+void net_ev_cb(dsi_hndl_t handle, void* user_data,
+               dsi_net_evt_t evt, dsi_evt_payload_t *payload_ptr)
+{
+    int i;
+    (void)handle;
+    (void)user_data;
+    (void)payload_ptr;
+    ds_caller_data *callback_data = (ds_caller_data *)user_data;
+
+    LOC_LOGD("%s:%d]: Enter. Callback data: %p\n", __func__, __LINE__, callback_data);
+    if(evt > DSI_EVT_INVALID && evt < DSI_EVT_MAX)
+    {
+        for(i=0;i<DSI_EVT_MAX;i++)
+        {
+            if(event_string_tbl[i].evt == evt)
+                LOC_LOGE("%s:%d]: Callback received: %s",
+                         __func__, __LINE__, event_string_tbl[i].str);
+        }
+        switch(evt) {
+        case DSI_EVT_NET_IS_CONN:
+        case DSI_EVT_WDS_CONNECTED:
+        {
+            LOC_LOGD("%s:%d]: Emergency call started\n", __func__, __LINE__);
+            callback_data->event_cb(E_DS_CLIENT_DATA_CALL_CONNECTED,
+                                    callback_data->caller_cookie);
+            break;
+        }
+        case DSI_EVT_NET_NO_NET:
+        {
+            LOC_LOGD("%s:%d]: Emergency call stopped\n", __func__, __LINE__);
+            callback_data->event_cb(E_DS_CLIENT_DATA_CALL_DISCONNECTED,
+                                    callback_data->caller_cookie);
+            break;
+        }
+        default:
+            LOC_LOGD("%s:%d]: uninteresting event\n", __func__, __LINE__);
+        }
+    }
+    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
+}
+
+/*This function is called to obtain a handle to the QMI WDS service*/
+static ds_client_status_enum_type
+ds_client_qmi_ctrl_point_init(qmi_client_type *p_wds_qmi_client)
+{
+    qmi_client_type wds_qmi_client, notifier = NULL;
+    ds_client_status_enum_type status = E_DS_CLIENT_SUCCESS;
+    qmi_service_info *p_service_info = NULL;
+    uint32_t num_services = 0, num_entries = 0;
+    qmi_client_error_type ret = QMI_NO_ERR;
+    unsigned char no_signal = 0;
+    qmi_client_os_params os_params;
+    int timeout = 0;
+
+    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);
+
+    //Get service object for QMI_WDS service
+    qmi_idl_service_object_type ds_client_service_object =
+        wds_get_service_object_v01();
+    if(ds_client_service_object == NULL) {
+        LOC_LOGE("%s:%d]: wds_get_service_object_v01 failed\n" ,
+                    __func__, __LINE__);
+        status  = E_DS_CLIENT_FAILURE_INTERNAL;
+        goto err;
+    }
+
+    //get service addressing information
+    ret = qmi_client_get_service_list(ds_client_service_object, NULL, NULL,
+                                      &num_services);
+    LOC_LOGD("%s:%d]: qmi_client_get_service_list() first try ret %d, "
+                   "num_services %d]\n", __func__, __LINE__, ret, num_services);
+    if(ret != QMI_NO_ERR) {
+        //Register for service notification
+        ret = qmi_client_notifier_init(ds_client_service_object, &os_params, &notifier);
+        if (ret != QMI_NO_ERR) {
+            LOC_LOGE("%s:%d]: qmi_client_notifier_init failed %d\n",
+                              __func__, __LINE__, ret);
+            status = E_DS_CLIENT_FAILURE_INTERNAL;
+            goto err;
+        }
+
+        do {
+            QMI_CCI_OS_SIGNAL_CLEAR(&os_params);
+            ret = qmi_client_get_service_list(ds_client_service_object, NULL,
+                                              NULL, &num_services);
+            if(ret != QMI_NO_ERR) {
+                QMI_CCI_OS_SIGNAL_WAIT(&os_params, DS_CLIENT_SERVICE_TIMEOUT);
+                no_signal = QMI_CCI_OS_SIGNAL_TIMED_OUT(&os_params);
+                if(!no_signal)
+                    ret = qmi_client_get_service_list(ds_client_service_object, NULL,
+                                                      NULL, &num_services);
+            }
+            timeout += DS_CLIENT_SERVICE_TIMEOUT;
+            LOC_LOGV("%s:%d]: qmi_client_get_service_list() returned ret: %d,"
+                     "no_signal: %d, total timeout: %d\n", __func__, __LINE__,
+                     ret, no_signal, timeout);
+        } while( (timeout < DS_CLIENT_SERVICE_TIMEOUT_TOTAL) &&
+                 no_signal &&
+                 (ret != QMI_NO_ERR) );
+    }
+
+    //Handle failure cases
+    if(num_services == 0 || ret != QMI_NO_ERR) {
+        if(!no_signal) {
+            LOC_LOGE("%s:%d]: qmi_client_get_service_list failed even though"
+                     "service is up!  Error: %d \n", __func__, __LINE__, ret);
+            status = E_DS_CLIENT_FAILURE_INTERNAL;
+        }
+        else {
+            LOC_LOGE("%s:%d]: qmi_client_get_service_list failed after retries"
+                     "Error: %d \n", __func__, __LINE__, ret);
+            status = E_DS_CLIENT_FAILURE_TIMEOUT;
+        }
+        goto err;
+    }
+
+    LOC_LOGD("%s:%d]: qmi_client_get_service_list succeeded\n", __func__, __LINE__);
+
+    //Success
+    p_service_info = (qmi_service_info *)malloc(num_services * sizeof(qmi_service_info));
+    if(p_service_info == NULL) {
+        LOC_LOGE("%s:%d]: could not allocate memory for serviceInfo !!\n",
+               __func__, __LINE__);
+        status = E_DS_CLIENT_FAILURE_INTERNAL;
+        goto err;
+    }
+    num_entries = num_services;
+
+    //Populate service info
+    ret = qmi_client_get_service_list(ds_client_service_object, p_service_info,
+                                     &num_entries, &num_services);
+    if(ret != QMI_NO_ERR) {
+        LOC_LOGE("%s:%d]: qmi_client_get_service_list failed. ret: %d \n",
+                 __func__, __LINE__, ret);
+        status = E_DS_CLIENT_FAILURE_INTERNAL;
+        goto err;
+    }
+
+    //Initialize wds_qmi_client
+    LOC_LOGD("%s:%d]: Initializing WDS client with qmi_client_init\n", __func__,
+             __LINE__);
+    ret = qmi_client_init(&p_service_info[0], ds_client_service_object,
+                          NULL, NULL, NULL, &wds_qmi_client);
+    if(ret != QMI_NO_ERR) {
+        LOC_LOGE("%s:%d]: qmi_client_init Error. ret: %d\n", __func__, __LINE__, ret);
+        status = E_DS_CLIENT_FAILURE_INTERNAL;
+        goto err;
+    }
+    LOC_LOGD("%s:%d]: WDS client initialized with qmi_client_init\n", __func__,
+         __LINE__);
+
+    //Store WDS QMI client handle in the parameter passed in
+    *p_wds_qmi_client = wds_qmi_client;
+
+    status = E_DS_CLIENT_SUCCESS;
+    LOC_LOGD("%s:%d]: init success\n", __func__, __LINE__);
+
+    if(notifier)
+        qmi_client_release(notifier);
+
+err:
+    if(p_service_info)
+        free(p_service_info);
+
+    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
+    return status;
+}
+
+/*This function reads the error code from within the response struct*/
+static ds_client_status_enum_type ds_client_convert_qmi_response(
+    uint32_t req_id,
+    ds_client_resp_union_type *resp_union)
+{
+    ds_client_status_enum_type ret = E_DS_CLIENT_FAILURE_GENERAL;
+    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);
+    switch(req_id)
+    {
+    case QMI_WDS_GET_PROFILE_LIST_REQ_V01 :
+    {
+        if(resp_union->p_get_profile_list_resp->resp.error !=
+           QMI_ERR_NONE_V01) {
+            LOC_LOGE("%s:%d]: Response error: %d", __func__, __LINE__,
+                     resp_union->p_get_profile_list_resp->resp.error);
+        }
+        else
+            ret = E_DS_CLIENT_SUCCESS;
+    }
+    break;
+
+    case QMI_WDS_GET_PROFILE_SETTINGS_REQ_V01 :
+    {
+        if(resp_union->p_get_profile_setting_resp->resp.error !=
+           QMI_ERR_NONE_V01) {
+            LOC_LOGE("%s:%d]: Response error: %d", __func__, __LINE__,
+                     resp_union->p_get_profile_setting_resp->resp.error);
+        }
+        else
+            ret = E_DS_CLIENT_SUCCESS;
+    }
+    break;
+
+    default:
+        LOC_LOGE("%s:%d]: Unknown request ID\n", __func__, __LINE__);
+    }
+    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
+    return ret;
+}
+
+
+static ds_client_status_enum_type ds_client_send_qmi_sync_req(
+    qmi_client_type *ds_client_handle,
+    uint32_t req_id,
+    ds_client_resp_union_type *resp_union,
+    ds_client_req_union_type *req_union)
+{
+    uint32_t req_len = 0;
+    uint32_t resp_len = 0;
+    ds_client_status_enum_type ret = E_DS_CLIENT_SUCCESS;
+    qmi_client_error_type qmi_ret = QMI_NO_ERR;
+    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);
+    switch(req_id)
+    {
+    case QMI_WDS_GET_PROFILE_LIST_REQ_V01 :
+    {
+        req_len = sizeof(wds_get_profile_list_req_msg_v01);
+        resp_len = sizeof(wds_get_profile_list_resp_msg_v01);
+        LOC_LOGD("%s:%d]: req_id = GET_PROFILE_LIST_REQ\n",
+                       __func__, __LINE__);
+    }
+    break;
+
+    case QMI_WDS_GET_PROFILE_SETTINGS_REQ_V01 :
+    {
+        req_len = sizeof(wds_get_profile_settings_req_msg_v01);
+        resp_len = sizeof(wds_get_profile_settings_resp_msg_v01);
+        LOC_LOGD("%s:%d]: req_id = GET_PROFILE_SETTINGS_REQ\n",
+                       __func__, __LINE__);
+    }
+    break;
+
+    default:
+        LOC_LOGE("%s:%d]: Error unknown req_id=%d\n", __func__, __LINE__,
+                       req_id);
+        ret = E_DS_CLIENT_FAILURE_INVALID_PARAMETER;
+        goto err;
+    }
+
+    LOC_LOGD("%s:%d]: req_id=%d, len = %d; resp_len= %d\n", __func__, __LINE__,
+             req_id, req_len, resp_len);
+    //Send msg through QCCI
+    qmi_ret = qmi_client_send_msg_sync(
+        *ds_client_handle,
+        req_id,
+        (void *)req_union->p_get_profile_list_req,
+        req_len,
+        (void *)resp_union->p_get_profile_list_resp,
+        resp_len,
+        DS_CLIENT_SYNC_MSG_TIMEOUT);
+    LOC_LOGD("%s:%d]: qmi_client_send_msg_sync returned: %d", __func__, __LINE__, qmi_ret);
+
+    if(qmi_ret != QMI_NO_ERR) {
+        ret = E_DS_CLIENT_FAILURE_INTERNAL;
+        goto err;
+    }
+
+    ret = ds_client_convert_qmi_response(req_id, resp_union);
+
+err:
+    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
+    return ret;
+}
+
+/*This function obtains the list of supported profiles*/
+static ds_client_status_enum_type ds_client_get_profile_list(
+    qmi_client_type *ds_client_handle,
+    ds_client_resp_union_type *profile_list_resp_msg,
+    wds_profile_type_enum_v01 profile_type)
+{
+    ds_client_status_enum_type ret = E_DS_CLIENT_SUCCESS;
+    ds_client_req_union_type req_union;
+    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);
+
+    req_union.p_get_profile_list_req = NULL;
+    req_union.p_get_profile_list_req = (wds_get_profile_list_req_msg_v01 *)
+        calloc(1, sizeof(wds_get_profile_list_req_msg_v01));
+    if(req_union.p_get_profile_list_req == NULL) {
+        LOC_LOGE("%s:%d]: Could not allocate memory for"
+                 "wds_get_profile_list_req_msg_v01\n", __func__, __LINE__);
+        goto err;
+    }
+    //Populate required members of the request structure
+    req_union.p_get_profile_list_req->profile_type_valid = 1;
+    req_union.p_get_profile_list_req->profile_type = profile_type;
+    ret = ds_client_send_qmi_sync_req(ds_client_handle,
+                                       QMI_WDS_GET_PROFILE_LIST_REQ_V01,
+                                       profile_list_resp_msg, &req_union);
+    if(ret != E_DS_CLIENT_SUCCESS) {
+        LOC_LOGE("%s:%d]: ds_client_send_qmi_req failed. ret: %d\n",
+                 __func__, __LINE__, ret);
+        goto err;
+    }
+err:
+    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
+    if(req_union.p_get_profile_list_req)
+        free(req_union.p_get_profile_list_req);
+    return ret;
+}
+
+/*This function obtains settings for the profile specified by
+ the profile_identifier*/
+static ds_client_status_enum_type ds_client_get_profile_settings(
+    qmi_client_type *ds_client_handle,
+    ds_client_resp_union_type *profile_settings_resp_msg,
+    wds_profile_identifier_type_v01 *profile_identifier)
+{
+    ds_client_status_enum_type ret = E_DS_CLIENT_SUCCESS;
+    ds_client_req_union_type req_union;
+
+    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);
+    //Since it's a union containing a pointer to a structure,
+    //following entities have the same address
+    //- req_union
+    //- req_union.p_get_profile_settings_req
+    //- req_union.p_get_profile_settings_req->profile
+    //so we can very well assign req_union = profile_identifier
+    req_union.p_get_profile_settings_req =
+        (wds_get_profile_settings_req_msg_v01 *)profile_identifier;
+    ret = ds_client_send_qmi_sync_req(ds_client_handle,
+                                       QMI_WDS_GET_PROFILE_SETTINGS_REQ_V01,
+                                       profile_settings_resp_msg, &req_union);
+    if(ret != E_DS_CLIENT_SUCCESS) {
+        LOC_LOGE("%s:%d]: ds_client_send_qmi_req failed. ret: %d\n",
+                 __func__, __LINE__, ret);
+        goto err;
+    }
+err:
+    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
+    return ret;
+}
+
+/*
+  Starts data call using the handle and the profile index
+*/
+ds_client_status_enum_type
+ds_client_start_call(dsClientHandleType client_handle, int profile_index, int pdp_type)
+{
+    ds_client_status_enum_type ret = E_DS_CLIENT_FAILURE_GENERAL;
+    dsi_call_param_value_t param_info;
+    dsi_hndl_t dsi_handle;
+    ds_client_session_data *ds_global_data = (ds_client_session_data *)client_handle;
+    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);
+    if(ds_global_data == NULL) {
+        LOC_LOGE("%s:%d]: Null callback parameter\n", __func__, __LINE__);
+        goto err;
+    }
+    dsi_handle = ds_global_data->dsi_net_handle;
+    //Set profile index as call parameter
+    param_info.buf_val = NULL;
+    param_info.num_val = profile_index;
+    dsi_set_data_call_param(dsi_handle,
+                            DSI_CALL_INFO_UMTS_PROFILE_IDX,
+                            &param_info);
+
+    //Set IP Version as call parameter
+    param_info.buf_val = NULL;
+    param_info.num_val = pdp_type;
+    dsi_set_data_call_param(dsi_handle,
+                            DSI_CALL_INFO_IP_VERSION,
+                            &param_info);
+    LOC_LOGD("%s:%d]: Starting emergency call with profile index %d; pdp_type:%d\n",
+             __func__, __LINE__, profile_index, pdp_type);
+    if(dsi_start_data_call(dsi_handle) == DSI_SUCCESS) {
+        LOC_LOGD("%s:%d]: Sent request to start data call\n",
+                 __func__, __LINE__);
+        ret = E_DS_CLIENT_SUCCESS;
+    }
+    else {
+        LOC_LOGE("%s:%d]: Could not send req to start data call \n", __func__, __LINE__);
+        ret = E_DS_CLIENT_FAILURE_GENERAL;
+        goto err;
+    }
+
+err:
+    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
+    return ret;
+
+}
+
+/*Function to open an emergency call. Does the following things:
+ - Obtains a handle to the WDS service
+ - Obtains a list of profiles configured in the modem
+ - Queries each profile and obtains settings to check if emergency calls
+   are supported
+ - Returns the profile index that supports emergency calls
+ - Returns handle to dsi_netctrl*/
+ds_client_status_enum_type
+ds_client_open_call(dsClientHandleType *client_handle,
+                    ds_client_cb_data *callback,
+                    void *caller_cookie,
+                    int *profile_index,
+                    int *pdp_type)
+{
+    ds_client_status_enum_type ret = E_DS_CLIENT_FAILURE_GENERAL;
+    ds_client_resp_union_type profile_list_resp_msg;
+    ds_client_resp_union_type profile_settings_resp_msg;
+    wds_profile_identifier_type_v01 profile_identifier;
+    uint32_t i=0;
+    dsi_hndl_t dsi_handle;
+    ds_client_session_data **ds_global_data = (ds_client_session_data **)client_handle;
+    unsigned char call_profile_index_found = 0;
+    uint32_t emergency_profile_index=0;
+    qmi_client_type wds_qmi_client;
+
+    profile_list_resp_msg.p_get_profile_list_resp = NULL;
+    profile_settings_resp_msg.p_get_profile_setting_resp = NULL;
+
+    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);
+    if(callback == NULL || ds_global_data == NULL) {
+        LOC_LOGE("%s:%d]: Null callback parameter\n", __func__, __LINE__);
+        goto err;
+    }
+
+    ret = ds_client_qmi_ctrl_point_init(&wds_qmi_client);
+    if(ret != E_DS_CLIENT_SUCCESS) {
+        LOC_LOGE("%s:%d]: ds_client_qmi_ctrl_point_init failed. ret: %d\n",
+                 __func__, __LINE__, ret);
+        goto err;
+    }
+
+    //Allocate memory for the response msg to obtain a list of profiles
+    profile_list_resp_msg.p_get_profile_list_resp = (wds_get_profile_list_resp_msg_v01 *)
+        calloc(1, sizeof(wds_get_profile_list_resp_msg_v01));
+    if(profile_list_resp_msg.p_get_profile_list_resp == NULL) {
+        LOC_LOGE("%s:%d]: Could not allocate memory for"
+                 "p_get_profile_list_resp\n", __func__, __LINE__);
+        ret = E_DS_CLIENT_FAILURE_NOT_ENOUGH_MEMORY;
+        goto err;
+    }
+
+    LOC_LOGD("%s:%d]: Getting profile list\n", __func__, __LINE__);
+    ret = ds_client_get_profile_list(&wds_qmi_client,
+                                      &profile_list_resp_msg,
+                                      WDS_PROFILE_TYPE_3GPP_V01);
+    if(ret != E_DS_CLIENT_SUCCESS) {
+        LOC_LOGE("%s:%d]: ds_client_get_profile_list failed. ret: %d\n",
+                 __func__, __LINE__, ret);
+        goto err;
+    }
+    LOC_LOGD("%s:%d]: Got profile list; length = %d\n", __func__, __LINE__,
+             profile_list_resp_msg.p_get_profile_list_resp->profile_list_len);
+
+    //Allocate memory for the response msg to obtain profile settings
+    //We allocate memory for only one response msg and keep re-using it
+    profile_settings_resp_msg.p_get_profile_setting_resp =
+        (wds_get_profile_settings_resp_msg_v01 *)
+        calloc(1, sizeof(wds_get_profile_settings_resp_msg_v01));
+    if(profile_settings_resp_msg.p_get_profile_setting_resp == NULL) {
+        LOC_LOGE("%s:%d]: Could not allocate memory for"
+                 "p_get_profile_setting_resp\n", __func__, __LINE__);
+        ret = E_DS_CLIENT_FAILURE_NOT_ENOUGH_MEMORY;
+        goto err;
+    }
+
+    //Loop over the list of profiles to find a profile that supports
+    //emergency calls
+    for(i=0; i < profile_list_resp_msg.p_get_profile_list_resp->profile_list_len; i++) {
+        /*QMI_WDS_GET_PROFILE_SETTINGS_REQ requires an input data
+          structure that is of type wds_profile_identifier_type_v01
+          We have to fill that structure for each profile from the
+          info obtained from the profile list*/
+        //copy profile type
+        profile_identifier.profile_type =
+            profile_list_resp_msg.p_get_profile_list_resp->profile_list[i].profile_type;
+        //copy profile index
+        profile_identifier.profile_index =
+            profile_list_resp_msg.p_get_profile_list_resp->profile_list[i].profile_index;
+
+        ret = ds_client_get_profile_settings(&wds_qmi_client,
+                                             &profile_settings_resp_msg,
+                                             &profile_identifier);
+        if(ret != E_DS_CLIENT_SUCCESS) {
+            LOC_LOGE("%s:%d]: ds_client_get_profile_settings failed. ret: %d\n",
+                     __func__, __LINE__, ret);
+            goto err;
+        }
+        LOC_LOGD("%s:%d]: Got profile setting for profile %d; name: %s\n",
+                 __func__, __LINE__, i,
+                 profile_settings_resp_msg.p_get_profile_setting_resp->profile_name);
+
+        if(profile_settings_resp_msg.p_get_profile_setting_resp->support_emergency_calls_valid) {
+            if(profile_settings_resp_msg.p_get_profile_setting_resp->support_emergency_calls) {
+                LOC_LOGD("%s:%d]: Found emergency profile in profile %d"
+                         , __func__, __LINE__, i);
+                call_profile_index_found = 1;
+                emergency_profile_index = profile_identifier.profile_index;
+
+                if(profile_settings_resp_msg.p_get_profile_setting_resp->pdp_type_valid) {
+                    *pdp_type = (int)profile_settings_resp_msg.p_get_profile_setting_resp->pdp_type;
+                    LOC_LOGD("%s:%d]: pdp_type: %d\n", __func__, __LINE__, *pdp_type);
+                    switch(*pdp_type) {
+                    case WDS_PDP_TYPE_PDP_IPV4_V01:
+                        *pdp_type = DSI_IP_VERSION_4;
+                        break;
+                    case WDS_PDP_TYPE_PDP_IPV6_V01:
+                        *pdp_type = DSI_IP_VERSION_6;
+                        break;
+                    case WDS_PDP_TYPE_PDP_IPV4V6_V01:
+                        *pdp_type = DSI_IP_VERSION_4_6;
+                        break;
+                    default:
+                        LOC_LOGE("%s:%d]: pdp_type unknown. Setting default as ipv4/v6\n",
+                                 __func__, __LINE__);
+                        *pdp_type = DSI_IP_VERSION_4;
+
+                    }
+                }
+                else {
+                    LOC_LOGD("%s:%d]: pdp type not valid in profile setting. Default ipv4\n",
+                             __func__, __LINE__);
+                    *pdp_type = DSI_IP_VERSION_4;
+                }
+                //Break out of for loop since we found the emergency profile
+                break;
+            }
+            else
+                LOC_LOGE("%s:%d]: Emergency profile valid but not supported in profile: %d "
+                         , __func__, __LINE__, i);
+        }
+        //Since this struct is loaded with settings for the next profile,
+        //it is important to clear out the memory to avoid values/flags
+        //from being carried over
+        memset((void *)profile_settings_resp_msg.p_get_profile_setting_resp,
+               0, sizeof(wds_get_profile_settings_resp_msg_v01));
+    }
+
+    //Release qmi client handle
+    if(qmi_client_release(wds_qmi_client) != QMI_NO_ERR) {
+        LOC_LOGE("%s:%d]: Could not release qmi client handle\n",
+                 __func__, __LINE__);
+        ret = E_DS_CLIENT_FAILURE_GENERAL;
+    }
+
+    if(call_profile_index_found) {
+        *profile_index = emergency_profile_index;
+        *ds_global_data = (ds_client_session_data *)calloc(1, sizeof(ds_client_session_data));
+        if(*ds_global_data == NULL) {
+            LOC_LOGE("%s:%d]: Could not allocate memory for ds_global_data. Failing\n",
+                     __func__, __LINE__);
+            ret = E_DS_CLIENT_FAILURE_NOT_ENOUGH_MEMORY;
+            goto err;
+        }
+
+        (*ds_global_data)->caller_data.event_cb = callback->event_cb;
+        (*ds_global_data)->caller_data.caller_cookie = caller_cookie;
+        dsi_handle = dsi_get_data_srvc_hndl(net_ev_cb, &(*ds_global_data)->caller_data);
+        if(dsi_handle == NULL) {
+            LOC_LOGE("%s:%d]: Could not get data handle. Retry Later\n",
+                     __func__, __LINE__);
+            ret = E_DS_CLIENT_RETRY_LATER;
+            goto err;
+        }
+        else
+            (*ds_global_data)->dsi_net_handle = dsi_handle;
+    }
+    else {
+        LOC_LOGE("%s:%d]: Could not find a profile that supports emergency calls",
+                 __func__, __LINE__);
+        ret = E_DS_CLIENT_FAILURE_GENERAL;
+    }
+err:
+    if(profile_list_resp_msg.p_get_profile_list_resp)
+        free(profile_list_resp_msg.p_get_profile_list_resp);
+    if(profile_settings_resp_msg.p_get_profile_setting_resp)
+        free(profile_settings_resp_msg.p_get_profile_setting_resp);
+    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
+    return ret;
+}
+
+ds_client_status_enum_type ds_client_stop_call(dsClientHandleType client_handle)
+{
+    ds_client_status_enum_type ret = E_DS_CLIENT_SUCCESS;
+    ds_client_session_data *p_ds_global_data = (ds_client_session_data *)client_handle;
+    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);
+
+    if(client_handle == NULL) {
+        LOC_LOGE("%s:%d]: Null argument received. Failing\n", __func__, __LINE__);
+        ret = E_DS_CLIENT_FAILURE_GENERAL;
+        goto err;
+    }
+
+    if(dsi_stop_data_call(p_ds_global_data->dsi_net_handle) == DSI_SUCCESS) {
+        LOC_LOGD("%s:%d]: Sent request to stop data call\n", __func__, __LINE__);
+    }
+    else {
+        LOC_LOGE("%s:%d]: Could not send request to stop data call\n",
+                 __func__, __LINE__);
+        ret = E_DS_CLIENT_FAILURE_GENERAL;
+        goto err;
+    }
+
+err:
+    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
+    return ret;
+}
+
+/*
+  Stops data call associated with the data handle
+*/
+void ds_client_close_call(dsClientHandleType *client_handle)
+{
+    ds_client_session_data **ds_global_data = (ds_client_session_data **)client_handle;
+    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);
+    if(client_handle == NULL || *client_handle == NULL) {
+        LOC_LOGE("%s:%d]: Null argument received. Failing\n", __func__, __LINE__);
+        goto err;
+    }
+    dsi_rel_data_srvc_hndl((*ds_global_data)->dsi_net_handle);
+    (*ds_global_data)->dsi_net_handle = NULL;
+    free(*ds_global_data);
+    *ds_global_data = NULL;
+    LOC_LOGD("%s:%d]: Released Data handle\n", __func__, __LINE__);
+err:
+    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
+    return;
+}
+
+int ds_client_init()
+{
+    int ret = 0;
+    LOC_LOGD("%s:%d]:Enter\n", __func__, __LINE__);
+    if(DSI_SUCCESS != dsi_init(DSI_MODE_GENERAL))
+    {
+        LOC_LOGE("%s:%d]:dsi_init failed\n", __func__, __LINE__);
+        ret = -1;
+    }
+    LOC_LOGD("%s:%d]:Exit\n", __func__, __LINE__);
+    return ret;
+}
diff --git a/gps/loc_api/ds_api/ds_client.h b/gps/loc_api/ds_api/ds_client.h
new file mode 100644
index 0000000..71ec770
--- /dev/null
+++ b/gps/loc_api/ds_api/ds_client.h
@@ -0,0 +1,144 @@
+/* Copyright (c) 2013, 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 _DS_CLIENT_H_
+#define _DS_CLIENT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void* dsClientHandleType;
+
+typedef enum
+{
+  E_DS_CLIENT_SUCCESS                              = 0,
+  /**< Request was successful. */
+
+  E_DS_CLIENT_FAILURE_GENERAL                      = 1,
+  /**< Failed because of a general failure. */
+
+  E_DS_CLIENT_FAILURE_UNSUPPORTED                  = 2,
+  /**< Failed because the service does not support the command. */
+
+  E_DS_CLIENT_FAILURE_INVALID_PARAMETER            = 3,
+  /**< Failed because the request contained invalid parameters. */
+
+  E_DS_CLIENT_FAILURE_ENGINE_BUSY                  = 4,
+  /**< Failed because the engine is busy. */
+
+  E_DS_CLIENT_FAILURE_PHONE_OFFLINE                = 5,
+  /**< Failed because the phone is offline. */
+
+  E_DS_CLIENT_FAILURE_TIMEOUT                      = 6,
+  /**< Failed because of a timeout. */
+
+  E_DS_CLIENT_FAILURE_SERVICE_NOT_PRESENT          = 7,
+  /**< Failed because the service is not present. */
+
+  E_DS_CLIENT_FAILURE_SERVICE_VERSION_UNSUPPORTED  = 8,
+  /**< Failed because the service version is unsupported. */
+
+  E_DS_CLIENT_FAILURE_CLIENT_VERSION_UNSUPPORTED  =  9,
+  /**< Failed because the service does not support client version. */
+
+  E_DS_CLIENT_FAILURE_INVALID_HANDLE               = 10,
+  /**< Failed because an invalid handle was specified. */
+
+  E_DS_CLIENT_FAILURE_INTERNAL                     = 11,
+  /**< Failed because of an internal error in the service. */
+
+  E_DS_CLIENT_FAILURE_NOT_INITIALIZED              = 12,
+  /**< Failed because the service has not been initialized. */
+
+  E_DS_CLIENT_FAILURE_NOT_ENOUGH_MEMORY             = 13,
+  /**< Failed because not rnough memory to do the operation.*/
+
+  E_DS_CLIENT_SERVICE_ALREADY_STARTED               = 14,
+  /*Service is already started*/
+
+  E_DS_CLIENT_DATA_CALL_CONNECTED                   = 15,
+
+  E_DS_CLIENT_DATA_CALL_DISCONNECTED                = 16,
+
+  E_DS_CLIENT_RETRY_LATER                           = 17
+}ds_client_status_enum_type;
+
+typedef enum {
+    DATA_CALL_NONE = 0,
+    DATA_CALL_OPEN,
+    DATA_CALL_CLOSE
+}data_call_request_enum_type;
+
+typedef void (*ds_client_event_ind_cb_type)(ds_client_status_enum_type result,
+                                             void* loc_adapter_cookie);
+typedef struct {
+    ds_client_event_ind_cb_type event_cb;
+}ds_client_cb_data;
+
+/*
+  This function is to be called as a first step by each process that
+  needs to use data services. This call internally calls dsi_init()
+  and prepares the module for making data calls.
+  Needs to be called once for every process
+*/
+int ds_client_init();
+
+/*
+  Obtains a handle to the dsi_netctrl layer and looks up the profile
+  to make the call. As of now. It only searches for profiles that
+  support emergency calls
+ */
+ds_client_status_enum_type ds_client_open_call(dsClientHandleType *client_handle,
+                                               ds_client_cb_data *callback,
+                                               void *loc_adapter_cookie,
+                                               int *profile_index,
+                                               int *pdp_type);
+
+/*
+  Starts a data call using the profile number provided
+ */
+ds_client_status_enum_type ds_client_start_call(dsClientHandleType client_handle,
+                                                int profile_index,
+                                                int pdp_type);
+
+/*
+  Stops a data call associated with the handle
+*/
+ds_client_status_enum_type ds_client_stop_call(dsClientHandleType client_handle);
+
+/*
+  Releases the handle used for making data calls
+*/
+void ds_client_close_call(dsClientHandleType *client_handle);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/gps/loc_api/libloc_api_50001/Android.mk b/gps/loc_api/libloc_api_50001/Android.mk
new file mode 100644
index 0000000..7e5c4e5
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/Android.mk
@@ -0,0 +1,117 @@
+ifneq ($(BUILD_TINY_ANDROID),true)
+#Compile this library only for builds with the latest modem image
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libloc_eng
+LOCAL_MODULE_OWNER := qcom
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := \
+    libutils \
+    libcutils \
+    libdl \
+    liblog \
+    libloc_core \
+    libgps.utils
+
+LOCAL_SRC_FILES += \
+    loc_eng.cpp \
+    loc_eng_agps.cpp \
+    loc_eng_xtra.cpp \
+    loc_eng_ni.cpp \
+    loc_eng_log.cpp \
+    loc_eng_nmea.cpp \
+    LocEngAdapter.cpp
+
+LOCAL_SRC_FILES += \
+    loc_eng_dmn_conn.cpp \
+    loc_eng_dmn_conn_handler.cpp \
+    loc_eng_dmn_conn_thread_helper.c \
+    loc_eng_dmn_conn_glue_msg.c \
+    loc_eng_dmn_conn_glue_pipe.c
+
+LOCAL_CFLAGS += \
+     -fno-short-enums \
+     -D_ANDROID_
+
+LOCAL_C_INCLUDES:= \
+    $(TARGET_OUT_HEADERS)/gps.utils \
+    $(TARGET_OUT_HEADERS)/libloc_core \
+    $(LOCAL_PATH)
+
+LOCAL_COPY_HEADERS_TO:= libloc_eng/
+LOCAL_COPY_HEADERS:= \
+   LocEngAdapter.h \
+   loc.h \
+   loc_eng.h \
+   loc_eng_xtra.h \
+   loc_eng_ni.h \
+   loc_eng_agps.h \
+   loc_eng_msg.h \
+   loc_eng_log.h
+
+LOCAL_PRELINK_MODULE := false
+
+include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := gps.$(TARGET_BOARD_PLATFORM)
+LOCAL_MODULE_OWNER := qcom
+
+LOCAL_MODULE_TAGS := optional
+
+## Libs
+
+LOCAL_SHARED_LIBRARIES := \
+    libutils \
+    libcutils \
+    liblog \
+    libloc_eng \
+    libloc_core \
+    libgps.utils \
+    libdl
+
+ifneq ($(filter $(TARGET_DEVICE), apq8084 msm8960), false)
+endif
+
+LOCAL_SRC_FILES += \
+    loc.cpp \
+    gps.c
+
+LOCAL_CFLAGS += \
+    -fno-short-enums \
+    -D_ANDROID_ \
+
+ifeq ($(TARGET_USES_QCOM_BSP), true)
+LOCAL_CFLAGS += -DTARGET_USES_QCOM_BSP
+endif
+
+## Includes
+LOCAL_C_INCLUDES:= \
+    $(TARGET_OUT_HEADERS)/gps.utils \
+    $(TARGET_OUT_HEADERS)/libloc_core
+
+#ifeq ($(filter $(TARGET_DEVICE), apq8064 msm8960),)
+#$(call print-vars, $(TARGET_DEVICE))
+#LOCAL_SHARED_LIBRARIES += \
+#    libmdmdetect \
+#    libperipheral_client
+#
+#LOCAL_C_INCLUDES += \
+#    $(TARGET_OUT_HEADERS)/libmdmdetect/inc \
+#    $(TARGET_OUT_HEADERS)/libperipheralclient/inc
+#LOCAL_CFLAGS += \
+#    -DMODEM_POWER_VOTE
+#endif
+
+LOCAL_PRELINK_MODULE := false
+LOCAL_MODULE_RELATIVE_PATH := hw
+
+include $(BUILD_SHARED_LIBRARY)
+
+endif # not BUILD_TINY_ANDROID
diff --git a/gps/loc_api/libloc_api_50001/LocEngAdapter.cpp b/gps/loc_api/libloc_api_50001/LocEngAdapter.cpp
new file mode 100644
index 0000000..2f025af
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/LocEngAdapter.cpp
@@ -0,0 +1,426 @@
+/* Copyright (c) 2011-2014, 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.
+ *
+ */
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_EngAdapter"
+
+#include <LocEngAdapter.h>
+#include "loc_eng_msg.h"
+#include "loc_log.h"
+
+using namespace loc_core;
+
+LocInternalAdapter::LocInternalAdapter(LocEngAdapter* adapter) :
+    LocAdapterBase(adapter->getMsgTask()),
+    mLocEngAdapter(adapter)
+{
+}
+void LocInternalAdapter::setPositionModeInt(LocPosMode& posMode) {
+    sendMsg(new LocEngPositionMode(mLocEngAdapter, posMode));
+}
+void LocInternalAdapter::startFixInt() {
+    sendMsg(new LocEngStartFix(mLocEngAdapter));
+}
+void LocInternalAdapter::stopFixInt() {
+    sendMsg(new LocEngStopFix(mLocEngAdapter));
+}
+void LocInternalAdapter::getZppInt() {
+    sendMsg(new LocEngGetZpp(mLocEngAdapter));
+}
+
+void LocInternalAdapter::shutdown() {
+    sendMsg(new LocEngShutdown(mLocEngAdapter));
+}
+
+LocEngAdapter::LocEngAdapter(LOC_API_ADAPTER_EVENT_MASK_T mask,
+                             void* owner, ContextBase* context,
+                             MsgTask::tCreate tCreator) :
+    LocAdapterBase(mask,
+                   //Get the AFW context if VzW context has not already been intialized in
+                   //loc_ext
+                   context == NULL?
+                   LocDualContext::getLocFgContext(tCreator,
+                                                   LocDualContext::mLocationHalName)
+                   :context),
+    mOwner(owner), mInternalAdapter(new LocInternalAdapter(this)),
+    mUlp(new UlpProxyBase()), mNavigating(false),
+    mSupportsAgpsRequests(false),
+    mSupportsPositionInjection(false),
+    mSupportsTimeInjection(false),
+    mPowerVote(0)
+{
+    memset(&mFixCriteria, 0, sizeof(mFixCriteria));
+    mFixCriteria.mode = LOC_POSITION_MODE_INVALID;
+    LOC_LOGD("LocEngAdapter created");
+}
+
+inline
+LocEngAdapter::~LocEngAdapter()
+{
+    delete mInternalAdapter;
+    LOC_LOGV("LocEngAdapter deleted");
+}
+
+void LocInternalAdapter::setUlpProxy(UlpProxyBase* ulp) {
+    struct LocSetUlpProxy : public LocMsg {
+        LocAdapterBase* mAdapter;
+        UlpProxyBase* mUlp;
+        inline LocSetUlpProxy(LocAdapterBase* adapter, UlpProxyBase* ulp) :
+            LocMsg(), mAdapter(adapter), mUlp(ulp) {
+        }
+        virtual void proc() const {
+            LOC_LOGV("%s] ulp %p adapter %p", __func__,
+                     mUlp, mAdapter);
+            mAdapter->setUlpProxy(mUlp);
+        }
+    };
+
+    sendMsg(new LocSetUlpProxy(mLocEngAdapter, ulp));
+}
+
+void LocEngAdapter::setUlpProxy(UlpProxyBase* ulp)
+{
+    if (ulp == mUlp) {
+        //This takes care of the case when double initalization happens
+        //and we get the same object back for UlpProxyBase . Do nothing
+        return;
+    }
+
+    LOC_LOGV("%s] %p", __func__, ulp);
+    if (NULL == ulp) {
+        LOC_LOGE("%s:%d]: ulp pointer is NULL", __func__, __LINE__);
+        ulp = new UlpProxyBase();
+    }
+
+    if (LOC_POSITION_MODE_INVALID != mUlp->mPosMode.mode) {
+        // need to send this mode and start msg to ULP
+        ulp->sendFixMode(mUlp->mPosMode);
+    }
+
+    if(mUlp->mFixSet) {
+        ulp->sendStartFix();
+    }
+
+    delete mUlp;
+    mUlp = ulp;
+}
+
+int LocEngAdapter::setGpsLockMsg(LOC_GPS_LOCK_MASK lockMask)
+{
+    struct LocEngAdapterGpsLock : public LocMsg {
+        LocEngAdapter* mAdapter;
+        LOC_GPS_LOCK_MASK mLockMask;
+        inline LocEngAdapterGpsLock(LocEngAdapter* adapter, LOC_GPS_LOCK_MASK lockMask) :
+            LocMsg(), mAdapter(adapter), mLockMask(lockMask)
+        {
+            locallog();
+        }
+        inline virtual void proc() const {
+            mAdapter->setGpsLock(mLockMask);
+        }
+        inline  void locallog() const {
+            LOC_LOGV("LocEngAdapterGpsLock - mLockMask: %x", mLockMask);
+        }
+        inline virtual void log() const {
+            locallog();
+        }
+    };
+    sendMsg(new LocEngAdapterGpsLock(this, lockMask));
+    return 0;
+}
+
+void LocEngAdapter::requestPowerVote()
+{
+    if (getPowerVoteRight()) {
+        /* Power voting without engine lock:
+         * 101: vote down, 102-104 - vote up
+         * These codes are used not to confuse with actual engine lock
+         * functionality, that can't be used in SSR scenario, as it
+         * conflicts with initialization sequence.
+         */
+        bool powerUp = getPowerVote();
+        LOC_LOGV("LocEngAdapterVotePower - Vote Power: %d", (int)powerUp);
+        setGpsLock(powerUp ? 103 : 101);
+    }
+}
+
+void LocInternalAdapter::reportPosition(UlpLocation &location,
+                                        GpsLocationExtended &locationExtended,
+                                        void* locationExt,
+                                        enum loc_sess_status status,
+                                        LocPosTechMask loc_technology_mask)
+{
+    sendMsg(new LocEngReportPosition(mLocEngAdapter,
+                                     location,
+                                     locationExtended,
+                                     locationExt,
+                                     status,
+                                     loc_technology_mask));
+}
+
+
+void LocEngAdapter::reportPosition(UlpLocation &location,
+                                   GpsLocationExtended &locationExtended,
+                                   void* locationExt,
+                                   enum loc_sess_status status,
+                                   LocPosTechMask loc_technology_mask)
+{
+    if (! mUlp->reportPosition(location,
+                               locationExtended,
+                               locationExt,
+                               status,
+                               loc_technology_mask )) {
+        mInternalAdapter->reportPosition(location,
+                                         locationExtended,
+                                         locationExt,
+                                         status,
+                                         loc_technology_mask);
+    }
+}
+
+void LocInternalAdapter::reportSv(GpsSvStatus &svStatus,
+                                  GpsLocationExtended &locationExtended,
+                                  void* svExt){
+    sendMsg(new LocEngReportSv(mLocEngAdapter, svStatus,
+                               locationExtended, svExt));
+}
+
+void LocEngAdapter::reportSv(GpsSvStatus &svStatus,
+                             GpsLocationExtended &locationExtended,
+                             void* svExt)
+{
+
+    // We want to send SV info to ULP to help it in determining GNSS
+    // signal strength ULP will forward the SV reports to HAL without
+    // any modifications
+    if (! mUlp->reportSv(svStatus, locationExtended, svExt)) {
+        mInternalAdapter->reportSv(svStatus, locationExtended, svExt);
+    }
+}
+
+void LocEngAdapter::setInSession(bool inSession)
+{
+    mNavigating = inSession;
+    mLocApi->setInSession(inSession);
+    if (!mNavigating) {
+        mFixCriteria.mode = LOC_POSITION_MODE_INVALID;
+    }
+}
+
+void LocInternalAdapter::reportStatus(GpsStatusValue status)
+{
+    sendMsg(new LocEngReportStatus(mLocEngAdapter, status));
+}
+
+void LocEngAdapter::reportStatus(GpsStatusValue status)
+{
+    if (!mUlp->reportStatus(status)) {
+        mInternalAdapter->reportStatus(status);
+    }
+}
+
+inline
+void LocEngAdapter::reportNmea(const char* nmea, int length)
+{
+    sendMsg(new LocEngReportNmea(mOwner, nmea, length));
+}
+
+inline
+bool LocEngAdapter::reportXtraServer(const char* url1,
+                                        const char* url2,
+                                        const char* url3,
+                                        const int maxlength)
+{
+    if (mSupportsAgpsRequests) {
+        sendMsg(new LocEngReportXtraServer(mOwner, url1,
+                                           url2, url3, maxlength));
+    }
+    return mSupportsAgpsRequests;
+}
+
+inline
+bool LocEngAdapter::requestATL(int connHandle, AGpsType agps_type)
+{
+    if (mSupportsAgpsRequests) {
+        sendMsg(new LocEngRequestATL(mOwner,
+                                     connHandle, agps_type));
+    }
+    return mSupportsAgpsRequests;
+}
+
+inline
+bool LocEngAdapter::releaseATL(int connHandle)
+{
+    if (mSupportsAgpsRequests) {
+        sendMsg(new LocEngReleaseATL(mOwner, connHandle));
+    }
+    return mSupportsAgpsRequests;
+}
+
+inline
+bool LocEngAdapter::requestXtraData()
+{
+    if (mSupportsAgpsRequests) {
+        sendMsg(new LocEngRequestXtra(mOwner));
+    }
+    return mSupportsAgpsRequests;
+}
+
+inline
+bool LocEngAdapter::requestTime()
+{
+    if (mSupportsAgpsRequests) {
+        sendMsg(new LocEngRequestTime(mOwner));
+    }
+    return mSupportsAgpsRequests;
+}
+
+inline
+bool LocEngAdapter::requestNiNotify(GpsNiNotification &notif, const void* data)
+{
+    if (mSupportsAgpsRequests) {
+        notif.size = sizeof(notif);
+        notif.timeout = LOC_NI_NO_RESPONSE_TIME;
+
+        sendMsg(new LocEngRequestNi(mOwner, notif, data));
+    }
+    return mSupportsAgpsRequests;
+}
+
+inline
+bool LocEngAdapter::requestSuplES(int connHandle)
+{
+    if (mSupportsAgpsRequests)
+        sendMsg(new LocEngRequestSuplEs(mOwner, connHandle));
+    return mSupportsAgpsRequests;
+}
+
+inline
+bool LocEngAdapter::reportDataCallOpened()
+{
+    if(mSupportsAgpsRequests)
+        sendMsg(new LocEngSuplEsOpened(mOwner));
+    return mSupportsAgpsRequests;
+}
+
+inline
+bool LocEngAdapter::reportDataCallClosed()
+{
+    if(mSupportsAgpsRequests)
+        sendMsg(new LocEngSuplEsClosed(mOwner));
+    return mSupportsAgpsRequests;
+}
+
+inline
+void LocEngAdapter::handleEngineDownEvent()
+{
+    sendMsg(new LocEngDown(mOwner));
+}
+
+inline
+void LocEngAdapter::handleEngineUpEvent()
+{
+    sendMsg(new LocEngUp(mOwner));
+}
+
+enum loc_api_adapter_err LocEngAdapter::setTime(GpsUtcTime time,
+                                                int64_t timeReference,
+                                                int uncertainty)
+{
+    loc_api_adapter_err result = LOC_API_ADAPTER_ERR_SUCCESS;
+
+    LOC_LOGD("%s:%d]: mSupportsTimeInjection is %d",
+             __func__, __LINE__, mSupportsTimeInjection);
+
+    if (mSupportsTimeInjection) {
+        LOC_LOGD("%s:%d]: Injecting time", __func__, __LINE__);
+        result = mLocApi->setTime(time, timeReference, uncertainty);
+    } else {
+        mSupportsTimeInjection = true;
+    }
+    return result;
+}
+
+enum loc_api_adapter_err LocEngAdapter::setXtraVersionCheck(int check)
+{
+    enum loc_api_adapter_err ret;
+    ENTRY_LOG();
+    enum xtra_version_check eCheck;
+    switch (check) {
+    case 0:
+        eCheck = DISABLED;
+        break;
+    case 1:
+        eCheck = AUTO;
+        break;
+    case 2:
+        eCheck = XTRA2;
+        break;
+    case 3:
+        eCheck = XTRA3;
+        break;
+    default:
+        eCheck = DISABLED;
+    }
+    ret = mLocApi->setXtraVersionCheck(eCheck);
+    EXIT_LOG(%d, ret);
+    return ret;
+}
+
+void LocEngAdapter::reportGpsMeasurementData(GpsData &gpsMeasurementData)
+{
+    sendMsg(new LocEngReportGpsMeasurement(mOwner,
+                                           gpsMeasurementData));
+}
+
+/*
+  Update Registration Mask
+ */
+void LocEngAdapter::updateRegistrationMask(LOC_API_ADAPTER_EVENT_MASK_T event,
+                                           loc_registration_mask_status isEnabled)
+{
+    LOC_LOGD("entering %s", __func__);
+    int result = LOC_API_ADAPTER_ERR_FAILURE;
+    result = mLocApi->updateRegistrationMask(event, isEnabled);
+    if (result == LOC_API_ADAPTER_ERR_SUCCESS) {
+        LOC_LOGD("%s] update registration mask succeed.", __func__);
+    } else {
+        LOC_LOGE("%s] update registration mask failed.", __func__);
+    }
+}
+
+/*
+  Set Gnss Constellation Config
+ */
+bool LocEngAdapter::gnssConstellationConfig()
+{
+    LOC_LOGD("entering %s", __func__);
+    bool result = false;
+    result = mLocApi->gnssConstellationConfig();
+    return result;
+}
diff --git a/gps/loc_api/libloc_api_50001/LocEngAdapter.h b/gps/loc_api/libloc_api_50001/LocEngAdapter.h
new file mode 100644
index 0000000..e5d1018
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/LocEngAdapter.h
@@ -0,0 +1,350 @@
+/* Copyright (c) 2011-2014, 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 LOC_API_ENG_ADAPTER_H
+#define LOC_API_ENG_ADAPTER_H
+
+#include <ctype.h>
+#include <hardware/gps.h>
+#include <loc.h>
+#include <loc_eng_log.h>
+#include <log_util.h>
+#include <LocAdapterBase.h>
+#include <LocDualContext.h>
+#include <UlpProxyBase.h>
+#include <platform_lib_includes.h>
+
+#define MAX_URL_LEN 256
+
+using namespace loc_core;
+
+class LocEngAdapter;
+
+class LocInternalAdapter : public LocAdapterBase {
+    LocEngAdapter* mLocEngAdapter;
+public:
+    LocInternalAdapter(LocEngAdapter* adapter);
+
+    virtual void reportPosition(UlpLocation &location,
+                                GpsLocationExtended &locationExtended,
+                                void* locationExt,
+                                enum loc_sess_status status,
+                                LocPosTechMask loc_technology_mask);
+    virtual void reportSv(GpsSvStatus &svStatus,
+                          GpsLocationExtended &locationExtended,
+                          void* svExt);
+    virtual void reportStatus(GpsStatusValue status);
+    virtual void setPositionModeInt(LocPosMode& posMode);
+    virtual void startFixInt();
+    virtual void stopFixInt();
+    virtual void getZppInt();
+    virtual void setUlpProxy(UlpProxyBase* ulp);
+    virtual void shutdown();
+};
+
+typedef void (*loc_msg_sender)(void* loc_eng_data_p, void* msgp);
+
+class LocEngAdapter : public LocAdapterBase {
+    void* mOwner;
+    LocInternalAdapter* mInternalAdapter;
+    UlpProxyBase* mUlp;
+    LocPosMode mFixCriteria;
+    bool mNavigating;
+    // mPowerVote is encoded as
+    // mPowerVote & 0x20 -- powerVoteRight
+    // mPowerVote & 0x10 -- power On / Off
+    unsigned int mPowerVote;
+    static const unsigned int POWER_VOTE_RIGHT = 0x20;
+    static const unsigned int POWER_VOTE_VALUE = 0x10;
+
+public:
+    bool mSupportsAgpsRequests;
+    bool mSupportsPositionInjection;
+    bool mSupportsTimeInjection;
+
+    LocEngAdapter(LOC_API_ADAPTER_EVENT_MASK_T mask,
+                  void* owner, ContextBase* context,
+                  MsgTask::tCreate tCreator);
+    virtual ~LocEngAdapter();
+
+    virtual void setUlpProxy(UlpProxyBase* ulp);
+    inline void requestUlp(unsigned long capabilities) {
+        mContext->requestUlp(mInternalAdapter, capabilities);
+    }
+    inline LocInternalAdapter* getInternalAdapter() { return mInternalAdapter; }
+    inline UlpProxyBase* getUlpProxy() { return mUlp; }
+    inline void* getOwner() { return mOwner; }
+    inline bool hasAgpsExtendedCapabilities() {
+        return mContext->hasAgpsExtendedCapabilities();
+    }
+    inline bool hasCPIExtendedCapabilities() {
+        return mContext->hasCPIExtendedCapabilities();
+    }
+    inline const MsgTask* getMsgTask() { return mMsgTask; }
+
+    inline enum loc_api_adapter_err
+        startFix()
+    {
+        return mLocApi->startFix(mFixCriteria);
+    }
+    inline enum loc_api_adapter_err
+        stopFix()
+    {
+        return mLocApi->stopFix();
+    }
+    inline enum loc_api_adapter_err
+        deleteAidingData(GpsAidingData f)
+    {
+        return mLocApi->deleteAidingData(f);
+    }
+    inline enum loc_api_adapter_err
+        enableData(int enable)
+    {
+        return mLocApi->enableData(enable);
+    }
+    inline enum loc_api_adapter_err
+        setAPN(char* apn, int len)
+    {
+        return mLocApi->setAPN(apn, len);
+    }
+    inline enum loc_api_adapter_err
+        injectPosition(double latitude, double longitude, float accuracy)
+    {
+        return mLocApi->injectPosition(latitude, longitude, accuracy);
+    }
+    inline enum loc_api_adapter_err
+        setXtraData(char* data, int length)
+    {
+        return mLocApi->setXtraData(data, length);
+    }
+    inline enum loc_api_adapter_err
+        requestXtraServer()
+    {
+        return mLocApi->requestXtraServer();
+    }
+    inline enum loc_api_adapter_err
+        atlOpenStatus(int handle, int is_succ, char* apn, AGpsBearerType bearer, AGpsType agpsType)
+    {
+        return mLocApi->atlOpenStatus(handle, is_succ, apn, bearer, agpsType);
+    }
+    inline enum loc_api_adapter_err
+        atlCloseStatus(int handle, int is_succ)
+    {
+        return mLocApi->atlCloseStatus(handle, is_succ);
+    }
+    inline enum loc_api_adapter_err
+        setPositionMode(const LocPosMode *posMode)
+    {
+        if (NULL != posMode) {
+            mFixCriteria = *posMode;
+        }
+        return mLocApi->setPositionMode(mFixCriteria);
+    }
+    inline enum loc_api_adapter_err
+        setServer(const char* url, int len)
+    {
+        return mLocApi->setServer(url, len);
+    }
+    inline enum loc_api_adapter_err
+        setServer(unsigned int ip, int port,
+                  LocServerType type)
+    {
+        return mLocApi->setServer(ip, port, type);
+    }
+    inline enum loc_api_adapter_err
+        informNiResponse(GpsUserResponseType userResponse, const void* passThroughData)
+    {
+        return mLocApi->informNiResponse(userResponse, passThroughData);
+    }
+    inline enum loc_api_adapter_err
+        setSUPLVersion(uint32_t version)
+    {
+        return mLocApi->setSUPLVersion(version);
+    }
+    inline enum loc_api_adapter_err
+        setLPPConfig(uint32_t profile)
+    {
+        return mLocApi->setLPPConfig(profile);
+    }
+    inline enum loc_api_adapter_err
+        setSensorControlConfig(int sensorUsage, int sensorProvider)
+    {
+        return mLocApi->setSensorControlConfig(sensorUsage, sensorProvider);
+    }
+    inline enum loc_api_adapter_err
+        setSensorProperties(bool gyroBiasVarianceRandomWalk_valid, float gyroBiasVarianceRandomWalk,
+                            bool accelBiasVarianceRandomWalk_valid, float accelBiasVarianceRandomWalk,
+                            bool angleBiasVarianceRandomWalk_valid, float angleBiasVarianceRandomWalk,
+                            bool rateBiasVarianceRandomWalk_valid, float rateBiasVarianceRandomWalk,
+                            bool velocityBiasVarianceRandomWalk_valid, float velocityBiasVarianceRandomWalk)
+    {
+        return mLocApi->setSensorProperties(gyroBiasVarianceRandomWalk_valid, gyroBiasVarianceRandomWalk,
+                                           accelBiasVarianceRandomWalk_valid, accelBiasVarianceRandomWalk,
+                                           angleBiasVarianceRandomWalk_valid, angleBiasVarianceRandomWalk,
+                                           rateBiasVarianceRandomWalk_valid, rateBiasVarianceRandomWalk,
+                                           velocityBiasVarianceRandomWalk_valid, velocityBiasVarianceRandomWalk);
+    }
+    inline virtual enum loc_api_adapter_err
+        setSensorPerfControlConfig(int controlMode, int accelSamplesPerBatch, int accelBatchesPerSec,
+                            int gyroSamplesPerBatch, int gyroBatchesPerSec,
+                            int accelSamplesPerBatchHigh, int accelBatchesPerSecHigh,
+                            int gyroSamplesPerBatchHigh, int gyroBatchesPerSecHigh, int algorithmConfig)
+    {
+        return mLocApi->setSensorPerfControlConfig(controlMode, accelSamplesPerBatch, accelBatchesPerSec,
+                                                  gyroSamplesPerBatch, gyroBatchesPerSec,
+                                                  accelSamplesPerBatchHigh, accelBatchesPerSecHigh,
+                                                  gyroSamplesPerBatchHigh, gyroBatchesPerSecHigh,
+                                                  algorithmConfig);
+    }
+    inline virtual enum loc_api_adapter_err
+        setExtPowerConfig(int isBatteryCharging)
+    {
+        return mLocApi->setExtPowerConfig(isBatteryCharging);
+    }
+    inline virtual enum loc_api_adapter_err
+        setAGLONASSProtocol(unsigned long aGlonassProtocol)
+    {
+        return mLocApi->setAGLONASSProtocol(aGlonassProtocol);
+    }
+    inline virtual int initDataServiceClient()
+    {
+        return mLocApi->initDataServiceClient();
+    }
+    inline virtual int openAndStartDataCall()
+    {
+        return mLocApi->openAndStartDataCall();
+    }
+    inline virtual void stopDataCall()
+    {
+        mLocApi->stopDataCall();
+    }
+    inline virtual void closeDataCall()
+    {
+        mLocApi->closeDataCall();
+    }
+    inline enum loc_api_adapter_err
+        getZpp(GpsLocation &zppLoc, LocPosTechMask &tech_mask)
+    {
+        return mLocApi->getBestAvailableZppFix(zppLoc, tech_mask);
+    }
+    enum loc_api_adapter_err setTime(GpsUtcTime time,
+                                     int64_t timeReference,
+                                     int uncertainty);
+    enum loc_api_adapter_err setXtraVersionCheck(int check);
+    inline virtual void installAGpsCert(const DerEncodedCertificate* pData,
+                                        size_t length,
+                                        uint32_t slotBitMask)
+    {
+        mLocApi->installAGpsCert(pData, length, slotBitMask);
+    }
+    virtual void handleEngineDownEvent();
+    virtual void handleEngineUpEvent();
+    virtual void reportPosition(UlpLocation &location,
+                                GpsLocationExtended &locationExtended,
+                                void* locationExt,
+                                enum loc_sess_status status,
+                                LocPosTechMask loc_technology_mask);
+    virtual void reportSv(GpsSvStatus &svStatus,
+                          GpsLocationExtended &locationExtended,
+                          void* svExt);
+    virtual void reportStatus(GpsStatusValue status);
+    virtual void reportNmea(const char* nmea, int length);
+    virtual bool reportXtraServer(const char* url1, const char* url2,
+                                  const char* url3, const int maxlength);
+    virtual bool requestXtraData();
+    virtual bool requestTime();
+    virtual bool requestATL(int connHandle, AGpsType agps_type);
+    virtual bool releaseATL(int connHandle);
+    virtual bool requestNiNotify(GpsNiNotification &notify, const void* data);
+    virtual bool requestSuplES(int connHandle);
+    virtual bool reportDataCallOpened();
+    virtual bool reportDataCallClosed();
+    virtual void reportGpsMeasurementData(GpsData &gpsMeasurementData);
+
+    inline const LocPosMode& getPositionMode() const
+    {return mFixCriteria;}
+    inline virtual bool isInSession()
+    { return mNavigating; }
+    void setInSession(bool inSession);
+
+    // Permit/prohibit power voting
+    inline void setPowerVoteRight(bool powerVoteRight) {
+        mPowerVote = powerVoteRight ? (mPowerVote | POWER_VOTE_RIGHT) :
+                                      (mPowerVote & ~POWER_VOTE_RIGHT);
+    }
+    inline bool getPowerVoteRight() const {
+        return (mPowerVote & POWER_VOTE_RIGHT) != 0 ;
+    }
+    // Set the power voting up/down and do actual operation if permitted
+    inline void setPowerVote(bool powerOn) {
+        mPowerVote = powerOn ? (mPowerVote | POWER_VOTE_VALUE) :
+                               (mPowerVote & ~POWER_VOTE_VALUE);
+        requestPowerVote();
+    }
+    inline bool getPowerVote() const {
+        return (mPowerVote & POWER_VOTE_VALUE) != 0 ;
+    }
+    // Do power voting according to last settings if permitted
+    void requestPowerVote();
+
+    /*Values for lock
+      1 = Do not lock any position sessions
+      2 = Lock MI position sessions
+      3 = Lock MT position sessions
+      4 = Lock all position sessions
+    */
+    inline int setGpsLock(LOC_GPS_LOCK_MASK lock)
+    {
+        return mLocApi->setGpsLock(lock);
+    }
+
+    int setGpsLockMsg(LOC_GPS_LOCK_MASK lock);
+
+    /*
+      Returns
+      Current value of GPS lock on success
+      -1 on failure
+     */
+    inline int getGpsLock()
+    {
+        return mLocApi->getGpsLock();
+    }
+
+    /*
+      Update Registration Mask
+     */
+    void updateRegistrationMask(LOC_API_ADAPTER_EVENT_MASK_T event,
+                                loc_registration_mask_status isEnabled);
+
+    /*
+      Set Gnss Constellation Config
+     */
+    bool gnssConstellationConfig();
+};
+
+#endif //LOC_API_ENG_ADAPTER_H
diff --git a/gps/loc_api/libloc_api_50001/Makefile.am b/gps/loc_api/libloc_api_50001/Makefile.am
new file mode 100644
index 0000000..2374357
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/Makefile.am
@@ -0,0 +1,76 @@
+AM_CFLAGS = \
+     -I../../utils \
+     -I../../platform_lib_abstractions \
+     -fno-short-enums \
+     -DFEATURE_GNSS_BIT_API
+
+libloc_adapter_so_la_SOURCES = loc_eng_log.cpp LocEngAdapter.cpp
+
+if USE_GLIB
+libloc_adapter_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
+libloc_adapter_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
+libloc_adapter_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
+else
+libloc_adapter_so_la_CFLAGS = $(AM_CFLAGS)
+libloc_adapter_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
+libloc_adapter_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
+endif
+libloc_adapter_so_la_LIBADD = -lstdc++ -lcutils ../../utils/libgps_utils_so.la
+
+
+libloc_eng_so_la_SOURCES = \
+    loc_eng.cpp \
+    loc_eng_agps.cpp \
+    loc_eng_xtra.cpp \
+    loc_eng_ni.cpp \
+    loc_eng_log.cpp \
+    loc_eng_dmn_conn.cpp \
+    loc_eng_dmn_conn_handler.cpp \
+    loc_eng_dmn_conn_thread_helper.c \
+    loc_eng_dmn_conn_glue_msg.c \
+    loc_eng_dmn_conn_glue_pipe.c
+
+
+if USE_GLIB
+libloc_eng_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
+libloc_eng_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
+libloc_eng_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
+else
+libloc_eng_so_la_CFLAGS = $(AM_CFLAGS)
+libloc_eng_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
+libloc_eng_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
+endif
+
+libloc_eng_so_la_LIBADD = -lstdc++ -lcutils -ldl ../../utils/libgps_utils_so.la libloc_adapter_so.la
+
+
+libgps_default_so_la_SOURCES = \
+      loc.cpp \
+      gps.c
+
+if USE_GLIB
+libgps_default_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
+libgps_default_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
+libgps_default_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
+else
+libgps_default_so_la_CFLAGS = $(AM_CFLAGS)
+libgps_default_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
+libgps_default_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
+endif
+
+libgps_default_so_la_LIBADD = -lstdc++ -lcutils ../../utils/libgps_utils_so.la -ldl libloc_eng_so.la
+
+library_include_HEADERS = \
+   LocEngAdapter.h \
+   loc.h \
+   loc_eng.h \
+   loc_eng_xtra.h \
+   loc_eng_ni.h \
+   loc_eng_agps.h \
+   loc_eng_msg.h \
+   loc_eng_log.h
+
+library_includedir = $(pkgincludedir)/libloc_api_50001
+
+#Create and Install libraries
+lib_LTLIBRARIES = libloc_adapter_so.la libloc_eng_so.la libgps_default_so.la
diff --git a/gps/loc_api/libloc_api_50001/gps.c b/gps/loc_api/libloc_api_50001/gps.c
new file mode 100644
index 0000000..b0669af
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/gps.c
@@ -0,0 +1,72 @@
+/* Copyright (c) 2011 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.
+ *
+ */
+
+#include <hardware/gps.h>
+
+#include <stdlib.h>
+
+extern const GpsInterface* get_gps_interface();
+
+const GpsInterface* gps__get_gps_interface(struct gps_device_t* dev)
+{
+    return get_gps_interface();
+}
+
+static int open_gps(const struct hw_module_t* module, char const* name,
+        struct hw_device_t** device)
+{
+    struct gps_device_t *dev = (struct gps_device_t *) malloc(sizeof(struct gps_device_t));
+
+    if(dev == NULL)
+        return -1;
+
+    memset(dev, 0, sizeof(*dev));
+
+    dev->common.tag = HARDWARE_DEVICE_TAG;
+    dev->common.version = 0;
+    dev->common.module = (struct hw_module_t*)module;
+    dev->get_gps_interface = gps__get_gps_interface;
+
+    *device = (struct hw_device_t*)dev;
+    return 0;
+}
+
+static struct hw_module_methods_t gps_module_methods = {
+    .open = open_gps
+};
+
+struct hw_module_t HAL_MODULE_INFO_SYM = {
+    .tag = HARDWARE_MODULE_TAG,
+    .module_api_version = 1,
+    .hal_api_version = 0,
+    .id = GPS_HARDWARE_MODULE_ID,
+    .name = "loc_api GPS Module",
+    .author = "Qualcomm USA, Inc.",
+    .methods = &gps_module_methods,
+};
diff --git a/gps/loc_api/libloc_api_50001/loc.cpp b/gps/loc_api/libloc_api_50001/loc.cpp
new file mode 100644
index 0000000..4cf4ba9
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc.cpp
@@ -0,0 +1,1184 @@
+/* Copyright (c) 2011-2014, 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.
+ *
+ */
+
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_afw"
+
+#include <hardware/gps.h>
+#include <gps_extended.h>
+#include <loc_eng.h>
+#include <loc_target.h>
+#include <loc_log.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <dlfcn.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <LocDualContext.h>
+#include <cutils/properties.h>
+
+#ifdef MODEM_POWER_VOTE
+#include <pm-service.h>
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+#include <mdm_detect.h>
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /*MODEM_POWER_VOTE*/
+
+using namespace loc_core;
+
+#define LOC_PM_CLIENT_NAME "GPS"
+
+//Globals defns
+static gps_location_callback gps_loc_cb = NULL;
+static gps_sv_status_callback gps_sv_cb = NULL;
+
+static void local_loc_cb(UlpLocation* location, void* locExt);
+static void local_sv_cb(GpsSvStatus* sv_status, void* svExt);
+
+static const GpsGeofencingInterface* get_geofence_interface(void);
+
+// Function declarations for sLocEngInterface
+static int  loc_init(GpsCallbacks* callbacks);
+static int  loc_start();
+static int  loc_stop();
+static void loc_cleanup();
+static int  loc_inject_time(GpsUtcTime time, int64_t timeReference, int uncertainty);
+static int  loc_inject_location(double latitude, double longitude, float accuracy);
+static void loc_delete_aiding_data(GpsAidingData f);
+static int  loc_set_position_mode(GpsPositionMode mode, GpsPositionRecurrence recurrence,
+                                  uint32_t min_interval, uint32_t preferred_accuracy,
+                                  uint32_t preferred_time);
+static const void* loc_get_extension(const char* name);
+static void loc_close_mdm_node();
+// Defines the GpsInterface in gps.h
+static const GpsInterface sLocEngInterface =
+{
+   sizeof(GpsInterface),
+   loc_init,
+   loc_start,
+   loc_stop,
+   loc_cleanup,
+   loc_inject_time,
+   loc_inject_location,
+   loc_delete_aiding_data,
+   loc_set_position_mode,
+   loc_get_extension
+};
+
+// Function declarations for sLocEngAGpsInterface
+static void loc_agps_init(AGpsCallbacks* callbacks);
+static int  loc_agps_open(const char* apn);
+static int  loc_agps_closed();
+static int  loc_agps_open_failed();
+static int  loc_agps_set_server(AGpsType type, const char *hostname, int port);
+
+static const AGpsInterface sLocEngAGpsInterface =
+{
+   sizeof(AGpsInterface),
+   loc_agps_init,
+   loc_agps_open,
+   loc_agps_closed,
+   loc_agps_open_failed,
+   loc_agps_set_server
+};
+
+static int loc_xtra_init(GpsXtraCallbacks* callbacks);
+static int loc_xtra_inject_data(char* data, int length);
+
+static const GpsXtraInterface sLocEngXTRAInterface =
+{
+    sizeof(GpsXtraInterface),
+    loc_xtra_init,
+    loc_xtra_inject_data
+};
+
+static void loc_ni_init(GpsNiCallbacks *callbacks);
+static void loc_ni_respond(int notif_id, GpsUserResponseType user_response);
+
+static const GpsNiInterface sLocEngNiInterface =
+{
+   sizeof(GpsNiInterface),
+   loc_ni_init,
+   loc_ni_respond,
+};
+
+#ifdef MODEM_POWER_VOTE
+typedef struct {
+    //MAX_NAME_LEN defined in mdm_detect.h
+    char modem_name[MAX_NAME_LEN];
+    //MAX_PATH_LEN defined in mdm_detect.h
+    char powerup_node[MAX_PATH_LEN];
+    //this handle is used by peripheral mgr
+    void *handle;
+    int mdm_fd;
+    MdmType mdm_type;
+    bool peripheral_mgr_supported;
+    bool peripheral_mgr_registered;
+}s_loc_mdm_info;
+static s_loc_mdm_info loc_mdm_info;
+static void loc_pm_event_notifier(void *client_data, enum pm_event event);
+#endif /*MODEM_POWER_VOTE*/
+// For shutting down MDM in fusion devices
+static int mdm_fd = -1;
+static int loc_gps_measurement_init(GpsMeasurementCallbacks* callbacks);
+static void loc_gps_measurement_close();
+
+static const GpsMeasurementInterface sLocEngGpsMeasurementInterface =
+{
+    sizeof(GpsMeasurementInterface),
+    loc_gps_measurement_init,
+    loc_gps_measurement_close
+};
+
+static void loc_agps_ril_init( AGpsRilCallbacks* callbacks );
+static void loc_agps_ril_set_ref_location(const AGpsRefLocation *agps_reflocation, size_t sz_struct);
+static void loc_agps_ril_set_set_id(AGpsSetIDType type, const char* setid);
+static void loc_agps_ril_ni_message(uint8_t *msg, size_t len);
+static void loc_agps_ril_update_network_state(int connected, int type, int roaming, const char* extra_info);
+static void loc_agps_ril_update_network_availability(int avaiable, const char* apn);
+
+static const AGpsRilInterface sLocEngAGpsRilInterface =
+{
+   sizeof(AGpsRilInterface),
+   loc_agps_ril_init,
+   loc_agps_ril_set_ref_location,
+   loc_agps_ril_set_set_id,
+   loc_agps_ril_ni_message,
+   loc_agps_ril_update_network_state,
+   loc_agps_ril_update_network_availability
+};
+
+static int loc_agps_install_certificates(const DerEncodedCertificate* certificates,
+                                         size_t length);
+static int loc_agps_revoke_certificates(const Sha1CertificateFingerprint* fingerprints,
+                                        size_t length);
+
+static const SuplCertificateInterface sLocEngAGpsCertInterface =
+{
+    sizeof(SuplCertificateInterface),
+    loc_agps_install_certificates,
+    loc_agps_revoke_certificates
+};
+
+static void loc_configuration_update(const char* config_data, int32_t length);
+
+static const GnssConfigurationInterface sLocEngConfigInterface =
+{
+    sizeof(GnssConfigurationInterface),
+    loc_configuration_update
+};
+
+static loc_eng_data_s_type loc_afw_data;
+static int gss_fd = -1;
+
+/*===========================================================================
+FUNCTION    gps_get_hardware_interface
+
+DESCRIPTION
+   Returns the GPS hardware interaface based on LOC API
+   if GPS is enabled.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+const GpsInterface* gps_get_hardware_interface ()
+{
+    ENTRY_LOG_CALLFLOW();
+    const GpsInterface* ret_val;
+
+    char propBuf[PROPERTY_VALUE_MAX];
+
+    loc_eng_read_config();
+
+    // check to see if GPS should be disabled
+    property_get("gps.disable", propBuf, "");
+    if (propBuf[0] == '1')
+    {
+        LOC_LOGD("gps_get_interface returning NULL because gps.disable=1\n");
+        ret_val = NULL;
+    } else {
+        ret_val = &sLocEngInterface;
+    }
+
+    loc_eng_read_config();
+
+    EXIT_LOG(%p, ret_val);
+    return ret_val;
+}
+
+// for gps.c
+extern "C" const GpsInterface* get_gps_interface()
+{
+    unsigned int target = TARGET_DEFAULT;
+    loc_eng_read_config();
+
+    target = loc_get_target();
+    LOC_LOGD("Target name check returned %s", loc_get_target_name(target));
+
+    int gnssType = getTargetGnssType(target);
+    switch (gnssType)
+    {
+    case GNSS_GSS:
+    case GNSS_AUTO:
+        //APQ8064
+        gps_conf.CAPABILITIES &= ~(GPS_CAPABILITY_MSA | GPS_CAPABILITY_MSB);
+        gss_fd = open("/dev/gss", O_RDONLY);
+        if (gss_fd < 0) {
+            LOC_LOGE("GSS open failed: %s\n", strerror(errno));
+        }
+        else {
+            LOC_LOGD("GSS open success! CAPABILITIES %0lx\n",
+                     gps_conf.CAPABILITIES);
+        }
+        break;
+    case GNSS_NONE:
+        //MPQ8064
+        LOC_LOGE("No GPS HW on this target. Not returning interface.");
+        return NULL;
+    case GNSS_QCA1530:
+        // qca1530 chip is present
+        gps_conf.CAPABILITIES &= ~(GPS_CAPABILITY_MSA | GPS_CAPABILITY_MSB);
+        LOC_LOGD("qca1530 present: CAPABILITIES %0lx\n", gps_conf.CAPABILITIES);
+        break;
+    }
+    return &sLocEngInterface;
+}
+
+/*===========================================================================
+FUNCTION    loc_init
+
+DESCRIPTION
+   Initialize the location engine, this include setting up global datas
+   and registers location engien with loc api service.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/Ax
+
+===========================================================================*/
+static int loc_init(GpsCallbacks* callbacks)
+{
+    int retVal = -1;
+#ifdef MODEM_POWER_VOTE
+    enum pm_event mdm_state;
+    static int mdm_index = -1;
+    int peripheral_mgr_ret = PM_RET_FAILED;
+#endif /*MODEM_POWER_VOTE*/
+    ENTRY_LOG();
+    LOC_API_ADAPTER_EVENT_MASK_T event;
+
+    if (NULL == callbacks) {
+        LOC_LOGE("loc_init failed. cb = NULL\n");
+        EXIT_LOG(%d, retVal);
+        return retVal;
+    }
+
+    event = LOC_API_ADAPTER_BIT_PARSED_POSITION_REPORT |
+            LOC_API_ADAPTER_BIT_SATELLITE_REPORT |
+            LOC_API_ADAPTER_BIT_LOCATION_SERVER_REQUEST |
+            LOC_API_ADAPTER_BIT_ASSISTANCE_DATA_REQUEST |
+            LOC_API_ADAPTER_BIT_IOCTL_REPORT |
+            LOC_API_ADAPTER_BIT_STATUS_REPORT |
+            LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT |
+            LOC_API_ADAPTER_BIT_NI_NOTIFY_VERIFY_REQUEST;
+
+    LocCallbacks clientCallbacks = {local_loc_cb, /* location_cb */
+                                    callbacks->status_cb, /* status_cb */
+                                    local_sv_cb, /* sv_status_cb */
+                                    callbacks->nmea_cb, /* nmea_cb */
+                                    callbacks->set_capabilities_cb, /* set_capabilities_cb */
+                                    callbacks->acquire_wakelock_cb, /* acquire_wakelock_cb */
+                                    callbacks->release_wakelock_cb, /* release_wakelock_cb */
+                                    callbacks->create_thread_cb, /* create_thread_cb */
+                                    NULL, /* location_ext_parser */
+                                    NULL, /* sv_ext_parser */
+                                    callbacks->request_utc_time_cb, /* request_utc_time_cb */
+                                    loc_close_mdm_node  /*loc_shutdown_cb*/};
+
+    gps_loc_cb = callbacks->location_cb;
+    gps_sv_cb = callbacks->sv_status_cb;
+
+    retVal = loc_eng_init(loc_afw_data, &clientCallbacks, event, NULL);
+    loc_afw_data.adapter->mSupportsAgpsRequests = !loc_afw_data.adapter->hasAgpsExtendedCapabilities();
+    loc_afw_data.adapter->mSupportsPositionInjection = !loc_afw_data.adapter->hasCPIExtendedCapabilities();
+    loc_afw_data.adapter->mSupportsTimeInjection = !loc_afw_data.adapter->hasCPIExtendedCapabilities();
+    loc_afw_data.adapter->setGpsLockMsg(0);
+    loc_afw_data.adapter->requestUlp(getCarrierCapabilities());
+
+    if(retVal) {
+        LOC_LOGE("loc_eng_init() fail!");
+        goto err;
+    }
+
+    loc_afw_data.adapter->setPowerVoteRight(loc_get_target() == TARGET_QCA1530);
+    loc_afw_data.adapter->setPowerVote(true);
+
+    LOC_LOGD("loc_eng_init() success!");
+
+#ifdef MODEM_POWER_VOTE
+    //if index is 0 or more, then we've looked for mdm already
+    LOC_LOGD("%s:%d]: mdm_index: %d", __func__, __LINE__,
+             mdm_index);
+    if (mdm_index < 0) {
+        struct dev_info modem_info;
+        memset(&modem_info, 0, sizeof(struct dev_info));
+        if(get_system_info(&modem_info) != RET_SUCCESS) {
+            LOC_LOGE("%s:%d]: Error: get_system_info returned error\n",
+                     __func__, __LINE__);
+            goto err;
+        }
+
+        for(mdm_index = 0;
+            mdm_index < modem_info.num_modems;
+            mdm_index++) {
+            if(modem_info.mdm_list[mdm_index].mdm_name) {
+                //Copy modem name to register with peripheral manager
+                strlcpy(loc_mdm_info.modem_name,
+                        modem_info.mdm_list[mdm_index].mdm_name,
+                        sizeof(loc_mdm_info.modem_name));
+                //copy powerup node name if we need to use mdmdetect method
+                strlcpy(loc_mdm_info.powerup_node,
+                        modem_info.mdm_list[mdm_index].powerup_node,
+                        sizeof(loc_mdm_info.powerup_node));
+                loc_mdm_info.mdm_type = modem_info.mdm_list[mdm_index].type;
+                LOC_LOGD("%s:%d]: Found modem: %s, powerup node:%s at index: %d",
+                         __func__, __LINE__, loc_mdm_info.modem_name, loc_mdm_info.powerup_node,
+                         mdm_index);
+                break;
+            }
+        }
+    }
+
+    if(loc_mdm_info.peripheral_mgr_registered != true) {
+        peripheral_mgr_ret = pm_client_register(loc_pm_event_notifier,
+                                                &loc_mdm_info,
+                                                loc_mdm_info.modem_name,
+                                                LOC_PM_CLIENT_NAME,
+                                                &mdm_state,
+                                                &loc_mdm_info.handle);
+        if(peripheral_mgr_ret == PM_RET_SUCCESS) {
+            loc_mdm_info.peripheral_mgr_supported = true;
+            loc_mdm_info.peripheral_mgr_registered = true;
+            LOC_LOGD("%s:%d]: registered with peripheral mgr for %s",
+                     __func__, __LINE__, loc_mdm_info.modem_name);
+        }
+        else if(peripheral_mgr_ret == PM_RET_UNSUPPORTED) {
+            loc_mdm_info.peripheral_mgr_registered = true;
+            loc_mdm_info.peripheral_mgr_supported = false;
+            LOC_LOGD("%s:%d]: peripheral mgr unsupported for: %s",
+                     __func__, __LINE__, loc_mdm_info.modem_name);
+        }
+        else {
+            //Not setting any flags here so that we can try again the next time around
+            LOC_LOGE("%s:%d]: Error: pm_client_register returned: %d",
+                     __func__, __LINE__, peripheral_mgr_ret);
+        }
+    }
+
+    if(loc_mdm_info.peripheral_mgr_supported == false &&
+       loc_mdm_info.peripheral_mgr_registered == true) {
+        //Peripheral mgr is not supported
+        //use legacy method to open the powerup node
+        LOC_LOGD("%s:%d]: powerup_node: %s", __func__, __LINE__,
+                 loc_mdm_info.powerup_node);
+        loc_mdm_info.mdm_fd = open(loc_mdm_info.powerup_node, O_RDONLY);
+
+        if (loc_mdm_info.mdm_fd < 0) {
+            LOC_LOGE("Error: %s open failed: %s\n",
+                     loc_mdm_info.powerup_node, strerror(errno));
+        } else {
+            LOC_LOGD("%s opens success!", loc_mdm_info.powerup_node);
+        }
+    }
+    else if(loc_mdm_info.peripheral_mgr_supported == true &&
+            loc_mdm_info.peripheral_mgr_registered == true) {
+        LOC_LOGD("%s:%d]: Voting for modem power up", __func__, __LINE__);
+        pm_client_connect(loc_mdm_info.handle);
+    }
+    else {
+        LOC_LOGD("%s:%d]: Not voted for modem power up due to errors", __func__, __LINE__);
+    }
+#endif /*MODEM_POWER_VOTE*/
+err:
+    EXIT_LOG(%d, retVal);
+    return retVal;
+}
+
+/*===========================================================================
+FUNCTION    loc_close_mdm_node
+
+DESCRIPTION
+   closes loc_mdm_info.mdm_fd which is the modem powerup node obtained in loc_init
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static void loc_close_mdm_node()
+{
+    ENTRY_LOG();
+#ifdef MODEM_POWER_VOTE
+    if(loc_mdm_info.peripheral_mgr_supported == true) {
+        LOC_LOGD("%s:%d]: Voting for modem power down", __func__, __LINE__);
+        pm_client_disconnect(loc_mdm_info.handle);
+    }
+    else if (loc_mdm_info.mdm_fd >= 0) {
+        LOC_LOGD("closing the powerup node");
+        close(loc_mdm_info.mdm_fd);
+        loc_mdm_info.mdm_fd = -1;
+        LOC_LOGD("finished closing the powerup node");
+    }
+    else {
+        LOC_LOGD("powerup node has not been opened yet.");
+    }
+#endif /*MODEM_POWER_VOTE*/
+    EXIT_LOG(%s, VOID_RET);
+}
+
+/*===========================================================================
+FUNCTION    loc_cleanup
+
+DESCRIPTION
+   Cleans location engine. The location client handle will be released.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static void loc_cleanup()
+{
+    ENTRY_LOG();
+
+    loc_afw_data.adapter->setPowerVote(false);
+    loc_afw_data.adapter->setGpsLockMsg(gps_conf.GPS_LOCK);
+
+    loc_eng_cleanup(loc_afw_data);
+    loc_close_mdm_node();
+    gps_loc_cb = NULL;
+    gps_sv_cb = NULL;
+
+    EXIT_LOG(%s, VOID_RET);
+}
+
+/*===========================================================================
+FUNCTION    loc_start
+
+DESCRIPTION
+   Starts the tracking session
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int loc_start()
+{
+    ENTRY_LOG();
+    int ret_val = loc_eng_start(loc_afw_data);
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_stop
+
+DESCRIPTION
+   Stops the tracking session
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int loc_stop()
+{
+    ENTRY_LOG();
+    int ret_val = -1;
+    ret_val = loc_eng_stop(loc_afw_data);
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_set_position_mode
+
+DESCRIPTION
+   Sets the mode and fix frequency for the tracking session.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int  loc_set_position_mode(GpsPositionMode mode,
+                                  GpsPositionRecurrence recurrence,
+                                  uint32_t min_interval,
+                                  uint32_t preferred_accuracy,
+                                  uint32_t preferred_time)
+{
+    ENTRY_LOG();
+    int ret_val = -1;
+    LocPositionMode locMode;
+    switch (mode) {
+    case GPS_POSITION_MODE_MS_BASED:
+        locMode = LOC_POSITION_MODE_MS_BASED;
+        break;
+    case GPS_POSITION_MODE_MS_ASSISTED:
+        locMode = LOC_POSITION_MODE_MS_ASSISTED;
+        break;
+    default:
+        locMode = LOC_POSITION_MODE_STANDALONE;
+        break;
+    }
+
+    LocPosMode params(locMode, recurrence, min_interval,
+                      preferred_accuracy, preferred_time, NULL, NULL);
+    ret_val = loc_eng_set_position_mode(loc_afw_data, params);
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_inject_time
+
+DESCRIPTION
+   This is used by Java native function to do time injection.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int loc_inject_time(GpsUtcTime time, int64_t timeReference, int uncertainty)
+{
+    ENTRY_LOG();
+    int ret_val = 0;
+
+    ret_val = loc_eng_inject_time(loc_afw_data, time,
+                                  timeReference, uncertainty);
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+
+/*===========================================================================
+FUNCTION    loc_inject_location
+
+DESCRIPTION
+   This is used by Java native function to do location injection.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0          : Successful
+   error code : Failure
+
+SIDE EFFECTS
+   N/A
+===========================================================================*/
+static int loc_inject_location(double latitude, double longitude, float accuracy)
+{
+    ENTRY_LOG();
+
+    int ret_val = 0;
+    ret_val = loc_eng_inject_location(loc_afw_data, latitude, longitude, accuracy);
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+
+/*===========================================================================
+FUNCTION    loc_delete_aiding_data
+
+DESCRIPTION
+   This is used by Java native function to delete the aiding data. The function
+   updates the global variable for the aiding data to be deleted. If the GPS
+   engine is off, the aiding data will be deleted. Otherwise, the actual action
+   will happen when gps engine is turned off.
+
+DEPENDENCIES
+   Assumes the aiding data type specified in GpsAidingData matches with
+   LOC API specification.
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static void loc_delete_aiding_data(GpsAidingData f)
+{
+    ENTRY_LOG();
+    loc_eng_delete_aiding_data(loc_afw_data, f);
+
+    EXIT_LOG(%s, VOID_RET);
+}
+
+const GpsGeofencingInterface* get_geofence_interface(void)
+{
+    ENTRY_LOG();
+    void *handle;
+    const char *error;
+    typedef const GpsGeofencingInterface* (*get_gps_geofence_interface_function) (void);
+    get_gps_geofence_interface_function get_gps_geofence_interface;
+    static const GpsGeofencingInterface* geofence_interface = NULL;
+
+    dlerror();    /* Clear any existing error */
+
+    handle = dlopen ("libgeofence.so", RTLD_NOW);
+
+    if (!handle)
+    {
+        if ((error = dlerror()) != NULL)  {
+            LOC_LOGE ("%s, dlopen for libgeofence.so failed, error = %s\n", __func__, error);
+           }
+        goto exit;
+    }
+    dlerror();    /* Clear any existing error */
+    get_gps_geofence_interface = (get_gps_geofence_interface_function)dlsym(handle, "gps_geofence_get_interface");
+    if ((error = dlerror()) != NULL && NULL != get_gps_geofence_interface)  {
+        LOC_LOGE ("%s, dlsym for get_gps_geofence_interface failed, error = %s\n", __func__, error);
+        goto exit;
+     }
+
+    geofence_interface = get_gps_geofence_interface();
+
+exit:
+    EXIT_LOG(%d, geofence_interface == NULL);
+    return geofence_interface;
+}
+/*===========================================================================
+FUNCTION    loc_get_extension
+
+DESCRIPTION
+   Get the gps extension to support XTRA.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   The GPS extension interface.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+const void* loc_get_extension(const char* name)
+{
+    ENTRY_LOG();
+    const void* ret_val = NULL;
+
+   LOC_LOGD("%s:%d] For Interface = %s\n",__func__, __LINE__, name);
+   if (strcmp(name, GPS_XTRA_INTERFACE) == 0)
+   {
+       ret_val = &sLocEngXTRAInterface;
+   }
+   else if (strcmp(name, AGPS_INTERFACE) == 0)
+   {
+       ret_val = &sLocEngAGpsInterface;
+   }
+   else if (strcmp(name, GPS_NI_INTERFACE) == 0)
+   {
+       ret_val = &sLocEngNiInterface;
+   }
+   else if (strcmp(name, AGPS_RIL_INTERFACE) == 0)
+   {
+       char baseband[PROPERTY_VALUE_MAX];
+       property_get("ro.baseband", baseband, "msm");
+       if (strcmp(baseband, "csfb") == 0)
+       {
+           ret_val = &sLocEngAGpsRilInterface;
+       }
+   }
+   else if (strcmp(name, GPS_GEOFENCING_INTERFACE) == 0)
+   {
+       if ((gps_conf.CAPABILITIES | GPS_CAPABILITY_GEOFENCING) == gps_conf.CAPABILITIES ){
+           ret_val = get_geofence_interface();
+       }
+   }
+   else if (strcmp(name, SUPL_CERTIFICATE_INTERFACE) == 0)
+   {
+       ret_val = &sLocEngAGpsCertInterface;
+   }
+   else if (strcmp(name, GNSS_CONFIGURATION_INTERFACE) == 0)
+   {
+       ret_val = &sLocEngConfigInterface;
+   }
+   else if (strcmp(name, GPS_MEASUREMENT_INTERFACE) == 0)
+   {
+       ret_val = &sLocEngGpsMeasurementInterface;
+   }
+   else
+   {
+      LOC_LOGE ("get_extension: Invalid interface passed in\n");
+   }
+    EXIT_LOG(%p, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_agps_init
+
+DESCRIPTION
+   Initialize the AGps interface.
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static void loc_agps_init(AGpsCallbacks* callbacks)
+{
+    ENTRY_LOG();
+    loc_eng_agps_init(loc_afw_data, (AGpsExtCallbacks*)callbacks);
+    EXIT_LOG(%s, VOID_RET);
+}
+
+/*===========================================================================
+FUNCTION    loc_agps_open
+
+DESCRIPTION
+   This function is called when on-demand data connection opening is successful.
+It should inform ARM 9 about the data open result.
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int loc_agps_open(const char* apn)
+{
+    ENTRY_LOG();
+    AGpsType agpsType = AGPS_TYPE_SUPL;
+    AGpsBearerType bearerType = AGPS_APN_BEARER_IPV4;
+    int ret_val = loc_eng_agps_open(loc_afw_data, agpsType, apn, bearerType);
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_agps_closed
+
+DESCRIPTION
+   This function is called when on-demand data connection closing is done.
+It should inform ARM 9 about the data close result.
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int loc_agps_closed()
+{
+    ENTRY_LOG();
+    AGpsType agpsType = AGPS_TYPE_SUPL;
+    int ret_val = loc_eng_agps_closed(loc_afw_data, agpsType);
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_agps_open_failed
+
+DESCRIPTION
+   This function is called when on-demand data connection opening has failed.
+It should inform ARM 9 about the data open result.
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_agps_open_failed()
+{
+    ENTRY_LOG();
+    AGpsType agpsType = AGPS_TYPE_SUPL;
+    int ret_val = loc_eng_agps_open_failed(loc_afw_data, agpsType);
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_agps_set_server
+
+DESCRIPTION
+   If loc_eng_set_server is called before loc_eng_init, it doesn't work. This
+   proxy buffers server settings and calls loc_eng_set_server when the client is
+   open.
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int loc_agps_set_server(AGpsType type, const char* hostname, int port)
+{
+    ENTRY_LOG();
+    LocServerType serverType;
+    switch (type) {
+    case AGPS_TYPE_SUPL:
+        serverType = LOC_AGPS_SUPL_SERVER;
+        break;
+    case AGPS_TYPE_C2K:
+        serverType = LOC_AGPS_CDMA_PDE_SERVER;
+        break;
+    default:
+        serverType = LOC_AGPS_SUPL_SERVER;
+    }
+    int ret_val = loc_eng_set_server_proxy(loc_afw_data, serverType, hostname, port);
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTIONf571
+    loc_xtra_init
+
+DESCRIPTION
+   Initialize XTRA module.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int loc_xtra_init(GpsXtraCallbacks* callbacks)
+{
+    ENTRY_LOG();
+    int ret_val = loc_eng_xtra_init(loc_afw_data, (GpsXtraExtCallbacks*)callbacks);
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+
+/*===========================================================================
+FUNCTION    loc_xtra_inject_data
+
+DESCRIPTION
+   Initialize XTRA module.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int loc_xtra_inject_data(char* data, int length)
+{
+    ENTRY_LOG();
+    int ret_val = -1;
+    if( (data != NULL) && ((unsigned int)length <= XTRA_DATA_MAX_SIZE))
+        ret_val = loc_eng_xtra_inject_data(loc_afw_data, data, length);
+    else
+        LOC_LOGE("%s, Could not inject XTRA data. Buffer address: %p, length: %d",
+                 __func__, data, length);
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_gps_measurement_init
+
+DESCRIPTION
+   This function initializes the gps measurement interface
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int loc_gps_measurement_init(GpsMeasurementCallbacks* callbacks)
+{
+    ENTRY_LOG();
+    int ret_val = loc_eng_gps_measurement_init(loc_afw_data,
+                                               callbacks);
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_gps_measurement_close
+
+DESCRIPTION
+   This function closes the gps measurement interface
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static void loc_gps_measurement_close()
+{
+    ENTRY_LOG();
+    loc_eng_gps_measurement_close(loc_afw_data);
+
+    EXIT_LOG(%s, VOID_RET);
+}
+
+/*===========================================================================
+FUNCTION    loc_ni_init
+
+DESCRIPTION
+   This function initializes the NI interface
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_ni_init(GpsNiCallbacks *callbacks)
+{
+    ENTRY_LOG();
+    loc_eng_ni_init(loc_afw_data,(GpsNiExtCallbacks*) callbacks);
+    EXIT_LOG(%s, VOID_RET);
+}
+
+/*===========================================================================
+FUNCTION    loc_ni_respond
+
+DESCRIPTION
+   This function sends an NI respond to the modem processor
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_ni_respond(int notif_id, GpsUserResponseType user_response)
+{
+    ENTRY_LOG();
+    loc_eng_ni_respond(loc_afw_data, notif_id, user_response);
+    EXIT_LOG(%s, VOID_RET);
+}
+
+// Below stub functions are members of sLocEngAGpsRilInterface
+static void loc_agps_ril_init( AGpsRilCallbacks* callbacks ) {}
+static void loc_agps_ril_set_ref_location(const AGpsRefLocation *agps_reflocation, size_t sz_struct) {}
+static void loc_agps_ril_set_set_id(AGpsSetIDType type, const char* setid) {}
+static void loc_agps_ril_ni_message(uint8_t *msg, size_t len) {}
+static void loc_agps_ril_update_network_state(int connected, int type, int roaming, const char* extra_info) {}
+
+/*===========================================================================
+FUNCTION    loc_agps_ril_update_network_availability
+
+DESCRIPTION
+   Sets data call allow vs disallow flag to modem
+   This is the only member of sLocEngAGpsRilInterface implemented.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static void loc_agps_ril_update_network_availability(int available, const char* apn)
+{
+    ENTRY_LOG();
+    loc_eng_agps_ril_update_network_availability(loc_afw_data, available, apn);
+    EXIT_LOG(%s, VOID_RET);
+}
+
+static int loc_agps_install_certificates(const DerEncodedCertificate* certificates,
+                                         size_t length)
+{
+    ENTRY_LOG();
+    int ret_val = loc_eng_agps_install_certificates(loc_afw_data, certificates, length);
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+static int loc_agps_revoke_certificates(const Sha1CertificateFingerprint* fingerprints,
+                                        size_t length)
+{
+    ENTRY_LOG();
+    LOC_LOGE("%s:%d]: agps_revoke_certificates not supported");
+    int ret_val = AGPS_CERTIFICATE_ERROR_GENERIC;
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+static void loc_configuration_update(const char* config_data, int32_t length)
+{
+    ENTRY_LOG();
+    loc_eng_configuration_update(loc_afw_data, config_data, length);
+    EXIT_LOG(%s, VOID_RET);
+}
+
+static void local_loc_cb(UlpLocation* location, void* locExt)
+{
+    ENTRY_LOG();
+    if (NULL != location) {
+        CALLBACK_LOG_CALLFLOW("location_cb - from", %d, location->position_source);
+
+        if (NULL != gps_loc_cb) {
+            gps_loc_cb(&location->gpsLocation);
+        }
+    }
+    EXIT_LOG(%s, VOID_RET);
+}
+
+static void local_sv_cb(GpsSvStatus* sv_status, void* svExt)
+{
+    ENTRY_LOG();
+    if (NULL != gps_sv_cb) {
+        CALLBACK_LOG_CALLFLOW("sv_status_cb -", %d, sv_status->num_svs);
+        gps_sv_cb(sv_status);
+    }
+    EXIT_LOG(%s, VOID_RET);
+}
+
+#ifdef MODEM_POWER_VOTE
+static void loc_pm_event_notifier(void *client_data, enum pm_event event)
+{
+    ENTRY_LOG();
+    LOC_LOGD("%s:%d]: event: %d", __func__, __LINE__, (int)event);
+    pm_client_event_acknowledge(loc_mdm_info.handle, event);
+    EXIT_LOG(%s, VOID_RET);
+}
+#endif /*MODEM_POWER_VOTE*/
diff --git a/gps/loc_api/libloc_api_50001/loc.h b/gps/loc_api/libloc_api_50001/loc.h
new file mode 100644
index 0000000..6352866
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc.h
@@ -0,0 +1,68 @@
+/* Copyright (c) 2011,2014 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 __LOC_H__
+#define __LOC_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <ctype.h>
+#include <cutils/properties.h>
+#include <hardware/gps.h>
+#include <gps_extended.h>
+
+#define XTRA_DATA_MAX_SIZE 100000 /*bytes*/
+
+typedef void (*loc_location_cb_ext) (UlpLocation* location, void* locExt);
+typedef void (*loc_sv_status_cb_ext) (GpsSvStatus* sv_status, void* svExt);
+typedef void* (*loc_ext_parser)(void* data);
+typedef void (*loc_shutdown_cb) (void);
+
+typedef struct {
+    loc_location_cb_ext location_cb;
+    gps_status_callback status_cb;
+    loc_sv_status_cb_ext sv_status_cb;
+    gps_nmea_callback nmea_cb;
+    gps_set_capabilities set_capabilities_cb;
+    gps_acquire_wakelock acquire_wakelock_cb;
+    gps_release_wakelock release_wakelock_cb;
+    gps_create_thread create_thread_cb;
+    loc_ext_parser location_ext_parser;
+    loc_ext_parser sv_ext_parser;
+    gps_request_utc_time request_utc_time_cb;
+    loc_shutdown_cb shutdown_cb;
+} LocCallbacks;
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif //__LOC_H__
diff --git a/gps/loc_api/libloc_api_50001/loc_eng.cpp b/gps/loc_api/libloc_api_50001/loc_eng.cpp
new file mode 100644
index 0000000..051f208
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng.cpp
@@ -0,0 +1,3060 @@
+/* Copyright (c) 2009-2014, 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.
+ *
+ */
+
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_eng"
+
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <dlfcn.h>
+#include <ctype.h>
+#include <math.h>
+#include <pthread.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>         /* struct sockaddr_in */
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <netdb.h>
+#include <time.h>
+#include <new>
+#include <LocEngAdapter.h>
+
+#include <cutils/sched_policy.h>
+#ifndef USE_GLIB
+#include <utils/SystemClock.h>
+#include <utils/Log.h>
+#endif /* USE_GLIB */
+
+#ifdef USE_GLIB
+#include <glib.h>
+#include <sys/syscall.h>
+#endif /* USE_GLIB */
+
+#include <string.h>
+
+#include <loc_eng.h>
+#include <loc_eng_ni.h>
+#include <loc_eng_dmn_conn.h>
+#include <loc_eng_dmn_conn_handler.h>
+#include <loc_eng_msg.h>
+#include <loc_eng_nmea.h>
+#include <msg_q.h>
+#include <loc.h>
+#include "log_util.h"
+#include "platform_lib_includes.h"
+#include "loc_core_log.h"
+#include "loc_eng_log.h"
+
+#define SUCCESS TRUE
+#define FAILURE FALSE
+
+#ifndef GPS_CONF_FILE
+#define GPS_CONF_FILE            "/etc/gps.conf"   //??? platform independent
+#endif
+
+#ifndef SAP_CONF_FILE
+#define SAP_CONF_FILE            "/etc/sap.conf"
+#endif
+
+#define XTRA1_GPSONEXTRA         "xtra1.gpsonextra.net"
+
+using namespace loc_core;
+
+boolean configAlreadyRead = false;
+unsigned int agpsStatus = 0;
+loc_gps_cfg_s_type gps_conf;
+loc_sap_cfg_s_type sap_conf;
+
+/* Parameter spec table */
+static loc_param_s_type gps_conf_table[] =
+{
+  {"GPS_LOCK",                       &gps_conf.GPS_LOCK,                       NULL, 'n'},
+  {"SUPL_VER",                       &gps_conf.SUPL_VER,                       NULL, 'n'},
+  {"LPP_PROFILE",                    &gps_conf.LPP_PROFILE,                    NULL, 'n'},
+  {"A_GLONASS_POS_PROTOCOL_SELECT",  &gps_conf.A_GLONASS_POS_PROTOCOL_SELECT,  NULL, 'n'},
+  {"AGPS_CERT_WRITABLE_MASK",        &gps_conf.AGPS_CERT_WRITABLE_MASK,        NULL, 'n'},
+  {"SUPL_MODE",                      &gps_conf.SUPL_MODE,                      NULL, 'n'},
+  {"INTERMEDIATE_POS",               &gps_conf.INTERMEDIATE_POS,               NULL, 'n'},
+  {"ACCURACY_THRES",                 &gps_conf.ACCURACY_THRES,                 NULL, 'n'},
+  {"NMEA_PROVIDER",                  &gps_conf.NMEA_PROVIDER,                  NULL, 'n'},
+  {"CAPABILITIES",                   &gps_conf.CAPABILITIES,                   NULL, 'n'},
+  {"USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL",  &gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL,          NULL, 'n'},
+};
+
+static loc_param_s_type sap_conf_table[] =
+{
+  {"GYRO_BIAS_RANDOM_WALK",          &sap_conf.GYRO_BIAS_RANDOM_WALK,          &sap_conf.GYRO_BIAS_RANDOM_WALK_VALID, 'f'},
+  {"ACCEL_RANDOM_WALK_SPECTRAL_DENSITY",     &sap_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY,    &sap_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID, 'f'},
+  {"ANGLE_RANDOM_WALK_SPECTRAL_DENSITY",     &sap_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY,    &sap_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY_VALID, 'f'},
+  {"RATE_RANDOM_WALK_SPECTRAL_DENSITY",      &sap_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY,     &sap_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY_VALID, 'f'},
+  {"VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY",  &sap_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY, &sap_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY_VALID, 'f'},
+  {"SENSOR_ACCEL_BATCHES_PER_SEC",   &sap_conf.SENSOR_ACCEL_BATCHES_PER_SEC,   NULL, 'n'},
+  {"SENSOR_ACCEL_SAMPLES_PER_BATCH", &sap_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH, NULL, 'n'},
+  {"SENSOR_GYRO_BATCHES_PER_SEC",    &sap_conf.SENSOR_GYRO_BATCHES_PER_SEC,    NULL, 'n'},
+  {"SENSOR_GYRO_SAMPLES_PER_BATCH",  &sap_conf.SENSOR_GYRO_SAMPLES_PER_BATCH,  NULL, 'n'},
+  {"SENSOR_ACCEL_BATCHES_PER_SEC_HIGH",   &sap_conf.SENSOR_ACCEL_BATCHES_PER_SEC_HIGH,   NULL, 'n'},
+  {"SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH", &sap_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH, NULL, 'n'},
+  {"SENSOR_GYRO_BATCHES_PER_SEC_HIGH",    &sap_conf.SENSOR_GYRO_BATCHES_PER_SEC_HIGH,    NULL, 'n'},
+  {"SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH",  &sap_conf.SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH,  NULL, 'n'},
+  {"SENSOR_CONTROL_MODE",            &sap_conf.SENSOR_CONTROL_MODE,            NULL, 'n'},
+  {"SENSOR_USAGE",                   &sap_conf.SENSOR_USAGE,                   NULL, 'n'},
+  {"SENSOR_ALGORITHM_CONFIG_MASK",   &sap_conf.SENSOR_ALGORITHM_CONFIG_MASK,   NULL, 'n'},
+  {"SENSOR_PROVIDER",                &sap_conf.SENSOR_PROVIDER,                NULL, 'n'},
+  {"XTRA_VERSION_CHECK",             &gps_conf.XTRA_VERSION_CHECK,                  NULL, 'n'},
+  {"XTRA_SERVER_1",                  &gps_conf.XTRA_SERVER_1,                  NULL, 's'},
+  {"XTRA_SERVER_2",                  &gps_conf.XTRA_SERVER_2,                  NULL, 's'},
+  {"XTRA_SERVER_3",                  &gps_conf.XTRA_SERVER_3,                  NULL, 's'},
+  {"AGPS_CERT_WRITABLE_MASK",        &gps_conf.AGPS_CERT_WRITABLE_MASK,        NULL, 'n'}
+};
+
+static void loc_default_parameters(void)
+{
+   /*Defaults for gps.conf*/
+   gps_conf.INTERMEDIATE_POS = 0;
+   gps_conf.ACCURACY_THRES = 0;
+   gps_conf.NMEA_PROVIDER = 0;
+   gps_conf.GPS_LOCK = 0;
+   gps_conf.SUPL_VER = 0x10000;
+   gps_conf.SUPL_MODE = 0x3;
+   gps_conf.CAPABILITIES = 0x7;
+   /* LTE Positioning Profile configuration is disable by default*/
+   gps_conf.LPP_PROFILE = 0;
+   /*By default no positioning protocol is selected on A-GLONASS system*/
+   gps_conf.A_GLONASS_POS_PROTOCOL_SELECT = 0;
+   /*XTRA version check is disabled by default*/
+   gps_conf.XTRA_VERSION_CHECK=0;
+   /*Use emergency PDN by default*/
+   gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL = 1;
+
+   /*Defaults for sap.conf*/
+   sap_conf.GYRO_BIAS_RANDOM_WALK = 0;
+   sap_conf.SENSOR_ACCEL_BATCHES_PER_SEC = 2;
+   sap_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH = 5;
+   sap_conf.SENSOR_GYRO_BATCHES_PER_SEC = 2;
+   sap_conf.SENSOR_GYRO_SAMPLES_PER_BATCH = 5;
+   sap_conf.SENSOR_ACCEL_BATCHES_PER_SEC_HIGH = 4;
+   sap_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH = 25;
+   sap_conf.SENSOR_GYRO_BATCHES_PER_SEC_HIGH = 4;
+   sap_conf.SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH = 25;
+   sap_conf.SENSOR_CONTROL_MODE = 0; /* AUTO */
+   sap_conf.SENSOR_USAGE = 0; /* Enabled */
+   sap_conf.SENSOR_ALGORITHM_CONFIG_MASK = 0; /* INS Disabled = FALSE*/
+   /* Values MUST be set by OEMs in configuration for sensor-assisted
+      navigation to work. There are NO default values */
+   sap_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY = 0;
+   sap_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY = 0;
+   sap_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY = 0;
+   sap_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY = 0;
+   sap_conf.GYRO_BIAS_RANDOM_WALK_VALID = 0;
+   sap_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID = 0;
+   sap_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY_VALID = 0;
+   sap_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY_VALID = 0;
+   sap_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY_VALID = 0;
+   /* default provider is SSC */
+   sap_conf.SENSOR_PROVIDER = 1;
+
+   /* None of the 10 slots for agps certificates are writable by default */
+   gps_conf.AGPS_CERT_WRITABLE_MASK = 0;
+}
+
+// 2nd half of init(), singled out for
+// modem restart to use.
+static int loc_eng_reinit(loc_eng_data_s_type &loc_eng_data);
+static void loc_eng_agps_reinit(loc_eng_data_s_type &loc_eng_data);
+
+static int loc_eng_set_server(loc_eng_data_s_type &loc_eng_data,
+                              LocServerType type, const char *hostname, int port);
+// Internal functions
+static void loc_inform_gps_status(loc_eng_data_s_type &loc_eng_data,
+                                  GpsStatusValue status);
+static void loc_eng_report_status(loc_eng_data_s_type &loc_eng_data,
+                                  GpsStatusValue status);
+static void loc_eng_process_conn_request(loc_eng_data_s_type &loc_eng_data,
+                                         int connHandle, AGpsType agps_type);
+static void loc_eng_agps_close_status(loc_eng_data_s_type &loc_eng_data, int is_succ);
+static void loc_eng_handle_engine_down(loc_eng_data_s_type &loc_eng_data) ;
+static void loc_eng_handle_engine_up(loc_eng_data_s_type &loc_eng_data) ;
+
+static int loc_eng_start_handler(loc_eng_data_s_type &loc_eng_data);
+static int loc_eng_stop_handler(loc_eng_data_s_type &loc_eng_data);
+static int loc_eng_get_zpp_handler(loc_eng_data_s_type &loc_eng_data);
+static void loc_eng_handle_shutdown(loc_eng_data_s_type &loc_eng_data);
+static void deleteAidingData(loc_eng_data_s_type &logEng);
+static AgpsStateMachine*
+getAgpsStateMachine(loc_eng_data_s_type& logEng, AGpsExtType agpsType);
+static int dataCallCb(void *cb_data);
+static void update_aiding_data_for_deletion(loc_eng_data_s_type& loc_eng_data) {
+    if (loc_eng_data.engine_status != GPS_STATUS_ENGINE_ON &&
+        loc_eng_data.aiding_data_for_deletion != 0)
+    {
+        loc_eng_data.adapter->deleteAidingData(loc_eng_data.aiding_data_for_deletion);
+        loc_eng_data.aiding_data_for_deletion = 0;
+    }
+}
+
+static void* noProc(void* data)
+{
+    return NULL;
+}
+
+
+/*********************************************************************
+ * definitions of the static messages used in the file
+ *********************************************************************/
+//        case LOC_ENG_MSG_REQUEST_NI:
+LocEngRequestNi::LocEngRequestNi(void* locEng,
+                                 GpsNiNotification &notif,
+                                 const void* data) :
+    LocMsg(), mLocEng(locEng), mNotify(notif), mPayload(data) {
+    locallog();
+}
+void LocEngRequestNi::proc() const {
+    loc_eng_ni_request_handler(*((loc_eng_data_s_type*)mLocEng),
+                               &mNotify, mPayload);
+}
+void LocEngRequestNi::locallog() const
+{
+    LOC_LOGV("id: %d\n  type: %s\n  flags: %d\n  time out: %d\n  "
+             "default response: %s\n  requestor id encoding: %s\n"
+             "  text encoding: %s\n  passThroughData: %p",
+             mNotify.notification_id,
+             loc_get_ni_type_name(mNotify.ni_type),
+             mNotify.notify_flags,
+             mNotify.timeout,
+             loc_get_ni_response_name(mNotify.default_response),
+             loc_get_ni_encoding_name(mNotify.requestor_id_encoding),
+             loc_get_ni_encoding_name(mNotify.text_encoding),
+             mPayload);
+}
+inline void LocEngRequestNi::log() const {
+    locallog();
+}
+
+//        case LOC_ENG_MSG_INFORM_NI_RESPONSE:
+// in loc_eng_ni.cpp
+
+//        case LOC_ENG_MSG_START_FIX:
+LocEngStartFix::LocEngStartFix(LocEngAdapter* adapter) :
+    LocMsg(), mAdapter(adapter)
+{
+    locallog();
+}
+inline void LocEngStartFix::proc() const
+{
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mAdapter->getOwner();
+    loc_eng_start_handler(*locEng);
+}
+inline void LocEngStartFix::locallog() const
+{
+    LOC_LOGV("LocEngStartFix");
+}
+inline void LocEngStartFix::log() const
+{
+    locallog();
+}
+void LocEngStartFix::send() const {
+    mAdapter->sendMsg(this);
+}
+
+//        case LOC_ENG_MSG_STOP_FIX:
+LocEngStopFix::LocEngStopFix(LocEngAdapter* adapter) :
+    LocMsg(), mAdapter(adapter)
+{
+    locallog();
+}
+inline void LocEngStopFix::proc() const
+{
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mAdapter->getOwner();
+    loc_eng_stop_handler(*locEng);
+}
+inline void LocEngStopFix::locallog() const
+{
+    LOC_LOGV("LocEngStopFix");
+}
+inline void LocEngStopFix::log() const
+{
+    locallog();
+}
+void LocEngStopFix::send() const {
+    mAdapter->sendMsg(this);
+}
+
+//        case LOC_ENG_MSG_SET_POSITION_MODE:
+LocEngPositionMode::LocEngPositionMode(LocEngAdapter* adapter,
+                                       LocPosMode &mode) :
+    LocMsg(), mAdapter(adapter), mPosMode(mode)
+{
+    mPosMode.logv();
+}
+inline void LocEngPositionMode::proc() const {
+    mAdapter->setPositionMode(&mPosMode);
+}
+inline void LocEngPositionMode::log() const {
+    mPosMode.logv();
+}
+void LocEngPositionMode::send() const {
+    mAdapter->sendMsg(this);
+}
+
+LocEngGetZpp::LocEngGetZpp(LocEngAdapter* adapter) :
+    LocMsg(), mAdapter(adapter)
+{
+    locallog();
+}
+inline void LocEngGetZpp::proc() const
+{
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mAdapter->getOwner();
+    loc_eng_get_zpp_handler(*locEng);
+}
+inline void LocEngGetZpp::locallog() const
+{
+    LOC_LOGV("LocEngGetZpp");
+}
+inline void LocEngGetZpp::log() const
+{
+    locallog();
+}
+void LocEngGetZpp::send() const {
+    mAdapter->sendMsg(this);
+}
+
+
+LocEngShutdown::LocEngShutdown(LocEngAdapter* adapter) :
+    LocMsg(), mAdapter(adapter)
+{
+    locallog();
+}
+inline void LocEngShutdown::proc() const
+{
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mAdapter->getOwner();
+    LOC_LOGD("%s:%d]: Calling loc_eng_handle_shutdown", __func__, __LINE__);
+    loc_eng_handle_shutdown(*locEng);
+}
+inline void LocEngShutdown::locallog() const
+{
+    LOC_LOGV("LocEngShutdown");
+}
+inline void LocEngShutdown::log() const
+{
+    locallog();
+}
+
+//        case LOC_ENG_MSG_SET_TIME:
+struct LocEngSetTime : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const GpsUtcTime mTime;
+    const int64_t mTimeReference;
+    const int mUncertainty;
+    inline LocEngSetTime(LocEngAdapter* adapter,
+                         GpsUtcTime t, int64_t tf, int unc) :
+        LocMsg(), mAdapter(adapter),
+        mTime(t), mTimeReference(tf), mUncertainty(unc)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mAdapter->setTime(mTime, mTimeReference, mUncertainty);
+    }
+    inline void locallog() const {
+        LOC_LOGV("time: %lld\n  timeReference: %lld\n  uncertainty: %d",
+                 mTime, mTimeReference, mUncertainty);
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+ //       case LOC_ENG_MSG_INJECT_LOCATION:
+struct LocEngInjectLocation : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const double mLatitude;
+    const double mLongitude;
+    const float mAccuracy;
+    inline LocEngInjectLocation(LocEngAdapter* adapter,
+                                double lat, double lon, float accur) :
+        LocMsg(), mAdapter(adapter),
+        mLatitude(lat), mLongitude(lon), mAccuracy(accur)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mAdapter->injectPosition(mLatitude, mLongitude, mAccuracy);
+    }
+    inline void locallog() const {
+        LOC_LOGV("latitude: %f\n  longitude: %f\n  accuracy: %f",
+                 mLatitude, mLongitude, mAccuracy);
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_SET_SERVER_IPV4:
+struct LocEngSetServerIpv4 : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const unsigned int mNlAddr;
+    const int mPort;
+    const LocServerType mServerType;
+    inline LocEngSetServerIpv4(LocEngAdapter* adapter,
+                               unsigned int ip,
+                               int port,
+                               LocServerType type) :
+        LocMsg(), mAdapter(adapter),
+        mNlAddr(ip), mPort(port), mServerType(type)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mAdapter->setServer(mNlAddr, mPort, mServerType);
+    }
+    inline void locallog() const {
+        LOC_LOGV("LocEngSetServerIpv4 - addr: %x, port: %d, type: %s",
+                 mNlAddr, mPort, loc_get_server_type_name(mServerType));
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_SET_SERVER_URL:
+struct LocEngSetServerUrl : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const int mLen;
+    char* mUrl;
+    inline LocEngSetServerUrl(LocEngAdapter* adapter,
+                              char* urlString,
+                              int url_len) :
+        LocMsg(), mAdapter(adapter),
+        mLen(url_len), mUrl(new char[mLen+1])
+    {
+        memcpy((void*)mUrl, (void*)urlString, url_len);
+        mUrl[mLen] = 0;
+        locallog();
+    }
+    inline ~LocEngSetServerUrl()
+    {
+        delete[] mUrl;
+    }
+    inline virtual void proc() const {
+        mAdapter->setServer(mUrl, mLen);
+    }
+    inline void locallog() const {
+        LOC_LOGV("LocEngSetServerUrl - url: %s", mUrl);
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_A_GLONASS_PROTOCOL:
+struct LocEngAGlonassProtocol : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const unsigned long mAGlonassProtocl;
+    inline LocEngAGlonassProtocol(LocEngAdapter* adapter,
+                                  unsigned long protocol) :
+        LocMsg(), mAdapter(adapter), mAGlonassProtocl(protocol)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mAdapter->setAGLONASSProtocol(mAGlonassProtocl);
+    }
+    inline  void locallog() const {
+        LOC_LOGV("A-GLONASS protocol: 0x%lx", mAGlonassProtocl);
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_SUPL_VERSION:
+struct LocEngSuplVer : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const int mSuplVer;
+    inline LocEngSuplVer(LocEngAdapter* adapter,
+                         int suplVer) :
+        LocMsg(), mAdapter(adapter), mSuplVer(suplVer)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mAdapter->setSUPLVersion(mSuplVer);
+    }
+    inline  void locallog() const {
+        LOC_LOGV("SUPL Version: %d", mSuplVer);
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+struct LocEngSuplMode : public LocMsg {
+    UlpProxyBase* mUlp;
+
+    inline LocEngSuplMode(UlpProxyBase* ulp) :
+        LocMsg(), mUlp(ulp)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mUlp->setCapabilities(getCarrierCapabilities());
+    }
+    inline  void locallog() const {
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_LPP_CONFIG:
+struct LocEngLppConfig : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const int mLppConfig;
+    inline LocEngLppConfig(LocEngAdapter* adapter,
+                           int lppConfig) :
+        LocMsg(), mAdapter(adapter), mLppConfig(lppConfig)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mAdapter->setLPPConfig(mLppConfig);
+    }
+    inline void locallog() const {
+        LOC_LOGV("LocEngLppConfig - profile: %d", mLppConfig);
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_SET_SENSOR_CONTROL_CONFIG:
+struct LocEngSensorControlConfig : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const int mSensorsDisabled;
+    const int mSensorProvider;
+    inline LocEngSensorControlConfig(LocEngAdapter* adapter,
+                                     int sensorsDisabled, int sensorProvider) :
+        LocMsg(), mAdapter(adapter), mSensorsDisabled(sensorsDisabled),
+        mSensorProvider(sensorProvider)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mAdapter->setSensorControlConfig(mSensorsDisabled, mSensorProvider);
+    }
+    inline  void locallog() const {
+        LOC_LOGV("LocEngSensorControlConfig - Sensors Disabled: %d, Sensor Provider: %d",
+                 mSensorsDisabled, mSensorProvider);
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_SET_SENSOR_PROPERTIES:
+struct LocEngSensorProperties : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const bool mGyroBiasVarianceRandomWalkValid;
+    const float mGyroBiasVarianceRandomWalk;
+    const bool mAccelRandomWalkValid;
+    const float mAccelRandomWalk;
+    const bool mAngleRandomWalkValid;
+    const float mAngleRandomWalk;
+    const bool mRateRandomWalkValid;
+    const float mRateRandomWalk;
+    const bool mVelocityRandomWalkValid;
+    const float mVelocityRandomWalk;
+    inline LocEngSensorProperties(LocEngAdapter* adapter,
+                                  bool gyroBiasRandomWalk_valid,
+                                  float gyroBiasRandomWalk,
+                                  bool accelRandomWalk_valid,
+                                  float accelRandomWalk,
+                                  bool angleRandomWalk_valid,
+                                  float angleRandomWalk,
+                                  bool rateRandomWalk_valid,
+                                  float rateRandomWalk,
+                                  bool velocityRandomWalk_valid,
+                                  float velocityRandomWalk) :
+        LocMsg(), mAdapter(adapter),
+        mGyroBiasVarianceRandomWalkValid(gyroBiasRandomWalk_valid),
+        mGyroBiasVarianceRandomWalk(gyroBiasRandomWalk),
+        mAccelRandomWalkValid(accelRandomWalk_valid),
+        mAccelRandomWalk(accelRandomWalk),
+        mAngleRandomWalkValid(angleRandomWalk_valid),
+        mAngleRandomWalk(angleRandomWalk),
+        mRateRandomWalkValid(rateRandomWalk_valid),
+        mRateRandomWalk(rateRandomWalk),
+        mVelocityRandomWalkValid(velocityRandomWalk_valid),
+        mVelocityRandomWalk(velocityRandomWalk)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mAdapter->setSensorProperties(mGyroBiasVarianceRandomWalkValid,
+                                      mGyroBiasVarianceRandomWalk,
+                                      mAccelRandomWalkValid,
+                                      mAccelRandomWalk,
+                                      mAngleRandomWalkValid,
+                                      mAngleRandomWalk,
+                                      mRateRandomWalkValid,
+                                      mRateRandomWalk,
+                                      mVelocityRandomWalkValid,
+                                      mVelocityRandomWalk);
+    }
+    inline  void locallog() const {
+        LOC_LOGV("Sensor properties validity, Gyro Random walk: %d "
+                 "Accel Random Walk: %d "
+                 "Angle Random Walk: %d Rate Random Walk: %d "
+                 "Velocity Random Walk: %d\n"
+                 "Sensor properties, Gyro Random walk: %f "
+                 "Accel Random Walk: %f "
+                 "Angle Random Walk: %f Rate Random Walk: %f "
+                 "Velocity Random Walk: %f",
+                 mGyroBiasVarianceRandomWalkValid,
+                 mAccelRandomWalkValid,
+                 mAngleRandomWalkValid,
+                 mRateRandomWalkValid,
+                 mVelocityRandomWalkValid,
+                 mGyroBiasVarianceRandomWalk,
+                 mAccelRandomWalk,
+                 mAngleRandomWalk,
+                 mRateRandomWalk,
+                 mVelocityRandomWalk
+            );
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_SET_SENSOR_PERF_CONTROL_CONFIG:
+struct LocEngSensorPerfControlConfig : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const int mControlMode;
+    const int mAccelSamplesPerBatch;
+    const int mAccelBatchesPerSec;
+    const int mGyroSamplesPerBatch;
+    const int mGyroBatchesPerSec;
+    const int mAccelSamplesPerBatchHigh;
+    const int mAccelBatchesPerSecHigh;
+    const int mGyroSamplesPerBatchHigh;
+    const int mGyroBatchesPerSecHigh;
+    const int mAlgorithmConfig;
+    inline LocEngSensorPerfControlConfig(LocEngAdapter* adapter,
+                                         int controlMode,
+                                         int accelSamplesPerBatch,
+                                         int accelBatchesPerSec,
+                                         int gyroSamplesPerBatch,
+                                         int gyroBatchesPerSec,
+                                         int accelSamplesPerBatchHigh,
+                                         int accelBatchesPerSecHigh,
+                                         int gyroSamplesPerBatchHigh,
+                                         int gyroBatchesPerSecHigh,
+                                         int algorithmConfig) :
+        LocMsg(), mAdapter(adapter),
+        mControlMode(controlMode),
+        mAccelSamplesPerBatch(accelSamplesPerBatch),
+        mAccelBatchesPerSec(accelBatchesPerSec),
+        mGyroSamplesPerBatch(gyroSamplesPerBatch),
+        mGyroBatchesPerSec(gyroBatchesPerSec),
+        mAccelSamplesPerBatchHigh(accelSamplesPerBatchHigh),
+        mAccelBatchesPerSecHigh(accelBatchesPerSecHigh),
+        mGyroSamplesPerBatchHigh(gyroSamplesPerBatchHigh),
+        mGyroBatchesPerSecHigh(gyroBatchesPerSecHigh),
+        mAlgorithmConfig(algorithmConfig)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mAdapter->setSensorPerfControlConfig(mControlMode,
+                                             mAccelSamplesPerBatch,
+                                             mAccelBatchesPerSec,
+                                             mGyroSamplesPerBatch,
+                                             mGyroBatchesPerSec,
+                                             mAccelSamplesPerBatchHigh,
+                                             mAccelBatchesPerSecHigh,
+                                             mGyroSamplesPerBatchHigh,
+                                             mGyroBatchesPerSecHigh,
+                                             mAlgorithmConfig);
+    }
+    inline void locallog() const {
+        LOC_LOGV("Sensor Perf Control Config (performanceControlMode)(%u) "
+                 "accel(#smp,#batches) (%u,%u) "
+                 "gyro(#smp,#batches) (%u,%u), "
+                 "accel_high(#smp,#batches) (%u,%u) "
+                 "gyro_high(#smp,#batches) (%u,%u), "
+                 "algorithmConfig(%u)\n",
+                 mControlMode,
+                 mAccelSamplesPerBatch, mAccelBatchesPerSec,
+                 mGyroSamplesPerBatch, mGyroBatchesPerSec,
+                 mAccelSamplesPerBatchHigh, mAccelBatchesPerSecHigh,
+                 mGyroSamplesPerBatchHigh, mGyroBatchesPerSecHigh,
+                 mAlgorithmConfig);
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_EXT_POWER_CONFIG:
+struct LocEngExtPowerConfig : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const int mIsBatteryCharging;
+    inline LocEngExtPowerConfig(LocEngAdapter* adapter,
+                                int isBatteryCharging) :
+        LocMsg(), mAdapter(adapter),
+        mIsBatteryCharging(isBatteryCharging)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mAdapter->setExtPowerConfig(mIsBatteryCharging);
+    }
+    inline void locallog() const {
+        LOC_LOGV("LocEngExtPowerConfig - isBatteryCharging: %d",
+                 mIsBatteryCharging);
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_REPORT_POSITION:
+LocEngReportPosition::LocEngReportPosition(LocAdapterBase* adapter,
+                                           UlpLocation &loc,
+                                           GpsLocationExtended &locExtended,
+                                           void* locExt,
+                                           enum loc_sess_status st,
+                                           LocPosTechMask technology) :
+    LocMsg(), mAdapter(adapter), mLocation(loc),
+    mLocationExtended(locExtended),
+    mLocationExt(((loc_eng_data_s_type*)
+                  ((LocEngAdapter*)
+                   (mAdapter))->getOwner())->location_ext_parser(locExt)),
+    mStatus(st), mTechMask(technology)
+{
+    locallog();
+}
+void LocEngReportPosition::proc() const {
+    LocEngAdapter* adapter = (LocEngAdapter*)mAdapter;
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)adapter->getOwner();
+
+    if (locEng->mute_session_state != LOC_MUTE_SESS_IN_SESSION) {
+        bool reported = false;
+        if (locEng->location_cb != NULL) {
+            if (LOC_SESS_FAILURE == mStatus) {
+                // in case we want to handle the failure case
+                locEng->location_cb(NULL, NULL);
+                reported = true;
+            }
+            // what's in the else if is... (line by line)
+            // 1. this is a final fix; and
+            //   1.1 it is a Satellite fix; or
+            //   1.2 it is a sensor fix
+            // 2. (must be intermediate fix... implicit)
+            //   2.1 we accepte intermediate; and
+            //   2.2 it is NOT the case that
+            //   2.2.1 there is inaccuracy; and
+            //   2.2.2 we care about inaccuracy; and
+            //   2.2.3 the inaccuracy exceeds our tolerance
+            else if ((LOC_SESS_SUCCESS == mStatus &&
+                      ((LOC_POS_TECH_MASK_SATELLITE |
+                        LOC_POS_TECH_MASK_SENSORS   |
+                        LOC_POS_TECH_MASK_HYBRID) &
+                       mTechMask)) ||
+                     (LOC_SESS_INTERMEDIATE == locEng->intermediateFix &&
+                      !((mLocation.gpsLocation.flags &
+                         GPS_LOCATION_HAS_ACCURACY) &&
+                        (gps_conf.ACCURACY_THRES != 0) &&
+                        (mLocation.gpsLocation.accuracy >
+                         gps_conf.ACCURACY_THRES)))) {
+                locEng->location_cb((UlpLocation*)&(mLocation),
+                                    (void*)mLocationExt);
+                reported = true;
+            }
+        }
+
+        // if we have reported this fix
+        if (reported &&
+            // and if this is a singleshot
+            GPS_POSITION_RECURRENCE_SINGLE ==
+            locEng->adapter->getPositionMode().recurrence) {
+            if (LOC_SESS_INTERMEDIATE == mStatus) {
+                // modem could be still working for a final fix,
+                // although we no longer need it.  So stopFix().
+                locEng->adapter->stopFix();
+            }
+            // turn off the session flag.
+            locEng->adapter->setInSession(false);
+        }
+
+        if (locEng->generateNmea &&
+            mLocation.position_source == ULP_LOCATION_IS_FROM_GNSS &&
+            mTechMask & (LOC_POS_TECH_MASK_SATELLITE |
+                         LOC_POS_TECH_MASK_SENSORS |
+                         LOC_POS_TECH_MASK_HYBRID))
+        {
+            unsigned char generate_nmea = reported &&
+                                          (mStatus != LOC_SESS_FAILURE);
+            loc_eng_nmea_generate_pos(locEng, mLocation, mLocationExtended,
+                                      generate_nmea);
+        }
+
+        // Free the allocated memory for rawData
+        UlpLocation* gp = (UlpLocation*)&(mLocation);
+        if (gp != NULL && gp->rawData != NULL)
+        {
+            delete (char*)gp->rawData;
+            gp->rawData = NULL;
+            gp->rawDataSize = 0;
+        }
+    }
+}
+void LocEngReportPosition::locallog() const {
+    LOC_LOGV("LocEngReportPosition");
+}
+void LocEngReportPosition::log() const {
+    locallog();
+}
+void LocEngReportPosition::send() const {
+    mAdapter->sendMsg(this);
+}
+
+
+//        case LOC_ENG_MSG_REPORT_SV:
+LocEngReportSv::LocEngReportSv(LocAdapterBase* adapter,
+                               GpsSvStatus &sv,
+                               GpsLocationExtended &locExtended,
+                               void* svExt) :
+    LocMsg(), mAdapter(adapter), mSvStatus(sv),
+    mLocationExtended(locExtended),
+    mSvExt(((loc_eng_data_s_type*)
+            ((LocEngAdapter*)
+             (mAdapter))->getOwner())->sv_ext_parser(svExt))
+{
+    locallog();
+}
+void LocEngReportSv::proc() const {
+    LocEngAdapter* adapter = (LocEngAdapter*)mAdapter;
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)adapter->getOwner();
+
+    if (locEng->mute_session_state != LOC_MUTE_SESS_IN_SESSION)
+    {
+        if (locEng->sv_status_cb != NULL) {
+            locEng->sv_status_cb((GpsSvStatus*)&(mSvStatus),
+                                 (void*)mSvExt);
+        }
+
+        if (locEng->generateNmea)
+        {
+            loc_eng_nmea_generate_sv(locEng, mSvStatus, mLocationExtended);
+        }
+    }
+}
+void LocEngReportSv::locallog() const {
+    LOC_LOGV("%s:%d] LocEngReportSv",__func__, __LINE__);
+}
+inline void LocEngReportSv::log() const {
+    locallog();
+}
+void LocEngReportSv::send() const {
+    mAdapter->sendMsg(this);
+}
+
+//        case LOC_ENG_MSG_REPORT_STATUS:
+LocEngReportStatus::LocEngReportStatus(LocAdapterBase* adapter,
+                                       GpsStatusValue engineStatus) :
+    LocMsg(),  mAdapter(adapter), mStatus(engineStatus)
+{
+    locallog();
+}
+inline void LocEngReportStatus::proc() const
+{
+    LocEngAdapter* adapter = (LocEngAdapter*)mAdapter;
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)adapter->getOwner();
+
+    loc_eng_report_status(*locEng, mStatus);
+    update_aiding_data_for_deletion(*locEng);
+}
+inline void LocEngReportStatus::locallog() const {
+    LOC_LOGV("LocEngReportStatus");
+}
+inline void LocEngReportStatus::log() const {
+    locallog();
+}
+
+//        case LOC_ENG_MSG_REPORT_NMEA:
+LocEngReportNmea::LocEngReportNmea(void* locEng,
+                                   const char* data, int len) :
+    LocMsg(), mLocEng(locEng), mNmea(new char[len]), mLen(len)
+{
+    memcpy((void*)mNmea, (void*)data, len);
+    locallog();
+}
+void LocEngReportNmea::proc() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*) mLocEng;
+
+    struct timeval tv;
+    gettimeofday(&tv, (struct timezone *) NULL);
+    int64_t now = tv.tv_sec * 1000LL + tv.tv_usec / 1000;
+    CALLBACK_LOG_CALLFLOW("nmea_cb", %d, mLen);
+
+    if (locEng->nmea_cb != NULL)
+        locEng->nmea_cb(now, mNmea, mLen);
+}
+inline void LocEngReportNmea::locallog() const {
+    LOC_LOGV("LocEngReportNmea");
+}
+inline void LocEngReportNmea::log() const {
+    locallog();
+}
+
+//        case LOC_ENG_MSG_REPORT_XTRA_SERVER:
+LocEngReportXtraServer::LocEngReportXtraServer(void* locEng,
+                                               const char *url1,
+                                               const char *url2,
+                                               const char *url3,
+                                               const int maxlength) :
+    LocMsg(), mLocEng(locEng), mMaxLen(maxlength),
+    mServers(new char[3*(mMaxLen+1)])
+{
+    char * cptr = mServers;
+    memset(mServers, 0, 3*(mMaxLen+1));
+
+    // Override modem URLs with uncommented gps.conf urls
+    if( gps_conf.XTRA_SERVER_1[0] != '\0' ) {
+        url1 = &gps_conf.XTRA_SERVER_1[0];
+    }
+    if( gps_conf.XTRA_SERVER_2[0] != '\0' ) {
+        url2 = &gps_conf.XTRA_SERVER_2[0];
+    }
+    if( gps_conf.XTRA_SERVER_3[0] != '\0' ) {
+        url3 = &gps_conf.XTRA_SERVER_3[0];
+    }
+    // copy non xtra1.gpsonextra.net URLs into the forwarding buffer.
+    if( NULL == strcasestr(url1, XTRA1_GPSONEXTRA) ) {
+        strlcpy(cptr, url1, mMaxLen + 1);
+        cptr += mMaxLen + 1;
+    }
+    if( NULL == strcasestr(url2, XTRA1_GPSONEXTRA) ) {
+        strlcpy(cptr, url2, mMaxLen + 1);
+        cptr += mMaxLen + 1;
+    }
+    if( NULL == strcasestr(url3, XTRA1_GPSONEXTRA) ) {
+        strlcpy(cptr, url3, mMaxLen + 1);
+    }
+    locallog();
+}
+
+void LocEngReportXtraServer::proc() const {
+    loc_eng_xtra_data_s_type* locEngXtra =
+        &(((loc_eng_data_s_type*)mLocEng)->xtra_module_data);
+
+    if (locEngXtra->report_xtra_server_cb != NULL) {
+        CALLBACK_LOG_CALLFLOW("report_xtra_server_cb", %s, mServers);
+        locEngXtra->report_xtra_server_cb(mServers,
+                                          &(mServers[mMaxLen+1]),
+                                          &(mServers[(mMaxLen+1)<<1]));
+    } else {
+        LOC_LOGE("Callback function for request xtra is NULL");
+    }
+}
+inline void LocEngReportXtraServer::locallog() const {
+    LOC_LOGV("LocEngReportXtraServers: server1: %s\n  server2: %s\n"
+             "  server3: %s\n",
+             mServers, &mServers[mMaxLen+1], &mServers[(mMaxLen+1)<<1]);
+}
+inline void LocEngReportXtraServer::log() const {
+    locallog();
+}
+
+//        case LOC_ENG_MSG_REQUEST_BIT:
+//        case LOC_ENG_MSG_RELEASE_BIT:
+LocEngReqRelBIT::LocEngReqRelBIT(void* locEng, AGpsExtType type,
+                                 int ipv4, char* ipv6, bool isReq) :
+    LocMsg(), mLocEng(locEng), mType(type), mIPv4Addr(ipv4),
+    mIPv6Addr(ipv6 ? new char[16] : NULL), mIsReq(isReq) {
+    if (NULL != ipv6)
+        memcpy(mIPv6Addr, ipv6, 16);
+    locallog();
+}
+inline LocEngReqRelBIT::~LocEngReqRelBIT() {
+    if (mIPv6Addr) {
+        delete[] mIPv6Addr;
+    }
+}
+void LocEngReqRelBIT::proc() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
+    BITSubscriber s(getAgpsStateMachine(*locEng, mType),
+                    mIPv4Addr, mIPv6Addr);
+    AgpsStateMachine* sm = (AgpsStateMachine*)s.mStateMachine;
+
+    if (mIsReq) {
+        sm->subscribeRsrc((Subscriber*)&s);
+    } else {
+        sm->unsubscribeRsrc((Subscriber*)&s);
+    }
+}
+inline void LocEngReqRelBIT::locallog() const {
+    LOC_LOGV("LocEngRequestBIT - ipv4: %d.%d.%d.%d, ipv6: %s",
+             (unsigned char)mIPv4Addr,
+             (unsigned char)(mIPv4Addr>>8),
+             (unsigned char)(mIPv4Addr>>16),
+             (unsigned char)(mIPv4Addr>>24),
+             NULL != mIPv6Addr ? mIPv6Addr : "");
+}
+inline void LocEngReqRelBIT::log() const {
+    locallog();
+}
+void LocEngReqRelBIT::send() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
+    locEng->adapter->sendMsg(this);
+}
+
+//        case LOC_ENG_MSG_RELEASE_BIT:
+struct LocEngReleaseBIT : public LocMsg {
+    const BITSubscriber mSubscriber;
+    inline LocEngReleaseBIT(const AgpsStateMachine* stateMachine,
+                            unsigned int ipv4, char* ipv6) :
+        LocMsg(),
+        mSubscriber(stateMachine, ipv4, ipv6)
+    {
+        locallog();
+    }
+    inline virtual void proc() const
+    {
+        AgpsStateMachine* sm = (AgpsStateMachine*)mSubscriber.mStateMachine;
+        sm->unsubscribeRsrc((Subscriber*)&mSubscriber);
+    }
+    inline void locallog() const {
+        LOC_LOGV("LocEngReleaseBIT - ipv4: %d.%d.%d.%d, ipv6: %s",
+                 (unsigned char)(mSubscriber.ID>>24),
+                 (unsigned char)(mSubscriber.ID>>16),
+                 (unsigned char)(mSubscriber.ID>>8),
+                 (unsigned char)mSubscriber.ID,
+                 NULL != mSubscriber.mIPv6Addr ? mSubscriber.mIPv6Addr : "");
+    }
+    virtual void log() const {
+        locallog();
+    }
+};
+
+//        LocEngSuplEsOpened
+LocEngSuplEsOpened::LocEngSuplEsOpened(void* locEng) :
+    LocMsg(), mLocEng(locEng) {
+    locallog();
+}
+void LocEngSuplEsOpened::proc() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
+    if (locEng->ds_nif) {
+        AgpsStateMachine* sm = locEng->ds_nif;
+        sm->onRsrcEvent(RSRC_GRANTED);
+    }
+}
+void LocEngSuplEsOpened::locallog() const {
+    LOC_LOGV("LocEngSuplEsOpened");
+}
+void LocEngSuplEsOpened::log() const {
+    locallog();
+}
+
+//        LocEngSuplEsClosed
+LocEngSuplEsClosed::LocEngSuplEsClosed(void* locEng) :
+    LocMsg(), mLocEng(locEng) {
+    locallog();
+}
+void LocEngSuplEsClosed::proc() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
+    if (locEng->ds_nif) {
+        AgpsStateMachine* sm = locEng->ds_nif;
+        sm->onRsrcEvent(RSRC_RELEASED);
+    }
+}
+void LocEngSuplEsClosed::locallog() const {
+    LOC_LOGV("LocEngSuplEsClosed");
+}
+void LocEngSuplEsClosed::log() const {
+    locallog();
+}
+
+
+//        case LOC_ENG_MSG_REQUEST_SUPL_ES:
+LocEngRequestSuplEs::LocEngRequestSuplEs(void* locEng, int id) :
+    LocMsg(), mLocEng(locEng), mID(id) {
+    locallog();
+}
+void LocEngRequestSuplEs::proc() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
+    if (locEng->ds_nif) {
+        AgpsStateMachine* sm = locEng->ds_nif;
+        DSSubscriber s(sm, mID);
+        sm->subscribeRsrc((Subscriber*)&s);
+    }
+    else if (locEng->agnss_nif) {
+        AgpsStateMachine *sm = locEng->agnss_nif;
+        ATLSubscriber s(mID,
+                        sm,
+                        locEng->adapter,
+                        false);
+        sm->subscribeRsrc((Subscriber*)&s);
+        LOC_LOGD("%s:%d]: Using regular ATL for SUPL ES", __func__, __LINE__);
+    }
+    else {
+        locEng->adapter->atlOpenStatus(mID, 0, NULL, -1, -1);
+    }
+}
+inline void LocEngRequestSuplEs::locallog() const {
+    LOC_LOGV("LocEngRequestSuplEs");
+}
+inline void LocEngRequestSuplEs::log() const {
+    locallog();
+}
+
+//        case LOC_ENG_MSG_REQUEST_ATL:
+LocEngRequestATL::LocEngRequestATL(void* locEng, int id,
+                                   AGpsExtType agps_type) :
+    LocMsg(), mLocEng(locEng), mID(id), mType(agps_type) {
+    locallog();
+}
+void LocEngRequestATL::proc() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
+    AgpsStateMachine* sm = (AgpsStateMachine*)
+                           getAgpsStateMachine(*locEng, mType);
+    if (sm) {
+        ATLSubscriber s(mID,
+                        sm,
+                        locEng->adapter,
+                        AGPS_TYPE_INVALID == mType);
+        sm->subscribeRsrc((Subscriber*)&s);
+    } else {
+        locEng->adapter->atlOpenStatus(mID, 0, NULL, -1, mType);
+    }
+}
+inline void LocEngRequestATL::locallog() const {
+    LOC_LOGV("LocEngRequestATL");
+}
+inline void LocEngRequestATL::log() const {
+    locallog();
+}
+
+//        case LOC_ENG_MSG_RELEASE_ATL:
+LocEngReleaseATL::LocEngReleaseATL(void* locEng, int id) :
+    LocMsg(), mLocEng(locEng), mID(id) {
+    locallog();
+}
+void LocEngReleaseATL::proc() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
+
+   if (locEng->agnss_nif) {
+        ATLSubscriber s1(mID, locEng->agnss_nif, locEng->adapter, false);
+        if (locEng->agnss_nif->unsubscribeRsrc((Subscriber*)&s1)) {
+            LOC_LOGD("%s:%d]: Unsubscribed from agnss_nif",
+                     __func__, __LINE__);
+            return;
+        }
+    }
+
+    if (locEng->internet_nif) {
+        ATLSubscriber s2(mID, locEng->internet_nif, locEng->adapter, false);
+        if (locEng->internet_nif->unsubscribeRsrc((Subscriber*)&s2)) {
+            LOC_LOGD("%s:%d]: Unsubscribed from internet_nif",
+                     __func__, __LINE__);
+            return;
+        }
+    }
+
+    if (locEng->ds_nif) {
+        DSSubscriber s3(locEng->ds_nif, mID);
+        if (locEng->ds_nif->unsubscribeRsrc((Subscriber*)&s3)) {
+            LOC_LOGD("%s:%d]: Unsubscribed from ds_nif",
+                     __func__, __LINE__);
+            return;
+        }
+    }
+
+    LOC_LOGW("%s:%d]: Could not release ATL. "
+             "No subscribers found\n",
+             __func__, __LINE__);
+    locEng->adapter->atlCloseStatus(mID, 0);
+}
+inline void LocEngReleaseATL::locallog() const {
+    LOC_LOGV("LocEngReleaseATL");
+}
+inline void LocEngReleaseATL::log() const {
+    locallog();
+}
+
+//        case LOC_ENG_MSG_REQUEST_WIFI:
+//        case LOC_ENG_MSG_RELEASE_WIFI:
+LocEngReqRelWifi::LocEngReqRelWifi(void* locEng, AGpsExtType type,
+                                   loc_if_req_sender_id_e_type sender_id,
+                                   char* s, char* p, bool isReq) :
+    LocMsg(), mLocEng(locEng), mType(type), mSenderId(sender_id),
+    mSSID(NULL == s ? NULL : new char[SSID_BUF_SIZE]),
+    mPassword(NULL == p ? NULL : new char[SSID_BUF_SIZE]),
+    mIsReq(isReq) {
+    if (NULL != s)
+        strlcpy(mSSID, s, SSID_BUF_SIZE);
+    if (NULL != p)
+        strlcpy(mPassword, p, SSID_BUF_SIZE);
+    locallog();
+}
+LocEngReqRelWifi::~LocEngReqRelWifi() {
+    if (NULL != mSSID) {
+        delete[] mSSID;
+    }
+    if (NULL != mPassword) {
+        delete[] mPassword;
+    }
+}
+void LocEngReqRelWifi::proc() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
+    if (locEng->wifi_nif) {
+        WIFISubscriber s(locEng->wifi_nif, mSSID, mPassword, mSenderId);
+        if (mIsReq) {
+            locEng->wifi_nif->subscribeRsrc((Subscriber*)&s);
+        } else {
+            locEng->wifi_nif->unsubscribeRsrc((Subscriber*)&s);
+        }
+    } else {
+        locEng->adapter->atlOpenStatus(mSenderId, 0, NULL, -1, mType);
+    }
+}
+inline void LocEngReqRelWifi::locallog() const {
+    LOC_LOGV("%s - senderId: %d, ssid: %s, password: %s",
+             mIsReq ? "LocEngRequestWifi" : "LocEngReleaseWifi",
+             mSenderId,
+             NULL != mSSID ? mSSID : "",
+             NULL != mPassword ? mPassword : "");
+}
+inline void LocEngReqRelWifi::log() const {
+    locallog();
+}
+void LocEngReqRelWifi::send() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
+    locEng->adapter->sendMsg(this);
+}
+
+//        case LOC_ENG_MSG_REQUEST_XTRA_DATA:
+LocEngRequestXtra::LocEngRequestXtra(void* locEng) :
+    mLocEng(locEng) {
+    locallog();
+}
+void LocEngRequestXtra::proc() const
+{
+    loc_eng_xtra_data_s_type* locEngXtra =
+        &(((loc_eng_data_s_type*)mLocEng)->xtra_module_data);
+
+    if (locEngXtra->download_request_cb != NULL) {
+        CALLBACK_LOG_CALLFLOW("download_request_cb", %p, mLocEng);
+        locEngXtra->download_request_cb();
+    } else {
+        LOC_LOGE("Callback function for request xtra is NULL");
+    }
+}
+inline void LocEngRequestXtra::locallog() const {
+    LOC_LOGV("LocEngReqXtra");
+}
+inline void LocEngRequestXtra::log() const {
+    locallog();
+}
+
+//        case LOC_ENG_MSG_REQUEST_TIME:
+LocEngRequestTime::LocEngRequestTime(void* locEng) :
+    LocMsg(), mLocEng(locEng)
+{
+    locallog();
+}
+void LocEngRequestTime::proc() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
+    if (gps_conf.CAPABILITIES & GPS_CAPABILITY_ON_DEMAND_TIME) {
+        if (locEng->request_utc_time_cb != NULL) {
+            locEng->request_utc_time_cb();
+        } else {
+            LOC_LOGE("Callback function for request time is NULL");
+        }
+    }
+}
+inline void LocEngRequestTime::locallog() const {
+    LOC_LOGV("LocEngReqTime");
+}
+inline void LocEngRequestTime::log() const {
+    locallog();
+}
+
+//        case LOC_ENG_MSG_DELETE_AIDING_DATA:
+struct LocEngDelAidData : public LocMsg {
+    loc_eng_data_s_type* mLocEng;
+    const GpsAidingData mType;
+    inline LocEngDelAidData(loc_eng_data_s_type* locEng,
+                            GpsAidingData f) :
+        LocMsg(), mLocEng(locEng), mType(f)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mLocEng->aiding_data_for_deletion = mType;
+        update_aiding_data_for_deletion(*mLocEng);
+    }
+    inline void locallog() const {
+        LOC_LOGV("aiding data msak %d", mType);
+    }
+    virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_ENABLE_DATA:
+struct LocEngEnableData : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const int mEnable;
+    char* mAPN;
+    const int mLen;
+    inline LocEngEnableData(LocEngAdapter* adapter,
+                            const char* name, int len, int enable) :
+        LocMsg(), mAdapter(adapter),
+        mEnable(enable), mAPN(NULL), mLen(len)
+    {
+        if (NULL != name) {
+            mAPN = new char[len+1];
+            memcpy((void*)mAPN, (void*)name, len);
+            mAPN[len] = 0;
+        }
+        locallog();
+    }
+    inline ~LocEngEnableData() {
+        if (NULL != mAPN) {
+            delete[] mAPN;
+        }
+    }
+    inline virtual void proc() const {
+        mAdapter->enableData(mEnable);
+        if (NULL != mAPN) {
+            mAdapter->setAPN(mAPN, mLen);
+        }
+    }
+    inline void locallog() const {
+        LOC_LOGV("apn: %s\n  enable: %d",
+                 (NULL == mAPN) ? "NULL" : mAPN, mEnable);
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_INJECT_XTRA_DATA:
+// loc_eng_xtra.cpp
+
+//        case LOC_ENG_MSG_SET_CAPABILITIES:
+struct LocEngSetCapabilities : public LocMsg {
+    loc_eng_data_s_type* mLocEng;
+    inline LocEngSetCapabilities(loc_eng_data_s_type* locEng) :
+        LocMsg(), mLocEng(locEng)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        if (NULL != mLocEng->set_capabilities_cb) {
+            LOC_LOGV("calling set_capabilities_cb 0x%x",
+                     gps_conf.CAPABILITIES);
+            mLocEng->set_capabilities_cb(gps_conf.CAPABILITIES);
+        } else {
+            LOC_LOGV("set_capabilities_cb is NULL.\n");
+        }
+    }
+    inline void locallog() const
+    {
+        LOC_LOGV("LocEngSetCapabilities");
+    }
+    inline virtual void log() const
+    {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_LOC_INIT:
+struct LocEngInit : public LocMsg {
+    loc_eng_data_s_type* mLocEng;
+    inline LocEngInit(loc_eng_data_s_type* locEng) :
+        LocMsg(), mLocEng(locEng)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        loc_eng_reinit(*mLocEng);
+        // set the capabilities
+        mLocEng->adapter->sendMsg(new LocEngSetCapabilities(mLocEng));
+    }
+    inline void locallog() const
+    {
+        LOC_LOGV("LocEngInit");
+    }
+    inline virtual void log() const
+    {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_REQUEST_XTRA_SERVER:
+// loc_eng_xtra.cpp
+
+//        case LOC_ENG_MSG_ATL_OPEN_SUCCESS:
+struct LocEngAtlOpenSuccess : public LocMsg {
+    AgpsStateMachine* mStateMachine;
+    const int mLen;
+    char* mAPN;
+    const AGpsBearerType mBearerType;
+    inline LocEngAtlOpenSuccess(AgpsStateMachine* statemachine,
+                                const char* name,
+                                int len,
+                                AGpsBearerType btype) :
+        LocMsg(),
+        mStateMachine(statemachine), mLen(len),
+        mAPN(new char[len+1]), mBearerType(btype)
+    {
+        memcpy((void*)mAPN, (void*)name, len);
+        mAPN[len] = 0;
+        locallog();
+    }
+    inline ~LocEngAtlOpenSuccess()
+    {
+        delete[] mAPN;
+    }
+    inline virtual void proc() const {
+        mStateMachine->setBearer(mBearerType);
+        mStateMachine->setAPN(mAPN, mLen);
+        mStateMachine->onRsrcEvent(RSRC_GRANTED);
+    }
+    inline void locallog() const {
+        LOC_LOGV("LocEngAtlOpenSuccess agps type: %s\n  apn: %s\n"
+                 "  bearer type: %s",
+                 loc_get_agps_type_name(mStateMachine->getType()),
+                 mAPN,
+                 loc_get_agps_bear_name(mBearerType));
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_ATL_CLOSED:
+struct LocEngAtlClosed : public LocMsg {
+    AgpsStateMachine* mStateMachine;
+    inline LocEngAtlClosed(AgpsStateMachine* statemachine) :
+        LocMsg(), mStateMachine(statemachine) {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mStateMachine->onRsrcEvent(RSRC_RELEASED);
+    }
+    inline void locallog() const {
+        LOC_LOGV("LocEngAtlClosed");
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_ATL_OPEN_FAILED:
+struct LocEngAtlOpenFailed : public LocMsg {
+    AgpsStateMachine* mStateMachine;
+    inline LocEngAtlOpenFailed(AgpsStateMachine* statemachine) :
+        LocMsg(), mStateMachine(statemachine) {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mStateMachine->onRsrcEvent(RSRC_DENIED);
+    }
+    inline void locallog() const {
+        LOC_LOGV("LocEngAtlOpenFailed");
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_ENGINE_DOWN:
+LocEngDown::LocEngDown(void* locEng) :
+    LocMsg(), mLocEng(locEng) {
+    locallog();
+}
+inline void LocEngDown::proc() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
+    loc_eng_handle_engine_down(*locEng);
+}
+inline void LocEngDown::locallog() const {
+    LOC_LOGV("LocEngDown");
+}
+inline void LocEngDown::log() const {
+    locallog();
+}
+
+//        case LOC_ENG_MSG_ENGINE_UP:
+LocEngUp::LocEngUp(void* locEng) :
+    LocMsg(), mLocEng(locEng) {
+    locallog();
+}
+inline void LocEngUp::proc() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
+    loc_eng_handle_engine_up(*locEng);
+}
+inline void LocEngUp::locallog() const {
+    LOC_LOGV("LocEngUp");
+}
+inline void LocEngUp::log() const {
+    locallog();
+}
+
+struct LocEngDataClientInit : public LocMsg {
+    loc_eng_data_s_type* mLocEng;
+    inline LocEngDataClientInit(loc_eng_data_s_type* locEng) :
+        LocMsg(), mLocEng(locEng) {
+        locallog();
+    }
+    virtual void proc() const {
+        loc_eng_data_s_type *locEng = (loc_eng_data_s_type *)mLocEng;
+        if(!locEng->adapter->initDataServiceClient()) {
+            locEng->ds_nif = new DSStateMachine(servicerTypeExt,
+                                               (void *)dataCallCb,
+                                               locEng->adapter);
+        }
+    }
+    void locallog() const {
+        LOC_LOGV("LocEngDataClientInit\n");
+    }
+    virtual void log() const {
+        locallog();
+    }
+};
+
+struct LocEngInstallAGpsCert : public LocMsg {
+    LocEngAdapter* mpAdapter;
+    const size_t mNumberOfCerts;
+    const uint32_t mSlotBitMask;
+    DerEncodedCertificate* mpData;
+    inline LocEngInstallAGpsCert(LocEngAdapter* adapter,
+                              const DerEncodedCertificate* pData,
+                              size_t numberOfCerts,
+                              uint32_t slotBitMask) :
+        LocMsg(), mpAdapter(adapter),
+        mNumberOfCerts(numberOfCerts), mSlotBitMask(slotBitMask),
+        mpData(new DerEncodedCertificate[mNumberOfCerts])
+    {
+        for (int i=0; i < mNumberOfCerts; i++) {
+            mpData[i].data = new u_char[pData[i].length];
+            if (mpData[i].data) {
+                memcpy(mpData[i].data, (void*)pData[i].data, pData[i].length);
+                mpData[i].length = pData[i].length;
+            } else {
+                LOC_LOGE("malloc failed for cert#%d", i);
+                break;
+            }
+        }
+        locallog();
+    }
+    inline ~LocEngInstallAGpsCert()
+    {
+        for (int i=0; i < mNumberOfCerts; i++) {
+            if (mpData[i].data) {
+                delete[] mpData[i].data;
+            }
+        }
+        delete[] mpData;
+    }
+    inline virtual void proc() const {
+        mpAdapter->installAGpsCert(mpData, mNumberOfCerts, mSlotBitMask);
+    }
+    inline void locallog() const {
+        LOC_LOGV("LocEngInstallAGpsCert - certs=%u mask=%u",
+                 mNumberOfCerts, mSlotBitMask);
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+struct LocEngUpdateRegistrationMask : public LocMsg {
+    loc_eng_data_s_type* mLocEng;
+    LOC_API_ADAPTER_EVENT_MASK_T mMask;
+    loc_registration_mask_status mIsEnabled;
+    inline LocEngUpdateRegistrationMask(loc_eng_data_s_type* locEng,
+                                        LOC_API_ADAPTER_EVENT_MASK_T mask,
+                                        loc_registration_mask_status isEnabled) :
+        LocMsg(), mLocEng(locEng), mMask(mask), mIsEnabled(isEnabled) {
+        locallog();
+    }
+    inline virtual void proc() const {
+        loc_eng_data_s_type *locEng = (loc_eng_data_s_type *)mLocEng;
+        locEng->adapter->updateRegistrationMask(mMask,
+                                                mIsEnabled);
+    }
+    void locallog() const {
+        LOC_LOGV("LocEngUpdateRegistrationMask\n");
+    }
+    virtual void log() const {
+        locallog();
+    }
+};
+
+struct LocEngGnssConstellationConfig : public LocMsg {
+    LocEngAdapter* mAdapter;
+    inline LocEngGnssConstellationConfig(LocEngAdapter* adapter) :
+        LocMsg(), mAdapter(adapter) {
+        locallog();
+    }
+    inline virtual void proc() const {
+        if (mAdapter->gnssConstellationConfig()) {
+            LOC_LOGV("Modem supports GNSS measurements\n");
+            gps_conf.CAPABILITIES |= GPS_CAPABILITY_MEASUREMENTS;
+        } else {
+            LOC_LOGV("Modem does not support GNSS measurements\n");
+        }
+    }
+    void locallog() const {
+        LOC_LOGV("LocEngGnssConstellationConfig\n");
+    }
+    virtual void log() const {
+        locallog();
+    }
+};
+
+//        case LOC_ENG_MSG_REPORT_GNSS_MEASUREMENT:
+LocEngReportGpsMeasurement::LocEngReportGpsMeasurement(void* locEng,
+                                                       GpsData &gpsData) :
+    LocMsg(), mLocEng(locEng), mGpsData(gpsData)
+{
+    locallog();
+}
+void LocEngReportGpsMeasurement::proc() const {
+    loc_eng_data_s_type* locEng = (loc_eng_data_s_type*) mLocEng;
+    if (locEng->mute_session_state != LOC_MUTE_SESS_IN_SESSION)
+    {
+        if (locEng->gps_measurement_cb != NULL) {
+            locEng->gps_measurement_cb((GpsData*)&(mGpsData));
+        }
+    }
+}
+void LocEngReportGpsMeasurement::locallog() const {
+    IF_LOC_LOGV {
+        LOC_LOGV("%s:%d]: Received in GPS HAL."
+                 "GNSS Measurements count: %d \n",
+                 __func__, __LINE__, mGpsData.measurement_count);
+        for (int i =0; i< mGpsData.measurement_count && i < GPS_MAX_SVS; i++) {
+                LOC_LOGV(" GNSS measurement data in GPS HAL: \n"
+                         " GPS_HAL => Measurement ID | prn | time_offset_ns | state |"
+                         " received_gps_tow_ns| c_n0_dbhz | pseudorange_rate_mps |"
+                         " pseudorange_rate_uncertainty_mps |"
+                         " accumulated_delta_range_state | flags \n"
+                         " GPS_HAL => %d | %d | %f | %d | %lld | %f | %f | %f | %d | %d \n",
+                         i,
+                         mGpsData.measurements[i].prn,
+                         mGpsData.measurements[i].time_offset_ns,
+                         mGpsData.measurements[i].state,
+                         mGpsData.measurements[i].received_gps_tow_ns,
+                         mGpsData.measurements[i].c_n0_dbhz,
+                         mGpsData.measurements[i].pseudorange_rate_mps,
+                         mGpsData.measurements[i].pseudorange_rate_uncertainty_mps,
+                         mGpsData.measurements[i].accumulated_delta_range_state,
+                         mGpsData.measurements[i].flags);
+        }
+        LOC_LOGV(" GPS_HAL => Clocks Info: type | time_ns \n"
+                 " GPS_HAL => Clocks Info: %d | %lld", mGpsData.clock.type,
+                 mGpsData.clock.time_ns);
+    }
+}
+inline void LocEngReportGpsMeasurement::log() const {
+    locallog();
+}
+
+/*********************************************************************
+ * Initialization checking macros
+ *********************************************************************/
+#define STATE_CHECK(ctx, x, ret) \
+    if (!(ctx))                  \
+  {                              \
+      /* Not intialized, abort */\
+      LOC_LOGE("%s: log_eng state error: %s", __func__, x); \
+      EXIT_LOG(%s, x);                                            \
+      ret;                                                        \
+  }
+#define INIT_CHECK(ctx, ret) STATE_CHECK(ctx, "instance not initialized", ret)
+
+uint32_t getCarrierCapabilities() {
+    #define carrierMSA (uint32_t)0x2
+    #define carrierMSB (uint32_t)0x1
+    #define gpsConfMSA (uint32_t)0x4
+    #define gpsConfMSB (uint32_t)0x2
+    uint32_t capabilities = gps_conf.CAPABILITIES;
+    if ((gps_conf.SUPL_MODE & carrierMSA) != carrierMSA) {
+        capabilities &= ~gpsConfMSA;
+    }
+    if ((gps_conf.SUPL_MODE & carrierMSB) != carrierMSB) {
+        capabilities &= ~gpsConfMSB;
+    }
+
+    LOC_LOGV("getCarrierCapabilities: CAPABILITIES %x, SUPL_MODE %x, carrier capabilities %x",
+             gps_conf.CAPABILITIES, gps_conf.SUPL_MODE, capabilities);
+    return capabilities;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_init
+
+DESCRIPTION
+   Initialize the location engine, this include setting up global datas
+   and registers location engien with loc api service.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_init(loc_eng_data_s_type &loc_eng_data, LocCallbacks* callbacks,
+                 LOC_API_ADAPTER_EVENT_MASK_T event, ContextBase* context)
+
+{
+    int ret_val = 0;
+
+    ENTRY_LOG_CALLFLOW();
+    if (NULL == callbacks || 0 == event) {
+        LOC_LOGE("loc_eng_init: bad parameters cb %p eMask %d", callbacks, event);
+        ret_val = -1;
+        EXIT_LOG(%d, ret_val);
+        return ret_val;
+    }
+
+    STATE_CHECK((NULL == loc_eng_data.adapter),
+                "instance already initialized", return 0);
+
+    memset(&loc_eng_data, 0, sizeof (loc_eng_data));
+
+    // Save callbacks
+    loc_eng_data.location_cb  = callbacks->location_cb;
+    loc_eng_data.sv_status_cb = callbacks->sv_status_cb;
+    loc_eng_data.status_cb    = callbacks->status_cb;
+    loc_eng_data.nmea_cb      = callbacks->nmea_cb;
+    loc_eng_data.set_capabilities_cb = callbacks->set_capabilities_cb;
+    loc_eng_data.acquire_wakelock_cb = callbacks->acquire_wakelock_cb;
+    loc_eng_data.release_wakelock_cb = callbacks->release_wakelock_cb;
+    loc_eng_data.request_utc_time_cb = callbacks->request_utc_time_cb;
+    loc_eng_data.location_ext_parser = callbacks->location_ext_parser ?
+        callbacks->location_ext_parser : noProc;
+    loc_eng_data.sv_ext_parser = callbacks->sv_ext_parser ?
+        callbacks->sv_ext_parser : noProc;
+    loc_eng_data.intermediateFix = gps_conf.INTERMEDIATE_POS;
+    loc_eng_data.shutdown_cb = callbacks->shutdown_cb;
+    // initial states taken care of by the memset above
+    // loc_eng_data.engine_status -- GPS_STATUS_NONE;
+    // loc_eng_data.fix_session_status -- GPS_STATUS_NONE;
+    // loc_eng_data.mute_session_state -- LOC_MUTE_SESS_NONE;
+
+    if ((event & LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT) && (gps_conf.NMEA_PROVIDER == NMEA_PROVIDER_AP))
+    {
+        event = event ^ LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT; // unregister for modem NMEA report
+        loc_eng_data.generateNmea = true;
+    }
+    else
+    {
+        loc_eng_data.generateNmea = false;
+    }
+
+    loc_eng_data.adapter =
+        new LocEngAdapter(event, &loc_eng_data, context,
+                          (MsgTask::tCreate)callbacks->create_thread_cb);
+
+    LOC_LOGD("loc_eng_init created client, id = %p\n",
+             loc_eng_data.adapter);
+    loc_eng_data.adapter->sendMsg(new LocEngInit(&loc_eng_data));
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+static int loc_eng_reinit(loc_eng_data_s_type &loc_eng_data)
+{
+    ENTRY_LOG();
+    int ret_val = LOC_API_ADAPTER_ERR_SUCCESS;
+    LocEngAdapter* adapter = loc_eng_data.adapter;
+
+    adapter->sendMsg(new LocEngGnssConstellationConfig(adapter));
+    adapter->sendMsg(new LocEngSuplVer(adapter, gps_conf.SUPL_VER));
+    adapter->sendMsg(new LocEngLppConfig(adapter, gps_conf.LPP_PROFILE));
+    adapter->sendMsg(new LocEngSensorControlConfig(adapter, sap_conf.SENSOR_USAGE,
+                                                   sap_conf.SENSOR_PROVIDER));
+    adapter->sendMsg(new LocEngAGlonassProtocol(adapter, gps_conf.A_GLONASS_POS_PROTOCOL_SELECT));
+
+    /* Make sure at least one of the sensor property is specified by the user in the gps.conf file. */
+    if( sap_conf.GYRO_BIAS_RANDOM_WALK_VALID ||
+        sap_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID ||
+        sap_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY_VALID ||
+        sap_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY_VALID ||
+        sap_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY_VALID ) {
+        adapter->sendMsg(new LocEngSensorProperties(adapter,
+                                                    sap_conf.GYRO_BIAS_RANDOM_WALK_VALID,
+                                                    sap_conf.GYRO_BIAS_RANDOM_WALK,
+                                                    sap_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID,
+                                                    sap_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY,
+                                                    sap_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY_VALID,
+                                                    sap_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY,
+                                                    sap_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY_VALID,
+                                                    sap_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY,
+                                                    sap_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY_VALID,
+                                                    sap_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY));
+    }
+
+    adapter->sendMsg(new LocEngSensorPerfControlConfig(adapter,
+                                                       sap_conf.SENSOR_CONTROL_MODE,
+                                                       sap_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH,
+                                                       sap_conf.SENSOR_ACCEL_BATCHES_PER_SEC,
+                                                       sap_conf.SENSOR_GYRO_SAMPLES_PER_BATCH,
+                                                       sap_conf.SENSOR_GYRO_BATCHES_PER_SEC,
+                                                       sap_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH,
+                                                       sap_conf.SENSOR_ACCEL_BATCHES_PER_SEC_HIGH,
+                                                       sap_conf.SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH,
+                                                       sap_conf.SENSOR_GYRO_BATCHES_PER_SEC_HIGH,
+                                                       sap_conf.SENSOR_ALGORITHM_CONFIG_MASK));
+
+    adapter->sendMsg(new LocEngEnableData(adapter, NULL, 0, (agpsStatus ? 1:0)));
+
+    loc_eng_xtra_version_check(loc_eng_data, gps_conf.XTRA_VERSION_CHECK);
+
+    LOC_LOGD("loc_eng_reinit reinit() successful");
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_cleanup
+
+DESCRIPTION
+   Cleans location engine. The location client handle will be released.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_cleanup(loc_eng_data_s_type &loc_eng_data)
+{
+    ENTRY_LOG_CALLFLOW();
+    INIT_CHECK(loc_eng_data.adapter, return);
+
+    // XTRA has no state, so we are fine with it.
+
+    // we need to check and clear NI
+#if 0
+    // we need to check and clear ATL
+    if (NULL != loc_eng_data.agnss_nif) {
+        delete loc_eng_data.agnss_nif;
+        loc_eng_data.agnss_nif = NULL;
+    }
+    if (NULL != loc_eng_data.internet_nif) {
+        delete loc_eng_data.internet_nif;
+        loc_eng_data.internet_nif = NULL;
+    }
+#endif
+    if (loc_eng_data.adapter->isInSession())
+    {
+        LOC_LOGD("loc_eng_cleanup: fix not stopped. stop it now.");
+        loc_eng_stop(loc_eng_data);
+    }
+
+#if 0 // can't afford to actually clean up, for many reason.
+
+    LOC_LOGD("loc_eng_init: client opened. close it now.");
+    delete loc_eng_data.adapter;
+    loc_eng_data.adapter = NULL;
+
+    loc_eng_dmn_conn_loc_api_server_unblock();
+    loc_eng_dmn_conn_loc_api_server_join();
+
+#endif
+
+    EXIT_LOG(%s, VOID_RET);
+}
+
+
+/*===========================================================================
+FUNCTION    loc_eng_start
+
+DESCRIPTION
+   Starts the tracking session
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_start(loc_eng_data_s_type &loc_eng_data)
+{
+   ENTRY_LOG_CALLFLOW();
+   INIT_CHECK(loc_eng_data.adapter, return -1);
+
+   if(! loc_eng_data.adapter->getUlpProxy()->sendStartFix())
+   {
+       loc_eng_data.adapter->sendMsg(new LocEngStartFix(loc_eng_data.adapter));
+   }
+
+   EXIT_LOG(%d, 0);
+   return 0;
+}
+
+static int loc_eng_start_handler(loc_eng_data_s_type &loc_eng_data)
+{
+   ENTRY_LOG();
+   int ret_val = LOC_API_ADAPTER_ERR_SUCCESS;
+
+   if (!loc_eng_data.adapter->isInSession()) {
+       ret_val = loc_eng_data.adapter->startFix();
+
+       if (ret_val == LOC_API_ADAPTER_ERR_SUCCESS ||
+           ret_val == LOC_API_ADAPTER_ERR_ENGINE_DOWN ||
+           ret_val == LOC_API_ADAPTER_ERR_PHONE_OFFLINE ||
+           ret_val == LOC_API_ADAPTER_ERR_INTERNAL)
+       {
+           loc_eng_data.adapter->setInSession(TRUE);
+           loc_inform_gps_status(loc_eng_data, GPS_STATUS_SESSION_BEGIN);
+       }
+   }
+
+   EXIT_LOG(%d, ret_val);
+   return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_stop_wrapper
+
+DESCRIPTION
+   Stops the tracking session
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_stop(loc_eng_data_s_type &loc_eng_data)
+{
+    ENTRY_LOG_CALLFLOW();
+    INIT_CHECK(loc_eng_data.adapter, return -1);
+
+    if(! loc_eng_data.adapter->getUlpProxy()->sendStopFix())
+    {
+        loc_eng_data.adapter->sendMsg(new LocEngStopFix(loc_eng_data.adapter));
+    }
+
+    EXIT_LOG(%d, 0);
+    return 0;
+}
+
+static int loc_eng_stop_handler(loc_eng_data_s_type &loc_eng_data)
+{
+   ENTRY_LOG();
+   int ret_val = LOC_API_ADAPTER_ERR_SUCCESS;
+
+   if (loc_eng_data.adapter->isInSession()) {
+
+       ret_val = loc_eng_data.adapter->stopFix();
+       if (ret_val == LOC_API_ADAPTER_ERR_SUCCESS)
+       {
+           loc_inform_gps_status(loc_eng_data, GPS_STATUS_SESSION_END);
+       }
+
+       loc_eng_data.adapter->setInSession(FALSE);
+   }
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_mute_one_session
+
+DESCRIPTION
+   Mutes one session
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: Success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_mute_one_session(loc_eng_data_s_type &loc_eng_data)
+{
+    ENTRY_LOG();
+    loc_eng_data.mute_session_state = LOC_MUTE_SESS_WAIT;
+    EXIT_LOG(%s, VOID_RET);
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_set_position_mode
+
+DESCRIPTION
+   Sets the mode and fix frequency for the tracking session.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_set_position_mode(loc_eng_data_s_type &loc_eng_data,
+                              LocPosMode &params)
+{
+    ENTRY_LOG_CALLFLOW();
+    INIT_CHECK(loc_eng_data.adapter, return -1);
+
+    int gnssType = getTargetGnssType(loc_get_target());
+
+    // The position mode for GSS/QCA1530 can only be standalone
+    bool is1530 = gnssType == GNSS_QCA1530;
+    bool isAPQ = gnssType == GNSS_GSS;
+    if ((isAPQ || is1530) && params.mode != LOC_POSITION_MODE_STANDALONE) {
+        params.mode = LOC_POSITION_MODE_STANDALONE;
+        LOC_LOGD("Position mode changed to standalone for target with GSS/qca1530.");
+    }
+
+    if(! loc_eng_data.adapter->getUlpProxy()->sendFixMode(params))
+    {
+        LocEngAdapter* adapter = loc_eng_data.adapter;
+        adapter->sendMsg(new LocEngPositionMode(adapter, params));
+    }
+
+    EXIT_LOG(%d, 0);
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_inject_time
+
+DESCRIPTION
+   This is used by Java native function to do time injection.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_inject_time(loc_eng_data_s_type &loc_eng_data, GpsUtcTime time,
+                        int64_t timeReference, int uncertainty)
+{
+    ENTRY_LOG_CALLFLOW();
+    INIT_CHECK(loc_eng_data.adapter, return -1);
+    LocEngAdapter* adapter = loc_eng_data.adapter;
+
+    adapter->sendMsg(new LocEngSetTime(adapter, time, timeReference,
+                                       uncertainty));
+
+    EXIT_LOG(%d, 0);
+    return 0;
+}
+
+
+/*===========================================================================
+FUNCTION    loc_eng_inject_location
+
+DESCRIPTION
+   This is used by Java native function to do location injection.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0          : Successful
+   error code : Failure
+
+SIDE EFFECTS
+   N/A
+===========================================================================*/
+int loc_eng_inject_location(loc_eng_data_s_type &loc_eng_data, double latitude,
+                            double longitude, float accuracy)
+{
+    ENTRY_LOG_CALLFLOW();
+    INIT_CHECK(loc_eng_data.adapter, return -1);
+    LocEngAdapter* adapter = loc_eng_data.adapter;
+    if(adapter->mSupportsPositionInjection)
+    {
+        adapter->sendMsg(new LocEngInjectLocation(adapter, latitude, longitude,
+                                                  accuracy));
+    }
+
+    EXIT_LOG(%d, 0);
+    return 0;
+}
+
+
+/*===========================================================================
+FUNCTION    loc_eng_delete_aiding_data
+
+DESCRIPTION
+   This is used by Java native function to delete the aiding data. The function
+   updates the global variable for the aiding data to be deleted. If the GPS
+   engine is off, the aiding data will be deleted. Otherwise, the actual action
+   will happen when gps engine is turned off.
+
+DEPENDENCIES
+   Assumes the aiding data type specified in GpsAidingData matches with
+   LOC API specification.
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_delete_aiding_data(loc_eng_data_s_type &loc_eng_data, GpsAidingData f)
+{
+    ENTRY_LOG_CALLFLOW();
+    INIT_CHECK(loc_eng_data.adapter, return);
+
+    loc_eng_data.adapter->sendMsg(new LocEngDelAidData(&loc_eng_data, f));
+
+    EXIT_LOG(%s, VOID_RET);
+}
+
+/*===========================================================================
+
+FUNCTION    loc_inform_gps_state
+
+DESCRIPTION
+   Informs the GPS Provider about the GPS status
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static void loc_inform_gps_status(loc_eng_data_s_type &loc_eng_data, GpsStatusValue status)
+{
+    ENTRY_LOG();
+
+    if (loc_eng_data.status_cb)
+    {
+        GpsStatus gs = { sizeof(gs),status };
+        CALLBACK_LOG_CALLFLOW("status_cb", %s,
+                              loc_get_gps_status_name(gs.status));
+        loc_eng_data.status_cb(&gs);
+    }
+
+    EXIT_LOG(%s, VOID_RET);
+}
+
+static int loc_eng_get_zpp_handler(loc_eng_data_s_type &loc_eng_data)
+{
+   ENTRY_LOG();
+   int ret_val = LOC_API_ADAPTER_ERR_SUCCESS;
+   UlpLocation location;
+   LocPosTechMask tech_mask = LOC_POS_TECH_MASK_DEFAULT;
+   GpsLocationExtended locationExtended;
+   memset(&locationExtended, 0, sizeof (GpsLocationExtended));
+   locationExtended.size = sizeof(locationExtended);
+
+   ret_val = loc_eng_data.adapter->getZpp(location.gpsLocation, tech_mask);
+  //Mark the location source as from ZPP
+  location.gpsLocation.flags |= LOCATION_HAS_SOURCE_INFO;
+  location.position_source = ULP_LOCATION_IS_FROM_ZPP;
+
+  loc_eng_data.adapter->getUlpProxy()->reportPosition(location,
+                                     locationExtended,
+                                     NULL,
+                                     LOC_SESS_SUCCESS,
+                                     tech_mask);
+
+  EXIT_LOG(%d, ret_val);
+  return ret_val;
+}
+
+/*
+  Callback function passed to Data Services State Machine
+  This becomes part of the state machine's servicer and
+  is used to send requests to the data services client
+*/
+static int dataCallCb(void *cb_data)
+{
+    LOC_LOGD("Enter dataCallCb\n");
+    int ret=0;
+    if(cb_data != NULL) {
+        dsCbData *cbData = (dsCbData *)cb_data;
+        LocEngAdapter *locAdapter = (LocEngAdapter *)cbData->mAdapter;
+        if(cbData->action == GPS_REQUEST_AGPS_DATA_CONN) {
+            LOC_LOGD("dataCallCb GPS_REQUEST_AGPS_DATA_CONN\n");
+            ret =  locAdapter->openAndStartDataCall();
+        }
+        else if(cbData->action == GPS_RELEASE_AGPS_DATA_CONN) {
+            LOC_LOGD("dataCallCb GPS_RELEASE_AGPS_DATA_CONN\n");
+            locAdapter->stopDataCall();
+        }
+    }
+    else {
+        LOC_LOGE("NULL argument received. Failing.\n");
+        ret = -1;
+        goto err;
+    }
+
+err:
+    LOC_LOGD("Exit dataCallCb ret = %d\n", ret);
+    return ret;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_agps_reinit
+
+DESCRIPTION
+   2nd half of loc_eng_agps_init(), singled out for modem restart to use.
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static void loc_eng_agps_reinit(loc_eng_data_s_type &loc_eng_data)
+{
+    ENTRY_LOG();
+
+    // Set server addresses which came before init
+    if (loc_eng_data.supl_host_set)
+    {
+        loc_eng_set_server(loc_eng_data, LOC_AGPS_SUPL_SERVER,
+                           loc_eng_data.supl_host_buf,
+                           loc_eng_data.supl_port_buf);
+    }
+
+    if (loc_eng_data.c2k_host_set)
+    {
+        loc_eng_set_server(loc_eng_data, LOC_AGPS_CDMA_PDE_SERVER,
+                           loc_eng_data.c2k_host_buf,
+                           loc_eng_data.c2k_port_buf);
+    }
+    EXIT_LOG(%s, VOID_RET);
+}
+/*===========================================================================
+FUNCTION    loc_eng_agps_init
+
+DESCRIPTION
+   Initialize the AGps interface.
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_agps_init(loc_eng_data_s_type &loc_eng_data, AGpsExtCallbacks* callbacks)
+{
+    ENTRY_LOG_CALLFLOW();
+    INIT_CHECK(loc_eng_data.adapter, return);
+    STATE_CHECK((NULL == loc_eng_data.agps_status_cb),
+                "agps instance already initialized",
+                return);
+    if (callbacks == NULL) {
+        LOC_LOGE("loc_eng_agps_init: bad parameters cb %p", callbacks);
+        EXIT_LOG(%s, VOID_RET);
+        return;
+    }
+    LocEngAdapter* adapter = loc_eng_data.adapter;
+    loc_eng_data.agps_status_cb = callbacks->status_cb;
+
+    loc_eng_data.internet_nif = new AgpsStateMachine(servicerTypeAgps,
+                                                     (void *)loc_eng_data.agps_status_cb,
+                                                     AGPS_TYPE_WWAN_ANY,
+                                                     false);
+    loc_eng_data.wifi_nif = new AgpsStateMachine(servicerTypeAgps,
+                                                 (void *)loc_eng_data.agps_status_cb,
+                                                 AGPS_TYPE_WIFI,
+                                                 true);
+
+    int gnssType = getTargetGnssType(loc_get_target());
+    bool isAPQ = (gnssType == GNSS_GSS);
+    bool is1530 = (gnssType == GNSS_QCA1530);
+    if (!isAPQ && !is1530) {
+        loc_eng_data.agnss_nif = new AgpsStateMachine(servicerTypeAgps,
+                                                      (void *)loc_eng_data.agps_status_cb,
+                                                      AGPS_TYPE_SUPL,
+                                                      false);
+
+        if (adapter->mSupportsAgpsRequests) {
+            if(gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL) {
+                loc_eng_data.adapter->sendMsg(new LocEngDataClientInit(&loc_eng_data));
+            }
+            loc_eng_dmn_conn_loc_api_server_launch(callbacks->create_thread_cb,
+                                                   NULL, NULL, &loc_eng_data);
+        }
+        loc_eng_agps_reinit(loc_eng_data);
+    }
+
+    EXIT_LOG(%s, VOID_RET);
+}
+
+static void deleteAidingData(loc_eng_data_s_type &logEng) {
+    if (logEng.engine_status != GPS_STATUS_ENGINE_ON &&
+        logEng.aiding_data_for_deletion != 0) {
+        logEng.adapter->deleteAidingData(logEng.aiding_data_for_deletion);
+        logEng.aiding_data_for_deletion = 0;
+    }
+}
+
+static AgpsStateMachine*
+getAgpsStateMachine(loc_eng_data_s_type &locEng, AGpsExtType agpsType) {
+    AgpsStateMachine* stateMachine;
+    switch (agpsType) {
+    case AGPS_TYPE_WIFI: {
+        stateMachine = locEng.wifi_nif;
+        break;
+    }
+    case AGPS_TYPE_INVALID:
+    case AGPS_TYPE_SUPL: {
+        stateMachine = locEng.agnss_nif;
+        break;
+    }
+    case AGPS_TYPE_SUPL_ES: {
+        locEng.ds_nif ?
+            stateMachine = locEng.ds_nif:
+            stateMachine = locEng.agnss_nif;
+        break;
+    }
+    default:
+        stateMachine  = locEng.internet_nif;
+    }
+    return stateMachine;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_agps_open
+
+DESCRIPTION
+   This function is called when on-demand data connection opening is successful.
+It should inform engine about the data open result.
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_agps_open(loc_eng_data_s_type &loc_eng_data, AGpsExtType agpsType,
+                     const char* apn, AGpsBearerType bearerType)
+{
+    ENTRY_LOG_CALLFLOW();
+    INIT_CHECK(loc_eng_data.adapter && loc_eng_data.agps_status_cb,
+               return -1);
+
+    if (apn == NULL)
+    {
+        LOC_LOGE("APN Name NULL\n");
+        return 0;
+    }
+
+    LOC_LOGD("loc_eng_agps_open APN name = [%s]", apn);
+
+    int apn_len = smaller_of(strlen (apn), MAX_APN_LEN);
+    AgpsStateMachine* sm = getAgpsStateMachine(loc_eng_data, agpsType);
+
+    loc_eng_data.adapter->sendMsg(
+        new LocEngAtlOpenSuccess(sm, apn, apn_len, bearerType));
+
+    EXIT_LOG(%d, 0);
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_agps_closed
+
+DESCRIPTION
+   This function is called when on-demand data connection closing is done.
+It should inform engine about the data close result.
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_agps_closed(loc_eng_data_s_type &loc_eng_data, AGpsExtType agpsType)
+{
+    ENTRY_LOG_CALLFLOW();
+    INIT_CHECK(loc_eng_data.adapter && loc_eng_data.agps_status_cb,
+               return -1);
+
+    AgpsStateMachine* sm = getAgpsStateMachine(loc_eng_data, agpsType);
+    loc_eng_data.adapter->sendMsg(new LocEngAtlClosed(sm));
+
+    EXIT_LOG(%d, 0);
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_agps_open_failed
+
+DESCRIPTION
+   This function is called when on-demand data connection opening has failed.
+It should inform engine about the data open result.
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_agps_open_failed(loc_eng_data_s_type &loc_eng_data, AGpsExtType agpsType)
+{
+    ENTRY_LOG_CALLFLOW();
+    INIT_CHECK(loc_eng_data.adapter && loc_eng_data.agps_status_cb,
+               return -1);
+
+    AgpsStateMachine* sm = getAgpsStateMachine(loc_eng_data, agpsType);
+    loc_eng_data.adapter->sendMsg(new LocEngAtlOpenFailed(sm));
+
+    EXIT_LOG(%d, 0);
+    return 0;
+}
+
+/*===========================================================================
+
+FUNCTION resolve_in_addr
+
+DESCRIPTION
+   Translates a hostname to in_addr struct
+
+DEPENDENCIES
+   n/a
+
+RETURN VALUE
+   TRUE if successful
+
+SIDE EFFECTS
+   n/a
+
+===========================================================================*/
+static boolean resolve_in_addr(const char *host_addr, struct in_addr *in_addr_ptr)
+{
+    ENTRY_LOG();
+    boolean ret_val = TRUE;
+
+    struct hostent             *hp;
+    hp = gethostbyname(host_addr);
+    if (hp != NULL) /* DNS OK */
+    {
+        memcpy(in_addr_ptr, hp->h_addr_list[0], hp->h_length);
+    }
+    else
+    {
+        /* Try IP representation */
+        if (inet_aton(host_addr, in_addr_ptr) == 0)
+        {
+            /* IP not valid */
+            LOC_LOGE("DNS query on '%s' failed\n", host_addr);
+            ret_val = FALSE;
+        }
+    }
+
+    EXIT_LOG(%s, loc_logger_boolStr[ret_val!=0]);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_set_server
+
+DESCRIPTION
+   This is used to set the default AGPS server. Server address is obtained
+   from gps.conf.
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int loc_eng_set_server(loc_eng_data_s_type &loc_eng_data,
+                              LocServerType type, const char* hostname, int port)
+{
+    ENTRY_LOG();
+    int ret = 0;
+    LocEngAdapter* adapter = loc_eng_data.adapter;
+
+    if (LOC_AGPS_SUPL_SERVER == type) {
+        char url[MAX_URL_LEN];
+        unsigned int len = 0;
+        const char nohost[] = "NONE";
+        if (hostname == NULL ||
+            strncasecmp(nohost, hostname, sizeof(nohost)) == 0) {
+            url[0] = NULL;
+        } else {
+            len = snprintf(url, sizeof(url), "%s:%u", hostname, (unsigned) port);
+        }
+
+        if (sizeof(url) > len) {
+            adapter->sendMsg(new LocEngSetServerUrl(adapter, url, len));
+        }
+    } else if (LOC_AGPS_CDMA_PDE_SERVER == type ||
+               LOC_AGPS_CUSTOM_PDE_SERVER == type ||
+               LOC_AGPS_MPC_SERVER == type) {
+        struct in_addr addr;
+        if (!resolve_in_addr(hostname, &addr))
+        {
+            LOC_LOGE("loc_eng_set_server, hostname %s cannot be resolved.\n", hostname);
+            ret = -2;
+        } else {
+            unsigned int ip = htonl(addr.s_addr);
+            adapter->sendMsg(new LocEngSetServerIpv4(adapter, ip, port, type));
+        }
+    } else {
+        LOC_LOGE("loc_eng_set_server, type %d cannot be resolved.\n", type);
+    }
+
+    EXIT_LOG(%d, ret);
+    return ret;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_set_server_proxy
+
+DESCRIPTION
+   If loc_eng_set_server is called before loc_eng_init, it doesn't work. This
+   proxy buffers server settings and calls loc_eng_set_server when the client is
+   open.
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_set_server_proxy(loc_eng_data_s_type &loc_eng_data,
+                             LocServerType type,
+                             const char* hostname, int port)
+{
+    ENTRY_LOG_CALLFLOW();
+    int ret_val = 0;
+
+    if (NULL != loc_eng_data.adapter)
+    {
+        ret_val = loc_eng_set_server(loc_eng_data, type, hostname, port);
+    } else {
+        LOC_LOGW("set_server called before init. save the address, type: %d, hostname: %s, port: %d",
+                 (int) type, hostname, port);
+        switch (type)
+        {
+        case LOC_AGPS_SUPL_SERVER:
+            strlcpy(loc_eng_data.supl_host_buf, hostname,
+                    sizeof(loc_eng_data.supl_host_buf));
+            loc_eng_data.supl_port_buf = port;
+            loc_eng_data.supl_host_set = 1;
+            break;
+        case LOC_AGPS_CDMA_PDE_SERVER:
+            strlcpy(loc_eng_data.c2k_host_buf, hostname,
+                    sizeof(loc_eng_data.c2k_host_buf));
+            loc_eng_data.c2k_port_buf = port;
+            loc_eng_data.c2k_host_set = 1;
+            break;
+        default:
+            LOC_LOGE("loc_eng_set_server_proxy, unknown server type = %d", (int) type);
+        }
+    }
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_agps_ril_update_network_availability
+
+DESCRIPTION
+   Sets data call allow vs disallow flag to modem
+   This is the only member of sLocEngAGpsRilInterface implemented.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_agps_ril_update_network_availability(loc_eng_data_s_type &loc_eng_data,
+                                                  int available, const char* apn)
+{
+    ENTRY_LOG_CALLFLOW();
+
+    //This is to store the status of data availability over the network.
+    //If GPS is not enabled, the INIT_CHECK will fail and the modem will
+    //not be updated with the network's availability. Since the data status
+    //can change before GPS is enabled the, storing the status will enable
+    //us to inform the modem after GPS is enabled
+    agpsStatus = available;
+
+    INIT_CHECK(loc_eng_data.adapter, return);
+    if (apn != NULL)
+    {
+        LOC_LOGD("loc_eng_agps_ril_update_network_availability: APN Name = [%s]\n", apn);
+        int apn_len = smaller_of(strlen (apn), MAX_APN_LEN);
+        LocEngAdapter* adapter = loc_eng_data.adapter;
+        adapter->sendMsg(new LocEngEnableData(adapter, apn,  apn_len, available));
+    }
+    EXIT_LOG(%s, VOID_RET);
+}
+
+int loc_eng_agps_install_certificates(loc_eng_data_s_type &loc_eng_data,
+                                      const DerEncodedCertificate* certificates,
+                                      size_t numberOfCerts)
+{
+    ENTRY_LOG_CALLFLOW();
+    int ret_val = AGPS_CERTIFICATE_OPERATION_SUCCESS;
+
+    uint32_t slotBitMask = gps_conf.AGPS_CERT_WRITABLE_MASK;
+    uint32_t slotCount = 0;
+    for (uint32_t slotBitMaskCounter=slotBitMask; slotBitMaskCounter; slotCount++) {
+        slotBitMaskCounter &= slotBitMaskCounter - 1;
+    }
+    LOC_LOGD("SlotBitMask=%u SlotCount=%u NumberOfCerts=%u",
+             slotBitMask, slotCount, numberOfCerts);
+
+    LocEngAdapter* adapter = loc_eng_data.adapter;
+
+    if (numberOfCerts == 0) {
+        LOC_LOGE("No certs to install, since numberOfCerts is zero");
+        ret_val = AGPS_CERTIFICATE_OPERATION_SUCCESS;
+    } else if (!adapter) {
+        LOC_LOGE("adapter is null!");
+        ret_val = AGPS_CERTIFICATE_ERROR_GENERIC;
+    } else if (slotCount < numberOfCerts) {
+        LOC_LOGE("Not enough cert slots (%u) to install %u certs!",
+                 slotCount, numberOfCerts);
+        ret_val = AGPS_CERTIFICATE_ERROR_TOO_MANY_CERTIFICATES;
+    } else {
+        for (int i=0; i < numberOfCerts; ++i)
+        {
+            if (certificates[i].length > AGPS_CERTIFICATE_MAX_LENGTH) {
+                LOC_LOGE("cert#(%u) length of %u is too big! greater than %u",
+                        certificates[i].length, AGPS_CERTIFICATE_MAX_LENGTH);
+                ret_val = AGPS_CERTIFICATE_ERROR_GENERIC;
+                break;
+            }
+        }
+
+        if (ret_val == AGPS_CERTIFICATE_OPERATION_SUCCESS) {
+            adapter->sendMsg(new LocEngInstallAGpsCert(adapter,
+                                                       certificates,
+                                                       numberOfCerts,
+                                                       slotBitMask));
+        }
+    }
+
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+void loc_eng_configuration_update (loc_eng_data_s_type &loc_eng_data,
+                                   const char* config_data, int32_t length)
+{
+    ENTRY_LOG_CALLFLOW();
+
+    if (config_data && length > 0) {
+        loc_gps_cfg_s_type gps_conf_tmp = gps_conf;
+        UTIL_UPDATE_CONF(config_data, length, gps_conf_table);
+        LocEngAdapter* adapter = loc_eng_data.adapter;
+
+        // it is possible that HAL is not init'ed at this time
+        if (adapter) {
+            if (gps_conf_tmp.SUPL_VER != gps_conf.SUPL_VER) {
+                adapter->sendMsg(new LocEngSuplVer(adapter, gps_conf.SUPL_VER));
+            }
+            if (gps_conf_tmp.LPP_PROFILE != gps_conf.LPP_PROFILE) {
+                adapter->sendMsg(new LocEngLppConfig(adapter, gps_conf.LPP_PROFILE));
+            }
+            if (gps_conf_tmp.A_GLONASS_POS_PROTOCOL_SELECT != gps_conf.A_GLONASS_POS_PROTOCOL_SELECT) {
+                adapter->sendMsg(new LocEngAGlonassProtocol(adapter,
+                                                            gps_conf.A_GLONASS_POS_PROTOCOL_SELECT));
+            }
+            if (gps_conf_tmp.SUPL_MODE != gps_conf.SUPL_MODE) {
+                adapter->sendMsg(new LocEngSuplMode(adapter->getUlpProxy()));
+            }
+        }
+
+        gps_conf_tmp.SUPL_VER = gps_conf.SUPL_VER;
+        gps_conf_tmp.LPP_PROFILE = gps_conf.LPP_PROFILE;
+        gps_conf_tmp.A_GLONASS_POS_PROTOCOL_SELECT = gps_conf.A_GLONASS_POS_PROTOCOL_SELECT;
+        gps_conf_tmp.GPS_LOCK = gps_conf.GPS_LOCK;
+        gps_conf = gps_conf_tmp;
+    }
+
+    EXIT_LOG(%s, VOID_RET);
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_report_status
+
+DESCRIPTION
+   Reports GPS engine state to Java layer.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   N/A
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static void loc_eng_report_status (loc_eng_data_s_type &loc_eng_data, GpsStatusValue status)
+{
+    ENTRY_LOG();
+    // Switch from WAIT to MUTE, for "engine on" or "session begin" event
+    if (status == GPS_STATUS_SESSION_BEGIN || status == GPS_STATUS_ENGINE_ON)
+    {
+        if (loc_eng_data.mute_session_state == LOC_MUTE_SESS_WAIT)
+        {
+            LOC_LOGD("loc_eng_report_status: mute_session_state changed from WAIT to IN SESSION");
+            loc_eng_data.mute_session_state = LOC_MUTE_SESS_IN_SESSION;
+        }
+    }
+
+    // Switch off MUTE session
+    if (loc_eng_data.mute_session_state == LOC_MUTE_SESS_IN_SESSION &&
+        (status == GPS_STATUS_SESSION_END || status == GPS_STATUS_ENGINE_OFF))
+    {
+        LOC_LOGD("loc_eng_report_status: mute_session_state changed from IN SESSION to NONE");
+        loc_eng_data.mute_session_state = LOC_MUTE_SESS_NONE;
+    }
+
+    // Session End is not reported during Android navigating state
+    boolean navigating = loc_eng_data.adapter->isInSession();
+    if (status != GPS_STATUS_NONE &&
+        !(status == GPS_STATUS_SESSION_END && navigating) &&
+        !(status == GPS_STATUS_SESSION_BEGIN && !navigating))
+    {
+        if (loc_eng_data.mute_session_state != LOC_MUTE_SESS_IN_SESSION)
+        {
+            // Inform GpsLocationProvider about mNavigating status
+            loc_inform_gps_status(loc_eng_data, status);
+        }
+        else {
+            LOC_LOGD("loc_eng_report_status: muting the status report.");
+        }
+    }
+
+    // Only keeps ENGINE ON/OFF in engine_status
+    if (status == GPS_STATUS_ENGINE_ON || status == GPS_STATUS_ENGINE_OFF)
+    {
+        loc_eng_data.engine_status = status;
+    }
+
+    // Only keeps SESSION BEGIN/END in fix_session_status
+    if (status == GPS_STATUS_SESSION_BEGIN || status == GPS_STATUS_SESSION_END)
+    {
+        loc_eng_data.fix_session_status = status;
+    }
+    EXIT_LOG(%s, VOID_RET);
+}
+
+/*===========================================================================
+FUNCTION loc_eng_handle_engine_down
+         loc_eng_handle_engine_up
+
+DESCRIPTION
+   Calls this function when it is detected that modem restart is happening.
+   Either we detected the modem is down or received modem up event.
+   This must be called from the deferred thread to avoid race condition.
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_handle_engine_down(loc_eng_data_s_type &loc_eng_data)
+{
+    ENTRY_LOG();
+    loc_eng_ni_reset_on_engine_restart(loc_eng_data);
+    loc_eng_report_status(loc_eng_data, GPS_STATUS_ENGINE_OFF);
+    EXIT_LOG(%s, VOID_RET);
+}
+
+void loc_eng_handle_engine_up(loc_eng_data_s_type &loc_eng_data)
+{
+    ENTRY_LOG();
+    loc_eng_reinit(loc_eng_data);
+
+    loc_eng_data.adapter->requestPowerVote();
+
+    if (loc_eng_data.agps_status_cb != NULL) {
+        if (loc_eng_data.agnss_nif)
+            loc_eng_data.agnss_nif->dropAllSubscribers();
+        if (loc_eng_data.internet_nif)
+            loc_eng_data.internet_nif->dropAllSubscribers();
+
+        loc_eng_agps_reinit(loc_eng_data);
+    }
+
+    loc_eng_report_status(loc_eng_data, GPS_STATUS_ENGINE_ON);
+
+    // modem is back up.  If we crashed in the middle of navigating, we restart.
+    if (loc_eng_data.adapter->isInSession()) {
+        // This sets the copy in adapter to modem
+        loc_eng_data.adapter->setPositionMode(NULL);
+        loc_eng_data.adapter->setInSession(false);
+        loc_eng_start_handler(loc_eng_data);
+    }
+    EXIT_LOG(%s, VOID_RET);
+}
+
+#ifdef USE_GLIB
+/*===========================================================================
+FUNCTION set_sched_policy
+
+DESCRIPTION
+   Local copy of this function which bypasses android set_sched_policy
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int set_sched_policy(int tid, SchedPolicy policy)
+{
+    return 0;
+}
+#endif /* USE_GLIB */
+
+/*===========================================================================
+FUNCTION    loc_eng_read_config
+
+DESCRIPTION
+   Initiates the reading of the gps config file stored in /etc dir
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_read_config(void)
+{
+    ENTRY_LOG_CALLFLOW();
+    if(configAlreadyRead == false)
+    {
+      // Initialize our defaults before reading of configuration file overwrites them.
+      loc_default_parameters();
+      // We only want to parse the conf file once. This is a good place to ensure that.
+      // In fact one day the conf file should go into context.
+      UTIL_READ_CONF(GPS_CONF_FILE, gps_conf_table);
+      UTIL_READ_CONF(SAP_CONF_FILE, sap_conf_table);
+      configAlreadyRead = true;
+    } else {
+      LOC_LOGV("GPS Config file has already been read\n");
+    }
+
+    EXIT_LOG(%d, 0);
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_handle_shutdown
+
+DESCRIPTION
+   Calls the shutdown callback function in the loc interface to close
+   the modem node
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_handle_shutdown(loc_eng_data_s_type &locEng)
+{
+    ENTRY_LOG();
+    locEng.shutdown_cb();
+    EXIT_LOG(%d, 0);
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_gps_measurement_init
+
+DESCRIPTION
+   Initialize gps measurement module.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_gps_measurement_init(loc_eng_data_s_type &loc_eng_data,
+                                 GpsMeasurementCallbacks* callbacks)
+{
+    ENTRY_LOG_CALLFLOW();
+
+    STATE_CHECK((NULL == loc_eng_data.gps_measurement_cb),
+                "gps measurement already initialized",
+                return GPS_MEASUREMENT_ERROR_ALREADY_INIT);
+    STATE_CHECK((callbacks != NULL),
+                "callbacks can not be NULL",
+                return GPS_MEASUREMENT_ERROR_GENERIC);
+    STATE_CHECK(loc_eng_data.adapter,
+                "GpsInterface must be initialized first",
+                return GPS_MEASUREMENT_ERROR_GENERIC);
+
+    // updated the mask
+    LOC_API_ADAPTER_EVENT_MASK_T event = LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT;
+    loc_eng_data.adapter->sendMsg(new LocEngUpdateRegistrationMask(
+                                                        &loc_eng_data,
+                                                        event,
+                                                        LOC_REGISTRATION_MASK_ENABLED));
+    // set up the callback
+    loc_eng_data.gps_measurement_cb = callbacks->measurement_callback;
+    LOC_LOGD ("%s, event masks updated successfully", __func__);
+
+    return GPS_MEASUREMENT_OPERATION_SUCCESS;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_gps_measurement_close
+
+DESCRIPTION
+   Close gps measurement module.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   N/A
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_gps_measurement_close(loc_eng_data_s_type &loc_eng_data)
+{
+    ENTRY_LOG_CALLFLOW();
+
+    INIT_CHECK(loc_eng_data.adapter, return);
+
+    // updated the mask
+    LOC_API_ADAPTER_EVENT_MASK_T event = LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT;
+    loc_eng_data.adapter->sendMsg(new LocEngUpdateRegistrationMask(
+                                                          &loc_eng_data,
+                                                          event,
+                                                          LOC_REGISTRATION_MASK_DISABLED));
+    // set up the callback
+    loc_eng_data.gps_measurement_cb = NULL;
+    EXIT_LOG(%d, 0);
+}
diff --git a/gps/loc_api/libloc_api_50001/loc_eng.h b/gps/loc_api/libloc_api_50001/loc_eng.h
new file mode 100644
index 0000000..813da48
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng.h
@@ -0,0 +1,271 @@
+/* Copyright (c) 2009-2014, 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 LOC_ENG_H
+#define LOC_ENG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+// Uncomment to keep all LOG messages (LOGD, LOGI, LOGV, etc.)
+#define MAX_NUM_ATL_CONNECTIONS  2
+
+// Define boolean type to be used by libgps on loc api module
+typedef unsigned char boolean;
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#include <loc.h>
+#include <loc_eng_xtra.h>
+#include <loc_eng_ni.h>
+#include <loc_eng_agps.h>
+#include <loc_cfg.h>
+#include <loc_log.h>
+#include <log_util.h>
+#include <loc_eng_agps.h>
+#include <LocEngAdapter.h>
+
+// The data connection minimal open time
+#define DATA_OPEN_MIN_TIME        1  /* sec */
+
+// The system sees GPS engine turns off after inactive for this period of time
+#define GPS_AUTO_OFF_TIME         2  /* secs */
+#define SUCCESS              TRUE
+#define FAILURE                 FALSE
+#define INVALID_ATL_CONNECTION_HANDLE -1
+
+#define MAX_XTRA_SERVER_URL_LENGTH 256
+
+enum loc_nmea_provider_e_type {
+    NMEA_PROVIDER_AP = 0, // Application Processor Provider of NMEA
+    NMEA_PROVIDER_MP // Modem Processor Provider of NMEA
+};
+
+enum loc_mute_session_e_type {
+   LOC_MUTE_SESS_NONE = 0,
+   LOC_MUTE_SESS_WAIT,
+   LOC_MUTE_SESS_IN_SESSION
+};
+
+// Module data
+typedef struct loc_eng_data_s
+{
+    LocEngAdapter                  *adapter;
+    loc_location_cb_ext            location_cb;
+    gps_status_callback            status_cb;
+    loc_sv_status_cb_ext           sv_status_cb;
+    agps_status_extended           agps_status_cb;
+    gps_nmea_callback              nmea_cb;
+    gps_ni_notify_callback         ni_notify_cb;
+    gps_set_capabilities           set_capabilities_cb;
+    gps_acquire_wakelock           acquire_wakelock_cb;
+    gps_release_wakelock           release_wakelock_cb;
+    gps_request_utc_time           request_utc_time_cb;
+    gps_measurement_callback       gps_measurement_cb;
+    boolean                        intermediateFix;
+    AGpsStatusValue                agps_status;
+    loc_eng_xtra_data_s_type       xtra_module_data;
+    loc_eng_ni_data_s_type         loc_eng_ni_data;
+
+    // AGPS state machines
+    AgpsStateMachine*              agnss_nif;
+    AgpsStateMachine*              internet_nif;
+    AgpsStateMachine*              wifi_nif;
+    //State machine for Data Services
+    AgpsStateMachine*              ds_nif;
+
+    // GPS engine status
+    GpsStatusValue                 engine_status;
+    GpsStatusValue                 fix_session_status;
+
+    // Aiding data information to be deleted, aiding data can only be deleted when GPS engine is off
+    GpsAidingData                  aiding_data_for_deletion;
+
+    // For muting session broadcast
+    loc_mute_session_e_type        mute_session_state;
+
+    // For nmea generation
+    boolean generateNmea;
+    uint32_t sv_used_mask;
+    float hdop;
+    float pdop;
+    float vdop;
+
+    // Address buffers, for addressing setting before init
+    int    supl_host_set;
+    char   supl_host_buf[101];
+    int    supl_port_buf;
+    int    c2k_host_set;
+    char   c2k_host_buf[101];
+    int    c2k_port_buf;
+    int    mpc_host_set;
+    char   mpc_host_buf[101];
+    int    mpc_port_buf;
+
+    loc_ext_parser location_ext_parser;
+    loc_ext_parser sv_ext_parser;
+    loc_shutdown_cb shutdown_cb;
+} loc_eng_data_s_type;
+
+/* GPS.conf support */
+/* NOTE: the implementaiton of the parser casts number
+   fields to 32 bit. To ensure all 'n' fields working,
+   they must all be 32 bit fields. */
+typedef struct loc_gps_cfg_s
+{
+    uint32_t       INTERMEDIATE_POS;
+    uint32_t       ACCURACY_THRES;
+    uint32_t       SUPL_VER;
+    uint32_t       SUPL_MODE;
+    uint32_t       CAPABILITIES;
+    uint32_t       LPP_PROFILE;
+    uint32_t       XTRA_VERSION_CHECK;
+    char        XTRA_SERVER_1[MAX_XTRA_SERVER_URL_LENGTH];
+    char        XTRA_SERVER_2[MAX_XTRA_SERVER_URL_LENGTH];
+    char        XTRA_SERVER_3[MAX_XTRA_SERVER_URL_LENGTH];
+    uint32_t       USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL;
+    uint32_t       NMEA_PROVIDER;
+    uint32_t       GPS_LOCK;
+    uint32_t       A_GLONASS_POS_PROTOCOL_SELECT;
+    uint32_t       AGPS_CERT_WRITABLE_MASK;
+} loc_gps_cfg_s_type;
+
+/* NOTE: the implementaiton of the parser casts number
+   fields to 32 bit. To ensure all 'n' fields working,
+   they must all be 32 bit fields. */
+/* Meanwhile, *_valid fields are 8 bit fields, and 'f'
+   fields are double. Rigid as they are, it is the
+   the status quo, until the parsing mechanism is
+   change, that is. */
+typedef struct
+{
+    uint8_t        GYRO_BIAS_RANDOM_WALK_VALID;
+    double         GYRO_BIAS_RANDOM_WALK;
+    uint32_t       SENSOR_ACCEL_BATCHES_PER_SEC;
+    uint32_t       SENSOR_ACCEL_SAMPLES_PER_BATCH;
+    uint32_t       SENSOR_GYRO_BATCHES_PER_SEC;
+    uint32_t       SENSOR_GYRO_SAMPLES_PER_BATCH;
+    uint32_t       SENSOR_ACCEL_BATCHES_PER_SEC_HIGH;
+    uint32_t       SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH;
+    uint32_t       SENSOR_GYRO_BATCHES_PER_SEC_HIGH;
+    uint32_t       SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH;
+    uint32_t       SENSOR_CONTROL_MODE;
+    uint32_t       SENSOR_USAGE;
+    uint32_t       SENSOR_ALGORITHM_CONFIG_MASK;
+    uint8_t        ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID;
+    double         ACCEL_RANDOM_WALK_SPECTRAL_DENSITY;
+    uint8_t        ANGLE_RANDOM_WALK_SPECTRAL_DENSITY_VALID;
+    double         ANGLE_RANDOM_WALK_SPECTRAL_DENSITY;
+    uint8_t        RATE_RANDOM_WALK_SPECTRAL_DENSITY_VALID;
+    double         RATE_RANDOM_WALK_SPECTRAL_DENSITY;
+    uint8_t        VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY_VALID;
+    double         VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY;
+    uint32_t       SENSOR_PROVIDER;
+} loc_sap_cfg_s_type;
+
+extern loc_gps_cfg_s_type gps_conf;
+extern loc_sap_cfg_s_type sap_conf;
+
+
+uint32_t getCarrierCapabilities();
+
+//loc_eng functions
+int  loc_eng_init(loc_eng_data_s_type &loc_eng_data,
+                  LocCallbacks* callbacks,
+                  LOC_API_ADAPTER_EVENT_MASK_T event,
+                  ContextBase* context);
+int  loc_eng_start(loc_eng_data_s_type &loc_eng_data);
+int  loc_eng_stop(loc_eng_data_s_type &loc_eng_data);
+void loc_eng_cleanup(loc_eng_data_s_type &loc_eng_data);
+int  loc_eng_inject_time(loc_eng_data_s_type &loc_eng_data,
+                         GpsUtcTime time, int64_t timeReference,
+                         int uncertainty);
+int  loc_eng_inject_location(loc_eng_data_s_type &loc_eng_data,
+                             double latitude, double longitude,
+                             float accuracy);
+void loc_eng_delete_aiding_data(loc_eng_data_s_type &loc_eng_data,
+                                GpsAidingData f);
+int  loc_eng_set_position_mode(loc_eng_data_s_type &loc_eng_data,
+                               LocPosMode &params);
+const void* loc_eng_get_extension(loc_eng_data_s_type &loc_eng_data,
+                                  const char* name);
+int  loc_eng_set_server_proxy(loc_eng_data_s_type &loc_eng_data,
+                              LocServerType type, const char *hostname, int port);
+void loc_eng_mute_one_session(loc_eng_data_s_type &loc_eng_data);
+int loc_eng_read_config(void);
+
+//loc_eng_agps functions
+void loc_eng_agps_init(loc_eng_data_s_type &loc_eng_data,
+                       AGpsExtCallbacks* callbacks);
+int  loc_eng_agps_open(loc_eng_data_s_type &loc_eng_data, AGpsExtType agpsType,
+                      const char* apn, AGpsBearerType bearerType);
+int  loc_eng_agps_closed(loc_eng_data_s_type &loc_eng_data, AGpsExtType agpsType);
+int  loc_eng_agps_open_failed(loc_eng_data_s_type &loc_eng_data, AGpsExtType agpsType);
+void loc_eng_agps_ril_update_network_availability(loc_eng_data_s_type &loc_eng_data,
+                                                  int avaiable, const char* apn);
+int loc_eng_agps_install_certificates(loc_eng_data_s_type &loc_eng_data,
+                                      const DerEncodedCertificate* certificates,
+                                      size_t length);
+
+//loc_eng_xtra functions
+int  loc_eng_xtra_init (loc_eng_data_s_type &loc_eng_data,
+                       GpsXtraExtCallbacks* callbacks);
+int  loc_eng_xtra_inject_data(loc_eng_data_s_type &loc_eng_data,
+                             char* data, int length);
+int  loc_eng_xtra_request_server(loc_eng_data_s_type &loc_eng_data);
+void loc_eng_xtra_version_check(loc_eng_data_s_type &loc_eng_data, int check);
+
+//loc_eng_ni functions
+extern void loc_eng_ni_init(loc_eng_data_s_type &loc_eng_data,
+                            GpsNiExtCallbacks *callbacks);
+extern void loc_eng_ni_respond(loc_eng_data_s_type &loc_eng_data,
+                               int notif_id, GpsUserResponseType user_response);
+extern void loc_eng_ni_request_handler(loc_eng_data_s_type &loc_eng_data,
+                                   const GpsNiNotification *notif,
+                                   const void* passThrough);
+extern void loc_eng_ni_reset_on_engine_restart(loc_eng_data_s_type &loc_eng_data);
+
+void loc_eng_configuration_update (loc_eng_data_s_type &loc_eng_data,
+                                   const char* config_data, int32_t length);
+int loc_eng_gps_measurement_init(loc_eng_data_s_type &loc_eng_data,
+                                 GpsMeasurementCallbacks* callbacks);
+void loc_eng_gps_measurement_close(loc_eng_data_s_type &loc_eng_data);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif // LOC_ENG_H
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_agps.cpp b/gps/loc_api/libloc_api_50001/loc_eng_agps.cpp
new file mode 100644
index 0000000..d6cc136
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_agps.cpp
@@ -0,0 +1,970 @@
+/* Copyright (c) 2011-2013, 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.
+ *
+ */
+
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_eng"
+
+#include <loc_eng_agps.h>
+#include <loc_eng_log.h>
+#include <log_util.h>
+#include <platform_lib_includes.h>
+#include <loc_eng_dmn_conn_handler.h>
+#include <loc_eng_dmn_conn.h>
+#include <sys/time.h>
+
+//======================================================================
+// C callbacks
+//======================================================================
+
+// This is given to linked_list_add as the dealloc callback
+// data -- an instance of Subscriber
+static void deleteObj(void* data)
+{
+    delete (Subscriber*)data;
+}
+
+// This is given to linked_list_search() as the comparison callback
+// when the state manchine needs to process for particular subscriber
+// fromCaller -- caller provides this obj
+// fromList -- linked_list_search() function take this one from list
+static bool hasSubscriber(void* fromCaller, void* fromList)
+{
+    Notification* notification = (Notification*)fromCaller;
+    Subscriber* s1 = (Subscriber*)fromList;
+
+    return s1->forMe(*notification);
+}
+
+// This is gvien to linked_list_search() to notify subscriber objs
+// when the state machine needs to inform all subscribers of resource
+// status changes, e.g. when resource is GRANTED.
+// fromCaller -- caller provides this ptr to a Notification obj.
+// fromList -- linked_list_search() function take this one from list
+static bool notifySubscriber(void* fromCaller, void* fromList)
+{
+    Notification* notification = (Notification*)fromCaller;
+    Subscriber* s1 = (Subscriber*)fromList;
+
+    // we notify every subscriber indiscriminatively
+    // each subscriber decides if this notification is interesting.
+    return s1->notifyRsrcStatus(*notification) &&
+           // if we do not want to delete the subscriber from the
+           // the list, we must set this to false so this function
+           // returns false
+           notification->postNotifyDelete;
+}
+
+//======================================================================
+// Notification
+//======================================================================
+const int Notification::BROADCAST_ALL = 0x80000000;
+const int Notification::BROADCAST_ACTIVE = 0x80000001;
+const int Notification::BROADCAST_INACTIVE = 0x80000002;
+const unsigned char DSStateMachine::MAX_START_DATA_CALL_RETRIES = 4;
+const unsigned int DSStateMachine::DATA_CALL_RETRY_DELAY_MSEC = 500;
+//======================================================================
+// Subscriber:  BITSubscriber / ATLSubscriber / WIFISubscriber
+//======================================================================
+bool Subscriber::forMe(Notification &notification)
+{
+    if (NULL != notification.rcver) {
+        return equals(notification.rcver);
+    } else {
+        return Notification::BROADCAST_ALL == notification.groupID ||
+            (Notification::BROADCAST_ACTIVE == notification.groupID &&
+             !isInactive()) ||
+            (Notification::BROADCAST_INACTIVE == notification.groupID &&
+             isInactive());
+    }
+}
+bool BITSubscriber::equals(const Subscriber *s) const
+{
+    BITSubscriber* bitS = (BITSubscriber*)s;
+
+    return (ID == bitS->ID &&
+            (INADDR_NONE != (unsigned int)ID ||
+             0 == strncmp(mIPv6Addr, bitS->mIPv6Addr, sizeof(mIPv6Addr))));
+}
+
+bool BITSubscriber::notifyRsrcStatus(Notification &notification)
+{
+    bool notify = forMe(notification);
+
+    if (notify) {
+        switch(notification.rsrcStatus)
+        {
+        case RSRC_UNSUBSCRIBE:
+        case RSRC_RELEASED:
+            loc_eng_dmn_conn_loc_api_server_data_conn(
+                LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON,
+                GPSONE_LOC_API_IF_RELEASE_SUCCESS);
+            break;
+        case RSRC_DENIED:
+            loc_eng_dmn_conn_loc_api_server_data_conn(
+                LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON,
+                GPSONE_LOC_API_IF_FAILURE);
+            break;
+        case RSRC_GRANTED:
+            loc_eng_dmn_conn_loc_api_server_data_conn(
+                LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON,
+                GPSONE_LOC_API_IF_REQUEST_SUCCESS);
+            break;
+        default:
+            notify = false;
+        }
+    }
+
+    return notify;
+}
+
+bool ATLSubscriber::notifyRsrcStatus(Notification &notification)
+{
+    bool notify = forMe(notification);
+
+    if (notify) {
+        switch(notification.rsrcStatus)
+        {
+        case RSRC_UNSUBSCRIBE:
+        case RSRC_RELEASED:
+            ((LocEngAdapter*)mLocAdapter)->atlCloseStatus(ID, 1);
+            break;
+        case RSRC_DENIED:
+        {
+            AGpsExtType type = mBackwardCompatibleMode ?
+                              AGPS_TYPE_INVALID : mStateMachine->getType();
+            ((LocEngAdapter*)mLocAdapter)->atlOpenStatus(ID, 0,
+                                            (char*)mStateMachine->getAPN(),
+                                            mStateMachine->getBearer(),
+                                            type);
+        }
+            break;
+        case RSRC_GRANTED:
+        {
+            AGpsExtType type = mBackwardCompatibleMode ?
+                              AGPS_TYPE_INVALID : mStateMachine->getType();
+            ((LocEngAdapter*)mLocAdapter)->atlOpenStatus(ID, 1,
+                                            (char*)mStateMachine->getAPN(),
+                                            mStateMachine->getBearer(),
+                                            type);
+        }
+            break;
+        default:
+            notify = false;
+        }
+    }
+
+    return notify;
+}
+
+bool WIFISubscriber::notifyRsrcStatus(Notification &notification)
+{
+    bool notify = forMe(notification);
+
+    if (notify) {
+        switch(notification.rsrcStatus)
+        {
+        case RSRC_UNSUBSCRIBE:
+            break;
+        case RSRC_RELEASED:
+            loc_eng_dmn_conn_loc_api_server_data_conn(
+                senderId,
+                GPSONE_LOC_API_IF_RELEASE_SUCCESS);
+            break;
+        case RSRC_DENIED:
+            loc_eng_dmn_conn_loc_api_server_data_conn(
+                senderId,
+                GPSONE_LOC_API_IF_FAILURE);
+            break;
+        case RSRC_GRANTED:
+            loc_eng_dmn_conn_loc_api_server_data_conn(
+                senderId,
+                GPSONE_LOC_API_IF_REQUEST_SUCCESS);
+            break;
+        default:
+            notify = false;
+        }
+    }
+
+    return notify;
+}
+bool DSSubscriber::notifyRsrcStatus(Notification &notification)
+{
+    bool notify = forMe(notification);
+    LOC_LOGD("DSSubscriber::notifyRsrcStatus. notify:%d \n",(int)(notify));
+    if(notify) {
+        switch(notification.rsrcStatus) {
+        case RSRC_UNSUBSCRIBE:
+        case RSRC_RELEASED:
+        case RSRC_DENIED:
+        case RSRC_GRANTED:
+            ((DSStateMachine *)mStateMachine)->informStatus(notification.rsrcStatus, ID);
+            break;
+        default:
+            notify = false;
+        }
+    }
+    return notify;
+}
+void DSSubscriber :: setInactive()
+{
+    mIsInactive = true;
+    ((DSStateMachine *)mStateMachine)->informStatus(RSRC_UNSUBSCRIBE, ID);
+}
+//======================================================================
+// AgpsState:  AgpsReleasedState / AgpsPendingState / AgpsAcquiredState
+//======================================================================
+
+// AgpsReleasedState
+class AgpsReleasedState : public AgpsState
+{
+    friend class AgpsStateMachine;
+
+    inline AgpsReleasedState(AgpsStateMachine* stateMachine) :
+        AgpsState(stateMachine)
+    { mReleasedState = this; }
+
+    inline ~AgpsReleasedState() {}
+public:
+    virtual AgpsState* onRsrcEvent(AgpsRsrcStatus event, void* data);
+    inline virtual char* whoami() {return (char*)"AgpsReleasedState";}
+};
+
+AgpsState* AgpsReleasedState::onRsrcEvent(AgpsRsrcStatus event, void* data)
+{
+    LOC_LOGD("AgpsReleasedState::onRsrcEvent; event:%d\n", (int)event);
+    if (mStateMachine->hasSubscribers()) {
+        LOC_LOGE("Error: %s subscriber list not empty!!!", whoami());
+        // I don't know how to recover from it.  I am adding this rather
+        // for debugging purpose.
+    }
+
+    AgpsState* nextState = this;
+    switch (event)
+    {
+    case RSRC_SUBSCRIBE:
+    {
+        // no notification until we get RSRC_GRANTED
+        // but we need to add subscriber to the list
+        mStateMachine->addSubscriber((Subscriber*)data);
+        // request from connecivity service for NIF
+        //The if condition is added so that if the data call setup fails
+        //for DS State Machine, we want to retry in released state.
+        //for AGps State Machine, sendRsrcRequest() will always return success
+        if(!mStateMachine->sendRsrcRequest(GPS_REQUEST_AGPS_DATA_CONN)) {
+            // move the state to PENDING
+            nextState = mPendingState;
+        }
+    }
+    break;
+
+    case RSRC_UNSUBSCRIBE:
+    {
+        // the list should really be empty, nothing to remove.
+        // but we might as well just tell the client it is
+        // unsubscribed.  False tolerance, right?
+        Subscriber* subscriber = (Subscriber*) data;
+        Notification notification(subscriber, event, false);
+        subscriber->notifyRsrcStatus(notification);
+    }
+        // break;
+    case RSRC_GRANTED:
+    case RSRC_RELEASED:
+    case RSRC_DENIED:
+    default:
+        LOC_LOGW("%s: unrecognized event %d", whoami(), event);
+        // no state change.
+        break;
+    }
+
+    LOC_LOGD("onRsrcEvent, old state %s, new state %s, event %d",
+             whoami(), nextState->whoami(), event);
+    return nextState;
+}
+
+// AgpsPendingState
+class AgpsPendingState : public AgpsState
+{
+    friend class AgpsStateMachine;
+
+    inline AgpsPendingState(AgpsStateMachine* stateMachine) :
+        AgpsState(stateMachine)
+    { mPendingState = this; }
+
+    inline ~AgpsPendingState() {}
+public:
+    virtual AgpsState* onRsrcEvent(AgpsRsrcStatus event, void* data);
+    inline virtual char* whoami() {return (char*)"AgpsPendingState";}
+};
+
+AgpsState* AgpsPendingState::onRsrcEvent(AgpsRsrcStatus event, void* data)
+{
+    AgpsState* nextState = this;;
+    LOC_LOGD("AgpsPendingState::onRsrcEvent; event:%d\n", (int)event);
+    switch (event)
+    {
+    case RSRC_SUBSCRIBE:
+    {
+        // already requested for NIF resource,
+        // do nothing until we get RSRC_GRANTED indication
+        // but we need to add subscriber to the list
+        mStateMachine->addSubscriber((Subscriber*)data);
+        // no state change.
+    }
+        break;
+
+    case RSRC_UNSUBSCRIBE:
+    {
+        Subscriber* subscriber = (Subscriber*) data;
+        if (subscriber->waitForCloseComplete()) {
+            subscriber->setInactive();
+        } else {
+            // auto notify this subscriber of the unsubscribe
+            Notification notification(subscriber, event, true);
+            mStateMachine->notifySubscribers(notification);
+        }
+
+        // now check if there is any subscribers left
+        if (!mStateMachine->hasSubscribers()) {
+            // no more subscribers, move to RELEASED state
+            nextState = mReleasedState;
+
+            // tell connecivity service we can release NIF
+            mStateMachine->sendRsrcRequest(GPS_RELEASE_AGPS_DATA_CONN);
+        } else if (!mStateMachine->hasActiveSubscribers()) {
+            // only inactive subscribers, move to RELEASING state
+            nextState = mReleasingState;
+
+            // tell connecivity service we can release NIF
+            mStateMachine->sendRsrcRequest(GPS_RELEASE_AGPS_DATA_CONN);
+        }
+    }
+    break;
+
+    case RSRC_GRANTED:
+    {
+        nextState = mAcquiredState;
+        Notification notification(Notification::BROADCAST_ACTIVE, event, false);
+        // notify all subscribers NIF resource GRANTED
+        // by setting false, we keep subscribers on the linked list
+        mStateMachine->notifySubscribers(notification);
+    }
+        break;
+
+    case RSRC_RELEASED:
+        // no state change.
+        // we are expecting either GRANTED or DENIED.  Handling RELEASED
+        // may like break our state machine in race conditions.
+        break;
+
+    case RSRC_DENIED:
+    {
+        nextState = mReleasedState;
+        Notification notification(Notification::BROADCAST_ALL, event, true);
+        // notify all subscribers NIF resource RELEASED or DENIED
+        // by setting true, we remove subscribers from the linked list
+        mStateMachine->notifySubscribers(notification);
+    }
+        break;
+
+    default:
+        LOC_LOGE("%s: unrecognized event %d", whoami(), event);
+        // no state change.
+    }
+
+    LOC_LOGD("onRsrcEvent, old state %s, new state %s, event %d",
+             whoami(), nextState->whoami(), event);
+    return nextState;
+}
+
+
+class AgpsAcquiredState : public AgpsState
+{
+    friend class AgpsStateMachine;
+
+    inline AgpsAcquiredState(AgpsStateMachine* stateMachine) :
+        AgpsState(stateMachine)
+    { mAcquiredState = this; }
+
+    inline ~AgpsAcquiredState() {}
+public:
+    virtual AgpsState* onRsrcEvent(AgpsRsrcStatus event, void* data);
+    inline virtual char* whoami() { return (char*)"AgpsAcquiredState"; }
+};
+
+
+AgpsState* AgpsAcquiredState::onRsrcEvent(AgpsRsrcStatus event, void* data)
+{
+    AgpsState* nextState = this;
+    LOC_LOGD("AgpsAcquiredState::onRsrcEvent; event:%d\n", (int)event);
+    switch (event)
+    {
+    case RSRC_SUBSCRIBE:
+    {
+        // we already have the NIF resource, simply notify subscriber
+        Subscriber* subscriber = (Subscriber*) data;
+        // we have rsrc in hand, so grant it right away
+        Notification notification(subscriber, RSRC_GRANTED, false);
+        subscriber->notifyRsrcStatus(notification);
+        // add subscriber to the list
+        mStateMachine->addSubscriber(subscriber);
+        // no state change.
+    }
+        break;
+
+    case RSRC_UNSUBSCRIBE:
+    {
+        Subscriber* subscriber = (Subscriber*) data;
+        if (subscriber->waitForCloseComplete()) {
+            subscriber->setInactive();
+        } else {
+            // auto notify this subscriber of the unsubscribe
+            Notification notification(subscriber, event, true);
+            mStateMachine->notifySubscribers(notification);
+        }
+
+        // now check if there is any subscribers left
+        if (!mStateMachine->hasSubscribers()) {
+            // no more subscribers, move to RELEASED state
+            nextState = mReleasedState;
+
+            // tell connecivity service we can release NIF
+            mStateMachine->sendRsrcRequest(GPS_RELEASE_AGPS_DATA_CONN);
+        } else if (!mStateMachine->hasActiveSubscribers()) {
+            // only inactive subscribers, move to RELEASING state
+            nextState = mReleasingState;
+
+            // tell connecivity service we can release NIF
+            mStateMachine->sendRsrcRequest(GPS_RELEASE_AGPS_DATA_CONN);
+        }
+    }
+        break;
+
+    case RSRC_GRANTED:
+        LOC_LOGW("%s: %d, RSRC_GRANTED already received", whoami(), event);
+        // no state change.
+        break;
+
+    case RSRC_RELEASED:
+    {
+        LOC_LOGW("%s: %d, a force rsrc release", whoami(), event);
+        nextState = mReleasedState;
+        Notification notification(Notification::BROADCAST_ALL, event, true);
+        // by setting true, we remove subscribers from the linked list
+        mStateMachine->notifySubscribers(notification);
+    }
+        break;
+
+    case RSRC_DENIED:
+        // no state change.
+        // we are expecting RELEASED.  Handling DENIED
+        // may like break our state machine in race conditions.
+        break;
+
+    default:
+        LOC_LOGE("%s: unrecognized event %d", whoami(), event);
+        // no state change.
+    }
+
+    LOC_LOGD("onRsrcEvent, old state %s, new state %s, event %d",
+             whoami(), nextState->whoami(), event);
+    return nextState;
+}
+
+// AgpsPendingState
+class AgpsReleasingState : public AgpsState
+{
+    friend class AgpsStateMachine;
+
+    inline AgpsReleasingState(AgpsStateMachine* stateMachine) :
+        AgpsState(stateMachine)
+    { mReleasingState = this; }
+
+    inline ~AgpsReleasingState() {}
+public:
+    virtual AgpsState* onRsrcEvent(AgpsRsrcStatus event, void* data);
+    inline virtual char* whoami() {return (char*)"AgpsReleasingState";}
+};
+
+AgpsState* AgpsReleasingState::onRsrcEvent(AgpsRsrcStatus event, void* data)
+{
+    AgpsState* nextState = this;;
+    LOC_LOGD("AgpsReleasingState::onRsrcEvent; event:%d\n", (int)event);
+
+   switch (event)
+    {
+    case RSRC_SUBSCRIBE:
+    {
+        // already requested for NIF resource,
+        // do nothing until we get RSRC_GRANTED indication
+        // but we need to add subscriber to the list
+        mStateMachine->addSubscriber((Subscriber*)data);
+        // no state change.
+    }
+        break;
+
+    case RSRC_UNSUBSCRIBE:
+    {
+        Subscriber* subscriber = (Subscriber*) data;
+        if (subscriber->waitForCloseComplete()) {
+            subscriber->setInactive();
+        } else {
+            // auto notify this subscriber of the unsubscribe
+            Notification notification(subscriber, event, true);
+            mStateMachine->notifySubscribers(notification);
+        }
+
+        // now check if there is any subscribers left
+        if (!mStateMachine->hasSubscribers()) {
+            // no more subscribers, move to RELEASED state
+            nextState = mReleasedState;
+        }
+    }
+        break;
+
+    case RSRC_DENIED:
+        // A race condition subscriber unsubscribes before AFW denies resource.
+    case RSRC_RELEASED:
+    {
+        nextState = mAcquiredState;
+        Notification notification(Notification::BROADCAST_INACTIVE, event, true);
+        // notify all subscribers that are active NIF resource RELEASE
+        // by setting false, we keep subscribers on the linked list
+        mStateMachine->notifySubscribers(notification);
+
+        if (mStateMachine->hasActiveSubscribers()) {
+            nextState = mPendingState;
+            // request from connecivity service for NIF
+            mStateMachine->sendRsrcRequest(GPS_REQUEST_AGPS_DATA_CONN);
+        } else {
+            nextState = mReleasedState;
+        }
+    }
+        break;
+
+    case RSRC_GRANTED:
+    default:
+        LOC_LOGE("%s: unrecognized event %d", whoami(), event);
+        // no state change.
+    }
+
+    LOC_LOGD("onRsrcEvent, old state %s, new state %s, event %d",
+             whoami(), nextState->whoami(), event);
+    return nextState;
+}
+//======================================================================
+//Servicer
+//======================================================================
+Servicer* Servicer :: getServicer(servicerType type, void *cb_func)
+{
+    LOC_LOGD(" Enter getServicer type:%d\n", (int)type);
+    switch(type) {
+    case servicerTypeNoCbParam:
+        return (new Servicer(cb_func));
+    case servicerTypeExt:
+        return (new ExtServicer(cb_func));
+    case servicerTypeAgps:
+        return (new AGpsServicer(cb_func));
+    default:
+        return NULL;
+    }
+}
+
+int Servicer :: requestRsrc(void *cb_data)
+{
+    callback();
+    return 0;
+}
+
+int ExtServicer :: requestRsrc(void *cb_data)
+{
+    int ret=-1;
+    LOC_LOGD("Enter ExtServicer :: requestRsrc\n");
+    ret = callbackExt(cb_data);
+    LOC_LOGD("Exit ExtServicer :: requestRsrc\n");
+    return(ret);
+}
+
+int AGpsServicer :: requestRsrc(void *cb_data)
+{
+    callbackAGps((AGpsStatus *)cb_data);
+    return 0;
+}
+
+//======================================================================
+// AgpsStateMachine
+//======================================================================
+
+AgpsStateMachine::AgpsStateMachine(servicerType servType,
+                                   void *cb_func,
+                                   AGpsExtType type,
+                                   bool enforceSingleSubscriber) :
+    mStatePtr(new AgpsReleasedState(this)),mType(type),
+    mAPN(NULL),
+    mAPNLen(0),
+    mBearer(AGPS_APN_BEARER_INVALID),
+    mEnforceSingleSubscriber(enforceSingleSubscriber),
+    mServicer(Servicer :: getServicer(servType, (void *)cb_func))
+{
+    linked_list_init(&mSubscribers);
+
+    // setting up mReleasedState
+    mStatePtr->mPendingState = new AgpsPendingState(this);
+    mStatePtr->mAcquiredState = new AgpsAcquiredState(this);
+    mStatePtr->mReleasingState = new AgpsReleasingState(this);
+
+    // setting up mAcquiredState
+    mStatePtr->mAcquiredState->mReleasedState = mStatePtr;
+    mStatePtr->mAcquiredState->mPendingState = mStatePtr->mPendingState;
+    mStatePtr->mAcquiredState->mReleasingState = mStatePtr->mReleasingState;
+
+    // setting up mPendingState
+    mStatePtr->mPendingState->mAcquiredState = mStatePtr->mAcquiredState;
+    mStatePtr->mPendingState->mReleasedState = mStatePtr;
+    mStatePtr->mPendingState->mReleasingState = mStatePtr->mReleasingState;
+
+    // setting up mReleasingState
+    mStatePtr->mReleasingState->mReleasedState = mStatePtr;
+    mStatePtr->mReleasingState->mPendingState = mStatePtr->mPendingState;
+    mStatePtr->mReleasingState->mAcquiredState = mStatePtr->mAcquiredState;
+}
+
+AgpsStateMachine::~AgpsStateMachine()
+{
+    dropAllSubscribers();
+
+    // free the 3 states.  We must read out all 3 pointers first.
+    // Otherwise we run the risk of getting pointers from already
+    // freed memory.
+    AgpsState* acquiredState = mStatePtr->mAcquiredState;
+    AgpsState* releasedState = mStatePtr->mReleasedState;
+    AgpsState* pendindState = mStatePtr->mPendingState;
+    AgpsState* releasingState = mStatePtr->mReleasingState;
+
+    delete acquiredState;
+    delete releasedState;
+    delete pendindState;
+    delete releasingState;
+    delete mServicer;
+    linked_list_destroy(&mSubscribers);
+
+    if (NULL != mAPN) {
+        delete[] mAPN;
+        mAPN = NULL;
+    }
+}
+
+void AgpsStateMachine::setAPN(const char* apn, unsigned int len)
+{
+    if (NULL != mAPN) {
+        delete mAPN;
+    }
+
+    if (NULL != apn) {
+        mAPN = new char[len+1];
+        memcpy(mAPN, apn, len);
+        mAPN[len] = NULL;
+
+        mAPNLen = len;
+    } else {
+        mAPN = NULL;
+        mAPNLen = 0;
+    }
+}
+
+void AgpsStateMachine::onRsrcEvent(AgpsRsrcStatus event)
+{
+    switch (event)
+    {
+    case RSRC_GRANTED:
+    case RSRC_RELEASED:
+    case RSRC_DENIED:
+        mStatePtr = mStatePtr->onRsrcEvent(event, NULL);
+        break;
+    default:
+        LOC_LOGW("AgpsStateMachine: unrecognized event %d", event);
+        break;
+    }
+}
+
+void AgpsStateMachine::notifySubscribers(Notification& notification) const
+{
+    if (notification.postNotifyDelete) {
+        // just any non NULL value to get started
+        Subscriber* s = (Subscriber*)~0;
+        while (NULL != s) {
+            s = NULL;
+            // if the last param sets to true, _search will delete
+            // the node from the list for us.  But the problem is
+            // once that is done, _search returns, leaving the
+            // rest of the list unprocessed.  So we need a loop.
+            linked_list_search(mSubscribers, (void**)&s, notifySubscriber,
+                               (void*)&notification, true);
+            delete s;
+        }
+    } else {
+        // no loop needed if it the last param sets to false, which
+        // mean nothing gets deleted from the list.
+        linked_list_search(mSubscribers, NULL, notifySubscriber,
+                           (void*)&notification, false);
+    }
+}
+
+void AgpsStateMachine::addSubscriber(Subscriber* subscriber) const
+{
+    Subscriber* s = NULL;
+    Notification notification((const Subscriber*)subscriber);
+    linked_list_search(mSubscribers, (void**)&s,
+                       hasSubscriber, (void*)&notification, false);
+
+    if (NULL == s) {
+        linked_list_add(mSubscribers, subscriber->clone(), deleteObj);
+    }
+}
+
+int AgpsStateMachine::sendRsrcRequest(AGpsStatusValue action) const
+{
+    Subscriber* s = NULL;
+    Notification notification(Notification::BROADCAST_ACTIVE);
+    linked_list_search(mSubscribers, (void**)&s, hasSubscriber,
+                       (void*)&notification, false);
+
+    if ((NULL == s) == (GPS_RELEASE_AGPS_DATA_CONN == action)) {
+        AGpsExtStatus nifRequest;
+        nifRequest.size = sizeof(nifRequest);
+        nifRequest.type = mType;
+        nifRequest.status = action;
+
+        if (s == NULL) {
+            nifRequest.ipv4_addr = INADDR_NONE;
+            nifRequest.ipv6_addr[0] = 0;
+            nifRequest.ssid[0] = '\0';
+            nifRequest.password[0] = '\0';
+        } else {
+            s->setIPAddresses(nifRequest.ipv4_addr, (char*)nifRequest.ipv6_addr);
+            s->setWifiInfo(nifRequest.ssid, nifRequest.password);
+        }
+
+        CALLBACK_LOG_CALLFLOW("agps_cb", %s, loc_get_agps_status_name(action));
+        mServicer->requestRsrc((void *)&nifRequest);
+    }
+    return 0;
+}
+
+void AgpsStateMachine::subscribeRsrc(Subscriber *subscriber)
+{
+  if (mEnforceSingleSubscriber && hasSubscribers()) {
+      Notification notification(Notification::BROADCAST_ALL, RSRC_DENIED, true);
+      notifySubscriber(&notification, subscriber);
+  } else {
+      mStatePtr = mStatePtr->onRsrcEvent(RSRC_SUBSCRIBE, (void*)subscriber);
+  }
+}
+
+bool AgpsStateMachine::unsubscribeRsrc(Subscriber *subscriber)
+{
+    Subscriber* s = NULL;
+    Notification notification((const Subscriber*)subscriber);
+    linked_list_search(mSubscribers, (void**)&s,
+                       hasSubscriber, (void*)&notification, false);
+
+    if (NULL != s) {
+        mStatePtr = mStatePtr->onRsrcEvent(RSRC_UNSUBSCRIBE, (void*)s);
+        return true;
+    }
+    return false;
+}
+
+bool AgpsStateMachine::hasActiveSubscribers() const
+{
+    Subscriber* s = NULL;
+    Notification notification(Notification::BROADCAST_ACTIVE);
+    linked_list_search(mSubscribers, (void**)&s,
+                       hasSubscriber, (void*)&notification, false);
+    return NULL != s;
+}
+
+//======================================================================
+// DSStateMachine
+//======================================================================
+void delay_callback(void *callbackData, int result)
+{
+    if(callbackData) {
+        DSStateMachine *DSSMInstance = (DSStateMachine *)callbackData;
+        DSSMInstance->retryCallback();
+    }
+    else {
+        LOC_LOGE(" NULL argument received. Failing.\n");
+        goto err;
+    }
+err:
+    return;
+}
+
+DSStateMachine :: DSStateMachine(servicerType type, void *cb_func,
+                                 LocEngAdapter* adapterHandle):
+    AgpsStateMachine(type, cb_func, AGPS_TYPE_INVALID,false),
+    mLocAdapter(adapterHandle)
+{
+    LOC_LOGD("%s:%d]: New DSStateMachine\n", __func__, __LINE__);
+    mRetries = 0;
+}
+
+void DSStateMachine :: retryCallback(void)
+{
+    DSSubscriber *subscriber = NULL;
+    Notification notification(Notification::BROADCAST_ACTIVE);
+    linked_list_search(mSubscribers, (void**)&subscriber, hasSubscriber,
+                       (void*)&notification, false);
+    if(subscriber)
+        mLocAdapter->requestSuplES(subscriber->ID);
+    else
+        LOC_LOGE("DSStateMachine :: retryCallback: No subscriber found." \
+                 "Cannot retry data call\n");
+    return;
+}
+
+int DSStateMachine :: sendRsrcRequest(AGpsStatusValue action) const
+{
+    DSSubscriber* s = NULL;
+    dsCbData cbData;
+    int ret=-1;
+    int connHandle=-1;
+    LOC_LOGD("Enter DSStateMachine :: sendRsrcRequest\n");
+    Notification notification(Notification::BROADCAST_ACTIVE);
+    linked_list_search(mSubscribers, (void**)&s, hasSubscriber,
+                       (void*)&notification, false);
+    if(s) {
+        connHandle = s->ID;
+        LOC_LOGD("DSStateMachine :: sendRsrcRequest - subscriber found\n");
+    }
+    else
+        LOC_LOGD("DSStateMachine :: sendRsrcRequest - No subscriber found\n");
+
+    cbData.action = action;
+    cbData.mAdapter = mLocAdapter;
+    ret = mServicer->requestRsrc((void *)&cbData);
+    //Only the request to start data call returns a success/failure
+    //The request to stop data call will always succeed
+    //Hence, the below block will only be executed when the
+    //request to start the data call fails
+    switch(ret) {
+    case LOC_API_ADAPTER_ERR_ENGINE_BUSY:
+        LOC_LOGD("DSStateMachine :: sendRsrcRequest - Failure returned: %d\n",ret);
+        ((DSStateMachine *)this)->incRetries();
+        if(mRetries > MAX_START_DATA_CALL_RETRIES) {
+            LOC_LOGE(" Failed to start Data call. Fallback to normal ATL SUPL\n");
+            informStatus(RSRC_DENIED, connHandle);
+        }
+        else {
+            if(loc_timer_start(DATA_CALL_RETRY_DELAY_MSEC, delay_callback, (void *)this)) {
+                LOC_LOGE("Error: Could not start delay thread\n");
+                ret = -1;
+                goto err;
+            }
+        }
+        break;
+    case LOC_API_ADAPTER_ERR_UNSUPPORTED:
+        LOC_LOGE("No profile found for emergency call. Fallback to normal SUPL ATL\n");
+        informStatus(RSRC_DENIED, connHandle);
+        break;
+    case LOC_API_ADAPTER_ERR_SUCCESS:
+        LOC_LOGD("%s:%d]: Request to start data call sent\n", __func__, __LINE__);
+        break;
+    case -1:
+        //One of the ways this case can be encountered is if the callback function
+        //receives a null argument, it just exits with -1 error
+        LOC_LOGE("Error: Something went wrong somewhere. Falling back to normal SUPL ATL\n");
+        informStatus(RSRC_DENIED, connHandle);
+        break;
+    default:
+        LOC_LOGE("%s:%d]: Unrecognized return value\n", __func__, __LINE__);
+    }
+err:
+    LOC_LOGD("EXIT DSStateMachine :: sendRsrcRequest; ret = %d\n", ret);
+    return ret;
+}
+
+void DSStateMachine :: onRsrcEvent(AgpsRsrcStatus event)
+{
+    void* currState = (void *)mStatePtr;
+    LOC_LOGD("Enter DSStateMachine :: onRsrcEvent. event = %d\n", (int)event);
+    switch (event)
+    {
+    case RSRC_GRANTED:
+        LOC_LOGD("DSStateMachine :: onRsrcEvent RSRC_GRANTED\n");
+        mStatePtr = mStatePtr->onRsrcEvent(event, NULL);
+        break;
+    case RSRC_RELEASED:
+        LOC_LOGD("DSStateMachine :: onRsrcEvent RSRC_RELEASED\n");
+        mStatePtr = mStatePtr->onRsrcEvent(event, NULL);
+        //To handle the case where we get a RSRC_RELEASED in
+        //pending state, we translate that to a RSRC_DENIED state
+        //since the callback from DSI is either RSRC_GRANTED or RSRC_RELEASED
+        //for when the call is connected or disconnected respectively.
+        if((void *)mStatePtr != currState)
+            break;
+        else {
+            event = RSRC_DENIED;
+            LOC_LOGE(" Switching event to RSRC_DENIED\n");
+        }
+    case RSRC_DENIED:
+        mStatePtr = mStatePtr->onRsrcEvent(event, NULL);
+        break;
+    default:
+        LOC_LOGW("AgpsStateMachine: unrecognized event %d", event);
+        break;
+    }
+    LOC_LOGD("Exit DSStateMachine :: onRsrcEvent. event = %d\n", (int)event);
+}
+
+void DSStateMachine :: informStatus(AgpsRsrcStatus status, int ID) const
+{
+    LOC_LOGD("DSStateMachine :: informStatus. Status=%d\n",(int)status);
+    switch(status) {
+    case RSRC_UNSUBSCRIBE:
+        mLocAdapter->atlCloseStatus(ID, 1);
+        break;
+    case RSRC_RELEASED:
+        mLocAdapter->closeDataCall();
+        break;
+    case RSRC_DENIED:
+        ((DSStateMachine *)this)->mRetries = 0;
+        mLocAdapter->requestATL(ID, AGPS_TYPE_SUPL);
+        break;
+    case RSRC_GRANTED:
+        mLocAdapter->atlOpenStatus(ID, 1,
+                                                     NULL,
+                                                     AGPS_APN_BEARER_INVALID,
+                                                     AGPS_TYPE_INVALID);
+        break;
+    default:
+        LOC_LOGW("DSStateMachine :: informStatus - unknown status");
+    }
+    return;
+}
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_agps.h b/gps/loc_api/libloc_api_50001/loc_eng_agps.h
new file mode 100644
index 0000000..055d955
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_agps.h
@@ -0,0 +1,419 @@
+/* Copyright (c) 2011-2013, 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 __LOC_ENG_AGPS_H__
+#define __LOC_ENG_AGPS_H__
+
+#include <stdbool.h>
+#include <ctype.h>
+#include <string.h>
+#include <arpa/inet.h>
+#include <hardware/gps.h>
+#include <gps_extended.h>
+#include <loc_core_log.h>
+#include <linked_list.h>
+#include <loc_timer.h>
+#include <LocEngAdapter.h>
+
+// forward declaration
+class AgpsStateMachine;
+class Subscriber;
+
+// NIF resource events
+typedef enum {
+    RSRC_SUBSCRIBE,
+    RSRC_UNSUBSCRIBE,
+    RSRC_GRANTED,
+    RSRC_RELEASED,
+    RSRC_DENIED,
+    RSRC_STATUS_MAX
+} AgpsRsrcStatus;
+
+typedef enum {
+    servicerTypeNoCbParam,
+    servicerTypeAgps,
+    servicerTypeExt
+}servicerType;
+
+//DS Callback struct
+typedef struct {
+    LocEngAdapter *mAdapter;
+    AGpsStatusValue action;
+}dsCbData;
+
+// information bundle for subscribers
+struct Notification {
+    // goes to every subscriber
+    static const int BROADCAST_ALL;
+    // goes to every ACTIVE subscriber
+    static const int BROADCAST_ACTIVE;
+    // goes to every INACTIVE subscriber
+    static const int BROADCAST_INACTIVE;
+
+    // go to a specific subscriber
+    const Subscriber* rcver;
+    // broadcast
+    const int groupID;
+    // the new resource status event
+    const AgpsRsrcStatus rsrcStatus;
+    // should the subscriber be deleted after the notification
+    const bool postNotifyDelete;
+
+    // convenient constructor
+    inline Notification(const int broadcast,
+                        const AgpsRsrcStatus status,
+                        const bool deleteAfterwards) :
+        rcver(NULL), groupID(broadcast), rsrcStatus(status),
+        postNotifyDelete(deleteAfterwards) {}
+
+    // convenient constructor
+    inline Notification(const Subscriber* subscriber,
+                        const AgpsRsrcStatus status,
+                        const bool deleteAfterwards) :
+        rcver(subscriber), groupID(-1), rsrcStatus(status),
+        postNotifyDelete(deleteAfterwards) {}
+
+    // convenient constructor
+    inline Notification(const int broadcast) :
+        rcver(NULL), groupID(broadcast), rsrcStatus(RSRC_STATUS_MAX),
+        postNotifyDelete(false) {}
+
+    // convenient constructor
+    inline Notification(const Subscriber* subscriber) :
+        rcver(subscriber), groupID(-1), rsrcStatus(RSRC_STATUS_MAX),
+        postNotifyDelete(false) {}
+};
+
+class AgpsState {
+    // allows AgpsStateMachine to access private data
+    // no class members are public.  We don't want
+    // anyone but state machine to use state.
+    friend class AgpsStateMachine;
+    friend class DSStateMachine;
+    // state transitions are done here.
+    // Each state implements its own transitions (of course).
+    inline virtual AgpsState* onRsrcEvent(AgpsRsrcStatus event, void* data) = 0;
+
+protected:
+    // handle back to state machine
+    const AgpsStateMachine* mStateMachine;
+    // each state has pointers to all 3 states
+    // one of which is to itself.
+    AgpsState* mReleasedState;
+    AgpsState* mAcquiredState;
+    AgpsState* mPendingState;
+    AgpsState* mReleasingState;
+
+    inline AgpsState(const AgpsStateMachine *stateMachine) :
+        mStateMachine(stateMachine),
+        mReleasedState(NULL),
+        mAcquiredState(NULL),
+        mPendingState(NULL),
+        mReleasingState(NULL) {}
+    virtual ~AgpsState() {}
+
+public:
+    // for logging purpose
+    inline virtual char* whoami() = 0;
+};
+
+class Servicer {
+    void (*callback)(void);
+public:
+    static Servicer* getServicer(servicerType type, void *cb_func);
+    virtual int requestRsrc(void *cb_data);
+    Servicer() {}
+    Servicer(void *cb_func)
+    { callback = (void(*)(void))(cb_func); }
+    virtual ~Servicer(){}
+    inline virtual char *whoami() {return (char*)"Servicer";}
+};
+
+class ExtServicer : public Servicer {
+    int (*callbackExt)(void *cb_data);
+public:
+    int requestRsrc(void *cb_data);
+    ExtServicer() {}
+    ExtServicer(void *cb_func)
+    { callbackExt = (int(*)(void *))(cb_func); }
+    virtual ~ExtServicer(){}
+    inline virtual char *whoami() {return (char*)"ExtServicer";}
+};
+
+class AGpsServicer : public Servicer {
+    void (*callbackAGps)(AGpsStatus* status);
+public:
+    int requestRsrc(void *cb_data);
+    AGpsServicer() {}
+    AGpsServicer(void *cb_func)
+    { callbackAGps = (void(*)(AGpsStatus *))(cb_func); }
+    virtual ~AGpsServicer(){}
+    inline virtual char *whoami() {return (char*)"AGpsServicer";}
+};
+
+class AgpsStateMachine {
+protected:
+    // a linked list of subscribers.
+    void* mSubscribers;
+    //handle to whoever provides the service
+    Servicer *mServicer;
+    // allows AgpsState to access private data
+    // each state is really internal data to the
+    // state machine, so it should be able to
+    // access anything within the state machine.
+    friend class AgpsState;
+    // pointer to the current state.
+    AgpsState* mStatePtr;
+private:
+    // NIF type: AGNSS or INTERNET.
+    const AGpsExtType mType;
+    // apn to the NIF.  Each state machine tracks
+    // resource state of a particular NIF.  For each
+    // NIF, there is also an active APN.
+    char* mAPN;
+    // for convenience, we don't do strlen each time.
+    unsigned int mAPNLen;
+    // bear
+    AGpsBearerType mBearer;
+    // ipv4 address for routing
+    bool mEnforceSingleSubscriber;
+
+public:
+    AgpsStateMachine(servicerType servType, void *cb_func,
+                     AGpsExtType type, bool enforceSingleSubscriber);
+    virtual ~AgpsStateMachine();
+
+    // self explanatory methods below
+    void setAPN(const char* apn, unsigned int len);
+    inline const char* getAPN() const { return (const char*)mAPN; }
+    inline void setBearer(AGpsBearerType bearer) { mBearer = bearer; }
+    inline AGpsBearerType getBearer() const { return mBearer; }
+    inline AGpsExtType getType() const { return (AGpsExtType)mType; }
+
+    // someone, a ATL client or BIT, is asking for NIF
+    void subscribeRsrc(Subscriber *subscriber);
+
+    // someone, a ATL client or BIT, is done with NIF
+    bool unsubscribeRsrc(Subscriber *subscriber);
+
+    // add a subscriber in the linked list, if not already there.
+    void addSubscriber(Subscriber* subscriber) const;
+
+    virtual void onRsrcEvent(AgpsRsrcStatus event);
+
+    // put the data together and send the FW
+    virtual int sendRsrcRequest(AGpsStatusValue action) const;
+
+    //if list is empty, linked_list_empty returns 1
+    //else if list is not empty, returns 0
+    //so hasSubscribers() returns 1 if list is not empty
+    //and returns 0 if list is empty
+    inline bool hasSubscribers() const
+    { return !linked_list_empty(mSubscribers); }
+
+    bool hasActiveSubscribers() const;
+
+    inline void dropAllSubscribers() const
+    { linked_list_flush(mSubscribers); }
+
+    // private. Only a state gets to call this.
+    void notifySubscribers(Notification& notification) const;
+
+};
+
+class DSStateMachine : public AgpsStateMachine {
+    static const unsigned char MAX_START_DATA_CALL_RETRIES;
+    static const unsigned int DATA_CALL_RETRY_DELAY_MSEC;
+    LocEngAdapter* mLocAdapter;
+    unsigned char mRetries;
+public:
+    DSStateMachine(servicerType type,
+                   void *cb_func,
+                   LocEngAdapter* adapterHandle);
+    int sendRsrcRequest(AGpsStatusValue action) const;
+    void onRsrcEvent(AgpsRsrcStatus event);
+    void retryCallback();
+    void informStatus(AgpsRsrcStatus status, int ID) const;
+    inline void incRetries() {mRetries++;}
+    inline virtual char *whoami() {return (char*)"DSStateMachine";}
+};
+
+// each subscriber is a AGPS client.  In the case of ATL, there could be
+// multiple clients from modem.  In the case of BIT, there is only one
+// cilent from BIT daemon.
+struct Subscriber {
+    const uint32_t ID;
+    const AgpsStateMachine* mStateMachine;
+    inline Subscriber(const int id,
+                      const AgpsStateMachine* stateMachine) :
+        ID(id), mStateMachine(stateMachine) {}
+    inline virtual ~Subscriber() {}
+
+    virtual void setIPAddresses(uint32_t &v4, char* v6) = 0;
+    inline virtual void setWifiInfo(char* ssid, char* password)
+    { ssid[0] = 0; password[0] = 0; }
+
+    inline virtual bool equals(const Subscriber *s) const
+    { return ID == s->ID; }
+
+    // notifies a subscriber a new NIF resource status, usually
+    // either GRANTE, DENIED, or RELEASED
+    virtual bool notifyRsrcStatus(Notification &notification) = 0;
+
+    virtual bool waitForCloseComplete() { return false; }
+    virtual void setInactive() {}
+    virtual bool isInactive() { return false; }
+
+    virtual Subscriber* clone() = 0;
+    // checks if this notification is for me, i.e.
+    // either has my id, or has a broadcast id.
+    bool forMe(Notification &notification);
+};
+
+// BITSubscriber, created with requests from BIT daemon
+struct BITSubscriber : public Subscriber {
+    char mIPv6Addr[16];
+
+    inline BITSubscriber(const AgpsStateMachine* stateMachine,
+                         unsigned int ipv4, char* ipv6) :
+        Subscriber(ipv4, stateMachine)
+    {
+        if (NULL == ipv6) {
+            mIPv6Addr[0] = 0;
+        } else {
+            memcpy(mIPv6Addr, ipv6, sizeof(mIPv6Addr));
+        }
+    }
+
+    virtual bool notifyRsrcStatus(Notification &notification);
+
+    inline virtual void setIPAddresses(uint32_t &v4, char* v6)
+    { v4 = ID; memcpy(v6, mIPv6Addr, sizeof(mIPv6Addr)); }
+
+    virtual Subscriber* clone()
+    {
+        return new BITSubscriber(mStateMachine, ID, mIPv6Addr);
+    }
+
+    virtual bool equals(const Subscriber *s) const;
+    inline virtual ~BITSubscriber(){}
+};
+
+// ATLSubscriber, created with requests from ATL
+struct ATLSubscriber : public Subscriber {
+    const LocEngAdapter* mLocAdapter;
+    const bool mBackwardCompatibleMode;
+    inline ATLSubscriber(const int id,
+                         const AgpsStateMachine* stateMachine,
+                         const LocEngAdapter* adapter,
+                         const bool compatibleMode) :
+        Subscriber(id, stateMachine), mLocAdapter(adapter),
+        mBackwardCompatibleMode(compatibleMode){}
+    virtual bool notifyRsrcStatus(Notification &notification);
+
+    inline virtual void setIPAddresses(uint32_t &v4, char* v6)
+    { v4 = INADDR_NONE; v6[0] = 0; }
+
+    inline virtual Subscriber* clone()
+    {
+        return new ATLSubscriber(ID, mStateMachine, mLocAdapter,
+                                 mBackwardCompatibleMode);
+    }
+    inline virtual ~ATLSubscriber(){}
+};
+
+// WIFISubscriber, created with requests from MSAPM or QuIPC
+struct WIFISubscriber : public Subscriber {
+    char * mSSID;
+    char * mPassword;
+    loc_if_req_sender_id_e_type senderId;
+    bool mIsInactive;
+    inline WIFISubscriber(const AgpsStateMachine* stateMachine,
+                         char * ssid, char * password, loc_if_req_sender_id_e_type sender_id) :
+        Subscriber(sender_id, stateMachine),
+        mSSID(NULL == ssid ? NULL : new char[SSID_BUF_SIZE]),
+        mPassword(NULL == password ? NULL : new char[SSID_BUF_SIZE]),
+        senderId(sender_id)
+    {
+      if (NULL != mSSID)
+          strlcpy(mSSID, ssid, SSID_BUF_SIZE);
+      if (NULL != mPassword)
+          strlcpy(mPassword, password, SSID_BUF_SIZE);
+      mIsInactive = false;
+    }
+
+    virtual bool notifyRsrcStatus(Notification &notification);
+
+    inline virtual void setIPAddresses(uint32_t &v4, char* v6) {}
+
+    inline virtual void setWifiInfo(char* ssid, char* password)
+    {
+      if (NULL != mSSID)
+          strlcpy(ssid, mSSID, SSID_BUF_SIZE);
+      else
+          ssid[0] = '\0';
+      if (NULL != mPassword)
+          strlcpy(password, mPassword, SSID_BUF_SIZE);
+      else
+          password[0] = '\0';
+    }
+
+    inline virtual bool waitForCloseComplete() { return true; }
+
+    inline virtual void setInactive() { mIsInactive = true; }
+    inline virtual bool isInactive() { return mIsInactive; }
+
+    virtual Subscriber* clone()
+    {
+        return new WIFISubscriber(mStateMachine, mSSID, mPassword, senderId);
+    }
+    inline virtual ~WIFISubscriber(){}
+};
+
+struct DSSubscriber : public Subscriber {
+    bool mIsInactive;
+    inline DSSubscriber(const AgpsStateMachine *stateMachine,
+                         const int id) :
+        Subscriber(id, stateMachine)
+    {
+        mIsInactive = false;
+    }
+    inline virtual void setIPAddresses(uint32_t &v4, char* v6) {}
+    virtual Subscriber* clone()
+    {return new DSSubscriber(mStateMachine, ID);}
+    virtual bool notifyRsrcStatus(Notification &notification);
+    inline virtual bool waitForCloseComplete() { return true; }
+    virtual void setInactive();
+    inline virtual bool isInactive()
+    { return mIsInactive; }
+    inline virtual ~DSSubscriber(){}
+    inline virtual char *whoami() {return (char*)"DSSubscriber";}
+};
+
+#endif //__LOC_ENG_AGPS_H__
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn.cpp b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn.cpp
new file mode 100644
index 0000000..c257dff
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn.cpp
@@ -0,0 +1,270 @@
+/* Copyright (c) 2011-2012, 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.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <linux/stat.h>
+#include <fcntl.h>
+#include <linux/types.h>
+#include <unistd.h>
+#include <errno.h>
+#include <grp.h>
+#include <sys/stat.h>
+
+#include "log_util.h"
+#include "platform_lib_includes.h"
+#include "loc_eng_dmn_conn_glue_msg.h"
+#include "loc_eng_dmn_conn_handler.h"
+#include "loc_eng_dmn_conn.h"
+#include "loc_eng_msg.h"
+
+static int loc_api_server_msgqid;
+static int loc_api_resp_msgqid;
+static int quipc_msgqid;
+static int msapm_msgqid;
+static int msapu_msgqid;
+
+static const char * global_loc_api_q_path = GPSONE_LOC_API_Q_PATH;
+static const char * global_loc_api_resp_q_path = GPSONE_LOC_API_RESP_Q_PATH;
+static const char * global_quipc_ctrl_q_path = QUIPC_CTRL_Q_PATH;
+static const char * global_msapm_ctrl_q_path = MSAPM_CTRL_Q_PATH;
+static const char * global_msapu_ctrl_q_path = MSAPU_CTRL_Q_PATH;
+
+static int loc_api_server_proc_init(void *context)
+{
+    loc_api_server_msgqid = loc_eng_dmn_conn_glue_msgget(global_loc_api_q_path, O_RDWR);
+    //change mode/group for the global_loc_api_q_path pipe
+    int result = chmod (global_loc_api_q_path, 0660);
+    if (result != 0)
+    {
+        LOC_LOGE("failed to change mode for %s, error = %s\n", global_loc_api_q_path, strerror(errno));
+    }
+
+    struct group * gps_group = getgrnam("gps");
+    if (gps_group != NULL)
+    {
+       result = chown (global_loc_api_q_path, -1, gps_group->gr_gid);
+       if (result != 0)
+       {
+          LOC_LOGE("chown for pipe failed, pipe %s, gid = %d, result = %d, error = %s\n",
+                   global_loc_api_q_path, gps_group->gr_gid, result, strerror(errno));
+       }
+    }
+    else
+    {
+       LOC_LOGE("getgrnam for gps failed, error code = %d\n",  errno);
+    }
+
+    loc_api_resp_msgqid = loc_eng_dmn_conn_glue_msgget(global_loc_api_resp_q_path, O_RDWR);
+
+    //change mode/group for the global_loc_api_resp_q_path pipe
+    result = chmod (global_loc_api_resp_q_path, 0660);
+    if (result != 0)
+    {
+        LOC_LOGE("failed to change mode for %s, error = %s\n", global_loc_api_resp_q_path, strerror(errno));
+    }
+
+    if (gps_group != NULL)
+    {
+       result = chown (global_loc_api_resp_q_path, -1, gps_group->gr_gid);
+       if (result != 0)
+       {
+          LOC_LOGE("chown for pipe failed, pipe %s, gid = %d, result = %d, error = %s\n",
+                   global_loc_api_resp_q_path,
+                   gps_group->gr_gid, result, strerror(errno));
+       }
+    }
+
+    quipc_msgqid = loc_eng_dmn_conn_glue_msgget(global_quipc_ctrl_q_path, O_RDWR);
+    msapm_msgqid = loc_eng_dmn_conn_glue_msgget(global_msapm_ctrl_q_path , O_RDWR);
+    msapu_msgqid = loc_eng_dmn_conn_glue_msgget(global_msapu_ctrl_q_path , O_RDWR);
+
+    LOC_LOGD("%s:%d] loc_api_server_msgqid = %d\n", __func__, __LINE__, loc_api_server_msgqid);
+    return 0;
+}
+
+static int loc_api_server_proc_pre(void *context)
+{
+    return 0;
+}
+
+static int loc_api_server_proc(void *context)
+{
+    int length, sz;
+    int result = 0;
+    static int cnt = 0;
+    struct ctrl_msgbuf * p_cmsgbuf;
+    struct ctrl_msgbuf cmsg_resp;
+
+    sz = sizeof(struct ctrl_msgbuf) + 256;
+    p_cmsgbuf = (struct ctrl_msgbuf *) malloc(sz);
+
+    if (!p_cmsgbuf) {
+        LOC_LOGE("%s:%d] Out of memory\n", __func__, __LINE__);
+        return -1;
+    }
+
+    cnt ++;
+    LOC_LOGD("%s:%d] %d listening on %s...\n", __func__, __LINE__, cnt, (char *) context);
+    length = loc_eng_dmn_conn_glue_msgrcv(loc_api_server_msgqid, p_cmsgbuf, sz);
+    if (length <= 0) {
+        free(p_cmsgbuf);
+        LOC_LOGE("%s:%d] fail receiving msg from gpsone_daemon, retry later\n", __func__, __LINE__);
+        usleep(1000);
+        return -1;
+    }
+
+    LOC_LOGD("%s:%d] received ctrl_type = %d\n", __func__, __LINE__, p_cmsgbuf->ctrl_type);
+    switch(p_cmsgbuf->ctrl_type) {
+        case GPSONE_LOC_API_IF_REQUEST:
+            result = loc_eng_dmn_conn_loc_api_server_if_request_handler(p_cmsgbuf, length);
+            break;
+
+        case GPSONE_LOC_API_IF_RELEASE:
+            result = loc_eng_dmn_conn_loc_api_server_if_release_handler(p_cmsgbuf, length);
+            break;
+
+        case GPSONE_UNBLOCK:
+            LOC_LOGD("%s:%d] GPSONE_UNBLOCK\n", __func__, __LINE__);
+            break;
+
+        default:
+            LOC_LOGE("%s:%d] unsupported ctrl_type = %d\n",
+                __func__, __LINE__, p_cmsgbuf->ctrl_type);
+            break;
+    }
+
+    free(p_cmsgbuf);
+    return 0;
+}
+
+static int loc_api_server_proc_post(void *context)
+{
+    LOC_LOGD("%s:%d]\n", __func__, __LINE__);
+    loc_eng_dmn_conn_glue_msgremove( global_loc_api_q_path, loc_api_server_msgqid);
+    loc_eng_dmn_conn_glue_msgremove( global_loc_api_resp_q_path, loc_api_resp_msgqid);
+    loc_eng_dmn_conn_glue_msgremove( global_quipc_ctrl_q_path, quipc_msgqid);
+    loc_eng_dmn_conn_glue_msgremove( global_msapm_ctrl_q_path, msapm_msgqid);
+    loc_eng_dmn_conn_glue_msgremove( global_msapu_ctrl_q_path, msapu_msgqid);
+    return 0;
+}
+
+static int loc_eng_dmn_conn_unblock_proc(void)
+{
+    struct ctrl_msgbuf cmsgbuf;
+    cmsgbuf.ctrl_type = GPSONE_UNBLOCK;
+    LOC_LOGD("%s:%d]\n", __func__, __LINE__);
+    loc_eng_dmn_conn_glue_msgsnd(loc_api_server_msgqid, & cmsgbuf, sizeof(cmsgbuf));
+    return 0;
+}
+
+static struct loc_eng_dmn_conn_thelper thelper;
+
+int loc_eng_dmn_conn_loc_api_server_launch(thelper_create_thread   create_thread_cb,
+    const char * loc_api_q_path, const char * resp_q_path, void *agps_handle)
+{
+    int result;
+
+    loc_api_handle = agps_handle;
+
+    if (loc_api_q_path) global_loc_api_q_path = loc_api_q_path;
+    if (resp_q_path)    global_loc_api_resp_q_path = resp_q_path;
+
+    result = loc_eng_dmn_conn_launch_thelper( &thelper,
+        loc_api_server_proc_init,
+        loc_api_server_proc_pre,
+        loc_api_server_proc,
+        loc_api_server_proc_post,
+        create_thread_cb,
+        (char *) global_loc_api_q_path);
+    if (result != 0) {
+        LOC_LOGE("%s:%d]\n", __func__, __LINE__);
+        return -1;
+    }
+    return 0;
+}
+
+int loc_eng_dmn_conn_loc_api_server_unblock(void)
+{
+    loc_eng_dmn_conn_unblock_thelper(&thelper);
+    loc_eng_dmn_conn_unblock_proc();
+    return 0;
+}
+
+int loc_eng_dmn_conn_loc_api_server_join(void)
+{
+    loc_eng_dmn_conn_join_thelper(&thelper);
+    return 0;
+}
+
+int loc_eng_dmn_conn_loc_api_server_data_conn(int sender_id, int status) {
+  struct ctrl_msgbuf cmsgbuf;
+  LOC_LOGD("%s:%d] quipc_msgqid = %d\n", __func__, __LINE__, quipc_msgqid);
+  cmsgbuf.ctrl_type = GPSONE_LOC_API_RESPONSE;
+  cmsgbuf.cmsg.cmsg_response.result = status;
+  switch (sender_id) {
+    case LOC_ENG_IF_REQUEST_SENDER_ID_QUIPC: {
+      LOC_LOGD("%s:%d] sender_id = LOC_ENG_IF_REQUEST_SENDER_ID_QUIPC", __func__, __LINE__);
+      if (loc_eng_dmn_conn_glue_msgsnd(quipc_msgqid, & cmsgbuf, sizeof(struct ctrl_msgbuf)) < 0) {
+        LOC_LOGD("%s:%d] error! conn_glue_msgsnd failed\n", __func__, __LINE__);
+        return -1;
+      }
+      break;
+    }
+    case LOC_ENG_IF_REQUEST_SENDER_ID_MSAPM: {
+      LOC_LOGD("%s:%d] sender_id = LOC_ENG_IF_REQUEST_SENDER_ID_MSAPM", __func__, __LINE__);
+      if (loc_eng_dmn_conn_glue_msgsnd(msapm_msgqid, & cmsgbuf, sizeof(struct ctrl_msgbuf)) < 0) {
+        LOC_LOGD("%s:%d] error! conn_glue_msgsnd failed\n", __func__, __LINE__);
+        return -1;
+      }
+      break;
+    }
+    case LOC_ENG_IF_REQUEST_SENDER_ID_MSAPU: {
+      LOC_LOGD("%s:%d] sender_id = LOC_ENG_IF_REQUEST_SENDER_ID_MSAPU", __func__, __LINE__);
+      if (loc_eng_dmn_conn_glue_msgsnd(msapu_msgqid, & cmsgbuf, sizeof(struct ctrl_msgbuf)) < 0) {
+        LOC_LOGD("%s:%d] error! conn_glue_msgsnd failed\n", __func__, __LINE__);
+        return -1;
+      }
+      break;
+    }
+    case LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON: {
+      LOC_LOGD("%s:%d] sender_id = LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON", __func__, __LINE__);
+      if (loc_eng_dmn_conn_glue_msgsnd(loc_api_resp_msgqid, & cmsgbuf, sizeof(struct ctrl_msgbuf)) < 0) {
+        LOC_LOGD("%s:%d] error! conn_glue_msgsnd failed\n", __func__, __LINE__);
+        return -1;
+      }
+      break;
+    }
+    default: {
+      LOC_LOGD("%s:%d] invalid sender ID!", __func__, __LINE__);
+    }
+  }
+  return 0;
+}
+
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn.h b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn.h
new file mode 100644
index 0000000..1d8c142
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn.h
@@ -0,0 +1,59 @@
+/* Copyright (c) 2011-2012,2014 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 LOC_ENG_DATA_SERVER_H
+#define LOC_ENG_DATA_SERVER_H
+
+#include "loc_eng_dmn_conn_thread_helper.h"
+
+#ifdef _ANDROID_
+
+#define GPSONE_LOC_API_Q_PATH "/data/misc/location/gpsone_d/gpsone_loc_api_q"
+#define GPSONE_LOC_API_RESP_Q_PATH "/data/misc/location/gpsone_d/gpsone_loc_api_resp_q"
+#define QUIPC_CTRL_Q_PATH "/data/misc/location/gpsone_d/quipc_ctrl_q"
+#define MSAPM_CTRL_Q_PATH "/data/misc/location/gpsone_d/msapm_ctrl_q"
+#define MSAPU_CTRL_Q_PATH "/data/misc/location/gpsone_d/msapu_ctrl_q"
+
+#else
+
+#define GPSONE_LOC_API_Q_PATH "/tmp/gpsone_loc_api_q"
+#define GPSONE_LOC_API_RESP_Q_PATH "/tmp/gpsone_loc_api_resp_q"
+#define QUIPC_CTRL_Q_PATH "/tmp/quipc_ctrl_q"
+#define MSAPM_CTRL_Q_PATH "/tmp/msapm_ctrl_q"
+#define MSAPU_CTRL_Q_PATH "/tmp/msapu_ctrl_q"
+
+#endif
+
+int loc_eng_dmn_conn_loc_api_server_launch(thelper_create_thread   create_thread_cb,
+    const char * loc_api_q_path, const char * ctrl_q_path, void *agps_handle);
+int loc_eng_dmn_conn_loc_api_server_unblock(void);
+int loc_eng_dmn_conn_loc_api_server_join(void);
+int loc_eng_dmn_conn_loc_api_server_data_conn(int, int);
+
+#endif /* LOC_ENG_DATA_SERVER_H */
+
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.c b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.c
new file mode 100644
index 0000000..a1076ff
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.c
@@ -0,0 +1,223 @@
+/* Copyright (c) 2011, 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.
+ *
+ */
+#include <linux/stat.h>
+#include <fcntl.h>
+
+#include <linux/types.h>
+
+#include "log_util.h"
+#include "platform_lib_includes.h"
+#include "loc_eng_dmn_conn_glue_msg.h"
+#include "loc_eng_dmn_conn_handler.h"
+
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_glue_msgget
+
+DESCRIPTION
+   This function get a message queue
+
+   q_path - name path of the message queue
+   mode -
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   message queue id
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_glue_msgget(const char * q_path, int mode)
+{
+    int msgqid;
+    msgqid = loc_eng_dmn_conn_glue_pipeget(q_path, mode);
+    return msgqid;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_glue_msgremove
+
+DESCRIPTION
+   remove a message queue
+
+   q_path - name path of the message queue
+   msgqid - message queue id
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success or negative value for failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_glue_msgremove(const char * q_path, int msgqid)
+{
+    int result;
+    result = loc_eng_dmn_conn_glue_piperemove(q_path, msgqid);
+    return result;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_glue_msgsnd
+
+DESCRIPTION
+   Send a message
+
+   msgqid - message queue id
+   msgp - pointer to the message to be sent
+   msgsz - size of the message
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   number of bytes sent out or negative value for failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_glue_msgsnd(int msgqid, const void * msgp, size_t msgsz)
+{
+    int result;
+    struct ctrl_msgbuf *pmsg = (struct ctrl_msgbuf *) msgp;
+    pmsg->msgsz = msgsz;
+
+    result = loc_eng_dmn_conn_glue_pipewrite(msgqid, msgp, msgsz);
+    if (result != (int) msgsz) {
+        LOC_LOGE("%s:%d] pipe broken %d, msgsz = %d\n", __func__, __LINE__, result, (int) msgsz);
+        return -1;
+    }
+
+    return result;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_glue_msgrcv
+
+DESCRIPTION
+   receive a message
+
+   msgqid - message queue id
+   msgp - pointer to the buffer to hold the message
+   msgsz - size of the buffer
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   number of bytes received or negative value for failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_glue_msgrcv(int msgqid, void *msgp, size_t msgbufsz)
+{
+    int result;
+    struct ctrl_msgbuf *pmsg = (struct ctrl_msgbuf *) msgp;
+
+    result = loc_eng_dmn_conn_glue_piperead(msgqid, &(pmsg->msgsz), sizeof(pmsg->msgsz));
+    if (result != sizeof(pmsg->msgsz)) {
+        LOC_LOGE("%s:%d] pipe broken %d\n", __func__, __LINE__, result);
+        return -1;
+    }
+
+    if (msgbufsz < pmsg->msgsz) {
+        LOC_LOGE("%s:%d] msgbuf is too small %d < %d\n", __func__, __LINE__, (int) msgbufsz, (int) pmsg->msgsz);
+        return -1;
+    }
+
+    result = loc_eng_dmn_conn_glue_piperead(msgqid, (uint8_t *) msgp + sizeof(pmsg->msgsz), pmsg->msgsz - sizeof(pmsg->msgsz));
+    if (result != (int) (pmsg->msgsz - sizeof(pmsg->msgsz))) {
+        LOC_LOGE("%s:%d] pipe broken %d, msgsz = %d\n", __func__, __LINE__, result, (int) pmsg->msgsz);
+        return -1;
+    }
+
+    return pmsg->msgsz;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_glue_msgunblock
+
+DESCRIPTION
+   unblock a message queue
+
+   msgqid - message queue id
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_glue_msgunblock(int msgqid)
+{
+    return loc_eng_dmn_conn_glue_pipeunblock(msgqid);
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_glue_msgflush
+
+DESCRIPTION
+   flush out the message in a queue
+
+   msgqid - message queue id
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   number of bytes that are flushed out.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_glue_msgflush(int msgqid)
+{
+    int length;
+    char buf[128];
+
+    do {
+        length = loc_eng_dmn_conn_glue_piperead(msgqid, buf, 128);
+        LOC_LOGD("%s:%d] %s\n", __func__, __LINE__, buf);
+    } while(length);
+    return length;
+}
+
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.h b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.h
new file mode 100644
index 0000000..d685c87
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.h
@@ -0,0 +1,51 @@
+/* Copyright (c) 2011, 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 LOC_ENG_DMN_CONN_GLUE_MSG_H
+#define LOC_ENG_DMN_CONN_GLUE_MSG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#include <linux/types.h>
+#include "loc_eng_dmn_conn_glue_pipe.h"
+
+int loc_eng_dmn_conn_glue_msgget(const char * q_path, int mode);
+int loc_eng_dmn_conn_glue_msgremove(const char * q_path, int msgqid);
+int loc_eng_dmn_conn_glue_msgsnd(int msgqid, const void * msgp, size_t msgsz);
+int loc_eng_dmn_conn_glue_msgrcv(int msgqid, void *msgp, size_t msgsz);
+int loc_eng_dmn_conn_glue_msgflush(int msgqid);
+int loc_eng_dmn_conn_glue_msgunblock(int msgqid);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* LOC_ENG_DMN_CONN_GLUE_MSG_H */
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.c b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.c
new file mode 100644
index 0000000..dffcad0
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.c
@@ -0,0 +1,214 @@
+/* Copyright (c) 2011-2012, 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.
+ *
+ */
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+// #include <linux/stat.h>
+#include <fcntl.h>
+// #include <linux/types.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "loc_eng_dmn_conn_glue_pipe.h"
+#include "log_util.h"
+#include "platform_lib_includes.h"
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_glue_pipeget
+
+DESCRIPTION
+   create a named pipe.
+
+   pipe_name - pipe name path
+   mode - mode
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success or negative value for failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_glue_pipeget(const char * pipe_name, int mode)
+{
+    int fd;
+    int result;
+
+    LOC_LOGD("%s, mode = %d\n", pipe_name, mode);
+    result = mkfifo(pipe_name, 0660);
+
+    if ((result == -1) && (errno != EEXIST)) {
+        LOC_LOGE("failed: %s\n", strerror(errno));
+        return result;
+    }
+
+    // The mode in mkfifo is not honoured and does not provide the
+    // group permissions. Doing chmod to add group permissions.
+    result = chmod (pipe_name, 0660);
+    if (result != 0){
+        LOC_LOGE ("%s failed to change mode for %s, error = %s\n", __func__,
+              pipe_name, strerror(errno));
+    }
+
+    fd = open(pipe_name, mode);
+    if (fd <= 0)
+    {
+        LOC_LOGE("failed: %s\n", strerror(errno));
+    }
+    LOC_LOGD("fd = %d, %s\n", fd, pipe_name);
+    return fd;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_glue_piperemove
+
+DESCRIPTION
+   remove a pipe
+
+    pipe_name - pipe name path
+    fd - fd for the pipe
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_glue_piperemove(const char * pipe_name, int fd)
+{
+    close(fd);
+    if (pipe_name) unlink(pipe_name);
+    LOC_LOGD("fd = %d, %s\n", fd, pipe_name);
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_glue_pipewrite
+
+DESCRIPTION
+   write to a pipe
+
+   fd - fd of a pipe
+   buf - buffer for the data to write
+   sz - size of the data in buffer
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   number of bytes written or negative value for failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_glue_pipewrite(int fd, const void * buf, size_t sz)
+{
+    int result;
+
+    result = write(fd, buf, sz);
+
+    /* @todo check for non EINTR & EAGAIN, shall not do select again, select_tut Law 7) */
+
+    /* LOC_LOGD("fd = %d, buf = 0x%lx, size = %d, result = %d\n", fd, (long) buf, (int) sz, (int) result); */
+    return result;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_glue_piperead
+
+DESCRIPTION
+   read from a pipe
+
+   fd - fd for the pipe
+   buf - buffer to hold the data read from pipe
+   sz - size of the buffer
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   number of bytes read from pipe or negative value for failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_glue_piperead(int fd, void * buf, size_t sz)
+{
+    int len;
+
+    len = read(fd, buf, sz);
+
+    /* @todo check for non EINTR & EAGAIN, shall not do select again, select_tut Law 7) */
+
+    /* LOC_LOGD("fd = %d, buf = 0x%lx, size = %d, len = %d\n", fd, (long) buf, (int) sz, len); */
+    return len;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_glue_pipeunblock
+
+DESCRIPTION
+   unblock a pipe
+
+   fd - fd for the pipe
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0 for success or negative value for failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_glue_pipeunblock(int fd)
+{
+    int result;
+    struct flock flock_v;
+    LOC_LOGD("\n");
+//    result = fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NDELAY);
+    flock_v.l_type = F_UNLCK;
+    flock_v.l_len = 32;
+    result = fcntl(fd, F_SETLK, &flock_v);
+    if (result < 0) {
+        LOC_LOGE("fcntl failure, %s\n", strerror(errno));
+    }
+
+    return result;
+}
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.h b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.h
new file mode 100644
index 0000000..b2fa3a0
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.h
@@ -0,0 +1,50 @@
+/* Copyright (c) 2011, 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 LOC_ENG_DMN_CONN_GLUE_PIPE_H
+#define LOC_ENG_DMN_CONN_GLUE_PIPE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <linux/types.h>
+
+int loc_eng_dmn_conn_glue_pipeget(const char * pipe_name, int mode);
+int loc_eng_dmn_conn_glue_piperemove(const char * pipe_name, int fd);
+int loc_eng_dmn_conn_glue_pipewrite(int fd, const void * buf, size_t sz);
+int loc_eng_dmn_conn_glue_piperead(int fd, void * buf, size_t sz);
+
+int loc_eng_dmn_conn_glue_pipeflush(int fd);
+int loc_eng_dmn_conn_glue_pipeunblock(int fd);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* LOC_ENG_DMN_CONN_GLUE_PIPE_H */
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.cpp b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.cpp
new file mode 100644
index 0000000..edd53f2
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.cpp
@@ -0,0 +1,237 @@
+/* Copyright (c) 2011-2012, 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.
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "log_util.h"
+#include "platform_lib_includes.h"
+#include "loc_eng_msg.h"
+#include "loc_eng_dmn_conn.h"
+#include "loc_eng_dmn_conn_handler.h"
+
+void* loc_api_handle = NULL;
+
+int loc_eng_dmn_conn_loc_api_server_if_request_handler(struct ctrl_msgbuf *pmsg, int len)
+{
+    LOC_LOGD("%s:%d]\n", __func__, __LINE__);
+#ifndef DEBUG_DMN_LOC_API
+    if (NULL == loc_api_handle) {
+        LOC_LOGE("%s:%d] NO agps data handle\n", __func__, __LINE__);
+        return 1;
+    }
+
+    if (NULL != loc_api_handle) {
+        AGpsExtType type;
+        switch (pmsg->cmsg.cmsg_if_request.type) {
+          case IF_REQUEST_TYPE_SUPL:
+          {
+            LOC_LOGD("IF_REQUEST_TYPE_SUPL");
+            type = AGPS_TYPE_SUPL;
+            break;
+          }
+          case IF_REQUEST_TYPE_WIFI:
+          {
+            LOC_LOGD("IF_REQUEST_TYPE_WIFI");
+            type = AGPS_TYPE_WIFI;
+            break;
+          }
+          case IF_REQUEST_TYPE_ANY:
+          {
+            LOC_LOGD("IF_REQUEST_TYPE_ANY");
+            type = AGPS_TYPE_ANY;
+            break;
+          }
+          default:
+          {
+            LOC_LOGD("invalid IF_REQUEST_TYPE!");
+            return -1;
+          }
+        }
+        switch (pmsg->cmsg.cmsg_if_request.sender_id) {
+          case IF_REQUEST_SENDER_ID_QUIPC:
+          {
+            LOC_LOGD("IF_REQUEST_SENDER_ID_QUIPC");
+            LocEngReqRelWifi* msg =
+                new LocEngReqRelWifi(loc_api_handle,
+                                     type,
+                                     LOC_ENG_IF_REQUEST_SENDER_ID_QUIPC,
+                                     (char*)pmsg->cmsg.cmsg_if_request.ssid,
+                                     (char*)pmsg->cmsg.cmsg_if_request.password,
+                                     true);
+            msg->send();
+            break;
+          }
+          case IF_REQUEST_SENDER_ID_MSAPM:
+          {
+            LOC_LOGD("IF_REQUEST_SENDER_ID_MSAPM");
+            LocEngReqRelWifi* msg =
+                new LocEngReqRelWifi(loc_api_handle,
+                                     type,
+                                     LOC_ENG_IF_REQUEST_SENDER_ID_MSAPM,
+                                     (char*)pmsg->cmsg.cmsg_if_request.ssid,
+                                     (char*)pmsg->cmsg.cmsg_if_request.password,
+                                     true);
+            msg->send();
+            break;
+          }
+          case IF_REQUEST_SENDER_ID_MSAPU:
+          {
+            LOC_LOGD("IF_REQUEST_SENDER_ID_MSAPU");
+            LocEngReqRelWifi* msg =
+                new LocEngReqRelWifi(loc_api_handle,
+                                     type,
+                                     LOC_ENG_IF_REQUEST_SENDER_ID_MSAPU,
+                                     (char*)pmsg->cmsg.cmsg_if_request.ssid,
+                                     (char*)pmsg->cmsg.cmsg_if_request.password,
+                                     true);
+            msg->send();
+            break;
+          }
+          case IF_REQUEST_SENDER_ID_GPSONE_DAEMON:
+          {
+            LOC_LOGD("IF_REQUEST_SENDER_ID_GPSONE_DAEMON");
+            LocEngReqRelBIT* msg =
+                new LocEngReqRelBIT(loc_api_handle,
+                                    type,
+                                    pmsg->cmsg.cmsg_if_request.ipv4_addr,
+                                    (char*)pmsg->cmsg.cmsg_if_request.ipv6_addr,
+                                    true);
+            msg->send();
+            break;
+          }
+          default:
+          {
+            LOC_LOGD("invalid IF_REQUEST_SENDER_ID!");
+            return -1;
+          }
+        }
+    }
+
+#else
+   loc_eng_dmn_conn_loc_api_server_data_conn(LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON, GPSONE_LOC_API_IF_REQUEST_SUCCESS);
+#endif
+    return 0;
+}
+
+int loc_eng_dmn_conn_loc_api_server_if_release_handler(struct ctrl_msgbuf *pmsg, int len)
+{
+    LOC_LOGD("%s:%d]\n", __func__, __LINE__);
+#ifndef DEBUG_DMN_LOC_API
+    AGpsExtType type;
+    switch (pmsg->cmsg.cmsg_if_request.type) {
+      case IF_REQUEST_TYPE_SUPL:
+      {
+        LOC_LOGD("IF_REQUEST_TYPE_SUPL");
+        type = AGPS_TYPE_SUPL;
+        break;
+      }
+      case IF_REQUEST_TYPE_WIFI:
+      {
+        LOC_LOGD("IF_REQUEST_TYPE_WIFI");
+        type = AGPS_TYPE_WIFI;
+        break;
+      }
+      case IF_REQUEST_TYPE_ANY:
+      {
+        LOC_LOGD("IF_REQUEST_TYPE_ANY");
+        type = AGPS_TYPE_ANY;
+        break;
+      }
+      default:
+      {
+        LOC_LOGD("invalid IF_REQUEST_TYPE!");
+        return -1;
+      }
+    }
+    switch (pmsg->cmsg.cmsg_if_request.sender_id) {
+      case IF_REQUEST_SENDER_ID_QUIPC:
+      {
+        LOC_LOGD("IF_REQUEST_SENDER_ID_QUIPC");
+        LocEngReqRelWifi* msg =
+            new LocEngReqRelWifi(loc_api_handle,
+                                 type,
+                                 LOC_ENG_IF_REQUEST_SENDER_ID_QUIPC,
+                                 (char*)pmsg->cmsg.cmsg_if_request.ssid,
+                                 (char*)pmsg->cmsg.cmsg_if_request.password,
+                                 false);
+        msg->send();
+        break;
+      }
+      case IF_REQUEST_SENDER_ID_MSAPM:
+      {
+        LOC_LOGD("IF_REQUEST_SENDER_ID_MSAPM");
+        LocEngReqRelWifi* msg =
+            new LocEngReqRelWifi(loc_api_handle,
+                                 type,
+                                 LOC_ENG_IF_REQUEST_SENDER_ID_MSAPM,
+                                 (char*)pmsg->cmsg.cmsg_if_request.ssid,
+                                 (char*)pmsg->cmsg.cmsg_if_request.password,
+                                 false);
+        msg->send();
+        break;
+      }
+      case IF_REQUEST_SENDER_ID_MSAPU:
+      {
+        LOC_LOGD("IF_REQUEST_SENDER_ID_MSAPU");
+        LocEngReqRelWifi* msg =
+            new LocEngReqRelWifi(loc_api_handle,
+                                 type,
+                                 LOC_ENG_IF_REQUEST_SENDER_ID_MSAPU,
+                                 (char*)pmsg->cmsg.cmsg_if_request.ssid,
+                                 (char*)pmsg->cmsg.cmsg_if_request.password,
+                                 false);
+        msg->send();
+        break;
+      }
+      case IF_REQUEST_SENDER_ID_GPSONE_DAEMON:
+      {
+        LOC_LOGD("IF_REQUEST_SENDER_ID_GPSONE_DAEMON");
+        LocEngReqRelBIT* msg =
+            new LocEngReqRelBIT(loc_api_handle,
+                                type,
+                                pmsg->cmsg.cmsg_if_request.ipv4_addr,
+                                (char*)pmsg->cmsg.cmsg_if_request.ipv6_addr,
+                                false);
+        msg->send();
+        break;
+      }
+      default:
+      {
+        LOC_LOGD("invalid IF_REQUEST_SENDER_ID!");
+        return -1;
+      }
+    }
+#else
+   loc_eng_dmn_conn_loc_api_server_data_conn(LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON, GPSONE_LOC_API_IF_RELEASE_SUCCESS);
+#endif
+    return 0;
+}
+
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.h b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.h
new file mode 100644
index 0000000..1c0edd5
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.h
@@ -0,0 +1,106 @@
+/* Copyright (c) 2011-2012, 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 LOC_ENG_DATA_SERVER_HANDLER
+#define LOC_ENG_DATA_SERVER_HANDLER
+
+#include <linux/types.h>
+#include <arpa/inet.h>
+
+//for SSID_BUF_SIZE
+#include <hardware/gps.h>
+
+#ifndef SSID_BUF_SIZE
+    #define SSID_BUF_SIZE (32+1)
+#endif
+
+enum {
+    /* 0x0 - 0xEF is reserved for daemon internal */
+    GPSONE_LOC_API_IF_REQUEST   = 0xF0,
+    GPSONE_LOC_API_IF_RELEASE,
+    GPSONE_LOC_API_RESPONSE,
+    GPSONE_UNBLOCK,
+};
+
+enum {
+    GPSONE_LOC_API_IF_REQUEST_SUCCESS = 0xF0,
+    GPSONE_LOC_API_IF_RELEASE_SUCCESS,
+    GPSONE_LOC_API_IF_FAILURE,
+};
+
+
+struct ctrl_msg_response {
+    int result;
+};
+
+struct ctrl_msg_unblock {
+    int reserved;
+};
+
+typedef enum {
+  IF_REQUEST_TYPE_SUPL = 0,
+  IF_REQUEST_TYPE_WIFI,
+  IF_REQUEST_TYPE_ANY
+} ctrl_if_req_type_e_type;
+
+typedef enum {
+  IF_REQUEST_SENDER_ID_QUIPC = 0,
+  IF_REQUEST_SENDER_ID_MSAPM,
+  IF_REQUEST_SENDER_ID_MSAPU,
+  IF_REQUEST_SENDER_ID_GPSONE_DAEMON,
+  IF_REQUEST_SENDER_ID_MODEM
+} ctrl_if_req_sender_id_e_type;
+
+struct ctrl_msg_if_request {
+    ctrl_if_req_type_e_type type;
+    ctrl_if_req_sender_id_e_type sender_id;
+    unsigned long ipv4_addr;
+    unsigned char ipv6_addr[16];
+    char ssid[SSID_BUF_SIZE];
+    char password[SSID_BUF_SIZE];
+};
+
+/* do not change this structure */
+struct ctrl_msgbuf {
+    size_t msgsz;
+    uint16_t reserved1;
+    uint32_t reserved2;
+    uint8_t ctrl_type;
+    union {
+        struct ctrl_msg_response   cmsg_response;
+        struct ctrl_msg_unblock    cmsg_unblock;
+        struct ctrl_msg_if_request cmsg_if_request;
+    } cmsg;
+};
+
+extern void* loc_api_handle;
+
+int loc_eng_dmn_conn_loc_api_server_if_request_handler(struct ctrl_msgbuf *pmsg, int len);
+int loc_eng_dmn_conn_loc_api_server_if_release_handler(struct ctrl_msgbuf *pmsg, int len);
+
+#endif /* LOC_ENG_DATA_SERVER_HANDLER */
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_thread_helper.c b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_thread_helper.c
new file mode 100644
index 0000000..9fed9d4
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_thread_helper.c
@@ -0,0 +1,399 @@
+/* Copyright (c) 2011, 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.
+ *
+ */
+#include <stdio.h>
+
+#include "log_util.h"
+#include "platform_lib_includes.h"
+#include "loc_eng_dmn_conn_thread_helper.h"
+
+/*===========================================================================
+FUNCTION    thelper_signal_init
+
+DESCRIPTION
+   This function will initialize the conditional variable resources.
+
+   thelper - thelper instance
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success or negative value for failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int thelper_signal_init(struct loc_eng_dmn_conn_thelper * thelper)
+{
+    int result;
+    thelper->thread_exit  = 0;
+    thelper->thread_ready = 0;
+    result = pthread_cond_init( &thelper->thread_cond, NULL);
+    if (result) {
+        return result;
+    }
+
+    result = pthread_mutex_init(&thelper->thread_mutex, NULL);
+    if (result) {
+        pthread_cond_destroy(&thelper->thread_cond);
+    }
+    return result;
+}
+
+/*===========================================================================
+FUNCTION
+
+DESCRIPTION
+   This function will destroy the conditional variable resources
+
+    thelper - pointer to thelper instance
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success or negative value for failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int thelper_signal_destroy(struct loc_eng_dmn_conn_thelper * thelper)
+{
+    int result, ret_result = 0;
+    result = pthread_cond_destroy( &thelper->thread_cond);
+    if (result) {
+        ret_result = result;
+    }
+
+    result = pthread_mutex_destroy(&thelper->thread_mutex);
+    if (result) {
+        ret_result = result;
+    }
+
+    return ret_result;
+}
+
+/*===========================================================================
+FUNCTION    thelper_signal_wait
+
+DESCRIPTION
+   This function will be blocked on the conditional variable until thelper_signal_ready
+   is called
+
+    thelper - pointer to thelper instance
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success or negative value for failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int thelper_signal_wait(struct loc_eng_dmn_conn_thelper * thelper)
+{
+    int result = 0;
+
+    pthread_mutex_lock(&thelper->thread_mutex);
+    if (!thelper->thread_ready && !thelper->thread_exit) {
+        result = pthread_cond_wait(&thelper->thread_cond, &thelper->thread_mutex);
+    }
+
+    if (thelper->thread_exit) {
+        result = -1;
+    }
+    pthread_mutex_unlock(&thelper->thread_mutex);
+
+    return result;
+}
+
+/*===========================================================================
+FUNCTION     thelper_signal_ready
+
+DESCRIPTION
+   This function will wake up the conditional variable
+
+    thelper - pointer to thelper instance
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success or negative value for failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int thelper_signal_ready(struct loc_eng_dmn_conn_thelper * thelper)
+{
+    int result;
+
+    LOC_LOGD("%s:%d] 0x%lx\n", __func__, __LINE__, (long) thelper);
+
+    pthread_mutex_lock(&thelper->thread_mutex);
+    thelper->thread_ready = 1;
+    result = pthread_cond_signal(&thelper->thread_cond);
+    pthread_mutex_unlock(&thelper->thread_mutex);
+
+    return result;
+}
+
+/*===========================================================================
+FUNCTION     thelper_signal_block
+
+DESCRIPTION
+   This function will set the thread ready to 0 to block the thelper_signal_wait
+
+    thelper - pointer to thelper instance
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   if thread_ready is set
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int thelper_signal_block(struct loc_eng_dmn_conn_thelper * thelper)
+{
+    int result = thelper->thread_ready;
+
+    LOC_LOGD("%s:%d] 0x%lx\n", __func__, __LINE__, (long) thelper);
+
+    pthread_mutex_lock(&thelper->thread_mutex);
+    thelper->thread_ready = 0;
+    pthread_mutex_unlock(&thelper->thread_mutex);
+
+    return result;
+}
+
+/*===========================================================================
+FUNCTION    thelper_main
+
+DESCRIPTION
+   This function is the main thread. It will be launched as a child thread
+
+    data - pointer to the instance
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   NULL
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static void * thelper_main(void *data)
+{
+    int result = 0;
+    struct loc_eng_dmn_conn_thelper * thelper = (struct loc_eng_dmn_conn_thelper *) data;
+
+    if (thelper->thread_proc_init) {
+        result = thelper->thread_proc_init(thelper->thread_context);
+        if (result < 0) {
+            thelper->thread_exit = 1;
+            thelper_signal_ready(thelper);
+            LOC_LOGE("%s:%d] error: 0x%lx\n", __func__, __LINE__, (long) thelper);
+            return NULL;
+        }
+    }
+
+    thelper_signal_ready(thelper);
+
+    if (thelper->thread_proc_pre) {
+        result = thelper->thread_proc_pre(thelper->thread_context);
+        if (result < 0) {
+            thelper->thread_exit = 1;
+            LOC_LOGE("%s:%d] error: 0x%lx\n", __func__, __LINE__, (long) thelper);
+            return NULL;
+        }
+    }
+
+    do {
+        if (thelper->thread_proc) {
+            result = thelper->thread_proc(thelper->thread_context);
+            if (result < 0) {
+                thelper->thread_exit = 1;
+                LOC_LOGE("%s:%d] error: 0x%lx\n", __func__, __LINE__, (long) thelper);
+            }
+        }
+    } while (thelper->thread_exit == 0);
+
+    if (thelper->thread_proc_post) {
+        result = thelper->thread_proc_post(thelper->thread_context);
+    }
+
+    if (result != 0) {
+        LOC_LOGE("%s:%d] error: 0x%lx\n", __func__, __LINE__, (long) thelper);
+    }
+    return NULL;
+}
+
+static void thelper_main_2(void *data)
+{
+    thelper_main(data);
+    return;
+}
+
+
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_launch_thelper
+
+DESCRIPTION
+   This function will initialize the thread context and launch the thelper_main
+
+    thelper - pointer to thelper instance
+    thread_proc_init - The initialization function pointer
+    thread_proc_pre  - The function to call before task loop and after initialization
+    thread_proc      - The task loop
+    thread_proc_post - The function to call after the task loop
+    context          - the context for the above four functions
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success or negative value for failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_launch_thelper(struct loc_eng_dmn_conn_thelper * thelper,
+    int (*thread_proc_init) (void * context),
+    int (*thread_proc_pre) (void * context),
+    int (*thread_proc) (void * context),
+    int (*thread_proc_post) (void * context),
+    thelper_create_thread   create_thread_cb,
+    void * context)
+{
+    int result;
+
+    thelper_signal_init(thelper);
+
+    if (context) {
+        thelper->thread_context    = context;
+    }
+
+    thelper->thread_proc_init  = thread_proc_init;
+    thelper->thread_proc_pre   = thread_proc_pre;
+    thelper->thread_proc       = thread_proc;
+    thelper->thread_proc_post  = thread_proc_post;
+
+    LOC_LOGD("%s:%d] 0x%lx call pthread_create\n", __func__, __LINE__, (long) thelper);
+    if (create_thread_cb) {
+        result = 0;
+        thelper->thread_id = create_thread_cb("loc_eng_dmn_conn",
+            thelper_main_2, (void *)thelper);
+    } else {
+        result = pthread_create(&thelper->thread_id, NULL,
+            thelper_main, (void *)thelper);
+    }
+
+    if (result != 0) {
+        LOC_LOGE("%s:%d] 0x%lx\n", __func__, __LINE__, (long) thelper);
+        return -1;
+    }
+
+    LOC_LOGD("%s:%d] 0x%lx pthread_create done\n", __func__, __LINE__, (long) thelper);
+
+    thelper_signal_wait(thelper);
+
+    LOC_LOGD("%s:%d] 0x%lx pthread ready\n", __func__, __LINE__, (long) thelper);
+    return thelper->thread_exit;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_unblock_thelper
+
+DESCRIPTION
+   This function unblocks thelper_main to release the thread
+
+    thelper - pointer to thelper instance
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_unblock_thelper(struct loc_eng_dmn_conn_thelper * thelper)
+{
+    LOC_LOGD("%s:%d] 0x%lx\n", __func__, __LINE__, (long) thelper);
+    thelper->thread_exit = 1;
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_dmn_conn_join_thelper
+
+    thelper - pointer to thelper instance
+
+DESCRIPTION
+   This function will wait for the thread of thelper_main to finish
+
+DEPENDENCIES
+   None
+
+RETURN VALUE
+   0: success or negative value for failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_dmn_conn_join_thelper(struct loc_eng_dmn_conn_thelper * thelper)
+{
+    int result;
+
+    LOC_LOGD("%s:%d] 0x%lx\n", __func__, __LINE__, (long) thelper);
+    result = pthread_join(thelper->thread_id, NULL);
+    if (result != 0) {
+        LOC_LOGE("%s:%d] 0x%lx\n", __func__, __LINE__, (long) thelper);
+    }
+    LOC_LOGD("%s:%d] 0x%lx\n", __func__, __LINE__, (long) thelper);
+
+    thelper_signal_destroy(thelper);
+
+    return result;
+}
+
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_thread_helper.h b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_thread_helper.h
new file mode 100644
index 0000000..89e598b
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_thread_helper.h
@@ -0,0 +1,74 @@
+/* Copyright (c) 2011, 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 __LOC_ENG_DMN_CONN_THREAD_HELPER_H__
+#define __LOC_ENG_DMN_CONN_THREAD_HELPER_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <pthread.h>
+
+struct loc_eng_dmn_conn_thelper {
+    unsigned char   thread_exit;
+    unsigned char   thread_ready;
+    pthread_cond_t  thread_cond;
+    pthread_mutex_t thread_mutex;
+    pthread_t       thread_id;
+    void *          thread_context;
+    int             (*thread_proc_init) (void * context);
+    int             (*thread_proc_pre)  (void * context);
+    int             (*thread_proc)      (void * context);
+    int             (*thread_proc_post) (void * context);
+};
+
+typedef pthread_t (* thelper_create_thread)(const char* name, void (*start)(void *), void* arg);
+int loc_eng_dmn_conn_launch_thelper(struct loc_eng_dmn_conn_thelper * thelper,
+    int (*thread_proc_init) (void * context),
+    int (*thread_proc_pre)  (void * context),
+    int (*thread_proc)      (void * context),
+    int (*thread_proc_post) (void * context),
+    thelper_create_thread   create_thread_cb,
+    void * context);
+
+int loc_eng_dmn_conn_unblock_thelper(struct loc_eng_dmn_conn_thelper * thelper);
+int loc_eng_dmn_conn_join_thelper(struct loc_eng_dmn_conn_thelper * thelper);
+
+/* if only need to use signal */
+int thelper_signal_init(struct loc_eng_dmn_conn_thelper * thelper);
+int thelper_signal_destroy(struct loc_eng_dmn_conn_thelper * thelper);
+int thelper_signal_wait(struct loc_eng_dmn_conn_thelper * thelper);
+int thelper_signal_ready(struct loc_eng_dmn_conn_thelper * thelper);
+int thelper_signal_block(struct loc_eng_dmn_conn_thelper * thelper);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LOC_ENG_DMN_CONN_THREAD_HELPER_H__ */
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_log.cpp b/gps/loc_api/libloc_api_50001/loc_eng_log.cpp
new file mode 100644
index 0000000..3a34167
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_log.cpp
@@ -0,0 +1,35 @@
+/* Copyright (c) 2011-2013, 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.
+ *
+ */
+
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_eng"
+
+#include "loc_log.h"
+#include "loc_eng_log.h"
+
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_log.h b/gps/loc_api/libloc_api_50001/loc_eng_log.h
new file mode 100644
index 0000000..a68bd84
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_log.h
@@ -0,0 +1,44 @@
+/* Copyright (c) 2011-2013, 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 LOC_ENG_LOG_H
+#define LOC_ENG_LOG_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <ctype.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LOC_ENG_LOG_H */
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_msg.h b/gps/loc_api/libloc_api_50001/loc_eng_msg.h
new file mode 100644
index 0000000..e3c48fb
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_msg.h
@@ -0,0 +1,313 @@
+/* Copyright (c) 2011-2013, 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 LOC_ENG_MSG_H
+#define LOC_ENG_MSG_H
+
+
+#include <hardware/gps.h>
+#include <gps_extended.h>
+#include <stdlib.h>
+#include <string.h>
+#include <log_util.h>
+#include <loc_eng_log.h>
+#include <loc_eng.h>
+#include <MsgTask.h>
+#include <LocEngAdapter.h>
+
+#ifndef SSID_BUF_SIZE
+    #define SSID_BUF_SIZE (32+1)
+#endif
+#ifdef USE_GLIB
+
+#include <glib.h>
+
+#endif /* USE_GLIB */
+#include "platform_lib_includes.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+using namespace loc_core;
+
+struct LocEngPositionMode : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const LocPosMode mPosMode;
+    LocEngPositionMode(LocEngAdapter* adapter, LocPosMode &mode);
+    virtual void proc() const;
+    virtual void log() const;
+    void send() const;
+};
+
+
+struct LocEngStartFix : public LocMsg {
+    LocEngAdapter* mAdapter;
+    LocEngStartFix(LocEngAdapter* adapter);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+    void send() const;
+};
+
+struct LocEngStopFix : public LocMsg {
+    LocEngAdapter* mAdapter;
+    LocEngStopFix(LocEngAdapter* adapter);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+    void send() const;
+};
+
+struct LocEngReportPosition : public LocMsg {
+    LocAdapterBase* mAdapter;
+    const UlpLocation mLocation;
+    const GpsLocationExtended mLocationExtended;
+    const void* mLocationExt;
+    const enum loc_sess_status mStatus;
+    const LocPosTechMask mTechMask;
+    LocEngReportPosition(LocAdapterBase* adapter,
+                         UlpLocation &loc,
+                         GpsLocationExtended &locExtended,
+                         void* locExt,
+                         enum loc_sess_status st,
+                         LocPosTechMask technology);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+    void send() const;
+};
+
+struct LocEngReportSv : public LocMsg {
+    LocAdapterBase* mAdapter;
+    const GpsSvStatus mSvStatus;
+    const GpsLocationExtended mLocationExtended;
+    const void* mSvExt;
+    LocEngReportSv(LocAdapterBase* adapter,
+                   GpsSvStatus &sv,
+                   GpsLocationExtended &locExtended,
+                   void* svExtended);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+    void send() const;
+};
+
+struct LocEngReportStatus : public LocMsg {
+    LocAdapterBase* mAdapter;
+    const GpsStatusValue mStatus;
+    LocEngReportStatus(LocAdapterBase* adapter,
+                       GpsStatusValue engineStatus);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngReportNmea : public LocMsg {
+    void* mLocEng;
+    char* const mNmea;
+    const int mLen;
+    LocEngReportNmea(void* locEng,
+                     const char* data, int len);
+    inline virtual ~LocEngReportNmea()
+    {
+        delete[] mNmea;
+    }
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngReportXtraServer : public LocMsg {
+    void* mLocEng;
+    int mMaxLen;
+    char *mServers;
+    LocEngReportXtraServer(void* locEng,
+                           const char *url1, const char *url2,
+                           const char *url3, const int maxlength);
+    inline virtual ~LocEngReportXtraServer()
+    {
+        delete[] mServers;
+    }
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngSuplEsOpened : public LocMsg {
+    void* mLocEng;
+    LocEngSuplEsOpened(void* locEng);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngSuplEsClosed : public LocMsg {
+    void* mLocEng;
+    LocEngSuplEsClosed(void* locEng);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngRequestSuplEs : public LocMsg {
+    void* mLocEng;
+    const int mID;
+    LocEngRequestSuplEs(void* locEng, int id);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngRequestATL : public LocMsg {
+    void* mLocEng;
+    const int mID;
+    const AGpsExtType mType;
+    LocEngRequestATL(void* locEng, int id,
+                     AGpsExtType agps_type);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngReleaseATL : public LocMsg {
+    void* mLocEng;
+    const int mID;
+    LocEngReleaseATL(void* locEng, int id);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngReqRelBIT : public LocMsg {
+    void* mLocEng;
+    const AGpsExtType mType;
+    const int mIPv4Addr;
+    char* const mIPv6Addr;
+    const bool mIsReq;
+    LocEngReqRelBIT(void* instance, AGpsExtType type,
+                    int ipv4, char* ipv6, bool isReq);
+    virtual ~LocEngReqRelBIT();
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+    void send() const;
+};
+
+struct LocEngReqRelWifi : public LocMsg {
+    void* mLocEng;
+    const AGpsExtType mType;
+    const loc_if_req_sender_id_e_type mSenderId;
+    char* const mSSID;
+    char* const mPassword;
+    const bool mIsReq;
+    LocEngReqRelWifi(void* locEng, AGpsExtType type,
+                     loc_if_req_sender_id_e_type sender_id,
+                     char* s, char* p, bool isReq);
+    virtual ~LocEngReqRelWifi();
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+    void send() const;
+};
+
+struct LocEngRequestXtra : public LocMsg {
+    void* mLocEng;
+    LocEngRequestXtra(void* locEng);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngRequestTime : public LocMsg {
+    void* mLocEng;
+    LocEngRequestTime(void* locEng);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngRequestNi : public LocMsg {
+    void* mLocEng;
+    const GpsNiNotification mNotify;
+    const void *mPayload;
+    LocEngRequestNi(void* locEng,
+                    GpsNiNotification &notif,
+                    const void* data);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngDown : public LocMsg {
+    void* mLocEng;
+    LocEngDown(void* locEng);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngUp : public LocMsg {
+    void* mLocEng;
+    LocEngUp(void* locEng);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngGetZpp : public LocMsg {
+    LocEngAdapter* mAdapter;
+    LocEngGetZpp(LocEngAdapter* adapter);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+    void send() const;
+};
+
+struct LocEngReportGpsMeasurement : public LocMsg {
+    void* mLocEng;
+    const GpsData mGpsData;
+    LocEngReportGpsMeasurement(void* locEng,
+                               GpsData &gpsData);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+
+struct LocEngShutdown : public LocMsg {
+    LocEngAdapter* mAdapter;
+    LocEngShutdown(LocEngAdapter* adapter);
+    virtual void proc() const;
+    void locallog() const;
+    virtual void log() const;
+};
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* LOC_ENG_MSG_H */
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_ni.cpp b/gps/loc_api/libloc_api_50001/loc_eng_ni.cpp
new file mode 100644
index 0000000..4597b98
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_ni.cpp
@@ -0,0 +1,414 @@
+/* Copyright (c) 2009-2014, 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.
+ *
+ */
+
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_eng"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <pthread.h>
+#include <errno.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <time.h>
+#include <MsgTask.h>
+
+#include <loc_eng.h>
+
+#include "log_util.h"
+#include "platform_lib_includes.h"
+
+using namespace loc_core;
+
+/*=============================================================================
+ *
+ *                             DATA DECLARATION
+ *
+ *============================================================================*/
+
+/*=============================================================================
+ *
+ *                             FUNCTION DECLARATIONS
+ *
+ *============================================================================*/
+static void* ni_thread_proc(void *args);
+
+struct LocEngInformNiResponse : public LocMsg {
+    LocEngAdapter* mAdapter;
+    const GpsUserResponseType mResponse;
+    const void *mPayload;
+    inline LocEngInformNiResponse(LocEngAdapter* adapter,
+                                  GpsUserResponseType resp,
+                                  const void* data) :
+        LocMsg(), mAdapter(adapter),
+        mResponse(resp), mPayload(data)
+    {
+        locallog();
+    }
+    inline ~LocEngInformNiResponse()
+    {
+        // this is a bit weird since mPayload is not
+        // allocated by this class.  But there is no better way.
+        // mPayload actually won't be NULL here.
+        free((void*)mPayload);
+    }
+    inline virtual void proc() const
+    {
+        mAdapter->informNiResponse(mResponse, mPayload);
+    }
+    inline void locallog() const
+    {
+        LOC_LOGV("LocEngInformNiResponse - "
+                 "response: %s\n  mPayload: %p",
+                 loc_get_ni_response_name(mResponse),
+                 mPayload);
+    }
+    inline virtual void log() const
+    {
+        locallog();
+    }
+};
+
+/*===========================================================================
+
+FUNCTION loc_eng_ni_request_handler
+
+DESCRIPTION
+   Displays the NI request and awaits user input. If a previous request is
+   in session, it is ignored.
+
+RETURN VALUE
+   none
+
+===========================================================================*/
+void loc_eng_ni_request_handler(loc_eng_data_s_type &loc_eng_data,
+                            const GpsNiNotification *notif,
+                            const void* passThrough)
+{
+    ENTRY_LOG();
+    char lcs_addr[32]; // Decoded LCS address for UMTS CP NI
+    loc_eng_ni_data_s_type* loc_eng_ni_data_p = &loc_eng_data.loc_eng_ni_data;
+    loc_eng_ni_session_s_type* pSession = NULL;
+
+    if (NULL == loc_eng_data.ni_notify_cb) {
+        EXIT_LOG(%s, "loc_eng_ni_init hasn't happened yet.");
+        return;
+    }
+
+    if (notif->ni_type == GPS_NI_TYPE_EMERGENCY_SUPL) {
+        if (NULL != loc_eng_ni_data_p->sessionEs.rawRequest) {
+            LOC_LOGW("loc_eng_ni_request_handler, supl es NI in progress, new supl es NI ignored, type: %d",
+                     notif->ni_type);
+            if (NULL != passThrough) {
+                free((void*)passThrough);
+            }
+        } else {
+            pSession = &loc_eng_ni_data_p->sessionEs;
+        }
+    } else {
+        if (NULL != loc_eng_ni_data_p->session.rawRequest ||
+            NULL != loc_eng_ni_data_p->sessionEs.rawRequest) {
+            LOC_LOGW("loc_eng_ni_request_handler, supl NI in progress, new supl NI ignored, type: %d",
+                     notif->ni_type);
+            if (NULL != passThrough) {
+                free((void*)passThrough);
+            }
+        } else {
+            pSession = &loc_eng_ni_data_p->session;
+        }
+    }
+
+
+    if (pSession) {
+        /* Save request */
+        pSession->rawRequest = (void*)passThrough;
+        pSession->reqID = ++loc_eng_ni_data_p->reqIDCounter;
+        pSession->adapter = loc_eng_data.adapter;
+
+        /* Fill in notification */
+        ((GpsNiNotification*)notif)->notification_id = pSession->reqID;
+
+        if (notif->notify_flags == GPS_NI_PRIVACY_OVERRIDE)
+        {
+            loc_eng_mute_one_session(loc_eng_data);
+        }
+
+        /* Log requestor ID and text for debugging */
+        LOC_LOGI("Notification: notif_type: %d, timeout: %d, default_resp: %d", notif->ni_type, notif->timeout, notif->default_response);
+        LOC_LOGI("              requestor_id: %s (encoding: %d)", notif->requestor_id, notif->requestor_id_encoding);
+        LOC_LOGI("              text: %s text (encoding: %d)", notif->text, notif->text_encoding);
+        if (notif->extras[0])
+        {
+            LOC_LOGI("              extras: %s", notif->extras);
+        }
+
+        /* For robustness, spawn a thread at this point to timeout to clear up the notification status, even though
+         * the OEM layer in java does not do so.
+         **/
+        pSession->respTimeLeft = 5 + (notif->timeout != 0 ? notif->timeout : LOC_NI_NO_RESPONSE_TIME);
+        LOC_LOGI("Automatically sends 'no response' in %d seconds (to clear status)\n", pSession->respTimeLeft);
+
+        int rc = 0;
+        rc = pthread_create(&pSession->thread, NULL, ni_thread_proc, pSession);
+        if (rc)
+        {
+            LOC_LOGE("Loc NI thread is not created.\n");
+        }
+        rc = pthread_detach(pSession->thread);
+        if (rc)
+        {
+            LOC_LOGE("Loc NI thread is not detached.\n");
+        }
+
+        CALLBACK_LOG_CALLFLOW("ni_notify_cb - id", %d, notif->notification_id);
+        loc_eng_data.ni_notify_cb((GpsNiNotification*)notif);
+    }
+    EXIT_LOG(%s, VOID_RET);
+}
+
+/*===========================================================================
+
+FUNCTION ni_thread_proc
+
+===========================================================================*/
+static void* ni_thread_proc(void *args)
+{
+    ENTRY_LOG();
+
+    loc_eng_ni_session_s_type* pSession = (loc_eng_ni_session_s_type*)args;
+    int rc = 0;          /* return code from pthread calls */
+
+    struct timeval present_time;
+    struct timespec expire_time;
+
+    LOC_LOGD("Starting Loc NI thread...\n");
+    pthread_mutex_lock(&pSession->tLock);
+    /* Calculate absolute expire time */
+    gettimeofday(&present_time, NULL);
+    expire_time.tv_sec  = present_time.tv_sec + pSession->respTimeLeft;
+    expire_time.tv_nsec = present_time.tv_usec * 1000;
+    LOC_LOGD("ni_thread_proc-Time out set for abs time %ld with delay %d sec\n",
+             (long) expire_time.tv_sec, pSession->respTimeLeft );
+
+    while (!pSession->respRecvd)
+    {
+        rc = pthread_cond_timedwait(&pSession->tCond,
+                                    &pSession->tLock,
+                                    &expire_time);
+        if (rc == ETIMEDOUT)
+        {
+            pSession->resp = GPS_NI_RESPONSE_NORESP;
+            LOC_LOGD("ni_thread_proc-Thread time out after valting for specified time. Ret Val %d\n",rc );
+            break;
+        }
+    }
+    LOC_LOGD("ni_thread_proc-Java layer has sent us a user response and return value from "
+             "pthread_cond_timedwait = %d\n",rc );
+    pSession->respRecvd = FALSE; /* Reset the user response flag for the next session*/
+
+    LOC_LOGD("pSession->resp is %d\n",pSession->resp);
+
+    // adding this check to support modem restart, in which case, we need the thread
+    // to exit without calling sending data. We made sure that rawRequest is NULL in
+    // loc_eng_ni_reset_on_engine_restart()
+    LocEngAdapter* adapter = pSession->adapter;
+    LocEngInformNiResponse *msg = NULL;
+
+    if (NULL != pSession->rawRequest) {
+        if (pSession->resp != GPS_NI_RESPONSE_IGNORE) {
+            LOC_LOGD("pSession->resp != GPS_NI_RESPONSE_IGNORE \n");
+            msg = new LocEngInformNiResponse(adapter,
+                                             pSession->resp,
+                                             pSession->rawRequest);
+        } else {
+            LOC_LOGD("this is the ignore reply for SUPL ES\n");
+            free(pSession->rawRequest);
+        }
+        pSession->rawRequest = NULL;
+    }
+    pthread_mutex_unlock(&pSession->tLock);
+
+    pSession->respTimeLeft = 0;
+    pSession->reqID = 0;
+
+    if (NULL != msg) {
+        LOC_LOGD("ni_thread_proc: adapter->sendMsg(msg)\n");
+        adapter->sendMsg(msg);
+    }
+
+    EXIT_LOG(%s, VOID_RET);
+    return NULL;
+}
+
+void loc_eng_ni_reset_on_engine_restart(loc_eng_data_s_type &loc_eng_data)
+{
+    ENTRY_LOG();
+    loc_eng_ni_data_s_type* loc_eng_ni_data_p = &loc_eng_data.loc_eng_ni_data;
+
+    if (NULL == loc_eng_data.ni_notify_cb) {
+        EXIT_LOG(%s, "loc_eng_ni_init hasn't happened yet.");
+        return;
+    }
+
+    // only if modem has requested but then died.
+    if (NULL != loc_eng_ni_data_p->sessionEs.rawRequest) {
+        free(loc_eng_ni_data_p->sessionEs.rawRequest);
+        loc_eng_ni_data_p->sessionEs.rawRequest = NULL;
+
+        pthread_mutex_lock(&loc_eng_ni_data_p->sessionEs.tLock);
+        // the goal is to wake up ni_thread_proc
+        // and let it exit.
+        loc_eng_ni_data_p->sessionEs.respRecvd = TRUE;
+        pthread_cond_signal(&loc_eng_ni_data_p->sessionEs.tCond);
+        pthread_mutex_unlock(&loc_eng_ni_data_p->sessionEs.tLock);
+    }
+
+    if (NULL != loc_eng_ni_data_p->session.rawRequest) {
+        free(loc_eng_ni_data_p->session.rawRequest);
+        loc_eng_ni_data_p->session.rawRequest = NULL;
+
+        pthread_mutex_lock(&loc_eng_ni_data_p->session.tLock);
+        // the goal is to wake up ni_thread_proc
+        // and let it exit.
+        loc_eng_ni_data_p->session.respRecvd = TRUE;
+        pthread_cond_signal(&loc_eng_ni_data_p->session.tCond);
+        pthread_mutex_unlock(&loc_eng_ni_data_p->session.tLock);
+    }
+
+    EXIT_LOG(%s, VOID_RET);
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_ni_init
+
+DESCRIPTION
+   This function initializes the NI interface
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_ni_init(loc_eng_data_s_type &loc_eng_data, GpsNiExtCallbacks *callbacks)
+{
+    ENTRY_LOG_CALLFLOW();
+
+    if(callbacks == NULL)
+        EXIT_LOG(%s, "loc_eng_ni_init: failed, cb is NULL");
+    else if (NULL == callbacks->notify_cb) {
+        EXIT_LOG(%s, "loc_eng_ni_init: failed, no cb.");
+    } else if (NULL != loc_eng_data.ni_notify_cb) {
+        EXIT_LOG(%s, "loc_eng_ni_init: already inited.");
+    } else {
+        loc_eng_ni_data_s_type* loc_eng_ni_data_p = &loc_eng_data.loc_eng_ni_data;
+        loc_eng_ni_data_p->sessionEs.respTimeLeft = 0;
+        loc_eng_ni_data_p->sessionEs.respRecvd = FALSE;
+        loc_eng_ni_data_p->sessionEs.rawRequest = NULL;
+        loc_eng_ni_data_p->sessionEs.reqID = 0;
+        pthread_cond_init(&loc_eng_ni_data_p->sessionEs.tCond, NULL);
+        pthread_mutex_init(&loc_eng_ni_data_p->sessionEs.tLock, NULL);
+
+        loc_eng_ni_data_p->session.respTimeLeft = 0;
+        loc_eng_ni_data_p->session.respRecvd = FALSE;
+        loc_eng_ni_data_p->session.rawRequest = NULL;
+        loc_eng_ni_data_p->session.reqID = 0;
+        pthread_cond_init(&loc_eng_ni_data_p->session.tCond, NULL);
+        pthread_mutex_init(&loc_eng_ni_data_p->session.tLock, NULL);
+
+        loc_eng_data.ni_notify_cb = callbacks->notify_cb;
+        EXIT_LOG(%s, VOID_RET);
+    }
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_ni_respond
+
+DESCRIPTION
+   This function receives user response from upper layer framework
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_ni_respond(loc_eng_data_s_type &loc_eng_data,
+                        int notif_id, GpsUserResponseType user_response)
+{
+    ENTRY_LOG_CALLFLOW();
+    loc_eng_ni_data_s_type* loc_eng_ni_data_p = &loc_eng_data.loc_eng_ni_data;
+    loc_eng_ni_session_s_type* pSession = NULL;
+
+    if (NULL == loc_eng_data.ni_notify_cb) {
+        EXIT_LOG(%s, "loc_eng_ni_init hasn't happened yet.");
+        return;
+    }
+
+    if (notif_id == loc_eng_ni_data_p->sessionEs.reqID &&
+        NULL != loc_eng_ni_data_p->sessionEs.rawRequest) {
+        pSession = &loc_eng_ni_data_p->sessionEs;
+        // ignore any SUPL NI non-Es session if a SUPL NI ES is accepted
+        if (user_response == GPS_NI_RESPONSE_ACCEPT &&
+            NULL != loc_eng_ni_data_p->session.rawRequest) {
+                pthread_mutex_lock(&loc_eng_ni_data_p->session.tLock);
+                loc_eng_ni_data_p->session.resp = GPS_NI_RESPONSE_IGNORE;
+                loc_eng_ni_data_p->session.respRecvd = TRUE;
+                pthread_cond_signal(&loc_eng_ni_data_p->session.tCond);
+                pthread_mutex_unlock(&loc_eng_ni_data_p->session.tLock);
+        }
+    } else if (notif_id == loc_eng_ni_data_p->session.reqID &&
+        NULL != loc_eng_ni_data_p->session.rawRequest) {
+        pSession = &loc_eng_ni_data_p->session;
+    }
+
+    if (pSession) {
+        LOC_LOGI("loc_eng_ni_respond: send user response %d for notif %d", user_response, notif_id);
+        pthread_mutex_lock(&pSession->tLock);
+        pSession->resp = user_response;
+        pSession->respRecvd = TRUE;
+        pthread_cond_signal(&pSession->tCond);
+        pthread_mutex_unlock(&pSession->tLock);
+    }
+    else {
+        LOC_LOGE("loc_eng_ni_respond: notif_id %d not an active session", notif_id);
+    }
+
+    EXIT_LOG(%s, VOID_RET);
+}
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_ni.h b/gps/loc_api/libloc_api_50001/loc_eng_ni.h
new file mode 100644
index 0000000..068f5cd
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_ni.h
@@ -0,0 +1,59 @@
+/* Copyright (c) 2009,2011,2014 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 LOC_ENG_NI_H
+#define LOC_ENG_NI_H
+
+#include <stdbool.h>
+#include <LocEngAdapter.h>
+
+#define LOC_NI_NO_RESPONSE_TIME            20                      /* secs */
+#define LOC_NI_NOTIF_KEY_ADDRESS           "Address"
+#define GPS_NI_RESPONSE_IGNORE             4
+
+typedef struct {
+    pthread_t               thread;            /* NI thread */
+    int                     respTimeLeft;       /* examine time for NI response */
+    bool                    respRecvd;   /* NI User reponse received or not from Java layer*/
+    void*                   rawRequest;
+    int                     reqID;         /* ID to check against response */
+    GpsUserResponseType     resp;
+    pthread_cond_t          tCond;
+    pthread_mutex_t         tLock;
+    LocEngAdapter*          adapter;
+} loc_eng_ni_session_s_type;
+
+typedef struct {
+    loc_eng_ni_session_s_type session;    /* SUPL NI Session */
+    loc_eng_ni_session_s_type sessionEs;  /* Emergency SUPL NI Session */
+    int reqIDCounter;
+} loc_eng_ni_data_s_type;
+
+
+#endif /* LOC_ENG_NI_H */
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_nmea.cpp b/gps/loc_api/libloc_api_50001/loc_eng_nmea.cpp
new file mode 100644
index 0000000..4c6b9a3
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_nmea.cpp
@@ -0,0 +1,836 @@
+/* Copyright (c) 2012, 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.
+ *
+ */
+
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_eng_nmea"
+#define GPS_PRN_START 1
+#define GPS_PRN_END   32
+#define GLONASS_PRN_START 65
+#define GLONASS_PRN_END   96
+#include <loc_eng.h>
+#include <loc_eng_nmea.h>
+#include <math.h>
+#include "log_util.h"
+
+/*===========================================================================
+FUNCTION    loc_eng_nmea_send
+
+DESCRIPTION
+   send out NMEA sentence
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   Total length of the nmea sentence
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_nmea_send(char *pNmea, int length, loc_eng_data_s_type *loc_eng_data_p)
+{
+    struct timeval tv;
+    gettimeofday(&tv, (struct timezone *) NULL);
+    int64_t now = tv.tv_sec * 1000LL + tv.tv_usec / 1000;
+    CALLBACK_LOG_CALLFLOW("nmea_cb", %p, pNmea);
+    if (loc_eng_data_p->nmea_cb != NULL)
+        loc_eng_data_p->nmea_cb(now, pNmea, length);
+    LOC_LOGD("NMEA <%s", pNmea);
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_nmea_put_checksum
+
+DESCRIPTION
+   Generate NMEA sentences generated based on position report
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   Total length of the nmea sentence
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_nmea_put_checksum(char *pNmea, int maxSize)
+{
+    uint8_t checksum = 0;
+    int length = 0;
+
+    pNmea++; //skip the $
+    while (*pNmea != '\0')
+    {
+        checksum ^= *pNmea++;
+        length++;
+    }
+
+    int checksumLength = snprintf(pNmea,(maxSize-length-1),"*%02X\r\n", checksum);
+    return (length + checksumLength);
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_nmea_generate_pos
+
+DESCRIPTION
+   Generate NMEA sentences generated based on position report
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p,
+                               const UlpLocation &location,
+                               const GpsLocationExtended &locationExtended,
+                               unsigned char generate_nmea)
+{
+    ENTRY_LOG();
+    time_t utcTime(location.gpsLocation.timestamp/1000);
+    tm * pTm = gmtime(&utcTime);
+    if (NULL == pTm) {
+        LOC_LOGE("gmtime failed");
+        return;
+    }
+
+    char sentence[NMEA_SENTENCE_MAX_LENGTH] = {0};
+    char* pMarker = sentence;
+    int lengthRemaining = sizeof(sentence);
+    int length = 0;
+    int utcYear = pTm->tm_year % 100; // 2 digit year
+    int utcMonth = pTm->tm_mon + 1; // tm_mon starts at zero
+    int utcDay = pTm->tm_mday;
+    int utcHours = pTm->tm_hour;
+    int utcMinutes = pTm->tm_min;
+    int utcSeconds = pTm->tm_sec;
+
+    if (generate_nmea) {
+        // ------------------
+        // ------$GPGSA------
+        // ------------------
+
+        uint32_t svUsedCount = 0;
+        uint32_t svUsedList[32] = {0};
+        uint32_t mask = loc_eng_data_p->sv_used_mask;
+        for (uint8_t i = 1; mask > 0 && svUsedCount < 32; i++)
+        {
+            if (mask & 1)
+                svUsedList[svUsedCount++] = i;
+            mask = mask >> 1;
+        }
+        // clear the cache so they can't be used again
+        loc_eng_data_p->sv_used_mask = 0;
+
+        char fixType;
+        if (svUsedCount == 0)
+            fixType = '1'; // no fix
+        else if (svUsedCount <= 3)
+            fixType = '2'; // 2D fix
+        else
+            fixType = '3'; // 3D fix
+
+        length = snprintf(pMarker, lengthRemaining, "$GPGSA,A,%c,", fixType);
+
+        if (length < 0 || length >= lengthRemaining)
+        {
+            LOC_LOGE("NMEA Error in string formatting");
+            return;
+        }
+        pMarker += length;
+        lengthRemaining -= length;
+
+        for (uint8_t i = 0; i < 12; i++) // only the first 12 sv go in sentence
+        {
+            if (i < svUsedCount)
+                length = snprintf(pMarker, lengthRemaining, "%02d,", svUsedList[i]);
+            else
+                length = snprintf(pMarker, lengthRemaining, ",");
+
+            if (length < 0 || length >= lengthRemaining)
+            {
+                LOC_LOGE("NMEA Error in string formatting");
+                return;
+            }
+            pMarker += length;
+            lengthRemaining -= length;
+        }
+
+        if (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_DOP)
+        {   // dop is in locationExtended, (QMI)
+            length = snprintf(pMarker, lengthRemaining, "%.1f,%.1f,%.1f",
+                              locationExtended.pdop,
+                              locationExtended.hdop,
+                              locationExtended.vdop);
+        }
+        else if (loc_eng_data_p->pdop > 0 && loc_eng_data_p->hdop > 0 && loc_eng_data_p->vdop > 0)
+        {   // dop was cached from sv report (RPC)
+            length = snprintf(pMarker, lengthRemaining, "%.1f,%.1f,%.1f",
+                              loc_eng_data_p->pdop,
+                              loc_eng_data_p->hdop,
+                              loc_eng_data_p->vdop);
+        }
+        else
+        {   // no dop
+            length = snprintf(pMarker, lengthRemaining, ",,");
+        }
+
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+
+        // ------------------
+        // ------$GPVTG------
+        // ------------------
+
+        pMarker = sentence;
+        lengthRemaining = sizeof(sentence);
+
+        if (location.gpsLocation.flags & GPS_LOCATION_HAS_BEARING)
+        {
+            float magTrack = location.gpsLocation.bearing;
+            if (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_MAG_DEV)
+            {
+                float magTrack = location.gpsLocation.bearing - locationExtended.magneticDeviation;
+                if (magTrack < 0.0)
+                    magTrack += 360.0;
+                else if (magTrack > 360.0)
+                    magTrack -= 360.0;
+            }
+
+            length = snprintf(pMarker, lengthRemaining, "$GPVTG,%.1lf,T,%.1lf,M,", location.gpsLocation.bearing, magTrack);
+        }
+        else
+        {
+            length = snprintf(pMarker, lengthRemaining, "$GPVTG,,T,,M,");
+        }
+
+        if (length < 0 || length >= lengthRemaining)
+        {
+            LOC_LOGE("NMEA Error in string formatting");
+            return;
+        }
+        pMarker += length;
+        lengthRemaining -= length;
+
+        if (location.gpsLocation.flags & GPS_LOCATION_HAS_SPEED)
+        {
+            float speedKnots = location.gpsLocation.speed * (3600.0/1852.0);
+            float speedKmPerHour = location.gpsLocation.speed * 3.6;
+
+            length = snprintf(pMarker, lengthRemaining, "%.1lf,N,%.1lf,K,", speedKnots, speedKmPerHour);
+        }
+        else
+        {
+            length = snprintf(pMarker, lengthRemaining, ",N,,K,");
+        }
+
+        if (length < 0 || length >= lengthRemaining)
+        {
+            LOC_LOGE("NMEA Error in string formatting");
+            return;
+        }
+        pMarker += length;
+        lengthRemaining -= length;
+
+        if (!(location.gpsLocation.flags & GPS_LOCATION_HAS_LAT_LONG))
+            length = snprintf(pMarker, lengthRemaining, "%c", 'N'); // N means no fix
+        else if (LOC_POSITION_MODE_STANDALONE == loc_eng_data_p->adapter->getPositionMode().mode)
+            length = snprintf(pMarker, lengthRemaining, "%c", 'A'); // A means autonomous
+        else
+            length = snprintf(pMarker, lengthRemaining, "%c", 'D'); // D means differential
+
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+
+        // ------------------
+        // ------$GPRMC------
+        // ------------------
+
+        pMarker = sentence;
+        lengthRemaining = sizeof(sentence);
+
+        length = snprintf(pMarker, lengthRemaining, "$GPRMC,%02d%02d%02d,A," ,
+                          utcHours, utcMinutes, utcSeconds);
+
+        if (length < 0 || length >= lengthRemaining)
+        {
+            LOC_LOGE("NMEA Error in string formatting");
+            return;
+        }
+        pMarker += length;
+        lengthRemaining -= length;
+
+        if (location.gpsLocation.flags & GPS_LOCATION_HAS_LAT_LONG)
+        {
+            double latitude = location.gpsLocation.latitude;
+            double longitude = location.gpsLocation.longitude;
+            char latHemisphere;
+            char lonHemisphere;
+            double latMinutes;
+            double lonMinutes;
+
+            if (latitude > 0)
+            {
+                latHemisphere = 'N';
+            }
+            else
+            {
+                latHemisphere = 'S';
+                latitude *= -1.0;
+            }
+
+            if (longitude < 0)
+            {
+                lonHemisphere = 'W';
+                longitude *= -1.0;
+            }
+            else
+            {
+                lonHemisphere = 'E';
+            }
+
+            latMinutes = fmod(latitude * 60.0 , 60.0);
+            lonMinutes = fmod(longitude * 60.0 , 60.0);
+
+            length = snprintf(pMarker, lengthRemaining, "%02d%09.6lf,%c,%03d%09.6lf,%c,",
+                              (uint8_t)floor(latitude), latMinutes, latHemisphere,
+                              (uint8_t)floor(longitude),lonMinutes, lonHemisphere);
+        }
+        else
+        {
+            length = snprintf(pMarker, lengthRemaining,",,,,");
+        }
+
+        if (length < 0 || length >= lengthRemaining)
+        {
+            LOC_LOGE("NMEA Error in string formatting");
+            return;
+        }
+        pMarker += length;
+        lengthRemaining -= length;
+
+        if (location.gpsLocation.flags & GPS_LOCATION_HAS_SPEED)
+        {
+            float speedKnots = location.gpsLocation.speed * (3600.0/1852.0);
+            length = snprintf(pMarker, lengthRemaining, "%.1lf,", speedKnots);
+        }
+        else
+        {
+            length = snprintf(pMarker, lengthRemaining, ",");
+        }
+
+        if (length < 0 || length >= lengthRemaining)
+        {
+            LOC_LOGE("NMEA Error in string formatting");
+            return;
+        }
+        pMarker += length;
+        lengthRemaining -= length;
+
+        if (location.gpsLocation.flags & GPS_LOCATION_HAS_BEARING)
+        {
+            length = snprintf(pMarker, lengthRemaining, "%.1lf,", location.gpsLocation.bearing);
+        }
+        else
+        {
+            length = snprintf(pMarker, lengthRemaining, ",");
+        }
+
+        if (length < 0 || length >= lengthRemaining)
+        {
+            LOC_LOGE("NMEA Error in string formatting");
+            return;
+        }
+        pMarker += length;
+        lengthRemaining -= length;
+
+        length = snprintf(pMarker, lengthRemaining, "%2.2d%2.2d%2.2d,",
+                          utcDay, utcMonth, utcYear);
+
+        if (length < 0 || length >= lengthRemaining)
+        {
+            LOC_LOGE("NMEA Error in string formatting");
+            return;
+        }
+        pMarker += length;
+        lengthRemaining -= length;
+
+        if (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_MAG_DEV)
+        {
+            float magneticVariation = locationExtended.magneticDeviation;
+            char direction;
+            if (magneticVariation < 0.0)
+            {
+                direction = 'W';
+                magneticVariation *= -1.0;
+            }
+            else
+            {
+                direction = 'E';
+            }
+
+            length = snprintf(pMarker, lengthRemaining, "%.1lf,%c,",
+                              magneticVariation, direction);
+        }
+        else
+        {
+            length = snprintf(pMarker, lengthRemaining, ",,");
+        }
+
+        if (length < 0 || length >= lengthRemaining)
+        {
+            LOC_LOGE("NMEA Error in string formatting");
+            return;
+        }
+        pMarker += length;
+        lengthRemaining -= length;
+
+        if (!(location.gpsLocation.flags & GPS_LOCATION_HAS_LAT_LONG))
+            length = snprintf(pMarker, lengthRemaining, "%c", 'N'); // N means no fix
+        else if (LOC_POSITION_MODE_STANDALONE == loc_eng_data_p->adapter->getPositionMode().mode)
+            length = snprintf(pMarker, lengthRemaining, "%c", 'A'); // A means autonomous
+        else
+            length = snprintf(pMarker, lengthRemaining, "%c", 'D'); // D means differential
+
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+
+        // ------------------
+        // ------$GPGGA------
+        // ------------------
+
+        pMarker = sentence;
+        lengthRemaining = sizeof(sentence);
+
+        length = snprintf(pMarker, lengthRemaining, "$GPGGA,%02d%02d%02d," ,
+                          utcHours, utcMinutes, utcSeconds);
+
+        if (length < 0 || length >= lengthRemaining)
+        {
+            LOC_LOGE("NMEA Error in string formatting");
+            return;
+        }
+        pMarker += length;
+        lengthRemaining -= length;
+
+        if (location.gpsLocation.flags & GPS_LOCATION_HAS_LAT_LONG)
+        {
+            double latitude = location.gpsLocation.latitude;
+            double longitude = location.gpsLocation.longitude;
+            char latHemisphere;
+            char lonHemisphere;
+            double latMinutes;
+            double lonMinutes;
+
+            if (latitude > 0)
+            {
+                latHemisphere = 'N';
+            }
+            else
+            {
+                latHemisphere = 'S';
+                latitude *= -1.0;
+            }
+
+            if (longitude < 0)
+            {
+                lonHemisphere = 'W';
+                longitude *= -1.0;
+            }
+            else
+            {
+                lonHemisphere = 'E';
+            }
+
+            latMinutes = fmod(latitude * 60.0 , 60.0);
+            lonMinutes = fmod(longitude * 60.0 , 60.0);
+
+            length = snprintf(pMarker, lengthRemaining, "%02d%09.6lf,%c,%03d%09.6lf,%c,",
+                              (uint8_t)floor(latitude), latMinutes, latHemisphere,
+                              (uint8_t)floor(longitude),lonMinutes, lonHemisphere);
+        }
+        else
+        {
+            length = snprintf(pMarker, lengthRemaining,",,,,");
+        }
+
+        if (length < 0 || length >= lengthRemaining)
+        {
+            LOC_LOGE("NMEA Error in string formatting");
+            return;
+        }
+        pMarker += length;
+        lengthRemaining -= length;
+
+        char gpsQuality;
+        if (!(location.gpsLocation.flags & GPS_LOCATION_HAS_LAT_LONG))
+            gpsQuality = '0'; // 0 means no fix
+        else if (LOC_POSITION_MODE_STANDALONE == loc_eng_data_p->adapter->getPositionMode().mode)
+            gpsQuality = '1'; // 1 means GPS fix
+        else
+            gpsQuality = '2'; // 2 means DGPS fix
+
+        if (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_DOP)
+        {   // dop is in locationExtended, (QMI)
+            length = snprintf(pMarker, lengthRemaining, "%c,%02d,%.1f,",
+                              gpsQuality, svUsedCount, locationExtended.hdop);
+        }
+        else if (loc_eng_data_p->pdop > 0 && loc_eng_data_p->hdop > 0 && loc_eng_data_p->vdop > 0)
+        {   // dop was cached from sv report (RPC)
+            length = snprintf(pMarker, lengthRemaining, "%c,%02d,%.1f,",
+                              gpsQuality, svUsedCount, loc_eng_data_p->hdop);
+        }
+        else
+        {   // no hdop
+            length = snprintf(pMarker, lengthRemaining, "%c,%02d,,",
+                              gpsQuality, svUsedCount);
+        }
+
+        if (length < 0 || length >= lengthRemaining)
+        {
+            LOC_LOGE("NMEA Error in string formatting");
+            return;
+        }
+        pMarker += length;
+        lengthRemaining -= length;
+
+        if (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_ALTITUDE_MEAN_SEA_LEVEL)
+        {
+            length = snprintf(pMarker, lengthRemaining, "%.1lf,M,",
+                              locationExtended.altitudeMeanSeaLevel);
+        }
+        else
+        {
+            length = snprintf(pMarker, lengthRemaining,",,");
+        }
+
+        if (length < 0 || length >= lengthRemaining)
+        {
+            LOC_LOGE("NMEA Error in string formatting");
+            return;
+        }
+        pMarker += length;
+        lengthRemaining -= length;
+
+        if ((location.gpsLocation.flags & GPS_LOCATION_HAS_ALTITUDE) &&
+            (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_ALTITUDE_MEAN_SEA_LEVEL))
+        {
+            length = snprintf(pMarker, lengthRemaining, "%.1lf,M,,",
+                              location.gpsLocation.altitude - locationExtended.altitudeMeanSeaLevel);
+        }
+        else
+        {
+            length = snprintf(pMarker, lengthRemaining,",,,");
+        }
+
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+
+    }
+    //Send blank NMEA reports for non-final fixes
+    else {
+        strlcpy(sentence, "$GPGSA,A,1,,,,,,,,,,,,,,,", sizeof(sentence));
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+
+        strlcpy(sentence, "$GPVTG,,T,,M,,N,,K,N", sizeof(sentence));
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+
+        strlcpy(sentence, "$GPRMC,,V,,,,,,,,,,N", sizeof(sentence));
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+
+        strlcpy(sentence, "$GPGGA,,,,,,0,,,,,,,,", sizeof(sentence));
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+    }
+    // clear the dop cache so they can't be used again
+    loc_eng_data_p->pdop = 0;
+    loc_eng_data_p->hdop = 0;
+    loc_eng_data_p->vdop = 0;
+
+    EXIT_LOG(%d, 0);
+}
+
+
+
+/*===========================================================================
+FUNCTION    loc_eng_nmea_generate_sv
+
+DESCRIPTION
+   Generate NMEA sentences generated based on sv report
+
+DEPENDENCIES
+   NONE
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p,
+                              const GpsSvStatus &svStatus, const GpsLocationExtended &locationExtended)
+{
+    ENTRY_LOG();
+
+    char sentence[NMEA_SENTENCE_MAX_LENGTH] = {0};
+    char* pMarker = sentence;
+    int lengthRemaining = sizeof(sentence);
+    int length = 0;
+    int svCount = svStatus.num_svs;
+    int sentenceCount = 0;
+    int sentenceNumber = 1;
+    int svNumber = 1;
+    int gpsCount = 0;
+    int glnCount = 0;
+
+    //Count GPS SVs for saparating GPS from GLONASS and throw others
+
+    for(svNumber=1; svNumber <= svCount; svNumber++) {
+        if( (svStatus.sv_list[svNumber-1].prn >= GPS_PRN_START)&&
+            (svStatus.sv_list[svNumber-1].prn <= GPS_PRN_END) )
+        {
+            gpsCount++;
+        }
+        else if( (svStatus.sv_list[svNumber-1].prn >= GLONASS_PRN_START) &&
+                 (svStatus.sv_list[svNumber-1].prn <= GLONASS_PRN_END) )
+        {
+            glnCount++;
+        }
+    }
+
+    // ------------------
+    // ------$GPGSV------
+    // ------------------
+
+    if (gpsCount <= 0)
+    {
+        // no svs in view, so just send a blank $GPGSV sentence
+        strlcpy(sentence, "$GPGSV,1,1,0,", sizeof(sentence));
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+    }
+    else
+    {
+        svNumber = 1;
+        sentenceNumber = 1;
+        sentenceCount = gpsCount/4 + (gpsCount % 4 != 0);
+
+        while (sentenceNumber <= sentenceCount)
+        {
+            pMarker = sentence;
+            lengthRemaining = sizeof(sentence);
+
+            length = snprintf(pMarker, lengthRemaining, "$GPGSV,%d,%d,%02d",
+                          sentenceCount, sentenceNumber, gpsCount);
+
+            if (length < 0 || length >= lengthRemaining)
+            {
+                LOC_LOGE("NMEA Error in string formatting");
+                return;
+            }
+            pMarker += length;
+            lengthRemaining -= length;
+
+            for (int i=0; (svNumber <= svCount) && (i < 4);  svNumber++)
+            {
+                if( (svStatus.sv_list[svNumber-1].prn >= GPS_PRN_START) &&
+                    (svStatus.sv_list[svNumber-1].prn <= GPS_PRN_END) )
+                {
+                    length = snprintf(pMarker, lengthRemaining,",%02d,%02d,%03d,",
+                                  svStatus.sv_list[svNumber-1].prn,
+                                  (int)(0.5 + svStatus.sv_list[svNumber-1].elevation), //float to int
+                                  (int)(0.5 + svStatus.sv_list[svNumber-1].azimuth)); //float to int
+
+                    if (length < 0 || length >= lengthRemaining)
+                    {
+                        LOC_LOGE("NMEA Error in string formatting");
+                        return;
+                    }
+                    pMarker += length;
+                    lengthRemaining -= length;
+
+                    if (svStatus.sv_list[svNumber-1].snr > 0)
+                    {
+                        length = snprintf(pMarker, lengthRemaining,"%02d",
+                                         (int)(0.5 + svStatus.sv_list[svNumber-1].snr)); //float to int
+
+                        if (length < 0 || length >= lengthRemaining)
+                        {
+                            LOC_LOGE("NMEA Error in string formatting");
+                            return;
+                        }
+                        pMarker += length;
+                        lengthRemaining -= length;
+                    }
+
+                    i++;
+               }
+
+            }
+
+            length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+            loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+            sentenceNumber++;
+
+        }  //while
+
+    } //if
+
+    // ------------------
+    // ------$GLGSV------
+    // ------------------
+
+    if (glnCount <= 0)
+    {
+        // no svs in view, so just send a blank $GLGSV sentence
+        strlcpy(sentence, "$GLGSV,1,1,0,", sizeof(sentence));
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+    }
+    else
+    {
+        svNumber = 1;
+        sentenceNumber = 1;
+        sentenceCount = glnCount/4 + (glnCount % 4 != 0);
+
+        while (sentenceNumber <= sentenceCount)
+        {
+            pMarker = sentence;
+            lengthRemaining = sizeof(sentence);
+
+            length = snprintf(pMarker, lengthRemaining, "$GLGSV,%d,%d,%02d",
+                          sentenceCount, sentenceNumber, glnCount);
+
+            if (length < 0 || length >= lengthRemaining)
+            {
+                LOC_LOGE("NMEA Error in string formatting");
+                return;
+            }
+            pMarker += length;
+            lengthRemaining -= length;
+
+            for (int i=0; (svNumber <= svCount) && (i < 4);  svNumber++)
+            {
+                if( (svStatus.sv_list[svNumber-1].prn >= GLONASS_PRN_START) &&
+                    (svStatus.sv_list[svNumber-1].prn <= GLONASS_PRN_END) )      {
+
+                    length = snprintf(pMarker, lengthRemaining,",%02d,%02d,%03d,",
+                                  svStatus.sv_list[svNumber-1].prn,
+                                  (int)(0.5 + svStatus.sv_list[svNumber-1].elevation), //float to int
+                                  (int)(0.5 + svStatus.sv_list[svNumber-1].azimuth)); //float to int
+
+                    if (length < 0 || length >= lengthRemaining)
+                    {
+                        LOC_LOGE("NMEA Error in string formatting");
+                        return;
+                    }
+                    pMarker += length;
+                    lengthRemaining -= length;
+
+                    if (svStatus.sv_list[svNumber-1].snr > 0)
+                    {
+                        length = snprintf(pMarker, lengthRemaining,"%02d",
+                                         (int)(0.5 + svStatus.sv_list[svNumber-1].snr)); //float to int
+
+                        if (length < 0 || length >= lengthRemaining)
+                        {
+                            LOC_LOGE("NMEA Error in string formatting");
+                            return;
+                        }
+                        pMarker += length;
+                        lengthRemaining -= length;
+                    }
+
+                    i++;
+               }
+
+            }
+
+            length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+            loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+            sentenceNumber++;
+
+        }  //while
+
+    }//if
+
+    if (svStatus.used_in_fix_mask == 0)
+    {   // No sv used, so there will be no position report, so send
+        // blank NMEA sentences
+        strlcpy(sentence, "$GPGSA,A,1,,,,,,,,,,,,,,,", sizeof(sentence));
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+
+        strlcpy(sentence, "$GPVTG,,T,,M,,N,,K,N", sizeof(sentence));
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+
+        strlcpy(sentence, "$GPRMC,,V,,,,,,,,,,N", sizeof(sentence));
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+
+        strlcpy(sentence, "$GPGGA,,,,,,0,,,,,,,,", sizeof(sentence));
+        length = loc_eng_nmea_put_checksum(sentence, sizeof(sentence));
+        loc_eng_nmea_send(sentence, length, loc_eng_data_p);
+    }
+    else
+    {   // cache the used in fix mask, as it will be needed to send $GPGSA
+        // during the position report
+        loc_eng_data_p->sv_used_mask = svStatus.used_in_fix_mask;
+
+        // For RPC, the DOP are sent during sv report, so cache them
+        // now to be sent during position report.
+        // For QMI, the DOP will be in position report.
+        if (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_DOP)
+        {
+            loc_eng_data_p->pdop = locationExtended.pdop;
+            loc_eng_data_p->hdop = locationExtended.hdop;
+            loc_eng_data_p->vdop = locationExtended.vdop;
+        }
+        else
+        {
+            loc_eng_data_p->pdop = 0;
+            loc_eng_data_p->hdop = 0;
+            loc_eng_data_p->vdop = 0;
+        }
+
+    }
+
+    EXIT_LOG(%d, 0);
+}
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_nmea.h b/gps/loc_api/libloc_api_50001/loc_eng_nmea.h
new file mode 100644
index 0000000..40c6dbb
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_nmea.h
@@ -0,0 +1,42 @@
+/* Copyright (c) 2012, 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 LOC_ENG_NMEA_H
+#define LOC_ENG_NMEA_H
+
+#include <hardware/gps.h>
+
+#define NMEA_SENTENCE_MAX_LENGTH 200
+
+void loc_eng_nmea_send(char *pNmea, int length, loc_eng_data_s_type *loc_eng_data_p);
+int loc_eng_nmea_put_checksum(char *pNmea, int maxSize);
+void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, const GpsSvStatus &svStatus, const GpsLocationExtended &locationExtended);
+void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p, const UlpLocation &location, const GpsLocationExtended &locationExtended, unsigned char generate_nmea);
+
+#endif // LOC_ENG_NMEA_H
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_xtra.cpp b/gps/loc_api/libloc_api_50001/loc_eng_xtra.cpp
new file mode 100644
index 0000000..7bb8083
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_xtra.cpp
@@ -0,0 +1,213 @@
+/* Copyright (c) 2009-2013, 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.
+ *
+ */
+
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_eng"
+
+#include <loc_eng.h>
+#include <MsgTask.h>
+#include "log_util.h"
+#include "platform_lib_includes.h"
+
+using namespace loc_core;
+
+struct LocEngRequestXtraServer : public LocMsg {
+    LocEngAdapter* mAdapter;
+    inline LocEngRequestXtraServer(LocEngAdapter* adapter) :
+        LocMsg(), mAdapter(adapter)
+    {
+        locallog();
+    }
+    inline virtual void proc() const {
+        mAdapter->requestXtraServer();
+    }
+    inline void locallog() const {
+        LOC_LOGV("LocEngRequestXtraServer");
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+struct LocEngInjectXtraData : public LocMsg {
+    LocEngAdapter* mAdapter;
+    char* mData;
+    const int mLen;
+    inline LocEngInjectXtraData(LocEngAdapter* adapter,
+                                char* data, int len):
+        LocMsg(), mAdapter(adapter),
+        mData(new char[len]), mLen(len)
+    {
+        memcpy((void*)mData, (void*)data, len);
+        locallog();
+    }
+    inline ~LocEngInjectXtraData()
+    {
+        delete[] mData;
+    }
+    inline virtual void proc() const {
+        mAdapter->setXtraData(mData, mLen);
+    }
+    inline  void locallog() const {
+        LOC_LOGV("length: %d\n  data: %p", mLen, mData);
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+struct LocEngSetXtraVersionCheck : public LocMsg {
+    LocEngAdapter *mAdapter;
+    int mCheck;
+    inline LocEngSetXtraVersionCheck(LocEngAdapter* adapter,
+                                        int check):
+        mAdapter(adapter), mCheck(check) {}
+    inline virtual void proc() const {
+        locallog();
+        mAdapter->setXtraVersionCheck(mCheck);
+    }
+    inline void locallog() const {
+        LOC_LOGD("%s:%d]: mCheck: %d",
+                 __func__, __LINE__, mCheck);
+    }
+    inline virtual void log() const {
+        locallog();
+    }
+};
+
+/*===========================================================================
+FUNCTION    loc_eng_xtra_init
+
+DESCRIPTION
+   Initialize XTRA module.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   0: success
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_xtra_init (loc_eng_data_s_type &loc_eng_data,
+                       GpsXtraExtCallbacks* callbacks)
+{
+    int ret_val = -1;
+    loc_eng_xtra_data_s_type *xtra_module_data_ptr;
+    ENTRY_LOG();
+
+    if(callbacks == NULL) {
+        LOC_LOGE("loc_eng_xtra_init: failed, cb is NULL");
+    } else {
+        xtra_module_data_ptr = &loc_eng_data.xtra_module_data;
+        xtra_module_data_ptr->download_request_cb = callbacks->download_request_cb;
+        xtra_module_data_ptr->report_xtra_server_cb = callbacks->report_xtra_server_cb;
+
+        ret_val = 0;
+    }
+    EXIT_LOG(%d, ret_val);
+    return ret_val;
+}
+
+/*===========================================================================
+FUNCTION    loc_eng_xtra_inject_data
+
+DESCRIPTION
+   Injects XTRA file into the engine but buffers the data if engine is busy.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_xtra_inject_data(loc_eng_data_s_type &loc_eng_data,
+                             char* data, int length)
+{
+    ENTRY_LOG();
+    LocEngAdapter* adapter = loc_eng_data.adapter;
+    adapter->sendMsg(new LocEngInjectXtraData(adapter, data, length));
+    EXIT_LOG(%d, 0);
+    return 0;
+}
+/*===========================================================================
+FUNCTION    loc_eng_xtra_request_server
+
+DESCRIPTION
+   Request the Xtra server url from the modem
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   0
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int loc_eng_xtra_request_server(loc_eng_data_s_type &loc_eng_data)
+{
+    ENTRY_LOG();
+    LocEngAdapter* adapter = loc_eng_data.adapter;
+    adapter->sendMsg(new LocEngRequestXtraServer(adapter));
+    EXIT_LOG(%d, 0);
+    return 0;
+}
+/*===========================================================================
+FUNCTION    loc_eng_xtra_version_check
+
+DESCRIPTION
+   Injects the enable/disable value for checking XTRA version
+   that is specified in gps.conf
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   none
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_eng_xtra_version_check(loc_eng_data_s_type &loc_eng_data,
+                                int check)
+{
+    ENTRY_LOG();
+    LocEngAdapter *adapter = loc_eng_data.adapter;
+    adapter->sendMsg(new LocEngSetXtraVersionCheck(adapter, check));
+    EXIT_LOG(%d, 0);
+}
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_xtra.h b/gps/loc_api/libloc_api_50001/loc_eng_xtra.h
new file mode 100644
index 0000000..175f497
--- /dev/null
+++ b/gps/loc_api/libloc_api_50001/loc_eng_xtra.h
@@ -0,0 +1,47 @@
+/* Copyright (c) 2009,2011 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 LOC_ENG_XTRA_H
+#define LOC_ENG_XTRA_H
+
+#include <hardware/gps.h>
+
+// Module data
+typedef struct
+{
+   // loc_eng_ioctl_cb_data_s_type   ioctl_cb_data;
+   gps_xtra_download_request      download_request_cb;
+   report_xtra_server             report_xtra_server_cb;
+
+   // XTRA data buffer
+   char                          *xtra_data_for_injection;  // NULL if no pending data
+   int                            xtra_data_len;
+} loc_eng_xtra_data_s_type;
+
+#endif // LOC_ENG_XTRA_H
diff --git a/gps/loc_api/loc_api_v02/Android.mk b/gps/loc_api/loc_api_v02/Android.mk
new file mode 100644
index 0000000..c3cc2f3
--- /dev/null
+++ b/gps/loc_api/loc_api_v02/Android.mk
@@ -0,0 +1,61 @@
+ifneq ($(QCPATH),)
+ifneq ($(BUILD_TINY_ANDROID),true)
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libloc_api_v02
+
+LOCAL_MODULE_TAGS := optional
+
+ifeq ($(TARGET_DEVICE),apq8026_lw)
+LOCAL_CFLAGS += -DPDK_FEATURE_SET
+endif
+
+LOCAL_SHARED_LIBRARIES := \
+    libutils \
+    libcutils \
+    libqmi_cci \
+    libqmi_csi \
+    libqmi_common_so \
+    libloc_core \
+    libgps.utils \
+    libloc_ds_api
+
+LOCAL_SRC_FILES = \
+    LocApiV02.cpp \
+    loc_api_v02_log.c \
+    loc_api_v02_client.c \
+    loc_api_sync_req.c \
+    location_service_v02.c
+
+LOCAL_CFLAGS += \
+    -fno-short-enums \
+    -D_ANDROID_
+
+LOCAL_COPY_HEADERS_TO:= libloc_api_v02/
+
+LOCAL_COPY_HEADERS:= \
+    location_service_v02.h \
+    loc_api_v02_log.h \
+    loc_api_v02_client.h \
+    loc_api_sync_req.h \
+    LocApiV02.h \
+    loc_util_log.h
+
+
+## Includes
+LOCAL_C_INCLUDES := \
+    $(TARGET_OUT_HEADERS)/libloc_core \
+    $(TARGET_OUT_HEADERS)/qmi-framework/inc \
+    $(TARGET_OUT_HEADERS)/qmi/inc \
+    $(TARGET_OUT_HEADERS)/gps.utils \
+    $(TARGET_OUT_HEADERS)/libloc_ds_api
+
+LOCAL_PRELINK_MODULE := false
+
+include $(BUILD_SHARED_LIBRARY)
+
+endif # not BUILD_TINY_ANDROID
+endif # QCPATH
diff --git a/gps/loc_api/loc_api_v02/LocApiV02.cpp b/gps/loc_api/loc_api_v02/LocApiV02.cpp
new file mode 100644
index 0000000..91fa061
--- /dev/null
+++ b/gps/loc_api/loc_api_v02/LocApiV02.cpp
@@ -0,0 +1,3347 @@
+/* Copyright (c) 2011-2014, 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 Foundatoin, 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.
+ */
+
+#define LOG_NDEBUG 0
+#define LOG_TAG "LocSvc_ApiV02"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#include <hardware/gps.h>
+
+#ifndef USE_GLIB
+#include <utils/SystemClock.h>
+#endif /* USE_GLIB */
+#include <LocApiV02.h>
+#include <loc_api_v02_log.h>
+#include <loc_api_sync_req.h>
+#include <loc_util_log.h>
+#include <gps_extended.h>
+#include "platform_lib_includes.h"
+
+using namespace loc_core;
+
+/* Default session id ; TBD needs incrementing for each */
+#define LOC_API_V02_DEF_SESSION_ID (1)
+
+/* UMTS CP Address key*/
+#define LOC_NI_NOTIF_KEY_ADDRESS           "Address"
+
+/* GPS SV Id offset */
+#define GPS_SV_ID_OFFSET        (1)
+
+/* GLONASS SV Id offset */
+#define GLONASS_SV_ID_OFFSET    (65)
+
+/* SV ID range */
+#define SV_ID_RANGE             (32)
+
+#define BDS_SV_ID_OFFSET         (201)
+
+/* BeiDou SV ID RANGE*/
+#define BDS_SV_ID_RANGE          QMI_LOC_DELETE_MAX_BDS_SV_INFO_LENGTH_V02
+
+/* GPS week unknown*/
+#define C_GPS_WEEK_UNKNOWN      (65535)
+
+/* seconds per week*/
+#define WEEK_MSECS              (60*60*24*7*1000)
+
+/* static event callbacks that call the LocApiV02 callbacks*/
+
+/* global event callback, call the eventCb function in loc api adapter v02
+   instance */
+static void globalEventCb(locClientHandleType clientHandle,
+                          uint32_t eventId,
+                          const locClientEventIndUnionType eventPayload,
+                          void*  pClientCookie)
+{
+  MODEM_LOG_CALLFLOW(%s, loc_get_v02_event_name(eventId));
+  LocApiV02 *locApiV02Instance =
+      (LocApiV02 *)pClientCookie;
+
+  LOC_LOGV ("%s:%d] client = %p, event id = %d, client cookie ptr = %p\n",
+                  __func__,  __LINE__,  clientHandle, eventId, pClientCookie);
+
+  // return if null is passed
+  if( NULL == locApiV02Instance)
+  {
+    LOC_LOGE ("%s:%d] NULL object passed : client = %p, event id = %d\n",
+                  __func__,  __LINE__,  clientHandle, eventId);
+    return;
+  }
+  locApiV02Instance->eventCb(clientHandle, eventId, eventPayload);
+}
+
+/* global response callback, it calls the sync request process
+   indication function to unblock the request that is waiting on this
+   response indication*/
+static void globalRespCb(locClientHandleType clientHandle,
+                         uint32_t respId,
+                         const locClientRespIndUnionType respPayload,
+                         void*  pClientCookie)
+{
+  MODEM_LOG_CALLFLOW(%s, loc_get_v02_event_name(respId));
+  LocApiV02 *locApiV02Instance =
+        (LocApiV02 *)pClientCookie;
+
+
+  LOC_LOGV ("%s:%d] client = %p, resp id = %d, client cookie ptr = %p\n",
+                  __func__,  __LINE__,  clientHandle, respId, pClientCookie);
+
+  if( NULL == locApiV02Instance)
+  {
+    LOC_LOGE ("%s:%d] NULL object passed : client = %p, resp id = %d\n",
+                  __func__,  __LINE__,  clientHandle, respId);
+    return;
+  }
+    // process the sync call
+    // use pDeleteAssistDataInd as a dummy pointer
+  loc_sync_process_ind(clientHandle, respId,
+                       (void *)respPayload.pDeleteAssistDataInd);
+}
+
+/* global error callback, it will call the handle service down
+   function in the loc api adapter instance. */
+static void globalErrorCb (locClientHandleType clientHandle,
+                           locClientErrorEnumType errorId,
+                           void *pClientCookie)
+{
+  LocApiV02 *locApiV02Instance =
+          (LocApiV02 *)pClientCookie;
+
+  LOC_LOGV ("%s:%d] client = %p, error id = %d\n, client cookie ptr = %p\n",
+                  __func__,  __LINE__,  clientHandle, errorId, pClientCookie);
+  if( NULL == locApiV02Instance)
+  {
+    LOC_LOGE ("%s:%d] NULL object passed : client = %p, error id = %d\n",
+                  __func__,  __LINE__,  clientHandle, errorId);
+    return;
+  }
+  locApiV02Instance->errorCb(clientHandle, errorId);
+}
+
+/* global structure containing the callbacks */
+locClientCallbacksType globalCallbacks =
+{
+    sizeof(locClientCallbacksType),
+    globalEventCb,
+    globalRespCb,
+    globalErrorCb
+};
+
+/* Constructor for LocApiV02 */
+LocApiV02 :: LocApiV02(const MsgTask* msgTask,
+                       LOC_API_ADAPTER_EVENT_MASK_T exMask,
+                       ContextBase* context):
+    LocApiBase(msgTask, exMask, context),
+    clientHandle(LOC_CLIENT_INVALID_HANDLE_VALUE),
+    dsClientHandle(NULL), mGnssMeasurementSupported(sup_unknown),
+    mQmiMask(0), mInSession(false), mEngineOn(false)
+{
+  // initialize loc_sync_req interface
+  loc_sync_req_init();
+}
+
+/* Destructor for LocApiV02 */
+LocApiV02 :: ~LocApiV02()
+{
+    close();
+}
+
+LocApiBase* getLocApi(const MsgTask *msgTask,
+                      LOC_API_ADAPTER_EVENT_MASK_T exMask,
+                      ContextBase* context)
+{
+    LOC_LOGD("%s:%d]: Creating new LocApiV02", __func__, __LINE__);
+    return new LocApiV02(msgTask, exMask, context);
+}
+
+/* Initialize a loc api v02 client AND
+   check which loc message are supported by modem */
+enum loc_api_adapter_err
+LocApiV02 :: open(LOC_API_ADAPTER_EVENT_MASK_T mask)
+{
+  enum loc_api_adapter_err rtv = LOC_API_ADAPTER_ERR_SUCCESS;
+  LOC_API_ADAPTER_EVENT_MASK_T newMask = mMask | (mask & ~mExcludedMask);
+  locClientEventMaskType qmiMask = convertMask(newMask);
+  LOC_LOGD("%s:%d]: Enter mMask: %x; mask: %x; newMask: %x mQmiMask: %lld qmiMask: %lld",
+           __func__, __LINE__, mMask, mask, newMask, mQmiMask, qmiMask);
+  /* If the client is already open close it first */
+  if(LOC_CLIENT_INVALID_HANDLE_VALUE == clientHandle)
+  {
+    locClientStatusEnumType status = eLOC_CLIENT_SUCCESS;
+
+    LOC_LOGV ("%s:%d]: reference to this = %p passed in \n",
+              __func__, __LINE__, this);
+    /* initialize the loc api v02 interface, note that
+       the locClientOpen() function will block if the
+       service is unavailable for a fixed time out */
+
+    // it is important to cap the mask here, because not all LocApi's
+    // can enable the same bits, e.g. foreground and bckground.
+    status = locClientOpen(adjustMaskForNoSession(qmiMask), &globalCallbacks,
+                           &clientHandle, (void *)this);
+    mMask = newMask;
+    mQmiMask = qmiMask;
+    if (eLOC_CLIENT_SUCCESS != status ||
+        clientHandle == LOC_CLIENT_INVALID_HANDLE_VALUE )
+    {
+      mMask = 0;
+      mQmiMask = 0;
+      LOC_LOGE ("%s:%d]: locClientOpen failed, status = %s\n", __func__,
+                __LINE__, loc_get_v02_client_status_name(status));
+      rtv = LOC_API_ADAPTER_ERR_FAILURE;
+    } else {
+        uint64_t supportedMsgList = 0;
+        const uint32_t msgArray[LOC_API_ADAPTER_MESSAGE_MAX] =
+        {
+            // For - LOC_API_ADAPTER_MESSAGE_LOCATION_BATCHING
+            QMI_LOC_GET_BATCH_SIZE_REQ_V02,
+
+            // For - LOC_API_ADAPTER_MESSAGE_BATCHED_GENFENCE_BREACH
+            QMI_LOC_EVENT_GEOFENCE_BATCHED_BREACH_NOTIFICATION_IND_V02
+        };
+
+        // check the modem
+        status = locClientSupportMsgCheck(clientHandle,
+                                          msgArray,
+                                          LOC_API_ADAPTER_MESSAGE_MAX,
+                                          &supportedMsgList);
+        if (eLOC_CLIENT_SUCCESS != status) {
+            LOC_LOGE("%s:%d]: Failed to checking QMI_LOC message supported. \n",
+                     __func__, __LINE__);
+        } else {
+            LOC_LOGV("%s:%d]: supportedMsgList is %lld. \n",
+                     __func__, __LINE__, supportedMsgList);
+        }
+
+        // save the supported message list
+        saveSupportedMsgList(supportedMsgList);
+    }
+  } else if (newMask != mMask) {
+    // it is important to cap the mask here, because not all LocApi's
+    // can enable the same bits, e.g. foreground and bckground.
+    if (!registerEventMask(qmiMask)) {
+      // we do not update mMask here, because it did not change
+      // as the mask update has failed.
+      rtv = LOC_API_ADAPTER_ERR_FAILURE;
+    }
+    else {
+        mMask = newMask;
+        mQmiMask = qmiMask;
+    }
+  }
+  LOC_LOGD("%s:%d]: Exit mMask: %x; mask: %x mQmiMask: %llx qmiMask: %llx",
+           __func__, __LINE__, mMask, mask, mQmiMask, qmiMask);
+
+  if (LOC_API_ADAPTER_ERR_SUCCESS == rtv) {
+      cacheGnssMeasurementSupport();
+  }
+
+  return rtv;
+}
+
+bool LocApiV02 :: registerEventMask(locClientEventMaskType qmiMask)
+{
+    if (!mInSession) {
+        qmiMask = adjustMaskForNoSession(qmiMask);
+    }
+    LOC_LOGD("%s:%d]: mQmiMask=%lld qmiMask=%lld",
+             __func__, __LINE__, mQmiMask, qmiMask);
+    return locClientRegisterEventMask(clientHandle, qmiMask);
+}
+
+locClientEventMaskType LocApiV02 :: adjustMaskForNoSession(locClientEventMaskType qmiMask)
+{
+    LOC_LOGD("%s:%d]: before qmiMask=%lld",
+             __func__, __LINE__, qmiMask);
+    locClientEventMaskType clearMask = QMI_LOC_EVENT_MASK_POSITION_REPORT_V02 |
+                                       QMI_LOC_EVENT_MASK_GNSS_SV_INFO_V02 |
+                                       QMI_LOC_EVENT_MASK_NMEA_V02 |
+                                       QMI_LOC_EVENT_MASK_ENGINE_STATE_V02 |
+                                       QMI_LOC_EVENT_MASK_GNSS_MEASUREMENT_REPORT_V02;
+
+    qmiMask = qmiMask & ~clearMask;
+    LOC_LOGD("%s:%d]: after qmiMask=%lld",
+             __func__, __LINE__, qmiMask);
+    return qmiMask;
+}
+
+enum loc_api_adapter_err LocApiV02 :: close()
+{
+  enum loc_api_adapter_err rtv =
+      // success if either client is already invalid, or
+      // we successfully close the handle
+      (LOC_CLIENT_INVALID_HANDLE_VALUE == clientHandle ||
+       eLOC_CLIENT_SUCCESS == locClientClose(&clientHandle)) ?
+      LOC_API_ADAPTER_ERR_SUCCESS : LOC_API_ADAPTER_ERR_FAILURE;
+
+  mMask = 0;
+  clientHandle = LOC_CLIENT_INVALID_HANDLE_VALUE;
+
+  return rtv;
+}
+
+/* start positioning session */
+enum loc_api_adapter_err LocApiV02 :: startFix(const LocPosMode& fixCriteria)
+{
+  locClientStatusEnumType status;
+  locClientReqUnionType req_union;
+
+  qmiLocStartReqMsgT_v02 start_msg;
+
+  qmiLocSetOperationModeReqMsgT_v02 set_mode_msg;
+  qmiLocSetOperationModeIndMsgT_v02 set_mode_ind;
+
+    // clear all fields, validity masks
+  memset (&start_msg, 0, sizeof(start_msg));
+  memset (&set_mode_msg, 0, sizeof(set_mode_msg));
+  memset (&set_mode_ind, 0, sizeof(set_mode_ind));
+
+  LOC_LOGV("%s:%d]: start \n", __func__, __LINE__);
+  fixCriteria.logv();
+
+  mInSession = true;
+  registerEventMask(mQmiMask);
+
+  // fill in the start request
+  switch(fixCriteria.mode)
+  {
+    case LOC_POSITION_MODE_MS_BASED:
+      set_mode_msg.operationMode = eQMI_LOC_OPER_MODE_MSB_V02;
+      break;
+
+    case LOC_POSITION_MODE_MS_ASSISTED:
+      set_mode_msg.operationMode = eQMI_LOC_OPER_MODE_MSA_V02;
+      break;
+
+    case LOC_POSITION_MODE_RESERVED_4:
+      set_mode_msg.operationMode = eQMI_LOC_OPER_MODE_CELL_ID_V02;
+        break;
+
+    case LOC_POSITION_MODE_RESERVED_5:
+      set_mode_msg.operationMode = eQMI_LOC_OPER_MODE_WWAN_V02;
+        break;
+
+    default:
+      set_mode_msg.operationMode = eQMI_LOC_OPER_MODE_STANDALONE_V02;
+      break;
+  }
+
+  req_union.pSetOperationModeReq = &set_mode_msg;
+
+  // send the mode first, before the start message.
+  status = loc_sync_send_req(clientHandle,
+                             QMI_LOC_SET_OPERATION_MODE_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_SET_OPERATION_MODE_IND_V02,
+                             &set_mode_ind); // NULL?
+
+  if (status != eLOC_CLIENT_SUCCESS ||
+      eQMI_LOC_SUCCESS_V02 != set_mode_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: set opertion mode failed status = %s, "
+                   "ind..status = %s\n", __func__, __LINE__,
+              loc_get_v02_client_status_name(status),
+              loc_get_v02_qmi_status_name(set_mode_ind.status));
+  } else {
+      start_msg.minInterval_valid = 1;
+      start_msg.minInterval = fixCriteria.min_interval;
+
+      if (fixCriteria.preferred_accuracy >= 0) {
+          start_msg.horizontalAccuracyLevel_valid = 1;
+
+          if (fixCriteria.preferred_accuracy <= 100)
+          {
+              // fix needs high accuracy
+              start_msg.horizontalAccuracyLevel =  eQMI_LOC_ACCURACY_HIGH_V02;
+          }
+          else if (fixCriteria.preferred_accuracy <= 1000)
+          {
+              //fix needs med accuracy
+              start_msg.horizontalAccuracyLevel =  eQMI_LOC_ACCURACY_MED_V02;
+          }
+          else
+          {
+              //fix needs low accuracy
+              start_msg.horizontalAccuracyLevel =  eQMI_LOC_ACCURACY_LOW_V02;
+          }
+      }
+
+      start_msg.fixRecurrence_valid = 1;
+      if(GPS_POSITION_RECURRENCE_SINGLE == fixCriteria.recurrence)
+      {
+          start_msg.fixRecurrence = eQMI_LOC_RECURRENCE_SINGLE_V02;
+      }
+      else
+      {
+          start_msg.fixRecurrence = eQMI_LOC_RECURRENCE_PERIODIC_V02;
+      }
+
+      //dummy session id
+      // TBD: store session ID, check for session id in pos reports.
+      start_msg.sessionId = LOC_API_V02_DEF_SESSION_ID;
+
+      if (fixCriteria.credentials[0] != 0) {
+          int size1 = sizeof(start_msg.applicationId.applicationName);
+          int size2 = sizeof(fixCriteria.credentials);
+          int len = ((size1 < size2) ? size1 : size2) - 1;
+          memcpy(start_msg.applicationId.applicationName,
+                 fixCriteria.credentials,
+                 len);
+
+          size1 = sizeof(start_msg.applicationId.applicationProvider);
+          size2 = sizeof(fixCriteria.provider);
+          len = ((size1 < size2) ? size1 : size2) - 1;
+          memcpy(start_msg.applicationId.applicationProvider,
+                 fixCriteria.provider,
+                 len);
+
+          start_msg.applicationId_valid = 1;
+      }
+
+      // config Altitude Assumed
+      start_msg.configAltitudeAssumed_valid = 1;
+      start_msg.configAltitudeAssumed = eQMI_LOC_ALTITUDE_ASSUMED_IN_GNSS_SV_INFO_DISABLED_V02;
+
+      req_union.pStartReq = &start_msg;
+
+      status = locClientSendReq (clientHandle, QMI_LOC_START_REQ_V02,
+                                 req_union );
+  }
+
+  return convertErr(status);
+}
+
+/* stop a positioning session */
+enum loc_api_adapter_err LocApiV02 :: stopFix()
+{
+  locClientStatusEnumType status;
+  locClientReqUnionType req_union;
+
+  qmiLocStopReqMsgT_v02 stop_msg;
+
+  LOC_LOGD(" %s:%d]: stop called \n", __func__, __LINE__);
+
+  memset(&stop_msg, 0, sizeof(stop_msg));
+
+  // dummy session id
+  stop_msg.sessionId = LOC_API_V02_DEF_SESSION_ID;
+
+  req_union.pStopReq = &stop_msg;
+
+  status = locClientSendReq(clientHandle,
+                            QMI_LOC_STOP_REQ_V02,
+                            req_union);
+
+  mInSession = false;
+  // if engine on never happend, deregister events
+  // without waiting for Engine Off
+  if (!mEngineOn) {
+      registerEventMask(mQmiMask);
+  }
+
+  if( eLOC_CLIENT_SUCCESS != status)
+  {
+      LOC_LOGE("%s:%d]: error = %s\n",__func__, __LINE__,
+               loc_get_v02_client_status_name(status));
+  }
+
+  return convertErr(status);
+}
+
+/* set the positioning fix criteria */
+enum loc_api_adapter_err LocApiV02 :: setPositionMode(
+  const LocPosMode& posMode)
+{
+    if(isInSession())
+    {
+        //fix is in progress, send a restart
+        LOC_LOGD ("%s:%d]: fix is in progress restarting the fix with new "
+                  "criteria\n", __func__, __LINE__);
+
+        return( startFix(posMode));
+    }
+
+    return LOC_API_ADAPTER_ERR_SUCCESS;
+}
+
+/* inject time into the position engine */
+enum loc_api_adapter_err LocApiV02 ::
+    setTime(GpsUtcTime time, int64_t timeReference, int uncertainty)
+{
+  locClientReqUnionType req_union;
+  locClientStatusEnumType status;
+  qmiLocInjectUtcTimeReqMsgT_v02  inject_time_msg;
+  qmiLocInjectUtcTimeIndMsgT_v02 inject_time_ind;
+
+  memset(&inject_time_msg, 0, sizeof(inject_time_msg));
+
+  inject_time_ind.status = eQMI_LOC_GENERAL_FAILURE_V02;
+
+  inject_time_msg.timeUtc = time;
+
+  inject_time_msg.timeUtc += (int64_t)(ELAPSED_MILLIS_SINCE_BOOT_PLATFORM_LIB_ABSTRACTION - timeReference);
+
+  inject_time_msg.timeUnc = uncertainty;
+
+  req_union.pInjectUtcTimeReq = &inject_time_msg;
+
+  LOC_LOGV ("%s:%d]: uncertainty = %d\n", __func__, __LINE__,
+                 uncertainty);
+
+  status = loc_sync_send_req(clientHandle,
+                             QMI_LOC_INJECT_UTC_TIME_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_INJECT_UTC_TIME_IND_V02,
+                             &inject_time_ind);
+
+  if (status != eLOC_CLIENT_SUCCESS ||
+      eQMI_LOC_SUCCESS_V02 != inject_time_ind.status)
+  {
+    LOC_LOGE ("%s:%d] status = %s, ind..status = %s\n", __func__,  __LINE__,
+              loc_get_v02_client_status_name(status),
+              loc_get_v02_qmi_status_name(inject_time_ind.status));
+  }
+
+  return convertErr(status);
+}
+
+/* inject position into the position engine */
+enum loc_api_adapter_err LocApiV02 ::
+    injectPosition(double latitude, double longitude, float accuracy)
+{
+  locClientReqUnionType req_union;
+  locClientStatusEnumType status;
+  qmiLocInjectPositionReqMsgT_v02 inject_pos_msg;
+  qmiLocInjectPositionIndMsgT_v02 inject_pos_ind;
+
+  memset(&inject_pos_msg, 0, sizeof(inject_pos_msg));
+
+  inject_pos_msg.latitude_valid = 1;
+  inject_pos_msg.latitude = latitude;
+
+  inject_pos_msg.longitude_valid = 1;
+  inject_pos_msg.longitude = longitude;
+
+  inject_pos_msg.horUncCircular_valid = 1;
+
+  inject_pos_msg.horUncCircular = accuracy; //meters assumed
+  if (inject_pos_msg.horUncCircular < 1000) {
+      inject_pos_msg.horUncCircular = 1000;
+  }
+
+  inject_pos_msg.horConfidence_valid = 1;
+
+  inject_pos_msg.horConfidence = 68; //1 std dev assumed as specified by API
+
+  inject_pos_msg.rawHorUncCircular_valid = 1;
+
+  inject_pos_msg.rawHorUncCircular = accuracy; //meters assumed
+
+  inject_pos_msg.rawHorConfidence_valid = 1;
+
+  inject_pos_msg.rawHorConfidence = 68; //1 std dev assumed as specified by API
+
+    /* Log */
+  LOC_LOGD("%s:%d]: Lat=%lf, Lon=%lf, Acc=%.2lf rawAcc=%.2lf", __func__, __LINE__,
+                inject_pos_msg.latitude, inject_pos_msg.longitude,
+                inject_pos_msg.horUncCircular, inject_pos_msg.rawHorUncCircular);
+
+  req_union.pInjectPositionReq = &inject_pos_msg;
+
+  status = loc_sync_send_req(clientHandle,
+                             QMI_LOC_INJECT_POSITION_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_INJECT_POSITION_IND_V02,
+                             &inject_pos_ind);
+
+  if (status != eLOC_CLIENT_SUCCESS ||
+      eQMI_LOC_SUCCESS_V02 != inject_pos_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: error! status = %s, inject_pos_ind.status = %s\n",
+              __func__, __LINE__,
+              loc_get_v02_client_status_name(status),
+              loc_get_v02_qmi_status_name(inject_pos_ind.status));
+  }
+
+  return convertErr(status);
+}
+
+/* delete assistance date */
+enum loc_api_adapter_err LocApiV02 ::  deleteAidingData(GpsAidingData f)
+{
+  locClientReqUnionType req_union;
+  locClientStatusEnumType status;
+  qmiLocDeleteAssistDataReqMsgT_v02 delete_req;
+  qmiLocDeleteAssistDataIndMsgT_v02 delete_resp;
+
+  memset(&delete_req, 0, sizeof(delete_req));
+  memset(&delete_resp, 0, sizeof(delete_resp));
+
+  if( f == GPS_DELETE_ALL )
+  {
+    delete_req.deleteAllFlag = true;
+  }
+
+  else
+  {
+    /* to keep track of svInfoList for GPS and GLO*/
+    uint32_t curr_sv_len = 0;
+    uint32_t curr_sv_idx = 0;
+    uint32_t sv_id =  0;
+
+    if((f & GPS_DELETE_EPHEMERIS ) || ( f & GPS_DELETE_ALMANAC ))
+    {
+      /* do delete for all GPS SV's */
+
+      curr_sv_len += SV_ID_RANGE;
+
+      sv_id = GPS_SV_ID_OFFSET;
+
+      delete_req.deleteSvInfoList_valid = 1;
+
+      delete_req.deleteSvInfoList_len = curr_sv_len;
+
+      LOC_LOGV("%s:%d]: Delete GPS SV info for index %d to %d"
+                    "and sv id %d to %d \n",
+                    __func__, __LINE__, curr_sv_idx, curr_sv_len - 1,
+                    sv_id, sv_id+SV_ID_RANGE-1);
+
+      for( uint32_t i = curr_sv_idx; i< curr_sv_len ; i++, sv_id++ )
+      {
+        delete_req.deleteSvInfoList[i].gnssSvId = sv_id;
+
+        delete_req.deleteSvInfoList[i].system = eQMI_LOC_SV_SYSTEM_GPS_V02;
+
+        if(f & GPS_DELETE_EPHEMERIS )
+        {
+          // set ephemeris mask for all GPS SV's
+          delete_req.deleteSvInfoList[i].deleteSvInfoMask |=
+            QMI_LOC_MASK_DELETE_EPHEMERIS_V02;
+        }
+
+        if( f & GPS_DELETE_ALMANAC )
+        {
+          delete_req.deleteSvInfoList[i].deleteSvInfoMask |=
+            QMI_LOC_MASK_DELETE_ALMANAC_V02;
+        }
+      }
+      // increment the current index
+      curr_sv_idx += SV_ID_RANGE;
+
+    }
+
+    if(f & GPS_DELETE_POSITION )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_POSITION_V02;
+    }
+
+    if(f & GPS_DELETE_TIME )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_TIME_V02;
+    }
+
+    if(f & GPS_DELETE_IONO )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_IONO_V02;
+    }
+
+    if(f & GPS_DELETE_UTC )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_UTC_V02;
+    }
+
+    if(f & GPS_DELETE_HEALTH )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_HEALTH_V02;
+    }
+
+    if(f & GPS_DELETE_SVDIR )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GPS_SVDIR_V02;
+    }
+    if(f & GPS_DELETE_SADATA )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_SADATA_V02;
+    }
+    if(f & GPS_DELETE_RTI )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_RTI_V02;
+    }
+    if(f & GPS_DELETE_CELLDB_INFO )
+    {
+      delete_req.deleteCellDbDataMask_valid = 1;
+      delete_req.deleteCellDbDataMask =
+        ( QMI_LOC_MASK_DELETE_CELLDB_POS_V02 |
+          QMI_LOC_MASK_DELETE_CELLDB_LATEST_GPS_POS_V02 |
+          QMI_LOC_MASK_DELETE_CELLDB_OTA_POS_V02 |
+          QMI_LOC_MASK_DELETE_CELLDB_EXT_REF_POS_V02 |
+          QMI_LOC_MASK_DELETE_CELLDB_TIMETAG_V02 |
+          QMI_LOC_MASK_DELETE_CELLDB_CELLID_V02 |
+          QMI_LOC_MASK_DELETE_CELLDB_CACHED_CELLID_V02 |
+          QMI_LOC_MASK_DELETE_CELLDB_LAST_SRV_CELL_V02 |
+          QMI_LOC_MASK_DELETE_CELLDB_CUR_SRV_CELL_V02 |
+          QMI_LOC_MASK_DELETE_CELLDB_NEIGHBOR_INFO_V02) ;
+
+    }
+#ifndef PDK_FEATURE_SET
+    if( f & GPS_DELETE_TIME_GPS )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GPS_TIME_V02;
+    }
+    if(f & GPS_DELETE_ALMANAC_CORR )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GPS_ALM_CORR_V02;
+    }
+    if(f & GPS_DELETE_FREQ_BIAS_EST )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_FREQ_BIAS_EST_V02;
+    }
+    if ( (f & GLO_DELETE_EPHEMERIS ) || (f & GLO_DELETE_ALMANAC ))
+    {
+      /* do delete for all GLONASS SV's (65 - 96)
+      */
+      curr_sv_len += SV_ID_RANGE;
+
+      sv_id = GLONASS_SV_ID_OFFSET;
+
+      delete_req.deleteSvInfoList_valid = 1;
+
+      delete_req.deleteSvInfoList_len = curr_sv_len;
+
+      LOC_LOGV("%s:%d]: Delete GLO SV info for index %d to %d"
+                    "and sv id %d to %d \n",
+                    __func__, __LINE__, curr_sv_idx, curr_sv_len - 1,
+                    sv_id, sv_id+SV_ID_RANGE-1);
+
+
+      for( uint32_t i = curr_sv_idx; i< curr_sv_len ; i++, sv_id++ )
+      {
+        delete_req.deleteSvInfoList[i].gnssSvId = sv_id;
+
+        delete_req.deleteSvInfoList[i].system = eQMI_LOC_SV_SYSTEM_GLONASS_V02;
+
+        // set ephemeris mask for all GLO SV's
+        if(f & GLO_DELETE_EPHEMERIS)
+            delete_req.deleteSvInfoList[i].deleteSvInfoMask |=
+                QMI_LOC_MASK_DELETE_EPHEMERIS_V02;
+        // set almanac mask for all GLO SV's
+        if(f & GLO_DELETE_ALMANAC)
+            delete_req.deleteSvInfoList[i].deleteSvInfoMask |=
+                QMI_LOC_MASK_DELETE_ALMANAC_V02;
+      }
+      curr_sv_idx += SV_ID_RANGE;
+    }
+
+    if(f & GLO_DELETE_SVDIR )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GLO_SVDIR_V02;
+    }
+
+    if(f & GLO_DELETE_SVSTEER )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GLO_SVSTEER_V02;
+    }
+
+    if(f & GLO_DELETE_ALMANAC_CORR )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GLO_ALM_CORR_V02;
+    }
+
+    if(f & GLO_DELETE_TIME )
+    {
+      delete_req.deleteGnssDataMask_valid = 1;
+      delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GLO_TIME_V02;
+    }
+
+    if ( (f & BDS_DELETE_EPHEMERIS ) || (f & BDS_DELETE_ALMANAC ))
+    {
+        /*Delete BeiDou SV info*/
+
+        sv_id = BDS_SV_ID_OFFSET;
+
+        delete_req.deleteBdsSvInfoList_valid = 1;
+
+        delete_req.deleteBdsSvInfoList_len = BDS_SV_ID_RANGE;
+
+        LOC_LOGV("%s:%d]: Delete BDS SV info for index 0 to %d"
+                 "and sv id %d to %d \n",
+                 __func__, __LINE__,
+                 BDS_SV_ID_RANGE - 1,
+                 sv_id, sv_id+BDS_SV_ID_RANGE - 1);
+
+        for( uint32_t i = 0; i < BDS_SV_ID_RANGE; i++, sv_id++ )
+        {
+            delete_req.deleteBdsSvInfoList[i].gnssSvId = sv_id;
+
+            // set ephemeris mask for all BDS SV's
+            if(f & BDS_DELETE_EPHEMERIS)
+                delete_req.deleteBdsSvInfoList[i].deleteSvInfoMask |=
+                    QMI_LOC_MASK_DELETE_EPHEMERIS_V02;
+            if(f & BDS_DELETE_ALMANAC)
+                delete_req.deleteBdsSvInfoList[i].deleteSvInfoMask |=
+                    QMI_LOC_MASK_DELETE_ALMANAC_V02;
+        }
+        curr_sv_idx += BDS_SV_ID_RANGE;
+    }
+
+    if(f & BDS_DELETE_SVDIR )
+    {
+        delete_req.deleteGnssDataMask_valid = 1;
+        delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_BDS_SVDIR_V02;
+    }
+
+    if(f & BDS_DELETE_SVSTEER )
+    {
+        delete_req.deleteGnssDataMask_valid = 1;
+        delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_BDS_SVSTEER_V02;
+    }
+
+    if(f & BDS_DELETE_ALMANAC_CORR )
+    {
+        delete_req.deleteGnssDataMask_valid = 1;
+        delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_BDS_ALM_CORR_V02;
+    }
+
+    if(f & BDS_DELETE_TIME )
+    {
+        delete_req.deleteGnssDataMask_valid = 1;
+        delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_BDS_TIME_V02;
+    }
+#endif
+
+  }
+
+  req_union.pDeleteAssistDataReq = &delete_req;
+
+  status = loc_sync_send_req(clientHandle,
+                             QMI_LOC_DELETE_ASSIST_DATA_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_DELETE_ASSIST_DATA_IND_V02,
+                             &delete_resp);
+
+  if (status != eLOC_CLIENT_SUCCESS ||
+      eQMI_LOC_SUCCESS_V02 != delete_resp.status)
+  {
+    LOC_LOGE ("%s:%d]: error! status = %s, delete_resp.status = %s\n",
+              __func__, __LINE__,
+              loc_get_v02_client_status_name(status),
+              loc_get_v02_qmi_status_name(delete_resp.status));
+  }
+
+  return convertErr(status);
+}
+
+/* send NI user repsonse to the engine */
+enum loc_api_adapter_err LocApiV02 ::
+    informNiResponse(GpsUserResponseType userResponse,
+                     const void* passThroughData)
+{
+  locClientReqUnionType req_union;
+  locClientStatusEnumType status;
+
+  qmiLocNiUserRespReqMsgT_v02 ni_resp;
+  qmiLocNiUserRespIndMsgT_v02 ni_resp_ind;
+
+  qmiLocEventNiNotifyVerifyReqIndMsgT_v02 *request_pass_back =
+    (qmiLocEventNiNotifyVerifyReqIndMsgT_v02 *)passThroughData;
+
+  memset(&ni_resp,0, sizeof(ni_resp));
+
+  memset(&ni_resp_ind,0, sizeof(ni_resp_ind));
+
+  switch (userResponse)
+  {
+    case GPS_NI_RESPONSE_ACCEPT:
+      ni_resp.userResp = eQMI_LOC_NI_LCS_NOTIFY_VERIFY_ACCEPT_V02;
+      break;
+   case GPS_NI_RESPONSE_DENY:
+      ni_resp.userResp = eQMI_LOC_NI_LCS_NOTIFY_VERIFY_DENY_V02;
+      break;
+   case GPS_NI_RESPONSE_NORESP:
+      ni_resp.userResp = eQMI_LOC_NI_LCS_NOTIFY_VERIFY_NORESP_V02;
+      break;
+   default:
+      return LOC_API_ADAPTER_ERR_INVALID_PARAMETER;
+  }
+
+  LOC_LOGV(" %s:%d]: NI response: %d\n", __func__, __LINE__,
+                ni_resp.userResp);
+
+  ni_resp.notificationType = request_pass_back->notificationType;
+
+  // copy SUPL payload from request
+  if(request_pass_back->NiSuplInd_valid == 1)
+  {
+     ni_resp.NiSuplPayload_valid = 1;
+     memcpy(&(ni_resp.NiSuplPayload), &(request_pass_back->NiSuplInd),
+            sizeof(qmiLocNiSuplNotifyVerifyStructT_v02));
+
+  }
+  // should this be an "else if"?? we don't need to decide
+
+  // copy UMTS-CP payload from request
+  if( request_pass_back->NiUmtsCpInd_valid == 1 )
+  {
+     ni_resp.NiUmtsCpPayload_valid = 1;
+     memcpy(&(ni_resp.NiUmtsCpPayload), &(request_pass_back->NiUmtsCpInd),
+            sizeof(qmiLocNiUmtsCpNotifyVerifyStructT_v02));
+  }
+
+  //copy Vx payload from the request
+  if( request_pass_back->NiVxInd_valid == 1)
+  {
+     ni_resp.NiVxPayload_valid = 1;
+     memcpy(&(ni_resp.NiVxPayload), &(request_pass_back->NiVxInd),
+            sizeof(qmiLocNiVxNotifyVerifyStructT_v02));
+  }
+
+  // copy Vx service interaction payload from the request
+  if(request_pass_back->NiVxServiceInteractionInd_valid == 1)
+  {
+     ni_resp.NiVxServiceInteractionPayload_valid = 1;
+     memcpy(&(ni_resp.NiVxServiceInteractionPayload),
+            &(request_pass_back->NiVxServiceInteractionInd),
+            sizeof(qmiLocNiVxServiceInteractionStructT_v02));
+  }
+
+  // copy Network Initiated SUPL Version 2 Extension
+  if (request_pass_back->NiSuplVer2ExtInd_valid == 1)
+  {
+     ni_resp.NiSuplVer2ExtPayload_valid = 1;
+     memcpy(&(ni_resp.NiSuplVer2ExtPayload),
+            &(request_pass_back->NiSuplVer2ExtInd),
+            sizeof(qmiLocNiSuplVer2ExtStructT_v02));
+  }
+
+  // copy SUPL Emergency Notification
+  if(request_pass_back->suplEmergencyNotification_valid)
+  {
+     ni_resp.suplEmergencyNotification_valid = 1;
+     memcpy(&(ni_resp.suplEmergencyNotification),
+            &(request_pass_back->suplEmergencyNotification),
+            sizeof(qmiLocEmergencyNotificationStructT_v02));
+  }
+
+  req_union.pNiUserRespReq = &ni_resp;
+
+  status = loc_sync_send_req (
+     clientHandle, QMI_LOC_NI_USER_RESPONSE_REQ_V02,
+     req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+     QMI_LOC_NI_USER_RESPONSE_IND_V02, &ni_resp_ind);
+
+  if (status != eLOC_CLIENT_SUCCESS ||
+      eQMI_LOC_SUCCESS_V02 != ni_resp_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: error! status = %s, ni_resp_ind.status = %s\n",
+              __func__, __LINE__,
+              loc_get_v02_client_status_name(status),
+              loc_get_v02_qmi_status_name(ni_resp_ind.status));
+  }
+
+  return convertErr(status);
+}
+
+/* Set UMTs SLP server URL */
+enum loc_api_adapter_err LocApiV02 :: setServer(
+  const char* url, int len)
+{
+  locClientReqUnionType req_union;
+  locClientStatusEnumType status;
+  qmiLocSetServerReqMsgT_v02 set_server_req;
+  qmiLocSetServerIndMsgT_v02 set_server_ind;
+
+  if(len < 0 || len > sizeof(set_server_req.urlAddr))
+  {
+    LOC_LOGE("%s:%d]: len = %d greater than max allowed url length\n",
+                  __func__, __LINE__, len);
+
+    return LOC_API_ADAPTER_ERR_INVALID_PARAMETER;
+  }
+
+  memset(&set_server_req, 0, sizeof(set_server_req));
+
+  LOC_LOGD("%s:%d]:, url = %s, len = %d\n", __func__, __LINE__, url, len);
+
+  set_server_req.serverType = eQMI_LOC_SERVER_TYPE_UMTS_SLP_V02;
+
+  set_server_req.urlAddr_valid = 1;
+
+  strlcpy(set_server_req.urlAddr, url, sizeof(set_server_req.urlAddr));
+
+  req_union.pSetServerReq = &set_server_req;
+
+  status = loc_sync_send_req(clientHandle,
+                             QMI_LOC_SET_SERVER_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_SET_SERVER_IND_V02,
+                             &set_server_ind);
+
+  if (status != eLOC_CLIENT_SUCCESS ||
+         eQMI_LOC_SUCCESS_V02 != set_server_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: error status = %s, set_server_ind.status = %s\n",
+              __func__,__LINE__,
+              loc_get_v02_client_status_name(status),
+              loc_get_v02_qmi_status_name(set_server_ind.status));
+  }
+
+  return convertErr(status);
+}
+
+enum loc_api_adapter_err LocApiV02 ::
+    setServer(unsigned int ip, int port, LocServerType type)
+{
+  locClientReqUnionType req_union;
+  locClientStatusEnumType status;
+  qmiLocSetServerReqMsgT_v02 set_server_req;
+  qmiLocSetServerIndMsgT_v02 set_server_ind;
+  qmiLocServerTypeEnumT_v02 set_server_cmd;
+
+  switch (type) {
+  case LOC_AGPS_MPC_SERVER:
+      set_server_cmd = eQMI_LOC_SERVER_TYPE_CDMA_MPC_V02;
+      break;
+  case LOC_AGPS_CUSTOM_PDE_SERVER:
+      set_server_cmd = eQMI_LOC_SERVER_TYPE_CUSTOM_PDE_V02;
+      break;
+  default:
+      set_server_cmd = eQMI_LOC_SERVER_TYPE_CDMA_PDE_V02;
+      break;
+  }
+
+  memset(&set_server_req, 0, sizeof(set_server_req));
+
+  LOC_LOGD("%s:%d]:, ip = %u, port = %d\n", __func__, __LINE__, ip, port);
+
+  set_server_req.serverType = set_server_cmd;
+  set_server_req.ipv4Addr_valid = 1;
+  set_server_req.ipv4Addr.addr = ip;
+  set_server_req.ipv4Addr.port = port;
+
+  req_union.pSetServerReq = &set_server_req;
+
+  status = loc_sync_send_req(clientHandle,
+                             QMI_LOC_SET_SERVER_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_SET_SERVER_IND_V02,
+                             &set_server_ind);
+
+  if (status != eLOC_CLIENT_SUCCESS ||
+      eQMI_LOC_SUCCESS_V02 != set_server_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: error status = %s, set_server_ind.status = %s\n",
+              __func__,__LINE__,
+              loc_get_v02_client_status_name(status),
+              loc_get_v02_qmi_status_name(set_server_ind.status));
+  }
+
+  return convertErr(status);
+}
+
+/* Inject XTRA data, this module breaks down the XTRA
+   file into "chunks" and injects them one at a time */
+enum loc_api_adapter_err LocApiV02 :: setXtraData(
+  char* data, int length)
+{
+  locClientStatusEnumType status = eLOC_CLIENT_SUCCESS;
+  int     total_parts;
+  uint8_t   part;
+  uint16_t  len_injected;
+
+  locClientReqUnionType req_union;
+  qmiLocInjectPredictedOrbitsDataReqMsgT_v02 inject_xtra;
+  qmiLocInjectPredictedOrbitsDataIndMsgT_v02 inject_xtra_ind;
+
+  req_union.pInjectPredictedOrbitsDataReq = &inject_xtra;
+
+  LOC_LOGD("%s:%d]: xtra size = %d\n", __func__, __LINE__, length);
+
+  inject_xtra.formatType_valid = 1;
+  inject_xtra.formatType = eQMI_LOC_PREDICTED_ORBITS_XTRA_V02;
+  inject_xtra.totalSize = length;
+
+  total_parts = ((length - 1) / QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02) + 1;
+
+  inject_xtra.totalParts = total_parts;
+
+  len_injected = 0; // O bytes injected
+
+  // XTRA injection starts with part 1
+  for (part = 1; part <= total_parts; part++)
+  {
+    inject_xtra.partNum = part;
+
+    if (QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02 > (length - len_injected))
+    {
+      inject_xtra.partData_len = length - len_injected;
+    }
+    else
+    {
+      inject_xtra.partData_len = QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02;
+    }
+
+    // copy data into the message
+    memcpy(inject_xtra.partData, data+len_injected, inject_xtra.partData_len);
+
+    LOC_LOGD("[%s:%d] part %d/%d, len = %d, total injected = %d\n",
+                  __func__, __LINE__,
+                  inject_xtra.partNum, total_parts, inject_xtra.partData_len,
+                  len_injected);
+
+    status = loc_sync_send_req( clientHandle,
+                                QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02,
+                                req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                                QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02,
+                                &inject_xtra_ind);
+
+    if (status != eLOC_CLIENT_SUCCESS ||
+        eQMI_LOC_SUCCESS_V02 != inject_xtra_ind.status ||
+        inject_xtra.partNum != inject_xtra_ind.partNum)
+    {
+      LOC_LOGE ("%s:%d]: failed status = %s, inject_pos_ind.status = %s,"
+                     " part num = %d, ind.partNum = %d\n", __func__, __LINE__,
+                loc_get_v02_client_status_name(status),
+                loc_get_v02_qmi_status_name(inject_xtra_ind.status),
+                inject_xtra.partNum, inject_xtra_ind.partNum);
+    } else {
+      len_injected += inject_xtra.partData_len;
+      LOC_LOGD("%s:%d]: XTRA injected length: %d\n", __func__, __LINE__,
+               len_injected);
+    }
+  }
+
+  return convertErr(status);
+}
+
+/* Request the Xtra Server Url from the modem */
+enum loc_api_adapter_err LocApiV02 :: requestXtraServer()
+{
+  locClientStatusEnumType status = eLOC_CLIENT_SUCCESS;
+
+  locClientReqUnionType req_union;
+  qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02 request_xtra_server_ind;
+
+  status = loc_sync_send_req( clientHandle,
+                              QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_REQ_V02,
+                              req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                              QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_IND_V02,
+                              &request_xtra_server_ind);
+
+  if (status == eLOC_CLIENT_SUCCESS &&
+      eQMI_LOC_SUCCESS_V02 == request_xtra_server_ind.status &&
+      false != request_xtra_server_ind.serverList_valid &&
+      0 != request_xtra_server_ind.serverList.serverList_len)
+  {
+    if (request_xtra_server_ind.serverList.serverList_len == 1)
+    {
+      reportXtraServer(request_xtra_server_ind.serverList.serverList[0].serverUrl,
+                       "",
+                       "",
+                       QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02);
+    }
+    else if (request_xtra_server_ind.serverList.serverList_len == 2)
+    {
+      reportXtraServer(request_xtra_server_ind.serverList.serverList[0].serverUrl,
+                       request_xtra_server_ind.serverList.serverList[1].serverUrl,
+                       "",
+                       QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02);
+    }
+    else
+    {
+      reportXtraServer(request_xtra_server_ind.serverList.serverList[0].serverUrl,
+                       request_xtra_server_ind.serverList.serverList[1].serverUrl,
+                       request_xtra_server_ind.serverList.serverList[2].serverUrl,
+                       QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02);
+    }
+  }
+
+  return convertErr(status);
+}
+
+enum loc_api_adapter_err LocApiV02 :: atlOpenStatus(
+  int handle, int is_succ, char* apn, AGpsBearerType bear,
+  AGpsType agpsType)
+{
+  locClientStatusEnumType result = eLOC_CLIENT_SUCCESS;
+  locClientReqUnionType req_union;
+  qmiLocInformLocationServerConnStatusReqMsgT_v02 conn_status_req;
+  qmiLocInformLocationServerConnStatusIndMsgT_v02 conn_status_ind;
+
+
+  LOC_LOGD("%s:%d]: ATL open handle = %d, is_succ = %d, "
+                "APN = [%s], bearer = %d \n",  __func__, __LINE__,
+                handle, is_succ, apn, bear);
+
+  memset(&conn_status_req, 0, sizeof(conn_status_req));
+  memset(&conn_status_ind, 0, sizeof(conn_status_ind));
+
+        // Fill in data
+  conn_status_req.connHandle = handle;
+
+  conn_status_req.requestType = eQMI_LOC_SERVER_REQUEST_OPEN_V02;
+
+  if(is_succ)
+  {
+    conn_status_req.statusType = eQMI_LOC_SERVER_REQ_STATUS_SUCCESS_V02;
+
+    if(apn != NULL)
+        strlcpy(conn_status_req.apnProfile.apnName, apn,
+                sizeof(conn_status_req.apnProfile.apnName) );
+
+    switch(bear)
+    {
+    case AGPS_APN_BEARER_IPV4:
+        conn_status_req.apnProfile.pdnType =
+            eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV4_V02;
+        conn_status_req.apnProfile_valid = 1;
+        break;
+
+    case AGPS_APN_BEARER_IPV6:
+        conn_status_req.apnProfile.pdnType =
+            eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV6_V02;
+        conn_status_req.apnProfile_valid = 1;
+        break;
+
+    case AGPS_APN_BEARER_IPV4V6:
+        conn_status_req.apnProfile.pdnType =
+            eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV4V6_V02;
+        conn_status_req.apnProfile_valid = 1;
+        break;
+
+    case AGPS_APN_BEARER_INVALID:
+        conn_status_req.apnProfile_valid = 0;
+        break;
+
+    default:
+        LOC_LOGE("%s:%d]:invalid bearer type\n",__func__,__LINE__);
+        conn_status_req.apnProfile_valid = 0;
+        return LOC_API_ADAPTER_ERR_INVALID_HANDLE;
+    }
+
+  }
+  else
+  {
+    conn_status_req.statusType = eQMI_LOC_SERVER_REQ_STATUS_FAILURE_V02;
+  }
+
+  req_union.pInformLocationServerConnStatusReq = &conn_status_req;
+
+  result = loc_sync_send_req(clientHandle,
+                             QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02,
+                             &conn_status_ind);
+
+  if(result != eLOC_CLIENT_SUCCESS ||
+     eQMI_LOC_SUCCESS_V02 != conn_status_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: Error status = %s, ind..status = %s ",
+              __func__, __LINE__,
+              loc_get_v02_client_status_name(result),
+              loc_get_v02_qmi_status_name(conn_status_ind.status));
+  }
+
+  return convertErr(result);
+
+}
+
+
+/* close atl connection */
+enum loc_api_adapter_err LocApiV02 :: atlCloseStatus(
+  int handle, int is_succ)
+{
+  locClientStatusEnumType result = eLOC_CLIENT_SUCCESS;
+  locClientReqUnionType req_union;
+  qmiLocInformLocationServerConnStatusReqMsgT_v02 conn_status_req;
+  qmiLocInformLocationServerConnStatusIndMsgT_v02 conn_status_ind;
+
+  LOC_LOGD("%s:%d]: ATL close handle = %d, is_succ = %d\n",
+                 __func__, __LINE__,  handle, is_succ);
+
+  memset(&conn_status_req, 0, sizeof(conn_status_req));
+  memset(&conn_status_ind, 0, sizeof(conn_status_ind));
+
+        // Fill in data
+  conn_status_req.connHandle = handle;
+
+  conn_status_req.requestType = eQMI_LOC_SERVER_REQUEST_CLOSE_V02;
+
+  if(is_succ)
+  {
+    conn_status_req.statusType = eQMI_LOC_SERVER_REQ_STATUS_SUCCESS_V02;
+  }
+  else
+  {
+    conn_status_req.statusType = eQMI_LOC_SERVER_REQ_STATUS_FAILURE_V02;
+  }
+
+  req_union.pInformLocationServerConnStatusReq = &conn_status_req;
+
+  result = loc_sync_send_req(clientHandle,
+                             QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02,
+                             &conn_status_ind);
+
+  if(result != eLOC_CLIENT_SUCCESS ||
+     eQMI_LOC_SUCCESS_V02 != conn_status_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: Error status = %s, ind..status = %s ",
+              __func__, __LINE__,
+              loc_get_v02_client_status_name(result),
+              loc_get_v02_qmi_status_name(conn_status_ind.status));
+  }
+
+  return convertErr(result);
+}
+
+/* set the SUPL version */
+enum loc_api_adapter_err LocApiV02 :: setSUPLVersion(uint32_t version)
+{
+  locClientStatusEnumType result = eLOC_CLIENT_SUCCESS;
+  locClientReqUnionType req_union;
+
+  qmiLocSetProtocolConfigParametersReqMsgT_v02 supl_config_req;
+  qmiLocSetProtocolConfigParametersIndMsgT_v02 supl_config_ind;
+
+  LOC_LOGD("%s:%d]: supl version = %d\n",  __func__, __LINE__, version);
+
+
+  memset(&supl_config_req, 0, sizeof(supl_config_req));
+  memset(&supl_config_ind, 0, sizeof(supl_config_ind));
+
+   supl_config_req.suplVersion_valid = 1;
+   // SUPL version from MSByte to LSByte:
+   // (reserved)(major version)(minor version)(serviceIndicator)
+
+   supl_config_req.suplVersion = (version == 0x00020000)?
+     eQMI_LOC_SUPL_VERSION_2_0_V02 : eQMI_LOC_SUPL_VERSION_1_0_V02;
+
+  req_union.pSetProtocolConfigParametersReq = &supl_config_req;
+
+  result = loc_sync_send_req(clientHandle,
+                             QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02,
+                             &supl_config_ind);
+
+  if(result != eLOC_CLIENT_SUCCESS ||
+     eQMI_LOC_SUCCESS_V02 != supl_config_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: Error status = %s, ind..status = %s ",
+              __func__, __LINE__,
+              loc_get_v02_client_status_name(result),
+              loc_get_v02_qmi_status_name(supl_config_ind.status));
+  }
+
+  return convertErr(result);
+}
+
+/* set the configuration for LTE positioning profile (LPP) */
+enum loc_api_adapter_err LocApiV02 :: setLPPConfig(uint32_t profile)
+{
+  locClientStatusEnumType result = eLOC_CLIENT_SUCCESS;
+  locClientReqUnionType req_union;
+  qmiLocSetProtocolConfigParametersReqMsgT_v02 lpp_config_req;
+  qmiLocSetProtocolConfigParametersIndMsgT_v02 lpp_config_ind;
+
+  LOC_LOGD("%s:%d]: lpp profile = %d\n",  __func__, __LINE__, profile);
+
+  memset(&lpp_config_req, 0, sizeof(lpp_config_req));
+  memset(&lpp_config_ind, 0, sizeof(lpp_config_ind));
+
+  lpp_config_req.lppConfig_valid = 1;
+
+  lpp_config_req.lppConfig = profile;
+
+  req_union.pSetProtocolConfigParametersReq = &lpp_config_req;
+
+  result = loc_sync_send_req(clientHandle,
+                             QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02,
+                             &lpp_config_ind);
+
+  if(result != eLOC_CLIENT_SUCCESS ||
+     eQMI_LOC_SUCCESS_V02 != lpp_config_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: Error status = %s, ind..status = %s ",
+              __func__, __LINE__,
+              loc_get_v02_client_status_name(result),
+              loc_get_v02_qmi_status_name(lpp_config_ind.status));
+  }
+
+  return convertErr(result);
+}
+
+/* set the Sensor Configuration */
+enum loc_api_adapter_err LocApiV02 :: setSensorControlConfig(
+    int sensorsDisabled, int sensorProvider)
+{
+  locClientStatusEnumType result = eLOC_CLIENT_SUCCESS;
+  locClientReqUnionType req_union;
+
+  qmiLocSetSensorControlConfigReqMsgT_v02 sensor_config_req;
+  qmiLocSetSensorControlConfigIndMsgT_v02 sensor_config_ind;
+
+  LOC_LOGD("%s:%d]: sensors disabled = %d\n",  __func__, __LINE__, sensorsDisabled);
+
+  memset(&sensor_config_req, 0, sizeof(sensor_config_req));
+  memset(&sensor_config_ind, 0, sizeof(sensor_config_ind));
+
+  sensor_config_req.sensorsUsage_valid = 1;
+  sensor_config_req.sensorsUsage = (sensorsDisabled == 1) ? eQMI_LOC_SENSOR_CONFIG_SENSOR_USE_DISABLE_V02
+                                    : eQMI_LOC_SENSOR_CONFIG_SENSOR_USE_ENABLE_V02;
+
+  sensor_config_req.sensorProvider_valid = 1;
+  sensor_config_req.sensorProvider = (sensorProvider == 1 || sensorProvider == 4) ?
+      eQMI_LOC_SENSOR_CONFIG_USE_PROVIDER_SSC_V02 :
+      eQMI_LOC_SENSOR_CONFIG_USE_PROVIDER_NATIVE_V02;
+
+  req_union.pSetSensorControlConfigReq = &sensor_config_req;
+
+  result = loc_sync_send_req(clientHandle,
+                             QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02,
+                             &sensor_config_ind);
+
+  if(result != eLOC_CLIENT_SUCCESS ||
+     eQMI_LOC_SUCCESS_V02 != sensor_config_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: Error status = %s, ind..status = %s ",
+              __func__, __LINE__,
+              loc_get_v02_client_status_name(result),
+              loc_get_v02_qmi_status_name(sensor_config_ind.status));
+  }
+
+  return convertErr(result);
+}
+
+/* set the Sensor Properties */
+enum loc_api_adapter_err LocApiV02 :: setSensorProperties(bool gyroBiasVarianceRandomWalk_valid, float gyroBiasVarianceRandomWalk,
+                            bool accelBiasVarianceRandomWalk_valid, float accelBiasVarianceRandomWalk,
+                            bool angleBiasVarianceRandomWalk_valid, float angleBiasVarianceRandomWalk,
+                            bool rateBiasVarianceRandomWalk_valid, float rateBiasVarianceRandomWalk,
+                            bool velocityBiasVarianceRandomWalk_valid, float velocityBiasVarianceRandomWalk)
+{
+  locClientStatusEnumType result = eLOC_CLIENT_SUCCESS;
+  locClientReqUnionType req_union;
+
+  qmiLocSetSensorPropertiesReqMsgT_v02 sensor_prop_req;
+  qmiLocSetSensorPropertiesIndMsgT_v02 sensor_prop_ind;
+
+  LOC_LOGI("%s:%d]: sensors prop: gyroBiasRandomWalk = %f, accelRandomWalk = %f, "
+           "angleRandomWalk = %f, rateRandomWalk = %f, velocityRandomWalk = %f\n",
+                 __func__, __LINE__, gyroBiasVarianceRandomWalk, accelBiasVarianceRandomWalk,
+           angleBiasVarianceRandomWalk, rateBiasVarianceRandomWalk, velocityBiasVarianceRandomWalk);
+
+  memset(&sensor_prop_req, 0, sizeof(sensor_prop_req));
+  memset(&sensor_prop_ind, 0, sizeof(sensor_prop_ind));
+
+  /* Set the validity bit and value for each sensor property */
+  sensor_prop_req.gyroBiasVarianceRandomWalk_valid = gyroBiasVarianceRandomWalk_valid;
+  sensor_prop_req.gyroBiasVarianceRandomWalk = gyroBiasVarianceRandomWalk;
+
+  sensor_prop_req.accelerationRandomWalkSpectralDensity_valid = accelBiasVarianceRandomWalk_valid;
+  sensor_prop_req.accelerationRandomWalkSpectralDensity = accelBiasVarianceRandomWalk;
+
+  sensor_prop_req.angleRandomWalkSpectralDensity_valid = angleBiasVarianceRandomWalk_valid;
+  sensor_prop_req.angleRandomWalkSpectralDensity = angleBiasVarianceRandomWalk;
+
+  sensor_prop_req.rateRandomWalkSpectralDensity_valid = rateBiasVarianceRandomWalk_valid;
+  sensor_prop_req.rateRandomWalkSpectralDensity = rateBiasVarianceRandomWalk;
+
+  sensor_prop_req.velocityRandomWalkSpectralDensity_valid = velocityBiasVarianceRandomWalk_valid;
+  sensor_prop_req.velocityRandomWalkSpectralDensity = velocityBiasVarianceRandomWalk;
+
+  req_union.pSetSensorPropertiesReq = &sensor_prop_req;
+
+  result = loc_sync_send_req(clientHandle,
+                             QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02,
+                             &sensor_prop_ind);
+
+  if(result != eLOC_CLIENT_SUCCESS ||
+     eQMI_LOC_SUCCESS_V02 != sensor_prop_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: Error status = %s, ind..status = %s ",
+              __func__, __LINE__,
+              loc_get_v02_client_status_name(result),
+              loc_get_v02_qmi_status_name(sensor_prop_ind.status));
+  }
+
+  return convertErr(result);
+}
+
+/* set the Sensor Performance Config */
+enum loc_api_adapter_err LocApiV02 :: setSensorPerfControlConfig(int controlMode,
+                                                                        int accelSamplesPerBatch, int accelBatchesPerSec,
+                                                                        int gyroSamplesPerBatch, int gyroBatchesPerSec,
+                                                                        int accelSamplesPerBatchHigh, int accelBatchesPerSecHigh,
+                                                                        int gyroSamplesPerBatchHigh, int gyroBatchesPerSecHigh,
+                                                                        int algorithmConfig)
+{
+  locClientStatusEnumType result = eLOC_CLIENT_SUCCESS;
+  locClientReqUnionType req_union;
+
+  qmiLocSetSensorPerformanceControlConfigReqMsgT_v02 sensor_perf_config_req;
+  qmiLocSetSensorPerformanceControlConfigIndMsgT_v02 sensor_perf_config_ind;
+
+  LOC_LOGD("%s:%d]: Sensor Perf Control Config (performanceControlMode)(%u) "
+                "accel(#smp,#batches) (%u,%u) gyro(#smp,#batches) (%u,%u) "
+                "accel_high(#smp,#batches) (%u,%u) gyro_high(#smp,#batches) (%u,%u) "
+                "algorithmConfig(%u)\n",
+                __FUNCTION__,
+                __LINE__,
+                controlMode,
+                accelSamplesPerBatch,
+                accelBatchesPerSec,
+                gyroSamplesPerBatch,
+                gyroBatchesPerSec,
+                accelSamplesPerBatchHigh,
+                accelBatchesPerSecHigh,
+                gyroSamplesPerBatchHigh,
+                gyroBatchesPerSecHigh,
+                algorithmConfig
+                );
+
+  memset(&sensor_perf_config_req, 0, sizeof(sensor_perf_config_req));
+  memset(&sensor_perf_config_ind, 0, sizeof(sensor_perf_config_ind));
+
+  sensor_perf_config_req.performanceControlMode_valid = 1;
+  sensor_perf_config_req.performanceControlMode = (qmiLocSensorPerformanceControlModeEnumT_v02)controlMode;
+  sensor_perf_config_req.accelSamplingSpec_valid = 1;
+  sensor_perf_config_req.accelSamplingSpec.batchesPerSecond = accelBatchesPerSec;
+  sensor_perf_config_req.accelSamplingSpec.samplesPerBatch = accelSamplesPerBatch;
+  sensor_perf_config_req.gyroSamplingSpec_valid = 1;
+  sensor_perf_config_req.gyroSamplingSpec.batchesPerSecond = gyroBatchesPerSec;
+  sensor_perf_config_req.gyroSamplingSpec.samplesPerBatch = gyroSamplesPerBatch;
+  sensor_perf_config_req.accelSamplingSpecHigh_valid = 1;
+  sensor_perf_config_req.accelSamplingSpecHigh.batchesPerSecond = accelBatchesPerSecHigh;
+  sensor_perf_config_req.accelSamplingSpecHigh.samplesPerBatch = accelSamplesPerBatchHigh;
+  sensor_perf_config_req.gyroSamplingSpecHigh_valid = 1;
+  sensor_perf_config_req.gyroSamplingSpecHigh.batchesPerSecond = gyroBatchesPerSecHigh;
+  sensor_perf_config_req.gyroSamplingSpecHigh.samplesPerBatch = gyroSamplesPerBatchHigh;
+  sensor_perf_config_req.algorithmConfig_valid = 1;
+  sensor_perf_config_req.algorithmConfig = algorithmConfig;
+
+  req_union.pSetSensorPerformanceControlConfigReq = &sensor_perf_config_req;
+
+  result = loc_sync_send_req(clientHandle,
+                             QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02,
+                             &sensor_perf_config_ind);
+
+  if(result != eLOC_CLIENT_SUCCESS ||
+     eQMI_LOC_SUCCESS_V02 != sensor_perf_config_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: Error status = %s, ind..status = %s ",
+              __func__, __LINE__,
+              loc_get_v02_client_status_name(result),
+              loc_get_v02_qmi_status_name(sensor_perf_config_ind.status));
+  }
+
+  return convertErr(result);
+}
+
+/* set the External Power Config */
+enum loc_api_adapter_err LocApiV02 :: setExtPowerConfig(int isBatteryCharging)
+{
+  locClientStatusEnumType result = eLOC_CLIENT_SUCCESS;
+  locClientReqUnionType req_union;
+
+  qmiLocSetExternalPowerConfigReqMsgT_v02 ext_pwr_req;
+  qmiLocGetExternalPowerConfigIndMsgT_v02 ext_pwr_ind;
+
+  LOC_LOGI("%s:%d]: Ext Pwr Config (isBatteryCharging)(%u)",
+                __FUNCTION__,
+                __LINE__,
+                isBatteryCharging
+                );
+
+  memset(&ext_pwr_req, 0, sizeof(ext_pwr_req));
+  memset(&ext_pwr_ind, 0, sizeof(ext_pwr_ind));
+
+  switch(isBatteryCharging)
+  {
+    /* Charging */
+    case 1:
+      ext_pwr_req.externalPowerState = eQMI_LOC_EXTERNAL_POWER_CONNECTED_V02;
+      break;
+
+    /* Not charging */
+    case 0:
+      ext_pwr_req.externalPowerState = eQMI_LOC_EXTERNAL_POWER_NOT_CONNECTED_V02;
+      break;
+
+    default:
+      LOC_LOGE("%s:%d]: Invalid ext power state = %d!",
+                    __FUNCTION__,
+                    __LINE__,
+                    isBatteryCharging);
+      return LOC_API_ADAPTER_ERR_INVALID_PARAMETER;
+      break;
+  }
+
+  req_union.pSetExternalPowerConfigReq = &ext_pwr_req;
+
+  result = loc_sync_send_req(clientHandle,
+                             QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02,
+                             &ext_pwr_ind);
+
+  if(result != eLOC_CLIENT_SUCCESS ||
+     eQMI_LOC_SUCCESS_V02 != ext_pwr_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: Error status = %d, ind..status = %d ",
+                    __func__, __LINE__, result, ext_pwr_ind.status);
+  }
+
+  return convertErr(result);
+}
+
+/* set the Positioning Protocol on A-GLONASS system */
+enum loc_api_adapter_err LocApiV02 :: setAGLONASSProtocol(unsigned long aGlonassProtocol)
+{
+  locClientStatusEnumType result = eLOC_CLIENT_SUCCESS;
+  locClientReqUnionType req_union;
+  qmiLocSetProtocolConfigParametersReqMsgT_v02 aGlonassProtocol_req;
+  qmiLocSetProtocolConfigParametersIndMsgT_v02 aGlonassProtocol_ind;
+
+  memset(&aGlonassProtocol_req, 0, sizeof(aGlonassProtocol_req));
+  memset(&aGlonassProtocol_ind, 0, sizeof(aGlonassProtocol_ind));
+
+  aGlonassProtocol_req.assistedGlonassProtocolMask_valid = 1;
+  aGlonassProtocol_req.assistedGlonassProtocolMask = aGlonassProtocol;
+
+  req_union.pSetProtocolConfigParametersReq = &aGlonassProtocol_req;
+
+  LOC_LOGD("%s:%d]: aGlonassProtocolMask = 0x%x\n",  __func__, __LINE__,
+                             aGlonassProtocol_req.assistedGlonassProtocolMask);
+
+  result = loc_sync_send_req(clientHandle,
+                             QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02,
+                             req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                             QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02,
+                             &aGlonassProtocol_ind);
+
+  if(result != eLOC_CLIENT_SUCCESS ||
+     eQMI_LOC_SUCCESS_V02 != aGlonassProtocol_ind.status)
+  {
+    LOC_LOGE ("%s:%d]: Error status = %s, ind..status = %s ",
+              __func__, __LINE__,
+              loc_get_v02_client_status_name(result),
+              loc_get_v02_qmi_status_name(aGlonassProtocol_ind.status));
+  }
+
+  return convertErr(result);
+}
+
+/* Convert event mask from loc eng to loc_api_v02 format */
+locClientEventMaskType LocApiV02 :: convertMask(
+  LOC_API_ADAPTER_EVENT_MASK_T mask)
+{
+  locClientEventMaskType eventMask = 0;
+  LOC_LOGD("%s:%d]: adapter mask = %u\n", __func__, __LINE__, mask);
+
+  if (mask & LOC_API_ADAPTER_BIT_PARSED_POSITION_REPORT)
+      eventMask |= QMI_LOC_EVENT_MASK_POSITION_REPORT_V02;
+
+  if (mask & LOC_API_ADAPTER_BIT_SATELLITE_REPORT)
+      eventMask |= QMI_LOC_EVENT_MASK_GNSS_SV_INFO_V02;
+
+  /* treat NMEA_1Hz and NMEA_POSITION_REPORT the same*/
+  if ((mask & LOC_API_ADAPTER_BIT_NMEA_POSITION_REPORT) ||
+      (mask & LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT) )
+      eventMask |= QMI_LOC_EVENT_MASK_NMEA_V02;
+
+  if (mask & LOC_API_ADAPTER_BIT_NI_NOTIFY_VERIFY_REQUEST)
+      eventMask |= QMI_LOC_EVENT_MASK_NI_NOTIFY_VERIFY_REQ_V02;
+
+  if (mask & LOC_API_ADAPTER_BIT_ASSISTANCE_DATA_REQUEST)
+  {
+    // TBD: This needs to be decoupled in the HAL
+    eventMask |= QMI_LOC_EVENT_MASK_INJECT_PREDICTED_ORBITS_REQ_V02;
+    eventMask |= QMI_LOC_EVENT_MASK_INJECT_TIME_REQ_V02;
+    eventMask |= QMI_LOC_EVENT_MASK_INJECT_POSITION_REQ_V02;
+  }
+
+  if (mask & LOC_API_ADAPTER_BIT_STATUS_REPORT)
+  {
+      eventMask |= (QMI_LOC_EVENT_MASK_ENGINE_STATE_V02);
+  }
+
+  if (mask & LOC_API_ADAPTER_BIT_LOCATION_SERVER_REQUEST)
+      eventMask |= QMI_LOC_EVENT_MASK_LOCATION_SERVER_CONNECTION_REQ_V02;
+
+  if (mask & LOC_API_ADAPTER_REQUEST_WIFI)
+      eventMask |= QMI_LOC_EVENT_MASK_WIFI_REQ_V02;
+
+  if (mask & LOC_API_ADAPTER_SENSOR_STATUS)
+      eventMask |= QMI_LOC_EVENT_MASK_SENSOR_STREAMING_READY_STATUS_V02;
+
+  if (mask & LOC_API_ADAPTER_REQUEST_TIME_SYNC)
+      eventMask |= QMI_LOC_EVENT_MASK_TIME_SYNC_REQ_V02;
+
+  if (mask & LOC_API_ADAPTER_REPORT_SPI)
+      eventMask |= QMI_LOC_EVENT_MASK_SET_SPI_STREAMING_REPORT_V02;
+
+  if (mask & LOC_API_ADAPTER_REPORT_NI_GEOFENCE)
+      eventMask |= QMI_LOC_EVENT_MASK_NI_GEOFENCE_NOTIFICATION_V02;
+
+  if (mask & LOC_API_ADAPTER_GEOFENCE_GEN_ALERT)
+      eventMask |= QMI_LOC_EVENT_MASK_GEOFENCE_GEN_ALERT_V02;
+
+  if (mask & LOC_API_ADAPTER_REPORT_GENFENCE_BREACH)
+      eventMask |= QMI_LOC_EVENT_MASK_GEOFENCE_BREACH_NOTIFICATION_V02;
+
+  if (mask & LOC_API_ADAPTER_BATCHED_GENFENCE_BREACH_REPORT)
+      eventMask |= QMI_LOC_EVENT_MASK_GEOFENCE_BATCH_BREACH_NOTIFICATION_V02;
+
+  if (mask & LOC_API_ADAPTER_PEDOMETER_CTRL)
+      eventMask |= QMI_LOC_EVENT_MASK_PEDOMETER_CONTROL_V02;
+
+  if (mask & LOC_API_ADAPTER_MOTION_CTRL)
+      eventMask |= QMI_LOC_EVENT_MASK_MOTION_DATA_CONTROL_V02;
+
+  if (mask & LOC_API_ADAPTER_REQUEST_WIFI_AP_DATA)
+      eventMask |= QMI_LOC_EVENT_MASK_INJECT_WIFI_AP_DATA_REQ_V02;
+
+  if(mask & LOC_API_ADAPTER_BIT_BATCH_FULL)
+      eventMask |= QMI_LOC_EVENT_MASK_BATCH_FULL_NOTIFICATION_V02;
+
+  if(mask & LOC_API_ADAPTER_BIT_BATCHED_POSITION_REPORT)
+      eventMask |= QMI_LOC_EVENT_MASK_LIVE_BATCHED_POSITION_REPORT_V02;
+
+  // for GDT
+  if(mask & LOC_API_ADAPTER_BIT_GDT_UPLOAD_BEGIN_REQ)
+      eventMask |= QMI_LOC_EVENT_MASK_GDT_UPLOAD_BEGIN_REQ_V02;
+
+  if(mask & LOC_API_ADAPTER_BIT_GDT_UPLOAD_END_REQ)
+      eventMask |= QMI_LOC_EVENT_MASK_GDT_UPLOAD_END_REQ_V02;
+
+  if (mask & LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT)
+      eventMask |= QMI_LOC_EVENT_MASK_GNSS_MEASUREMENT_REPORT_V02;
+
+  return eventMask;
+}
+
+qmiLocLockEnumT_v02 LocApiV02 :: convertGpsLockMask(LOC_GPS_LOCK_MASK lockMask)
+{
+    if (isGpsLockAll(lockMask))
+        return eQMI_LOC_LOCK_ALL_V02;
+    if (isGpsLockMO(lockMask))
+        return eQMI_LOC_LOCK_MI_V02;
+    if (isGpsLockMT(lockMask))
+        return eQMI_LOC_LOCK_MT_V02;
+    if (isGpsLockNone(lockMask))
+        return eQMI_LOC_LOCK_NONE_V02;
+    return (qmiLocLockEnumT_v02)lockMask;
+}
+
+/* Convert error from loc_api_v02 to loc eng format*/
+enum loc_api_adapter_err LocApiV02 :: convertErr(
+  locClientStatusEnumType status)
+{
+  switch( status)
+  {
+    case eLOC_CLIENT_SUCCESS:
+      return LOC_API_ADAPTER_ERR_SUCCESS;
+
+    case eLOC_CLIENT_FAILURE_GENERAL:
+      return LOC_API_ADAPTER_ERR_GENERAL_FAILURE;
+
+    case eLOC_CLIENT_FAILURE_UNSUPPORTED:
+      return LOC_API_ADAPTER_ERR_UNSUPPORTED;
+
+    case eLOC_CLIENT_FAILURE_INVALID_PARAMETER:
+      return LOC_API_ADAPTER_ERR_INVALID_PARAMETER;
+
+    case eLOC_CLIENT_FAILURE_ENGINE_BUSY:
+      return LOC_API_ADAPTER_ERR_ENGINE_BUSY;
+
+    case eLOC_CLIENT_FAILURE_PHONE_OFFLINE:
+      return LOC_API_ADAPTER_ERR_PHONE_OFFLINE;
+
+    case eLOC_CLIENT_FAILURE_TIMEOUT:
+      return LOC_API_ADAPTER_ERR_TIMEOUT;
+
+    case eLOC_CLIENT_FAILURE_INVALID_HANDLE:
+      return LOC_API_ADAPTER_ERR_INVALID_HANDLE;
+
+    case eLOC_CLIENT_FAILURE_SERVICE_NOT_PRESENT:
+      return LOC_API_ADAPTER_ERR_SERVICE_NOT_PRESENT;
+
+    case eLOC_CLIENT_FAILURE_INTERNAL:
+      return LOC_API_ADAPTER_ERR_INTERNAL;
+
+    default:
+      return LOC_API_ADAPTER_ERR_FAILURE;
+  }
+}
+
+/* convert position report to loc eng format and send the converted
+   position to loc eng */
+
+void LocApiV02 :: reportPosition (
+  const qmiLocEventPositionReportIndMsgT_v02 *location_report_ptr)
+{
+    UlpLocation location;
+    LocPosTechMask tech_Mask = LOC_POS_TECH_MASK_DEFAULT;
+    LOC_LOGD("Reporting postion from V2 Adapter\n");
+    memset(&location, 0, sizeof (UlpLocation));
+    location.size = sizeof(location);
+    GpsLocationExtended locationExtended;
+    memset(&locationExtended, 0, sizeof (GpsLocationExtended));
+    locationExtended.size = sizeof(locationExtended);
+    // Process the position from final and intermediate reports
+
+    if( (location_report_ptr->sessionStatus == eQMI_LOC_SESS_STATUS_SUCCESS_V02) ||
+        (location_report_ptr->sessionStatus == eQMI_LOC_SESS_STATUS_IN_PROGRESS_V02)
+        )
+    {
+        // Latitude & Longitude
+        if( (location_report_ptr->latitude_valid == 1 ) &&
+            (location_report_ptr->longitude_valid == 1)  &&
+            (location_report_ptr->latitude != 0 ||
+             location_report_ptr->longitude!= 0))
+        {
+            location.gpsLocation.flags  |= GPS_LOCATION_HAS_LAT_LONG;
+            location.gpsLocation.latitude  = location_report_ptr->latitude;
+            location.gpsLocation.longitude = location_report_ptr->longitude;
+
+            // Time stamp (UTC)
+            if(location_report_ptr->timestampUtc_valid == 1)
+            {
+                location.gpsLocation.timestamp = location_report_ptr->timestampUtc;
+            }
+
+            // Altitude
+            if(location_report_ptr->altitudeWrtEllipsoid_valid == 1  )
+            {
+                location.gpsLocation.flags  |= GPS_LOCATION_HAS_ALTITUDE;
+                location.gpsLocation.altitude = location_report_ptr->altitudeWrtEllipsoid;
+            }
+
+            // Speed
+            if((location_report_ptr->speedHorizontal_valid == 1) &&
+               (location_report_ptr->speedVertical_valid ==1 ) )
+            {
+                location.gpsLocation.flags  |= GPS_LOCATION_HAS_SPEED;
+                location.gpsLocation.speed = sqrt(
+                    (location_report_ptr->speedHorizontal *
+                     location_report_ptr->speedHorizontal) +
+                    (location_report_ptr->speedVertical *
+                     location_report_ptr->speedVertical) );
+            }
+
+            // Heading
+            if(location_report_ptr->heading_valid == 1)
+            {
+                location.gpsLocation.flags  |= GPS_LOCATION_HAS_BEARING;
+                location.gpsLocation.bearing = location_report_ptr->heading;
+            }
+
+            // Uncertainty (circular)
+            if (location_report_ptr->horUncCircular_valid) {
+                location.gpsLocation.flags |= GPS_LOCATION_HAS_ACCURACY;
+                location.gpsLocation.accuracy = location_report_ptr->horUncCircular;
+            } else if (location_report_ptr->horUncEllipseSemiMinor_valid &&
+                       location_report_ptr->horUncEllipseSemiMajor_valid) {
+                location.gpsLocation.flags |= GPS_LOCATION_HAS_ACCURACY;
+                location.gpsLocation.accuracy =
+                    sqrt((location_report_ptr->horUncEllipseSemiMinor *
+                          location_report_ptr->horUncEllipseSemiMinor) +
+                         (location_report_ptr->horUncEllipseSemiMajor *
+                          location_report_ptr->horUncEllipseSemiMajor));
+            }
+
+            // Technology Mask
+            tech_Mask |= location_report_ptr->technologyMask;
+
+            //Mark the location source as from GNSS
+            location.gpsLocation.flags |= LOCATION_HAS_SOURCE_INFO;
+            location.position_source = ULP_LOCATION_IS_FROM_GNSS;
+            if (location_report_ptr->magneticDeviation_valid)
+            {
+                locationExtended.flags |= GPS_LOCATION_EXTENDED_HAS_MAG_DEV;
+                locationExtended.magneticDeviation = location_report_ptr->magneticDeviation;
+            }
+
+            if (location_report_ptr->DOP_valid)
+            {
+                locationExtended.flags |= GPS_LOCATION_EXTENDED_HAS_DOP;
+                locationExtended.pdop = location_report_ptr->DOP.PDOP;
+                locationExtended.hdop = location_report_ptr->DOP.HDOP;
+                locationExtended.vdop = location_report_ptr->DOP.VDOP;
+            }
+
+            if (location_report_ptr->altitudeWrtMeanSeaLevel_valid)
+            {
+                locationExtended.flags |= GPS_LOCATION_EXTENDED_HAS_ALTITUDE_MEAN_SEA_LEVEL;
+                locationExtended.altitudeMeanSeaLevel = location_report_ptr->altitudeWrtMeanSeaLevel;
+            }
+
+            if (location_report_ptr->vertUnc_valid)
+            {
+               locationExtended.flags |= GPS_LOCATION_EXTENDED_HAS_VERT_UNC;
+               locationExtended.vert_unc = location_report_ptr->vertUnc;
+            }
+
+            if (location_report_ptr->speedUnc_valid )
+            {
+               locationExtended.flags |= GPS_LOCATION_EXTENDED_HAS_SPEED_UNC;
+               locationExtended.speed_unc = location_report_ptr->speedUnc;
+            }
+
+            LocApiBase::reportPosition( location,
+                            locationExtended,
+                            (void*)location_report_ptr,
+                            (location_report_ptr->sessionStatus
+                             == eQMI_LOC_SESS_STATUS_IN_PROGRESS_V02 ?
+                             LOC_SESS_INTERMEDIATE : LOC_SESS_SUCCESS),
+                            tech_Mask);
+        }
+    }
+    else
+    {
+        LocApiBase::reportPosition(location,
+                                   locationExtended,
+                                   NULL,
+                                   LOC_SESS_FAILURE);
+
+        LOC_LOGD("%s:%d]: Ignoring position report with sess status = %d, "
+                      "fix id = %u\n", __func__, __LINE__,
+                      location_report_ptr->sessionStatus,
+                      location_report_ptr->fixId );
+    }
+}
+
+/* convert satellite report to loc eng format and  send the converted
+   report to loc eng */
+void  LocApiV02 :: reportSv (
+  const qmiLocEventGnssSvInfoIndMsgT_v02 *gnss_report_ptr)
+{
+  GpsSvStatus      SvStatus;
+  GpsLocationExtended locationExtended;
+  int              num_svs_max, i;
+  const qmiLocSvInfoStructT_v02 *sv_info_ptr;
+
+  LOC_LOGV ("%s:%d]: num of sv = %d, validity = %d, altitude assumed = %u \n",
+            __func__, __LINE__, gnss_report_ptr->svList_len,
+            gnss_report_ptr->svList_valid,
+            gnss_report_ptr->altitudeAssumed);
+
+  num_svs_max = 0;
+  memset (&SvStatus, 0, sizeof (GpsSvStatus));
+  memset(&locationExtended, 0, sizeof (GpsLocationExtended));
+  locationExtended.size = sizeof(locationExtended);
+  if(gnss_report_ptr->svList_valid == 1)
+  {
+    num_svs_max = gnss_report_ptr->svList_len;
+    if(num_svs_max > GPS_MAX_SVS)
+    {
+      num_svs_max = GPS_MAX_SVS;
+    }
+    SvStatus.num_svs = 0;
+    for(i = 0; i < num_svs_max; i++)
+    {
+      sv_info_ptr = &(gnss_report_ptr->svList[i]);
+      if((sv_info_ptr->validMask & QMI_LOC_SV_INFO_MASK_VALID_SYSTEM_V02) &&
+         (sv_info_ptr->validMask & QMI_LOC_SV_INFO_MASK_VALID_GNSS_SVID_V02)
+         && (sv_info_ptr->gnssSvId != 0 ))
+      {
+        if(sv_info_ptr->system == eQMI_LOC_SV_SYSTEM_GPS_V02)
+        {
+          SvStatus.sv_list[SvStatus.num_svs].size = sizeof(GpsSvStatus);
+          SvStatus.sv_list[SvStatus.num_svs].prn = (int)sv_info_ptr->gnssSvId;
+
+          // We only have the data field to report gps eph and alm mask
+          if(sv_info_ptr->validMask &
+             QMI_LOC_SV_INFO_MASK_VALID_SVINFO_MASK_V02)
+          {
+            if(sv_info_ptr->svInfoMask &
+               QMI_LOC_SVINFO_MASK_HAS_EPHEMERIS_V02)
+            {
+              SvStatus.ephemeris_mask |= (1 << (sv_info_ptr->gnssSvId-1));
+            }
+            if(sv_info_ptr->svInfoMask &
+               QMI_LOC_SVINFO_MASK_HAS_ALMANAC_V02)
+            {
+              SvStatus.almanac_mask |= (1 << (sv_info_ptr->gnssSvId-1));
+            }
+          }
+
+          if((sv_info_ptr->validMask &
+              QMI_LOC_SV_INFO_MASK_VALID_PROCESS_STATUS_V02)
+             &&
+             (sv_info_ptr->svStatus == eQMI_LOC_SV_STATUS_TRACK_V02))
+          {
+            SvStatus.used_in_fix_mask |= (1 << (sv_info_ptr->gnssSvId-1));
+          }
+        }
+        // SBAS: GPS PRN: 120-151,
+        // In exteneded measurement report, we follow nmea standard,
+        // which is from 33-64.
+        else if(sv_info_ptr->system == eQMI_LOC_SV_SYSTEM_SBAS_V02)
+        {
+          SvStatus.sv_list[SvStatus.num_svs].prn =
+            sv_info_ptr->gnssSvId + 33 - 120;
+        }
+        // Gloness: Slot id: 1-32
+        // In extended measurement report, we follow nmea standard,
+        // which is 65-96
+        else if(sv_info_ptr->system == eQMI_LOC_SV_SYSTEM_GLONASS_V02)
+        {
+          SvStatus.sv_list[SvStatus.num_svs].prn =
+            sv_info_ptr->gnssSvId + (65-1);
+        }
+        //BeiDou: Slot id: 1-37
+        //In extended measurement report, we follow nmea standard,
+        //which is 201-237
+        else if(sv_info_ptr->system == eQMI_LOC_SV_SYSTEM_BDS_V02)
+        {
+            SvStatus.sv_list[SvStatus.num_svs].prn =
+                sv_info_ptr->gnssSvId;
+        }
+        // Unsupported SV system
+        else
+        {
+          continue;
+        }
+      }
+
+      if(sv_info_ptr->validMask & QMI_LOC_SV_INFO_MASK_VALID_SNR_V02 )
+      {
+        SvStatus.sv_list[SvStatus.num_svs].snr = sv_info_ptr->snr;
+      }
+
+      if(sv_info_ptr->validMask & QMI_LOC_SV_INFO_MASK_VALID_ELEVATION_V02)
+      {
+        SvStatus.sv_list[SvStatus.num_svs].elevation = sv_info_ptr->elevation;
+      }
+
+      if(sv_info_ptr->validMask & QMI_LOC_SV_INFO_MASK_VALID_AZIMUTH_V02)
+      {
+        SvStatus.sv_list[SvStatus.num_svs].azimuth = sv_info_ptr->azimuth;
+      }
+
+      SvStatus.num_svs++;
+    }
+  }
+
+  if (SvStatus.num_svs >= 0)
+  {
+    LOC_LOGV ("%s:%d]: firing SV callback\n", __func__, __LINE__);
+    LocApiBase::reportSv(SvStatus,
+                         locationExtended,
+                         (void*)gnss_report_ptr);
+  }
+}
+
+/* convert engine state report to loc eng format and send the converted
+   report to loc eng */
+void LocApiV02 :: reportEngineState (
+    const qmiLocEventEngineStateIndMsgT_v02 *engine_state_ptr)
+{
+
+  LOC_LOGV("%s:%d]: state = %d\n", __func__, __LINE__,
+                 engine_state_ptr->engineState);
+
+  struct MsgUpdateEngineState : public LocMsg {
+      LocApiV02* mpLocApiV02;
+      bool mEngineOn;
+      inline MsgUpdateEngineState(LocApiV02* pLocApiV02, bool engineOn) :
+                 LocMsg(), mpLocApiV02(pLocApiV02), mEngineOn(engineOn) {}
+      inline virtual void proc() const {
+          // If EngineOn is true and InSession is false and Engine is just turned off,
+          // then unregister the gps tracking specific event masks
+          if (mpLocApiV02->mEngineOn && !mpLocApiV02->mInSession && !mEngineOn) {
+              mpLocApiV02->registerEventMask(mpLocApiV02->mQmiMask);
+          }
+          mpLocApiV02->mEngineOn = mEngineOn;
+      }
+  };
+
+  if (engine_state_ptr->engineState == eQMI_LOC_ENGINE_STATE_ON_V02)
+  {
+    sendMsg(new MsgUpdateEngineState(this, true));
+    reportStatus(GPS_STATUS_ENGINE_ON);
+    reportStatus(GPS_STATUS_SESSION_BEGIN);
+  }
+  else if (engine_state_ptr->engineState == eQMI_LOC_ENGINE_STATE_OFF_V02)
+  {
+    sendMsg(new MsgUpdateEngineState(this, false));
+    reportStatus(GPS_STATUS_SESSION_END);
+    reportStatus(GPS_STATUS_ENGINE_OFF);
+  }
+  else
+  {
+    reportStatus(GPS_STATUS_NONE);
+  }
+
+}
+
+/* convert fix session state report to loc eng format and send the converted
+   report to loc eng */
+void LocApiV02 :: reportFixSessionState (
+    const qmiLocEventFixSessionStateIndMsgT_v02 *fix_session_state_ptr)
+{
+  GpsStatusValue status;
+  LOC_LOGD("%s:%d]: state = %d\n", __func__, __LINE__,
+                fix_session_state_ptr->sessionState);
+
+  status = GPS_STATUS_NONE;
+  if (fix_session_state_ptr->sessionState == eQMI_LOC_FIX_SESSION_STARTED_V02)
+  {
+    status = GPS_STATUS_SESSION_BEGIN;
+  }
+  else if (fix_session_state_ptr->sessionState
+           == eQMI_LOC_FIX_SESSION_FINISHED_V02)
+  {
+    status = GPS_STATUS_SESSION_END;
+  }
+  reportStatus(status);
+}
+
+/* convert NMEA report to loc eng format and send the converted
+   report to loc eng */
+void LocApiV02 :: reportNmea (
+  const qmiLocEventNmeaIndMsgT_v02 *nmea_report_ptr)
+{
+
+  LocApiBase::reportNmea(nmea_report_ptr->nmea,
+                         strlen(nmea_report_ptr->nmea));
+
+  LOC_LOGD("NMEA <%s", nmea_report_ptr->nmea);
+}
+
+/* convert and report an ATL request to loc engine */
+void LocApiV02 :: reportAtlRequest(
+  const qmiLocEventLocationServerConnectionReqIndMsgT_v02 * server_request_ptr)
+{
+  uint32_t connHandle = server_request_ptr->connHandle;
+  // service ATL open request; copy the WWAN type
+  if(server_request_ptr->requestType == eQMI_LOC_SERVER_REQUEST_OPEN_V02 )
+  {
+    AGpsType agpsType;
+    switch(server_request_ptr->wwanType)
+    {
+    case eQMI_LOC_WWAN_TYPE_INTERNET_V02:
+      agpsType = AGPS_TYPE_WWAN_ANY;
+      requestATL(connHandle, agpsType);
+      break;
+    case eQMI_LOC_WWAN_TYPE_AGNSS_V02:
+      agpsType = AGPS_TYPE_SUPL;
+      requestATL(connHandle, agpsType);
+      break;
+    case eQMI_LOC_WWAN_TYPE_AGNSS_EMERGENCY_V02:
+      requestSuplES(connHandle);
+      break;
+    default:
+      agpsType = AGPS_TYPE_WWAN_ANY;
+      requestATL(connHandle, agpsType);
+      break;
+    }
+  }
+  // service the ATL close request
+  else if (server_request_ptr->requestType == eQMI_LOC_SERVER_REQUEST_CLOSE_V02)
+  {
+    releaseATL(connHandle);
+  }
+}
+
+/* conver the NI report to loc eng format and send t loc engine */
+void LocApiV02 :: reportNiRequest(
+    const qmiLocEventNiNotifyVerifyReqIndMsgT_v02 *ni_req_ptr)
+{
+  GpsNiNotification notif;
+
+  /* initialize the notification*/
+  memset(notif.extras, 0, sizeof notif.extras);
+  memset(notif.text, 0, sizeof notif.text);
+  memset(notif.requestor_id, 0, sizeof notif.requestor_id);
+
+  /* NI timeout gets overwritten in LocApiEngAdapter,
+     initializing to 0 here */
+  notif.timeout     = 0;
+
+  notif.text_encoding = GPS_ENC_NONE ;
+
+  notif.requestor_id_encoding = GPS_ENC_UNKNOWN;
+
+  notif.notify_flags       = 0;
+
+  notif.default_response   = GPS_NI_RESPONSE_NORESP;
+
+  /*Handle Vx request */
+  if(ni_req_ptr->NiVxInd_valid == 1)
+  {
+     const qmiLocNiVxNotifyVerifyStructT_v02 *vx_req = &(ni_req_ptr->NiVxInd);
+
+     notif.ni_type     = GPS_NI_TYPE_VOICE;
+
+     // Requestor ID, the requestor id recieved is NULL terminated
+     hexcode(notif.requestor_id, sizeof notif.requestor_id,
+             (char *)vx_req->requestorId, vx_req->requestorId_len );
+  }
+
+  /* Handle UMTS CP request*/
+  else if(ni_req_ptr->NiUmtsCpInd_valid == 1)
+  {
+    const qmiLocNiUmtsCpNotifyVerifyStructT_v02 *umts_cp_req =
+       &ni_req_ptr->NiUmtsCpInd;
+
+    notif.ni_type     = GPS_NI_TYPE_UMTS_CTRL_PLANE;
+
+    /* notificationText should always be a NULL terminated string */
+    hexcode(notif.text, sizeof notif.text,
+            (char *)umts_cp_req->notificationText,
+            umts_cp_req->notificationText_len);
+
+    /* Store requestor ID */
+    hexcode(notif.requestor_id, sizeof(notif.requestor_id),
+            (char *)umts_cp_req->requestorId.codedString,
+            umts_cp_req->requestorId.codedString_len);
+
+   /* convert encodings */
+    notif.text_encoding = convertNiEncoding(umts_cp_req->dataCodingScheme);
+
+    notif.requestor_id_encoding =
+      convertNiEncoding(umts_cp_req->requestorId.dataCodingScheme);
+
+    /* LCS address (using extras field) */
+    if ( umts_cp_req->clientAddress_len != 0)
+    {
+      char lcs_addr[32]; // Decoded LCS address for UMTS CP NI
+
+      // Copy LCS Address into notif.extras in the format: Address = 012345
+      strlcat(notif.extras, LOC_NI_NOTIF_KEY_ADDRESS, sizeof (notif.extras));
+      strlcat(notif.extras, " = ", sizeof notif.extras);
+      int addr_len = 0;
+      const char *address_source = NULL;
+      address_source = (char *)umts_cp_req->clientAddress;
+      // client Address is always NULL terminated
+      addr_len = decodeAddress(lcs_addr, sizeof(lcs_addr), address_source,
+                               umts_cp_req->clientAddress_len);
+
+      // The address is ASCII string
+      if (addr_len)
+      {
+        strlcat(notif.extras, lcs_addr, sizeof notif.extras);
+      }
+    }
+
+  }
+  else if(ni_req_ptr->NiSuplInd_valid == 1)
+  {
+    const qmiLocNiSuplNotifyVerifyStructT_v02 *supl_req =
+      &ni_req_ptr->NiSuplInd;
+
+    notif.ni_type     = GPS_NI_TYPE_UMTS_SUPL;
+
+    // Client name
+    if (supl_req->valid_flags & QMI_LOC_SUPL_CLIENT_NAME_MASK_V02)
+    {
+      hexcode(notif.text, sizeof(notif.text),
+              (char *)supl_req->clientName.formattedString,
+              supl_req->clientName.formattedString_len);
+      LOC_LOGV("%s:%d]: SUPL NI: client_name: %s \n", __func__, __LINE__,
+          notif.text);
+    }
+    else
+    {
+      LOC_LOGV("%s:%d]: SUPL NI: client_name not present.",
+          __func__, __LINE__);
+    }
+
+    // Requestor ID
+    if (supl_req->valid_flags & QMI_LOC_SUPL_REQUESTOR_ID_MASK_V02)
+    {
+      hexcode(notif.requestor_id, sizeof notif.requestor_id,
+              (char*)supl_req->requestorId.formattedString,
+              supl_req->requestorId.formattedString_len );
+
+      LOC_LOGV("%s:%d]: SUPL NI: requestor_id: %s \n", __func__, __LINE__,
+          notif.requestor_id);
+    }
+    else
+    {
+      LOC_LOGV("%s:%d]: SUPL NI: requestor_id not present.",
+          __func__, __LINE__);
+    }
+
+    // Encoding type
+    if (supl_req->valid_flags & QMI_LOC_SUPL_DATA_CODING_SCHEME_MASK_V02)
+    {
+      notif.text_encoding = convertNiEncoding(supl_req->dataCodingScheme);
+
+      notif.requestor_id_encoding = convertNiEncoding(supl_req->dataCodingScheme);
+    }
+    else
+    {
+      notif.text_encoding = notif.requestor_id_encoding = GPS_ENC_UNKNOWN;
+    }
+
+    // ES SUPL
+    if(ni_req_ptr->suplEmergencyNotification_valid ==1)
+    {
+        const qmiLocEmergencyNotificationStructT_v02 *supl_emergency_request =
+        &ni_req_ptr->suplEmergencyNotification;
+
+        notif.ni_type = GPS_NI_TYPE_EMERGENCY_SUPL;
+    }
+
+  } //ni_req_ptr->NiSuplInd_valid == 1
+  else
+  {
+    LOC_LOGE("%s:%d]: unknown request event \n",__func__, __LINE__);
+    return;
+  }
+
+  // Set default_response & notify_flags
+  convertNiNotifyVerifyType(&notif, ni_req_ptr->notificationType);
+
+  qmiLocEventNiNotifyVerifyReqIndMsgT_v02 *ni_req_copy_ptr =
+    (qmiLocEventNiNotifyVerifyReqIndMsgT_v02 *)malloc(sizeof(*ni_req_copy_ptr));
+
+  if( NULL != ni_req_copy_ptr)
+  {
+    memcpy(ni_req_copy_ptr, ni_req_ptr, sizeof(*ni_req_copy_ptr));
+
+    requestNiNotify(notif, (const void*)ni_req_copy_ptr);
+  }
+  else
+  {
+    LOC_LOGE("%s:%d]: Error copying NI request\n", __func__, __LINE__);
+  }
+
+}
+
+/* Report the Xtra Server Url from the modem to HAL*/
+void LocApiV02 :: reportXtraServerUrl(
+                const qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02*
+                server_request_ptr)
+{
+
+  if (server_request_ptr->serverList.serverList_len == 1)
+  {
+    reportXtraServer(server_request_ptr->serverList.serverList[0].serverUrl,
+                     "",
+                     "",
+                     QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02);
+  }
+  else if (server_request_ptr->serverList.serverList_len == 2)
+  {
+    reportXtraServer(server_request_ptr->serverList.serverList[0].serverUrl,
+                     server_request_ptr->serverList.serverList[1].serverUrl,
+                     "",
+                     QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02);
+  }
+  else
+  {
+    reportXtraServer(server_request_ptr->serverList.serverList[0].serverUrl,
+                     server_request_ptr->serverList.serverList[1].serverUrl,
+                     server_request_ptr->serverList.serverList[2].serverUrl,
+                     QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02);
+  }
+
+}
+
+/* convert Ni Encoding type from QMI_LOC to loc eng format */
+GpsNiEncodingType LocApiV02 ::convertNiEncoding(
+  qmiLocNiDataCodingSchemeEnumT_v02 loc_encoding)
+{
+   GpsNiEncodingType enc = GPS_ENC_UNKNOWN;
+
+   switch (loc_encoding)
+   {
+     case eQMI_LOC_NI_SUPL_UTF8_V02:
+       enc = GPS_ENC_SUPL_UTF8;
+       break;
+     case eQMI_LOC_NI_SUPL_UCS2_V02:
+       enc = GPS_ENC_SUPL_UCS2;
+       break;
+     case eQMI_LOC_NI_SUPL_GSM_DEFAULT_V02:
+       enc = GPS_ENC_SUPL_GSM_DEFAULT;
+       break;
+     case eQMI_LOC_NI_SS_LANGUAGE_UNSPEC_V02:
+       enc = GPS_ENC_SUPL_GSM_DEFAULT; // SS_LANGUAGE_UNSPEC = GSM
+       break;
+     default:
+       break;
+   }
+
+   return enc;
+}
+
+/*convert NI notify verify type from QMI LOC to loc eng format*/
+bool LocApiV02 :: convertNiNotifyVerifyType (
+  GpsNiNotification *notif,
+  qmiLocNiNotifyVerifyEnumT_v02 notif_priv)
+{
+  switch (notif_priv)
+   {
+   case eQMI_LOC_NI_USER_NO_NOTIFY_NO_VERIFY_V02:
+      notif->notify_flags = 0;
+      break;
+
+   case eQMI_LOC_NI_USER_NOTIFY_ONLY_V02:
+      notif->notify_flags = GPS_NI_NEED_NOTIFY;
+      break;
+
+   case eQMI_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP_V02:
+      notif->notify_flags = GPS_NI_NEED_NOTIFY | GPS_NI_NEED_VERIFY;
+      notif->default_response = GPS_NI_RESPONSE_ACCEPT;
+      break;
+
+   case eQMI_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP_V02:
+      notif->notify_flags = GPS_NI_NEED_NOTIFY | GPS_NI_NEED_VERIFY;
+      notif->default_response = GPS_NI_RESPONSE_DENY;
+      break;
+
+   case eQMI_LOC_NI_USER_NOTIFY_VERIFY_PRIVACY_OVERRIDE_V02:
+      notif->notify_flags = GPS_NI_PRIVACY_OVERRIDE;
+      break;
+
+   default:
+      return false;
+   }
+
+   return true;
+}
+
+/* convert and report GNSS measurement data to loc eng */
+void LocApiV02 :: reportGnssMeasurementData(
+  const qmiLocEventGnssSvMeasInfoIndMsgT_v02& gnss_measurement_report_ptr)
+{
+    LOC_LOGV ("%s:%d]: entering\n", __func__, __LINE__);
+
+    GpsData gpsMeasurementData;
+    memset (&gpsMeasurementData, 0, sizeof(GpsData));
+
+    int svMeasurment_len = 0;
+
+    // size
+    gpsMeasurementData.size = sizeof(GpsData);
+
+    // number of measurements
+    if (gnss_measurement_report_ptr.svMeasurement_valid) {
+        svMeasurment_len =
+            gnss_measurement_report_ptr.svMeasurement_len;
+        gpsMeasurementData.measurement_count = svMeasurment_len;
+        LOC_LOGV ("%s:%d]: there are %d SV measurements\n",
+                  __func__, __LINE__, svMeasurment_len);
+    } else {
+        LOC_LOGV ("%s:%d]: there is no valid SV measurements\n",
+                  __func__, __LINE__);
+    }
+
+    if (svMeasurment_len != 0 &&
+        gnss_measurement_report_ptr.system == eQMI_LOC_SV_SYSTEM_GPS_V02) {
+
+        // the array of measurements
+        int index = 0;
+        while(svMeasurment_len > 0) {
+            convertGpsMeasurements(gpsMeasurementData.measurements[index],
+                                   gnss_measurement_report_ptr.svMeasurement[index]);
+            index++;
+            svMeasurment_len--;
+        }
+
+        // the GPS clock time reading
+        convertGpsClock(gpsMeasurementData.clock,
+                        gnss_measurement_report_ptr);
+
+        // calling the base
+        LOC_LOGV ("%s:%d]: calling LocApiBase::reportGpsMeasurementData.\n",
+                  __func__, __LINE__);
+        LocApiBase::reportGpsMeasurementData(gpsMeasurementData);
+    } else {
+        LOC_LOGV ("%s:%d]: There is no GPS measurement.\n",
+                  __func__, __LINE__);
+    }
+}
+
+/*convert GpsMeasurement type from QMI LOC to loc eng format*/
+void LocApiV02 :: convertGpsMeasurements (GpsMeasurement& gpsMeasurement,
+    const qmiLocSVMeasurementStructT_v02& gnss_measurement_info)
+{
+    LOC_LOGV ("%s:%d]: entering\n", __func__, __LINE__);
+
+    // size
+    gpsMeasurement.size = sizeof(GpsMeasurement);
+
+    // flag initiation
+    int flags = 0;
+
+    // prn
+    gpsMeasurement.prn = gnss_measurement_info.gnssSvId;
+
+    // time_offset_ns
+    gpsMeasurement.time_offset_ns = 0;
+
+    // state & received_gps_tow_ns
+    uint64_t validMask = gnss_measurement_info.measurementStatus &
+                         gnss_measurement_info.validMeasStatusMask;
+    uint64_t bitSynMask = QMI_LOC_MASK_MEAS_STATUS_BE_CONFIRM_V02 |
+                          QMI_LOC_MASK_MEAS_STATUS_SB_VALID_V02;
+
+    if (validMask & QMI_LOC_MASK_MEAS_STATUS_MS_VALID_V02) {
+        /* sub-frame decode & TOW decode */
+        gpsMeasurement.state = GPS_MEASUREMENT_STATE_SUBFRAME_SYNC |
+                                GPS_MEASUREMENT_STATE_TOW_DECODED |
+                                GPS_MEASUREMENT_STATE_BIT_SYNC |
+                                GPS_MEASUREMENT_STATE_CODE_LOCK;
+        gpsMeasurement.received_gps_tow_ns =
+            ((double)gnss_measurement_info.svTimeSpeed.svTimeMs +
+             (double)gnss_measurement_info.svTimeSpeed.svTimeSubMs) * 1e6;
+
+    } else if ((validMask & bitSynMask) == bitSynMask) {
+        /* bit sync */
+        gpsMeasurement.state = GPS_MEASUREMENT_STATE_BIT_SYNC |
+                                GPS_MEASUREMENT_STATE_CODE_LOCK;
+        gpsMeasurement.received_gps_tow_ns =
+            fmod(((double)gnss_measurement_info.svTimeSpeed.svTimeMs +
+                  (double)gnss_measurement_info.svTimeSpeed.svTimeSubMs), 20) * 1e6;
+
+    } else if (validMask & QMI_LOC_MASK_MEAS_STATUS_SM_VALID_V02) {
+        /* code lock */
+        gpsMeasurement.state = GPS_MEASUREMENT_STATE_CODE_LOCK;
+        gpsMeasurement.received_gps_tow_ns =
+             (double)gnss_measurement_info.svTimeSpeed.svTimeSubMs * 1e6;
+
+    } else {
+        /* by default */
+        gpsMeasurement.state = GPS_MEASUREMENT_STATE_UNKNOWN;
+        gpsMeasurement.received_gps_tow_ns = 0;
+    }
+
+    // c_n0_dbhz
+    gpsMeasurement.c_n0_dbhz = gnss_measurement_info.CNo/10.0;
+
+    // pseudorange_rate_mps
+    gpsMeasurement.pseudorange_rate_mps =
+        gnss_measurement_info.svTimeSpeed.dopplerShift;
+
+    // pseudorange_rate_uncertainty_mps
+    gpsMeasurement.pseudorange_rate_uncertainty_mps =
+        gnss_measurement_info.svTimeSpeed.dopplerShiftUnc;
+
+    // accumulated_delta_range_state
+    gpsMeasurement.accumulated_delta_range_state = GPS_ADR_STATE_UNKNOWN;
+
+    gpsMeasurement.flags = flags;
+
+    LOC_LOGV(" %s:%d]: GNSS measurement raw data received form modem: \n"
+             " Input => gnssSvId | CNo "
+             "| measurementStatus | dopplerShift |"
+             " dopplerShiftUnc| svTimeMs | svTimeSubMs"
+             " | validMeasStatusMask | \n"
+             " Input => %d | %d | 0x%04x%04x | %f | %f | %u | %f | 0x%04x%04x |\n",
+             __func__, __LINE__,
+             gnss_measurement_info.gnssSvId,                                    // %d
+             gnss_measurement_info.CNo,                                         // %d
+             (uint32_t)(gnss_measurement_info.measurementStatus >> 32),         // %04x Upper 32
+             (uint32_t)(gnss_measurement_info.measurementStatus & 0xFFFFFFFF),  // %04x Lower 32
+             gnss_measurement_info.svTimeSpeed.dopplerShift,                    // %f
+             gnss_measurement_info.svTimeSpeed.dopplerShiftUnc,                 // %f
+             gnss_measurement_info.svTimeSpeed.svTimeMs,                        // %u
+             gnss_measurement_info.svTimeSpeed.svTimeSubMs,                     // %f
+             (uint32_t)(gnss_measurement_info.validMeasStatusMask >> 32),       // %04x Upper 32
+             (uint32_t)(gnss_measurement_info.validMeasStatusMask & 0xFFFFFFFF) // %04x Lower 32
+            );
+
+    LOC_LOGV(" %s:%d]: GNSS measurement data after conversion: \n"
+             " Output => size | prn | time_offset_ns | state |"
+             " received_gps_tow_ns| c_n0_dbhz | pseudorange_rate_mps |"
+             " pseudorange_rate_uncertainty_mps |"
+             " accumulated_delta_range_state | flags \n"
+             " Output => %d | %d | %f | %d | %lld | %f | %f | %f | %d | %d \n",
+             __func__, __LINE__,
+             gpsMeasurement.size,                              // %d
+             gpsMeasurement.prn,                               // %d
+             gpsMeasurement.time_offset_ns,                    // %f
+             gpsMeasurement.state,                             // %d
+             gpsMeasurement.received_gps_tow_ns,               // %lld
+             gpsMeasurement.c_n0_dbhz,                         // %f
+             gpsMeasurement.pseudorange_rate_mps,              // %f
+             gpsMeasurement.pseudorange_rate_uncertainty_mps,  // %f
+             gpsMeasurement.accumulated_delta_range_state,     // %d
+             gpsMeasurement.flags                              // %d
+            );
+}
+
+/*convert GpsClock type from QMI LOC to loc eng format*/
+void LocApiV02 :: convertGpsClock (GpsClock& gpsClock,
+    const qmiLocEventGnssSvMeasInfoIndMsgT_v02& gnss_measurement_info)
+{
+    LOC_LOGV ("%s:%d]: entering\n", __func__, __LINE__);
+
+    // size
+    gpsClock.size = sizeof(GpsClock);
+
+    // flag initiation
+    int flags = 0;
+
+    // type & time_ns
+    if (gnss_measurement_info.systemTime_valid &&
+        gnss_measurement_info.systemTimeExt_valid) {
+
+        uint16_t systemWeek = gnss_measurement_info.systemTime.systemWeek;
+        uint32_t systemMsec = gnss_measurement_info.systemTime.systemMsec;
+        float sysClkBias = gnss_measurement_info.systemTime.systemClkTimeBias;
+        float sysClkUncMs = gnss_measurement_info.systemTime.systemClkTimeUncMs;
+        int sourceOfTime = gnss_measurement_info.systemTimeExt.sourceOfTime;
+        bool isTimeValid = (sysClkUncMs <= 15.0f); // 15ms
+
+        if(systemWeek != C_GPS_WEEK_UNKNOWN && isTimeValid) {
+            gpsClock.type = GPS_CLOCK_TYPE_GPS_TIME;
+            double temp =  (double)(systemWeek) * (double)WEEK_MSECS + (double)systemMsec;
+            gpsClock.time_ns = (double)temp*1e6 -
+                               (double)((int)(sysClkBias*1e6));
+        } else {
+            gpsClock.type = GPS_CLOCK_TYPE_UNKNOWN;
+        }
+    } else {
+        gpsClock.type = GPS_CLOCK_TYPE_UNKNOWN;
+    }
+
+    LOC_LOGV(" %s:%d]: GNSS measurement clock data received form modem: \n"
+             " Input => systemTime_valid | systemTimeExt_valid | systemWeek"
+             " | systemMsec | systemClkTimeBias"
+             " | systemClkTimeUncMs | sourceOfTime \n"
+             " Input => %d | %d | %d | %d | %f | %f | %d \n",
+             __func__, __LINE__,
+             gnss_measurement_info.systemTime_valid,                      // %d
+             gnss_measurement_info.systemTimeExt_valid,                   // %d
+             gnss_measurement_info.systemTime.systemWeek,                 // %d
+             gnss_measurement_info.systemTime.systemMsec,                 // %d
+             gnss_measurement_info.systemTime.systemClkTimeBias,          // %f
+             gnss_measurement_info.systemTime.systemClkTimeUncMs,         // %f
+             gnss_measurement_info.systemTimeExt.sourceOfTime);           // %d
+
+    LOC_LOGV(" %s:%d]: GNSS measurement clock after conversion: \n"
+             " Output => type | time_ns \n"
+             " Output => %d | %lld \n", __func__, __LINE__,
+             gpsClock.type,                                               // %d
+             gpsClock.time_ns);                                           // %lld
+
+    gpsClock.flags = flags;
+}
+
+/* event callback registered with the loc_api v02 interface */
+void LocApiV02 :: eventCb(locClientHandleType clientHandle,
+  uint32_t eventId, locClientEventIndUnionType eventPayload)
+{
+  LOC_LOGD("%s:%d]: event id = %d\n", __func__, __LINE__,
+                eventId);
+
+  switch(eventId)
+  {
+    //Position Report
+    case QMI_LOC_EVENT_POSITION_REPORT_IND_V02:
+      reportPosition(eventPayload.pPositionReportEvent);
+      break;
+
+    // Satellite report
+    case QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02:
+      reportSv(eventPayload.pGnssSvInfoReportEvent);
+      break;
+
+    // Status report
+    case QMI_LOC_EVENT_ENGINE_STATE_IND_V02:
+      reportEngineState(eventPayload.pEngineState);
+      break;
+
+    case QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02:
+      reportFixSessionState(eventPayload.pFixSessionState);
+      break;
+
+    // NMEA
+    case QMI_LOC_EVENT_NMEA_IND_V02:
+      reportNmea(eventPayload.pNmeaReportEvent);
+      break;
+
+    // XTRA request
+    case QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02:
+      LOC_LOGD("%s:%d]: XTRA download request\n", __func__,
+                    __LINE__);
+      reportXtraServerUrl(eventPayload.pInjectPredictedOrbitsReqEvent);
+      requestXtraData();
+      break;
+
+    // time request
+    case QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02:
+      LOC_LOGD("%s:%d]: Time request\n", __func__,
+                    __LINE__);
+      requestTime();
+      break;
+
+    //position request
+    case QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02:
+      LOC_LOGD("%s:%d]: Position request\n", __func__,
+                    __LINE__);
+      requestLocation();
+      break;
+
+    // NI request
+    case QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02:
+      reportNiRequest(eventPayload.pNiNotifyVerifyReqEvent);
+      break;
+
+    // AGPS connection request
+    case QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02:
+      reportAtlRequest(eventPayload.pLocationServerConnReqEvent);
+      break;
+
+    // GNSS Measurement Report
+    case QMI_LOC_EVENT_GNSS_MEASUREMENT_REPORT_IND_V02:
+      reportGnssMeasurementData(*eventPayload.pGnssSvRawInfoEvent);
+      break;
+  }
+}
+
+/* Call the service LocAdapterBase down event*/
+void LocApiV02 :: errorCb(locClientHandleType handle,
+                             locClientErrorEnumType errorId)
+{
+  if(errorId == eLOC_CLIENT_ERROR_SERVICE_UNAVAILABLE)
+  {
+    LOC_LOGE("%s:%d]: Service unavailable error\n",
+                  __func__, __LINE__);
+
+    handleEngineDownEvent();
+
+    /* immediately send the engine up event so that
+    the loc engine re-initializes the adapter and the
+    loc-api_v02 interface */
+
+    handleEngineUpEvent();
+  }
+}
+
+static void ds_client_global_event_cb(ds_client_status_enum_type result,
+                                       void *loc_adapter_cookie)
+{
+    LocApiV02 *locApiV02Instance =
+        (LocApiV02 *)loc_adapter_cookie;
+    locApiV02Instance->ds_client_event_cb(result);
+    return;
+}
+
+void LocApiV02::ds_client_event_cb(ds_client_status_enum_type result)
+{
+    if(result == E_DS_CLIENT_DATA_CALL_CONNECTED) {
+        LOC_LOGD("%s:%d]: Emergency call is up", __func__, __LINE__);
+        reportDataCallOpened();
+    }
+    else if(result == E_DS_CLIENT_DATA_CALL_DISCONNECTED) {
+        LOC_LOGE("%s:%d]: Emergency call is stopped", __func__, __LINE__);
+        reportDataCallClosed();
+    }
+    return;
+}
+
+ds_client_cb_data ds_client_cb = {
+    ds_client_global_event_cb
+};
+
+int LocApiV02 :: initDataServiceClient()
+{
+    int ret=0;
+    ret = ds_client_init();
+    LOC_LOGD("%s:%d]: ret = %d\n", __func__, __LINE__,ret);
+    return ret;
+}
+
+int LocApiV02 :: openAndStartDataCall()
+{
+    enum loc_api_adapter_err ret;
+    int profile_index;
+    int pdp_type;
+    ds_client_status_enum_type result = ds_client_open_call(&dsClientHandle,
+                                                            &ds_client_cb,
+                                                            (void *)this,
+                                                            &profile_index,
+                                                            &pdp_type);
+    if(result == E_DS_CLIENT_SUCCESS) {
+        result = ds_client_start_call(dsClientHandle, profile_index, pdp_type);
+
+        if(result == E_DS_CLIENT_SUCCESS) {
+            LOC_LOGD("%s:%d]: Request to start Emergency call sent\n",
+                 __func__, __LINE__);
+        ret = LOC_API_ADAPTER_ERR_SUCCESS;
+        }
+        else {
+            LOC_LOGE("%s:%d]: Unable to bring up emergency call using DS. result = %d",
+                 __func__, __LINE__, (int)result);
+            ret = LOC_API_ADAPTER_ERR_UNSUPPORTED;
+        }
+    }
+    else if(result == E_DS_CLIENT_RETRY_LATER) {
+        LOC_LOGE("%s:%d]: Could not start emergency call. Retry after delay\n",
+                 __func__, __LINE__);
+        ret = LOC_API_ADAPTER_ERR_ENGINE_BUSY;
+    }
+    else {
+        LOC_LOGE("%s:%d]: Unable to bring up emergency call using DS. ret = %d",
+                 __func__, __LINE__, (int)ret);
+        ret = LOC_API_ADAPTER_ERR_UNSUPPORTED;
+    }
+
+    return (int)ret;
+}
+
+void LocApiV02 :: stopDataCall()
+{
+    ds_client_status_enum_type ret =
+        ds_client_stop_call(dsClientHandle);
+    if (ret == E_DS_CLIENT_SUCCESS) {
+        LOC_LOGD("%s:%d]: Request to Close SUPL ES call sent\n", __func__, __LINE__);
+    }
+    else {
+        if (ret == E_DS_CLIENT_FAILURE_INVALID_HANDLE) {
+            LOC_LOGE("%s:%d]: Conn handle not found for SUPL ES",
+                     __func__, __LINE__);
+        }
+        LOC_LOGE("%s:%d]: Could not close SUPL ES call. Ret: %d\n"
+                 ,__func__, __LINE__, ret);
+    }
+    return;
+}
+
+void LocApiV02 :: closeDataCall()
+{
+    ds_client_close_call(&dsClientHandle);
+    LOC_LOGD("%s:%d]: Release data client handle\n", __func__, __LINE__);
+    return;
+}
+
+enum loc_api_adapter_err LocApiV02 ::
+getWwanZppFix(GpsLocation &zppLoc)
+{
+    locClientReqUnionType req_union;
+    qmiLocGetAvailWwanPositionReqMsgT_v02 zpp_req;
+    qmiLocGetAvailWwanPositionIndMsgT_v02 zpp_ind;
+    memset(&zpp_ind, 0, sizeof(zpp_ind));
+    memset(&zpp_req, 0, sizeof(zpp_req));
+    memset(&zppLoc, 0, sizeof(zppLoc));
+
+    req_union.pGetAvailWwanPositionReq = &zpp_req;
+
+    LOC_LOGD("%s:%d]: Get ZPP Fix from available wwan position\n", __func__, __LINE__);
+
+    locClientStatusEnumType status =
+        loc_sync_send_req(clientHandle,
+                          QMI_LOC_GET_AVAILABLE_WWAN_POSITION_REQ_V02,
+                          req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                          QMI_LOC_GET_AVAILABLE_WWAN_POSITION_IND_V02,
+                          &zpp_ind);
+
+    if (status != eLOC_CLIENT_SUCCESS ||
+        eQMI_LOC_SUCCESS_V02 != zpp_ind.status) {
+        LOC_LOGE ("%s:%d]: error! status = %s, zpp_ind.status = %s\n",
+                  __func__, __LINE__,
+                  loc_get_v02_client_status_name(status),
+                  loc_get_v02_qmi_status_name(zpp_ind.status));
+
+        return LOC_API_ADAPTER_ERR_GENERAL_FAILURE;
+    }
+
+    LOC_LOGD("Got Zpp fix location validity (lat:%d, lon:%d, timestamp:%d accuracy:%d)",
+             zpp_ind.latitude_valid,
+             zpp_ind.longitude_valid,
+             zpp_ind.timestampUtc_valid,
+             zpp_ind.horUncCircular_valid);
+
+    LOC_LOGD("(%.7f, %.7f), timestamp %llu, accuracy %f",
+             zpp_ind.latitude,
+             zpp_ind.longitude,
+             zpp_ind.timestampUtc,
+             zpp_ind.horUncCircular);
+
+    zppLoc.size = sizeof(GpsLocation);
+    if (zpp_ind.timestampUtc_valid) {
+        zppLoc.timestamp = zpp_ind.timestampUtc;
+    }
+    else {
+        /* The UTC time from modem is not valid.
+        In this case, we use current system time instead.*/
+
+        struct timespec time_info_current;
+        clock_gettime(CLOCK_REALTIME,&time_info_current);
+        zppLoc.timestamp = (time_info_current.tv_sec)*1e3 +
+                           (time_info_current.tv_nsec)/1e6;
+        LOC_LOGD("zpp timestamp got from system: %llu", zppLoc.timestamp);
+    }
+
+    if ((zpp_ind.latitude_valid == false) ||
+        (zpp_ind.longitude_valid == false) ||
+        (zpp_ind.horUncCircular_valid == false)) {
+        return LOC_API_ADAPTER_ERR_GENERAL_FAILURE;
+    }
+
+    zppLoc.flags = GPS_LOCATION_HAS_LAT_LONG | GPS_LOCATION_HAS_ACCURACY;
+    zppLoc.latitude = zpp_ind.latitude;
+    zppLoc.longitude = zpp_ind.longitude;
+    zppLoc.accuracy = zpp_ind.horUncCircular;
+
+    if (zpp_ind.altitudeWrtEllipsoid_valid) {
+        zppLoc.flags |= GPS_LOCATION_HAS_ALTITUDE;
+        zppLoc.altitude = zpp_ind.altitudeWrtEllipsoid;
+    }
+
+    return LOC_API_ADAPTER_ERR_SUCCESS;
+}
+
+enum loc_api_adapter_err LocApiV02 :: getBestAvailableZppFix(GpsLocation & zppLoc)
+{
+    LocPosTechMask tech_mask;
+    return getBestAvailableZppFix(zppLoc, tech_mask);
+}
+
+enum loc_api_adapter_err LocApiV02 ::
+getBestAvailableZppFix(GpsLocation &zppLoc, LocPosTechMask &tech_mask)
+{
+    locClientReqUnionType req_union;
+
+    qmiLocGetBestAvailablePositionIndMsgT_v02 zpp_ind;
+    qmiLocGetBestAvailablePositionReqMsgT_v02 zpp_req;
+
+    memset(&zpp_ind, 0, sizeof(zpp_ind));
+    memset(&zpp_req, 0, sizeof(zpp_req));
+    memset(&zppLoc, 0, sizeof(zppLoc));
+
+    req_union.pGetBestAvailablePositionReq = &zpp_req;
+
+    LOC_LOGD("%s:%d]: Get ZPP Fix from best available source\n", __func__, __LINE__);
+
+    locClientStatusEnumType status =
+        loc_sync_send_req(clientHandle,
+                          QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02,
+                          req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                          QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02,
+                          &zpp_ind);
+
+    if (status != eLOC_CLIENT_SUCCESS ||
+        eQMI_LOC_SUCCESS_V02 != zpp_ind.status) {
+        LOC_LOGE ("%s:%d]: error! status = %s, zpp_ind.status = %s\n",
+                  __func__, __LINE__,
+                  loc_get_v02_client_status_name(status),
+                  loc_get_v02_qmi_status_name(zpp_ind.status));
+    } else {
+        LOC_LOGD("Got Zpp fix location validity (lat:%d, lon:%d, timestamp:%d accuracy:%d)"
+                 " (%.7f, %.7f), timestamp %llu, accuracy %f",
+                 zpp_ind.latitude_valid,
+                 zpp_ind.longitude_valid,
+                 zpp_ind.timestampUtc_valid,
+                 zpp_ind.horUncCircular_valid,
+                 zpp_ind.latitude,
+                 zpp_ind.longitude,
+                 zpp_ind.timestampUtc,
+                 zpp_ind.horUncCircular);
+
+        zppLoc.size = sizeof(GpsLocation);
+        if (zpp_ind.timestampUtc_valid) {
+            zppLoc.timestamp = zpp_ind.timestampUtc;
+        }
+        else {
+            /* The UTC time from modem is not valid.
+            In this case, we use current system time instead.*/
+
+            struct timespec time_info_current;
+            clock_gettime(CLOCK_REALTIME,&time_info_current);
+            zppLoc.timestamp = (time_info_current.tv_sec)*1e3 +
+                               (time_info_current.tv_nsec)/1e6;
+            LOC_LOGD("zpp timestamp got from system: %llu", zppLoc.timestamp);
+        }
+
+        if (zpp_ind.latitude_valid &&
+            zpp_ind.longitude_valid &&
+            zpp_ind.horUncCircular_valid ) {
+            zppLoc.flags = GPS_LOCATION_HAS_LAT_LONG | GPS_LOCATION_HAS_ACCURACY;
+            zppLoc.latitude = zpp_ind.latitude;
+            zppLoc.longitude = zpp_ind.longitude;
+            zppLoc.accuracy = zpp_ind.horUncCircular;
+
+            if (zpp_ind.altitudeWrtEllipsoid_valid) {
+                zppLoc.flags |= GPS_LOCATION_HAS_ALTITUDE;
+                zppLoc.altitude = zpp_ind.altitudeWrtEllipsoid;
+            }
+
+            if (zpp_ind.horSpeed_valid) {
+                zppLoc.flags |= GPS_LOCATION_HAS_SPEED;
+                zppLoc.speed = zpp_ind.horSpeed;
+            }
+
+            if (zpp_ind.heading_valid) {
+                zppLoc.flags |= GPS_LOCATION_HAS_BEARING;
+                zppLoc.bearing = zpp_ind.heading;
+            }
+
+            if (zpp_ind.technologyMask_valid) {
+                tech_mask = zpp_ind.technologyMask;
+            }
+        }
+    }
+
+    return convertErr(status);
+}
+
+/*Values for lock
+  1 = Do not lock any position sessions
+  2 = Lock MI position sessions
+  3 = Lock MT position sessions
+  4 = Lock all position sessions
+
+  Returns values:
+  zero on success; non-zero on failure
+*/
+int LocApiV02 :: setGpsLock(LOC_GPS_LOCK_MASK lockMask)
+{
+    qmiLocSetEngineLockReqMsgT_v02 setEngineLockReq;
+    qmiLocSetEngineLockIndMsgT_v02 setEngineLockInd;
+    locClientStatusEnumType status;
+    locClientReqUnionType req_union;
+    int ret=0;
+
+    LOC_LOGD("%s:%d]: Set Gps Lock: %x\n", __func__, __LINE__, lockMask);
+    setEngineLockReq.lockType = convertGpsLockMask(lockMask);
+    req_union.pSetEngineLockReq = &setEngineLockReq;
+    memset(&setEngineLockInd, 0, sizeof(setEngineLockInd));
+    status = loc_sync_send_req(clientHandle,
+                               QMI_LOC_SET_ENGINE_LOCK_REQ_V02,
+                               req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                               QMI_LOC_SET_ENGINE_LOCK_IND_V02,
+                               &setEngineLockInd);
+
+    if(status != eLOC_CLIENT_SUCCESS || setEngineLockInd.status != eQMI_LOC_SUCCESS_V02) {
+        LOC_LOGE("%s:%d]: Set engine lock failed. status: %s, ind status:%s\n",
+                 __func__, __LINE__,
+                 loc_get_v02_client_status_name(status),
+                 loc_get_v02_qmi_status_name(setEngineLockInd.status));
+        ret = -1;
+    }
+    LOC_LOGD("%s:%d]: exit\n", __func__, __LINE__);
+    return ret;
+}
+/*
+  Returns
+  Current value of GPS Lock on success
+  -1 on failure
+*/
+int LocApiV02 :: getGpsLock()
+{
+    qmiLocGetEngineLockReqMsgT_v02 getEngineLockReq;
+    qmiLocGetEngineLockIndMsgT_v02 getEngineLockInd;
+    locClientStatusEnumType status;
+    locClientReqUnionType req_union;
+    int ret=0;
+    LOC_LOGD("%s:%d]: Enter\n", __func__, __LINE__);
+    memset(&getEngineLockInd, 0, sizeof(getEngineLockInd));
+
+    //Passing req_union as a parameter even though this request has no payload
+    //since NULL or 0 gives an error during compilation
+    status = loc_sync_send_req(clientHandle,
+                               QMI_LOC_GET_ENGINE_LOCK_REQ_V02,
+                               req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                               QMI_LOC_GET_ENGINE_LOCK_IND_V02,
+                               &getEngineLockInd);
+    if(status != eLOC_CLIENT_SUCCESS || getEngineLockInd.status != eQMI_LOC_SUCCESS_V02) {
+        LOC_LOGE("%s:%d]: Set engine lock failed. status: %s, ind status:%s\n",
+                 __func__, __LINE__,
+                 loc_get_v02_client_status_name(status),
+                 loc_get_v02_qmi_status_name(getEngineLockInd.status));
+        ret = -1;
+    }
+    else {
+        if(getEngineLockInd.lockType_valid) {
+            ret = (int)getEngineLockInd.lockType;
+            LOC_LOGD("%s:%d]: Lock Type: %d\n", __func__, __LINE__, ret);
+        }
+        else {
+            LOC_LOGE("%s:%d]: Lock Type not valid\n", __func__, __LINE__);
+            ret = -1;
+        }
+    }
+    LOC_LOGD("%s:%d]: Exit\n", __func__, __LINE__);
+    return ret;
+}
+
+enum loc_api_adapter_err LocApiV02:: setXtraVersionCheck(enum xtra_version_check check)
+{
+    qmiLocSetXtraVersionCheckReqMsgT_v02 req;
+    qmiLocSetXtraVersionCheckIndMsgT_v02 ind;
+    locClientStatusEnumType status;
+    locClientReqUnionType req_union;
+    enum loc_api_adapter_err ret = LOC_API_ADAPTER_ERR_SUCCESS;
+
+    LOC_LOGD("%s:%d]: Enter. check: %d", __func__, __LINE__, check);
+    memset(&req, 0, sizeof(req));
+    memset(&ind, 0, sizeof(ind));
+    switch (check) {
+    case DISABLED:
+        req.xtraVersionCheckMode = eQMI_LOC_XTRA_VERSION_CHECK_DISABLE_V02;
+        break;
+    case AUTO:
+        req.xtraVersionCheckMode = eQMI_LOC_XTRA_VERSION_CHECK_AUTO_V02;
+        break;
+    case XTRA2:
+        req.xtraVersionCheckMode = eQMI_LOC_XTRA_VERSION_CHECK_XTRA2_V02;
+        break;
+    case XTRA3:
+        req.xtraVersionCheckMode = eQMI_LOC_XTRA_VERSION_CHECK_XTRA3_V02;
+        break;
+    default:
+        req.xtraVersionCheckMode = eQMI_LOC_XTRA_VERSION_CHECK_DISABLE_V02;
+        break;
+    }
+
+    req_union.pSetXtraVersionCheckReq = &req;
+    status = loc_sync_send_req(clientHandle,
+                               QMI_LOC_SET_XTRA_VERSION_CHECK_REQ_V02,
+                               req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                               QMI_LOC_SET_XTRA_VERSION_CHECK_IND_V02,
+                               &ind);
+    if(status != eLOC_CLIENT_SUCCESS || ind.status != eQMI_LOC_SUCCESS_V02) {
+        LOC_LOGE("%s:%d]: Set xtra version check failed. status: %s, ind status:%s\n",
+                 __func__, __LINE__,
+                 loc_get_v02_client_status_name(status),
+                 loc_get_v02_qmi_status_name(ind.status));
+        ret = LOC_API_ADAPTER_ERR_GENERAL_FAILURE;
+    }
+
+    LOC_LOGD("%s:%d]: Exit. ret: %d", __func__, __LINE__, (int)ret);
+    return ret;
+}
+
+void LocApiV02 :: installAGpsCert(const DerEncodedCertificate* pData,
+                                  size_t numberOfCerts,
+                                  uint32_t slotBitMask)
+{
+    LOC_LOGD("%s:%d]:, slot mask=%u number of certs=%u",
+            __func__, __LINE__, slotBitMask, numberOfCerts);
+
+    uint8_t certIndex = 0;
+    for (uint8_t slot = 0; slot <= AGPS_CERTIFICATE_MAX_SLOTS-1; slot++, slotBitMask >>= 1)
+    {
+        if (slotBitMask & 1) //slot is writable
+        {
+            if (certIndex < numberOfCerts && pData[certIndex].data && pData[certIndex].length > 0)
+            {
+                LOC_LOGD("%s:%d]:, Inject cert#%u slot=%u length=%u",
+                         __func__, __LINE__, certIndex, slot, pData[certIndex].length);
+
+                locClientReqUnionType req_union;
+                locClientStatusEnumType status;
+                qmiLocInjectSuplCertificateReqMsgT_v02 injectCertReq;
+                qmiLocInjectSuplCertificateIndMsgT_v02 injectCertInd;
+
+                memset(&injectCertReq, 0, sizeof(injectCertReq));
+                injectCertReq.suplCertId = slot;
+                injectCertReq.suplCertData_len = pData[certIndex].length;
+                memcpy(injectCertReq.suplCertData, pData[certIndex].data, pData[certIndex].length);
+
+                req_union.pInjectSuplCertificateReq = &injectCertReq;
+
+                status = loc_sync_send_req(clientHandle,
+                                           QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02,
+                                           req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                                           QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02,
+                                           &injectCertInd);
+
+                if (status != eLOC_CLIENT_SUCCESS ||
+                    eQMI_LOC_SUCCESS_V02 != injectCertInd.status)
+                {
+                    LOC_LOGE ("%s:%d]: inject-error status = %s, set_server_ind.status = %s",
+                              __func__,__LINE__,
+                              loc_get_v02_client_status_name(status),
+                              loc_get_v02_qmi_status_name(injectCertInd.status));
+                }
+
+                certIndex++; //move to next cert
+
+            } else {
+
+                LOC_LOGD("%s:%d]:, Delete slot=%u",
+                         __func__, __LINE__, slot);
+
+                // A fake cert is injected first before delete is called to workaround
+                // an issue that is seen with trying to delete an empty slot.
+                {
+                    locClientReqUnionType req_union;
+                    locClientStatusEnumType status;
+                    qmiLocInjectSuplCertificateReqMsgT_v02 injectFakeCertReq;
+                    qmiLocInjectSuplCertificateIndMsgT_v02 injectFakeCertInd;
+
+                    memset(&injectFakeCertReq, 0, sizeof(injectFakeCertReq));
+                    injectFakeCertReq.suplCertId = slot;
+                    injectFakeCertReq.suplCertData_len = 1;
+                    injectFakeCertReq.suplCertData[0] = 1;
+
+                    req_union.pInjectSuplCertificateReq = &injectFakeCertReq;
+
+                    status = loc_sync_send_req(clientHandle,
+                                       QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02,
+                                       req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                                       QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02,
+                                       &injectFakeCertInd);
+
+                    if (status != eLOC_CLIENT_SUCCESS ||
+                        eQMI_LOC_SUCCESS_V02 != injectFakeCertInd.status)
+                    {
+                        LOC_LOGE ("%s:%d]: inject-fake-error status = %s, set_server_ind.status = %s",
+                                  __func__,__LINE__,
+                                  loc_get_v02_client_status_name(status),
+                                  loc_get_v02_qmi_status_name(injectFakeCertInd.status));
+                    }
+                }
+
+                locClientReqUnionType req_union;
+                locClientStatusEnumType status;
+                qmiLocDeleteSuplCertificateReqMsgT_v02 deleteCertReq;
+                qmiLocDeleteSuplCertificateIndMsgT_v02 deleteCertInd;
+
+                memset(&deleteCertReq, 0, sizeof(deleteCertReq));
+                deleteCertReq.suplCertId = slot;
+                deleteCertReq.suplCertId_valid = 1;
+
+                req_union.pDeleteSuplCertificateReq = &deleteCertReq;
+
+                status = loc_sync_send_req(clientHandle,
+                                           QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02,
+                                           req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                                           QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02,
+                                           &deleteCertInd);
+
+                if (status != eLOC_CLIENT_SUCCESS ||
+                    eQMI_LOC_SUCCESS_V02 != deleteCertInd.status)
+                {
+                    LOC_LOGE("%s:%d]: delete-error status = %s, set_server_ind.status = %s",
+                              __func__,__LINE__,
+                              loc_get_v02_client_status_name(status),
+                              loc_get_v02_qmi_status_name(deleteCertInd.status));
+                }
+            }
+        } else {
+            LOC_LOGD("%s:%d]:, Not writable slot=%u",
+                     __func__, __LINE__, slot);
+        }
+    }
+}
+
+/*
+  Returns
+  0: update the gps reporting event successfully
+  -1: on failure
+*/
+int LocApiV02 :: updateRegistrationMask(LOC_API_ADAPTER_EVENT_MASK_T event,
+                                        loc_registration_mask_status isEnabled)
+{
+    LOC_LOGD("%s:%d]: Enter\n", __func__, __LINE__);
+
+    return open((isEnabled == LOC_REGISTRATION_MASK_ENABLED)?(mMask|event):(mMask&~event));
+}
+
+bool LocApiV02 :: gnssConstellationConfig()
+{
+    return mGnssMeasurementSupported == sup_yes;
+}
+
+void LocApiV02 :: cacheGnssMeasurementSupport()
+{
+    if (sup_unknown == mGnssMeasurementSupported) {
+        if ((mQmiMask & QMI_LOC_EVENT_MASK_POSITION_REPORT_V02) ==
+            QMI_LOC_EVENT_MASK_POSITION_REPORT_V02) {
+            /*for GNSS Measurement service, use
+              QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_V02
+              to check if modem support this feature or not*/
+            LOC_LOGD("%s:%d]: set GNSS measurement to report gps measurement only.\n",
+                     __func__, __LINE__);
+
+            qmiLocSetGNSSConstRepConfigReqMsgT_v02 setGNSSConstRepConfigReq;
+            qmiLocSetGNSSConstRepConfigIndMsgT_v02 setGNSSConstRepConfigInd;
+            memset(&setGNSSConstRepConfigReq, 0, sizeof(setGNSSConstRepConfigReq));
+            memset(&setGNSSConstRepConfigInd, 0, sizeof(setGNSSConstRepConfigInd));
+
+            locClientStatusEnumType status;
+            locClientReqUnionType req_union;
+
+            setGNSSConstRepConfigReq.measReportConfig_valid = true;
+            setGNSSConstRepConfigReq.measReportConfig = eQMI_SYSTEM_GPS_V02;
+            req_union.pSetGNSSConstRepConfigReq = &setGNSSConstRepConfigReq;
+
+            status = loc_sync_send_req(clientHandle,
+                                       QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_V02,
+                                       req_union,
+                                       LOC_ENGINE_SYNC_REQUEST_TIMEOUT,
+                                       QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_IND_V02,
+                                       &setGNSSConstRepConfigInd);
+
+            if(status != eLOC_CLIENT_SUCCESS ||
+               setGNSSConstRepConfigInd.status != eQMI_LOC_SUCCESS_V02) {
+                LOC_LOGD("%s:%d]: Set GNSS constellation failed."
+                         " status: %s, ind status:%s\n",
+                         __func__, __LINE__,
+                         loc_get_v02_client_status_name(status),
+                         loc_get_v02_qmi_status_name(setGNSSConstRepConfigInd.status));
+                mGnssMeasurementSupported = sup_no;
+            } else {
+                LOC_LOGD("%s:%d]: Set GNSS constellation succeeded.\n",
+                         __func__, __LINE__);
+                mGnssMeasurementSupported = sup_yes;
+            }
+        }
+    }
+
+    LOC_LOGV("%s:%d]: mGnssMeasurementSupported is %d\n", __func__, __LINE__, mGnssMeasurementSupported);
+}
diff --git a/gps/loc_api/loc_api_v02/LocApiV02.h b/gps/loc_api/loc_api_v02/LocApiV02.h
new file mode 100644
index 0000000..ff43e6a
--- /dev/null
+++ b/gps/loc_api/loc_api_v02/LocApiV02.h
@@ -0,0 +1,244 @@
+/* Copyright (c) 2011-2014, 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 LOC_API_V_0_2_H
+#define LOC_API_V_0_2_H
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "ds_client.h"
+#include <LocApiBase.h>
+#include <loc_api_v02_client.h>
+
+using namespace loc_core;
+
+/* This class derives from the LocApiBase class.
+   The members of this class are responsible for converting
+   the Loc API V02 data structures into Loc Adapter data structures.
+   This class also implements some of the virtual functions that
+   handle the requests from loc engine. */
+class LocApiV02 : public LocApiBase {
+  enum supported_status {
+      sup_unknown,
+      sup_yes,
+      sup_no
+  };
+protected:
+  /* loc api v02 handle*/
+  locClientHandleType clientHandle;
+
+private:
+  /*ds client handle*/
+  dsClientHandleType dsClientHandle;
+  enum supported_status mGnssMeasurementSupported;
+  locClientEventMaskType mQmiMask;
+  bool mInSession;
+  bool mEngineOn;
+
+  /* Convert event mask from loc eng to loc_api_v02 format */
+  static locClientEventMaskType convertMask(LOC_API_ADAPTER_EVENT_MASK_T mask);
+
+  /* Convert GPS LOCK mask from gps.conf definition */
+  static qmiLocLockEnumT_v02 convertGpsLockMask(LOC_GPS_LOCK_MASK lockMask);
+
+  /* Convert error from loc_api_v02 to loc eng format*/
+  static enum loc_api_adapter_err convertErr(locClientStatusEnumType status);
+
+  /* convert Ni Encoding type from QMI_LOC to loc eng format */
+  static GpsNiEncodingType convertNiEncoding(
+    qmiLocNiDataCodingSchemeEnumT_v02 loc_encoding);
+
+  /*convert NI notify verify type from QMI LOC to loc eng format*/
+  static bool convertNiNotifyVerifyType (GpsNiNotification *notif,
+      qmiLocNiNotifyVerifyEnumT_v02 notif_priv);
+
+  /*convert GpsMeasurement type from QMI LOC to loc eng format*/
+  static void convertGpsMeasurements (GpsMeasurement& gpsMeasurement,
+      const qmiLocSVMeasurementStructT_v02& gnss_measurement_info);
+
+  /*convert GpsClock type from QMI LOC to loc eng format*/
+  static void convertGpsClock (GpsClock& gpsClock,
+      const qmiLocEventGnssSvMeasInfoIndMsgT_v02& gnss_measurement_info);
+
+  /* convert position report to loc eng format and send the converted
+     position to loc eng */
+  void reportPosition
+    (const qmiLocEventPositionReportIndMsgT_v02 *location_report_ptr);
+
+  /* convert satellite report to loc eng format and  send the converted
+     report to loc eng */
+  void reportSv (const qmiLocEventGnssSvInfoIndMsgT_v02 *gnss_report_ptr);
+
+  /* convert engine state report to loc eng format and send the converted
+     report to loc eng */
+  void reportEngineState (
+    const qmiLocEventEngineStateIndMsgT_v02 *engine_state_ptr);
+
+  /* convert fix session report to loc eng format and send the converted
+     report to loc eng */
+  void reportFixSessionState (
+    const qmiLocEventFixSessionStateIndMsgT_v02 *fix_session_state_ptr);
+
+  /* convert NMEA report to loc eng format and send the converted
+     report to loc eng */
+  void reportNmea (const qmiLocEventNmeaIndMsgT_v02 *nmea_report_ptr);
+
+  /* convert and report an ATL request to loc engine */
+  void reportAtlRequest(
+    const qmiLocEventLocationServerConnectionReqIndMsgT_v02
+    *server_request_ptr);
+
+  /* convert and report NI request to loc eng */
+  void reportNiRequest(
+    const qmiLocEventNiNotifyVerifyReqIndMsgT_v02 *ni_req_ptr);
+
+  /* report the xtra server info */
+  void reportXtraServerUrl(
+    const qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02* server_request_ptr);
+
+  /* convert and report GNSS measurement data to loc eng */
+  void reportGnssMeasurementData(
+    const qmiLocEventGnssSvMeasInfoIndMsgT_v02& gnss_measurement_report_ptr);
+
+  bool registerEventMask(locClientEventMaskType qmiMask);
+  locClientEventMaskType adjustMaskForNoSession(locClientEventMaskType qmiMask);
+  void cacheGnssMeasurementSupport();
+
+protected:
+  virtual enum loc_api_adapter_err
+    open(LOC_API_ADAPTER_EVENT_MASK_T mask);
+  virtual enum loc_api_adapter_err
+    close();
+
+public:
+  LocApiV02(const MsgTask* msgTask,
+            LOC_API_ADAPTER_EVENT_MASK_T exMask,
+            ContextBase *context = NULL);
+  ~LocApiV02();
+
+  /* event callback registered with the loc_api v02 interface */
+  virtual void eventCb(locClientHandleType client_handle,
+               uint32_t loc_event_id,
+               locClientEventIndUnionType loc_event_payload);
+
+  /* error callback, this function handles the  service unavailable
+     error */
+  void errorCb(locClientHandleType handle,
+               locClientErrorEnumType errorId);
+
+  void ds_client_event_cb(ds_client_status_enum_type result);
+
+  virtual enum loc_api_adapter_err startFix(const LocPosMode& posMode);
+
+  virtual enum loc_api_adapter_err stopFix();
+
+  virtual enum loc_api_adapter_err
+    setPositionMode(const LocPosMode& mode);
+
+  virtual enum loc_api_adapter_err
+    setTime(GpsUtcTime time, int64_t timeReference, int uncertainty);
+
+  virtual enum loc_api_adapter_err
+    injectPosition(double latitude, double longitude, float accuracy);
+
+  virtual enum loc_api_adapter_err
+    deleteAidingData(GpsAidingData f);
+
+  virtual enum loc_api_adapter_err
+    informNiResponse(GpsUserResponseType userResponse,
+                     const void* passThroughData);
+
+  virtual enum loc_api_adapter_err
+    setServer(const char* url, int len);
+  virtual enum loc_api_adapter_err
+    setServer(unsigned int ip, int port, LocServerType type);
+  virtual enum loc_api_adapter_err
+    setXtraData(char* data, int length);
+  virtual enum loc_api_adapter_err
+    requestXtraServer();
+  virtual enum loc_api_adapter_err
+    atlOpenStatus(int handle, int is_succ, char* apn, AGpsBearerType bear,
+                   AGpsType agpsType);
+  virtual enum loc_api_adapter_err atlCloseStatus(int handle, int is_succ);
+  virtual enum loc_api_adapter_err setSUPLVersion(uint32_t version);
+  virtual enum loc_api_adapter_err setLPPConfig(uint32_t profile);
+
+  virtual enum loc_api_adapter_err
+    setSensorControlConfig(int sensorUsage, int sensorProvider);
+
+  virtual enum loc_api_adapter_err
+    setSensorProperties(bool gyroBiasVarianceRandomWalk_valid, float gyroBiasVarianceRandomWalk,
+                            bool accelBiasVarianceRandomWalk_valid, float accelBiasVarianceRandomWalk,
+                            bool angleBiasVarianceRandomWalk_valid, float angleBiasVarianceRandomWalk,
+                            bool rateBiasVarianceRandomWalk_valid, float rateBiasVarianceRandomWalk,
+                            bool velocityBiasVarianceRandomWalk_valid, float velocityBiasVarianceRandomWalk);
+
+  virtual enum loc_api_adapter_err
+    setSensorPerfControlConfig(int controlMode, int accelSamplesPerBatch, int accelBatchesPerSec,
+                               int gyroSamplesPerBatch, int gyroBatchesPerSec,
+                               int accelSamplesPerBatchHigh, int accelBatchesPerSecHigh,
+                               int gyroSamplesPerBatchHigh, int gyroBatchesPerSecHigh, int algorithmConfig);
+  virtual enum loc_api_adapter_err setExtPowerConfig(int isBatteryCharging);
+  virtual enum loc_api_adapter_err setAGLONASSProtocol(unsigned long aGlonassProtocol);
+  virtual enum loc_api_adapter_err
+      getWwanZppFix(GpsLocation & zppLoc);
+  virtual enum loc_api_adapter_err
+      getBestAvailableZppFix(GpsLocation & zppLoc);
+  virtual enum loc_api_adapter_err
+      getBestAvailableZppFix(GpsLocation & zppLoc, LocPosTechMask & tech_mask);
+  virtual int initDataServiceClient();
+  virtual int openAndStartDataCall();
+  virtual void stopDataCall();
+  virtual void closeDataCall();
+  virtual int setGpsLock(LOC_GPS_LOCK_MASK lock);
+
+  /*
+    Returns
+    Current value of GPS Lock on success
+    -1 on failure
+  */
+  virtual int getGpsLock(void);
+  virtual enum loc_api_adapter_err setXtraVersionCheck(enum xtra_version_check check);
+  virtual void installAGpsCert(const DerEncodedCertificate* pData,
+                               size_t length,
+                               uint32_t slotBitMask);
+  /*
+    Update Registration Mask
+  */
+  virtual int updateRegistrationMask(LOC_API_ADAPTER_EVENT_MASK_T event,
+                                     loc_registration_mask_status isEnabled);
+  /*
+    Set Gnss Constellation Config
+  */
+  virtual bool gnssConstellationConfig();
+};
+
+extern "C" LocApiBase* getLocApi(const MsgTask* msgTask,
+                                 LOC_API_ADAPTER_EVENT_MASK_T exMask,
+                                 ContextBase *context);
+#endif //LOC_API_V_0_2_H
diff --git a/gps/loc_api/loc_api_v02/Makefile.am b/gps/loc_api/loc_api_v02/Makefile.am
new file mode 100644
index 0000000..2308cd4
--- /dev/null
+++ b/gps/loc_api/loc_api_v02/Makefile.am
@@ -0,0 +1,42 @@
+AM_CFLAGS = \
+            ${QMIF_CFLAGS} \
+            -I../../utils \
+            -I../../platform_lib_abstractions \
+            -I../libloc_api_50001
+
+requiredlibs = \
+            ${QMIF_LIBS} \
+            ../libloc_api_50001/libloc_adapter_so.la \
+            ../../utils/libgps_utils_so.la
+
+h_sources = LocApiV02Adapter.h \
+            loc_util_log.h \
+            location_service_v02.h \
+            loc_api_sync_req.h \
+            loc_api_v02_client.h \
+            loc_api_v02_log.h
+
+c_sources = LocApiV02Adapter.cpp \
+            loc_api_v02_log.c \
+            loc_api_v02_client.c \
+            loc_api_sync_req.c \
+            location_service_v02.c
+
+library_includedir = $(pkgincludedir)
+library_include_HEADERS = $(h_sources)
+
+libloc_api_la_SOURCES = $(c_sources) $(h_sources)
+
+if USE_GLIB
+libloc_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
+libloc_api_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
+libloc_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
+else
+libloc_api_la_CFLAGS = $(AM_CFLAGS)
+libloc_api_la_LDFLAGS = -shared -version-info 1:0:0
+libloc_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
+endif
+
+libloc_api_la_LIBADD = $(requiredlibs) -lstdc++
+
+lib_LTLIBRARIES = libloc_api.la
diff --git a/gps/loc_api/loc_api_v02/loc_api_sync_req.c b/gps/loc_api/loc_api_v02/loc_api_sync_req.c
new file mode 100644
index 0000000..6a08666
--- /dev/null
+++ b/gps/loc_api/loc_api_v02/loc_api_sync_req.c
@@ -0,0 +1,547 @@
+/* Copyright (c) 2011-2012, 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.
+ */
+#include <stdio.h>
+#include <assert.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <string.h>
+#include <pthread.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <loc_cfg.h>
+#include "loc_api_v02_client.h"
+#include "loc_api_sync_req.h"
+
+/* Logging */
+// Uncomment to log verbose logs
+#define LOG_NDEBUG 1
+
+// log debug logs
+#define LOG_NDDEBUG 1
+#define LOG_TAG "LocSvc_api_v02"
+#include "loc_util_log.h"
+
+#define LOC_SYNC_REQ_BUFFER_SIZE 8
+#define GPS_CONF_FILE "/etc/gps.conf"
+pthread_mutex_t  loc_sync_call_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+static bool loc_sync_call_initialized = false;
+
+typedef struct {
+   pthread_mutex_t         sync_req_lock;
+
+   /* Client ID */
+   locClientHandleType     client_handle;
+
+   /*  waiting conditional variable */
+   pthread_cond_t          ind_arrived_cond;
+
+   /* Callback waiting data block, protected by loc_cb_data_mutex */
+   bool                    ind_is_selected;              /* is cb selected? */
+   bool                    ind_is_waiting;               /* is waiting?     */
+   bool                    ind_has_arrived;              /* callback has arrived */
+   uint32_t                req_id;                    /*  sync request */
+   void                    *recv_ind_payload_ptr; /* received  payload */
+   uint32_t                recv_ind_id;      /* received  ind   */
+
+} loc_sync_req_data_s_type;
+
+typedef struct {
+   bool                        in_use;  /* at least one sync call is active */
+   bool                        slot_in_use[LOC_SYNC_REQ_BUFFER_SIZE];
+   loc_sync_req_data_s_type    slots[LOC_SYNC_REQ_BUFFER_SIZE];
+} loc_sync_req_array_s_type;
+
+/***************************************************************************
+ *                 DATA FOR ASYNCHRONOUS RPC PROCESSING
+ **************************************************************************/
+loc_sync_req_array_s_type loc_sync_array;
+
+/*===========================================================================
+
+FUNCTION   loc_sync_req_init
+
+DESCRIPTION
+   Initialize this module
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   none
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_sync_req_init()
+{
+   LOC_LOGV(" %s:%d]:\n", __func__, __LINE__);
+   UTIL_READ_CONF_DEFAULT(GPS_CONF_FILE);
+   pthread_mutex_lock(&loc_sync_call_mutex);
+   if(true == loc_sync_call_initialized)
+   {
+      LOC_LOGD("%s:%d]:already initialized\n", __func__, __LINE__);
+      pthread_mutex_unlock(&loc_sync_call_mutex);
+      return;
+   }
+
+   loc_sync_array.in_use = false;
+
+   memset(loc_sync_array.slot_in_use, 0, sizeof(loc_sync_array.slot_in_use));
+
+   int i;
+   for (i = 0; i < LOC_SYNC_REQ_BUFFER_SIZE; i++)
+   {
+      loc_sync_req_data_s_type *slot = &loc_sync_array.slots[i];
+
+      pthread_mutex_init(&slot->sync_req_lock, NULL);
+      pthread_cond_init(&slot->ind_arrived_cond, NULL);
+
+      slot->client_handle = LOC_CLIENT_INVALID_HANDLE_VALUE;
+      slot->ind_is_selected = false;       /* is ind selected? */
+      slot->ind_is_waiting  = false;       /* is waiting?     */
+      slot->ind_has_arrived = false;       /* callback has arrived */
+      slot->recv_ind_id = 0;       /* ind to wait for   */
+      slot->recv_ind_payload_ptr = NULL;
+      slot->req_id =  0;   /* req id   */
+   }
+
+   loc_sync_call_initialized = true;
+   pthread_mutex_unlock(&loc_sync_call_mutex);
+}
+
+
+/*===========================================================================
+
+FUNCTION    loc_sync_process_ind
+
+DESCRIPTION
+   Wakes up blocked API calls to check if the needed callback has arrived
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   none
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+void loc_sync_process_ind(
+      locClientHandleType    client_handle, /* handle of the client */
+      uint32_t               ind_id ,      /* ind id */
+      void                   *ind_payload_ptr /* payload              */
+)
+{
+
+   LOC_LOGV("%s:%d]: received indication, handle = %p ind_id = %u \n",
+                 __func__,__LINE__, client_handle, ind_id);
+
+   pthread_mutex_lock(&loc_sync_call_mutex);
+
+   if (!loc_sync_array.in_use)
+   {
+      LOC_LOGD("%s:%d]: loc_sync_array not in use \n",
+                    __func__, __LINE__);
+      pthread_mutex_unlock(&loc_sync_call_mutex);
+      return;
+   }
+
+   bool in_use = false, consumed = false;
+   int i;
+
+   for (i = 0; i < LOC_SYNC_REQ_BUFFER_SIZE && !consumed; i++)
+   {
+      loc_sync_req_data_s_type *slot = &loc_sync_array.slots[i];
+
+      in_use |= loc_sync_array.slot_in_use[i];
+
+      pthread_mutex_lock(&slot->sync_req_lock);
+
+      if ( (loc_sync_array.slot_in_use[i]) && (slot->client_handle == client_handle)
+            && (ind_id == slot->recv_ind_id) && (!slot->ind_has_arrived))
+      {
+         // copy the payload to the slot waiting for this ind
+         size_t payload_size = 0;
+
+         LOC_LOGV("%s:%d]: found slot %d selected for ind %u \n",
+                       __func__, __LINE__, i, ind_id);
+
+         if(true == locClientGetSizeByRespIndId(ind_id, &payload_size) &&
+            NULL != slot->recv_ind_payload_ptr && NULL != ind_payload_ptr)
+         {
+            LOC_LOGV("%s:%d]: copying ind payload size = %u \n",
+                          __func__, __LINE__, payload_size);
+
+            memcpy(slot->recv_ind_payload_ptr, ind_payload_ptr, payload_size);
+
+            consumed = true;
+
+         }
+         /* Received a callback while waiting, wake up thread to check it */
+         if (slot->ind_is_waiting)
+         {
+            slot->recv_ind_id = ind_id;
+
+            pthread_cond_signal(&slot->ind_arrived_cond);
+         }
+         else
+         {
+            /* If callback arrives before wait, remember it */
+            LOC_LOGV("%s:%d]: ind %u arrived before wait was called \n",
+                          __func__, __LINE__, ind_id);
+
+            slot->ind_has_arrived = true;
+         }
+      }
+      pthread_mutex_unlock(&slot->sync_req_lock);
+   }
+
+   if (!in_use) {
+      loc_sync_array.in_use = false;
+   }
+
+   pthread_mutex_unlock(&loc_sync_call_mutex);
+}
+
+/*===========================================================================
+
+FUNCTION    loc_alloc_slot
+
+DESCRIPTION
+   Allocates a buffer slot for the synchronous API call
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Select ID (>=0)     : successful
+   -1                  : buffer full
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int loc_alloc_slot()
+{
+   int i, select_id = -1; /* no free buffer */
+
+   pthread_mutex_lock(&loc_sync_call_mutex);
+
+   for (i = 0; i < LOC_SYNC_REQ_BUFFER_SIZE; i++)
+   {
+      if (!loc_sync_array.slot_in_use[i])
+      {
+         select_id = i;
+         loc_sync_array.slot_in_use[i] = 1;
+         loc_sync_array.in_use = true;
+         break;
+      }
+   }
+
+   pthread_mutex_unlock(&loc_sync_call_mutex);
+   LOC_LOGV("%s:%d]: returning slot %d\n",
+                 __func__, __LINE__, select_id);
+   return select_id;
+}
+
+/*===========================================================================
+
+FUNCTION    loc_free_slot
+
+DESCRIPTION
+   Frees a buffer slot after the synchronous API call
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static void loc_free_slot(int select_id)
+{
+   int i;
+   loc_sync_req_data_s_type *slot;
+
+   pthread_mutex_lock(&loc_sync_call_mutex);
+
+   LOC_LOGD("%s:%d]: freeing slot %d\n", __func__, __LINE__, select_id);
+
+   loc_sync_array.slot_in_use[select_id] = 0;
+
+   slot = &loc_sync_array.slots[select_id];
+
+   slot->client_handle = LOC_CLIENT_INVALID_HANDLE_VALUE;
+   slot->ind_is_selected = false;       /* is ind selected? */
+   slot->ind_is_waiting  = false;       /* is waiting?     */
+   slot->ind_has_arrived = false;       /* callback has arrived */
+   slot->recv_ind_id = 0;       /* ind to wait for   */
+   slot->recv_ind_payload_ptr = NULL;
+   slot->req_id =  0;
+
+   // check if all slots are now free
+   for (i = 0; i < LOC_SYNC_REQ_BUFFER_SIZE; i++)
+   {
+      if (loc_sync_array.slot_in_use[i]) break;
+   }
+
+   if (i >= LOC_SYNC_REQ_BUFFER_SIZE)
+   {
+      loc_sync_array.in_use = false;
+   }
+
+   pthread_mutex_unlock(&loc_sync_call_mutex);
+}
+
+/*===========================================================================
+
+FUNCTION    loc_sync_select_ind
+
+DESCRIPTION
+   Selects which indication to wait for.
+
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Select ID (>=0)     : successful
+   -ENOMEM                  : out of buffer
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int loc_sync_select_ind(
+      locClientHandleType       client_handle,   /* Client handle */
+      uint32_t                  ind_id,  /* ind Id wait for */
+      uint32_t                  req_id,   /* req id */
+      void *                    ind_payload_ptr /* ptr where payload should be copied to*/
+)
+{
+   int select_id = loc_alloc_slot();
+
+   LOC_LOGV("%s:%d]: client handle %p, ind_id %u, req_id %u \n",
+                 __func__, __LINE__, client_handle, ind_id, req_id);
+
+   if (select_id < 0)
+   {
+      LOC_LOGE("%s:%d]: buffer full for this synchronous req %s \n",
+                 __func__, __LINE__, loc_get_v02_event_name(req_id));
+      return -ENOMEM;
+   }
+
+   loc_sync_req_data_s_type *slot = &loc_sync_array.slots[select_id];
+
+   pthread_mutex_lock(&slot->sync_req_lock);
+
+   slot->client_handle = client_handle;
+   slot->ind_is_selected = true;
+   slot->ind_is_waiting = false;
+   slot->ind_has_arrived = false;
+
+   slot->recv_ind_id = ind_id;
+   slot->req_id      = req_id;
+   slot->recv_ind_payload_ptr = ind_payload_ptr; //store the payload ptr
+
+   pthread_mutex_unlock(&slot->sync_req_lock);
+
+   return select_id;
+}
+
+
+/*===========================================================================
+
+FUNCTION    loc_sync_wait_for_ind
+
+DESCRIPTION
+   Waits for a selected indication. The wait expires in timeout_seconds seconds.
+   If the function is called before an existing wait has finished, it will
+   immediately return error.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+  0 on SUCCESS, -ve value on failure
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static int loc_sync_wait_for_ind(
+      int select_id,        /* ID from loc_sync_select_ind() */
+      int timeout_seconds,  /* Timeout in this number of seconds  */
+      uint32_t ind_id
+)
+{
+   if (select_id < 0 || select_id >= LOC_SYNC_REQ_BUFFER_SIZE || !loc_sync_array.slot_in_use[select_id])
+   {
+      LOC_LOGE("%s:%d]: invalid select_id: %d \n",
+                    __func__, __LINE__, select_id);
+
+      return (-EINVAL);
+   }
+
+   loc_sync_req_data_s_type *slot = &loc_sync_array.slots[select_id];
+
+   int ret_val = 0;  /* the return value of this function: 0 = no error */
+   int rc;          /* return code from pthread calls */
+
+   struct timeval present_time;
+   struct timespec expire_time;
+
+   pthread_mutex_lock(&slot->sync_req_lock);
+
+  do
+  {
+      if (slot->ind_has_arrived)
+      {
+         ret_val = 0;    /* success */
+         break;
+      }
+
+      if (slot->ind_is_waiting)
+      {
+         LOC_LOGW("%s:%d]: already waiting in this slot %d\n", __func__,
+                       __LINE__, select_id);
+         ret_val = -EBUSY; // busy
+         break;
+      }
+
+      /* Calculate absolute expire time */
+      gettimeofday(&present_time, NULL);
+      expire_time.tv_sec  = present_time.tv_sec;
+      expire_time.tv_nsec = present_time.tv_usec * 1000;
+      expire_time.tv_sec += timeout_seconds;
+
+      /* Take new wait request */
+      slot->ind_is_waiting = true;
+
+      /* Waiting */
+      rc = pthread_cond_timedwait(&slot->ind_arrived_cond,
+            &slot->sync_req_lock, &expire_time);
+
+      slot->ind_is_waiting = false;
+
+      if(rc == ETIMEDOUT)
+      {
+         LOC_LOGE("%s:%d]: slot %d, timed out for ind_id %s\n",
+                    __func__, __LINE__, select_id, loc_get_v02_event_name(ind_id));
+         ret_val = -ETIMEDOUT; //time out
+      }
+
+  } while (0);
+
+   pthread_mutex_unlock(&slot->sync_req_lock);
+   loc_free_slot(select_id);
+
+   return ret_val;
+}
+
+/*===========================================================================
+
+FUNCTION    loc_sync_send_req
+
+DESCRIPTION
+   Synchronous req call (thread safe)
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Loc API 2.0 status
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+locClientStatusEnumType loc_sync_send_req
+(
+      locClientHandleType       client_handle,
+      uint32_t                  req_id,        /* req id */
+      locClientReqUnionType     req_payload,
+      uint32_t                  timeout_msec,
+      uint32_t                  ind_id,  //ind ID to block for, usually the same as req_id */
+      void                      *ind_payload_ptr /* can be NULL*/
+)
+{
+   locClientStatusEnumType status = eLOC_CLIENT_SUCCESS ;
+   int select_id;
+   int rc = 0;
+
+   // Select the callback we are waiting for
+   select_id = loc_sync_select_ind(client_handle, ind_id, req_id,
+                                   ind_payload_ptr);
+
+   if (select_id >= 0)
+   {
+      status =  locClientSendReq (client_handle, req_id, req_payload);
+      LOC_LOGV("%s:%d]: select_id = %d,locClientSendReq returned %d\n",
+                    __func__, __LINE__, select_id, status);
+
+      if (status != eLOC_CLIENT_SUCCESS )
+      {
+         loc_free_slot(select_id);
+      }
+      else
+      {
+         // Wait for the indication callback
+         if (( rc = loc_sync_wait_for_ind( select_id,
+                                           timeout_msec / 1000,
+                                           ind_id) ) < 0)
+         {
+            if ( rc == -ETIMEDOUT)
+               status = eLOC_CLIENT_FAILURE_TIMEOUT;
+            else
+               status = eLOC_CLIENT_FAILURE_INTERNAL;
+
+            // Callback waiting failed
+            LOC_LOGE("%s:%d]: loc_api_wait_for_ind failed, err %d, "
+                     "select id %d, status %s", __func__, __LINE__, rc ,
+                     select_id, loc_get_v02_client_status_name(status));
+         }
+         else
+         {
+            status =  eLOC_CLIENT_SUCCESS;
+            LOC_LOGV("%s:%d]: success (select id %d)\n",
+                          __func__, __LINE__, select_id);
+         }
+      }
+   } /* select id */
+
+   return status;
+}
+
+
diff --git a/gps/loc_api/loc_api_v02/loc_api_sync_req.h b/gps/loc_api/loc_api_v02/loc_api_sync_req.h
new file mode 100644
index 0000000..167c7c3
--- /dev/null
+++ b/gps/loc_api/loc_api_v02/loc_api_sync_req.h
@@ -0,0 +1,90 @@
+/* Copyright (c) 2011, 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 LOC_SYNC_REQ_H
+#define LOC_SYNC_REQ_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+#include <stdbool.h>
+#include <stdint.h>
+#include "loc_api_v02_client.h"
+
+#define LOC_ENGINE_SYNC_REQUEST_TIMEOUT  (1000) // 1 second
+
+#define LOC_SEND_SYNC_REQ(NAME, ID, REQ, HANDLE)  \
+    int rv = true; \
+    locClientStatusEnumType st; \
+    locClientReqUnionType reqUnion; \
+    qmiLoc##NAME##IndMsgT_v02 ind; \
+\
+    reqUnion.p##NAME##Req = &REQ; \
+\
+    st = loc_sync_send_req(HANDLE,                          \
+                           QMI_LOC_##ID##_REQ_V02,          \
+                           reqUnion,                        \
+                           LOC_ENGINE_SYNC_REQUEST_TIMEOUT, \
+                           QMI_LOC_##ID##_IND_V02,          \
+                           &ind);                           \
+\
+    if (st != eLOC_CLIENT_SUCCESS || \
+        eQMI_LOC_SUCCESS_V02 != ind.status) { \
+        LOC_LOGE ("%s:%d]: Error : st = %d, ind.status = %d", \
+                  __func__, __LINE__,  st, ind.status); \
+        rv = false; \
+    }
+
+/* Init function */
+extern void loc_sync_req_init();
+
+
+/* Process Loc API indications to wake up blocked user threads */
+extern void loc_sync_process_ind(
+      locClientHandleType     client_handle,     /* handle of the client */
+      uint32_t                ind_id ,      /* respInd id */
+      void                    *ind_payload_ptr /* payload              */
+);
+
+/* Thread safe synchronous request,  using Loc API status return code */
+extern locClientStatusEnumType loc_sync_send_req
+(
+      locClientHandleType       client_handle,
+      uint32_t                  req_id,        /* req id */
+      locClientReqUnionType     req_payload,
+      uint32_t                  timeout_msec,
+      uint32_t                  ind_id,  //ind ID to block for, usually the same as req_id */
+      void                      *ind_payload_ptr /* can be NULL*/
+);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LOC_SYNC_REQ_H */
diff --git a/gps/loc_api/loc_api_v02/loc_api_v02_client.c b/gps/loc_api/loc_api_v02/loc_api_v02_client.c
new file mode 100644
index 0000000..7535f44
--- /dev/null
+++ b/gps/loc_api/loc_api_v02/loc_api_v02_client.c
@@ -0,0 +1,2277 @@
+/* Copyright (c) 2011-2014, 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.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stddef.h>
+
+#include <stdbool.h>
+#include <stdint.h>
+
+#include "qmi_client.h"
+#include "qmi_idl_lib.h"
+#include "qmi_cci_target_ext.h"
+
+#if defined( _ANDROID_)
+#include "qmi_cci_target.h"
+#include "qmi_cci_common.h"
+#define LOG_NDEBUG 0
+#define LOG_TAG "LocSvc_api_v02"
+#endif //_ANDROID_
+
+
+#include "loc_api_v02_client.h"
+#include "loc_util_log.h"
+
+#ifdef LOC_UTIL_TARGET_OFF_TARGET
+
+// timeout in ms before send_msg_sync should return
+#define LOC_CLIENT_ACK_TIMEOUT (5000)
+
+#else
+
+// timeout in ms before send_msg_sync should return
+#define LOC_CLIENT_ACK_TIMEOUT (1000)
+
+#endif //LOC_UTIL_TARGET_OFF_TARGET
+
+#define LOC_CLIENT_MAX_OPEN_RETRIES (20)
+#define LOC_CLIENT_TIME_BETWEEN_OPEN_RETRIES (1)
+
+enum
+{
+  //! Special value for selecting any available service
+  /** This value enables selection of any available service */
+  eLOC_CLIENT_INSTANCE_ID_ANY = -1,
+  //! qca1530 service id value
+  /** qca1530 service daemon uses service id value 1 */
+  eLOC_CLIENT_INSTANCE_ID_QCA1530 = 1,
+  //! GSS service id value
+  /* GSS service id value is 0, but here it is set to -1 for compatibitily */
+  eLOC_CLIENT_INSTANCE_ID_GSS = eLOC_CLIENT_INSTANCE_ID_ANY,
+  //! MSM service id value
+  /** MSM service id value is 0, but here it is set to -1 for compatibitily */
+  eLOC_CLIENT_INSTANCE_ID_MSM = eLOC_CLIENT_INSTANCE_ID_ANY,
+  //! MDM service id value
+  /** MDM connects using QMUXD and assigned a value of
+      QMI_CLIENT_QMUX_RMNET_USB_INSTANCE_0 ("qmi_client_instance_defs.h", 37).
+      -1 for compatibility */
+  eLOC_CLIENT_INSTANCE_ID_MDM = eLOC_CLIENT_INSTANCE_ID_ANY,
+  /*  GSS service id value is 0, for auto config  */
+  eLOC_CLIENT_INSTANCE_ID_GSS_AUTO = 0
+};
+
+/* Table to relate eventId, size and mask value used to enable the event*/
+typedef struct
+{
+  uint32_t               eventId;
+  size_t                 eventSize;
+  locClientEventMaskType eventMask;
+}locClientEventIndTableStructT;
+
+
+static locClientEventIndTableStructT locClientEventIndTable[]= {
+
+  // position report ind
+  { QMI_LOC_EVENT_POSITION_REPORT_IND_V02,
+    sizeof(qmiLocEventPositionReportIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_POSITION_REPORT_V02 },
+
+  // satellite report ind
+  { QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02,
+    sizeof(qmiLocEventGnssSvInfoIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_GNSS_SV_INFO_V02 },
+
+  // NMEA report ind
+  { QMI_LOC_EVENT_NMEA_IND_V02,
+    sizeof(qmiLocEventNmeaIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_NMEA_V02 },
+
+  //NI event ind
+  { QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02,
+    sizeof(qmiLocEventNiNotifyVerifyReqIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_NI_NOTIFY_VERIFY_REQ_V02 },
+
+  //Time Injection Request Ind
+  { QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02,
+    sizeof(qmiLocEventInjectTimeReqIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_INJECT_TIME_REQ_V02 },
+
+  //Predicted Orbits Injection Request
+  { QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02,
+    sizeof(qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_INJECT_PREDICTED_ORBITS_REQ_V02 },
+
+  //Position Injection Request Ind
+  { QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02,
+    sizeof(qmiLocEventInjectPositionReqIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_INJECT_POSITION_REQ_V02 } ,
+
+  //Engine State Report Ind
+  { QMI_LOC_EVENT_ENGINE_STATE_IND_V02,
+    sizeof(qmiLocEventEngineStateIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_ENGINE_STATE_V02 },
+
+  //Fix Session State Report Ind
+  { QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02,
+    sizeof(qmiLocEventFixSessionStateIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_FIX_SESSION_STATE_V02 },
+
+  //Wifi Request Indication
+  { QMI_LOC_EVENT_WIFI_REQ_IND_V02,
+    sizeof(qmiLocEventWifiReqIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_WIFI_REQ_V02 },
+
+  //Sensor Streaming Ready Status Ind
+  { QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_IND_V02,
+    sizeof(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_SENSOR_STREAMING_READY_STATUS_V02 },
+
+  // Time Sync Request Indication
+  { QMI_LOC_EVENT_TIME_SYNC_REQ_IND_V02,
+    sizeof(qmiLocEventTimeSyncReqIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_TIME_SYNC_REQ_V02 },
+
+  //Set Spi Streaming Report Event
+  { QMI_LOC_EVENT_SET_SPI_STREAMING_REPORT_IND_V02,
+    sizeof(qmiLocEventSetSpiStreamingReportIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_SET_SPI_STREAMING_REPORT_V02 },
+
+  //Location Server Connection Request event
+  { QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02,
+    sizeof(qmiLocEventLocationServerConnectionReqIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_LOCATION_SERVER_CONNECTION_REQ_V02 },
+
+  // NI Geofence Event
+  { QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_IND_V02,
+    sizeof(qmiLocEventNiGeofenceNotificationIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_NI_GEOFENCE_NOTIFICATION_V02},
+
+  // Geofence General Alert Event
+  { QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_IND_V02,
+    sizeof(qmiLocEventGeofenceGenAlertIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_GEOFENCE_GEN_ALERT_V02},
+
+  //Geofence Breach event
+  { QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_IND_V02,
+    sizeof(qmiLocEventGeofenceBreachIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_GEOFENCE_BREACH_NOTIFICATION_V02},
+
+  //Geofence Batched Breach event
+  { QMI_LOC_EVENT_GEOFENCE_BATCHED_BREACH_NOTIFICATION_IND_V02,
+    sizeof(qmiLocEventGeofenceBatchedBreachIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_GEOFENCE_BATCH_BREACH_NOTIFICATION_V02},
+
+  //Pedometer Control event
+  { QMI_LOC_EVENT_PEDOMETER_CONTROL_IND_V02,
+    sizeof(qmiLocEventPedometerControlIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_PEDOMETER_CONTROL_V02 },
+
+  //Motion Data Control event
+  { QMI_LOC_EVENT_MOTION_DATA_CONTROL_IND_V02,
+    sizeof(qmiLocEventMotionDataControlIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_MOTION_DATA_CONTROL_V02 },
+
+  //Wifi AP data request event
+  { QMI_LOC_EVENT_INJECT_WIFI_AP_DATA_REQ_IND_V02,
+    sizeof(qmiLocEventInjectWifiApDataReqIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_INJECT_WIFI_AP_DATA_REQ_V02 },
+
+  //Get Batching On Fix Event
+  { QMI_LOC_EVENT_LIVE_BATCHED_POSITION_REPORT_IND_V02,
+    sizeof(qmiLocEventLiveBatchedPositionReportIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_LIVE_BATCHED_POSITION_REPORT_V02 },
+
+  //Get Batching On Full Event
+  { QMI_LOC_EVENT_BATCH_FULL_NOTIFICATION_IND_V02,
+    sizeof(qmiLocEventBatchFullIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_BATCH_FULL_NOTIFICATION_V02 },
+
+   //Vehicle Data Readiness event
+   { QMI_LOC_EVENT_VEHICLE_DATA_READY_STATUS_IND_V02,
+     sizeof(qmiLocEventVehicleDataReadyIndMsgT_v02),
+     QMI_LOC_EVENT_MASK_VEHICLE_DATA_READY_STATUS_V02 },
+
+  //Geofence Proximity event
+  { QMI_LOC_EVENT_GEOFENCE_PROXIMITY_NOTIFICATION_IND_V02,
+    sizeof(qmiLocEventGeofenceProximityIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_GEOFENCE_PROXIMITY_NOTIFICATION_V02},
+
+  // for GDT
+  { QMI_LOC_EVENT_GDT_UPLOAD_BEGIN_STATUS_REQ_IND_V02,
+    sizeof(qmiLocEventGdtUploadBeginStatusReqIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_GDT_UPLOAD_BEGIN_REQ_V02,
+  },
+
+  { QMI_LOC_EVENT_GDT_UPLOAD_END_REQ_IND_V02,
+    sizeof(qmiLocEventGdtUploadEndReqIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_GDT_UPLOAD_END_REQ_V02,
+  },
+
+   //GNSS measurement event
+  { QMI_LOC_EVENT_GNSS_MEASUREMENT_REPORT_IND_V02 ,
+    sizeof(qmiLocEventGnssSvMeasInfoIndMsgT_v02),
+    QMI_LOC_EVENT_MASK_GNSS_MEASUREMENT_REPORT_V02}
+};
+
+/* table to relate the respInd Id with its size */
+typedef struct
+{
+  uint32_t respIndId;
+  size_t   respIndSize;
+}locClientRespIndTableStructT;
+
+static locClientRespIndTableStructT locClientRespIndTable[]= {
+
+  // get service revision ind
+  { QMI_LOC_GET_SERVICE_REVISION_IND_V02,
+    sizeof(qmiLocGetServiceRevisionIndMsgT_v02)},
+
+  // Get Fix Criteria Resp Ind
+  { QMI_LOC_GET_FIX_CRITERIA_IND_V02,
+     sizeof(qmiLocGetFixCriteriaIndMsgT_v02)},
+
+  // NI User Resp In
+  { QMI_LOC_NI_USER_RESPONSE_IND_V02,
+    sizeof(qmiLocNiUserRespIndMsgT_v02)},
+
+  //Inject Predicted Orbits Data Resp Ind
+  { QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02,
+    sizeof(qmiLocInjectPredictedOrbitsDataIndMsgT_v02)},
+
+  //Get Predicted Orbits Data Src Resp Ind
+  { QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_IND_V02,
+    sizeof(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02)},
+
+  // Get Predicted Orbits Data Validity Resp Ind
+   { QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_IND_V02,
+     sizeof(qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02)},
+
+   // Inject UTC Time Resp Ind
+   { QMI_LOC_INJECT_UTC_TIME_IND_V02,
+     sizeof(qmiLocInjectUtcTimeIndMsgT_v02)},
+
+   //Inject Position Resp Ind
+   { QMI_LOC_INJECT_POSITION_IND_V02,
+     sizeof(qmiLocInjectPositionIndMsgT_v02)},
+
+   //Set Engine Lock Resp Ind
+   { QMI_LOC_SET_ENGINE_LOCK_IND_V02,
+     sizeof(qmiLocSetEngineLockIndMsgT_v02)},
+
+   //Get Engine Lock Resp Ind
+   { QMI_LOC_GET_ENGINE_LOCK_IND_V02,
+     sizeof(qmiLocGetEngineLockIndMsgT_v02)},
+
+   //Set SBAS Config Resp Ind
+   { QMI_LOC_SET_SBAS_CONFIG_IND_V02,
+     sizeof(qmiLocSetSbasConfigIndMsgT_v02)},
+
+   //Get SBAS Config Resp Ind
+   { QMI_LOC_GET_SBAS_CONFIG_IND_V02,
+     sizeof(qmiLocGetSbasConfigIndMsgT_v02)},
+
+   //Set NMEA Types Resp Ind
+   { QMI_LOC_SET_NMEA_TYPES_IND_V02,
+     sizeof(qmiLocSetNmeaTypesIndMsgT_v02)},
+
+   //Get NMEA Types Resp Ind
+   { QMI_LOC_GET_NMEA_TYPES_IND_V02,
+     sizeof(qmiLocGetNmeaTypesIndMsgT_v02)},
+
+   //Set Low Power Mode Resp Ind
+   { QMI_LOC_SET_LOW_POWER_MODE_IND_V02,
+     sizeof(qmiLocSetLowPowerModeIndMsgT_v02)},
+
+   //Get Low Power Mode Resp Ind
+   { QMI_LOC_GET_LOW_POWER_MODE_IND_V02,
+     sizeof(qmiLocGetLowPowerModeIndMsgT_v02)},
+
+   //Set Server Resp Ind
+   { QMI_LOC_SET_SERVER_IND_V02,
+     sizeof(qmiLocSetServerIndMsgT_v02)},
+
+   //Get Server Resp Ind
+   { QMI_LOC_GET_SERVER_IND_V02,
+     sizeof(qmiLocGetServerIndMsgT_v02)},
+
+    //Delete Assist Data Resp Ind
+   { QMI_LOC_DELETE_ASSIST_DATA_IND_V02,
+     sizeof(qmiLocDeleteAssistDataIndMsgT_v02)},
+
+   //Set XTRA-T Session Control Resp Ind
+   { QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02,
+     sizeof(qmiLocSetXtraTSessionControlIndMsgT_v02)},
+
+   //Get XTRA-T Session Control Resp Ind
+   { QMI_LOC_GET_XTRA_T_SESSION_CONTROL_IND_V02,
+     sizeof(qmiLocGetXtraTSessionControlIndMsgT_v02)},
+
+   //Inject Wifi Position Resp Ind
+   { QMI_LOC_INJECT_WIFI_POSITION_IND_V02,
+     sizeof(qmiLocInjectWifiPositionIndMsgT_v02)},
+
+   //Notify Wifi Status Resp Ind
+   { QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02,
+     sizeof(qmiLocNotifyWifiStatusIndMsgT_v02)},
+
+   //Get Registered Events Resp Ind
+   { QMI_LOC_GET_REGISTERED_EVENTS_IND_V02,
+     sizeof(qmiLocGetRegisteredEventsIndMsgT_v02)},
+
+   //Set Operation Mode Resp Ind
+   { QMI_LOC_SET_OPERATION_MODE_IND_V02,
+     sizeof(qmiLocSetOperationModeIndMsgT_v02)},
+
+   //Get Operation Mode Resp Ind
+   { QMI_LOC_GET_OPERATION_MODE_IND_V02,
+     sizeof(qmiLocGetOperationModeIndMsgT_v02)},
+
+   //Set SPI Status Resp Ind
+   { QMI_LOC_SET_SPI_STATUS_IND_V02,
+     sizeof(qmiLocSetSpiStatusIndMsgT_v02)},
+
+   //Inject Sensor Data Resp Ind
+   { QMI_LOC_INJECT_SENSOR_DATA_IND_V02,
+     sizeof(qmiLocInjectSensorDataIndMsgT_v02)},
+
+   //Inject Time Sync Data Resp Ind
+   { QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02,
+     sizeof(qmiLocInjectTimeSyncDataIndMsgT_v02)},
+
+   //Set Cradle Mount config Resp Ind
+   { QMI_LOC_SET_CRADLE_MOUNT_CONFIG_IND_V02,
+     sizeof(qmiLocSetCradleMountConfigIndMsgT_v02)},
+
+   //Get Cradle Mount config Resp Ind
+   { QMI_LOC_GET_CRADLE_MOUNT_CONFIG_IND_V02,
+     sizeof(qmiLocGetCradleMountConfigIndMsgT_v02)},
+
+   //Set External Power config Resp Ind
+   { QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02,
+     sizeof(qmiLocSetExternalPowerConfigIndMsgT_v02)},
+
+   //Get External Power config Resp Ind
+   { QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02,
+     sizeof(qmiLocGetExternalPowerConfigIndMsgT_v02)},
+
+   //Location server connection status
+   { QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02,
+     sizeof(qmiLocInformLocationServerConnStatusIndMsgT_v02)},
+
+   //Set Protocol Config Parameters
+   { QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02,
+     sizeof(qmiLocSetProtocolConfigParametersIndMsgT_v02)},
+
+   //Get Protocol Config Parameters
+   { QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02,
+     sizeof(qmiLocGetProtocolConfigParametersIndMsgT_v02)},
+
+   //Set Sensor Control Config
+   { QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02,
+     sizeof(qmiLocSetSensorControlConfigIndMsgT_v02)},
+
+   //Get Sensor Control Config
+   { QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02,
+     sizeof(qmiLocGetSensorControlConfigIndMsgT_v02)},
+
+   //Set Sensor Properties
+   { QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02,
+     sizeof(qmiLocSetSensorPropertiesIndMsgT_v02)},
+
+   //Get Sensor Properties
+   { QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02,
+     sizeof(qmiLocGetSensorPropertiesIndMsgT_v02)},
+
+   //Set Sensor Performance Control Config
+   { QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02,
+     sizeof(qmiLocSetSensorPerformanceControlConfigIndMsgT_v02)},
+
+   //Get Sensor Performance Control Config
+   { QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02,
+     sizeof(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02)},
+   //Inject SUPL certificate
+   { QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02,
+     sizeof(qmiLocInjectSuplCertificateIndMsgT_v02) },
+
+   //Delete SUPL certificate
+   { QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02,
+     sizeof(qmiLocDeleteSuplCertificateIndMsgT_v02) },
+
+   // Set Position Engine Config
+   { QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02,
+     sizeof(qmiLocSetPositionEngineConfigParametersIndMsgT_v02)},
+
+   // Get Position Engine Config
+   { QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02,
+     sizeof(qmiLocGetPositionEngineConfigParametersIndMsgT_v02)},
+
+   //Add a Circular Geofence
+   { QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02,
+     sizeof(qmiLocAddCircularGeofenceIndMsgT_v02)},
+
+   //Delete a Geofence
+   { QMI_LOC_DELETE_GEOFENCE_IND_V02,
+     sizeof(qmiLocDeleteGeofenceIndMsgT_v02)} ,
+
+   //Query a Geofence
+   { QMI_LOC_QUERY_GEOFENCE_IND_V02,
+     sizeof(qmiLocQueryGeofenceIndMsgT_v02)},
+
+   //Edit a Geofence
+   { QMI_LOC_EDIT_GEOFENCE_IND_V02,
+     sizeof(qmiLocEditGeofenceIndMsgT_v02)},
+
+   //Get best available position
+   { QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02,
+     sizeof(qmiLocGetBestAvailablePositionIndMsgT_v02)},
+
+   //Inject motion data
+   { QMI_LOC_INJECT_MOTION_DATA_IND_V02,
+     sizeof(qmiLocInjectMotionDataIndMsgT_v02)},
+
+   //Get NI Geofence list
+   { QMI_LOC_GET_NI_GEOFENCE_ID_LIST_IND_V02,
+     sizeof(qmiLocGetNiGeofenceIdListIndMsgT_v02)},
+
+   //Inject GSM Cell Info
+   { QMI_LOC_INJECT_GSM_CELL_INFO_IND_V02,
+     sizeof(qmiLocInjectGSMCellInfoIndMsgT_v02)},
+
+   //Inject Network Initiated Message
+   { QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_IND_V02,
+     sizeof(qmiLocInjectNetworkInitiatedMessageIndMsgT_v02)},
+
+   //WWAN Out of Service Notification
+   { QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_IND_V02,
+     sizeof(qmiLocWWANOutOfServiceNotificationIndMsgT_v02)},
+
+   //Pedomete Report
+   { QMI_LOC_PEDOMETER_REPORT_IND_V02,
+     sizeof(qmiLocPedometerReportIndMsgT_v02)},
+
+   { QMI_LOC_INJECT_WCDMA_CELL_INFO_IND_V02,
+     sizeof(qmiLocInjectWCDMACellInfoIndMsgT_v02)},
+
+   { QMI_LOC_INJECT_TDSCDMA_CELL_INFO_IND_V02,
+     sizeof(qmiLocInjectTDSCDMACellInfoIndMsgT_v02)},
+
+   { QMI_LOC_INJECT_SUBSCRIBER_ID_IND_V02,
+     sizeof(qmiLocInjectSubscriberIDIndMsgT_v02)},
+
+   //Inject Wifi AP data Resp Ind
+   { QMI_LOC_INJECT_WIFI_AP_DATA_IND_V02,
+     sizeof(qmiLocInjectWifiApDataIndMsgT_v02)},
+
+   { QMI_LOC_START_BATCHING_IND_V02,
+     sizeof(qmiLocStartBatchingIndMsgT_v02)},
+
+   { QMI_LOC_STOP_BATCHING_IND_V02,
+     sizeof(qmiLocStopBatchingIndMsgT_v02)},
+
+   { QMI_LOC_GET_BATCH_SIZE_IND_V02,
+     sizeof(qmiLocGetBatchSizeIndMsgT_v02)},
+
+   { QMI_LOC_EVENT_LIVE_BATCHED_POSITION_REPORT_IND_V02,
+     sizeof(qmiLocEventPositionReportIndMsgT_v02)},
+
+   { QMI_LOC_EVENT_BATCH_FULL_NOTIFICATION_IND_V02,
+     sizeof(qmiLocEventBatchFullIndMsgT_v02)},
+
+   { QMI_LOC_READ_FROM_BATCH_IND_V02,
+     sizeof(qmiLocReadFromBatchIndMsgT_v02)},
+
+   { QMI_LOC_RELEASE_BATCH_IND_V02,
+     sizeof(qmiLocReleaseBatchIndMsgT_v02)},
+
+   { QMI_LOC_SET_XTRA_VERSION_CHECK_IND_V02,
+     sizeof(qmiLocSetXtraVersionCheckIndMsgT_v02)},
+
+    //Vehicle Sensor Data
+    { QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_IND_V02,
+      sizeof(qmiLocInjectVehicleSensorDataIndMsgT_v02)},
+
+   { QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_IND_V02,
+     sizeof(qmiLocNotifyWifiAttachmentStatusIndMsgT_v02)},
+
+   { QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_IND_V02,
+     sizeof(qmiLocNotifyWifiEnabledStatusIndMsgT_v02)},
+
+   { QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_IND_V02,
+     sizeof(qmiLocSetPremiumServicesCfgReqMsgT_v02)},
+
+   { QMI_LOC_GET_AVAILABLE_WWAN_POSITION_IND_V02,
+     sizeof(qmiLocGetAvailWwanPositionIndMsgT_v02)},
+
+   // for TDP
+   { QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_IND_V02,
+     sizeof(qmiLocInjectGtpClientDownloadedDataIndMsgT_v02) },
+
+   // for GDT
+   { QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_IND_V02,
+     sizeof(qmiLocGdtUploadBeginStatusIndMsgT_v02) },
+
+   { QMI_LOC_GDT_UPLOAD_END_IND_V02,
+     sizeof(qmiLocGdtUploadEndIndMsgT_v02) },
+
+   { QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_IND_V02,
+     sizeof(qmiLocSetGNSSConstRepConfigIndMsgT_v02)}
+};
+
+
+/** whether indication is an event or a response */
+typedef enum { eventIndType =0, respIndType = 1 } locClientIndEnumT;
+
+
+/** @struct locClientInternalState
+ */
+
+typedef struct locClientCbDataStructT locClientCallbackDataType;
+
+struct locClientCbDataStructT
+{
+ // client cookie
+  void *pClientCookie;
+  //QCCI handle for this control point
+  qmi_client_type userHandle;
+
+  // callbacks registered by the clients
+  locClientEventIndCbType eventCallback;
+  locClientRespIndCbType respCallback;
+  locClientErrorCbType   errorCallback;
+
+  // the event mask the client has registered for
+  locClientEventMaskType eventRegMask;
+
+  //pointer to itself for checking consistency data
+   locClientCallbackDataType *pMe;
+};
+
+
+/*===========================================================================
+ *
+ *                          FUNCTION DECLARATION
+ *
+ *==========================================================================*/
+
+/** locClientGetSizeAndTypeByIndId
+ *  @brief this function gets the size and the type (event,
+ *         response)of the indication structure from its ID
+ *  @param [in]  indId  ID of the indication
+ *  @param [out] type   event or response indication
+ *  @param [out] size   size of the indications
+ *
+ *  @return true if the ID was found, false otherwise */
+
+static bool locClientGetSizeAndTypeByIndId (uint32_t indId, size_t *pIndSize,
+                                         locClientIndEnumT *pIndType)
+{
+  // look in the event table
+  if(true == locClientGetSizeByEventIndId(indId, pIndSize))
+  {
+    *pIndType = eventIndType;
+
+    LOC_LOGV("%s:%d]: indId %d is an event size = %d\n", __func__, __LINE__,
+                  indId, (uint32_t)*pIndSize);
+    return true;
+  }
+
+  //else look in response table
+  if(true == locClientGetSizeByRespIndId(indId, pIndSize))
+  {
+    *pIndType = respIndType;
+
+    LOC_LOGV("%s:%d]: indId %d is a resp size = %d\n", __func__, __LINE__,
+                  indId, (uint32_t)*pIndSize);
+    return true;
+  }
+
+  // Id not found
+  LOC_LOGW("%s:%d]: indId %d not found\n", __func__, __LINE__, indId);
+  return false;
+}
+
+/** isClientRegisteredForEvent
+*  @brief checks the mask to identify if the client has
+*         registered for the specified event Id
+*  @param [in] eventIndId
+*  @param [in] eventRegMask
+*  @return true if client regstered for event; else false */
+
+static bool isClientRegisteredForEvent(
+    locClientEventMaskType eventRegMask,
+    uint32_t eventIndId)
+{
+  size_t idx = 0, eventIndTableSize = 0;
+
+  // look in the event table
+  eventIndTableSize =
+    (sizeof(locClientEventIndTable)/sizeof(locClientEventIndTableStructT));
+
+  for(idx=0; idx<eventIndTableSize; idx++ )
+  {
+    if(eventIndId == locClientEventIndTable[idx].eventId)
+    {
+      LOC_LOGV("%s:%d]: eventId %d registered mask = 0x%04x%04x, "
+               "eventMask = 0x%04x%04x\n", __func__, __LINE__,
+               eventIndId,(uint32_t)(eventRegMask>>32),
+               (uint32_t)(eventRegMask & 0xFFFFFFFF),
+               (uint32_t)(locClientEventIndTable[idx].eventMask >> 32),
+               (uint32_t)(locClientEventIndTable[idx].eventMask & 0xFFFFFFFF));
+
+      return((
+          eventRegMask & locClientEventIndTable[idx].eventMask)?
+          true:false);
+    }
+  }
+  LOC_LOGW("%s:%d]: eventId %d not found\n", __func__, __LINE__,
+                 eventIndId);
+  return false;
+}
+
+/** checkQmiMsgsSupported
+ @brief check the qmi service is supported or not.
+ @param [in] pResponse  pointer to the response received from
+        QMI_LOC service.
+*/
+
+static void checkQmiMsgsSupported(
+  uint32_t*                reqIdArray,
+  int                      reqIdArrayLength,
+  qmiLocGetSupportMsgT_v02 *pResponse,
+  uint64_t*                supportedMsg)
+{
+    uint64_t result = 0;
+    if (pResponse->resp.supported_msgs_valid) {
+
+        /* For example, if a service supports exactly four messages with
+        IDs 0, 1, 30, and 31 (decimal), the array (in hexadecimal) is
+        4 bytes [03 00 00 c0]. */
+
+        size_t idx = 0;
+        uint32_t reqId = 0;
+        uint32_t length = 0;
+        uint32_t supportedMsgsLen = pResponse->resp.supported_msgs_len;
+
+        // every bit saves a checked message result
+        uint32_t maxCheckedMsgsSavedNum = sizeof(result)<<3;
+
+        uint32_t loopSize = reqIdArrayLength;
+        loopSize =
+            loopSize < supportedMsgsLen ? loopSize : supportedMsgsLen;
+        loopSize =
+            loopSize < maxCheckedMsgsSavedNum ? loopSize : maxCheckedMsgsSavedNum;
+
+        for (idx = 0; idx < loopSize; idx++) {
+            reqId = reqIdArray[idx];
+            length = reqId >> 3;
+            if(supportedMsgsLen > length) {
+                uint32_t bit = reqId & ((uint32_t)7);
+                if (pResponse->resp.supported_msgs[length] & (1<<bit)) {
+                    result |= ( 1 << idx ) ;
+                }
+            }
+        }
+    } else {
+        LOC_LOGE("%s:%d] Invalid supported message list.\n", __func__, __LINE__);
+    }
+    *supportedMsg = result;
+}
+
+/** convertQmiResponseToLocStatus
+ @brief converts a qmiLocGenRespMsgT to locClientStatusEnumType*
+ @param [in] pResponse; pointer to the response received from
+        QMI_LOC service.
+ @return locClientStatusEnumType corresponding to the
+         response.
+*/
+
+static locClientStatusEnumType convertQmiResponseToLocStatus(
+  qmiLocGenRespMsgT_v02 *pResponse)
+{
+  locClientStatusEnumType status =  eLOC_CLIENT_FAILURE_INTERNAL;
+
+  // if result == SUCCESS don't look at error code
+  if(pResponse->resp.result == QMI_RESULT_SUCCESS_V01 )
+  {
+    status  = eLOC_CLIENT_SUCCESS;
+  }
+  else
+  {
+    switch(pResponse->resp.error)
+    {
+      case QMI_ERR_MALFORMED_MSG_V01:
+      case QMI_ERR_INVALID_ARG_V01:
+        status = eLOC_CLIENT_FAILURE_INVALID_PARAMETER;
+        break;
+
+      case QMI_ERR_DEVICE_IN_USE_V01:
+        status = eLOC_CLIENT_FAILURE_ENGINE_BUSY;
+        break;
+
+      default:
+        status = eLOC_CLIENT_FAILURE_INTERNAL;
+        break;
+    }
+  }
+  LOC_LOGV("%s:%d]: result = %d, error = %d, status = %d\n",
+                __func__, __LINE__, pResponse->resp.result,
+                pResponse->resp.error, status);
+  return status;
+}
+
+/** convertQmiErrorToLocError
+ @brief converts a qmi service error type to
+        locClientErrorEnumType
+ @param [in] error received QMI service.
+ @return locClientErrorEnumType corresponding to the error.
+*/
+
+static locClientErrorEnumType convertQmiErrorToLocError(
+  qmi_client_error_type error)
+{
+  locClientErrorEnumType locError ;
+  switch(error)
+  {
+    case QMI_SERVICE_ERR:
+      locError = eLOC_CLIENT_ERROR_SERVICE_UNAVAILABLE;
+      break;
+
+    default:
+      locError = eLOC_CLIENT_ERROR_SERVICE_UNAVAILABLE;
+      break;
+  }
+  LOC_LOGV("%s:%d]: qmi error = %d, loc error = %d\n",
+                __func__, __LINE__, error, locError);
+  return locError;
+}
+
+//-----------------------------------------------------------------------------
+
+/** locClientHandleIndication
+ *  @brief looks at each indication and calls the appropriate
+ *         validation handler
+ *  @param [in] indId
+ *  @param [in] indBuffer
+ *  @param [in] indSize
+ *  @return true if indication was validated; else false */
+
+static bool locClientHandleIndication(
+  uint32_t        indId,
+  void*           indBuffer,
+  size_t          indSize
+ )
+{
+  bool status = false;
+  switch(indId)
+  {
+    // handle the event indications
+    //-------------------------------------------------------------------------
+
+    // handle position report
+    case QMI_LOC_EVENT_POSITION_REPORT_IND_V02:
+    case QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02:
+    case QMI_LOC_EVENT_NMEA_IND_V02:
+    case QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02:
+    case QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02:
+    case QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02:
+    case QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02:
+    case QMI_LOC_EVENT_ENGINE_STATE_IND_V02:
+    case QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02:
+    case QMI_LOC_EVENT_WIFI_REQ_IND_V02:
+    case QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_IND_V02:
+    case QMI_LOC_EVENT_TIME_SYNC_REQ_IND_V02:
+    case QMI_LOC_EVENT_SET_SPI_STREAMING_REPORT_IND_V02:
+    case QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02:
+    case QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_IND_V02:
+    case QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_IND_V02:
+    case QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_IND_V02:
+    case QMI_LOC_EVENT_GEOFENCE_BATCHED_BREACH_NOTIFICATION_IND_V02:
+    case QMI_LOC_EVENT_PEDOMETER_CONTROL_IND_V02 :
+    case QMI_LOC_EVENT_MOTION_DATA_CONTROL_IND_V02:
+    case QMI_LOC_EVENT_INJECT_WIFI_AP_DATA_REQ_IND_V02:
+    case QMI_LOC_EVENT_VEHICLE_DATA_READY_STATUS_IND_V02:
+    case QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_IND_V02:
+    case QMI_LOC_EVENT_GEOFENCE_PROXIMITY_NOTIFICATION_IND_V02:
+    case QMI_LOC_GET_SERVICE_REVISION_IND_V02:
+    case QMI_LOC_GET_FIX_CRITERIA_IND_V02:
+    case QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02:
+    case QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_IND_V02:
+    case QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_IND_V02:
+    case QMI_LOC_INJECT_SENSOR_DATA_IND_V02 :
+    case QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02:
+    case QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02:
+    case QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02:
+    case QMI_LOC_GET_CRADLE_MOUNT_CONFIG_IND_V02:
+    case QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02:
+    case QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02:
+    case QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02:
+    case QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02:
+    case QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02:
+    case QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02:
+    case QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02:
+    case QMI_LOC_DELETE_GEOFENCE_IND_V02:
+    case QMI_LOC_EDIT_GEOFENCE_IND_V02:
+    case QMI_LOC_QUERY_GEOFENCE_IND_V02:
+    case QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02:
+    case QMI_LOC_GET_ENGINE_LOCK_IND_V02:
+    case QMI_LOC_GET_NI_GEOFENCE_ID_LIST_IND_V02:
+    case QMI_LOC_PEDOMETER_REPORT_IND_V02:
+    case QMI_LOC_START_BATCHING_IND_V02:
+    case QMI_LOC_STOP_BATCHING_IND_V02:
+    case QMI_LOC_GET_BATCH_SIZE_IND_V02:
+    case QMI_LOC_EVENT_LIVE_BATCHED_POSITION_REPORT_IND_V02:
+    case QMI_LOC_EVENT_BATCH_FULL_NOTIFICATION_IND_V02:
+    case QMI_LOC_READ_FROM_BATCH_IND_V02:
+    case QMI_LOC_RELEASE_BATCH_IND_V02:
+    case QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_IND_V02:
+    case QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_IND_V02:
+    case QMI_LOC_GDT_UPLOAD_END_IND_V02:
+    case QMI_LOC_EVENT_GDT_UPLOAD_BEGIN_STATUS_REQ_IND_V02:
+    case QMI_LOC_EVENT_GDT_UPLOAD_END_REQ_IND_V02:
+    case QMI_LOC_EVENT_GNSS_MEASUREMENT_REPORT_IND_V02:
+    case QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_IND_V02:
+    case QMI_LOC_NI_USER_RESPONSE_IND_V02:
+    case QMI_LOC_INJECT_UTC_TIME_IND_V02:
+    case QMI_LOC_INJECT_POSITION_IND_V02:
+    case QMI_LOC_SET_ENGINE_LOCK_IND_V02:
+    case QMI_LOC_SET_SBAS_CONFIG_IND_V02:
+    case QMI_LOC_SET_NMEA_TYPES_IND_V02:
+    case QMI_LOC_SET_LOW_POWER_MODE_IND_V02:
+    case QMI_LOC_SET_SERVER_IND_V02:
+    case QMI_LOC_DELETE_ASSIST_DATA_IND_V02:
+    case QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02:
+    case QMI_LOC_INJECT_WIFI_POSITION_IND_V02:
+    case QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02:
+    case QMI_LOC_SET_OPERATION_MODE_IND_V02:
+    case QMI_LOC_SET_SPI_STATUS_IND_V02:
+    case QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02:
+    case QMI_LOC_SET_CRADLE_MOUNT_CONFIG_IND_V02:
+    case QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02:
+    case QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02:
+    case QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02:
+    case QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02:
+    case QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02:
+    case QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02:
+    case QMI_LOC_INJECT_MOTION_DATA_IND_V02:
+    case QMI_LOC_INJECT_GSM_CELL_INFO_IND_V02:
+    case QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_IND_V02:
+    case QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_IND_V02:
+    case QMI_LOC_INJECT_WCDMA_CELL_INFO_IND_V02:
+    case QMI_LOC_INJECT_TDSCDMA_CELL_INFO_IND_V02:
+    case QMI_LOC_INJECT_SUBSCRIBER_ID_IND_V02:
+    case QMI_LOC_INJECT_WIFI_AP_DATA_IND_V02:
+    case QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_IND_V02:
+    case QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_IND_V02:
+    case QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_IND_V02:
+    case QMI_LOC_GET_AVAILABLE_WWAN_POSITION_IND_V02:
+    case QMI_LOC_SET_XTRA_VERSION_CHECK_IND_V02:
+    case QMI_LOC_GET_REGISTERED_EVENTS_IND_V02:
+    {
+      status = true;
+      break;
+    }
+    default:
+      LOC_LOGW("%s:%d]: unknown ind id %d\n", __func__, __LINE__,
+                   (uint32_t)indId);
+      status = false;
+      break;
+  }
+  return status;
+}
+
+
+/** locClientErrorCb
+ *  @brief handles the QCCI error events, this is called by the
+ *         QCCI infrastructure when the service is no longer
+ *         available.
+ *  @param [in] user handle
+ *  @param [in] error
+ *  @param [in] *err_cb_data
+ */
+
+static void locClientErrorCb
+(
+  qmi_client_type user_handle,
+  qmi_client_error_type error,
+  void *err_cb_data
+)
+{
+  locClientCallbackDataType* pCallbackData =
+        (locClientCallbackDataType *)err_cb_data;
+  locClientErrorCbType localErrorCallback = NULL;
+
+  /* copy the errorCallback function pointer from the callback
+   * data to local variable. This is to protect against the race
+   * condition between open/close and error callback.
+   */
+  if(NULL != pCallbackData)
+  {
+    localErrorCallback = pCallbackData->errorCallback;
+  }
+
+  LOC_LOGD("%s:%d]: Service Error %d received, pCallbackData = %p\n",
+      __func__, __LINE__, error, err_cb_data);
+
+  /* call the error callback
+   * To avoid calling the errorCallback after locClientClose
+   * is called, check pCallbackData->errorCallback again here
+   */
+
+  if( (NULL != pCallbackData) &&
+      (NULL != localErrorCallback) &&
+      (NULL != pCallbackData->errorCallback) &&
+      (pCallbackData == pCallbackData->pMe)  )
+  {
+    //invoke the error callback for the corresponding client
+    localErrorCallback(
+        (locClientHandleType)pCallbackData,
+        convertQmiErrorToLocError(error),
+        pCallbackData->pClientCookie);
+  }
+}
+
+
+/** locClientIndCb
+ *  @brief handles the indications sent from the service, if a
+ *         response indication was received then the it is sent
+ *         to the response callback. If a event indication was
+ *         received then it is sent to the event callback
+ *  @param [in] user handle
+ *  @param [in] msg_id
+ *  @param [in] ind_buf
+ *  @param [in] ind_buf_len
+ *  @param [in] ind_cb_data */
+
+static void locClientIndCb
+(
+ qmi_client_type                user_handle,
+ unsigned int                   msg_id,
+ void                           *ind_buf,
+ unsigned int                   ind_buf_len,
+ void                           *ind_cb_data
+)
+{
+  locClientIndEnumT indType;
+  size_t indSize = 0;
+  qmi_client_error_type rc ;
+  locClientCallbackDataType* pCallbackData =
+      (locClientCallbackDataType *)ind_cb_data;
+
+  LOC_LOGV("%s:%d]: Indication: msg_id=%d buf_len=%d pCallbackData = %p\n",
+                __func__, __LINE__, (uint32_t)msg_id, ind_buf_len,
+                pCallbackData);
+
+  // check callback data
+  if(NULL == pCallbackData ||(pCallbackData != pCallbackData->pMe))
+  {
+    LOC_LOGE("%s:%d]: invalid callback data", __func__, __LINE__);
+    return;
+  }
+
+  // check user handle
+  if(memcmp(&pCallbackData->userHandle, &user_handle, sizeof(user_handle)))
+  {
+    LOC_LOGE("%s:%d]: invalid user_handle got %p expected %p\n",
+        __func__, __LINE__,
+        user_handle, pCallbackData->userHandle);
+    return;
+  }
+  // Get the indication size and type ( eventInd or respInd)
+  if( true == locClientGetSizeAndTypeByIndId(msg_id, &indSize, &indType))
+  {
+    void *indBuffer = NULL;
+
+    // if the client did not register for this event then just drop it
+     if( (eventIndType == indType) &&
+         ( (NULL == pCallbackData->eventCallback) ||
+         (false == isClientRegisteredForEvent(pCallbackData->eventRegMask, msg_id)) ) )
+    {
+       LOC_LOGW("%s:%d]: client is not registered for event %d\n",
+                     __func__, __LINE__, (uint32_t)msg_id);
+       return;
+    }
+
+    // decode the indication
+    indBuffer = malloc(indSize);
+
+    if(NULL == indBuffer)
+    {
+      LOC_LOGE("%s:%d]: memory allocation failed\n", __func__, __LINE__);
+      return;
+    }
+
+    rc = QMI_NO_ERR;
+
+    if (ind_buf_len > 0)
+    {
+        // decode the indication
+        rc = qmi_client_message_decode(
+            user_handle,
+            QMI_IDL_INDICATION,
+            msg_id,
+            ind_buf,
+            ind_buf_len,
+            indBuffer,
+            indSize);
+    }
+
+    if( rc == QMI_NO_ERR )
+    {
+      //validate indication
+      if (true == locClientHandleIndication(msg_id, indBuffer, indSize))
+      {
+        if(eventIndType == indType)
+        {
+          locClientEventIndUnionType eventIndUnion;
+
+          /* copy the eventCallback function pointer from the callback
+           * data to local variable. This is to protect against the race
+           * condition between open/close and indication callback.
+           */
+           locClientEventIndCbType localEventCallback =
+               pCallbackData->eventCallback;
+
+          // dummy event
+          eventIndUnion.pPositionReportEvent =
+            (qmiLocEventPositionReportIndMsgT_v02 *)indBuffer;
+
+          /* call the event callback
+           * To avoid calling the eventCallback after locClientClose
+           * is called, check pCallbackData->eventCallback again here
+           */
+          if((NULL != localEventCallback) &&
+              (NULL != pCallbackData->eventCallback))
+          {
+            localEventCallback(
+                (locClientHandleType)pCallbackData,
+                msg_id,
+                eventIndUnion,
+                pCallbackData->pClientCookie);
+          }
+        }
+        else if(respIndType == indType)
+        {
+          locClientRespIndUnionType respIndUnion;
+
+          /* copy the respCallback function pointer from the callback
+           * data to local variable. This is to protect against the race
+           * condition between open/close and indication callback.
+           */
+          locClientRespIndCbType localRespCallback =
+              pCallbackData->respCallback;
+
+          // dummy to suppress compiler warnings
+          respIndUnion.pDeleteAssistDataInd =
+            (qmiLocDeleteAssistDataIndMsgT_v02 *)indBuffer;
+
+          /* call the response callback
+           * To avoid calling the respCallback after locClientClose
+           * is called, check pCallbackData->respCallback again here
+           */
+          if((NULL != localRespCallback) &&
+              (NULL != pCallbackData->respCallback))
+          {
+            localRespCallback(
+                (locClientHandleType)pCallbackData,
+                msg_id,
+                respIndUnion,
+                pCallbackData->pClientCookie);
+          }
+        }
+      }
+      else // error handling indication
+      {
+        LOC_LOGE("%s:%d]: Error handling the indication %d\n",
+                      __func__, __LINE__, (uint32_t)msg_id);
+      }
+    }
+    else
+    {
+      LOC_LOGE("%s:%d]: Error decoding indication %d\n",
+                    __func__, __LINE__, rc);
+    }
+    if(indBuffer)
+    {
+      free (indBuffer);
+    }
+  }
+  else // Id not found
+  {
+    LOC_LOGE("%s:%d]: Error indication not found %d\n",
+                  __func__, __LINE__,(uint32_t)msg_id);
+  }
+  return;
+}
+
+
+/** locClientRegisterEventMask
+ *  @brief registers the event mask with loc service
+ *  @param [in] clientHandle
+ *  @param [in] eventRegMask
+ *  @return true if indication was validated; else false */
+
+bool locClientRegisterEventMask(
+    locClientHandleType clientHandle,
+    locClientEventMaskType eventRegMask)
+{
+  locClientStatusEnumType status = eLOC_CLIENT_SUCCESS;
+  locClientReqUnionType reqUnion;
+  qmiLocRegEventsReqMsgT_v02 regEventsReq;
+
+  memset(&regEventsReq, 0, sizeof(regEventsReq));
+
+  regEventsReq.eventRegMask = eventRegMask;
+  reqUnion.pRegEventsReq = &regEventsReq;
+
+  status = locClientSendReq(clientHandle,
+                            QMI_LOC_REG_EVENTS_REQ_V02,
+                            reqUnion);
+
+  if(eLOC_CLIENT_SUCCESS != status )
+  {
+    LOC_LOGE("%s:%d] status %s\n", __func__, __LINE__,
+             loc_get_v02_client_status_name(status) );
+    return false;
+  }
+
+  return true;
+}
+
+/**  validateRequest
+  @brief validates the input request
+  @param [in] reqId       request ID
+  @param [in] reqPayload  Union of pointers to message payload
+  @param [out] ppOutData  Pointer to void *data if successful
+  @param [out] pOutLen    Pointer to length of data if succesful.
+  @return false on failure, true on Success
+*/
+
+static bool validateRequest(
+  uint32_t                    reqId,
+  const locClientReqUnionType reqPayload,
+  void                        **ppOutData,
+  uint32_t                    *pOutLen )
+
+{
+  bool noPayloadFlag = false;
+
+  LOC_LOGV("%s:%d]: reqId = %d\n", __func__, __LINE__, reqId);
+  switch(reqId)
+  {
+    case QMI_LOC_INFORM_CLIENT_REVISION_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInformClientRevisionReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_REG_EVENTS_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocRegEventsReqMsgT_v02);
+       break;
+    }
+
+    case QMI_LOC_START_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocStartReqMsgT_v02);
+       break;
+    }
+
+    case QMI_LOC_STOP_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocStopReqMsgT_v02);
+       break;
+    }
+
+    case QMI_LOC_NI_USER_RESPONSE_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocNiUserRespReqMsgT_v02);
+       break;
+    }
+
+    case QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectPredictedOrbitsDataReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INJECT_UTC_TIME_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectUtcTimeReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INJECT_POSITION_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectPositionReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_ENGINE_LOCK_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetEngineLockReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_SBAS_CONFIG_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetSbasConfigReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_NMEA_TYPES_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetNmeaTypesReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_LOW_POWER_MODE_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetLowPowerModeReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_SERVER_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetServerReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_DELETE_ASSIST_DATA_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocDeleteAssistDataReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetXtraTSessionControlReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INJECT_WIFI_POSITION_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectWifiPositionReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocNotifyWifiStatusReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_OPERATION_MODE_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetOperationModeReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_SPI_STATUS_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetSpiStatusReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INJECT_SENSOR_DATA_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectSensorDataReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectTimeSyncDataReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_CRADLE_MOUNT_CONFIG_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetCradleMountConfigReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetExternalPowerConfigReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInformLocationServerConnStatusReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetProtocolConfigParametersReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocGetProtocolConfigParametersReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetSensorControlConfigReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocGetSensorPropertiesReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetSensorPropertiesReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectSuplCertificateReqMsgT_v02);
+      break;
+    }
+    case QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocDeleteSuplCertificateReqMsgT_v02);
+      break;
+    }
+    case QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocSetPositionEngineConfigParametersReqMsgT_v02);
+      break;
+    }
+    case QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocGetPositionEngineConfigParametersReqMsgT_v02);
+      break;
+    }
+    case QMI_LOC_ADD_CIRCULAR_GEOFENCE_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocAddCircularGeofenceReqMsgT_v02);
+      break;
+    }
+    case QMI_LOC_DELETE_GEOFENCE_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocDeleteGeofenceReqMsgT_v02);
+      break;
+    }
+    case QMI_LOC_QUERY_GEOFENCE_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocQueryGeofenceReqMsgT_v02);
+      break;
+    }
+    case QMI_LOC_EDIT_GEOFENCE_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocEditGeofenceReqMsgT_v02);
+      break;
+    }
+    case QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocGetBestAvailablePositionReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INJECT_MOTION_DATA_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectMotionDataReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_GET_NI_GEOFENCE_ID_LIST_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocGetNiGeofenceIdListReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INJECT_GSM_CELL_INFO_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectGSMCellInfoReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectNetworkInitiatedMessageReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_PEDOMETER_REPORT_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocPedometerReportReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INJECT_WCDMA_CELL_INFO_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectWCDMACellInfoReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INJECT_TDSCDMA_CELL_INFO_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectTDSCDMACellInfoReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INJECT_SUBSCRIBER_ID_IND_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectSubscriberIDReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_INJECT_WIFI_AP_DATA_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectWifiApDataReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_GET_BATCH_SIZE_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocGetBatchSizeReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_START_BATCHING_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocStartBatchingReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_READ_FROM_BATCH_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocReadFromBatchReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_STOP_BATCHING_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocStopBatchingReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_RELEASE_BATCH_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocReleaseBatchReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_XTRA_VERSION_CHECK_REQ_V02:
+    {
+        *pOutLen = sizeof(qmiLocSetXtraVersionCheckReqMsgT_v02);
+        break;
+    }
+
+    case QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocInjectVehicleSensorDataReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocNotifyWifiAttachmentStatusReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_REQ_V02:
+    {
+      *pOutLen = sizeof(qmiLocNotifyWifiEnabledStatusReqMsgT_v02);
+      break;
+    }
+
+    case QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_REQ_V02:
+    {
+        *pOutLen = sizeof(qmiLocSetPremiumServicesCfgReqMsgT_v02);
+        break;
+    }
+
+    case QMI_LOC_GET_AVAILABLE_WWAN_POSITION_REQ_V02:
+    {
+        *pOutLen = sizeof(qmiLocGetAvailWwanPositionReqMsgT_v02);
+        break;
+    }
+
+    case QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_REQ_V02:
+    {
+        *pOutLen = sizeof(qmiLocInjectGtpClientDownloadedDataReqMsgT_v02);
+        break;
+    }
+
+    case QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_REQ_V02:
+    {
+        *pOutLen = sizeof(qmiLocGdtUploadBeginStatusReqMsgT_v02);
+        break;
+    }
+
+    case QMI_LOC_GDT_UPLOAD_END_REQ_V02:
+    {
+        *pOutLen = sizeof(qmiLocGdtUploadEndReqMsgT_v02);
+        break;
+    }
+
+    case QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_V02:
+    {
+        *pOutLen = sizeof(qmiLocSetGNSSConstRepConfigReqMsgT_v02);
+        break;
+    }
+
+    // ALL requests with no payload
+    case QMI_LOC_GET_SERVICE_REVISION_REQ_V02:
+    case QMI_LOC_GET_FIX_CRITERIA_REQ_V02:
+    case QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_REQ_V02:
+    case QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_REQ_V02:
+    case QMI_LOC_GET_ENGINE_LOCK_REQ_V02:
+    case QMI_LOC_GET_SBAS_CONFIG_REQ_V02:
+    case QMI_LOC_GET_NMEA_TYPES_REQ_V02:
+    case QMI_LOC_GET_LOW_POWER_MODE_REQ_V02:
+    case QMI_LOC_GET_SERVER_REQ_V02:
+    case QMI_LOC_GET_XTRA_T_SESSION_CONTROL_REQ_V02:
+    case QMI_LOC_GET_REGISTERED_EVENTS_REQ_V02:
+    case QMI_LOC_GET_OPERATION_MODE_REQ_V02:
+    case QMI_LOC_GET_CRADLE_MOUNT_CONFIG_REQ_V02:
+    case QMI_LOC_GET_EXTERNAL_POWER_CONFIG_REQ_V02:
+    case QMI_LOC_GET_SENSOR_CONTROL_CONFIG_REQ_V02:
+    case QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02:
+    case QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_REQ_V02:
+    case QMI_LOC_GET_SUPPORTED_MSGS_REQ_V02:
+    case QMI_LOC_GET_SUPPORTED_FIELDS_REQ_V02:
+    {
+      noPayloadFlag = true;
+      break;
+    }
+
+    default:
+      LOC_LOGW("%s:%d]: Error unknown reqId=%d\n", __func__, __LINE__,
+                    reqId);
+      return false;
+  }
+  if(true == noPayloadFlag)
+  {
+    *ppOutData = NULL;
+    *pOutLen = 0;
+  }
+  else
+  {
+    //set dummy pointer for request union
+    *ppOutData = (void*) reqPayload.pInformClientRevisionReq;
+  }
+  LOC_LOGV("%s:%d]: reqId=%d, len = %d\n", __func__, __LINE__,
+                reqId, *pOutLen);
+  return true;
+}
+
+/** locClientQmiCtrlPointInit
+ @brief wait for the service to come up or timeout; when the
+        service comes up initialize the control point and set
+        internal handle and indication callback.
+ @param pQmiClient,
+*/
+
+static locClientStatusEnumType locClientQmiCtrlPointInit(
+    locClientCallbackDataType *pLocClientCbData,
+    int instanceId)
+{
+  qmi_client_type clnt, notifier;
+  bool notifierInitFlag = false;
+  locClientStatusEnumType status = eLOC_CLIENT_SUCCESS;
+  // os_params must stay in the same scope as notifier
+  // because when notifier is initialized, the pointer
+  // of os_params is retained in QMI framework, and it
+  // used when notifier is released.
+  qmi_client_os_params os_params;
+  // instances of this service
+  qmi_service_info serviceInfo;
+
+  do
+  {
+    qmi_client_error_type rc = QMI_NO_ERR;
+
+    // Get the service object for the qmiLoc Service
+    qmi_idl_service_object_type locClientServiceObject =
+      loc_get_service_object_v02();
+
+    // Verify that qmiLoc_get_service_object did not return NULL
+    if (NULL == locClientServiceObject)
+    {
+        LOC_LOGE("%s:%d]: qmiLoc_get_service_object_v02 failed\n" ,
+                    __func__, __LINE__ );
+       status = eLOC_CLIENT_FAILURE_INTERNAL;
+       break;
+    }
+
+    // register for service notification
+    rc = qmi_client_notifier_init(locClientServiceObject, &os_params, &notifier);
+    notifierInitFlag = (NULL != notifier);
+
+    if (rc != QMI_NO_ERR) {
+        LOC_LOGE("%s:%d]: qmi_client_notifier_init failed %d\n",
+                 __func__, __LINE__, rc);
+        status = eLOC_CLIENT_FAILURE_INTERNAL;
+        break;
+    }
+
+    while (1) {
+        QMI_CCI_OS_SIGNAL_CLEAR(&os_params);
+
+        if (instanceId >= 0) {
+            // use instance-specific lookup
+            rc = qmi_client_get_service_instance(locClientServiceObject, instanceId, &serviceInfo);
+        } else {
+            // lookup service with any instance id
+            rc = qmi_client_get_any_service(locClientServiceObject, &serviceInfo);
+        }
+
+        // get the service addressing information
+        LOC_LOGV("%s:%d]: qmi_client_get_service() rc: %d ", __func__, __LINE__, rc);
+
+        if(rc == QMI_NO_ERR)
+            break;
+
+        QMI_CCI_OS_SIGNAL_WAIT(&os_params, 0);
+    }
+
+    LOC_LOGV("%s:%d]: passing the pointer %p to qmi_client_init \n",
+                      __func__, __LINE__, pLocClientCbData);
+
+    // initialize the client
+    //sent the address of the first service found
+    // if IPC router is present, this will go to the service instance
+    // enumerated over IPC router, else it will go over the next transport where
+    // the service was enumerated.
+    rc = qmi_client_init(&serviceInfo, locClientServiceObject,
+                         locClientIndCb, (void *) pLocClientCbData,
+                         NULL, &clnt);
+
+    if(rc != QMI_NO_ERR)
+    {
+      LOC_LOGE("%s:%d]: qmi_client_init error %d\n",
+                    __func__, __LINE__, rc);
+
+      status = eLOC_CLIENT_FAILURE_INTERNAL;
+      break;
+    }
+
+    LOC_LOGV("%s:%d]: passing the pointer %p to"
+                  "qmi_client_register_error_cb \n",
+                   __func__, __LINE__, pLocClientCbData);
+
+    // register error callback
+    rc  = qmi_client_register_error_cb(clnt,
+        locClientErrorCb, (void *) pLocClientCbData);
+
+    if( QMI_NO_ERR != rc)
+    {
+      LOC_LOGE("%s:%d]: could not register QCCI error callback error:%d\n",
+                    __func__, __LINE__, rc);
+
+      status = eLOC_CLIENT_FAILURE_INTERNAL;
+      break;
+    }
+
+    // copy the clnt handle returned in qmi_client_init
+    memcpy(&(pLocClientCbData->userHandle), &clnt, sizeof(qmi_client_type));
+
+    status = eLOC_CLIENT_SUCCESS;
+
+  } while(0);
+
+  /* release the notifier handle */
+  if(true == notifierInitFlag)
+  {
+    qmi_client_release(notifier);
+  }
+
+  return status;
+}
+//----------------------- END INTERNAL FUNCTIONS ----------------------------------------
+
+/** locClientOpenInstance
+  @brief Connects a location client to the location engine. If the connection
+         is successful, returns a handle that the location client uses for
+         future location operations.
+
+  @param [in] eventRegMask     Mask of asynchronous events the client is
+                               interested in receiving
+  @param [in] instanceId       Value of QMI service instance id to use.
+  @param [in] eventIndCb       Function to be invoked to handle an event.
+  @param [in] respIndCb        Function to be invoked to handle a response
+                               indication.
+  @param [out] locClientHandle Handle to be used by the client
+                               for any subsequent requests.
+
+  @return
+  One of the following error codes:
+  - eLOC_CLIENT_SUCCESS  -- If the connection is opened.
+  - non-zero error code(see locClientStatusEnumType)--  On failure.
+*/
+locClientStatusEnumType locClientOpenInstance (
+  locClientEventMaskType         eventRegMask,
+  int                            instanceId,
+  const locClientCallbacksType*  pLocClientCallbacks,
+  locClientHandleType*           pLocClientHandle,
+  const void*                    pClientCookie)
+{
+  locClientStatusEnumType status = eLOC_CLIENT_SUCCESS;
+  locClientCallbackDataType *pCallbackData = NULL;
+
+  // check input parameters
+  if( (NULL == pLocClientCallbacks) || (NULL == pLocClientHandle)
+      || (NULL == pLocClientCallbacks->respIndCb) ||
+      (pLocClientCallbacks->size != sizeof(locClientCallbacksType)))
+  {
+    LOC_LOGE("%s:%d]: Invalid parameters in locClientOpen\n",
+             __func__, __LINE__);
+    return eLOC_CLIENT_FAILURE_INVALID_PARAMETER;
+  }
+
+  do
+  {
+    // Allocate memory for the callback data
+    pCallbackData =
+        ( locClientCallbackDataType*)calloc(
+            1, sizeof(locClientCallbackDataType));
+
+    if(NULL == pCallbackData)
+    {
+      LOC_LOGE("%s:%d]: Could not allocate memory for callback data \n",
+                        __func__, __LINE__);
+      status = eLOC_CLIENT_FAILURE_INTERNAL;
+      break;
+    }
+
+    /* Initialize the QMI control point; this function will block
+     * until a service is up or a timeout occurs. If the connection to
+     * the service succeeds the callback data will be filled in with
+     * a qmi_client value.
+     */
+
+
+    EXIT_LOG_CALLFLOW(%s, "loc client open");
+    status = locClientQmiCtrlPointInit(pCallbackData, instanceId);
+
+    LOC_LOGV ("%s:%d] locClientQmiCtrlPointInit returned %d\n",
+                    __func__, __LINE__, status);
+
+    if(status != eLOC_CLIENT_SUCCESS)
+    {
+      free(pCallbackData);
+      pCallbackData = NULL;
+      LOC_LOGE ("%s:%d] locClientQmiCtrlPointInit returned %d\n",
+                    __func__, __LINE__, status);
+      break;
+    }
+     // set the self pointer
+    pCallbackData->pMe = pCallbackData;
+     // set the handle to the callback data
+    *pLocClientHandle = (locClientHandleType)pCallbackData;
+
+    if(true != locClientRegisterEventMask(*pLocClientHandle,eventRegMask))
+    {
+      LOC_LOGE("%s:%d]: Error sending registration mask\n",
+                  __func__, __LINE__);
+
+      // release the client
+      locClientClose(pLocClientHandle);
+
+      status = eLOC_CLIENT_FAILURE_INTERNAL;
+      break;
+    }
+
+    /* Initialize rest of the client structure now that the connection
+     * to the service has been created successfully.
+     */
+
+    //fill in the event callback
+     pCallbackData->eventCallback = pLocClientCallbacks->eventIndCb;
+
+     //fill in the response callback
+     pCallbackData->respCallback = pLocClientCallbacks->respIndCb;
+
+     //fill in the error callback
+     pCallbackData->errorCallback = pLocClientCallbacks->errorCb;
+
+     //set the client event registration mask
+     pCallbackData->eventRegMask = eventRegMask;
+
+     // set the client cookie
+     pCallbackData->pClientCookie = (void *)pClientCookie;
+
+  }while(0);
+
+  if(eLOC_CLIENT_SUCCESS != status)
+  {
+    *pLocClientHandle = LOC_CLIENT_INVALID_HANDLE_VALUE;
+    LOC_LOGE("%s:%d]: Error! status = %d\n", __func__, __LINE__,status);
+  }
+
+  else
+  {
+    LOC_LOGD("%s:%d]: returning handle = %p, user_handle=%p, status = %d\n",
+                __func__, __LINE__, *pLocClientHandle,
+                pCallbackData->userHandle, status);
+  }
+
+  return(status);
+}
+
+/** locClientOpen
+  @brief Connects a location client to the location engine. If the connection
+         is successful, returns a handle that the location client uses for
+         future location operations.
+
+  @param [in] eventRegMask     Mask of asynchronous events the client is
+                               interested in receiving
+  @param [in] eventIndCb       Function to be invoked to handle an event.
+  @param [in] respIndCb        Function to be invoked to handle a response
+                               indication.
+  @param [out] locClientHandle Handle to be used by the client
+                               for any subsequent requests.
+
+  @return
+  One of the following error codes:
+  - eLOC_CLIENT_SUCCESS  -- If the connection is opened.
+  - non-zero error code(see locClientStatusEnumType)--  On failure.
+*/
+
+locClientStatusEnumType locClientOpen (
+  locClientEventMaskType         eventRegMask,
+  const locClientCallbacksType*  pLocClientCallbacks,
+  locClientHandleType*           pLocClientHandle,
+  const void*                    pClientCookie)
+{
+  int instanceId;
+  locClientStatusEnumType status;
+  int tries = 1;
+#ifdef _ANDROID_
+  switch (getTargetGnssType(loc_get_target()))
+  {
+  case GNSS_GSS:
+    instanceId = eLOC_CLIENT_INSTANCE_ID_GSS;
+    break;
+  case GNSS_QCA1530:
+    instanceId = eLOC_CLIENT_INSTANCE_ID_QCA1530;
+    break;
+  case GNSS_MSM:
+    instanceId = eLOC_CLIENT_INSTANCE_ID_MSM;
+    break;
+  case GNSS_MDM:
+    instanceId = eLOC_CLIENT_INSTANCE_ID_MDM;
+    break;
+  case GNSS_AUTO:
+    instanceId = eLOC_CLIENT_INSTANCE_ID_GSS_AUTO;
+    break;
+  default:
+    instanceId = eLOC_CLIENT_INSTANCE_ID_ANY;
+    break;
+  }
+
+  LOC_LOGI("%s:%d]: Service instance id is %d\n",
+             __func__, __LINE__, instanceId);
+#else
+  instanceId = eLOC_CLIENT_INSTANCE_ID_ANY;
+#endif
+
+  while ((status = locClientOpenInstance(eventRegMask, instanceId, pLocClientCallbacks,
+          pLocClientHandle, pClientCookie)) != eLOC_CLIENT_SUCCESS) {
+    if (tries <= LOC_CLIENT_MAX_OPEN_RETRIES) {
+      LOC_LOGE("%s:%d]: failed with status=%d on try %d",
+               __func__, __LINE__, status, tries);
+      tries++;
+      sleep(LOC_CLIENT_TIME_BETWEEN_OPEN_RETRIES);
+    } else {
+      LOC_LOGE("%s:%d]: failed with status=%d Aborting...",
+               __func__, __LINE__, status);
+      break;
+    }
+  }
+
+  return status;
+}
+
+/** locClientClose
+  @brief Disconnects a client from the location engine.
+  @param [in] pLocClientHandle  Pointer to the handle returned by the
+                                locClientOpen() function.
+  @return
+  One of the following error codes:
+  - 0 (eLOC_CLIENT_SUCCESS) - On success.
+  - non-zero error code(see locClientStatusEnumType) - On failure.
+*/
+
+locClientStatusEnumType locClientClose(
+  locClientHandleType* pLocClientHandle)
+{
+  // convert handle to callback data
+  locClientCallbackDataType *pCallbackData;
+  qmi_client_error_type rc = QMI_NO_ERR; //No error
+
+  if(NULL == pLocClientHandle)
+  {
+    // invalid handle
+    LOC_LOGE("%s:%d]: invalid pointer to handle \n",
+                  __func__, __LINE__);
+
+    return(eLOC_CLIENT_FAILURE_INVALID_PARAMETER);
+  }
+
+  pCallbackData = (locClientCallbackDataType *)(*pLocClientHandle);
+
+  // check the input handle for sanity
+  if(NULL == pCallbackData ||
+     NULL == pCallbackData->userHandle ||
+     pCallbackData != pCallbackData->pMe )
+  {
+    // invalid handle
+    LOC_LOGE("%s:%d]: invalid handle \n",
+                  __func__, __LINE__);
+
+    return(eLOC_CLIENT_FAILURE_INVALID_HANDLE);
+  }
+
+  LOC_LOGV("locClientClose releasing handle %p, user handle %p\n",
+      *pLocClientHandle, pCallbackData->userHandle );
+
+  // NEXT call goes out to modem. We log the callflow before it
+  // actually happens to ensure the this comes before resp callflow
+  // back from the modem, to avoid confusing log order. We trust
+  // that the QMI framework is robust.
+  EXIT_LOG_CALLFLOW(%s, "loc client close");
+
+  // release the handle
+  rc = qmi_client_release(pCallbackData->userHandle);
+  if(QMI_NO_ERR != rc )
+  {
+    LOC_LOGW("%s:%d]: qmi_client_release error %d for client %p\n",
+                   __func__, __LINE__, rc, pCallbackData->userHandle);
+    return(eLOC_CLIENT_FAILURE_INTERNAL);
+  }
+
+  /* clear the memory allocated to callback data to minimize the chances
+   *  of a race condition occurring between close and the indication
+   *  callback
+   */
+  memset(pCallbackData, 0, sizeof(*pCallbackData));
+
+  // free the memory assigned in locClientOpen
+  free(pCallbackData);
+  pCallbackData= NULL;
+
+  // set the handle to invalid value
+  *pLocClientHandle = LOC_CLIENT_INVALID_HANDLE_VALUE;
+  return eLOC_CLIENT_SUCCESS;
+}
+
+/** locClientSendReq
+  @brief Sends a message to the location engine. If the locClientSendMsg()
+         function is successful, the client should expect an indication
+         (except start, stop, event reg and sensor injection messages),
+         through the registered callback in the locOpen() function. The
+         indication will contain the status of the request and if status is a
+         success, indication also contains the payload
+         associated with response.
+  @param [in] handle Handle returned by the locClientOpen()
+              function.
+  @param [in] reqId         message ID of the request
+  @param [in] reqPayload   Payload of the request, can be NULL
+                            if request has no payload
+
+  @return
+  One of the following error codes:
+  - 0 (eLOC_CLIENT_SUCCESS ) - On success.
+  - non-zero error code (see locClientStatusEnumType) - On failure.
+*/
+
+locClientStatusEnumType locClientSendReq(
+  locClientHandleType      handle,
+  uint32_t                 reqId,
+  locClientReqUnionType    reqPayload )
+{
+  locClientStatusEnumType status = eLOC_CLIENT_SUCCESS;
+  qmi_client_error_type rc = QMI_NO_ERR; //No error
+  qmiLocGenRespMsgT_v02 resp;
+  uint32_t reqLen = 0;
+  void *pReqData = NULL;
+  locClientCallbackDataType *pCallbackData =
+        (locClientCallbackDataType *)handle;
+
+  // check the input handle for sanity
+   if(NULL == pCallbackData ||
+      NULL == pCallbackData->userHandle ||
+      pCallbackData != pCallbackData->pMe )
+   {
+     // did not find the handle in the client List
+     LOC_LOGE("%s:%d]: invalid handle \n",
+                   __func__, __LINE__);
+
+     return(eLOC_CLIENT_FAILURE_INVALID_HANDLE);
+   }
+
+  // validate that the request is correct
+  if (validateRequest(reqId, reqPayload, &pReqData, &reqLen) == false)
+  {
+
+    LOC_LOGE("%s:%d] error invalid request\n", __func__,
+                __LINE__);
+
+    return(eLOC_CLIENT_FAILURE_INVALID_PARAMETER);
+  }
+
+  LOC_LOGV("%s:%d] sending reqId= %d, len = %d\n", __func__,
+                __LINE__, reqId, reqLen);
+
+  // NEXT call goes out to modem. We log the callflow before it
+  // actually happens to ensure the this comes before resp callflow
+  // back from the modem, to avoid confusing log order. We trust
+  // that the QMI framework is robust.
+  EXIT_LOG_CALLFLOW(%s, loc_get_v02_event_name(reqId));
+  rc = qmi_client_send_msg_sync(
+      pCallbackData->userHandle,
+      reqId,
+      pReqData,
+      reqLen,
+      &resp,
+      sizeof(resp),
+      LOC_CLIENT_ACK_TIMEOUT);
+
+  LOC_LOGV("%s:%d] qmi_client_send_msg_sync returned %d\n", __func__,
+                __LINE__, rc);
+
+  if (QMI_SERVICE_ERR == rc)
+  {
+    LOC_LOGE("%s:%d]: send_msg_sync error: QMI_SERVICE_ERR\n",__func__, __LINE__);
+    return(eLOC_CLIENT_FAILURE_PHONE_OFFLINE);
+  }
+  else if (rc != QMI_NO_ERR)
+  {
+    LOC_LOGE("%s:%d]: send_msg_sync error: %d\n",__func__, __LINE__, rc);
+    return(eLOC_CLIENT_FAILURE_INTERNAL);
+  }
+
+  // map the QCCI response to Loc API v02 status
+  status = convertQmiResponseToLocStatus(&resp);
+
+  // if the request is to change registered events, update the
+  // loc api copy of that
+  if(eLOC_CLIENT_SUCCESS == status &&
+      QMI_LOC_REG_EVENTS_REQ_V02 == reqId)
+  {
+    if(NULL != reqPayload.pRegEventsReq )
+    {
+      pCallbackData->eventRegMask =
+        (locClientEventMaskType)(reqPayload.pRegEventsReq->eventRegMask);
+    }
+  }
+  return(status);
+}
+
+/** locClientSupportMsgCheck
+  @brief Sends a QMI_LOC_GET_SUPPORTED_MSGS_REQ_V02 message to the
+         location engine, and then receives a list of all services supported
+         by the engine. This function will check if the input service(s) form
+         the client is in the list or not. If the locClientSupportMsgCheck()
+         function is successful, the client should expect an result of
+         the service is supported or not recorded in supportedMsg.
+  @param [in] handle Handle returned by the locClientOpen()
+              function.
+  @param [in] supportedMsg   an integer used to record which
+                             message is supported
+
+  @return
+  One of the following error codes:
+  - 0 (eLOC_CLIENT_SUCCESS) -- On success.
+  - Non-zero error code (see \ref locClientStatusEnumType) -- On failure.
+*/
+
+locClientStatusEnumType locClientSupportMsgCheck(
+     locClientHandleType      handle,
+     const uint32_t*          msgArray,
+     uint32_t                 msgArrayLength,
+     uint64_t*                supportedMsg)
+{
+
+  // set to true if one client has checked the modem capability.
+  static bool isCheckedAlready = false;
+  /*
+  The 1st bit in supportedMsgChecked indicates if
+      QMI_LOC_EVENT_GEOFENCE_BATCHED_BREACH_NOTIFICATION_IND_V02
+      is supported or not;
+  The 2ed bit in supportedMsgChecked indicates if
+      QMI_LOC_GET_BATCH_SIZE_REQ_V02
+      is supported or not;
+  */
+  static uint64_t supportedMsgChecked = 0;
+
+  if (isCheckedAlready) {
+    // already checked modem
+    LOC_LOGV("%s:%d]: Already checked. The supportedMsgChecked is %lld\n",
+             __func__, __LINE__, supportedMsgChecked);
+    *supportedMsg = supportedMsgChecked;
+    return eLOC_CLIENT_SUCCESS;
+  }
+
+  locClientStatusEnumType status = eLOC_CLIENT_SUCCESS;
+  qmi_client_error_type rc = QMI_NO_ERR; //No error
+  qmiLocGetSupportMsgT_v02 resp;
+
+  uint32_t reqLen = 0;
+  void *pReqData = NULL;
+  locClientCallbackDataType *pCallbackData =
+        (locClientCallbackDataType *)handle;
+
+  // check the input handle for sanity
+   if( NULL == pCallbackData ||
+       NULL == pCallbackData->userHandle ||
+       pCallbackData != pCallbackData->pMe ) {
+     // did not find the handle in the client List
+     LOC_LOGE("%s:%d]: invalid handle \n",
+                   __func__, __LINE__);
+
+     return eLOC_CLIENT_FAILURE_GENERAL;
+   }
+
+  // NEXT call goes out to modem. We log the callflow before it
+  // actually happens to ensure the this comes before resp callflow
+  // back from the modem, to avoid confusing log order. We trust
+  // that the QMI framework is robust.
+
+  EXIT_LOG_CALLFLOW(%s, loc_get_v02_event_name(QMI_LOC_GET_SUPPORTED_MSGS_REQ_V02));
+  rc = qmi_client_send_msg_sync(
+      pCallbackData->userHandle,
+      QMI_LOC_GET_SUPPORTED_MSGS_REQ_V02,
+      pReqData,
+      reqLen,
+      &resp,
+      sizeof(resp),
+      LOC_CLIENT_ACK_TIMEOUT);
+
+  LOC_LOGV("%s:%d] qmi_client_send_msg_sync returned %d\n", __func__,
+                __LINE__, rc);
+
+  if (rc != QMI_NO_ERR)
+  {
+    LOC_LOGE("%s:%d]: send_msg_sync error: %d\n",__func__, __LINE__, rc);
+    return eLOC_CLIENT_FAILURE_GENERAL;
+  }
+
+  // map the QCCI response to Loc API v02 status
+  status = convertQmiResponseToLocStatus(&resp);
+
+  if(eLOC_CLIENT_SUCCESS == status)
+  {
+    LOC_LOGV("%s:%d]eLOC_CLIENT_SUCCESS == status\n", __func__, __LINE__);
+
+    // check every message listed in msgArray supported by modem or not
+    checkQmiMsgsSupported(msgArray, msgArrayLength, &resp, &supportedMsgChecked);
+
+    LOC_LOGV("%s:%d]: supportedMsgChecked is %lld\n",
+             __func__, __LINE__, supportedMsgChecked);
+    *supportedMsg = supportedMsgChecked;
+    isCheckedAlready = true;
+    return status;
+  } else {
+
+    LOC_LOGE("%s:%d]: convertQmiResponseToLocStatus error: %d\n",
+            __func__, __LINE__, status);
+    return eLOC_CLIENT_FAILURE_GENERAL;
+  }
+}
+
+/** locClientGetSizeByRespIndId
+ *  @brief Get the size of the response indication structure,
+ *         from a specified id
+ *  @param [in]  respIndId
+ *  @param [out] pRespIndSize
+ *  @return true if resp ID was found; else false
+*/
+
+bool locClientGetSizeByRespIndId(uint32_t respIndId, size_t *pRespIndSize)
+{
+  size_t idx = 0, respIndTableSize = 0;
+  respIndTableSize = (sizeof(locClientRespIndTable)/sizeof(locClientRespIndTableStructT));
+  for(idx=0; idx<respIndTableSize; idx++ )
+  {
+    if(respIndId == locClientRespIndTable[idx].respIndId)
+    {
+      // found
+      *pRespIndSize = locClientRespIndTable[idx].respIndSize;
+
+      LOC_LOGV("%s:%d]: resp ind Id %d size = %d\n", __func__, __LINE__,
+                    respIndId, (uint32_t)*pRespIndSize);
+      return true;
+    }
+  }
+
+  //not found
+  return false;
+}
+
+
+/** locClientGetSizeByEventIndId
+ *  @brief Gets the size of the event indication structure, from
+ *         a specified id
+ *  @param [in]  eventIndId
+ *  @param [out] pEventIndSize
+ *  @return true if event ID was found; else false
+*/
+bool locClientGetSizeByEventIndId(uint32_t eventIndId, size_t *pEventIndSize)
+{
+  size_t idx = 0, eventIndTableSize = 0;
+
+  // look in the event table
+  eventIndTableSize =
+    (sizeof(locClientEventIndTable)/sizeof(locClientEventIndTableStructT));
+
+  for(idx=0; idx<eventIndTableSize; idx++ )
+  {
+    if(eventIndId == locClientEventIndTable[idx].eventId)
+    {
+      // found
+      *pEventIndSize = locClientEventIndTable[idx].eventSize;
+
+      LOC_LOGV("%s:%d]: event ind Id %d size = %d\n", __func__, __LINE__,
+                    eventIndId, (uint32_t)*pEventIndSize);
+      return true;
+    }
+  }
+  // not found
+  return false;
+}
diff --git a/gps/loc_api/loc_api_v02/loc_api_v02_client.h b/gps/loc_api/loc_api_v02/loc_api_v02_client.h
new file mode 100644
index 0000000..53d9d79
--- /dev/null
+++ b/gps/loc_api/loc_api_v02/loc_api_v02_client.h
@@ -0,0 +1,1592 @@
+/* Copyright (c) 2011-2014, 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.
+ */
+
+/** @file loc_api_v02_client.h
+*/
+
+#ifndef LOC_API_V02_CLIENT_H
+#define LOC_API_V02_CLIENT_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*=============================================================================
+ *
+ *                             DATA DECLARATION
+ *
+ *============================================================================*/
+#include <stdbool.h>
+#include <stdint.h>
+
+#include "location_service_v02.h"  //QMI LOC Service data types definitions
+
+#include <stddef.h>
+
+/******************************************************************************
+ *  Constants and configuration
+ *****************************************************************************/
+
+/** @ingroup constants_macros
+  Specific value of #locClientHandleType, indicating an invalid handle. */
+#define LOC_CLIENT_INVALID_HANDLE_VALUE (NULL)
+
+
+/** @addtogroup data_types
+@{ */
+
+/** Location client handle used to represent a specific client. Negative values
+    are invalid handles.
+*/
+typedef void* locClientHandleType;
+
+/** Data type for events and event masks. */
+typedef uint64_t locClientEventMaskType;
+
+/** Location client status values.
+*/
+typedef enum
+{
+  eLOC_CLIENT_SUCCESS                              = 0,
+  /**< Request was successful. */
+
+  eLOC_CLIENT_FAILURE_GENERAL                      = 1,
+  /**< Failed because of a general failure. */
+
+  eLOC_CLIENT_FAILURE_UNSUPPORTED                  = 2,
+  /**< Failed because the service does not support the command. */
+
+  eLOC_CLIENT_FAILURE_INVALID_PARAMETER            = 3,
+  /**< Failed because the request contained invalid parameters. */
+
+  eLOC_CLIENT_FAILURE_ENGINE_BUSY                  = 4,
+  /**< Failed because the engine is busy. */
+
+  eLOC_CLIENT_FAILURE_PHONE_OFFLINE                = 5,
+  /**< Failed because the phone is offline. */
+
+  eLOC_CLIENT_FAILURE_TIMEOUT                      = 6,
+  /**< Failed because of a timeout. */
+
+  eLOC_CLIENT_FAILURE_SERVICE_NOT_PRESENT          = 7,
+  /**< Failed because the service is not present. */
+
+  eLOC_CLIENT_FAILURE_SERVICE_VERSION_UNSUPPORTED  = 8,
+  /**< Failed because the service version is unsupported. */
+
+  eLOC_CLIENT_FAILURE_CLIENT_VERSION_UNSUPPORTED  =  9,
+  /**< Failed because the service does not support client version. */
+
+  eLOC_CLIENT_FAILURE_INVALID_HANDLE               = 10,
+  /**< Failed because an invalid handle was specified. */
+
+  eLOC_CLIENT_FAILURE_INTERNAL                     = 11,
+  /**< Failed because of an internal error in the service. */
+
+  eLOC_CLIENT_FAILURE_NOT_INITIALIZED              = 12,
+  /**< Failed because the service has not been initialized. */
+
+  eLOC_CLIENT_FAILURE_NOT_ENOUGH_MEMORY             = 13
+  /**< Failed because there is not enough memory to do the operation. */
+
+}locClientStatusEnumType;
+
+/** Location client error values
+*/
+typedef enum
+{
+  eLOC_CLIENT_ERROR_SERVICE_UNAVAILABLE            = 1
+  /**< Service is no longer available. Upon getting this error, the client
+       must close the existing connection and reopen the connection. */
+
+}locClientErrorEnumType;
+
+
+/** Request messages the client can send to the location engine.
+
+  The following requests do not have any data associated, so they do not have a
+  payload structure defined:
+
+  - GetServiceRevision
+  - GetFixCriteria
+  - GetPredictedOrbitsDataSource
+  - GetPredictedOrbitsDataValidity
+  - GetEngineLock
+  - GetSbasConfigReq
+  - GetRegisteredEvents
+  - GetNmeaTypes
+  - GetLowPowerMode
+  - GetXtraTSessionControl
+  - GetRegisteredEvents
+  - GetOperationMode
+  - GetCradleMountConfig
+  - GetExternalPowerConfig
+  - GetSensorControlConfig
+  - GetSensorPerformanceControlConfiguration
+  - WWANOutOfServiceNotification
+*/
+typedef union
+{
+   const qmiLocInformClientRevisionReqMsgT_v02* pInformClientRevisionReq;
+   /**< Notifies the service about the revision the client is using.
+
+        The client does not receive any indications corresponding to this
+        request.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_INFORM_CLIENT_REVISION_REQ_V02. */
+
+   const qmiLocRegEventsReqMsgT_v02* pRegEventsReq;
+   /**< Changes the events the client is interested in receiving.
+
+        The client does not receive any indications corresponding to this
+        request.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_REG_EVENTS_REQ_V02. */
+
+   const qmiLocStartReqMsgT_v02* pStartReq;
+   /**< Starts a positioning session.
+
+        The client receives the following indications: position report,
+        satellite report, fix session report, and NMEA report (if applicable).
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_START_REQ_V02. */
+
+   const qmiLocStopReqMsgT_v02* pStopReq;
+   /**< Stops a positioning session. The client receives a fix session report
+        denoting that the fix session ended after this message was sent.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_STOP_REQ_V02. */
+
+   const qmiLocNiUserRespReqMsgT_v02* pNiUserRespReq;
+   /**< Informs the service about the user response for a network-initiated call.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_NI_USER_RESPONSE_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_NI_USER_RESPONSE_REQ_V02. */
+
+   const qmiLocInjectPredictedOrbitsDataReqMsgT_v02* pInjectPredictedOrbitsDataReq;
+   /**< Injects the predicted orbits data into the service.
+
+        When all predicted orbits data parts have been injected, the client
+        receives the following indication containing a response:
+        QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02.
+
+        The client injects successive data parts without waiting for this
+        indication as long as locClientSendReq() returns successfully.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02. */
+
+   const qmiLocInjectUtcTimeReqMsgT_v02* pInjectUtcTimeReq;
+   /**< Injects UTC time into the service.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_INJECT_UTC_TIME_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_INJECT_UTC_TIME_REQ_V02. */
+
+   const qmiLocInjectPositionReqMsgT_v02* pInjectPositionReq;
+   /**< Injects a position into the service.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_INJECT_POSITION_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_INJECT_POSITION_REQ_V02. */
+
+   const qmiLocSetEngineLockReqMsgT_v02* pSetEngineLockReq;
+   /**< Sets the location engine lock.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_ENGINE_LOCK_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_ENGINE_LOCK_REQ_V02. */
+
+   const qmiLocSetSbasConfigReqMsgT_v02* pSetSbasConfigReq;
+   /**< Sets the SBAS configuration.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_SBAS_CONFIG_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_SBAS_CONFIG_REQ_V02 . */
+
+   const qmiLocSetNmeaTypesReqMsgT_v02* pSetNmeaTypesReq;
+   /**< Sets the NMEA types configuration.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_NMEA_TYPES_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_NMEA_TYPES_REQ_V02. */
+
+   const qmiLocSetLowPowerModeReqMsgT_v02* pSetLowPowerModeReq;
+   /**< Sets the Low Power mode configuration.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_LOW_POWER_MODE_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_LOW_POWER_MODE_REQ_V02. */
+
+   const qmiLocSetServerReqMsgT_v02* pSetServerReq;
+   /**< Sets the A-GPS server type and address.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_SERVER_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_SERVER_REQ_V02. */
+
+   const qmiLocGetServerReqMsgT_v02* pGetServerReq;
+   /**< Gets the A-GPS server type and address.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_GET_SERVER_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_GET_SERVER_REQ_V02. */
+
+   const qmiLocDeleteAssistDataReqMsgT_v02* pDeleteAssistDataReq;
+   /**< Deletes the aiding data from the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_DELETE_ASSIST_DATA_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_DELETE_ASSIST_DATA_REQ_V02. */
+
+   const qmiLocSetXtraTSessionControlReqMsgT_v02* pSetXtraTSessionControlReq;
+   /**< Sets XTRA-T session control in the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02. */
+
+   const qmiLocInjectWifiPositionReqMsgT_v02* pInjectWifiPositionReq;
+   /**< Injects a WiFi position into the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_INJECT_WIFI_POSITION_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_INJECT_WIFI_POSITION_REQ_V02. */
+
+   const qmiLocNotifyWifiStatusReqMsgT_v02* pNotifyWifiStatusReq;
+   /**< Notifies the engine about the WiFi status.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02. */
+
+   const qmiLocSetOperationModeReqMsgT_v02* pSetOperationModeReq;
+   /**< Sets the engine Operation mode.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_OPERATION_MODE_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_OPERATION_MODE_REQ_V02. */
+
+   const qmiLocSetSpiStatusReqMsgT_v02* pSetSpiStatusReq;
+   /**< Sends the stationary position status to the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_SPI_STATUS_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_SPI_STATUS_REQ_V02. */
+
+   const qmiLocInjectSensorDataReqMsgT_v02* pInjectSensorDataReq;
+   /**< Injects sensor data into the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_INJECT_SENSOR_DATA_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_INJECT_SENSOR_DATA_REQ_V02. */
+
+   const qmiLocInjectTimeSyncDataReqMsgT_v02* pInjectTimeSyncReq;
+   /**< Injects time synchronization information into the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02. */
+
+   const qmiLocSetCradleMountConfigReqMsgT_v02* pSetCradleMountConfigReq;
+   /**< Sets the cradle mount state information in the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        SET_CRADLE_MOUNT_CONFIG_REQ_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        SET_CRADLE_MOUNT_CONFIG_IND_V02. */
+
+   const qmiLocSetExternalPowerConfigReqMsgT_v02* pSetExternalPowerConfigReq;
+   /**< Sets external power configuration state in the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02. */
+
+   const qmiLocInformLocationServerConnStatusReqMsgT_v02*
+     pInformLocationServerConnStatusReq;
+   /**< Informs the engine about the connection status to the location server.
+
+        This can be sent in response to a
+        QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02 request. The
+        service sends back a QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02
+        response indication for this request.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02. */
+
+   const qmiLocSetProtocolConfigParametersReqMsgT_v02*
+     pSetProtocolConfigParametersReq;
+   /**< Sets the protocol configuration parameters in the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02. */
+
+   const qmiLocGetProtocolConfigParametersReqMsgT_v02*
+     pGetProtocolConfigParametersReq;
+   /**< Retrieves protocol configuration parameters from the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02. */
+
+   const qmiLocSetSensorControlConfigReqMsgT_v02*
+     pSetSensorControlConfigReq;
+   /**< Sets the sensor control configuration parameters in the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02. */
+
+   const qmiLocSetSensorPerformanceControlConfigReqMsgT_v02*
+      pSetSensorPerformanceControlConfigReq;
+   /**< Sets the sensor performance configuration parameters in the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02. */
+
+   const qmiLocGetSensorPropertiesReqMsgT_v02* pGetSensorPropertiesReq;
+   /**< Retrieves the sensor properties from the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02. */
+
+   const qmiLocSetSensorPropertiesReqMsgT_v02* pSetSensorPropertiesReq;
+   /**< Sets the sensor properties in the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02. */
+
+   const qmiLocInjectSuplCertificateReqMsgT_v02* pInjectSuplCertificateReq;
+   /**< Injects a SUPL certificate into the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02. */
+
+   const qmiLocDeleteSuplCertificateReqMsgT_v02* pDeleteSuplCertificateReq;
+   /**< Deletes a SUPL certificate from the engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02. */
+
+   const qmiLocSetPositionEngineConfigParametersReqMsgT_v02*
+     pSetPositionEngineConfigParametersReq;
+   /**< Sets position engine configuration.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND _V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02. */
+
+   const qmiLocGetPositionEngineConfigParametersReqMsgT_v02*
+     pGetPositionEngineConfigParametersReq;
+   /**< Gets position engine configuration.
+
+         If the request is accepted by the service, the client receives the
+         following indication containing a response:
+         QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02.
+
+         To send this request, set the reqId field in locClientSendReq() to
+         QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02. */
+
+   const qmiLocAddCircularGeofenceReqMsgT_v02* pAddCircularGeofenceReq;
+   /**< Adds a circular geofence.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_ADD_CIRCULAR_GEOFENCE_REQ_V02 */
+
+   const qmiLocDeleteGeofenceReqMsgT_v02* pDeleteGeofenceReq;
+   /**< Deletes a geofence.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_DELETE_GEOFENCE_IND_V02.
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_DELETE_GEOFENCE_REQ_V02 */
+
+   const qmiLocQueryGeofenceReqMsgT_v02* pQueryGeofenceReq;
+   /**< Queries a geofence.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_QUERY_GEOFENCE_IND_V02
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_QUERY_GEOFENCE_REQ_V02. */
+
+    const qmiLocEditGeofenceReqMsgT_v02* pEditGeofenceReq;
+    /**< Edits geofence parameters.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_EDIT_GEOFENCE_IND_V02
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_EDIT_GEOFENCE_REQ_V02. */
+
+    const qmiLocGetBestAvailablePositionReqMsgT_v02*
+      pGetBestAvailablePositionReq;
+    /**< Get the best available position from location engine
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02. @newpagetable */
+
+    const qmiLocInjectMotionDataReqMsgT_v02* pInjectMotionDataReq;
+    /**< Inject motion data in the location engine
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_INJECT_MOTION_DATA_IND_V02
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_INJECT_MOTION_DATA_REQ_V02 */
+
+    const qmiLocGetNiGeofenceIdListReqMsgT_v02* pGetNiGeofenceIdListReq;
+    /**< Get the list of Network Initiated Geofences from the location engine.
+
+        If the request is accepted by the service, the client receives the
+        following indication containing a response:
+        QMI_LOC_GET_NI_GEOFENCE_ID_LIST_IND_V02
+
+        To send this request, set the reqId field in locClientSendReq() to
+        QMI_LOC_GET_NI_GEOFENCE_ID_LIST_REQ_V02 */
+
+    const qmiLocInjectGSMCellInfoReqMsgT_v02 *pInjectGSMCellInfoReq;
+    /**< Inject GSM Cell Information into the location engine.
+         If the request is accepted by the service, the client receives the
+         following indication containing a response:
+         QMI_LOC_INJECT_GSM_CELL_INFO_IND_V02
+
+         To send this request, set the reqId field in locClientSendReq() to
+         QMI_LOC_INJECT_GSM_CELL_INFO_REQ_V02 */
+
+    const qmiLocInjectNetworkInitiatedMessageReqMsgT_v02
+      *pInjectNetworkInitiatedMessageReq;
+    /**< Inject Network Initiated Message into the location engine.
+         If the request is accepted by the service, the client receives the
+         following indication containing a response:
+         QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_IND_V02
+
+         To send this request, set the reqId field in locClientSendReq() to
+         QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_REQ_V02 */
+
+    const void *pWWANOutOfServiceNotificationReq;
+
+    const qmiLocPedometerReportReqMsgT_v02 *pPedometerReportReq;
+    /**< Send pedometer data to the location engine. If the request is
+         accepted by the service, the client receives the following
+         indication containing a response:
+         QMI_LOC_PEDOMETER_REPORT_IND_V02
+
+         To send this request, set the reqId field in locClientSendReq() to
+         QMI_LOC_PEDOMETER_REPORT_REQ_V02 */
+
+    const qmiLocInjectWCDMACellInfoReqMsgT_v02 *pInjectWCDMACellInfoReq;
+    const qmiLocInjectTDSCDMACellInfoReqMsgT_v02 *pInjectTDSCDMACellInfoReq;
+    const qmiLocInjectSubscriberIDReqMsgT_v02 *pInjectSubscriberIDReq;
+    const qmiLocInjectWifiApDataReqMsgT_v02 *pInjectWifiApDataReq;
+    const qmiLocNotifyWifiAttachmentStatusReqMsgT_v02 *pNotifyWifiAttachmentStatusReq;
+    const qmiLocNotifyWifiEnabledStatusReqMsgT_v02 *pNotifyWifiEnabledStatusReq;
+
+    const qmiLocReadFromBatchReqMsgT_v02 *pReadFromBatchReq;
+    const qmiLocGetBatchSizeReqMsgT_v02 *pGetBatchSizeReq;
+    const qmiLocStartBatchingReqMsgT_v02 *pStartBatchingReq;
+    const qmiLocStopBatchingReqMsgT_v02 *pStopBatchingReq;
+    const qmiLocReleaseBatchReqMsgT_v02 *pReleaseBatchReq;
+
+    const qmiLocInjectVehicleSensorDataReqMsgT_v02 *pInjectVehicleSensorDataReq;
+
+    /**< Send vehicle sensor data to the location engine. If the request is
+         accepted by the service, the client receives the following
+         indication containing a response:
+         QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_IND_V02
+
+         To send this request, set the reqId field in locClientSendReq() to
+         QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_REQ_V02 */
+
+    const qmiLocSetPremiumServicesCfgReqMsgT_v02 *pSetPremiumServicesCfgReq;
+    /*QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_REQ_V02*/
+
+    const qmiLocGetAvailWwanPositionReqMsgT_v02 *pGetAvailWwanPositionReq;
+    /*QMI_LOC_GET_AVAILABLE_WWAN_POSITION_REQ_V02*/
+
+    const qmiLocSetXtraVersionCheckReqMsgT_v02 *pSetXtraVersionCheckReq;
+
+    const qmiLocGdtUploadBeginStatusReqMsgT_v02* pGdtUploadBeginStatusReq;
+    /* QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_REQ_V02 */
+
+    const qmiLocGdtUploadEndReqMsgT_v02* pGdtUploadEndReq;
+    /* QMI_LOC_GDT_UPLOAD_END_REQ_V02*/
+
+    const qmiLocInjectGtpClientDownloadedDataReqMsgT_v02 *pInjectGtpClientDownloadedDataReq;
+    /* QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_REQ_V02 */
+
+    const qmiLocSetGNSSConstRepConfigReqMsgT_v02 *pSetGNSSConstRepConfigReq;
+    /*QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_V02*/
+
+}locClientReqUnionType;
+
+
+/** Event indications that are sent by the service.
+*/
+typedef union
+{
+   const qmiLocEventPositionReportIndMsgT_v02* pPositionReportEvent;
+   /**< Contains the position information.
+
+        This event is generated after QMI_LOC_START_REQ_V02 is sent. If
+        periodic fix criteria is specified, this event is generated multiple
+        times periodically at the specified rate until QMI_LOC_STOP_REQ_V02 is
+        sent.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_POSITION_REPORT_IND_V02. */
+
+   const qmiLocEventGnssSvInfoIndMsgT_v02* pGnssSvInfoReportEvent;
+   /**< Contains the GNSS satellite information.
+
+        This event is generated after QMI_LOC_START_REQ_V02 is sent. This event
+        is generated at 1 Hz if the location engine is tracking satellites to
+        make a location fix.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_GNSS_INFO_IND_V02. */
+
+   const qmiLocEventNmeaIndMsgT_v02* pNmeaReportEvent;
+   /**< Contains an NMEA report sentence.
+
+        The entire NMEA report consisting of multiple sentences is sent at a
+        1 Hz rate. This event is generated after QMI_LOC_START_REQ_V02 is sent.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_NMEA_IND_V02. */
+
+   const qmiLocEventNiNotifyVerifyReqIndMsgT_v02* pNiNotifyVerifyReqEvent;
+   /**< Notifies a location client when the network triggers a positioning
+        request to the mobile.
+
+        Upon getting this event, the location client displays the
+        network-initiated fix request in a dialog and prompts the user to
+        accept or deny the request. The client responds to this request with
+        the message QMI_LOC_NI_USER_RESPONSE_REQ_V02.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02. */
+
+   const qmiLocEventInjectTimeReqIndMsgT_v02* pInjectTimeReqEvent;
+   /**< Asks the client for time assistance.
+
+        The client responds to this request with the message
+        QMI_LOC_INJECT_UTC_TIME_REQ_V02.
+
+        The eventIndId field in the event indication callback is
+        set to QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02. */
+
+   const qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02*
+         pInjectPredictedOrbitsReqEvent;
+   /**< Asks the client for predicted orbits data assistance.
+
+        The client responds to this request with the message
+        QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02. */
+
+   const qmiLocEventInjectPositionReqIndMsgT_v02* pInjectPositionReqEvent;
+   /**< Asks the client for position assistance.
+
+        The client responds to this request with the message
+        QMI_LOC_INJECT_POSITION_REQ_V02.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02. */
+
+   const qmiLocEventEngineStateIndMsgT_v02* pEngineState;
+   /**< Sent by the engine whenever it turns on or off.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_ENGINE_STATE_IND_V02. */
+
+   const qmiLocEventFixSessionStateIndMsgT_v02* pFixSessionState;
+   /**< Sent by the engine when a location session begins or ends.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02. */
+
+   const qmiLocEventWifiReqIndMsgT_v02* pWifiReqEvent;
+   /**< Sent by the engine when it needs WiFi support.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_WIFI_REQ_IND_V02. */
+
+   const qmiLocEventSensorStreamingReadyStatusIndMsgT_v02*
+          pSensorStreamingReadyStatusEvent;
+   /**< Notifies the client that the engine is ready to accept sensor data.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_IND_V02. */
+
+   const qmiLocEventTimeSyncReqIndMsgT_v02* pTimeSyncReqEvent;
+   /**< Sent by the engine when it needs to synchronize its time with the sensor
+        processor time.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_TIME_SYNC_REQ_IND_V02. */
+
+   const qmiLocEventSetSpiStreamingReportIndMsgT_v02*
+     pSetSpiStreamingReportEvent;
+   /**< Asks the client to start/stop sending a Stationary Position Indicator
+        (SPI) stream.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_SET_SPI_STREAMING_REPORT_IND_V02. */
+
+   const qmiLocEventLocationServerConnectionReqIndMsgT_v02*
+      pLocationServerConnReqEvent;
+   /**< Sent by the engine to ask the client to open or close a connection to
+        a location server.
+
+        The client responds to this request by sending the
+        QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02 message.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02. */
+
+   const qmiLocEventNiGeofenceNotificationIndMsgT_v02*
+     pNiGeofenceNotificationEvent;
+   /**< Sent by the engine to notify the client about changes to a
+        network-initiated geofence.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_IND_V02. */
+
+   const qmiLocEventGeofenceGenAlertIndMsgT_v02* pGeofenceGenAlertEvent;
+   /**< Sent by the engine to notify the client about updates that may
+        affect a geofence operation.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_IND_V02. */
+
+   const qmiLocEventGeofenceBreachIndMsgT_v02* pGeofenceBreachEvent;
+   /**< Sent by the engine to notify the client about a geofence breach
+        event.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_IND_V02. @newpagetable */
+
+   const qmiLocEventGeofenceBatchedBreachIndMsgT_v02* pGeofenceBatchedBreachEvent;
+   /**< Sent by the engine to notify the client about a geofence breach
+        event.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_GEOFENCE_BATCHED_BREACH_NOTIFICATION_IND_V02. @newpagetable */
+
+   const qmiLocEventPedometerControlIndMsgT_v02* pPedometerControlEvent;
+   /**< Sent by the engine to recommend how pedometer data is sent to the
+        location engine.
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_PEDOMETER_CONTROL_IND_V02. @newpagetable */
+
+   const qmiLocEventMotionDataControlIndMsgT_v02* pMotionDataControlEvent;
+   /**< Sent by the engine to recommend how motion data is sent to the
+        location engine.
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_MOTION_DATA_CONTROL_IND_V02. @newpagetable */
+
+   const qmiLocEventInjectWifiApDataReqIndMsgT_v02* pWifiApDataReqEvent;
+   const qmiLocEventLiveBatchedPositionReportIndMsgT_v02* pBatchPositionReportEvent;
+   /**< Sent by the engine to notify the client that live batch location
+        is ready, and the location info.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_LIVE_BATCHED_POSITION_REPORT_IND_V02. */
+
+   const qmiLocEventBatchFullIndMsgT_v02* pBatchCount;
+   /**< Sent by the engine to notify the client that batch location is
+        full, and how many location are available to read.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_BATCH_FULL_IND_V02. */
+
+   const qmiLocEventVehicleDataReadyIndMsgT_v02* pVehicleDataReadyEvent;
+   /**< Sent by the engine to recommend how vehicle sensor data is
+        sent to the location engine.
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_VEHICLE_DATA_READY_STATUS_IND_V02. @newpagetable */
+
+   const qmiLocEventGeofenceProximityIndMsgT_v02* pGeofenceProximityEvent;
+   /**< Sent by the engine to notify the client about a geofence proximity
+        event.
+
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_GEOFENCE_PROXIMITY_NOTIFICATION_IND_V02. @newpagetable */
+
+   const qmiLocEventGdtUploadBeginStatusReqIndMsgT_v02* pGdtUploadBeginEvent;
+   /**< Sent by the engine to notify the client about a GDT upload
+        begine event.
+
+       The eventIndId field in the event indication callback is set to
+       QMI_LOC_EVENT_GDT_UPLOAD_BEGIN_STATUS_REQ_IND_V02. @newpagetable */
+
+   const qmiLocEventGdtUploadEndReqIndMsgT_v02* pGdtUploadEndEvent;
+   /**< Sent by the engine to notify the client about a GDT upload
+        end event.
+
+       The eventIndId field in the event indication callback is set to
+       QMI_LOC_EVENT_GDT_UPLOAD_END_REQ_IND_V02. @newpagetable */
+
+   const qmiLocEventGnssSvMeasInfoIndMsgT_v02* pGnssSvRawInfoEvent;
+   /**< Sent by the engine to report GNSS measurement.
+        The eventIndId field in the event indication callback is set to
+        QMI_LOC_EVENT_GNSS_MEASUREMENT_REPORT_IND_V02. @newpagetable */
+
+}locClientEventIndUnionType;
+
+
+/** Response indications that are sent by the service.
+*/
+typedef union
+{
+   const qmiLocGetServiceRevisionIndMsgT_v02* pGetServiceRevisionInd;
+   /**< Response to the QMI_LOC_GET_SERVICE_REVISION_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_SERVICE_REVISION_IND_V02. */
+
+   const qmiLocGetFixCriteriaIndMsgT_v02* pGetFixCriteriaInd;
+   /**< Response to the QMI_LOC_GET_FIX_CRITERIA_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_FIX_CRITERIA_IND_V02. */
+
+   const qmiLocNiUserRespIndMsgT_v02* pNiUserRespInd;
+   /**< Response to the QMI_LOC_NI_USER_RESPONSE_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_NI_USER_RESPONSE_IND_V02. */
+
+   const qmiLocInjectPredictedOrbitsDataIndMsgT_v02*
+     pInjectPredictedOrbitsDataInd;
+   /**< Sent after a predicted orbits data part has been successfully injected.
+
+        The client waits for this indication before injecting the next part.
+        This indication is sent in response to
+        QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02. */
+
+   const qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02*
+      pGetPredictedOrbitsDataSourceInd;
+   /**< Response to the QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_REQ_V02
+        request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_IND_V02. */
+
+   const qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02*
+     pGetPredictedOrbitsDataValidityInd;
+   /**< Response to the QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_REQ_V02
+        request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_IND_V02. */
+
+   const qmiLocInjectUtcTimeIndMsgT_v02* pInjectUtcTimeInd;
+   /**< Response to the QMI_LOC_INJECT_UTC_TIME_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_INJECT_UTC_TIME_IND_V02. */
+
+   const qmiLocInjectPositionIndMsgT_v02* pInjectPositionInd;
+   /**< Response to the QMI_LOC_INJECT_POSITION_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_INJECT_POSITION_IND_V02. */
+
+   const qmiLocSetEngineLockIndMsgT_v02* pSetEngineLockInd;
+   /**< Response to the QMI_LOC_SET_ENGINE_LOCK_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_ENGINE_LOCK_IND_V02. */
+
+   const qmiLocGetEngineLockIndMsgT_v02* pGetEngineLockInd;
+   /**< Response to the QMI_LOC_GET_ENGINE_LOCK_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_ENGINE_LOCK_IND_V02. */
+
+   const qmiLocSetSbasConfigIndMsgT_v02* pSetSbasConfigInd;
+   /**< Response to the QMI_LOC_SET_SBAS_CONFIG_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_SBAS_CONFIG_IND_V02. */
+
+   const qmiLocGetSbasConfigIndMsgT_v02* pGetSbasConfigInd;
+   /**< Response to the QMI_LOC_GET_SBAS_CONFIG_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_SBAS_CONFIG_IND_V02. */
+
+   const qmiLocSetNmeaTypesIndMsgT_v02* pSetNmeaTypesInd;
+   /**< Response to the QMI_LOC_SET_NMEA_TYPES_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_NMEA_TYPES_IND_V02. */
+
+   const qmiLocGetNmeaTypesIndMsgT_v02* pGetNmeaTypesInd;
+   /**< Response to the QMI_LOC_GET_NMEA_TYPES_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_NMEA_TYPES_IND_V02. */
+
+   const qmiLocSetLowPowerModeIndMsgT_v02* pSetLowPowerModeInd;
+   /**< Response to the QMI_LOC_SET_LOW_POWER_MODE_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_LOW_POWER_MODE_IND_V02. */
+
+   const qmiLocGetLowPowerModeIndMsgT_v02* pGetLowPowerModeInd;
+   /**< Response to the QMI_LOC_GET_LOW_POWER_MODE_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_LOW_POWER_MODE_IND_V02. */
+
+   const qmiLocSetServerIndMsgT_v02* pSetServerInd;
+   /**< Response to the QMI_LOC_SET_SERVER_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_SERVER_IND_V02. */
+
+   const qmiLocGetServerIndMsgT_v02* pGetServerInd;
+   /**< Response to the QMI_LOC_GET_SERVER_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_SERVER_IND_V02. */
+
+   const qmiLocDeleteAssistDataIndMsgT_v02* pDeleteAssistDataInd;
+   /**< Response to the QMI_LOC_DELETE_ASSIST_DATA_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_DELETE_ASSIST_DATA_IND_V02. */
+
+   const qmiLocSetXtraTSessionControlIndMsgT_v02* pSetXtraTSessionControlInd;
+   /**< Response to the QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02. */
+
+   const qmiLocGetXtraTSessionControlIndMsgT_v02* pGetXtraTSessionControlInd;
+   /**< Response to the QMI_LOC_GET_XTRA_T_SESSION_CONTROL_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_XTRA_T_SESSION_CONTROL_IND_V02. */
+
+   const qmiLocInjectWifiPositionIndMsgT_v02* pInjectWifiPositionInd;
+   /**< Response to the QMI_LOC_INJECT_WIFI_POSITION_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_INJECT_WIFI_POSITION_IND_V02. */
+
+   const qmiLocNotifyWifiStatusIndMsgT_v02* pNotifyWifiStatusInd;
+   /**< Response to the QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02. */
+
+   const qmiLocGetRegisteredEventsIndMsgT_v02* pGetRegisteredEventsInd;
+   /**< Response to the QMI_LOC_GET_REGISTERED_EVENTS_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_REGISTERED_EVENTS_IND_V02. */
+
+   const qmiLocSetOperationModeIndMsgT_v02* pSetOperationModeInd;
+   /**< Response to the QMI_LOC_SET_OPERATION_MODE_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_OPERATION_MODE_IND_V02. */
+
+   const qmiLocGetOperationModeIndMsgT_v02* pGetOperationModeInd;
+   /**< Response to the QMI_LOC_GET_OPERATION_MODE_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_OPERATION_MODE_IND_V02. */
+
+   const qmiLocSetSpiStatusIndMsgT_v02* pSetSpiStatusInd;
+   /**< Response to the QMI_LOC_SET_SPI_STATUS_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_SPI_STATUS_IND_V02. */
+
+   const qmiLocInjectSensorDataIndMsgT_v02* pInjectSensorDataInd;
+   /**< Response to the QMI_LOC_INJECT_SENSOR_DATA_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_INJECT_SENSOR_DATA_IND_V02. */
+
+   const qmiLocInjectTimeSyncDataIndMsgT_v02* pInjectTimeSyncDataInd;
+   /**< Response to the QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02. */
+
+   const qmiLocSetCradleMountConfigIndMsgT_v02* pSetCradleMountConfigInd;
+   /**< Response to the QMI_LOC_SET_CRADLE_MOUNT_CONFIG_IND_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_CRADLE_MOUNT_CONFIG_REQ_V02. */
+
+   const qmiLocGetCradleMountConfigIndMsgT_v02* pGetCradleMountConfigInd;
+   /**< Response to the QMI_LOC_GET_CRADLE_MOUNT_CONFIG_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_CRADLE_MOUNT_CONFIG_IND_V02. */
+
+   const qmiLocSetExternalPowerConfigIndMsgT_v02* pSetExternalPowerConfigInd;
+   /**< Response to the QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02. */
+
+   const qmiLocGetExternalPowerConfigIndMsgT_v02* pGetExternalPowerConfigInd;
+   /**< Response to the QMI_LOC_GET_EXTERNAL_POWER_CONFIG_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02. */
+
+   const qmiLocInformLocationServerConnStatusIndMsgT_v02*
+     pInformLocationServerConnStatusInd;
+   /**< Response to the QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02
+        request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02.*/
+
+   const qmiLocSetProtocolConfigParametersIndMsgT_v02*
+     pSetProtocolConfigParametersInd;
+   /**< Response to the QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02. */
+
+   const qmiLocGetProtocolConfigParametersIndMsgT_v02*
+     pGetProtocolConfigParametersInd;
+   /**< Response to the QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02. */
+
+   const qmiLocSetSensorControlConfigIndMsgT_v02* pSetSensorControlConfigInd;
+   /**< Response to the QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02.
+         */
+
+   const qmiLocGetSensorControlConfigIndMsgT_v02* pGetSensorControlConfigInd;
+   /**< Response to the QMI_LOC_GET_SENSOR_CONTROL_CONFIG_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02.
+         */
+
+   const qmiLocSetSensorPropertiesIndMsgT_v02* pSetSensorPropertiesInd;
+   /**< Response to the QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02.
+         */
+
+   const qmiLocGetSensorPropertiesIndMsgT_v02* pGetSensorPropertiesInd;
+   /**< Response to the QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02.
+         */
+
+   const qmiLocSetSensorPerformanceControlConfigIndMsgT_v02*
+     pSetSensorPerformanceControlConfigInd;
+   /**< Response to the
+        QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02. */
+
+   const qmiLocGetSensorPerformanceControlConfigIndMsgT_v02*
+     pGetSensorPerformanceControlConfigInd;
+   /**< Response to the
+        QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02. */
+
+   const qmiLocInjectSuplCertificateIndMsgT_v02* pInjectSuplCertificateInd;
+   /**< Response to the QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02. */
+
+   const qmiLocDeleteSuplCertificateIndMsgT_v02* pDeleteSuplCertificateInd;
+   /**< Response to the QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02. */
+
+   const qmiLocSetPositionEngineConfigParametersIndMsgT_v02*
+     pSetPositionEngineConfigParametersInd;
+   /**< Response to the QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02
+        request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02. */
+
+   const qmiLocGetPositionEngineConfigParametersIndMsgT_v02*
+     pGetPositionEngineConfigParametersInd;
+    /**< Response to the QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02
+         request.
+
+         The respIndId field in the response indication callback is set to
+         QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02. */
+
+   const qmiLocAddCircularGeofenceIndMsgT_v02* pAddCircularGeofenceInd;
+   /**< Response to the QMI_LOC_ADD_CIRCULAR_GEOFENCE_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02. */
+
+   const qmiLocDeleteGeofenceIndMsgT_v02* pDeleteGeofenceInd;
+   /**< Response to the QMI_LOC_DELETE_GEOFENCE_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_DELETE_GEOFENCE_IND_V02. */
+
+   const qmiLocQueryGeofenceIndMsgT_v02* pQueryGeofenceInd;
+    /**< Response to the QMI_LOC_QUERY_GEOFENCE_REQ_V02 request.
+
+         The respIndId field in the response indication callback is set to
+         QMI_LOC_QUERY_GEOFENCE_IND_V02. */
+
+   const qmiLocEditGeofenceIndMsgT_v02* pEditGeofenceInd;
+   /**< Response to the QMI_LOC_EDIT_GEOFENCE_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_EDIT_GEOFENCE_IND_V02. */
+
+   const qmiLocGetBestAvailablePositionIndMsgT_v02*
+      pGetBestAvailablePositionInd;
+   /**< Response to the QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02. */
+
+   const qmiLocInjectMotionDataIndMsgT_v02* pInjectMotionDataInd;
+   /**< Response to the QMI_LOC_INJECT_MOTION_DATA_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_INJECT_MOTION_DATA_IND_V02. */
+
+   const qmiLocGetNiGeofenceIdListIndMsgT_v02* pGetNiGeofenceIdListInd;
+   /**< Response to the QMI_LOC_GET_NI_GEOFENCE_ID_LIST_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_GET_NI_GEOFENCE_ID_LIST_IND_V02. */
+
+   const qmiLocInjectGSMCellInfoIndMsgT_v02* pInjectGSMCellInfoInd;
+    /**< Response to the QMI_LOC_INJECT_GSM_CELL_INFO_REQ_V02 request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_INJECT_GSM_CELL_INFO_IND_V02. */
+
+   const qmiLocInjectNetworkInitiatedMessageIndMsgT_v02*
+     pInjectNetworkInitiatedMessageInd;
+
+   /**< Response to the QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_REQ_V02
+        request.
+
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_IND_V02. */
+
+   const qmiLocWWANOutOfServiceNotificationIndMsgT_v02*
+     pWWANOutOfServiceNotificationInd;
+
+   /**< Response to the QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_REQ_V02
+        request.
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_IND_V02. */
+
+   const qmiLocPedometerReportIndMsgT_v02* pPedometerReportInd;
+
+   /**< Response to the QMI_LOC_PEDOMETER_REPORT_REQ_V02 request.
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_PEDOMETER_REPORT_IND_V02. */
+
+    const qmiLocInjectWCDMACellInfoIndMsgT_v02 *pInjectWCDMACellInfoInd;
+    const qmiLocInjectTDSCDMACellInfoIndMsgT_v02 *pInjectTDSCDMACellInfoInd;
+    const qmiLocInjectSubscriberIDIndMsgT_v02 *pInjectSubscriberIDInd;
+    const qmiLocInjectWifiApDataIndMsgT_v02 *pInjectWifiApDataInd;
+    const qmiLocNotifyWifiAttachmentStatusIndMsgT_v02 *pNotifyWifiAttachmentStatusInd;
+    const qmiLocNotifyWifiEnabledStatusIndMsgT_v02 *pNotifyWifiEnabledStatusInd;
+
+    const qmiLocInjectVehicleSensorDataIndMsgT_v02 *pInjectVehicleSensorDataInd;
+
+    /**< Response to the QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_REQ_V02 request.
+        The respIndId field in the response indication callback is set to
+        QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_IND_V02. */
+
+    const qmiLocGetAvailWwanPositionIndMsgT_v02 *pGetAvailWwanPositionInd;
+    /*QMI_LOC_GET_AVAILABLE_WWAN_POSITION_IND_V02*/
+
+    const qmiLocSetXtraVersionCheckIndMsgT_v02 *pSetXtraVersionCheckInd;
+    
+    const qmiLocSetGNSSConstRepConfigIndMsgT_v02 *pSetGNSSConstRepConfigInd;
+    /*QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_IND_V02*/
+
+}locClientRespIndUnionType;
+
+/** @} */ /* end_addtogroup data_types */
+
+/** @addtogroup callback_functions
+@{ */
+/**
+  Location event indication callback function type. The Location service can
+  generate two types of indications:
+
+  - Asynchronous events indications, such as time injection request and satellite
+    reports. The client specifies the asynchronous events it is interested in
+    receiving through the event mask (see locClientOpen()).
+  - Response indications that are generated as a response to a request. For
+    example, the QMI_LOC_GET_FIX_CRITERIA_REQ_V02 request generates the
+    indication, QMI_LOC_GET_FIX_CRITERIA_IND_V02.
+
+  This callback handles the asynchronous event indications.
+
+  @datatypes
+  #locClientHandleType \n
+  #locClientEventIndUnionType
+
+  @param handle            Location client for this event. Only the client who
+                           registered for the corresponding event receives
+                           this callback.
+  @param eventIndId        ID of the event indication.
+  @param eventIndPayload   Event indication payload.
+  @param pClientCookie     Pointer to the cookie the client specified during
+                           registration.
+
+  @return
+  None.
+
+  @dependencies
+  None. @newpage
+*/
+typedef void (*locClientEventIndCbType)(
+      locClientHandleType handle,
+      uint32_t eventIndId,
+      const locClientEventIndUnionType eventIndPayload,
+      void *pClientCookie
+);
+
+/**
+  Location response indication callback function type. The Location service can
+  generate two types of indications:
+
+  - Asynchronous events indications, such as time injection request and satellite
+    reports. The client specifies the asynchronous events it is interested in
+    receiving through the event mask (see locClientOpen()).
+  - Response indications that are generated as a response to a request. For
+    example, the QMI_LOC_GET_FIX_CRITERIA_REQ_V02 request generates the
+    indication, QMI_LOC_GET_FIX_CRITERIA_IND_V02.
+
+  This callback handles the response indications.
+
+  @datatypes
+  #locClientHandleType \n
+  #locClientRespIndUnionType
+
+  @param handle           Location client who sent the request for which this
+                          response indication is generated.
+  @param respIndId        ID of the response. It is the same value as the ID
+                          of request sent to the engine.
+  @param respIndPayload   Payload of the response indication.
+  @param pClientCookie    Pointer to the cookie the client specified during
+                          registration.
+
+  @return
+  None.
+
+  @dependencies
+  None. @newpage
+*/
+typedef void  (*locClientRespIndCbType)(
+      locClientHandleType handle,
+      uint32_t respIndId,
+      const locClientRespIndUnionType respIndPayload,
+      void *pClientCookie
+);
+
+/**
+  Location error callback function type. This function is called to inform
+  the client that the service is no longer available. When the client
+  receives this callback, it must close the existing connection and reopen
+  the client connection.
+
+  @datatypes
+  #locClientHandleType \n
+  #locClientErrorEnumType
+
+  @param handle           Location client who sent the request for which this
+                          error indication is generated.
+  @param errorId          Error ID.
+  @param pClientCookie    Payload associated with the error indication.
+
+  @return
+  None.
+
+  @dependencies
+  None.
+*/
+typedef void  (*locClientErrorCbType)(
+      locClientHandleType handle,
+      locClientErrorEnumType errorId,
+      void* pClientCookie
+ );
+/** @} */ /* end_addtogroup callback_functions */
+
+
+/** @ingroup data_types
+  Callback functions to be registered during locClientOpen().
+*/
+typedef struct
+{
+    uint32_t size;                       /**< Size of the structure. */
+    locClientEventIndCbType eventIndCb;  /**< Event indication callback. */
+    locClientRespIndCbType respIndCb;    /**< Response indication callback. */
+    locClientErrorCbType errorCb;        /**< Error indication callback.
+                                              @newpagetable */
+}locClientCallbacksType;
+
+/**
+  Response for getting qmi service list
+*/
+typedef struct
+{
+    qmi_get_supported_msgs_resp_v01 resp; /**< Response */
+}qmiLocGetSupportMsgT_v02;
+
+/*===========================================================================
+ *
+ *                          FUNCTION DECLARATION
+ *
+ *==========================================================================*/
+/** @addtogroup operation_functions
+@{ */
+/*==========================================================================
+    locClientOpen */
+/** @xreflabel{hdr:locClientOpenFunction}
+  Connects a location client to the location engine. If the connection is
+  successful, this function returns a handle that the location client uses for
+  future location operations.
+
+  @datatypes
+  #locClientStatusEnumType \n
+  #locClientEventMaskType \n
+  #locClientCallbacksType \n
+  #locClientHandleType
+
+  @param[in]  eventRegMask          Mask of asynchronous events the client is
+                                    interested in receiving.
+  @param[in]  pLocClientCallbacks   Pointer to structure containing the
+                                    callbacks.
+  @param[out] pLocClientHandle      Pointer to the handle to be used by the
+                                    client for any subsequent requests.
+  @param[in]  pLocClientCookie      Pointer to a cookie to be returned to the
+                                    client along with the callbacks.
+
+  @return
+  One of the following error codes:
+  - eLOC_CLIENT_SUCCESS -- If the connection is opened.
+  - Non-zero error code (see #locClientStatusEnumType) -- On failure.
+
+  @dependencies
+  None. @newpage
+*/
+extern locClientStatusEnumType locClientOpen (
+      locClientEventMaskType            eventRegMask,
+      const locClientCallbacksType*     pLocClientCallbacks,
+      locClientHandleType*              pLocClientHandle,
+      const void*                       pLocClientCookie
+);
+
+
+/*==========================================================================
+    locClientClose */
+/** @xreflabel{hdr:locClientCloseFunction}
+  Disconnects a client from the location engine and sets the handle to
+  LOC_CLIENT_INVALID_HANDLE_VALUE.
+
+  @datatypes
+  #locClientStatusEnumType \n
+  #locClientHandleType
+
+  @param[in] pLocClientHandle  Pointer to the handle returned by the
+                               locClientOpen() function.
+
+  @return
+  One of the following error codes:
+  - 0 (eLOC_CLIENT_SUCCESS) -- On success.
+  - Non-zero error code (see \ref locClientStatusEnumType) -- On failure.
+
+  @dependencies
+  None. @newpage
+*/
+extern locClientStatusEnumType locClientClose (
+      locClientHandleType* pLocClientHandle
+);
+
+/*=============================================================================
+    locClientSendReq */
+/** @xreflabel{hdr:locClientSendReqFunction}
+  Sends a message to the location engine. If this function is successful, the
+  client expects an indication (except start, stop, event registration, and
+  sensor injection messages) through the registered callback in the
+  locClientOpen() function.
+
+  The indication contains the status of the request. If the status is a success,
+  the indication also contains the payload associated with response.
+
+  @datatypes
+  #locClientStatusEnumType \n
+  #locClientHandleType \n
+  #locClientReqUnionType
+
+  @param[in] handle        Handle returned by the locClientOpen() function.
+  @param[in] reqId         QMI_LOC service message ID of the request.
+  @param[in] reqPayload    Payload of the request. This can be NULL if the
+                           request has no payload.
+
+  @return
+  One of the following error codes:
+  - 0 (eLOC_CLIENT_SUCCESS) -- On success.
+  - Non-zero error code (see \ref locClientStatusEnumType) -- On failure.
+
+  @dependencies
+  None. @newpage
+*/
+extern locClientStatusEnumType locClientSendReq(
+     locClientHandleType       handle,
+     uint32_t                  reqId,
+     locClientReqUnionType     reqPayload
+);
+
+/*=============================================================================
+    locClientSupportMsgCheck */
+/**
+  @brief Sends a QMI_LOC_GET_SUPPORTED_MSGS_REQ_V02 message to the
+         location engine, and then receives a list of all services supported
+         by the engine. This function will check if the input service(s) form
+         the client is in the list or not. If the locClientSupportMsgCheck()
+         function is successful, the client should expect an result of
+         the service is supported or not recorded in supportedMsg.
+  @param [in] handle Handle returned by the locClientOpen()
+              function.
+  @param [in] supportedMsg   a integer used to record which
+                             message is supported
+
+  @return
+  One of the following error codes:
+  - 0 (eLOC_CLIENT_SUCCESS) -- On success.
+  - Non-zero error code (see \ref locClientStatusEnumType) -- On failure.
+
+  @dependencies
+  None. @newpage
+*/
+extern locClientStatusEnumType locClientSupportMsgCheck(
+     locClientHandleType      handle,
+     const uint32_t*          msgArray,
+     uint32_t                 msgArrayLength,
+     uint64_t*                supportedMsg
+);
+
+/*=============================================================================
+    locClientGetSizeByEventIndId */
+/** Gets the size of the event indication structure from a specified ID.
+
+  @param[in]  eventIndId      Event indicator ID.
+  @param[out] pEventIndSize   Pointer to the size of the structure.
+
+  @return
+  TRUE -- The event ID was found. \n
+  FALSE -- Otherwise.
+
+  @dependencies
+  None. @newpage
+*/
+extern bool locClientGetSizeByEventIndId(
+  uint32_t eventIndId,
+  size_t *pEventIndSize);
+
+
+/*=============================================================================
+    locClientGetSizeByRespIndId */
+/** Gets the size of the response indication structure from a specified ID.
+
+  @param[in]  respIndId      Response indicator ID.
+  @param[out] pRespIndSize   Pointer to the size of the structure.
+
+  @return
+  TRUE -- The response ID was found. \n
+  FALSE -- Otherwise.
+
+  @dependencies
+  None.
+*/
+extern bool locClientGetSizeByRespIndId(
+  uint32_t respIndId,
+  size_t *pRespIndSize);
+
+/** locClientRegisterEventMask
+ *  @brief registers the event mask with loc service
+ *  @param [in] clientHandle
+ *  @param [in] eventRegMask
+ *  @return true if indication was validated; else false */
+
+extern bool locClientRegisterEventMask(
+    locClientHandleType clientHandle,
+    locClientEventMaskType eventRegMask);
+
+/*=============================================================================*/
+/** @} */ /* end_addtogroup operation_functions */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LOC_API_V02_CLIENT_H*/
diff --git a/gps/loc_api/loc_api_v02/loc_api_v02_log.c b/gps/loc_api/loc_api_v02/loc_api_v02_log.c
new file mode 100644
index 0000000..4272722
--- /dev/null
+++ b/gps/loc_api/loc_api_v02/loc_api_v02_log.c
@@ -0,0 +1,350 @@
+/* Copyright (c) 2011-2014, 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.
+ *
+ */
+#include <loc_api_v02_log.h>
+#include <location_service_v02.h>
+
+static loc_name_val_s_type loc_v02_event_name[] =
+{
+    NAME_VAL(QMI_LOC_INFORM_CLIENT_REVISION_REQ_V02),
+    NAME_VAL(QMI_LOC_INFORM_CLIENT_REVISION_RESP_V02),
+    NAME_VAL(QMI_LOC_REG_EVENTS_REQ_V02),
+    NAME_VAL(QMI_LOC_REG_EVENTS_RESP_V02),
+    NAME_VAL(QMI_LOC_START_REQ_V02),
+    NAME_VAL(QMI_LOC_START_RESP_V02),
+    NAME_VAL(QMI_LOC_STOP_REQ_V02),
+    NAME_VAL(QMI_LOC_STOP_RESP_V02),
+    NAME_VAL(QMI_LOC_EVENT_POSITION_REPORT_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_NMEA_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_ENGINE_STATE_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_WIFI_REQ_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_TIME_SYNC_REQ_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_SET_SPI_STREAMING_REPORT_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_INJECT_WIFI_AP_DATA_REQ_IND_V02),
+    NAME_VAL(QMI_LOC_GET_SERVICE_REVISION_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_SERVICE_REVISION_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_SERVICE_REVISION_IND_V02),
+    NAME_VAL(QMI_LOC_GET_FIX_CRITERIA_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_FIX_CRITERIA_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_FIX_CRITERIA_IND_V02),
+    NAME_VAL(QMI_LOC_NI_USER_RESPONSE_REQ_V02),
+    NAME_VAL(QMI_LOC_NI_USER_RESPONSE_RESP_V02),
+    NAME_VAL(QMI_LOC_NI_USER_RESPONSE_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02),
+    NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_IND_V02),
+    NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_UTC_TIME_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_UTC_TIME_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_UTC_TIME_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_POSITION_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_POSITION_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_POSITION_IND_V02),
+    NAME_VAL(QMI_LOC_SET_ENGINE_LOCK_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_ENGINE_LOCK_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_ENGINE_LOCK_IND_V02),
+    NAME_VAL(QMI_LOC_GET_ENGINE_LOCK_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_ENGINE_LOCK_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_ENGINE_LOCK_IND_V02),
+    NAME_VAL(QMI_LOC_SET_SBAS_CONFIG_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_SBAS_CONFIG_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_SBAS_CONFIG_IND_V02),
+    NAME_VAL(QMI_LOC_GET_SBAS_CONFIG_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_SBAS_CONFIG_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_SBAS_CONFIG_IND_V02),
+    NAME_VAL(QMI_LOC_SET_NMEA_TYPES_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_NMEA_TYPES_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_NMEA_TYPES_IND_V02),
+    NAME_VAL(QMI_LOC_GET_NMEA_TYPES_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_NMEA_TYPES_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_NMEA_TYPES_IND_V02),
+    NAME_VAL(QMI_LOC_SET_LOW_POWER_MODE_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_LOW_POWER_MODE_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_LOW_POWER_MODE_IND_V02),
+    NAME_VAL(QMI_LOC_GET_LOW_POWER_MODE_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_LOW_POWER_MODE_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_LOW_POWER_MODE_IND_V02),
+    NAME_VAL(QMI_LOC_SET_SERVER_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_SERVER_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_SERVER_IND_V02),
+    NAME_VAL(QMI_LOC_GET_SERVER_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_SERVER_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_SERVER_IND_V02),
+    NAME_VAL(QMI_LOC_DELETE_ASSIST_DATA_REQ_V02),
+    NAME_VAL(QMI_LOC_DELETE_ASSIST_DATA_RESP_V02),
+    NAME_VAL(QMI_LOC_DELETE_ASSIST_DATA_IND_V02),
+    NAME_VAL(QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_XTRA_T_SESSION_CONTROL_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02),
+    NAME_VAL(QMI_LOC_GET_XTRA_T_SESSION_CONTROL_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_XTRA_T_SESSION_CONTROL_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_XTRA_T_SESSION_CONTROL_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_WIFI_POSITION_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_WIFI_POSITION_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_WIFI_POSITION_IND_V02),
+    NAME_VAL(QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02),
+    NAME_VAL(QMI_LOC_NOTIFY_WIFI_STATUS_RESP_V02),
+    NAME_VAL(QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02),
+    NAME_VAL(QMI_LOC_GET_REGISTERED_EVENTS_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_REGISTERED_EVENTS_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_REGISTERED_EVENTS_IND_V02),
+    NAME_VAL(QMI_LOC_SET_OPERATION_MODE_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_OPERATION_MODE_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_OPERATION_MODE_IND_V02),
+    NAME_VAL(QMI_LOC_GET_OPERATION_MODE_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_OPERATION_MODE_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_OPERATION_MODE_IND_V02),
+    NAME_VAL(QMI_LOC_SET_SPI_STATUS_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_SPI_STATUS_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_SPI_STATUS_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_SENSOR_DATA_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_SENSOR_DATA_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_SENSOR_DATA_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_TIME_SYNC_DATA_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02),
+    NAME_VAL(QMI_LOC_SET_CRADLE_MOUNT_CONFIG_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_CRADLE_MOUNT_CONFIG_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_CRADLE_MOUNT_CONFIG_IND_V02),
+    NAME_VAL(QMI_LOC_GET_CRADLE_MOUNT_CONFIG_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_CRADLE_MOUNT_CONFIG_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_CRADLE_MOUNT_CONFIG_IND_V02),
+    NAME_VAL(QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_EXTERNAL_POWER_CONFIG_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02),
+    NAME_VAL(QMI_LOC_GET_EXTERNAL_POWER_CONFIG_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_EXTERNAL_POWER_CONFIG_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02),
+    NAME_VAL(QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02),
+    NAME_VAL(QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_RESP_V02),
+    NAME_VAL(QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02),
+    NAME_VAL(QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02),
+    NAME_VAL(QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02),
+    NAME_VAL(QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_SENSOR_CONTROL_CONFIG_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02),
+    NAME_VAL(QMI_LOC_GET_SENSOR_CONTROL_CONFIG_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_SENSOR_CONTROL_CONFIG_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02),
+    NAME_VAL(QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_SENSOR_PROPERTIES_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02),
+    NAME_VAL(QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_SENSOR_PROPERTIES_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02),
+    NAME_VAL(QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02),
+    NAME_VAL(QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_SUPL_CERTIFICATE_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02),
+    NAME_VAL(QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02),
+    NAME_VAL(QMI_LOC_DELETE_SUPL_CERTIFICATE_RESP_V02),
+    NAME_VAL(QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02),
+    NAME_VAL(QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02),
+    NAME_VAL(QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_GEOFENCE_BATCHED_BREACH_NOTIFICATION_IND_V02),
+    NAME_VAL(QMI_LOC_ADD_CIRCULAR_GEOFENCE_REQ_V02),
+    NAME_VAL(QMI_LOC_ADD_CIRCULAR_GEOFENCE_RESP_V02),
+    NAME_VAL(QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02),
+    NAME_VAL(QMI_LOC_DELETE_GEOFENCE_REQ_V02),
+    NAME_VAL(QMI_LOC_DELETE_GEOFENCE_RESP_V02),
+    NAME_VAL(QMI_LOC_DELETE_GEOFENCE_IND_V02),
+    NAME_VAL(QMI_LOC_QUERY_GEOFENCE_REQ_V02),
+    NAME_VAL(QMI_LOC_QUERY_GEOFENCE_RESP_V02),
+    NAME_VAL(QMI_LOC_QUERY_GEOFENCE_IND_V02),
+    NAME_VAL(QMI_LOC_EDIT_GEOFENCE_REQ_V02),
+    NAME_VAL(QMI_LOC_EDIT_GEOFENCE_RESP_V02),
+    NAME_VAL(QMI_LOC_EDIT_GEOFENCE_IND_V02),
+    NAME_VAL(QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_BEST_AVAILABLE_POSITION_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_MOTION_DATA_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_MOTION_DATA_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_MOTION_DATA_IND_V02),
+    NAME_VAL(QMI_LOC_GET_NI_GEOFENCE_ID_LIST_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_NI_GEOFENCE_ID_LIST_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_NI_GEOFENCE_ID_LIST_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_GSM_CELL_INFO_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_GSM_CELL_INFO_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_GSM_CELL_INFO_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_IND_V02),
+    NAME_VAL(QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_REQ_V02),
+    NAME_VAL(QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_RESP_V02),
+    NAME_VAL(QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_PEDOMETER_CONTROL_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_MOTION_DATA_CONTROL_IND_V02),
+    NAME_VAL(QMI_LOC_PEDOMETER_REPORT_REQ_V02),
+    NAME_VAL(QMI_LOC_PEDOMETER_REPORT_RESP_V02),
+    NAME_VAL(QMI_LOC_PEDOMETER_REPORT_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_WCDMA_CELL_INFO_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_WCDMA_CELL_INFO_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_WCDMA_CELL_INFO_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_TDSCDMA_CELL_INFO_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_TDSCDMA_CELL_INFO_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_TDSCDMA_CELL_INFO_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_SUBSCRIBER_ID_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_SUBSCRIBER_ID_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_SUBSCRIBER_ID_IND_V02),
+    NAME_VAL(QMI_LOC_GET_SUPPORTED_MSGS_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_SUPPORTED_MSGS_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_SUPPORTED_FIELDS_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_SUPPORTED_FIELDS_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_WIFI_AP_DATA_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_WIFI_AP_DATA_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_WIFI_AP_DATA_IND_V02),
+    NAME_VAL(QMI_LOC_GET_BATCH_SIZE_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_BATCH_SIZE_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_BATCH_SIZE_IND_V02),
+    NAME_VAL(QMI_LOC_START_BATCHING_REQ_V02),
+    NAME_VAL(QMI_LOC_START_BATCHING_RESP_V02),
+    NAME_VAL(QMI_LOC_START_BATCHING_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_BATCH_FULL_NOTIFICATION_IND_V02),
+    NAME_VAL(QMI_LOC_READ_FROM_BATCH_REQ_V02),
+    NAME_VAL(QMI_LOC_READ_FROM_BATCH_RESP_V02),
+    NAME_VAL(QMI_LOC_READ_FROM_BATCH_IND_V02),
+    NAME_VAL(QMI_LOC_STOP_BATCHING_REQ_V02),
+    NAME_VAL(QMI_LOC_STOP_BATCHING_RESP_V02),
+    NAME_VAL(QMI_LOC_STOP_BATCHING_IND_V02),
+    NAME_VAL(QMI_LOC_RELEASE_BATCH_REQ_V02),
+    NAME_VAL(QMI_LOC_RELEASE_BATCH_RESP_V02),
+    NAME_VAL(QMI_LOC_RELEASE_BATCH_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_IND_V02),
+    NAME_VAL(QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_REQ_V02),
+    NAME_VAL(QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_RESP_V02),
+    NAME_VAL(QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_IND_V02),
+    NAME_VAL(QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_REQ_V02),
+    NAME_VAL(QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_RESP_V02),
+    NAME_VAL(QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_IND_V02),
+    NAME_VAL(QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_IND_V02),
+    NAME_VAL(QMI_LOC_GET_AVAILABLE_WWAN_POSITION_REQ_V02),
+    NAME_VAL(QMI_LOC_GET_AVAILABLE_WWAN_POSITION_RESP_V02),
+    NAME_VAL(QMI_LOC_GET_AVAILABLE_WWAN_POSITION_IND_V02),
+    NAME_VAL(QMI_LOC_SET_XTRA_VERSION_CHECK_REQ_V02),
+    NAME_VAL(QMI_LOC_SET_XTRA_VERSION_CHECK_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_XTRA_VERSION_CHECK_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_GEOFENCE_PROXIMITY_NOTIFICATION_IND_V02),
+    NAME_VAL(QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_REQ_V02),
+    NAME_VAL(QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_RESP_V02),
+    NAME_VAL(QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_IND_V02),
+    NAME_VAL(QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_REQ_V02),
+    NAME_VAL(QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_RESP_V02),
+    NAME_VAL(QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_IND_V02),
+    NAME_VAL(QMI_LOC_GDT_UPLOAD_END_REQ_V02),
+    NAME_VAL(QMI_LOC_GDT_UPLOAD_END_RESP_V02),
+    NAME_VAL(QMI_LOC_GDT_UPLOAD_END_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_GDT_UPLOAD_BEGIN_STATUS_REQ_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_GDT_UPLOAD_END_REQ_IND_V02),
+    NAME_VAL(QMI_LOC_EVENT_GNSS_MEASUREMENT_REPORT_IND_V02),
+    NAME_VAL(QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_V02),
+    NAME_VAL(QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_RESP_V02),
+    NAME_VAL(QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_IND_V02)
+};
+static int loc_v02_event_num = sizeof(loc_v02_event_name) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_v02_event_name(uint32_t event)
+{
+    return loc_get_name_from_val(loc_v02_event_name, loc_v02_event_num, (long) event);
+}
+
+static loc_name_val_s_type loc_v02_client_status_name[] =
+{
+    NAME_VAL(eLOC_CLIENT_SUCCESS),
+    NAME_VAL(eLOC_CLIENT_FAILURE_GENERAL),
+    NAME_VAL(eLOC_CLIENT_FAILURE_UNSUPPORTED),
+    NAME_VAL(eLOC_CLIENT_FAILURE_INVALID_PARAMETER),
+    NAME_VAL(eLOC_CLIENT_FAILURE_ENGINE_BUSY),
+    NAME_VAL(eLOC_CLIENT_FAILURE_PHONE_OFFLINE),
+    NAME_VAL(eLOC_CLIENT_FAILURE_TIMEOUT),
+    NAME_VAL(eLOC_CLIENT_FAILURE_SERVICE_NOT_PRESENT),
+    NAME_VAL(eLOC_CLIENT_FAILURE_SERVICE_VERSION_UNSUPPORTED),
+    NAME_VAL(eLOC_CLIENT_FAILURE_CLIENT_VERSION_UNSUPPORTED),
+    NAME_VAL(eLOC_CLIENT_FAILURE_INVALID_HANDLE),
+    NAME_VAL(eLOC_CLIENT_FAILURE_INTERNAL),
+    NAME_VAL(eLOC_CLIENT_FAILURE_NOT_INITIALIZED),
+    NAME_VAL(eLOC_CLIENT_FAILURE_NOT_ENOUGH_MEMORY),
+};
+static int loc_v02_client_status_num = sizeof(loc_v02_client_status_name) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_v02_client_status_name(locClientStatusEnumType status)
+{
+    return loc_get_name_from_val(loc_v02_client_status_name, loc_v02_client_status_num, (long) status);
+}
+
+
+static loc_name_val_s_type loc_v02_qmi_status_name[] =
+{
+    NAME_VAL(eQMI_LOC_SUCCESS_V02),
+    NAME_VAL(eQMI_LOC_GENERAL_FAILURE_V02),
+    NAME_VAL(eQMI_LOC_UNSUPPORTED_V02),
+    NAME_VAL(eQMI_LOC_INVALID_PARAMETER_V02),
+    NAME_VAL(eQMI_LOC_ENGINE_BUSY_V02),
+    NAME_VAL(eQMI_LOC_PHONE_OFFLINE_V02),
+    NAME_VAL(eQMI_LOC_TIMEOUT_V02),
+    NAME_VAL(eQMI_LOC_CONFIG_NOT_SUPPORTED_V02),
+    NAME_VAL(eQMI_LOC_INSUFFICIENT_MEMORY_V02),
+};
+static int loc_v02_qmi_status_num = sizeof(loc_v02_qmi_status_name) / sizeof(loc_name_val_s_type);
+
+const char* loc_get_v02_qmi_status_name(qmiLocStatusEnumT_v02 status)
+{
+    return loc_get_name_from_val(loc_v02_qmi_status_name, loc_v02_qmi_status_num, (long) status);
+}
diff --git a/gps/loc_api/loc_api_v02/loc_api_v02_log.h b/gps/loc_api/loc_api_v02/loc_api_v02_log.h
new file mode 100644
index 0000000..8d4670c
--- /dev/null
+++ b/gps/loc_api/loc_api_v02/loc_api_v02_log.h
@@ -0,0 +1,50 @@
+/* Copyright (c) 2011, 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 LOC_API_V02_LOG_H
+#define LOC_API_V02_LOG_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <loc_log.h>
+#include <loc_api_v02_client.h>
+
+const char* loc_get_v02_event_name(uint32_t event);
+const char* loc_get_v02_client_status_name(locClientStatusEnumType status);
+const char* loc_get_v02_qmi_status_name(qmiLocStatusEnumT_v02 status);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LOC_API_V02_LOG_H */
diff --git a/gps/loc_api/loc_api_v02/loc_util_log.h b/gps/loc_api/loc_api_v02/loc_util_log.h
new file mode 100644
index 0000000..49201f8
--- /dev/null
+++ b/gps/loc_api/loc_api_v02/loc_util_log.h
@@ -0,0 +1,85 @@
+/* Copyright (c) 2011-2012, 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 LOC_UTIL_LOG_H
+#define LOC_UTIL_LOG_H
+
+#if defined(_ANDROID_)
+#include "loc_api_v02_log.h"
+#include <log_util.h>
+
+#else // no _ANDROID_
+
+#if defined(__LOC_API_V02_LOG_SILENT__)
+#define MSG_LOG
+#define LOC_LOGE(...) MSG_LOG(__VA_ARGS__);
+#define LOC_LOGW(...) MSG_LOG(__VA_ARGS__);
+#define LOC_LOGD(...) MSG_LOG(__VA_ARGS__);
+#define LOC_LOGI(...) MSG_LOG(__VA_ARGS__);
+#define LOC_LOGV(...) MSG_LOG(__VA_ARGS__);
+#else
+
+// common for QNX and Griffon
+
+//error logs
+#define LOC_LOGE(...) printf(__VA_ARGS__)
+//warning logs
+#define LOC_LOGW(...) printf(__VA_ARGS__)
+// debug logs
+#define LOC_LOGD(...) printf(__VA_ARGS__)
+//info logs
+#define LOC_LOGI(...) printf(__VA_ARGS__)
+//verbose logs
+#define LOC_LOGV(...) printf(__VA_ARGS__)
+#endif //__LOC_API_V02_LOG_SILENT__
+
+#define MODEM_LOG_CALLFLOW(SPEC, VAL)
+#define EXIT_LOG_CALLFLOW(SPEC, VAL)
+
+#define loc_get_v02_event_name(X) #X
+#define loc_get_v02_client_status_name(X) #X
+
+#define loc_get_v02_qmi_status_name(X)  #X
+
+//specific to OFF TARGET
+#ifdef LOC_UTIL_TARGET_OFF_TARGET
+
+#include <stdio.h>
+# include <asm/errno.h>
+# include <sys/time.h>
+
+// get around strl*: not found in glibc
+// TBD:look for presence of eglibc other libraries
+// with strlcpy supported.
+#define strlcpy(X,Y,Z) strcpy(X,Y)
+#define strlcat(X,Y,Z) strcat(X,Y)
+
+#endif //LOC_UTIL_TARGET_OFF_TARGET
+
+#endif //_ANDROID_
+
+#endif //LOC_UTIL_LOG_H
diff --git a/gps/loc_api/loc_api_v02/location_service_v02.c b/gps/loc_api/loc_api_v02/location_service_v02.c
new file mode 100644
index 0000000..1b27387
--- /dev/null
+++ b/gps/loc_api/loc_api_v02/location_service_v02.c
@@ -0,0 +1,5351 @@
+/* Copyright (c) 2011-2015, 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.
+ */
+/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*
+ *THIS IS AN AUTO GENERATED FILE. DO NOT ALTER IN ANY WAY
+ *====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/
+
+/* This file was generated with Tool version 6.14.4
+   It was generated on: Fri Mar 27 2015 (Spin 0)
+   From IDL File: location_service_v02.idl */
+
+#include "stdint.h"
+#include "qmi_idl_lib_internal.h"
+#include "location_service_v02.h"
+#include "common_v01.h"
+
+
+/*Type Definitions*/
+static const uint8_t qmiLocApplicationIdStructT_data_v02[] = {
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocApplicationIdStructT_v02, applicationProvider),
+  QMI_LOC_MAX_APP_ID_PROVIDER_LENGTH_V02,
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocApplicationIdStructT_v02, applicationName),
+  QMI_LOC_MAX_APP_ID_NAME_LENGTH_V02,
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocApplicationIdStructT_v02, applicationVersion_valid),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocApplicationIdStructT_v02, applicationVersion),
+  QMI_LOC_MAX_APP_ID_VERSION_LENGTH_V02,
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocGPSTimeStructT_data_v02[] = {
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGPSTimeStructT_v02, gpsWeek),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGPSTimeStructT_v02, gpsTimeOfWeekMs),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocDOPStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDOPStructT_v02, PDOP),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDOPStructT_v02, HDOP),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDOPStructT_v02, VDOP),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocSensorUsageIndicatorStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSensorUsageIndicatorStructT_v02, usageMask),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSensorUsageIndicatorStructT_v02, aidingIndicatorMask),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocSvInfoStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, validMask),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, system),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, gnssSvId),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, healthStatus),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, svStatus),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, svInfoMask),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, elevation),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, azimuth),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, snr),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocNiVxNotifyVerifyStructT_data_v02[] = {
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, posQosIncl),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, posQos),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, numFixes),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, timeBetweenFixes),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, posMode),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, encodingScheme),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, requestorId),
+  QMI_LOC_NI_MAX_REQUESTOR_ID_LENGTH_V02,
+  QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, requestorId) - QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, requestorId_len),
+
+  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiVxNotifyVerifyStructT_v02, userRespTimerInSeconds),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocNiSuplFormattedStringStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplFormattedStringStructT_v02, formatType),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplFormattedStringStructT_v02, formattedString),
+  QMI_LOC_NI_MAX_CLIENT_NAME_LENGTH_V02,
+  QMI_IDL_OFFSET8(qmiLocNiSuplFormattedStringStructT_v02, formattedString) - QMI_IDL_OFFSET8(qmiLocNiSuplFormattedStringStructT_v02, formattedString_len),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocNiSuplQopStructT_data_v02[] = {
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplQopStructT_v02, validMask),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplQopStructT_v02, horizontalAccuracy),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplQopStructT_v02, verticalAccuracy),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplQopStructT_v02, maxLocAge),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplQopStructT_v02, delay),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocIpV4AddrStructType_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocIpV4AddrStructType_v02, addr),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocIpV4AddrStructType_v02, port),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocIpV6AddrStructType_data_v02[] = {
+  QMI_IDL_FLAGS_IS_ARRAY |QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocIpV6AddrStructType_v02, addr),
+  QMI_LOC_IPV6_ADDR_LENGTH_V02,
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocIpV6AddrStructType_v02, port),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocNiSuplServerInfoStructT_data_v02[] = {
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplServerInfoStructT_v02, suplServerAddrTypeMask),
+
+  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplServerInfoStructT_v02, ipv4Addr),
+  QMI_IDL_TYPE88(0, 8),
+  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplServerInfoStructT_v02, ipv6Addr),
+  QMI_IDL_TYPE88(0, 9),
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocNiSuplServerInfoStructT_v02, urlAddr),
+  QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02,
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocNiSuplNotifyVerifyStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplNotifyVerifyStructT_v02, valid_flags),
+
+  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplNotifyVerifyStructT_v02, suplServerInfo),
+  QMI_IDL_TYPE88(0, 10),
+  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_FLAGS_IS_ARRAY |QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, suplSessionId),
+  QMI_LOC_NI_SUPL_SLP_SESSION_ID_BYTE_LENGTH_V02,
+
+  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_FLAGS_IS_ARRAY |QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, suplHash),
+  QMI_LOC_NI_SUPL_HASH_LENGTH_V02,
+
+  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, posMethod),
+
+  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, dataCodingScheme),
+
+  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, requestorId),
+  QMI_IDL_TYPE88(0, 6),
+  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, clientName),
+  QMI_IDL_TYPE88(0, 6),
+  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, suplQop),
+  QMI_IDL_TYPE88(0, 7),
+  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, userResponseTimer),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocNiUmtsCpCodedStringStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpCodedStringStructT_v02, dataCodingScheme),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpCodedStringStructT_v02, codedString),
+  QMI_LOC_NI_CODEWORD_MAX_LENGTH_V02,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpCodedStringStructT_v02, codedString) - QMI_IDL_OFFSET8(qmiLocNiUmtsCpCodedStringStructT_v02, codedString_len),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocNiUmtsCpNotifyVerifyStructT_data_v02[] = {
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, valid_flags),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, invokeId),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, dataCodingScheme),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, notificationText),
+  QMI_LOC_NI_MAX_CLIENT_NAME_LENGTH_V02,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, notificationText) - QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, notificationText_len),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, clientAddress),
+  QMI_LOC_NI_MAX_EXT_CLIENT_ADDRESS_V02,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, clientAddress) - QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, clientAddress_len),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, locationType),
+
+  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, requestorId),
+  QMI_IDL_TYPE88(0, 12),
+  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, codewordString),
+  QMI_IDL_TYPE88(0, 12),
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, lcsServiceTypeId),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, userResponseTimer),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocNiVxServiceInteractionStructT_data_v02[] = {
+  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocNiVxServiceInteractionStructT_v02, niVxReq),
+  QMI_IDL_TYPE88(0, 5),
+  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiVxServiceInteractionStructT_v02, serviceInteractionType),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocNiSuplVer2ExtStructT_data_v02[] = {
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplVer2ExtStructT_v02, supportedNetworksMask),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplVer2ExtStructT_v02, triggerType),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiSuplVer2ExtStructT_v02, gnssType),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocEmergencyNotificationStructT_data_v02[] = {
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocEmergencyNotificationStructT_v02, eslpUrl),
+  QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02,
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocAssistanceServerUrlStructT_data_v02[] = {
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocAssistanceServerUrlStructT_v02, serverUrl),
+  QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02,
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocTimeServerListStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocTimeServerListStructT_v02, delayThreshold),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocTimeServerListStructT_v02, timeServerList),
+  QMI_LOC_MAX_NTP_SERVERS_V02,
+  QMI_IDL_OFFSET8(qmiLocTimeServerListStructT_v02, timeServerList) - QMI_IDL_OFFSET8(qmiLocTimeServerListStructT_v02, timeServerList_len),
+  QMI_IDL_TYPE88(0, 17),
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocPredictedOrbitsAllowedSizesStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocPredictedOrbitsAllowedSizesStructT_v02, maxFileSizeInBytes),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocPredictedOrbitsAllowedSizesStructT_v02, maxPartSize),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocPredictedOrbitsServerListStructT_data_v02[] = {
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocPredictedOrbitsServerListStructT_v02, serverList),
+  QMI_LOC_MAX_PREDICTED_ORBITS_SERVERS_V02,
+  QMI_IDL_OFFSET8(qmiLocPredictedOrbitsServerListStructT_v02, serverList) - QMI_IDL_OFFSET8(qmiLocPredictedOrbitsServerListStructT_v02, serverList_len),
+  QMI_IDL_TYPE88(0, 17),
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocSensorControlConfigSamplingSpecStructT_data_v02[] = {
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSensorControlConfigSamplingSpecStructT_v02, samplesPerBatch),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSensorControlConfigSamplingSpecStructT_v02, batchesPerSecond),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocSensorReadyStatusStructT_data_v02[] = {
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSensorReadyStatusStructT_v02, injectEnable),
+
+  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocSensorReadyStatusStructT_v02, dataFrequency),
+  QMI_IDL_TYPE88(0, 21),
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocGeofencePositionStructT_data_v02[] = {
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, timestampUtc),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, latitude),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, longitude),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, horUncEllipseSemiMinor),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, horUncEllipseSemiMajor),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, horUncEllipseOrientAzimuth),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, speedHorizontal_valid),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, speedHorizontal),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, altitudeWrtEllipsoid_valid),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, altitudeWrtEllipsoid),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, vertUnc_valid),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, vertUnc),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, speedVertical_valid),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, speedVertical),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, heading_valid),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, heading),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocGeofenceIdContinuousStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofenceIdContinuousStructT_v02, idLow),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofenceIdContinuousStructT_v02, idHigh),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocPredictedOrbitsDataValidityStructT_data_v02[] = {
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocPredictedOrbitsDataValidityStructT_v02, startTimeInUTC),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocPredictedOrbitsDataValidityStructT_v02, durationHours),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocAltitudeSrcInfoStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAltitudeSrcInfoStructT_v02, source),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAltitudeSrcInfoStructT_v02, linkage),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAltitudeSrcInfoStructT_v02, coverage),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocDeleteSvInfoStructT_data_v02[] = {
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteSvInfoStructT_v02, gnssSvId),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteSvInfoStructT_v02, system),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteSvInfoStructT_v02, deleteSvInfoMask),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocDeleteBDSSvInfoStructT_data_v02[] = {
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteBDSSvInfoStructT_v02, gnssSvId),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteBDSSvInfoStructT_v02, deleteSvInfoMask),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocWifiFixTimeStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiFixTimeStructT_v02, wifiPositionTime),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocWifiFixPosStructT_data_v02[] = {
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiFixPosStructT_v02, lat),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiFixPosStructT_v02, lon),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiFixPosStructT_v02, hepe),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiFixPosStructT_v02, numApsUsed),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiFixPosStructT_v02, fixErrorCode),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocWifiApInfoStructT_data_v02[] = {
+  QMI_IDL_FLAGS_IS_ARRAY |QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApInfoStructT_v02, macAddr),
+  QMI_LOC_WIFI_MAC_ADDR_LENGTH_V02,
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApInfoStructT_v02, rssi),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApInfoStructT_v02, channel),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApInfoStructT_v02, apQualifier),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocWifiApSsidStructT_data_v02[] = {
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocWifiApSsidStructT_v02, ssid),
+  QMI_LOC_MAX_WIFI_AP_SSID_STR_LENGTH_V02,
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLoc3AxisSensorSampleStructT_data_v02[] = {
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleStructT_v02, timeOffset),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleStructT_v02, xAxis),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleStructT_v02, yAxis),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleStructT_v02, zAxis),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLoc3AxisSensorSampleListStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleListStructT_v02, timeOfFirstSample),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleListStructT_v02, flags),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleListStructT_v02, sensorData),
+  QMI_LOC_SENSOR_DATA_MAX_SAMPLES_V02,
+  QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleListStructT_v02, sensorData) - QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleListStructT_v02, sensorData_len),
+  QMI_IDL_TYPE88(0, 33),
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocSensorTemperatureSampleStructT_data_v02[] = {
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSensorTemperatureSampleStructT_v02, timeOffset),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSensorTemperatureSampleStructT_v02, temperature),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocSensorTemperatureSampleListStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSensorTemperatureSampleListStructT_v02, timeSource),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSensorTemperatureSampleListStructT_v02, timeOfFirstSample),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocSensorTemperatureSampleListStructT_v02, temperatureData),
+  QMI_LOC_SENSOR_DATA_MAX_SAMPLES_V02,
+  QMI_IDL_OFFSET8(qmiLocSensorTemperatureSampleListStructT_v02, temperatureData) - QMI_IDL_OFFSET8(qmiLocSensorTemperatureSampleListStructT_v02, temperatureData_len),
+  QMI_IDL_TYPE88(0, 35),
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocApnProfilesStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocApnProfilesStructT_v02, pdnType),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocApnProfilesStructT_v02, apnName),
+  QMI_LOC_MAX_APN_NAME_LENGTH_V02,
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocCircularGeofenceArgsStructT_data_v02[] = {
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocCircularGeofenceArgsStructT_v02, latitude),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocCircularGeofenceArgsStructT_v02, longitude),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocCircularGeofenceArgsStructT_v02, radius),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocGeofenceMotionStateConfigStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofenceMotionStateConfigStructT_v02, motionState),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGeofenceMotionStateConfigStructT_v02, motionStateSpeed),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocTimeZoneStructT_data_v02[] = {
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocTimeZoneStructT_v02, dstOffset),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocTimeZoneStructT_v02, rawOffset),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocMotionDataStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocMotionDataStructT_v02, motion_state),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocMotionDataStructT_v02, motion_mode),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocMotionDataStructT_v02, probability_of_state),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocMotionDataStructT_v02, age),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocMotionDataStructT_v02, timeout),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocGSMCellIdStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGSMCellIdStructT_v02, MCC),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGSMCellIdStructT_v02, MNC),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGSMCellIdStructT_v02, LAC),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGSMCellIdStructT_v02, CID),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocWCDMACellIdStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWCDMACellIdStructT_v02, mcc),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWCDMACellIdStructT_v02, mnc),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWCDMACellIdStructT_v02, cid),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocTDSCDMACellIdStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocTDSCDMACellIdStructT_v02, mcc),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocTDSCDMACellIdStructT_v02, mnc),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocTDSCDMACellIdStructT_v02, cid),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocTDSCDMACellIdStructT_v02, lac),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocBatchedReportStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, fixId),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, validFields),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, latitude),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, longitude),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, horUncCircular),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, speedHorizontal),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, speedUnc),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, altitudeWrtEllipsoid),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, speedVertical),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, heading),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, headingUnc),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, technologyMask),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, timestampUtc),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, timeUnc),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, magneticDeviation),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, vertUnc),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, horConfidence),
+
+  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocBatchedReportStructT_v02, gpsTime),
+  QMI_IDL_TYPE88(0, 1),
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocWifiApDataStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApDataStructT_v02, wifiApDataMask),
+
+  QMI_IDL_FLAGS_IS_ARRAY |QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApDataStructT_v02, macAddress),
+  QMI_LOC_WIFI_MAC_ADDR_LENGTH_V02,
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApDataStructT_v02, apTransmitPower),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApDataStructT_v02, apAntennaGain),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApDataStructT_v02, apSignalToNoise),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApDataStructT_v02, apDeviceType),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApDataStructT_v02, apRssi),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApDataStructT_v02, apChannel),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApDataStructT_v02, apRoundTripDelay),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApDataStructT_v02, apRoundTripDelayUnit),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApDataStructT_v02, apRoundTripDelayAccuracy),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApDataStructT_v02, mobileSignalToNoise),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApDataStructT_v02, mobileRssi),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocVehicleSensorSampleStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocVehicleSensorSampleStructT_v02, timeOffset),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocVehicleSensorSampleStructT_v02, axisSample),
+  QMI_LOC_VEHICLE_SENSOR_DATA_MAX_AXES_V02,
+  QMI_IDL_OFFSET8(qmiLocVehicleSensorSampleStructT_v02, axisSample) - QMI_IDL_OFFSET8(qmiLocVehicleSensorSampleStructT_v02, axisSample_len),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocVehicleSensorSampleListStructType_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocVehicleSensorSampleListStructType_v02, sampleTimeBase),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocVehicleSensorSampleListStructType_v02, axesValidity),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocVehicleSensorSampleListStructType_v02, sensorData),
+  QMI_LOC_VEHICLE_SENSOR_DATA_MAX_SAMPLES_V02,
+  QMI_IDL_OFFSET8(qmiLocVehicleSensorSampleListStructType_v02, sensorData) - QMI_IDL_OFFSET8(qmiLocVehicleSensorSampleListStructType_v02, sensorData_len),
+  QMI_IDL_TYPE88(0, 47),
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocVehicleOdometrySampleStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocVehicleOdometrySampleStructT_v02, timeOffset),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocVehicleOdometrySampleStructT_v02, distanceTravelled),
+  QMI_LOC_VEHICLE_ODOMETRY_MAX_MEASUREMENTS_V02,
+  QMI_IDL_OFFSET8(qmiLocVehicleOdometrySampleStructT_v02, distanceTravelled) - QMI_IDL_OFFSET8(qmiLocVehicleOdometrySampleStructT_v02, distanceTravelled_len),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocVehicleOdometrySampleListStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocVehicleOdometrySampleListStructT_v02, sampleTimeBase),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocVehicleOdometrySampleListStructT_v02, flags),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocVehicleOdometrySampleListStructT_v02, wheelFlags),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocVehicleOdometrySampleListStructT_v02, distanceTravelledBase),
+
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocVehicleOdometrySampleListStructT_v02, odometryData),
+  QMI_LOC_VEHICLE_SENSOR_DATA_MAX_SAMPLES_V02,
+  QMI_IDL_OFFSET8(qmiLocVehicleOdometrySampleListStructT_v02, odometryData) - QMI_IDL_OFFSET8(qmiLocVehicleOdometrySampleListStructT_v02, odometryData_len),
+  QMI_IDL_TYPE88(0, 49),
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocRcvrClockFrequencyInfoStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocRcvrClockFrequencyInfoStructT_v02, clockDrift),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocRcvrClockFrequencyInfoStructT_v02, clockDriftUnc),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocRcvrClockFrequencyInfoStructT_v02, sourceOfFreq),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocLeapSecondInfoStructT_data_v02[] = {
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocLeapSecondInfoStructT_v02, leapSec),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocLeapSecondInfoStructT_v02, leapSecUnc),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocInterSystemBiasStructT_data_v02[] = {
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInterSystemBiasStructT_v02, validMask),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInterSystemBiasStructT_v02, timeBias),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInterSystemBiasStructT_v02, timeBiasUnc),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocGnssTimeStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGnssTimeStructT_v02, system),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGnssTimeStructT_v02, systemWeek),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGnssTimeStructT_v02, systemMsec),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGnssTimeStructT_v02, systemClkTimeBias),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGnssTimeStructT_v02, systemClkTimeUncMs),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocGloTimeStructT_data_v02[] = {
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGloTimeStructT_v02, gloFourYear),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGloTimeStructT_v02, gloDays),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGloTimeStructT_v02, gloMsec),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGloTimeStructT_v02, gloClkTimeBias),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGloTimeStructT_v02, gloClkTimeUncMs),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocGnssTimeExtStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGnssTimeExtStructT_v02, refFCount),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGnssTimeExtStructT_v02, systemRtc_valid),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGnssTimeExtStructT_v02, systemRtcMs),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGnssTimeExtStructT_v02, sourceOfTime),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocSVTimeSpeedStructT_data_v02[] = {
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVTimeSpeedStructT_v02, svTimeMs),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVTimeSpeedStructT_v02, svTimeSubMs),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVTimeSpeedStructT_v02, svTimeUncMs),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVTimeSpeedStructT_v02, dopplerShift),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVTimeSpeedStructT_v02, dopplerShiftUnc),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVTimeSpeedStructT_v02, dopplerAccel_valid),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVTimeSpeedStructT_v02, dopplerAccel),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocSVMeasurementStructT_data_v02[] = {
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, gnssSvId),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, gloFrequency),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, svStatus),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, validMask),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, healthStatus),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, svInfoMask),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, validMeasStatusMask),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, measurementStatus),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, CNo),
+
+  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, gloRfLoss),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, measLatency),
+
+  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, svTimeSpeed),
+  QMI_IDL_TYPE88(0, 57),
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, lossOfLock),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, multipathEstimate),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, fineSpeed),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, fineSpeedUnc),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, carrierPhase),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, cycleSlipCount),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, svAzimuth),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSVMeasurementStructT_v02, svElevation),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocWifiApMacAddressStructT_data_v02[] = {
+  QMI_IDL_FLAGS_IS_ARRAY |QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWifiApMacAddressStructT_v02, wifiApMacAddress),
+  QMI_LOC_WIFI_MAC_ADDR_LENGTH_V02,
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocIBeaconIdStructT_data_v02[] = {
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocIBeaconIdStructT_v02, uuid),
+  QMI_LOC_MAX_IBEACON_UUID_STR_LENGTH_V02,
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocIBeaconIdStructT_v02, majorNumber),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocIBeaconIdStructT_v02, minorNumber),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+static const uint8_t qmiLocDbtPositionStructT_data_v02[] = {
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, timestampUtc),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, latitude),
+
+  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, longitude),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, horUncEllipseSemiMinor),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, horUncEllipseSemiMajor),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, horUncEllipseOrientAzimuth),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, speedHorizontal_valid),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, speedHorizontal),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, altitudeWrtEllipsoid_valid),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, altitudeWrtEllipsoid),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, vertUnc_valid),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, vertUnc),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, speedVertical_valid),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, speedVertical),
+
+  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, heading_valid),
+
+  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDbtPositionStructT_v02, heading),
+
+  QMI_IDL_FLAG_END_VALUE
+};
+
+/*Message Definitions*/
+static const uint8_t qmiLocGenRespMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocGenRespMsgT_v02, resp),
+  QMI_IDL_TYPE88(1, 0)
+};
+
+static const uint8_t qmiLocInformClientRevisionReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInformClientRevisionReqMsgT_v02, revision)
+};
+
+static const uint8_t qmiLocRegEventsReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocRegEventsReqMsgT_v02, eventRegMask)
+};
+
+static const uint8_t qmiLocStartReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, sessionId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, fixRecurrence) - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, fixRecurrence_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, fixRecurrence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, horizontalAccuracyLevel) - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, horizontalAccuracyLevel_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, horizontalAccuracyLevel),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, intermediateReportState) - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, intermediateReportState_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, intermediateReportState),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, minInterval) - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, minInterval_valid)),
+  0x13,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, minInterval),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, applicationId) - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, applicationId_valid)),
+  0x14,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, applicationId),
+  QMI_IDL_TYPE88(0, 0),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, configAltitudeAssumed) - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, configAltitudeAssumed_valid)),
+  0x15,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, configAltitudeAssumed),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, minIntermediatePositionReportInterval) - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, minIntermediatePositionReportInterval_valid)),
+  0x16,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, minIntermediatePositionReportInterval)
+};
+
+static const uint8_t qmiLocStopReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStopReqMsgT_v02, sessionId)
+};
+
+static const uint8_t qmiLocEventPositionReportIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, sessionStatus),
+
+  0x02,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, sessionId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, latitude) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, latitude_valid)),
+  0x10,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, latitude),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, longitude) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, longitude_valid)),
+  0x11,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, longitude),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncCircular) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncCircular_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncCircular),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseSemiMinor) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseSemiMinor_valid)),
+  0x13,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseSemiMinor),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseSemiMajor) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseSemiMajor_valid)),
+  0x14,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseSemiMajor),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseOrientAzimuth) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseOrientAzimuth_valid)),
+  0x15,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseOrientAzimuth),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horConfidence) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horConfidence_valid)),
+  0x16,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horReliability) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horReliability_valid)),
+  0x17,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horReliability),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedHorizontal) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedHorizontal_valid)),
+  0x18,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedHorizontal),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedUnc) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedUnc_valid)),
+  0x19,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, altitudeWrtEllipsoid) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, altitudeWrtEllipsoid_valid)),
+  0x1A,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, altitudeWrtEllipsoid),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, altitudeWrtMeanSeaLevel) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, altitudeWrtMeanSeaLevel_valid)),
+  0x1B,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, altitudeWrtMeanSeaLevel),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertUnc) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertUnc_valid)),
+  0x1C,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertConfidence) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertConfidence_valid)),
+  0x1D,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertReliability) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertReliability_valid)),
+  0x1E,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertReliability),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedVertical) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedVertical_valid)),
+  0x1F,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedVertical),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, heading) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, heading_valid)),
+  0x20,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, heading),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, headingUnc) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, headingUnc_valid)),
+  0x21,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, headingUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, magneticDeviation) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, magneticDeviation_valid)),
+  0x22,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, magneticDeviation),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, technologyMask) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, technologyMask_valid)),
+  0x23,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, technologyMask),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, DOP) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, DOP_valid)),
+  0x24,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, DOP),
+  QMI_IDL_TYPE88(0, 2),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timestampUtc) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timestampUtc_valid)),
+  0x25,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timestampUtc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, leapSeconds) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, leapSeconds_valid)),
+  0x26,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, leapSeconds),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, gpsTime) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, gpsTime_valid)),
+  0x27,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, gpsTime),
+  QMI_IDL_TYPE88(0, 1),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timeUnc) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timeUnc_valid)),
+  0x28,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timeUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, timeSrc) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, timeSrc_valid)),
+  0x29,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventPositionReportIndMsgT_v02, timeSrc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, sensorDataUsage) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, sensorDataUsage_valid)),
+  0x2A,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventPositionReportIndMsgT_v02, sensorDataUsage),
+  QMI_IDL_TYPE88(0, 3),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, fixId) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, fixId_valid)),
+  0x2B,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventPositionReportIndMsgT_v02, fixId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, gnssSvUsedList_valid)),
+  0x2C,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventPositionReportIndMsgT_v02, gnssSvUsedList),
+  QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, gnssSvUsedList_len),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, altitudeAssumed) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, altitudeAssumed_valid)),
+  0x2D,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventPositionReportIndMsgT_v02, altitudeAssumed)
+};
+
+static const uint8_t qmiLocEventGnssSvInfoIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvInfoIndMsgT_v02, altitudeAssumed),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvInfoIndMsgT_v02, svList) - QMI_IDL_OFFSET8(qmiLocEventGnssSvInfoIndMsgT_v02, svList_valid)),
+  0x10,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvInfoIndMsgT_v02, svList),
+  QMI_LOC_SV_INFO_LIST_MAX_SIZE_V02,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvInfoIndMsgT_v02, svList) - QMI_IDL_OFFSET8(qmiLocEventGnssSvInfoIndMsgT_v02, svList_len),
+  QMI_IDL_TYPE88(0, 4)
+};
+
+static const uint8_t qmiLocEventNmeaIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocEventNmeaIndMsgT_v02, nmea),
+  QMI_LOC_NMEA_STRING_MAX_LENGTH_V02
+};
+
+static const uint8_t qmiLocEventNiNotifyVerifyReqIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, notificationType),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxInd) - QMI_IDL_OFFSET8(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxInd_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxInd),
+  QMI_IDL_TYPE88(0, 5),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiSuplInd) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiSuplInd_valid)),
+  0x11,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiSuplInd),
+  QMI_IDL_TYPE88(0, 11),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiUmtsCpInd) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiUmtsCpInd_valid)),
+  0x12,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiUmtsCpInd),
+  QMI_IDL_TYPE88(0, 13),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxServiceInteractionInd) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxServiceInteractionInd_valid)),
+  0x13,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxServiceInteractionInd),
+  QMI_IDL_TYPE88(0, 14),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiSuplVer2ExtInd) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiSuplVer2ExtInd_valid)),
+  0x14,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiSuplVer2ExtInd),
+  QMI_IDL_TYPE88(0, 15),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, suplEmergencyNotification) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, suplEmergencyNotification_valid)),
+  0x15,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, suplEmergencyNotification),
+  QMI_IDL_TYPE88(0, 16)
+};
+
+static const uint8_t qmiLocEventInjectTimeReqIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventInjectTimeReqIndMsgT_v02, timeServerInfo) - QMI_IDL_OFFSET8(qmiLocEventInjectTimeReqIndMsgT_v02, timeServerInfo_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventInjectTimeReqIndMsgT_v02, timeServerInfo),
+  QMI_IDL_TYPE88(0, 18)
+};
+
+static const uint8_t qmiLocEventInjectPredictedOrbitsReqIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02, allowedSizes),
+  QMI_IDL_TYPE88(0, 19),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02, serverList) - QMI_IDL_OFFSET8(qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02, serverList_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02, serverList),
+  QMI_IDL_TYPE88(0, 20)
+};
+
+static const uint8_t qmiLocEventInjectPositionReqIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventInjectPositionReqIndMsgT_v02, latitude),
+
+  0x02,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventInjectPositionReqIndMsgT_v02, longitude),
+
+  0x03,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventInjectPositionReqIndMsgT_v02, horUncCircular),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x04,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventInjectPositionReqIndMsgT_v02, timestampUtc)
+};
+
+static const uint8_t qmiLocEventEngineStateIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventEngineStateIndMsgT_v02, engineState)
+};
+
+static const uint8_t qmiLocEventFixSessionStateIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventFixSessionStateIndMsgT_v02, sessionState),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventFixSessionStateIndMsgT_v02, sessionId) - QMI_IDL_OFFSET8(qmiLocEventFixSessionStateIndMsgT_v02, sessionId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventFixSessionStateIndMsgT_v02, sessionId)
+};
+
+static const uint8_t qmiLocEventWifiReqIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventWifiReqIndMsgT_v02, requestType),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventWifiReqIndMsgT_v02, tbfInMs) - QMI_IDL_OFFSET8(qmiLocEventWifiReqIndMsgT_v02, tbfInMs_valid)),
+  0x10,
+   QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventWifiReqIndMsgT_v02, tbfInMs)
+};
+
+static const uint8_t qmiLocEventSensorStreamingReadyStatusIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, accelReady) - QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, accelReady_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, accelReady),
+  QMI_IDL_TYPE88(0, 22),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, gyroReady) - QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, gyroReady_valid)),
+  0x11,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, gyroReady),
+  QMI_IDL_TYPE88(0, 22),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, accelTemperatureReady) - QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, accelTemperatureReady_valid)),
+  0x12,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, accelTemperatureReady),
+  QMI_IDL_TYPE88(0, 22),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, gyroTemperatureReady) - QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, gyroTemperatureReady_valid)),
+  0x13,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, gyroTemperatureReady),
+  QMI_IDL_TYPE88(0, 22),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, calibratedMagReady) - QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, calibratedMagReady_valid)),
+  0x14,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, calibratedMagReady),
+  QMI_IDL_TYPE88(0, 22),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, uncalibratedMagReady) - QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, uncalibratedMagReady_valid)),
+  0x15,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, uncalibratedMagReady),
+  QMI_IDL_TYPE88(0, 22)
+};
+
+static const uint8_t qmiLocEventTimeSyncReqIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventTimeSyncReqIndMsgT_v02, refCounter)
+};
+
+static const uint8_t qmiLocEventSetSpiStreamingReportIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventSetSpiStreamingReportIndMsgT_v02, enable)
+};
+
+static const uint8_t qmiLocEventLocationServerConnectionReqIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventLocationServerConnectionReqIndMsgT_v02, connHandle),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventLocationServerConnectionReqIndMsgT_v02, requestType),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x03,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventLocationServerConnectionReqIndMsgT_v02, wwanType)
+};
+
+static const uint8_t qmiLocEventNiGeofenceNotificationIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventNiGeofenceNotificationIndMsgT_v02, geofenceId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventNiGeofenceNotificationIndMsgT_v02, operationType)
+};
+
+static const uint8_t qmiLocEventGeofenceGenAlertIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceGenAlertIndMsgT_v02, geofenceAlert)
+};
+
+static const uint8_t qmiLocEventGeofenceBreachIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceBreachIndMsgT_v02, geofenceId),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceBreachIndMsgT_v02, breachType),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGeofenceBreachIndMsgT_v02, geofencePosition) - QMI_IDL_OFFSET8(qmiLocEventGeofenceBreachIndMsgT_v02, geofencePosition_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceBreachIndMsgT_v02, geofencePosition),
+  QMI_IDL_TYPE88(0, 23),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGeofenceBreachIndMsgT_v02, breachConfidence) - QMI_IDL_OFFSET8(qmiLocEventGeofenceBreachIndMsgT_v02, breachConfidence_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceBreachIndMsgT_v02, breachConfidence)
+};
+
+static const uint8_t qmiLocEventPedometerControlIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPedometerControlIndMsgT_v02, requestPedometerData),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPedometerControlIndMsgT_v02, resetStepCount) - QMI_IDL_OFFSET8(qmiLocEventPedometerControlIndMsgT_v02, resetStepCount_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPedometerControlIndMsgT_v02, resetStepCount),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPedometerControlIndMsgT_v02, stepCountThreshold) - QMI_IDL_OFFSET8(qmiLocEventPedometerControlIndMsgT_v02, stepCountThreshold_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventPedometerControlIndMsgT_v02, stepCountThreshold)
+};
+
+static const uint8_t qmiLocEventMotionDataControlIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventMotionDataControlIndMsgT_v02, requestMotionData)
+};
+
+static const uint8_t qmiLocEventGeofenceBatchedBreachIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, breachType),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, geofenceIdContinuousList) - QMI_IDL_OFFSET8(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, geofenceIdContinuousList_valid)),
+  0x10,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, geofenceIdContinuousList),
+  QMI_LOC_MAX_GEOFENCE_ID_CONTINUOUS_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, geofenceIdContinuousList) - QMI_IDL_OFFSET8(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, geofenceIdContinuousList_len),
+  QMI_IDL_TYPE88(0, 24),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, geofenceIdDiscreteList) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, geofenceIdDiscreteList_valid)),
+  0x11,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, geofenceIdDiscreteList),
+  QMI_LOC_MAX_GEOFENCE_ID_DISCRETE_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, geofenceIdDiscreteList) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, geofenceIdDiscreteList_len),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, geofencePosition) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, geofencePosition_valid)),
+  0x12,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, geofencePosition),
+  QMI_IDL_TYPE88(0, 23),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, breachConfidence) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, breachConfidence_valid)),
+  0x13,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, breachConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, headingUnc) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, headingUnc_valid)),
+  0x14,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, headingUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, vertUnc) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, vertUnc_valid)),
+  0x15,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, vertUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, speedUnc) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, speedUnc_valid)),
+  0x16,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, speedUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, horConfidence) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, horConfidence_valid)),
+  0x17,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, horConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, vertConfidence) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, vertConfidence_valid)),
+  0x18,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, vertConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, DOP) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, DOP_valid)),
+  0x19,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, DOP),
+  QMI_IDL_TYPE88(0, 2),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, gnssSvUsedList_valid)),
+  0x1A,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, gnssSvUsedList),
+  QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedBreachIndMsgT_v02, gnssSvUsedList_len)
+};
+
+static const uint8_t qmiLocEventGeofenceProximityIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceProximityIndMsgT_v02, proximityType),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceProximityIndMsgT_v02, geofenceId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGeofenceProximityIndMsgT_v02, contextId) - QMI_IDL_OFFSET8(qmiLocEventGeofenceProximityIndMsgT_v02, contextId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceProximityIndMsgT_v02, contextId)
+};
+
+static const uint8_t qmiLocEventGeofenceBatchedDwellIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, dwellType),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, geofenceIdContinuousList) - QMI_IDL_OFFSET8(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, geofenceIdContinuousList_valid)),
+  0x10,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, geofenceIdContinuousList),
+  QMI_LOC_MAX_GEOFENCE_ID_CONTINUOUS_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET8(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, geofenceIdContinuousList) - QMI_IDL_OFFSET8(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, geofenceIdContinuousList_len),
+  QMI_IDL_TYPE88(0, 24),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, geofenceIdDiscreteList) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, geofenceIdDiscreteList_valid)),
+  0x11,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, geofenceIdDiscreteList),
+  QMI_LOC_MAX_GEOFENCE_ID_DISCRETE_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, geofenceIdDiscreteList) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, geofenceIdDiscreteList_len),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, geofencePosition) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, geofencePosition_valid)),
+  0x12,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, geofencePosition),
+  QMI_IDL_TYPE88(0, 23),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, headingUnc) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, headingUnc_valid)),
+  0x13,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, headingUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, vertUnc) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, vertUnc_valid)),
+  0x14,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, vertUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, speedUnc) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, speedUnc_valid)),
+  0x15,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, speedUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, horConfidence) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, horConfidence_valid)),
+  0x16,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, horConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, vertConfidence) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, vertConfidence_valid)),
+  0x17,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, vertConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, DOP) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, DOP_valid)),
+  0x18,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, DOP),
+  QMI_IDL_TYPE88(0, 2),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, gnssSvUsedList_valid)),
+  0x19,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, gnssSvUsedList),
+  QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGeofenceBatchedDwellIndMsgT_v02, gnssSvUsedList_len)
+};
+
+static const uint8_t qmiLocEventGdtUploadBeginStatusReqIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGdtUploadBeginStatusReqIndMsgT_v02, serviceId),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGdtUploadBeginStatusReqIndMsgT_v02, sessionId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x03,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGdtUploadBeginStatusReqIndMsgT_v02, filePath),
+  QMI_LOC_MAX_GDT_PATH_LEN_V02,
+  QMI_IDL_OFFSET8(qmiLocEventGdtUploadBeginStatusReqIndMsgT_v02, filePath) - QMI_IDL_OFFSET8(qmiLocEventGdtUploadBeginStatusReqIndMsgT_v02, filePath_len)
+};
+
+static const uint8_t qmiLocEventGdtUploadEndReqIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGdtUploadEndReqIndMsgT_v02, serviceId),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGdtUploadEndReqIndMsgT_v02, sessionId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x03,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGdtUploadEndReqIndMsgT_v02, endStatus)
+};
+
+/*
+ * qmiLocGetServiceRevisionReqMsgT is empty
+ * static const uint8_t qmiLocGetServiceRevisionReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetServiceRevisionIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, status),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, revision),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, gnssMeFWVerString) - QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, gnssMeFWVerString_valid)),
+  0x10,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, gnssMeFWVerString),
+  QMI_LOC_GNSS_ME_VERSION_STRING_MAX_LENGTH_V02,
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, gnssHostSWVerString) - QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, gnssHostSWVerString_valid)),
+  0x11,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, gnssHostSWVerString),
+  QMI_LOC_GNSS_HOSTED_SW_VERSION_STRING_MAX_LENGTH_V02,
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocGetServiceRevisionIndMsgT_v02, gnssSWVerString) - QMI_IDL_OFFSET16RELATIVE(qmiLocGetServiceRevisionIndMsgT_v02, gnssSWVerString_valid)),
+  0x12,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_STRING,
+  QMI_IDL_OFFSET16ARRAY(qmiLocGetServiceRevisionIndMsgT_v02, gnssSWVerString),
+  QMI_LOC_GNSS_SW_VERSION_STRING_MAX_LENGTH_V02
+};
+
+/*
+ * qmiLocGetFixCriteriaReqMsgT is empty
+ * static const uint8_t qmiLocGetFixCriteriaReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetFixCriteriaIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, horizontalAccuracyLevel) - QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, horizontalAccuracyLevel_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, horizontalAccuracyLevel),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, intermediateReportState) - QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, intermediateReportState_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, intermediateReportState),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, minInterval) - QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, minInterval_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, minInterval),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, applicationId) - QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, applicationId_valid)),
+  0x13,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, applicationId),
+  QMI_IDL_TYPE88(0, 0)
+};
+
+static const uint8_t qmiLocNiUserRespReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiUserRespReqMsgT_v02, userResp),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiUserRespReqMsgT_v02, notificationType),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocNiUserRespReqMsgT_v02, NiVxPayload) - QMI_IDL_OFFSET8(qmiLocNiUserRespReqMsgT_v02, NiVxPayload_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocNiUserRespReqMsgT_v02, NiVxPayload),
+  QMI_IDL_TYPE88(0, 5),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiSuplPayload) - QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiSuplPayload_valid)),
+  0x11,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiUserRespReqMsgT_v02, NiSuplPayload),
+  QMI_IDL_TYPE88(0, 11),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiUmtsCpPayload) - QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiUmtsCpPayload_valid)),
+  0x12,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiUserRespReqMsgT_v02, NiUmtsCpPayload),
+  QMI_IDL_TYPE88(0, 13),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiVxServiceInteractionPayload) - QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiVxServiceInteractionPayload_valid)),
+  0x13,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiUserRespReqMsgT_v02, NiVxServiceInteractionPayload),
+  QMI_IDL_TYPE88(0, 14),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiSuplVer2ExtPayload) - QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiSuplVer2ExtPayload_valid)),
+  0x14,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiUserRespReqMsgT_v02, NiSuplVer2ExtPayload),
+  QMI_IDL_TYPE88(0, 15),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, suplEmergencyNotification) - QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, suplEmergencyNotification_valid)),
+  0x15,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocNiUserRespReqMsgT_v02, suplEmergencyNotification),
+  QMI_IDL_TYPE88(0, 16)
+};
+
+static const uint8_t qmiLocNiUserRespIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNiUserRespIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocInjectPredictedOrbitsDataReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, totalSize),
+
+  0x02,
+   QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, totalParts),
+
+  0x03,
+   QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, partNum),
+
+  0x04,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_FLAGS_SZ_IS_16 |   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, partData),
+  ((QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02) & 0xFF), ((QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02) >> 8),
+  QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, partData) - QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, partData_len),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, formatType) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, formatType_valid)),
+  0x10,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, formatType)
+};
+
+static const uint8_t qmiLocInjectPredictedOrbitsDataIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataIndMsgT_v02, partNum) - QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataIndMsgT_v02, partNum_valid)),
+  0x10,
+   QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataIndMsgT_v02, partNum)
+};
+
+/*
+ * qmiLocGetPredictedOrbitsDataSourceReqMsgT is empty
+ * static const uint8_t qmiLocGetPredictedOrbitsDataSourceReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetPredictedOrbitsDataSourceIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, allowedSizes) - QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, allowedSizes_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, allowedSizes),
+  QMI_IDL_TYPE88(0, 19),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, serverList) - QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, serverList_valid)),
+  0x11,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, serverList),
+  QMI_IDL_TYPE88(0, 20)
+};
+
+/*
+ * qmiLocGetPredictedOrbitsDataValidityReqMsgT is empty
+ * static const uint8_t qmiLocGetPredictedOrbitsDataValidityReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetPredictedOrbitsDataValidityIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02, validityInfo) - QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02, validityInfo_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02, validityInfo),
+  QMI_IDL_TYPE88(0, 25)
+};
+
+static const uint8_t qmiLocInjectUtcTimeReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectUtcTimeReqMsgT_v02, timeUtc),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectUtcTimeReqMsgT_v02, timeUnc)
+};
+
+static const uint8_t qmiLocInjectUtcTimeIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectUtcTimeIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocInjectPositionReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, latitude) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, latitude_valid)),
+  0x10,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, latitude),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, longitude) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, longitude_valid)),
+  0x11,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, longitude),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horUncCircular) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horUncCircular_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horUncCircular),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horConfidence) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horConfidence_valid)),
+  0x13,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horReliability) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horReliability_valid)),
+  0x14,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horReliability),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altitudeWrtEllipsoid) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altitudeWrtEllipsoid_valid)),
+  0x15,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altitudeWrtEllipsoid),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altitudeWrtMeanSeaLevel) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altitudeWrtMeanSeaLevel_valid)),
+  0x16,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altitudeWrtMeanSeaLevel),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertUnc) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertUnc_valid)),
+  0x17,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertConfidence) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertConfidence_valid)),
+  0x18,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertReliability) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertReliability_valid)),
+  0x19,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertReliability),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altSourceInfo) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altSourceInfo_valid)),
+  0x1A,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altSourceInfo),
+  QMI_IDL_TYPE88(0, 26),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampUtc) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampUtc_valid)),
+  0x1B,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampUtc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampAge) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampAge_valid)),
+  0x1C,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampAge),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, positionSrc) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, positionSrc_valid)),
+  0x1D,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, positionSrc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, rawHorUncCircular) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, rawHorUncCircular_valid)),
+  0x1E,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, rawHorUncCircular),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, rawHorConfidence) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, rawHorConfidence_valid)),
+  0x1F,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, rawHorConfidence)
+};
+
+static const uint8_t qmiLocInjectPositionIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectPositionIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocSetEngineLockReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetEngineLockReqMsgT_v02, lockType)
+};
+
+static const uint8_t qmiLocSetEngineLockIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetEngineLockIndMsgT_v02, status)
+};
+
+/*
+ * qmiLocGetEngineLockReqMsgT is empty
+ * static const uint8_t qmiLocGetEngineLockReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetEngineLockIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetEngineLockIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetEngineLockIndMsgT_v02, lockType) - QMI_IDL_OFFSET8(qmiLocGetEngineLockIndMsgT_v02, lockType_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetEngineLockIndMsgT_v02, lockType)
+};
+
+static const uint8_t qmiLocSetSbasConfigReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSbasConfigReqMsgT_v02, sbasConfig)
+};
+
+static const uint8_t qmiLocSetSbasConfigIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSbasConfigIndMsgT_v02, status)
+};
+
+/*
+ * qmiLocGetSbasConfigReqMsgT is empty
+ * static const uint8_t qmiLocGetSbasConfigReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetSbasConfigIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSbasConfigIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSbasConfigIndMsgT_v02, sbasConfig) - QMI_IDL_OFFSET8(qmiLocGetSbasConfigIndMsgT_v02, sbasConfig_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSbasConfigIndMsgT_v02, sbasConfig)
+};
+
+static const uint8_t qmiLocSetNmeaTypesReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetNmeaTypesReqMsgT_v02, nmeaSentenceType)
+};
+
+static const uint8_t qmiLocSetNmeaTypesIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetNmeaTypesIndMsgT_v02, status)
+};
+
+/*
+ * qmiLocGetNmeaTypesReqMsgT is empty
+ * static const uint8_t qmiLocGetNmeaTypesReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetNmeaTypesIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetNmeaTypesIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetNmeaTypesIndMsgT_v02, nmeaSentenceType) - QMI_IDL_OFFSET8(qmiLocGetNmeaTypesIndMsgT_v02, nmeaSentenceType_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetNmeaTypesIndMsgT_v02, nmeaSentenceType)
+};
+
+static const uint8_t qmiLocSetLowPowerModeReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetLowPowerModeReqMsgT_v02, lowPowerMode)
+};
+
+static const uint8_t qmiLocSetLowPowerModeIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetLowPowerModeIndMsgT_v02, status)
+};
+
+/*
+ * qmiLocGetLowPowerModeReqMsgT is empty
+ * static const uint8_t qmiLocGetLowPowerModeReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetLowPowerModeIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetLowPowerModeIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetLowPowerModeIndMsgT_v02, lowPowerMode) - QMI_IDL_OFFSET8(qmiLocGetLowPowerModeIndMsgT_v02, lowPowerMode_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetLowPowerModeIndMsgT_v02, lowPowerMode)
+};
+
+static const uint8_t qmiLocSetServerReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, serverType),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, ipv4Addr) - QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, ipv4Addr_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, ipv4Addr),
+  QMI_IDL_TYPE88(0, 8),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, ipv6Addr) - QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, ipv6Addr_valid)),
+  0x11,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, ipv6Addr),
+  QMI_IDL_TYPE88(0, 9),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, urlAddr) - QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, urlAddr_valid)),
+  0x12,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, urlAddr),
+  QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02
+};
+
+static const uint8_t qmiLocSetServerIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetServerIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocGetServerReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetServerReqMsgT_v02, serverType),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetServerReqMsgT_v02, serverAddrTypeMask) - QMI_IDL_OFFSET8(qmiLocGetServerReqMsgT_v02, serverAddrTypeMask_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetServerReqMsgT_v02, serverAddrTypeMask)
+};
+
+static const uint8_t qmiLocGetServerIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, status),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, serverType),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, ipv4Addr) - QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, ipv4Addr_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, ipv4Addr),
+  QMI_IDL_TYPE88(0, 8),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, ipv6Addr) - QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, ipv6Addr_valid)),
+  0x11,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, ipv6Addr),
+  QMI_IDL_TYPE88(0, 9),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, urlAddr) - QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, urlAddr_valid)),
+  0x12,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, urlAddr),
+  QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02
+};
+
+static const uint8_t qmiLocDeleteAssistDataReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteAssistDataReqMsgT_v02, deleteAllFlag),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocDeleteAssistDataReqMsgT_v02, deleteSvInfoList) - QMI_IDL_OFFSET8(qmiLocDeleteAssistDataReqMsgT_v02, deleteSvInfoList_valid)),
+  0x10,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocDeleteAssistDataReqMsgT_v02, deleteSvInfoList),
+  QMI_LOC_DELETE_MAX_SV_INFO_LENGTH_V02,
+  QMI_IDL_OFFSET8(qmiLocDeleteAssistDataReqMsgT_v02, deleteSvInfoList) - QMI_IDL_OFFSET8(qmiLocDeleteAssistDataReqMsgT_v02, deleteSvInfoList_len),
+  QMI_IDL_TYPE88(0, 27),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteGnssDataMask) - QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteGnssDataMask_valid)),
+  0x11,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocDeleteAssistDataReqMsgT_v02, deleteGnssDataMask),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteCellDbDataMask) - QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteCellDbDataMask_valid)),
+  0x12,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocDeleteAssistDataReqMsgT_v02, deleteCellDbDataMask),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteClockInfoMask) - QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteClockInfoMask_valid)),
+  0x13,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocDeleteAssistDataReqMsgT_v02, deleteClockInfoMask),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteBdsSvInfoList) - QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteBdsSvInfoList_valid)),
+  0x14,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocDeleteAssistDataReqMsgT_v02, deleteBdsSvInfoList),
+  QMI_LOC_DELETE_MAX_BDS_SV_INFO_LENGTH_V02,
+  QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteBdsSvInfoList) - QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteBdsSvInfoList_len),
+  QMI_IDL_TYPE88(0, 28)
+};
+
+static const uint8_t qmiLocDeleteAssistDataIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteAssistDataIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocSetXtraTSessionControlReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetXtraTSessionControlReqMsgT_v02, xtraTSessionControl)
+};
+
+static const uint8_t qmiLocSetXtraTSessionControlIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetXtraTSessionControlIndMsgT_v02, status)
+};
+
+/*
+ * qmiLocGetXtraTSessionControlReqMsgT is empty
+ * static const uint8_t qmiLocGetXtraTSessionControlReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetXtraTSessionControlIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetXtraTSessionControlIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetXtraTSessionControlIndMsgT_v02, xtraTSessionControl) - QMI_IDL_OFFSET8(qmiLocGetXtraTSessionControlIndMsgT_v02, xtraTSessionControl_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetXtraTSessionControlIndMsgT_v02, xtraTSessionControl)
+};
+
+static const uint8_t qmiLocInjectWifiPositionReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, wifiFixTime) - QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, wifiFixTime_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, wifiFixTime),
+  QMI_IDL_TYPE88(0, 29),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, wifiFixPosition) - QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, wifiFixPosition_valid)),
+  0x11,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, wifiFixPosition),
+  QMI_IDL_TYPE88(0, 30),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, apInfo) - QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, apInfo_valid)),
+  0x12,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, apInfo),
+  QMI_LOC_WIFI_MAX_REPORTED_APS_PER_MSG_V02,
+  QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, apInfo) - QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, apInfo_len),
+  QMI_IDL_TYPE88(0, 31),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectWifiPositionReqMsgT_v02, horizontalReliability) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectWifiPositionReqMsgT_v02, horizontalReliability_valid)),
+  0x13,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectWifiPositionReqMsgT_v02, horizontalReliability),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectWifiPositionReqMsgT_v02, rawHepe) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectWifiPositionReqMsgT_v02, rawHepe_valid)),
+  0x14,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectWifiPositionReqMsgT_v02, rawHepe),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectWifiPositionReqMsgT_v02, wifiApSsidInfo) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectWifiPositionReqMsgT_v02, wifiApSsidInfo_valid)),
+  0x15,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectWifiPositionReqMsgT_v02, wifiApSsidInfo),
+  QMI_LOC_WIFI_MAX_REPORTED_APS_PER_MSG_V02,
+  QMI_IDL_OFFSET16RELATIVE(qmiLocInjectWifiPositionReqMsgT_v02, wifiApSsidInfo) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectWifiPositionReqMsgT_v02, wifiApSsidInfo_len),
+  QMI_IDL_TYPE88(0, 32)
+};
+
+static const uint8_t qmiLocInjectWifiPositionIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectWifiPositionIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocNotifyWifiStatusReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNotifyWifiStatusReqMsgT_v02, wifiStatus)
+};
+
+static const uint8_t qmiLocNotifyWifiStatusIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNotifyWifiStatusIndMsgT_v02, status)
+};
+
+/*
+ * qmiLocGetRegisteredEventsReqMsgT is empty
+ * static const uint8_t qmiLocGetRegisteredEventsReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetRegisteredEventsIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetRegisteredEventsIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetRegisteredEventsIndMsgT_v02, eventRegMask) - QMI_IDL_OFFSET8(qmiLocGetRegisteredEventsIndMsgT_v02, eventRegMask_valid)),
+  0x10,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetRegisteredEventsIndMsgT_v02, eventRegMask)
+};
+
+static const uint8_t qmiLocSetOperationModeReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetOperationModeReqMsgT_v02, operationMode)
+};
+
+static const uint8_t qmiLocSetOperationModeIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetOperationModeIndMsgT_v02, status)
+};
+
+/*
+ * qmiLocGetOperationModeReqMsgT is empty
+ * static const uint8_t qmiLocGetOperationModeReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetOperationModeIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetOperationModeIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetOperationModeIndMsgT_v02, operationMode) - QMI_IDL_OFFSET8(qmiLocGetOperationModeIndMsgT_v02, operationMode_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetOperationModeIndMsgT_v02, operationMode)
+};
+
+static const uint8_t qmiLocSetSpiStatusReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSpiStatusReqMsgT_v02, stationary),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSpiStatusReqMsgT_v02, confidenceStationary) - QMI_IDL_OFFSET8(qmiLocSetSpiStatusReqMsgT_v02, confidenceStationary_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSpiStatusReqMsgT_v02, confidenceStationary)
+};
+
+static const uint8_t qmiLocSetSpiStatusIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSpiStatusIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocInjectSensorDataReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSensorDataReqMsgT_v02, opaqueIdentifier) - QMI_IDL_OFFSET8(qmiLocInjectSensorDataReqMsgT_v02, opaqueIdentifier_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSensorDataReqMsgT_v02, opaqueIdentifier),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSensorDataReqMsgT_v02, threeAxisAccelData) - QMI_IDL_OFFSET8(qmiLocInjectSensorDataReqMsgT_v02, threeAxisAccelData_valid)),
+  0x11,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocInjectSensorDataReqMsgT_v02, threeAxisAccelData),
+  QMI_IDL_TYPE88(0, 34),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, threeAxisGyroData) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, threeAxisGyroData_valid)),
+  0x12,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectSensorDataReqMsgT_v02, threeAxisGyroData),
+  QMI_IDL_TYPE88(0, 34),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, threeAxisAccelDataTimeSource) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, threeAxisAccelDataTimeSource_valid)),
+  0x13,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectSensorDataReqMsgT_v02, threeAxisAccelDataTimeSource),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, threeAxisGyroDataTimeSource) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, threeAxisGyroDataTimeSource_valid)),
+  0x14,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectSensorDataReqMsgT_v02, threeAxisGyroDataTimeSource),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, accelTemperatureData) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, accelTemperatureData_valid)),
+  0x15,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectSensorDataReqMsgT_v02, accelTemperatureData),
+  QMI_IDL_TYPE88(0, 36),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, gyroTemperatureData) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, gyroTemperatureData_valid)),
+  0x16,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectSensorDataReqMsgT_v02, gyroTemperatureData),
+  QMI_IDL_TYPE88(0, 36),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, threeAxisMagData) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, threeAxisMagData_valid)),
+  0x17,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectSensorDataReqMsgT_v02, threeAxisMagData),
+  QMI_IDL_TYPE88(0, 34),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, threeAxisMagDataTimeSource) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, threeAxisMagDataTimeSource_valid)),
+  0x18,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectSensorDataReqMsgT_v02, threeAxisMagDataTimeSource)
+};
+
+static const uint8_t qmiLocInjectSensorDataIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, opaqueIdentifier) - QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, opaqueIdentifier_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, opaqueIdentifier),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisAccelSamplesAccepted) - QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisAccelSamplesAccepted_valid)),
+  0x11,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisAccelSamplesAccepted),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisGyroSamplesAccepted) - QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisGyroSamplesAccepted_valid)),
+  0x12,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisGyroSamplesAccepted),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, accelTemperatureSamplesAccepted) - QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, accelTemperatureSamplesAccepted_valid)),
+  0x13,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, accelTemperatureSamplesAccepted),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, gyroTemperatureSamplesAccepted) - QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, gyroTemperatureSamplesAccepted_valid)),
+  0x14,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, gyroTemperatureSamplesAccepted),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisMagSamplesAccepted) - QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisMagSamplesAccepted_valid)),
+  0x15,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisMagSamplesAccepted)
+};
+
+static const uint8_t qmiLocInjectTimeSyncDataReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectTimeSyncDataReqMsgT_v02, refCounter),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectTimeSyncDataReqMsgT_v02, sensorProcRxTime),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x03,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectTimeSyncDataReqMsgT_v02, sensorProcTxTime)
+};
+
+static const uint8_t qmiLocInjectTimeSyncDataIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectTimeSyncDataIndMsgT_v02, status)
+};
+
+/*
+ * qmiLocGetCradleMountConfigReqMsgT is empty
+ * static const uint8_t qmiLocGetCradleMountConfigReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetCradleMountConfigIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, cradleMountState) - QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, cradleMountState_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, cradleMountState),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, confidenceCradleMountState) - QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, confidenceCradleMountState_valid)),
+  0x11,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, confidenceCradleMountState)
+};
+
+static const uint8_t qmiLocSetCradleMountConfigReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetCradleMountConfigReqMsgT_v02, cradleMountState),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetCradleMountConfigReqMsgT_v02, confidenceCradleMountState) - QMI_IDL_OFFSET8(qmiLocSetCradleMountConfigReqMsgT_v02, confidenceCradleMountState_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetCradleMountConfigReqMsgT_v02, confidenceCradleMountState)
+};
+
+static const uint8_t qmiLocSetCradleMountConfigIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetCradleMountConfigIndMsgT_v02, status)
+};
+
+/*
+ * qmiLocGetExternalPowerConfigReqMsgT is empty
+ * static const uint8_t qmiLocGetExternalPowerConfigReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetExternalPowerConfigIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetExternalPowerConfigIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetExternalPowerConfigIndMsgT_v02, externalPowerState) - QMI_IDL_OFFSET8(qmiLocGetExternalPowerConfigIndMsgT_v02, externalPowerState_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetExternalPowerConfigIndMsgT_v02, externalPowerState)
+};
+
+static const uint8_t qmiLocSetExternalPowerConfigReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetExternalPowerConfigReqMsgT_v02, externalPowerState)
+};
+
+static const uint8_t qmiLocSetExternalPowerConfigIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetExternalPowerConfigIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocInformLocationServerConnStatusReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusReqMsgT_v02, connHandle),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusReqMsgT_v02, requestType),
+
+  0x03,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusReqMsgT_v02, statusType),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusReqMsgT_v02, apnProfile) - QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusReqMsgT_v02, apnProfile_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusReqMsgT_v02, apnProfile),
+  QMI_IDL_TYPE88(0, 37)
+};
+
+static const uint8_t qmiLocInformLocationServerConnStatusIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocSetProtocolConfigParametersReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplSecurity) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplSecurity_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplSecurity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, vxVersion) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, vxVersion_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, vxVersion),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplVersion) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplVersion_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplVersion),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, lppConfig) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, lppConfig_valid)),
+  0x13,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, lppConfig),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, assistedGlonassProtocolMask) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, assistedGlonassProtocolMask_valid)),
+  0x14,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, assistedGlonassProtocolMask),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplHashAlgo) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplHashAlgo_valid)),
+  0x15,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplHashAlgo),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplTlsVersion) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplTlsVersion_valid)),
+  0x16,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplTlsVersion),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, emergencyProtocol) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, emergencyProtocol_valid)),
+  0x17,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, emergencyProtocol),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, wifiScanInjectTimeout) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, wifiScanInjectTimeout_valid)),
+  0x18,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, wifiScanInjectTimeout)
+};
+
+static const uint8_t qmiLocSetProtocolConfigParametersIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersIndMsgT_v02, failedProtocolConfigParamMask) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersIndMsgT_v02, failedProtocolConfigParamMask_valid)),
+  0x10,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersIndMsgT_v02, failedProtocolConfigParamMask)
+};
+
+static const uint8_t qmiLocGetProtocolConfigParametersReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersReqMsgT_v02, getProtocolConfigParamMask)
+};
+
+static const uint8_t qmiLocGetProtocolConfigParametersIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplSecurity) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplSecurity_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplSecurity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, vxVersion) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, vxVersion_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, vxVersion),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplVersion) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplVersion_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplVersion),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, lppConfig) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, lppConfig_valid)),
+  0x13,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, lppConfig),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, assistedGlonassProtocolMask) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, assistedGlonassProtocolMask_valid)),
+  0x14,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, assistedGlonassProtocolMask),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplHashAlgo) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplHashAlgo_valid)),
+  0x15,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplHashAlgo),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplTlsVersion) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplTlsVersion_valid)),
+  0x16,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplTlsVersion),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, emergencyProtocol) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, emergencyProtocol_valid)),
+  0x17,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, emergencyProtocol),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, wifiScanInjectTimeout) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, wifiScanInjectTimeout_valid)),
+  0x18,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, wifiScanInjectTimeout)
+};
+
+static const uint8_t qmiLocSetSensorControlConfigReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorControlConfigReqMsgT_v02, sensorsUsage) - QMI_IDL_OFFSET8(qmiLocSetSensorControlConfigReqMsgT_v02, sensorsUsage_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorControlConfigReqMsgT_v02, sensorsUsage),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorControlConfigReqMsgT_v02, sensorProvider) - QMI_IDL_OFFSET8(qmiLocSetSensorControlConfigReqMsgT_v02, sensorProvider_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorControlConfigReqMsgT_v02, sensorProvider)
+};
+
+static const uint8_t qmiLocSetSensorControlConfigIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorControlConfigIndMsgT_v02, status)
+};
+
+/*
+ * qmiLocGetSensorControlConfigReqMsgT is empty
+ * static const uint8_t qmiLocGetSensorControlConfigReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetSensorControlConfigIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorControlConfigIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorControlConfigIndMsgT_v02, sensorsUsage) - QMI_IDL_OFFSET8(qmiLocGetSensorControlConfigIndMsgT_v02, sensorsUsage_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorControlConfigIndMsgT_v02, sensorsUsage),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorControlConfigIndMsgT_v02, sensorProvider) - QMI_IDL_OFFSET8(qmiLocGetSensorControlConfigIndMsgT_v02, sensorProvider_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorControlConfigIndMsgT_v02, sensorProvider)
+};
+
+static const uint8_t qmiLocSetSensorPropertiesReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, gyroBiasVarianceRandomWalk) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, gyroBiasVarianceRandomWalk_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, gyroBiasVarianceRandomWalk),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, velocityRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, velocityRandomWalkSpectralDensity_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, velocityRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, accelerationRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, accelerationRandomWalkSpectralDensity_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, accelerationRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, angleRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, angleRandomWalkSpectralDensity_valid)),
+  0x13,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, angleRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, rateRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, rateRandomWalkSpectralDensity_valid)),
+  0x14,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, rateRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleDataUse) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleDataUse_valid)),
+  0x15,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleDataUse),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleVelocityRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleVelocityRandomWalkSpectralDensity_valid)),
+  0x16,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleVelocityRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleAccelRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleAccelRandomWalkSpectralDensity_valid)),
+  0x17,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleAccelRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleAngleRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleAngleRandomWalkSpectralDensity_valid)),
+  0x18,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleAngleRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleAngularRateRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleAngularRateRandomWalkSpectralDensity_valid)),
+  0x19,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleAngularRateRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleOdometryScaleFactorRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleOdometryScaleFactorRandomWalkSpectralDensity_valid)),
+  0x1A,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleOdometryScaleFactorRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleOdometryVariance) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleOdometryVariance_valid)),
+  0x1B,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, vehicleOdometryVariance)
+};
+
+static const uint8_t qmiLocSetSensorPropertiesIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesIndMsgT_v02, failedSensorPropertiesMask) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesIndMsgT_v02, failedSensorPropertiesMask_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesIndMsgT_v02, failedSensorPropertiesMask)
+};
+
+static const uint8_t qmiLocGetSensorPropertiesReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesReqMsgT_v02, getSensorPropertiesMask)
+};
+
+static const uint8_t qmiLocGetSensorPropertiesIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, gyroBiasVarianceRandomWalk) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, gyroBiasVarianceRandomWalk_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, gyroBiasVarianceRandomWalk),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, velocityRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, velocityRandomWalkSpectralDensity_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, velocityRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, accelerationRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, accelerationRandomWalkSpectralDensity_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, accelerationRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, angleRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, angleRandomWalkSpectralDensity_valid)),
+  0x13,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, angleRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, rateRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, rateRandomWalkSpectralDensity_valid)),
+  0x14,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, rateRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleDataUse) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleDataUse_valid)),
+  0x15,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleDataUse),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleVelocityRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleVelocityRandomWalkSpectralDensity_valid)),
+  0x16,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleVelocityRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleAccelRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleAccelRandomWalkSpectralDensity_valid)),
+  0x17,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleAccelRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleAngleRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleAngleRandomWalkSpectralDensity_valid)),
+  0x18,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleAngleRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleAngularRateRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleAngularRateRandomWalkSpectralDensity_valid)),
+  0x19,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleAngularRateRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleOdometryScaleFactorRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleOdometryScaleFactorRandomWalkSpectralDensity_valid)),
+  0x1A,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleOdometryScaleFactorRandomWalkSpectralDensity),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleOdometryVariance) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleOdometryVariance_valid)),
+  0x1B,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, vehicleOdometryVariance)
+};
+
+static const uint8_t qmiLocSetSensorPerformanceControlConfigReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, performanceControlMode) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, performanceControlMode_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, performanceControlMode),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, accelSamplingSpec) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, accelSamplingSpec_valid)),
+  0x11,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, accelSamplingSpec),
+  QMI_IDL_TYPE88(0, 21),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpec) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpec_valid)),
+  0x12,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpec),
+  QMI_IDL_TYPE88(0, 21),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, algorithmConfig) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, algorithmConfig_valid)),
+  0x13,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, algorithmConfig),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, accelSamplingSpecHigh) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, accelSamplingSpecHigh_valid)),
+  0x14,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, accelSamplingSpecHigh),
+  QMI_IDL_TYPE88(0, 21),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpecHigh) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpecHigh_valid)),
+  0x15,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpecHigh),
+  QMI_IDL_TYPE88(0, 21)
+};
+
+static const uint8_t qmiLocSetSensorPerformanceControlConfigIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigIndMsgT_v02, failedConfiguration) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigIndMsgT_v02, failedConfiguration_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigIndMsgT_v02, failedConfiguration)
+};
+
+/*
+ * qmiLocGetSensorPerformanceControlConfigReqMsgT is empty
+ * static const uint8_t qmiLocGetSensorPerformanceControlConfigReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocGetSensorPerformanceControlConfigIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, performanceControlMode) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, performanceControlMode_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, performanceControlMode),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, accelSamplingSpec) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, accelSamplingSpec_valid)),
+  0x11,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, accelSamplingSpec),
+  QMI_IDL_TYPE88(0, 21),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpec) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpec_valid)),
+  0x12,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpec),
+  QMI_IDL_TYPE88(0, 21),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, algorithmConfig) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, algorithmConfig_valid)),
+  0x13,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, algorithmConfig),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, accelSamplingSpecHigh) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, accelSamplingSpecHigh_valid)),
+  0x14,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, accelSamplingSpecHigh),
+  QMI_IDL_TYPE88(0, 21),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpecHigh) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpecHigh_valid)),
+  0x15,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpecHigh),
+  QMI_IDL_TYPE88(0, 21)
+};
+
+static const uint8_t qmiLocInjectSuplCertificateReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSuplCertificateReqMsgT_v02, suplCertId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_FLAGS_SZ_IS_16 |   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSuplCertificateReqMsgT_v02, suplCertData),
+  ((QMI_LOC_MAX_SUPL_CERT_LENGTH_V02) & 0xFF), ((QMI_LOC_MAX_SUPL_CERT_LENGTH_V02) >> 8),
+  QMI_IDL_OFFSET8(qmiLocInjectSuplCertificateReqMsgT_v02, suplCertData) - QMI_IDL_OFFSET8(qmiLocInjectSuplCertificateReqMsgT_v02, suplCertData_len)
+};
+
+static const uint8_t qmiLocInjectSuplCertificateIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSuplCertificateIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocDeleteSuplCertificateReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocDeleteSuplCertificateReqMsgT_v02, suplCertId) - QMI_IDL_OFFSET8(qmiLocDeleteSuplCertificateReqMsgT_v02, suplCertId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteSuplCertificateReqMsgT_v02, suplCertId)
+};
+
+static const uint8_t qmiLocDeleteSuplCertificateIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteSuplCertificateIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocSetPositionEngineConfigParametersReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, injectedPositionControl) - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, injectedPositionControl_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, injectedPositionControl),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, filterSvUsage) - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, filterSvUsage_valid)),
+  0x11,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, filterSvUsage),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, storeAssistData) - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, storeAssistData_valid)),
+  0x12,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, storeAssistData),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, enableFasterTTFF) - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, enableFasterTTFF_valid)),
+  0x13,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, enableFasterTTFF)
+};
+
+static const uint8_t qmiLocSetPositionEngineConfigParametersIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersIndMsgT_v02, failedPositionEngineConfigParamMask) - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersIndMsgT_v02, failedPositionEngineConfigParamMask_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersIndMsgT_v02, failedPositionEngineConfigParamMask)
+};
+
+static const uint8_t qmiLocGetPositionEngineConfigParametersReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersReqMsgT_v02, getPositionEngineConfigParamMask)
+};
+
+static const uint8_t qmiLocGetPositionEngineConfigParametersIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, injectedPositionControl) - QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, injectedPositionControl_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, injectedPositionControl),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, filterSvUsage) - QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, filterSvUsage_valid)),
+  0x11,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, filterSvUsage),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, storeAssistData) - QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, storeAssistData_valid)),
+  0x12,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, storeAssistData),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, enableFasterTTFF) - QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, enableFasterTTFF_valid)),
+  0x13,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, enableFasterTTFF)
+};
+
+static const uint8_t qmiLocAddCircularGeofenceReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, transactionId),
+
+  0x02,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, circularGeofenceArgs),
+  QMI_IDL_TYPE88(0, 38),
+
+  0x03,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, breachMask),
+
+  0x04,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, includePosition),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, responsiveness) - QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, responsiveness_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, responsiveness),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, confidence) - QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, confidence_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, confidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, customResponsivenessValue) - QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, customResponsivenessValue_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, customResponsivenessValue),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, dwellTime) - QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, dwellTime_valid)),
+  0x13,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, dwellTime)
+};
+
+static const uint8_t qmiLocAddCircularGeofenceIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, transactionId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, geofenceId) - QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, geofenceId_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, geofenceId)
+};
+
+static const uint8_t qmiLocDeleteGeofenceReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteGeofenceReqMsgT_v02, geofenceId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteGeofenceReqMsgT_v02, transactionId)
+};
+
+static const uint8_t qmiLocDeleteGeofenceIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, geofenceId) - QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, geofenceId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, geofenceId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, transactionId_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, transactionId)
+};
+
+static const uint8_t qmiLocQueryGeofenceReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocQueryGeofenceReqMsgT_v02, geofenceId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocQueryGeofenceReqMsgT_v02, transactionId)
+};
+
+static const uint8_t qmiLocQueryGeofenceIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceId) - QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, transactionId_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceOrigin) - QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceOrigin_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceOrigin),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, posWrtGeofence) - QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, posWrtGeofence_valid)),
+  0x13,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, posWrtGeofence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, circularGeofenceArgs) - QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, circularGeofenceArgs_valid)),
+  0x14,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, circularGeofenceArgs),
+  QMI_IDL_TYPE88(0, 38),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceState) - QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceState_valid)),
+  0x15,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceState)
+};
+
+static const uint8_t qmiLocSetGeofenceEngineConfigReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, gnssUnavailableIndicationTimeout) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, gnssUnavailableIndicationTimeout_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, gnssUnavailableIndicationTimeout),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, maxGeofences) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, maxGeofences_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, maxGeofences),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, enableMotionDetectionSources) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, enableMotionDetectionSources_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, enableMotionDetectionSources),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, enableCpiUsage) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, enableCpiUsage_valid)),
+  0x13,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, enableCpiUsage),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, gnssPositionSessionTimeout) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, gnssPositionSessionTimeout_valid)),
+  0x14,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, gnssPositionSessionTimeout),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, gnssPositionMaxPuncAcceptable) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, gnssPositionMaxPuncAcceptable_valid)),
+  0x15,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, gnssPositionMaxPuncAcceptable),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, mediumResponsivenessValue) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, mediumResponsivenessValue_valid)),
+  0x16,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, mediumResponsivenessValue),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, chalGnssEnvMinCpiWaitInterval) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, chalGnssEnvMinCpiWaitInterval_valid)),
+  0x17,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, chalGnssEnvMinCpiWaitInterval),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, motionStateInfo) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, motionStateInfo_valid)),
+  0x18,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, motionStateInfo),
+  QMI_LOC_GEOFENCE_MAX_MOTION_STATES_V02,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, motionStateInfo) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigReqMsgT_v02, motionStateInfo_len),
+  QMI_IDL_TYPE88(0, 39)
+};
+
+static const uint8_t qmiLocSetGeofenceEngineConfigIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigIndMsgT_v02, transactionId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineConfigIndMsgT_v02, transactionId)
+};
+
+static const uint8_t qmiLocGetGeofenceEngineConfigReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigReqMsgT_v02, transactionId)
+};
+
+static const uint8_t qmiLocGetGeofenceEngineConfigIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, transactionId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, gnssUnavailableIndicationTimeout) - QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, gnssUnavailableIndicationTimeout_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, gnssUnavailableIndicationTimeout),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, maxGeofences) - QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, maxGeofences_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, maxGeofences),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, enabledMotionDetectionSources) - QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, enabledMotionDetectionSources_valid)),
+  0x13,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, enabledMotionDetectionSources),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, enabledCpiUsage) - QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, enabledCpiUsage_valid)),
+  0x14,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetGeofenceEngineConfigIndMsgT_v02, enabledCpiUsage)
+};
+
+static const uint8_t qmiLocEditGeofenceReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, geofenceId),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, geofenceState) - QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, geofenceState_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, geofenceState),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, breachMask) - QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, breachMask_valid)),
+  0x11,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, breachMask),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, responsiveness) - QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, responsiveness_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, responsiveness)
+};
+
+static const uint8_t qmiLocEditGeofenceIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, geofenceId) - QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, geofenceId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, geofenceId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, transactionId_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, failedParams) - QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, failedParams_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, failedParams)
+};
+
+static const uint8_t qmiLocEventGetTimeZoneReqIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGetTimeZoneReqIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocInjectTimeZoneInfoReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectTimeZoneInfoReqMsgT_v02, timeUtc),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocInjectTimeZoneInfoReqMsgT_v02, timeZone),
+  QMI_IDL_TYPE88(0, 40)
+};
+
+static const uint8_t qmiLocInjectTimeZoneInfoIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectTimeZoneInfoIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocGetBestAvailablePositionReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionReqMsgT_v02, transactionId)
+};
+
+static const uint8_t qmiLocGetBestAvailablePositionIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, transactionId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, latitude) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, latitude_valid)),
+  0x11,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, latitude),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, longitude) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, longitude_valid)),
+  0x12,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, longitude),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncCircular) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncCircular_valid)),
+  0x13,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncCircular),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, altitudeWrtEllipsoid) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, altitudeWrtEllipsoid_valid)),
+  0x14,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, altitudeWrtEllipsoid),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertUnc) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertUnc_valid)),
+  0x15,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, timestampUtc) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, timestampUtc_valid)),
+  0x16,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, timestampUtc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, timeUnc) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, timeUnc_valid)),
+  0x17,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, timeUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseSemiMinor) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseSemiMinor_valid)),
+  0x18,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseSemiMinor),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseSemiMajor) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseSemiMajor_valid)),
+  0x19,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseSemiMajor),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseOrientAzimuth) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseOrientAzimuth_valid)),
+  0x1A,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseOrientAzimuth),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horCircularConfidence) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horCircularConfidence_valid)),
+  0x1B,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horCircularConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horEllipticalConfidence) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horEllipticalConfidence_valid)),
+  0x1C,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horEllipticalConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horReliability) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horReliability_valid)),
+  0x1D,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horReliability),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horSpeed) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horSpeed_valid)),
+  0x1E,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horSpeed),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horSpeedUnc) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horSpeedUnc_valid)),
+  0x1F,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horSpeedUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, altitudeWrtMeanSeaLevel) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, altitudeWrtMeanSeaLevel_valid)),
+  0x20,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, altitudeWrtMeanSeaLevel),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertConfidence) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertConfidence_valid)),
+  0x21,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertReliability) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertReliability_valid)),
+  0x22,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertReliability),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertSpeed) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertSpeed_valid)),
+  0x23,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertSpeed),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertSpeedUnc) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertSpeedUnc_valid)),
+  0x24,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertSpeedUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, heading) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, heading_valid)),
+  0x25,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, heading),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, headingUnc) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, headingUnc_valid)),
+  0x26,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, headingUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, magneticDeviation) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, magneticDeviation_valid)),
+  0x27,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, magneticDeviation),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, technologyMask) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, technologyMask_valid)),
+  0x28,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, technologyMask),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, DOP) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, DOP_valid)),
+  0x29,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, DOP),
+  QMI_IDL_TYPE88(0, 2),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gpsTime) - QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gpsTime_valid)),
+  0x2A,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocGetBestAvailablePositionIndMsgT_v02, gpsTime),
+  QMI_IDL_TYPE88(0, 1),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, timeSrc) - QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, timeSrc_valid)),
+  0x2B,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocGetBestAvailablePositionIndMsgT_v02, timeSrc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, sensorDataUsage) - QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, sensorDataUsage_valid)),
+  0x2C,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocGetBestAvailablePositionIndMsgT_v02, sensorDataUsage),
+  QMI_IDL_TYPE88(0, 3),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gnssSvUsedList_valid)),
+  0x2D,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocGetBestAvailablePositionIndMsgT_v02, gnssSvUsedList),
+  QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gnssSvUsedList_len)
+};
+
+static const uint8_t qmiLocInjectMotionDataReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocInjectMotionDataReqMsgT_v02, motion_data),
+  QMI_IDL_TYPE88(0, 41)
+};
+
+static const uint8_t qmiLocInjectMotionDataIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectMotionDataIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocGetNiGeofenceIdListReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListReqMsgT_v02, transactionId)
+};
+
+static const uint8_t qmiLocGetNiGeofenceIdListIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, transactionId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, niGeofenceIdList) - QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, niGeofenceIdList_valid)),
+  0x11,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, niGeofenceIdList),
+  QMI_LOC_MAX_NI_GEOFENCE_ID_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, niGeofenceIdList) - QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, niGeofenceIdList_len)
+};
+
+static const uint8_t qmiLocInjectGSMCellInfoReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocInjectGSMCellInfoReqMsgT_v02, gsmCellId),
+  QMI_IDL_TYPE88(0, 42),
+
+  0x02,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectGSMCellInfoReqMsgT_v02, roamingStatus),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectGSMCellInfoReqMsgT_v02, timingAdvance) - QMI_IDL_OFFSET8(qmiLocInjectGSMCellInfoReqMsgT_v02, timingAdvance_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectGSMCellInfoReqMsgT_v02, timingAdvance)
+};
+
+static const uint8_t qmiLocInjectGSMCellInfoIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectGSMCellInfoIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocInjectWCDMACellInfoReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocInjectWCDMACellInfoReqMsgT_v02, wcdmaCellId),
+  QMI_IDL_TYPE88(0, 43),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectWCDMACellInfoReqMsgT_v02, roamingStatus),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectWCDMACellInfoReqMsgT_v02, freq) - QMI_IDL_OFFSET8(qmiLocInjectWCDMACellInfoReqMsgT_v02, freq_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectWCDMACellInfoReqMsgT_v02, freq),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectWCDMACellInfoReqMsgT_v02, psc) - QMI_IDL_OFFSET8(qmiLocInjectWCDMACellInfoReqMsgT_v02, psc_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectWCDMACellInfoReqMsgT_v02, psc)
+};
+
+static const uint8_t qmiLocInjectWCDMACellInfoIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectWCDMACellInfoIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocInjectTDSCDMACellInfoReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocInjectTDSCDMACellInfoReqMsgT_v02, tdscdmaCellId),
+  QMI_IDL_TYPE88(0, 44),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectTDSCDMACellInfoReqMsgT_v02, roamingStatus),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectTDSCDMACellInfoReqMsgT_v02, freq) - QMI_IDL_OFFSET8(qmiLocInjectTDSCDMACellInfoReqMsgT_v02, freq_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectTDSCDMACellInfoReqMsgT_v02, freq)
+};
+
+static const uint8_t qmiLocInjectTDSCDMACellInfoIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectTDSCDMACellInfoIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocInjectSubscriberIDReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSubscriberIDReqMsgT_v02, preferredIMSI) - QMI_IDL_OFFSET8(qmiLocInjectSubscriberIDReqMsgT_v02, preferredIMSI_valid)),
+  0x10,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSubscriberIDReqMsgT_v02, preferredIMSI),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSubscriberIDReqMsgT_v02, preferredMSISDN) - QMI_IDL_OFFSET8(qmiLocInjectSubscriberIDReqMsgT_v02, preferredMSISDN_valid)),
+  0x11,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSubscriberIDReqMsgT_v02, preferredMSISDN)
+};
+
+static const uint8_t qmiLocInjectSubscriberIDIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectSubscriberIDIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocInjectNetworkInitiatedMessageReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectNetworkInitiatedMessageReqMsgT_v02, injectedNIMessageType),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_FLAGS_SZ_IS_16 |   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectNetworkInitiatedMessageReqMsgT_v02, injectedNIMessage),
+  ((QMI_LOC_MAX_INJECTED_NETWORK_INITIATED_MESSAGE_LENGTH_V02) & 0xFF), ((QMI_LOC_MAX_INJECTED_NETWORK_INITIATED_MESSAGE_LENGTH_V02) >> 8),
+  QMI_IDL_OFFSET8(qmiLocInjectNetworkInitiatedMessageReqMsgT_v02, injectedNIMessage) - QMI_IDL_OFFSET8(qmiLocInjectNetworkInitiatedMessageReqMsgT_v02, injectedNIMessage_len)
+};
+
+static const uint8_t qmiLocInjectNetworkInitiatedMessageIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectNetworkInitiatedMessageIndMsgT_v02, status)
+};
+
+/*
+ * qmiLocWWANOutOfServiceNotificationReqMsgT is empty
+ * static const uint8_t qmiLocWWANOutOfServiceNotificationReqMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocWWANOutOfServiceNotificationIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocWWANOutOfServiceNotificationIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocPedometerReportReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocPedometerReportReqMsgT_v02, timeSource),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocPedometerReportReqMsgT_v02, timestamp),
+
+  0x03,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocPedometerReportReqMsgT_v02, timeInterval),
+
+  0x04,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocPedometerReportReqMsgT_v02, stepCount),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocPedometerReportReqMsgT_v02, stepConfidence) - QMI_IDL_OFFSET8(qmiLocPedometerReportReqMsgT_v02, stepConfidence_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocPedometerReportReqMsgT_v02, stepConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocPedometerReportReqMsgT_v02, stepCountUncertainty) - QMI_IDL_OFFSET8(qmiLocPedometerReportReqMsgT_v02, stepCountUncertainty_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocPedometerReportReqMsgT_v02, stepCountUncertainty),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocPedometerReportReqMsgT_v02, stepRate) - QMI_IDL_OFFSET8(qmiLocPedometerReportReqMsgT_v02, stepRate_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocPedometerReportReqMsgT_v02, stepRate)
+};
+
+static const uint8_t qmiLocPedometerReportIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocPedometerReportIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocGetBatchSizeReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBatchSizeReqMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBatchSizeReqMsgT_v02, batchSize)
+};
+
+static const uint8_t qmiLocGetBatchSizeIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBatchSizeIndMsgT_v02, status),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBatchSizeIndMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x03,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetBatchSizeIndMsgT_v02, batchSize)
+};
+
+static const uint8_t qmiLocStartBatchingReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartBatchingReqMsgT_v02, minInterval) - QMI_IDL_OFFSET8(qmiLocStartBatchingReqMsgT_v02, minInterval_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartBatchingReqMsgT_v02, minInterval),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartBatchingReqMsgT_v02, horizontalAccuracyLevel) - QMI_IDL_OFFSET8(qmiLocStartBatchingReqMsgT_v02, horizontalAccuracyLevel_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartBatchingReqMsgT_v02, horizontalAccuracyLevel),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartBatchingReqMsgT_v02, fixSessionTimeout) - QMI_IDL_OFFSET8(qmiLocStartBatchingReqMsgT_v02, fixSessionTimeout_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartBatchingReqMsgT_v02, fixSessionTimeout)
+};
+
+static const uint8_t qmiLocStartBatchingIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartBatchingIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocEventBatchFullIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventBatchFullIndMsgT_v02, batchCount)
+};
+
+static const uint8_t qmiLocEventLiveBatchedPositionReportIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventLiveBatchedPositionReportIndMsgT_v02, liveBatchedReport),
+  QMI_IDL_TYPE88(0, 45)
+};
+
+static const uint8_t qmiLocReadFromBatchReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocReadFromBatchReqMsgT_v02, numberOfEntries),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocReadFromBatchReqMsgT_v02, transactionId)
+};
+
+static const uint8_t qmiLocReadFromBatchIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocReadFromBatchIndMsgT_v02, status),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocReadFromBatchIndMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocReadFromBatchIndMsgT_v02, numberOfEntries) - QMI_IDL_OFFSET8(qmiLocReadFromBatchIndMsgT_v02, numberOfEntries_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocReadFromBatchIndMsgT_v02, numberOfEntries),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocReadFromBatchIndMsgT_v02, batchedReportList) - QMI_IDL_OFFSET8(qmiLocReadFromBatchIndMsgT_v02, batchedReportList_valid)),
+  0x11,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocReadFromBatchIndMsgT_v02, batchedReportList),
+  QMI_LOC_READ_FROM_BATCH_MAX_SIZE_V02,
+  QMI_IDL_OFFSET8(qmiLocReadFromBatchIndMsgT_v02, batchedReportList) - QMI_IDL_OFFSET8(qmiLocReadFromBatchIndMsgT_v02, batchedReportList_len),
+  QMI_IDL_TYPE88(0, 45)
+};
+
+static const uint8_t qmiLocStopBatchingReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStopBatchingReqMsgT_v02, transactionId)
+};
+
+static const uint8_t qmiLocStopBatchingIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStopBatchingIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStopBatchingIndMsgT_v02, transactionId)
+};
+
+static const uint8_t qmiLocReleaseBatchReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocReleaseBatchReqMsgT_v02, transactionId)
+};
+
+static const uint8_t qmiLocReleaseBatchIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocReleaseBatchIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocReleaseBatchIndMsgT_v02, transactionId)
+};
+
+/*
+ * qmiLocEventInjectWifiApDataReqIndMsgT is empty
+ * static const uint8_t qmiLocEventInjectWifiApDataReqIndMsgT_data_v02[] = {
+ * };
+ */
+
+static const uint8_t qmiLocInjectWifiApDataReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocInjectWifiApDataReqMsgT_v02, wifiApInfo),
+  QMI_LOC_WIFI_MAX_REPORTED_APS_PER_MSG_V02,
+  QMI_IDL_OFFSET8(qmiLocInjectWifiApDataReqMsgT_v02, wifiApInfo) - QMI_IDL_OFFSET8(qmiLocInjectWifiApDataReqMsgT_v02, wifiApInfo_len),
+  QMI_IDL_TYPE88(0, 46)
+};
+
+static const uint8_t qmiLocInjectWifiApDataIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectWifiApDataIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocNotifyWifiAttachmentStatusReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNotifyWifiAttachmentStatusReqMsgT_v02, attachState),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocNotifyWifiAttachmentStatusReqMsgT_v02, accessPointMacAddress) - QMI_IDL_OFFSET8(qmiLocNotifyWifiAttachmentStatusReqMsgT_v02, accessPointMacAddress_valid)),
+  0x10,
+  QMI_IDL_FLAGS_IS_ARRAY |  QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNotifyWifiAttachmentStatusReqMsgT_v02, accessPointMacAddress),
+  QMI_LOC_WIFI_MAC_ADDR_LENGTH_V02,
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocNotifyWifiAttachmentStatusReqMsgT_v02, wifiApSsid) - QMI_IDL_OFFSET8(qmiLocNotifyWifiAttachmentStatusReqMsgT_v02, wifiApSsid_valid)),
+  0x11,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_STRING,
+  QMI_IDL_OFFSET8(qmiLocNotifyWifiAttachmentStatusReqMsgT_v02, wifiApSsid),
+  QMI_LOC_MAX_WIFI_AP_SSID_STR_LENGTH_V02
+};
+
+static const uint8_t qmiLocNotifyWifiAttachmentStatusIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNotifyWifiAttachmentStatusIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocNotifyWifiEnabledStatusReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNotifyWifiEnabledStatusReqMsgT_v02, enabledStatus)
+};
+
+static const uint8_t qmiLocNotifyWifiEnabledStatusIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocNotifyWifiEnabledStatusIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocEventVehicleDataReadyIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventVehicleDataReadyIndMsgT_v02, vehicleAccelReadyStatus) - QMI_IDL_OFFSET8(qmiLocEventVehicleDataReadyIndMsgT_v02, vehicleAccelReadyStatus_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventVehicleDataReadyIndMsgT_v02, vehicleAccelReadyStatus),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventVehicleDataReadyIndMsgT_v02, vehicleAngularRateReadyStatus) - QMI_IDL_OFFSET8(qmiLocEventVehicleDataReadyIndMsgT_v02, vehicleAngularRateReadyStatus_valid)),
+  0x11,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventVehicleDataReadyIndMsgT_v02, vehicleAngularRateReadyStatus),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventVehicleDataReadyIndMsgT_v02, vehicleOdometryReadyStatus) - QMI_IDL_OFFSET8(qmiLocEventVehicleDataReadyIndMsgT_v02, vehicleOdometryReadyStatus_valid)),
+  0x12,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventVehicleDataReadyIndMsgT_v02, vehicleOdometryReadyStatus)
+};
+
+static const uint8_t qmiLocInjectVehicleSensorDataReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectVehicleSensorDataReqMsgT_v02, accelData) - QMI_IDL_OFFSET8(qmiLocInjectVehicleSensorDataReqMsgT_v02, accelData_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocInjectVehicleSensorDataReqMsgT_v02, accelData),
+  QMI_IDL_TYPE88(0, 48),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectVehicleSensorDataReqMsgT_v02, angRotationData) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectVehicleSensorDataReqMsgT_v02, angRotationData_valid)),
+  0x11,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectVehicleSensorDataReqMsgT_v02, angRotationData),
+  QMI_IDL_TYPE88(0, 48),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectVehicleSensorDataReqMsgT_v02, odometryData) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectVehicleSensorDataReqMsgT_v02, odometryData_valid)),
+  0x12,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectVehicleSensorDataReqMsgT_v02, odometryData),
+  QMI_IDL_TYPE88(0, 50),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectVehicleSensorDataReqMsgT_v02, changeInTimeScales) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectVehicleSensorDataReqMsgT_v02, changeInTimeScales_valid)),
+  0x13,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocInjectVehicleSensorDataReqMsgT_v02, changeInTimeScales)
+};
+
+static const uint8_t qmiLocInjectVehicleSensorDataIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectVehicleSensorDataIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocGetAvailWwanPositionReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionReqMsgT_v02, transactionId)
+};
+
+static const uint8_t qmiLocGetAvailWwanPositionIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, transactionId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, latitude) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, latitude_valid)),
+  0x11,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, latitude),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, longitude) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, longitude_valid)),
+  0x12,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, longitude),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horUncCircular) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horUncCircular_valid)),
+  0x13,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horUncCircular),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, altitudeWrtEllipsoid) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, altitudeWrtEllipsoid_valid)),
+  0x14,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, altitudeWrtEllipsoid),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, vertUnc) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, vertUnc_valid)),
+  0x15,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, vertUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, timestampUtc) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, timestampUtc_valid)),
+  0x16,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, timestampUtc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, timeUnc) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, timeUnc_valid)),
+  0x17,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, timeUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horUncEllipseSemiMinor) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horUncEllipseSemiMinor_valid)),
+  0x18,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horUncEllipseSemiMinor),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horUncEllipseSemiMajor) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horUncEllipseSemiMajor_valid)),
+  0x19,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horUncEllipseSemiMajor),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horUncEllipseOrientAzimuth) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horUncEllipseOrientAzimuth_valid)),
+  0x1A,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horUncEllipseOrientAzimuth),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horCircularConfidence) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horCircularConfidence_valid)),
+  0x1B,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horCircularConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horEllipticalConfidence) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horEllipticalConfidence_valid)),
+  0x1C,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horEllipticalConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horReliability) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horReliability_valid)),
+  0x1D,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, horReliability),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, altitudeWrtMeanSeaLevel) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, altitudeWrtMeanSeaLevel_valid)),
+  0x1E,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, altitudeWrtMeanSeaLevel),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, vertConfidence) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, vertConfidence_valid)),
+  0x1F,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, vertConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, vertReliability) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, vertReliability_valid)),
+  0x20,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, vertReliability),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, gpsTime) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, gpsTime_valid)),
+  0x21,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, gpsTime),
+  QMI_IDL_TYPE88(0, 1),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, timeSrc) - QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, timeSrc_valid)),
+  0x22,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGetAvailWwanPositionIndMsgT_v02, timeSrc)
+};
+
+static const uint8_t qmiLocSetPremiumServicesCfgReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetPremiumServicesCfgReqMsgT_v02, premiumServiceType),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetPremiumServicesCfgReqMsgT_v02, premiumServiceCfg)
+};
+
+static const uint8_t qmiLocSetPremiumServicesCfgIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetPremiumServicesCfgIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocSetXtraVersionCheckReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetXtraVersionCheckReqMsgT_v02, xtraVersionCheckMode)
+};
+
+static const uint8_t qmiLocSetXtraVersionCheckIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetXtraVersionCheckIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocSetGNSSConstRepConfigReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGNSSConstRepConfigReqMsgT_v02, measReportConfig) - QMI_IDL_OFFSET8(qmiLocSetGNSSConstRepConfigReqMsgT_v02, measReportConfig_valid)),
+  0x10,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGNSSConstRepConfigReqMsgT_v02, measReportConfig),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGNSSConstRepConfigReqMsgT_v02, svPolyReportConfig) - QMI_IDL_OFFSET8(qmiLocSetGNSSConstRepConfigReqMsgT_v02, svPolyReportConfig_valid)),
+  0x11,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGNSSConstRepConfigReqMsgT_v02, svPolyReportConfig)
+};
+
+static const uint8_t qmiLocSetGNSSConstRepConfigIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGNSSConstRepConfigIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocEventGnssSvMeasInfoIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, seqNum),
+
+  0x02,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, maxMessageNum),
+
+  0x03,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, system),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, rcvrClockFrequencyInfo) - QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, rcvrClockFrequencyInfo_valid)),
+  0x10,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, rcvrClockFrequencyInfo),
+  QMI_IDL_TYPE88(0, 51),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, leapSecondInfo) - QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, leapSecondInfo_valid)),
+  0x11,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, leapSecondInfo),
+  QMI_IDL_TYPE88(0, 52),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, gpsGloInterSystemBias) - QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, gpsGloInterSystemBias_valid)),
+  0x12,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, gpsGloInterSystemBias),
+  QMI_IDL_TYPE88(0, 53),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, gpsBdsInterSystemBias) - QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, gpsBdsInterSystemBias_valid)),
+  0x13,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, gpsBdsInterSystemBias),
+  QMI_IDL_TYPE88(0, 53),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, gpsGalInterSystemBias) - QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, gpsGalInterSystemBias_valid)),
+  0x14,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, gpsGalInterSystemBias),
+  QMI_IDL_TYPE88(0, 53),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, bdsGloInterSystemBias) - QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, bdsGloInterSystemBias_valid)),
+  0x15,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, bdsGloInterSystemBias),
+  QMI_IDL_TYPE88(0, 53),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, galGloInterSystemBias) - QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, galGloInterSystemBias_valid)),
+  0x16,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, galGloInterSystemBias),
+  QMI_IDL_TYPE88(0, 53),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, galBdsInterSystemBias) - QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, galBdsInterSystemBias_valid)),
+  0x17,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, galBdsInterSystemBias),
+  QMI_IDL_TYPE88(0, 53),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, systemTime) - QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, systemTime_valid)),
+  0x18,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, systemTime),
+  QMI_IDL_TYPE88(0, 54),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, gloTime) - QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, gloTime_valid)),
+  0x19,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, gloTime),
+  QMI_IDL_TYPE88(0, 55),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, systemTimeExt) - QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, systemTimeExt_valid)),
+  0x1A,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, systemTimeExt),
+  QMI_IDL_TYPE88(0, 56),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, svMeasurement) - QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, svMeasurement_valid)),
+  0x1B,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, svMeasurement),
+  QMI_LOC_SV_MEAS_LIST_MAX_SIZE_V02,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, svMeasurement) - QMI_IDL_OFFSET8(qmiLocEventGnssSvMeasInfoIndMsgT_v02, svMeasurement_len),
+  QMI_IDL_TYPE88(0, 58)
+};
+
+static const uint8_t qmiLocEventGnssSvPolyIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, gnssSvId),
+
+  0x02,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, T0),
+
+  0x03,
+   QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, svPolyFlagValid),
+
+  0x04,
+   QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, svPolyFlags),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, polyCoeffXYZ0) - QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, polyCoeffXYZ0_valid)),
+  0x10,
+  QMI_IDL_FLAGS_IS_ARRAY |  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, polyCoeffXYZ0),
+  QMI_LOC_SV_POLY_XYZ_0_TH_ORDER_COEFF_SIZE_V02,
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, polyCoefXYZN) - QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, polyCoefXYZN_valid)),
+  0x11,
+  QMI_IDL_FLAGS_IS_ARRAY |  QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, polyCoefXYZN),
+  QMI_LOC_SV_POLY_XYZ_N_TH_ORDER_COEFF_SIZE_V02,
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, polyCoefClockBias) - QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, polyCoefClockBias_valid)),
+  0x12,
+  QMI_IDL_FLAGS_IS_ARRAY |  QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, polyCoefClockBias),
+  QMI_LOC_SV_POLY_SV_CLKBIAS_COEFF_SIZE_V02,
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, gloFrequency) - QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, gloFrequency_valid)),
+  0x13,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, gloFrequency),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, IODE) - QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, IODE_valid)),
+  0x14,
+   QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, IODE),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, enhancedIOD) - QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, enhancedIOD_valid)),
+  0x15,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, enhancedIOD),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, svPosUnc) - QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, svPosUnc_valid)),
+  0x16,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, svPosUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, ionoDelay) - QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, ionoDelay_valid)),
+  0x17,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, ionoDelay),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, ionoDot) - QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, ionoDot_valid)),
+  0x18,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, ionoDot),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, sbasIonoDelay) - QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, sbasIonoDelay_valid)),
+  0x19,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, sbasIonoDelay),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, sbasIonoDot) - QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, sbasIonoDot_valid)),
+  0x1A,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, sbasIonoDot),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, tropoDelay) - QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, tropoDelay_valid)),
+  0x1B,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventGnssSvPolyIndMsgT_v02, tropoDelay),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGnssSvPolyIndMsgT_v02, elevation) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGnssSvPolyIndMsgT_v02, elevation_valid)),
+  0x1C,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGnssSvPolyIndMsgT_v02, elevation),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGnssSvPolyIndMsgT_v02, elevationDot) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGnssSvPolyIndMsgT_v02, elevationDot_valid)),
+  0x1D,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGnssSvPolyIndMsgT_v02, elevationDot),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGnssSvPolyIndMsgT_v02, elenationUnc) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGnssSvPolyIndMsgT_v02, elenationUnc_valid)),
+  0x1E,
+   QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGnssSvPolyIndMsgT_v02, elenationUnc),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventGnssSvPolyIndMsgT_v02, velCoef) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventGnssSvPolyIndMsgT_v02, velCoef_valid)),
+  0x1F,
+  QMI_IDL_FLAGS_IS_ARRAY |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocEventGnssSvPolyIndMsgT_v02, velCoef),
+  QMI_LOC_SV_POLY_VELOCITY_COEF_SIZE_V02
+};
+
+static const uint8_t qmiLocAddGeofenceContextReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddGeofenceContextReqMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddGeofenceContextReqMsgT_v02, geofenceId) - QMI_IDL_OFFSET8(qmiLocAddGeofenceContextReqMsgT_v02, geofenceId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddGeofenceContextReqMsgT_v02, geofenceId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddGeofenceContextReqMsgT_v02, wifiApSsidInfo) - QMI_IDL_OFFSET8(qmiLocAddGeofenceContextReqMsgT_v02, wifiApSsidInfo_valid)),
+  0x11,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocAddGeofenceContextReqMsgT_v02, wifiApSsidInfo),
+  QMI_LOC_WIFI_AREA_ID_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET8(qmiLocAddGeofenceContextReqMsgT_v02, wifiApSsidInfo) - QMI_IDL_OFFSET8(qmiLocAddGeofenceContextReqMsgT_v02, wifiApSsidInfo_len),
+  QMI_IDL_TYPE88(0, 32),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, wifiApMacAddressList) - QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, wifiApMacAddressList_valid)),
+  0x12,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocAddGeofenceContextReqMsgT_v02, wifiApMacAddressList),
+  QMI_LOC_WIFI_AREA_ID_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, wifiApMacAddressList) - QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, wifiApMacAddressList_len),
+  QMI_IDL_TYPE88(0, 59),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, tdsCdmaCellIDList) - QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, tdsCdmaCellIDList_valid)),
+  0x13,
+  QMI_IDL_FLAGS_IS_ARRAY |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocAddGeofenceContextReqMsgT_v02, tdsCdmaCellIDList),
+  QMI_LOC_CELL_ID_LIST_LENGTH_V02,
+  QMI_IDL_TYPE88(0, 44),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, wcdmaCellIDList) - QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, wcdmaCellIDList_valid)),
+  0x14,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocAddGeofenceContextReqMsgT_v02, wcdmaCellIDList),
+  QMI_LOC_CELL_ID_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, wcdmaCellIDList) - QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, wcdmaCellIDList_len),
+  QMI_IDL_TYPE88(0, 43),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, gsmCellIDList) - QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, gsmCellIDList_valid)),
+  0x15,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocAddGeofenceContextReqMsgT_v02, gsmCellIDList),
+  QMI_LOC_CELL_ID_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, gsmCellIDList) - QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, gsmCellIDList_len),
+  QMI_IDL_TYPE88(0, 42),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, iBeaconList) - QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, iBeaconList_valid)),
+  0x16,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET16ARRAY(qmiLocAddGeofenceContextReqMsgT_v02, iBeaconList),
+  QMI_LOC_IBEACON_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, iBeaconList) - QMI_IDL_OFFSET16RELATIVE(qmiLocAddGeofenceContextReqMsgT_v02, iBeaconList_len),
+  QMI_IDL_TYPE88(0, 60)
+};
+
+static const uint8_t qmiLocAddGeofenceContextIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddGeofenceContextIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddGeofenceContextIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocAddGeofenceContextIndMsgT_v02, transactionId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddGeofenceContextIndMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddGeofenceContextIndMsgT_v02, geofenceId) - QMI_IDL_OFFSET8(qmiLocAddGeofenceContextIndMsgT_v02, geofenceId_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddGeofenceContextIndMsgT_v02, geofenceId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddGeofenceContextIndMsgT_v02, contextId) - QMI_IDL_OFFSET8(qmiLocAddGeofenceContextIndMsgT_v02, contextId_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocAddGeofenceContextIndMsgT_v02, contextId)
+};
+
+static const uint8_t qmiLocSetGeofenceEngineContextReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineContextReqMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineContextReqMsgT_v02, utcTimeOfDay) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineContextReqMsgT_v02, utcTimeOfDay_valid)),
+  0x10,
+   QMI_IDL_GENERIC_8_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineContextReqMsgT_v02, utcTimeOfDay),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineContextReqMsgT_v02, temperature) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineContextReqMsgT_v02, temperature_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineContextReqMsgT_v02, temperature)
+};
+
+static const uint8_t qmiLocSetGeofenceEngineContextIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineContextIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineContextIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineContextIndMsgT_v02, transactionId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocSetGeofenceEngineContextIndMsgT_v02, transactionId)
+};
+
+static const uint8_t qmiLocDeleteGeofenceContextReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextReqMsgT_v02, transactionId),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextReqMsgT_v02, geofenceId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextReqMsgT_v02, contextId) - QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextReqMsgT_v02, contextId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextReqMsgT_v02, contextId)
+};
+
+static const uint8_t qmiLocDeleteGeofenceContextIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextIndMsgT_v02, transactionId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextIndMsgT_v02, transactionId),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextIndMsgT_v02, geofenceId) - QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextIndMsgT_v02, geofenceId_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextIndMsgT_v02, geofenceId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextIndMsgT_v02, contextId) - QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextIndMsgT_v02, contextId_valid)),
+  0x12,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocDeleteGeofenceContextIndMsgT_v02, contextId)
+};
+
+static const uint8_t qmiLocInjectGtpClientDownloadedDataReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_FLAGS_SZ_IS_16 |   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectGtpClientDownloadedDataReqMsgT_v02, ClientDownloadedData),
+  ((QMI_LOC_MAX_GTP_WWAN_CLIENT_DOWNLOADED_DATA_LEN_V02) & 0xFF), ((QMI_LOC_MAX_GTP_WWAN_CLIENT_DOWNLOADED_DATA_LEN_V02) >> 8),
+  QMI_IDL_OFFSET8(qmiLocInjectGtpClientDownloadedDataReqMsgT_v02, ClientDownloadedData) - QMI_IDL_OFFSET8(qmiLocInjectGtpClientDownloadedDataReqMsgT_v02, ClientDownloadedData_len)
+};
+
+static const uint8_t qmiLocInjectGtpClientDownloadedDataIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocInjectGtpClientDownloadedDataIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocGdtUploadBeginStatusReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGdtUploadBeginStatusReqMsgT_v02, serviceId),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGdtUploadBeginStatusReqMsgT_v02, sessionId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x03,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGdtUploadBeginStatusReqMsgT_v02, gdtAccessStatus)
+};
+
+static const uint8_t qmiLocGdtUploadBeginStatusIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGdtUploadBeginStatusIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocGdtUploadEndReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGdtUploadEndReqMsgT_v02, serviceId),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGdtUploadEndReqMsgT_v02, sessionId),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x03,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGdtUploadEndReqMsgT_v02, gdtEndStatus)
+};
+
+static const uint8_t qmiLocGdtUploadEndIndMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocGdtUploadEndIndMsgT_v02, status)
+};
+
+static const uint8_t qmiLocStartDbtReqMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartDbtReqMsgT_v02, reqId),
+
+  0x02,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartDbtReqMsgT_v02, minDistance),
+
+  0x03,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartDbtReqMsgT_v02, distanceType),
+
+  0x04,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartDbtReqMsgT_v02, needOriginLocation),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartDbtReqMsgT_v02, maxLatency) - QMI_IDL_OFFSET8(qmiLocStartDbtReqMsgT_v02, maxLatency_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartDbtReqMsgT_v02, maxLatency),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartDbtReqMsgT_v02, usageType) - QMI_IDL_OFFSET8(qmiLocStartDbtReqMsgT_v02, usageType_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartDbtReqMsgT_v02, usageType)
+};
+
+static const uint8_t qmiLocStartDbtIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartDbtIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartDbtIndMsgT_v02, reqId) - QMI_IDL_OFFSET8(qmiLocStartDbtIndMsgT_v02, reqId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStartDbtIndMsgT_v02, reqId)
+};
+
+static const uint8_t qmiLocStopDbtReqMsgT_data_v02[] = {
+  QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStopDbtReqMsgT_v02, reqId)
+};
+
+static const uint8_t qmiLocStopDbtIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStopDbtIndMsgT_v02, status),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStopDbtIndMsgT_v02, reqId) - QMI_IDL_OFFSET8(qmiLocStopDbtIndMsgT_v02, reqId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocStopDbtIndMsgT_v02, reqId)
+};
+
+static const uint8_t qmiLocEventDbtPositionReportIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, reqId),
+
+  0x02,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, dbtPosition),
+  QMI_IDL_TYPE88(0, 61),
+
+  0x03,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, positionType),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, headingUnc) - QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, headingUnc_valid)),
+  0x10,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, headingUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, speedUnc) - QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, speedUnc_valid)),
+  0x11,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, speedUnc),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, horConfidence) - QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, horConfidence_valid)),
+  0x12,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, horConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, vertConfidence) - QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, vertConfidence_valid)),
+  0x13,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, vertConfidence),
+
+  QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, DOP) - QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, DOP_valid)),
+  0x14,
+   QMI_IDL_AGGREGATE,
+  QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, DOP),
+  QMI_IDL_TYPE88(0, 2),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, gnssSvUsedList_valid)),
+  0x15,
+  QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |  QMI_IDL_GENERIC_2_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, gnssSvUsedList),
+  QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02,
+  QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET8(qmiLocEventDbtPositionReportIndMsgT_v02, gnssSvUsedList_len)
+};
+
+static const uint8_t qmiLocEventDbtSessionStatusIndMsgT_data_v02[] = {
+  0x01,
+   QMI_IDL_GENERIC_4_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventDbtSessionStatusIndMsgT_v02, dbtSessionStatus),
+
+  QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventDbtSessionStatusIndMsgT_v02, reqId) - QMI_IDL_OFFSET8(qmiLocEventDbtSessionStatusIndMsgT_v02, reqId_valid)),
+  0x10,
+   QMI_IDL_GENERIC_1_BYTE,
+  QMI_IDL_OFFSET8(qmiLocEventDbtSessionStatusIndMsgT_v02, reqId)
+};
+
+/* Type Table */
+static const qmi_idl_type_table_entry  loc_type_table_v02[] = {
+  {sizeof(qmiLocApplicationIdStructT_v02), qmiLocApplicationIdStructT_data_v02},
+  {sizeof(qmiLocGPSTimeStructT_v02), qmiLocGPSTimeStructT_data_v02},
+  {sizeof(qmiLocDOPStructT_v02), qmiLocDOPStructT_data_v02},
+  {sizeof(qmiLocSensorUsageIndicatorStructT_v02), qmiLocSensorUsageIndicatorStructT_data_v02},
+  {sizeof(qmiLocSvInfoStructT_v02), qmiLocSvInfoStructT_data_v02},
+  {sizeof(qmiLocNiVxNotifyVerifyStructT_v02), qmiLocNiVxNotifyVerifyStructT_data_v02},
+  {sizeof(qmiLocNiSuplFormattedStringStructT_v02), qmiLocNiSuplFormattedStringStructT_data_v02},
+  {sizeof(qmiLocNiSuplQopStructT_v02), qmiLocNiSuplQopStructT_data_v02},
+  {sizeof(qmiLocIpV4AddrStructType_v02), qmiLocIpV4AddrStructType_data_v02},
+  {sizeof(qmiLocIpV6AddrStructType_v02), qmiLocIpV6AddrStructType_data_v02},
+  {sizeof(qmiLocNiSuplServerInfoStructT_v02), qmiLocNiSuplServerInfoStructT_data_v02},
+  {sizeof(qmiLocNiSuplNotifyVerifyStructT_v02), qmiLocNiSuplNotifyVerifyStructT_data_v02},
+  {sizeof(qmiLocNiUmtsCpCodedStringStructT_v02), qmiLocNiUmtsCpCodedStringStructT_data_v02},
+  {sizeof(qmiLocNiUmtsCpNotifyVerifyStructT_v02), qmiLocNiUmtsCpNotifyVerifyStructT_data_v02},
+  {sizeof(qmiLocNiVxServiceInteractionStructT_v02), qmiLocNiVxServiceInteractionStructT_data_v02},
+  {sizeof(qmiLocNiSuplVer2ExtStructT_v02), qmiLocNiSuplVer2ExtStructT_data_v02},
+  {sizeof(qmiLocEmergencyNotificationStructT_v02), qmiLocEmergencyNotificationStructT_data_v02},
+  {sizeof(qmiLocAssistanceServerUrlStructT_v02), qmiLocAssistanceServerUrlStructT_data_v02},
+  {sizeof(qmiLocTimeServerListStructT_v02), qmiLocTimeServerListStructT_data_v02},
+  {sizeof(qmiLocPredictedOrbitsAllowedSizesStructT_v02), qmiLocPredictedOrbitsAllowedSizesStructT_data_v02},
+  {sizeof(qmiLocPredictedOrbitsServerListStructT_v02), qmiLocPredictedOrbitsServerListStructT_data_v02},
+  {sizeof(qmiLocSensorControlConfigSamplingSpecStructT_v02), qmiLocSensorControlConfigSamplingSpecStructT_data_v02},
+  {sizeof(qmiLocSensorReadyStatusStructT_v02), qmiLocSensorReadyStatusStructT_data_v02},
+  {sizeof(qmiLocGeofencePositionStructT_v02), qmiLocGeofencePositionStructT_data_v02},
+  {sizeof(qmiLocGeofenceIdContinuousStructT_v02), qmiLocGeofenceIdContinuousStructT_data_v02},
+  {sizeof(qmiLocPredictedOrbitsDataValidityStructT_v02), qmiLocPredictedOrbitsDataValidityStructT_data_v02},
+  {sizeof(qmiLocAltitudeSrcInfoStructT_v02), qmiLocAltitudeSrcInfoStructT_data_v02},
+  {sizeof(qmiLocDeleteSvInfoStructT_v02), qmiLocDeleteSvInfoStructT_data_v02},
+  {sizeof(qmiLocDeleteBDSSvInfoStructT_v02), qmiLocDeleteBDSSvInfoStructT_data_v02},
+  {sizeof(qmiLocWifiFixTimeStructT_v02), qmiLocWifiFixTimeStructT_data_v02},
+  {sizeof(qmiLocWifiFixPosStructT_v02), qmiLocWifiFixPosStructT_data_v02},
+  {sizeof(qmiLocWifiApInfoStructT_v02), qmiLocWifiApInfoStructT_data_v02},
+  {sizeof(qmiLocWifiApSsidStructT_v02), qmiLocWifiApSsidStructT_data_v02},
+  {sizeof(qmiLoc3AxisSensorSampleStructT_v02), qmiLoc3AxisSensorSampleStructT_data_v02},
+  {sizeof(qmiLoc3AxisSensorSampleListStructT_v02), qmiLoc3AxisSensorSampleListStructT_data_v02},
+  {sizeof(qmiLocSensorTemperatureSampleStructT_v02), qmiLocSensorTemperatureSampleStructT_data_v02},
+  {sizeof(qmiLocSensorTemperatureSampleListStructT_v02), qmiLocSensorTemperatureSampleListStructT_data_v02},
+  {sizeof(qmiLocApnProfilesStructT_v02), qmiLocApnProfilesStructT_data_v02},
+  {sizeof(qmiLocCircularGeofenceArgsStructT_v02), qmiLocCircularGeofenceArgsStructT_data_v02},
+  {sizeof(qmiLocGeofenceMotionStateConfigStructT_v02), qmiLocGeofenceMotionStateConfigStructT_data_v02},
+  {sizeof(qmiLocTimeZoneStructT_v02), qmiLocTimeZoneStructT_data_v02},
+  {sizeof(qmiLocMotionDataStructT_v02), qmiLocMotionDataStructT_data_v02},
+  {sizeof(qmiLocGSMCellIdStructT_v02), qmiLocGSMCellIdStructT_data_v02},
+  {sizeof(qmiLocWCDMACellIdStructT_v02), qmiLocWCDMACellIdStructT_data_v02},
+  {sizeof(qmiLocTDSCDMACellIdStructT_v02), qmiLocTDSCDMACellIdStructT_data_v02},
+  {sizeof(qmiLocBatchedReportStructT_v02), qmiLocBatchedReportStructT_data_v02},
+  {sizeof(qmiLocWifiApDataStructT_v02), qmiLocWifiApDataStructT_data_v02},
+  {sizeof(qmiLocVehicleSensorSampleStructT_v02), qmiLocVehicleSensorSampleStructT_data_v02},
+  {sizeof(qmiLocVehicleSensorSampleListStructType_v02), qmiLocVehicleSensorSampleListStructType_data_v02},
+  {sizeof(qmiLocVehicleOdometrySampleStructT_v02), qmiLocVehicleOdometrySampleStructT_data_v02},
+  {sizeof(qmiLocVehicleOdometrySampleListStructT_v02), qmiLocVehicleOdometrySampleListStructT_data_v02},
+  {sizeof(qmiLocRcvrClockFrequencyInfoStructT_v02), qmiLocRcvrClockFrequencyInfoStructT_data_v02},
+  {sizeof(qmiLocLeapSecondInfoStructT_v02), qmiLocLeapSecondInfoStructT_data_v02},
+  {sizeof(qmiLocInterSystemBiasStructT_v02), qmiLocInterSystemBiasStructT_data_v02},
+  {sizeof(qmiLocGnssTimeStructT_v02), qmiLocGnssTimeStructT_data_v02},
+  {sizeof(qmiLocGloTimeStructT_v02), qmiLocGloTimeStructT_data_v02},
+  {sizeof(qmiLocGnssTimeExtStructT_v02), qmiLocGnssTimeExtStructT_data_v02},
+  {sizeof(qmiLocSVTimeSpeedStructT_v02), qmiLocSVTimeSpeedStructT_data_v02},
+  {sizeof(qmiLocSVMeasurementStructT_v02), qmiLocSVMeasurementStructT_data_v02},
+  {sizeof(qmiLocWifiApMacAddressStructT_v02), qmiLocWifiApMacAddressStructT_data_v02},
+  {sizeof(qmiLocIBeaconIdStructT_v02), qmiLocIBeaconIdStructT_data_v02},
+  {sizeof(qmiLocDbtPositionStructT_v02), qmiLocDbtPositionStructT_data_v02}
+};
+
+/* Message Table */
+static const qmi_idl_message_table_entry loc_message_table_v02[] = {
+  {sizeof(qmiLocGenRespMsgT_v02), qmiLocGenRespMsgT_data_v02},
+  {sizeof(qmiLocInformClientRevisionReqMsgT_v02), qmiLocInformClientRevisionReqMsgT_data_v02},
+  {sizeof(qmiLocRegEventsReqMsgT_v02), qmiLocRegEventsReqMsgT_data_v02},
+  {sizeof(qmiLocStartReqMsgT_v02), qmiLocStartReqMsgT_data_v02},
+  {sizeof(qmiLocStopReqMsgT_v02), qmiLocStopReqMsgT_data_v02},
+  {sizeof(qmiLocEventPositionReportIndMsgT_v02), qmiLocEventPositionReportIndMsgT_data_v02},
+  {sizeof(qmiLocEventGnssSvInfoIndMsgT_v02), qmiLocEventGnssSvInfoIndMsgT_data_v02},
+  {sizeof(qmiLocEventNmeaIndMsgT_v02), qmiLocEventNmeaIndMsgT_data_v02},
+  {sizeof(qmiLocEventNiNotifyVerifyReqIndMsgT_v02), qmiLocEventNiNotifyVerifyReqIndMsgT_data_v02},
+  {sizeof(qmiLocEventInjectTimeReqIndMsgT_v02), qmiLocEventInjectTimeReqIndMsgT_data_v02},
+  {sizeof(qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02), qmiLocEventInjectPredictedOrbitsReqIndMsgT_data_v02},
+  {sizeof(qmiLocEventInjectPositionReqIndMsgT_v02), qmiLocEventInjectPositionReqIndMsgT_data_v02},
+  {sizeof(qmiLocEventEngineStateIndMsgT_v02), qmiLocEventEngineStateIndMsgT_data_v02},
+  {sizeof(qmiLocEventFixSessionStateIndMsgT_v02), qmiLocEventFixSessionStateIndMsgT_data_v02},
+  {sizeof(qmiLocEventWifiReqIndMsgT_v02), qmiLocEventWifiReqIndMsgT_data_v02},
+  {sizeof(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02), qmiLocEventSensorStreamingReadyStatusIndMsgT_data_v02},
+  {sizeof(qmiLocEventTimeSyncReqIndMsgT_v02), qmiLocEventTimeSyncReqIndMsgT_data_v02},
+  {sizeof(qmiLocEventSetSpiStreamingReportIndMsgT_v02), qmiLocEventSetSpiStreamingReportIndMsgT_data_v02},
+  {sizeof(qmiLocEventLocationServerConnectionReqIndMsgT_v02), qmiLocEventLocationServerConnectionReqIndMsgT_data_v02},
+  {sizeof(qmiLocEventNiGeofenceNotificationIndMsgT_v02), qmiLocEventNiGeofenceNotificationIndMsgT_data_v02},
+  {sizeof(qmiLocEventGeofenceGenAlertIndMsgT_v02), qmiLocEventGeofenceGenAlertIndMsgT_data_v02},
+  {sizeof(qmiLocEventGeofenceBreachIndMsgT_v02), qmiLocEventGeofenceBreachIndMsgT_data_v02},
+  {sizeof(qmiLocEventPedometerControlIndMsgT_v02), qmiLocEventPedometerControlIndMsgT_data_v02},
+  {sizeof(qmiLocEventMotionDataControlIndMsgT_v02), qmiLocEventMotionDataControlIndMsgT_data_v02},
+  {sizeof(qmiLocEventGeofenceBatchedBreachIndMsgT_v02), qmiLocEventGeofenceBatchedBreachIndMsgT_data_v02},
+  {sizeof(qmiLocEventGeofenceProximityIndMsgT_v02), qmiLocEventGeofenceProximityIndMsgT_data_v02},
+  {sizeof(qmiLocEventGeofenceBatchedDwellIndMsgT_v02), qmiLocEventGeofenceBatchedDwellIndMsgT_data_v02},
+  {sizeof(qmiLocEventGdtUploadBeginStatusReqIndMsgT_v02), qmiLocEventGdtUploadBeginStatusReqIndMsgT_data_v02},
+  {sizeof(qmiLocEventGdtUploadEndReqIndMsgT_v02), qmiLocEventGdtUploadEndReqIndMsgT_data_v02},
+  {sizeof(qmiLocGetServiceRevisionReqMsgT_v02), 0},
+  {sizeof(qmiLocGetServiceRevisionIndMsgT_v02), qmiLocGetServiceRevisionIndMsgT_data_v02},
+  {sizeof(qmiLocGetFixCriteriaReqMsgT_v02), 0},
+  {sizeof(qmiLocGetFixCriteriaIndMsgT_v02), qmiLocGetFixCriteriaIndMsgT_data_v02},
+  {sizeof(qmiLocNiUserRespReqMsgT_v02), qmiLocNiUserRespReqMsgT_data_v02},
+  {sizeof(qmiLocNiUserRespIndMsgT_v02), qmiLocNiUserRespIndMsgT_data_v02},
+  {sizeof(qmiLocInjectPredictedOrbitsDataReqMsgT_v02), qmiLocInjectPredictedOrbitsDataReqMsgT_data_v02},
+  {sizeof(qmiLocInjectPredictedOrbitsDataIndMsgT_v02), qmiLocInjectPredictedOrbitsDataIndMsgT_data_v02},
+  {sizeof(qmiLocGetPredictedOrbitsDataSourceReqMsgT_v02), 0},
+  {sizeof(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02), qmiLocGetPredictedOrbitsDataSourceIndMsgT_data_v02},
+  {sizeof(qmiLocGetPredictedOrbitsDataValidityReqMsgT_v02), 0},
+  {sizeof(qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02), qmiLocGetPredictedOrbitsDataValidityIndMsgT_data_v02},
+  {sizeof(qmiLocInjectUtcTimeReqMsgT_v02), qmiLocInjectUtcTimeReqMsgT_data_v02},
+  {sizeof(qmiLocInjectUtcTimeIndMsgT_v02), qmiLocInjectUtcTimeIndMsgT_data_v02},
+  {sizeof(qmiLocInjectPositionReqMsgT_v02), qmiLocInjectPositionReqMsgT_data_v02},
+  {sizeof(qmiLocInjectPositionIndMsgT_v02), qmiLocInjectPositionIndMsgT_data_v02},
+  {sizeof(qmiLocSetEngineLockReqMsgT_v02), qmiLocSetEngineLockReqMsgT_data_v02},
+  {sizeof(qmiLocSetEngineLockIndMsgT_v02), qmiLocSetEngineLockIndMsgT_data_v02},
+  {sizeof(qmiLocGetEngineLockReqMsgT_v02), 0},
+  {sizeof(qmiLocGetEngineLockIndMsgT_v02), qmiLocGetEngineLockIndMsgT_data_v02},
+  {sizeof(qmiLocSetSbasConfigReqMsgT_v02), qmiLocSetSbasConfigReqMsgT_data_v02},
+  {sizeof(qmiLocSetSbasConfigIndMsgT_v02), qmiLocSetSbasConfigIndMsgT_data_v02},
+  {sizeof(qmiLocGetSbasConfigReqMsgT_v02), 0},
+  {sizeof(qmiLocGetSbasConfigIndMsgT_v02), qmiLocGetSbasConfigIndMsgT_data_v02},
+  {sizeof(qmiLocSetNmeaTypesReqMsgT_v02), qmiLocSetNmeaTypesReqMsgT_data_v02},
+  {sizeof(qmiLocSetNmeaTypesIndMsgT_v02), qmiLocSetNmeaTypesIndMsgT_data_v02},
+  {sizeof(qmiLocGetNmeaTypesReqMsgT_v02), 0},
+  {sizeof(qmiLocGetNmeaTypesIndMsgT_v02), qmiLocGetNmeaTypesIndMsgT_data_v02},
+  {sizeof(qmiLocSetLowPowerModeReqMsgT_v02), qmiLocSetLowPowerModeReqMsgT_data_v02},
+  {sizeof(qmiLocSetLowPowerModeIndMsgT_v02), qmiLocSetLowPowerModeIndMsgT_data_v02},
+  {sizeof(qmiLocGetLowPowerModeReqMsgT_v02), 0},
+  {sizeof(qmiLocGetLowPowerModeIndMsgT_v02), qmiLocGetLowPowerModeIndMsgT_data_v02},
+  {sizeof(qmiLocSetServerReqMsgT_v02), qmiLocSetServerReqMsgT_data_v02},
+  {sizeof(qmiLocSetServerIndMsgT_v02), qmiLocSetServerIndMsgT_data_v02},
+  {sizeof(qmiLocGetServerReqMsgT_v02), qmiLocGetServerReqMsgT_data_v02},
+  {sizeof(qmiLocGetServerIndMsgT_v02), qmiLocGetServerIndMsgT_data_v02},
+  {sizeof(qmiLocDeleteAssistDataReqMsgT_v02), qmiLocDeleteAssistDataReqMsgT_data_v02},
+  {sizeof(qmiLocDeleteAssistDataIndMsgT_v02), qmiLocDeleteAssistDataIndMsgT_data_v02},
+  {sizeof(qmiLocSetXtraTSessionControlReqMsgT_v02), qmiLocSetXtraTSessionControlReqMsgT_data_v02},
+  {sizeof(qmiLocSetXtraTSessionControlIndMsgT_v02), qmiLocSetXtraTSessionControlIndMsgT_data_v02},
+  {sizeof(qmiLocGetXtraTSessionControlReqMsgT_v02), 0},
+  {sizeof(qmiLocGetXtraTSessionControlIndMsgT_v02), qmiLocGetXtraTSessionControlIndMsgT_data_v02},
+  {sizeof(qmiLocInjectWifiPositionReqMsgT_v02), qmiLocInjectWifiPositionReqMsgT_data_v02},
+  {sizeof(qmiLocInjectWifiPositionIndMsgT_v02), qmiLocInjectWifiPositionIndMsgT_data_v02},
+  {sizeof(qmiLocNotifyWifiStatusReqMsgT_v02), qmiLocNotifyWifiStatusReqMsgT_data_v02},
+  {sizeof(qmiLocNotifyWifiStatusIndMsgT_v02), qmiLocNotifyWifiStatusIndMsgT_data_v02},
+  {sizeof(qmiLocGetRegisteredEventsReqMsgT_v02), 0},
+  {sizeof(qmiLocGetRegisteredEventsIndMsgT_v02), qmiLocGetRegisteredEventsIndMsgT_data_v02},
+  {sizeof(qmiLocSetOperationModeReqMsgT_v02), qmiLocSetOperationModeReqMsgT_data_v02},
+  {sizeof(qmiLocSetOperationModeIndMsgT_v02), qmiLocSetOperationModeIndMsgT_data_v02},
+  {sizeof(qmiLocGetOperationModeReqMsgT_v02), 0},
+  {sizeof(qmiLocGetOperationModeIndMsgT_v02), qmiLocGetOperationModeIndMsgT_data_v02},
+  {sizeof(qmiLocSetSpiStatusReqMsgT_v02), qmiLocSetSpiStatusReqMsgT_data_v02},
+  {sizeof(qmiLocSetSpiStatusIndMsgT_v02), qmiLocSetSpiStatusIndMsgT_data_v02},
+  {sizeof(qmiLocInjectSensorDataReqMsgT_v02), qmiLocInjectSensorDataReqMsgT_data_v02},
+  {sizeof(qmiLocInjectSensorDataIndMsgT_v02), qmiLocInjectSensorDataIndMsgT_data_v02},
+  {sizeof(qmiLocInjectTimeSyncDataReqMsgT_v02), qmiLocInjectTimeSyncDataReqMsgT_data_v02},
+  {sizeof(qmiLocInjectTimeSyncDataIndMsgT_v02), qmiLocInjectTimeSyncDataIndMsgT_data_v02},
+  {sizeof(qmiLocGetCradleMountConfigReqMsgT_v02), 0},
+  {sizeof(qmiLocGetCradleMountConfigIndMsgT_v02), qmiLocGetCradleMountConfigIndMsgT_data_v02},
+  {sizeof(qmiLocSetCradleMountConfigReqMsgT_v02), qmiLocSetCradleMountConfigReqMsgT_data_v02},
+  {sizeof(qmiLocSetCradleMountConfigIndMsgT_v02), qmiLocSetCradleMountConfigIndMsgT_data_v02},
+  {sizeof(qmiLocGetExternalPowerConfigReqMsgT_v02), 0},
+  {sizeof(qmiLocGetExternalPowerConfigIndMsgT_v02), qmiLocGetExternalPowerConfigIndMsgT_data_v02},
+  {sizeof(qmiLocSetExternalPowerConfigReqMsgT_v02), qmiLocSetExternalPowerConfigReqMsgT_data_v02},
+  {sizeof(qmiLocSetExternalPowerConfigIndMsgT_v02), qmiLocSetExternalPowerConfigIndMsgT_data_v02},
+  {sizeof(qmiLocInformLocationServerConnStatusReqMsgT_v02), qmiLocInformLocationServerConnStatusReqMsgT_data_v02},
+  {sizeof(qmiLocInformLocationServerConnStatusIndMsgT_v02), qmiLocInformLocationServerConnStatusIndMsgT_data_v02},
+  {sizeof(qmiLocSetProtocolConfigParametersReqMsgT_v02), qmiLocSetProtocolConfigParametersReqMsgT_data_v02},
+  {sizeof(qmiLocSetProtocolConfigParametersIndMsgT_v02), qmiLocSetProtocolConfigParametersIndMsgT_data_v02},
+  {sizeof(qmiLocGetProtocolConfigParametersReqMsgT_v02), qmiLocGetProtocolConfigParametersReqMsgT_data_v02},
+  {sizeof(qmiLocGetProtocolConfigParametersIndMsgT_v02), qmiLocGetProtocolConfigParametersIndMsgT_data_v02},
+  {sizeof(qmiLocSetSensorControlConfigReqMsgT_v02), qmiLocSetSensorControlConfigReqMsgT_data_v02},
+  {sizeof(qmiLocSetSensorControlConfigIndMsgT_v02), qmiLocSetSensorControlConfigIndMsgT_data_v02},
+  {sizeof(qmiLocGetSensorControlConfigReqMsgT_v02), 0},
+  {sizeof(qmiLocGetSensorControlConfigIndMsgT_v02), qmiLocGetSensorControlConfigIndMsgT_data_v02},
+  {sizeof(qmiLocSetSensorPropertiesReqMsgT_v02), qmiLocSetSensorPropertiesReqMsgT_data_v02},
+  {sizeof(qmiLocSetSensorPropertiesIndMsgT_v02), qmiLocSetSensorPropertiesIndMsgT_data_v02},
+  {sizeof(qmiLocGetSensorPropertiesReqMsgT_v02), qmiLocGetSensorPropertiesReqMsgT_data_v02},
+  {sizeof(qmiLocGetSensorPropertiesIndMsgT_v02), qmiLocGetSensorPropertiesIndMsgT_data_v02},
+  {sizeof(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02), qmiLocSetSensorPerformanceControlConfigReqMsgT_data_v02},
+  {sizeof(qmiLocSetSensorPerformanceControlConfigIndMsgT_v02), qmiLocSetSensorPerformanceControlConfigIndMsgT_data_v02},
+  {sizeof(qmiLocGetSensorPerformanceControlConfigReqMsgT_v02), 0},
+  {sizeof(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02), qmiLocGetSensorPerformanceControlConfigIndMsgT_data_v02},
+  {sizeof(qmiLocInjectSuplCertificateReqMsgT_v02), qmiLocInjectSuplCertificateReqMsgT_data_v02},
+  {sizeof(qmiLocInjectSuplCertificateIndMsgT_v02), qmiLocInjectSuplCertificateIndMsgT_data_v02},
+  {sizeof(qmiLocDeleteSuplCertificateReqMsgT_v02), qmiLocDeleteSuplCertificateReqMsgT_data_v02},
+  {sizeof(qmiLocDeleteSuplCertificateIndMsgT_v02), qmiLocDeleteSuplCertificateIndMsgT_data_v02},
+  {sizeof(qmiLocSetPositionEngineConfigParametersReqMsgT_v02), qmiLocSetPositionEngineConfigParametersReqMsgT_data_v02},
+  {sizeof(qmiLocSetPositionEngineConfigParametersIndMsgT_v02), qmiLocSetPositionEngineConfigParametersIndMsgT_data_v02},
+  {sizeof(qmiLocGetPositionEngineConfigParametersReqMsgT_v02), qmiLocGetPositionEngineConfigParametersReqMsgT_data_v02},
+  {sizeof(qmiLocGetPositionEngineConfigParametersIndMsgT_v02), qmiLocGetPositionEngineConfigParametersIndMsgT_data_v02},
+  {sizeof(qmiLocAddCircularGeofenceReqMsgT_v02), qmiLocAddCircularGeofenceReqMsgT_data_v02},
+  {sizeof(qmiLocAddCircularGeofenceIndMsgT_v02), qmiLocAddCircularGeofenceIndMsgT_data_v02},
+  {sizeof(qmiLocDeleteGeofenceReqMsgT_v02), qmiLocDeleteGeofenceReqMsgT_data_v02},
+  {sizeof(qmiLocDeleteGeofenceIndMsgT_v02), qmiLocDeleteGeofenceIndMsgT_data_v02},
+  {sizeof(qmiLocQueryGeofenceReqMsgT_v02), qmiLocQueryGeofenceReqMsgT_data_v02},
+  {sizeof(qmiLocQueryGeofenceIndMsgT_v02), qmiLocQueryGeofenceIndMsgT_data_v02},
+  {sizeof(qmiLocSetGeofenceEngineConfigReqMsgT_v02), qmiLocSetGeofenceEngineConfigReqMsgT_data_v02},
+  {sizeof(qmiLocSetGeofenceEngineConfigIndMsgT_v02), qmiLocSetGeofenceEngineConfigIndMsgT_data_v02},
+  {sizeof(qmiLocGetGeofenceEngineConfigReqMsgT_v02), qmiLocGetGeofenceEngineConfigReqMsgT_data_v02},
+  {sizeof(qmiLocGetGeofenceEngineConfigIndMsgT_v02), qmiLocGetGeofenceEngineConfigIndMsgT_data_v02},
+  {sizeof(qmiLocEditGeofenceReqMsgT_v02), qmiLocEditGeofenceReqMsgT_data_v02},
+  {sizeof(qmiLocEditGeofenceIndMsgT_v02), qmiLocEditGeofenceIndMsgT_data_v02},
+  {sizeof(qmiLocEventGetTimeZoneReqIndMsgT_v02), qmiLocEventGetTimeZoneReqIndMsgT_data_v02},
+  {sizeof(qmiLocInjectTimeZoneInfoReqMsgT_v02), qmiLocInjectTimeZoneInfoReqMsgT_data_v02},
+  {sizeof(qmiLocInjectTimeZoneInfoIndMsgT_v02), qmiLocInjectTimeZoneInfoIndMsgT_data_v02},
+  {sizeof(qmiLocGetBestAvailablePositionReqMsgT_v02), qmiLocGetBestAvailablePositionReqMsgT_data_v02},
+  {sizeof(qmiLocGetBestAvailablePositionIndMsgT_v02), qmiLocGetBestAvailablePositionIndMsgT_data_v02},
+  {sizeof(qmiLocInjectMotionDataReqMsgT_v02), qmiLocInjectMotionDataReqMsgT_data_v02},
+  {sizeof(qmiLocInjectMotionDataIndMsgT_v02), qmiLocInjectMotionDataIndMsgT_data_v02},
+  {sizeof(qmiLocGetNiGeofenceIdListReqMsgT_v02), qmiLocGetNiGeofenceIdListReqMsgT_data_v02},
+  {sizeof(qmiLocGetNiGeofenceIdListIndMsgT_v02), qmiLocGetNiGeofenceIdListIndMsgT_data_v02},
+  {sizeof(qmiLocInjectGSMCellInfoReqMsgT_v02), qmiLocInjectGSMCellInfoReqMsgT_data_v02},
+  {sizeof(qmiLocInjectGSMCellInfoIndMsgT_v02), qmiLocInjectGSMCellInfoIndMsgT_data_v02},
+  {sizeof(qmiLocInjectWCDMACellInfoReqMsgT_v02), qmiLocInjectWCDMACellInfoReqMsgT_data_v02},
+  {sizeof(qmiLocInjectWCDMACellInfoIndMsgT_v02), qmiLocInjectWCDMACellInfoIndMsgT_data_v02},
+  {sizeof(qmiLocInjectTDSCDMACellInfoReqMsgT_v02), qmiLocInjectTDSCDMACellInfoReqMsgT_data_v02},
+  {sizeof(qmiLocInjectTDSCDMACellInfoIndMsgT_v02), qmiLocInjectTDSCDMACellInfoIndMsgT_data_v02},
+  {sizeof(qmiLocInjectSubscriberIDReqMsgT_v02), qmiLocInjectSubscriberIDReqMsgT_data_v02},
+  {sizeof(qmiLocInjectSubscriberIDIndMsgT_v02), qmiLocInjectSubscriberIDIndMsgT_data_v02},
+  {sizeof(qmiLocInjectNetworkInitiatedMessageReqMsgT_v02), qmiLocInjectNetworkInitiatedMessageReqMsgT_data_v02},
+  {sizeof(qmiLocInjectNetworkInitiatedMessageIndMsgT_v02), qmiLocInjectNetworkInitiatedMessageIndMsgT_data_v02},
+  {sizeof(qmiLocWWANOutOfServiceNotificationReqMsgT_v02), 0},
+  {sizeof(qmiLocWWANOutOfServiceNotificationIndMsgT_v02), qmiLocWWANOutOfServiceNotificationIndMsgT_data_v02},
+  {sizeof(qmiLocPedometerReportReqMsgT_v02), qmiLocPedometerReportReqMsgT_data_v02},
+  {sizeof(qmiLocPedometerReportIndMsgT_v02), qmiLocPedometerReportIndMsgT_data_v02},
+  {sizeof(qmiLocGetBatchSizeReqMsgT_v02), qmiLocGetBatchSizeReqMsgT_data_v02},
+  {sizeof(qmiLocGetBatchSizeIndMsgT_v02), qmiLocGetBatchSizeIndMsgT_data_v02},
+  {sizeof(qmiLocStartBatchingReqMsgT_v02), qmiLocStartBatchingReqMsgT_data_v02},
+  {sizeof(qmiLocStartBatchingIndMsgT_v02), qmiLocStartBatchingIndMsgT_data_v02},
+  {sizeof(qmiLocEventBatchFullIndMsgT_v02), qmiLocEventBatchFullIndMsgT_data_v02},
+  {sizeof(qmiLocEventLiveBatchedPositionReportIndMsgT_v02), qmiLocEventLiveBatchedPositionReportIndMsgT_data_v02},
+  {sizeof(qmiLocReadFromBatchReqMsgT_v02), qmiLocReadFromBatchReqMsgT_data_v02},
+  {sizeof(qmiLocReadFromBatchIndMsgT_v02), qmiLocReadFromBatchIndMsgT_data_v02},
+  {sizeof(qmiLocStopBatchingReqMsgT_v02), qmiLocStopBatchingReqMsgT_data_v02},
+  {sizeof(qmiLocStopBatchingIndMsgT_v02), qmiLocStopBatchingIndMsgT_data_v02},
+  {sizeof(qmiLocReleaseBatchReqMsgT_v02), qmiLocReleaseBatchReqMsgT_data_v02},
+  {sizeof(qmiLocReleaseBatchIndMsgT_v02), qmiLocReleaseBatchIndMsgT_data_v02},
+  {sizeof(qmiLocEventInjectWifiApDataReqIndMsgT_v02), 0},
+  {sizeof(qmiLocInjectWifiApDataReqMsgT_v02), qmiLocInjectWifiApDataReqMsgT_data_v02},
+  {sizeof(qmiLocInjectWifiApDataIndMsgT_v02), qmiLocInjectWifiApDataIndMsgT_data_v02},
+  {sizeof(qmiLocNotifyWifiAttachmentStatusReqMsgT_v02), qmiLocNotifyWifiAttachmentStatusReqMsgT_data_v02},
+  {sizeof(qmiLocNotifyWifiAttachmentStatusIndMsgT_v02), qmiLocNotifyWifiAttachmentStatusIndMsgT_data_v02},
+  {sizeof(qmiLocNotifyWifiEnabledStatusReqMsgT_v02), qmiLocNotifyWifiEnabledStatusReqMsgT_data_v02},
+  {sizeof(qmiLocNotifyWifiEnabledStatusIndMsgT_v02), qmiLocNotifyWifiEnabledStatusIndMsgT_data_v02},
+  {sizeof(qmiLocEventVehicleDataReadyIndMsgT_v02), qmiLocEventVehicleDataReadyIndMsgT_data_v02},
+  {sizeof(qmiLocInjectVehicleSensorDataReqMsgT_v02), qmiLocInjectVehicleSensorDataReqMsgT_data_v02},
+  {sizeof(qmiLocInjectVehicleSensorDataIndMsgT_v02), qmiLocInjectVehicleSensorDataIndMsgT_data_v02},
+  {sizeof(qmiLocGetAvailWwanPositionReqMsgT_v02), qmiLocGetAvailWwanPositionReqMsgT_data_v02},
+  {sizeof(qmiLocGetAvailWwanPositionIndMsgT_v02), qmiLocGetAvailWwanPositionIndMsgT_data_v02},
+  {sizeof(qmiLocSetPremiumServicesCfgReqMsgT_v02), qmiLocSetPremiumServicesCfgReqMsgT_data_v02},
+  {sizeof(qmiLocSetPremiumServicesCfgIndMsgT_v02), qmiLocSetPremiumServicesCfgIndMsgT_data_v02},
+  {sizeof(qmiLocSetXtraVersionCheckReqMsgT_v02), qmiLocSetXtraVersionCheckReqMsgT_data_v02},
+  {sizeof(qmiLocSetXtraVersionCheckIndMsgT_v02), qmiLocSetXtraVersionCheckIndMsgT_data_v02},
+  {sizeof(qmiLocSetGNSSConstRepConfigReqMsgT_v02), qmiLocSetGNSSConstRepConfigReqMsgT_data_v02},
+  {sizeof(qmiLocSetGNSSConstRepConfigIndMsgT_v02), qmiLocSetGNSSConstRepConfigIndMsgT_data_v02},
+  {sizeof(qmiLocEventGnssSvMeasInfoIndMsgT_v02), qmiLocEventGnssSvMeasInfoIndMsgT_data_v02},
+  {sizeof(qmiLocEventGnssSvPolyIndMsgT_v02), qmiLocEventGnssSvPolyIndMsgT_data_v02},
+  {sizeof(qmiLocAddGeofenceContextReqMsgT_v02), qmiLocAddGeofenceContextReqMsgT_data_v02},
+  {sizeof(qmiLocAddGeofenceContextIndMsgT_v02), qmiLocAddGeofenceContextIndMsgT_data_v02},
+  {sizeof(qmiLocSetGeofenceEngineContextReqMsgT_v02), qmiLocSetGeofenceEngineContextReqMsgT_data_v02},
+  {sizeof(qmiLocSetGeofenceEngineContextIndMsgT_v02), qmiLocSetGeofenceEngineContextIndMsgT_data_v02},
+  {sizeof(qmiLocDeleteGeofenceContextReqMsgT_v02), qmiLocDeleteGeofenceContextReqMsgT_data_v02},
+  {sizeof(qmiLocDeleteGeofenceContextIndMsgT_v02), qmiLocDeleteGeofenceContextIndMsgT_data_v02},
+  {sizeof(qmiLocInjectGtpClientDownloadedDataReqMsgT_v02), qmiLocInjectGtpClientDownloadedDataReqMsgT_data_v02},
+  {sizeof(qmiLocInjectGtpClientDownloadedDataIndMsgT_v02), qmiLocInjectGtpClientDownloadedDataIndMsgT_data_v02},
+  {sizeof(qmiLocGdtUploadBeginStatusReqMsgT_v02), qmiLocGdtUploadBeginStatusReqMsgT_data_v02},
+  {sizeof(qmiLocGdtUploadBeginStatusIndMsgT_v02), qmiLocGdtUploadBeginStatusIndMsgT_data_v02},
+  {sizeof(qmiLocGdtUploadEndReqMsgT_v02), qmiLocGdtUploadEndReqMsgT_data_v02},
+  {sizeof(qmiLocGdtUploadEndIndMsgT_v02), qmiLocGdtUploadEndIndMsgT_data_v02},
+  {sizeof(qmiLocStartDbtReqMsgT_v02), qmiLocStartDbtReqMsgT_data_v02},
+  {sizeof(qmiLocStartDbtIndMsgT_v02), qmiLocStartDbtIndMsgT_data_v02},
+  {sizeof(qmiLocStopDbtReqMsgT_v02), qmiLocStopDbtReqMsgT_data_v02},
+  {sizeof(qmiLocStopDbtIndMsgT_v02), qmiLocStopDbtIndMsgT_data_v02},
+  {sizeof(qmiLocEventDbtPositionReportIndMsgT_v02), qmiLocEventDbtPositionReportIndMsgT_data_v02},
+  {sizeof(qmiLocEventDbtSessionStatusIndMsgT_v02), qmiLocEventDbtSessionStatusIndMsgT_data_v02}
+};
+
+/* Range Table */
+/* No Ranges Defined in IDL */
+
+/* Predefine the Type Table Object */
+static const qmi_idl_type_table_object loc_qmi_idl_type_table_object_v02;
+
+/*Referenced Tables Array*/
+static const qmi_idl_type_table_object *loc_qmi_idl_type_table_object_referenced_tables_v02[] =
+{&loc_qmi_idl_type_table_object_v02, &common_qmi_idl_type_table_object_v01};
+
+/*Type Table Object*/
+static const qmi_idl_type_table_object loc_qmi_idl_type_table_object_v02 = {
+  sizeof(loc_type_table_v02)/sizeof(qmi_idl_type_table_entry ),
+  sizeof(loc_message_table_v02)/sizeof(qmi_idl_message_table_entry),
+  1,
+  loc_type_table_v02,
+  loc_message_table_v02,
+  loc_qmi_idl_type_table_object_referenced_tables_v02,
+  NULL
+};
+
+/*Arrays of service_message_table_entries for commands, responses and indications*/
+static const qmi_idl_service_message_table_entry loc_service_command_messages_v02[] = {
+  {QMI_LOC_GET_SUPPORTED_MSGS_REQ_V02, QMI_IDL_TYPE16(1, 0), 0},
+  {QMI_LOC_GET_SUPPORTED_FIELDS_REQ_V02, QMI_IDL_TYPE16(1, 2), 5},
+  {QMI_LOC_INFORM_CLIENT_REVISION_REQ_V02, QMI_IDL_TYPE16(0, 1), 7},
+  {QMI_LOC_REG_EVENTS_REQ_V02, QMI_IDL_TYPE16(0, 2), 11},
+  {QMI_LOC_START_REQ_V02, QMI_IDL_TYPE16(0, 3), 117},
+  {QMI_LOC_STOP_REQ_V02, QMI_IDL_TYPE16(0, 4), 4},
+  {QMI_LOC_GET_SERVICE_REVISION_REQ_V02, QMI_IDL_TYPE16(0, 29), 0},
+  {QMI_LOC_GET_FIX_CRITERIA_REQ_V02, QMI_IDL_TYPE16(0, 31), 0},
+  {QMI_LOC_NI_USER_RESPONSE_REQ_V02, QMI_IDL_TYPE16(0, 33), 1345},
+  {QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02, QMI_IDL_TYPE16(0, 35), 1053},
+  {QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_REQ_V02, QMI_IDL_TYPE16(0, 37), 0},
+  {QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_REQ_V02, QMI_IDL_TYPE16(0, 39), 0},
+  {QMI_LOC_INJECT_UTC_TIME_REQ_V02, QMI_IDL_TYPE16(0, 41), 18},
+  {QMI_LOC_INJECT_POSITION_REQ_V02, QMI_IDL_TYPE16(0, 43), 123},
+  {QMI_LOC_SET_ENGINE_LOCK_REQ_V02, QMI_IDL_TYPE16(0, 45), 7},
+  {QMI_LOC_GET_ENGINE_LOCK_REQ_V02, QMI_IDL_TYPE16(0, 47), 0},
+  {QMI_LOC_SET_SBAS_CONFIG_REQ_V02, QMI_IDL_TYPE16(0, 49), 4},
+  {QMI_LOC_GET_SBAS_CONFIG_REQ_V02, QMI_IDL_TYPE16(0, 51), 0},
+  {QMI_LOC_SET_NMEA_TYPES_REQ_V02, QMI_IDL_TYPE16(0, 53), 7},
+  {QMI_LOC_GET_NMEA_TYPES_REQ_V02, QMI_IDL_TYPE16(0, 55), 0},
+  {QMI_LOC_SET_LOW_POWER_MODE_REQ_V02, QMI_IDL_TYPE16(0, 57), 4},
+  {QMI_LOC_GET_LOW_POWER_MODE_REQ_V02, QMI_IDL_TYPE16(0, 59), 0},
+  {QMI_LOC_SET_SERVER_REQ_V02, QMI_IDL_TYPE16(0, 61), 297},
+  {QMI_LOC_GET_SERVER_REQ_V02, QMI_IDL_TYPE16(0, 63), 11},
+  {QMI_LOC_DELETE_ASSIST_DATA_REQ_V02, QMI_IDL_TYPE16(0, 65), 1044},
+  {QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02, QMI_IDL_TYPE16(0, 67), 4},
+  {QMI_LOC_GET_XTRA_T_SESSION_CONTROL_REQ_V02, QMI_IDL_TYPE16(0, 69), 0},
+  {QMI_LOC_INJECT_WIFI_POSITION_REQ_V02, QMI_IDL_TYPE16(0, 71), 2353},
+  {QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02, QMI_IDL_TYPE16(0, 73), 7},
+  {QMI_LOC_GET_REGISTERED_EVENTS_REQ_V02, QMI_IDL_TYPE16(0, 75), 0},
+  {QMI_LOC_SET_OPERATION_MODE_REQ_V02, QMI_IDL_TYPE16(0, 77), 7},
+  {QMI_LOC_GET_OPERATION_MODE_REQ_V02, QMI_IDL_TYPE16(0, 79), 0},
+  {QMI_LOC_SET_SPI_STATUS_REQ_V02, QMI_IDL_TYPE16(0, 81), 8},
+  {QMI_LOC_INJECT_SENSOR_DATA_REQ_V02, QMI_IDL_TYPE16(0, 83), 2779},
+  {QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02, QMI_IDL_TYPE16(0, 85), 21},
+  {QMI_LOC_SET_CRADLE_MOUNT_CONFIG_REQ_V02, QMI_IDL_TYPE16(0, 89), 11},
+  {QMI_LOC_GET_CRADLE_MOUNT_CONFIG_REQ_V02, QMI_IDL_TYPE16(0, 87), 0},
+  {QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02, QMI_IDL_TYPE16(0, 93), 7},
+  {QMI_LOC_GET_EXTERNAL_POWER_CONFIG_REQ_V02, QMI_IDL_TYPE16(0, 91), 0},
+  {QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02, QMI_IDL_TYPE16(0, 95), 129},
+  {QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02, QMI_IDL_TYPE16(0, 97), 57},
+  {QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02, QMI_IDL_TYPE16(0, 99), 11},
+  {QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02, QMI_IDL_TYPE16(0, 101), 14},
+  {QMI_LOC_GET_SENSOR_CONTROL_CONFIG_REQ_V02, QMI_IDL_TYPE16(0, 103), 0},
+  {QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02, QMI_IDL_TYPE16(0, 105), 88},
+  {QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02, QMI_IDL_TYPE16(0, 107), 7},
+  {QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02, QMI_IDL_TYPE16(0, 109), 42},
+  {QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02, QMI_IDL_TYPE16(0, 111), 0},
+  {QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02, QMI_IDL_TYPE16(0, 113), 2009},
+  {QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02, QMI_IDL_TYPE16(0, 115), 4},
+  {QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02, QMI_IDL_TYPE16(0, 117), 16},
+  {QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02, QMI_IDL_TYPE16(0, 119), 7},
+  {QMI_LOC_ADD_CIRCULAR_GEOFENCE_REQ_V02, QMI_IDL_TYPE16(0, 121), 66},
+  {QMI_LOC_DELETE_GEOFENCE_REQ_V02, QMI_IDL_TYPE16(0, 123), 14},
+  {QMI_LOC_QUERY_GEOFENCE_REQ_V02, QMI_IDL_TYPE16(0, 125), 14},
+  {QMI_LOC_EDIT_GEOFENCE_REQ_V02, QMI_IDL_TYPE16(0, 131), 32},
+  {QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02, QMI_IDL_TYPE16(0, 136), 7},
+  {QMI_LOC_INJECT_MOTION_DATA_REQ_V02, QMI_IDL_TYPE16(0, 138), 19},
+  {QMI_LOC_GET_NI_GEOFENCE_ID_LIST_REQ_V02, QMI_IDL_TYPE16(0, 140), 7},
+  {QMI_LOC_INJECT_GSM_CELL_INFO_REQ_V02, QMI_IDL_TYPE16(0, 142), 30},
+  {QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_REQ_V02, QMI_IDL_TYPE16(0, 150), 1036},
+  {QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_REQ_V02, QMI_IDL_TYPE16(0, 152), 0},
+  {QMI_LOC_PEDOMETER_REPORT_REQ_V02, QMI_IDL_TYPE16(0, 154), 46},
+  {QMI_LOC_INJECT_WCDMA_CELL_INFO_REQ_V02, QMI_IDL_TYPE16(0, 144), 36},
+  {QMI_LOC_INJECT_TDSCDMA_CELL_INFO_REQ_V02, QMI_IDL_TYPE16(0, 146), 33},
+  {QMI_LOC_INJECT_SUBSCRIBER_ID_REQ_V02, QMI_IDL_TYPE16(0, 148), 22},
+  {QMI_LOC_SET_GEOFENCE_ENGINE_CONFIG_REQ_V02, QMI_IDL_TYPE16(0, 127), 224},
+  {QMI_LOC_GET_GEOFENCE_ENGINE_CONFIG_REQ_V02, QMI_IDL_TYPE16(0, 129), 7},
+  {QMI_LOC_GET_BATCH_SIZE_REQ_V02, QMI_IDL_TYPE16(0, 156), 14},
+  {QMI_LOC_START_BATCHING_REQ_V02, QMI_IDL_TYPE16(0, 158), 21},
+  {QMI_LOC_READ_FROM_BATCH_REQ_V02, QMI_IDL_TYPE16(0, 162), 14},
+  {QMI_LOC_STOP_BATCHING_REQ_V02, QMI_IDL_TYPE16(0, 164), 7},
+  {QMI_LOC_RELEASE_BATCH_REQ_V02, QMI_IDL_TYPE16(0, 166), 7},
+  {QMI_LOC_INJECT_WIFI_AP_DATA_REQ_V02, QMI_IDL_TYPE16(0, 169), 2454},
+  {QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_REQ_V02, QMI_IDL_TYPE16(0, 171), 51},
+  {QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_REQ_V02, QMI_IDL_TYPE16(0, 173), 7},
+  {QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_REQ_V02, QMI_IDL_TYPE16(0, 176), 3360},
+  {QMI_LOC_GET_AVAILABLE_WWAN_POSITION_REQ_V02, QMI_IDL_TYPE16(0, 178), 7},
+  {QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_REQ_V02, QMI_IDL_TYPE16(0, 180), 14},
+  {QMI_LOC_SET_XTRA_VERSION_CHECK_REQ_V02, QMI_IDL_TYPE16(0, 182), 7},
+  {QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_V02, QMI_IDL_TYPE16(0, 184), 22},
+  {QMI_LOC_ADD_GEOFENCE_CONTEXT_REQ_V02, QMI_IDL_TYPE16(0, 188), 2517},
+  {QMI_LOC_SET_GEOFENCE_ENGINE_CONTEXT_REQ_V02, QMI_IDL_TYPE16(0, 190), 25},
+  {QMI_LOC_DELETE_GEOFENCE_CONTEXT_REQ_V02, QMI_IDL_TYPE16(0, 192), 21},
+  {QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_REQ_V02, QMI_IDL_TYPE16(0, 194), 517},
+  {QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_REQ_V02, QMI_IDL_TYPE16(0, 196), 21},
+  {QMI_LOC_GDT_UPLOAD_END_REQ_V02, QMI_IDL_TYPE16(0, 198), 21},
+  {QMI_LOC_START_DBT_REQ_V02, QMI_IDL_TYPE16(0, 200), 36},
+  {QMI_LOC_STOP_DBT_REQ_V02, QMI_IDL_TYPE16(0, 202), 4},
+  {QMI_LOC_INJECT_TIME_ZONE_INFO_REQ_V02, QMI_IDL_TYPE16(0, 134), 30}
+};
+
+static const qmi_idl_service_message_table_entry loc_service_response_messages_v02[] = {
+  {QMI_LOC_GET_SUPPORTED_MSGS_RESP_V02, QMI_IDL_TYPE16(1, 1), 8204},
+  {QMI_LOC_GET_SUPPORTED_FIELDS_RESP_V02, QMI_IDL_TYPE16(1, 3), 115},
+  {QMI_LOC_INFORM_CLIENT_REVISION_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_REG_EVENTS_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_START_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_STOP_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_SERVICE_REVISION_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_FIX_CRITERIA_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_NI_USER_RESPONSE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_UTC_TIME_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_POSITION_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_ENGINE_LOCK_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_ENGINE_LOCK_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_SBAS_CONFIG_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_SBAS_CONFIG_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_NMEA_TYPES_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_NMEA_TYPES_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_LOW_POWER_MODE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_LOW_POWER_MODE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_SERVER_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_SERVER_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_DELETE_ASSIST_DATA_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_XTRA_T_SESSION_CONTROL_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_XTRA_T_SESSION_CONTROL_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_WIFI_POSITION_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_NOTIFY_WIFI_STATUS_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_REGISTERED_EVENTS_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_OPERATION_MODE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_OPERATION_MODE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_SPI_STATUS_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_SENSOR_DATA_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_TIME_SYNC_DATA_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_CRADLE_MOUNT_CONFIG_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_CRADLE_MOUNT_CONFIG_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_EXTERNAL_POWER_CONFIG_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_EXTERNAL_POWER_CONFIG_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_SENSOR_CONTROL_CONFIG_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_SENSOR_CONTROL_CONFIG_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_SENSOR_PROPERTIES_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_SENSOR_PROPERTIES_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_SUPL_CERTIFICATE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_DELETE_SUPL_CERTIFICATE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_ADD_CIRCULAR_GEOFENCE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_DELETE_GEOFENCE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_QUERY_GEOFENCE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_EDIT_GEOFENCE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_BEST_AVAILABLE_POSITION_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_MOTION_DATA_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_NI_GEOFENCE_ID_LIST_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_GSM_CELL_INFO_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_PEDOMETER_REPORT_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_WCDMA_CELL_INFO_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_TDSCDMA_CELL_INFO_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_SUBSCRIBER_ID_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_GEOFENCE_ENGINE_CONFIG_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_GEOFENCE_ENGINE_CONFIG_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_BATCH_SIZE_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_START_BATCHING_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_READ_FROM_BATCH_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_STOP_BATCHING_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_RELEASE_BATCH_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_WIFI_AP_DATA_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GET_AVAILABLE_WWAN_POSITION_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_XTRA_VERSION_CHECK_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_ADD_GEOFENCE_CONTEXT_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_SET_GEOFENCE_ENGINE_CONTEXT_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_DELETE_GEOFENCE_CONTEXT_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_GDT_UPLOAD_END_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_START_DBT_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_STOP_DBT_RESP_V02, QMI_IDL_TYPE16(0, 0), 7},
+  {QMI_LOC_INJECT_TIME_ZONE_INFO_RESP_V02, QMI_IDL_TYPE16(0, 0), 7}
+};
+
+static const qmi_idl_service_message_table_entry loc_service_indication_messages_v02[] = {
+  {QMI_LOC_EVENT_POSITION_REPORT_IND_V02, QMI_IDL_TYPE16(0, 5), 392},
+  {QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02, QMI_IDL_TYPE16(0, 6), 2248},
+  {QMI_LOC_EVENT_NMEA_IND_V02, QMI_IDL_TYPE16(0, 7), 203},
+  {QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02, QMI_IDL_TYPE16(0, 8), 1338},
+  {QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02, QMI_IDL_TYPE16(0, 9), 776},
+  {QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02, QMI_IDL_TYPE16(0, 10), 783},
+  {QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02, QMI_IDL_TYPE16(0, 11), 40},
+  {QMI_LOC_EVENT_ENGINE_STATE_IND_V02, QMI_IDL_TYPE16(0, 12), 7},
+  {QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02, QMI_IDL_TYPE16(0, 13), 11},
+  {QMI_LOC_EVENT_WIFI_REQ_IND_V02, QMI_IDL_TYPE16(0, 14), 12},
+  {QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_IND_V02, QMI_IDL_TYPE16(0, 15), 48},
+  {QMI_LOC_EVENT_TIME_SYNC_REQ_IND_V02, QMI_IDL_TYPE16(0, 16), 7},
+  {QMI_LOC_EVENT_SET_SPI_STREAMING_REPORT_IND_V02, QMI_IDL_TYPE16(0, 17), 4},
+  {QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02, QMI_IDL_TYPE16(0, 18), 21},
+  {QMI_LOC_GET_SERVICE_REVISION_IND_V02, QMI_IDL_TYPE16(0, 30), 532},
+  {QMI_LOC_GET_FIX_CRITERIA_IND_V02, QMI_IDL_TYPE16(0, 32), 99},
+  {QMI_LOC_NI_USER_RESPONSE_IND_V02, QMI_IDL_TYPE16(0, 34), 7},
+  {QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02, QMI_IDL_TYPE16(0, 36), 12},
+  {QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_IND_V02, QMI_IDL_TYPE16(0, 38), 790},
+  {QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_IND_V02, QMI_IDL_TYPE16(0, 40), 20},
+  {QMI_LOC_INJECT_UTC_TIME_IND_V02, QMI_IDL_TYPE16(0, 42), 7},
+  {QMI_LOC_INJECT_POSITION_IND_V02, QMI_IDL_TYPE16(0, 44), 7},
+  {QMI_LOC_SET_ENGINE_LOCK_IND_V02, QMI_IDL_TYPE16(0, 46), 7},
+  {QMI_LOC_GET_ENGINE_LOCK_IND_V02, QMI_IDL_TYPE16(0, 48), 14},
+  {QMI_LOC_SET_SBAS_CONFIG_IND_V02, QMI_IDL_TYPE16(0, 50), 7},
+  {QMI_LOC_GET_SBAS_CONFIG_IND_V02, QMI_IDL_TYPE16(0, 52), 11},
+  {QMI_LOC_SET_NMEA_TYPES_IND_V02, QMI_IDL_TYPE16(0, 54), 7},
+  {QMI_LOC_GET_NMEA_TYPES_IND_V02, QMI_IDL_TYPE16(0, 56), 14},
+  {QMI_LOC_SET_LOW_POWER_MODE_IND_V02, QMI_IDL_TYPE16(0, 58), 7},
+  {QMI_LOC_GET_LOW_POWER_MODE_IND_V02, QMI_IDL_TYPE16(0, 60), 11},
+  {QMI_LOC_SET_SERVER_IND_V02, QMI_IDL_TYPE16(0, 62), 7},
+  {QMI_LOC_GET_SERVER_IND_V02, QMI_IDL_TYPE16(0, 64), 304},
+  {QMI_LOC_DELETE_ASSIST_DATA_IND_V02, QMI_IDL_TYPE16(0, 66), 7},
+  {QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02, QMI_IDL_TYPE16(0, 68), 7},
+  {QMI_LOC_GET_XTRA_T_SESSION_CONTROL_IND_V02, QMI_IDL_TYPE16(0, 70), 11},
+  {QMI_LOC_INJECT_WIFI_POSITION_IND_V02, QMI_IDL_TYPE16(0, 72), 7},
+  {QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02, QMI_IDL_TYPE16(0, 74), 7},
+  {QMI_LOC_GET_REGISTERED_EVENTS_IND_V02, QMI_IDL_TYPE16(0, 76), 18},
+  {QMI_LOC_SET_OPERATION_MODE_IND_V02, QMI_IDL_TYPE16(0, 78), 7},
+  {QMI_LOC_GET_OPERATION_MODE_IND_V02, QMI_IDL_TYPE16(0, 80), 14},
+  {QMI_LOC_SET_SPI_STATUS_IND_V02, QMI_IDL_TYPE16(0, 82), 7},
+  {QMI_LOC_INJECT_SENSOR_DATA_IND_V02, QMI_IDL_TYPE16(0, 84), 34},
+  {QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02, QMI_IDL_TYPE16(0, 86), 7},
+  {QMI_LOC_SET_CRADLE_MOUNT_CONFIG_IND_V02, QMI_IDL_TYPE16(0, 90), 7},
+  {QMI_LOC_GET_CRADLE_MOUNT_CONFIG_IND_V02, QMI_IDL_TYPE16(0, 88), 18},
+  {QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02, QMI_IDL_TYPE16(0, 94), 7},
+  {QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02, QMI_IDL_TYPE16(0, 92), 14},
+  {QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02, QMI_IDL_TYPE16(0, 96), 7},
+  {QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02, QMI_IDL_TYPE16(0, 98), 18},
+  {QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02, QMI_IDL_TYPE16(0, 100), 64},
+  {QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02, QMI_IDL_TYPE16(0, 102), 7},
+  {QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02, QMI_IDL_TYPE16(0, 104), 21},
+  {QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02, QMI_IDL_TYPE16(0, 106), 14},
+  {QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02, QMI_IDL_TYPE16(0, 108), 95},
+  {QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02, QMI_IDL_TYPE16(0, 110), 14},
+  {QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02, QMI_IDL_TYPE16(0, 112), 49},
+  {QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02, QMI_IDL_TYPE16(0, 114), 7},
+  {QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02, QMI_IDL_TYPE16(0, 116), 7},
+  {QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02, QMI_IDL_TYPE16(0, 118), 14},
+  {QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02, QMI_IDL_TYPE16(0, 120), 23},
+  {QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_IND_V02, QMI_IDL_TYPE16(0, 19), 14},
+  {QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_IND_V02, QMI_IDL_TYPE16(0, 20), 7},
+  {QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_IND_V02, QMI_IDL_TYPE16(0, 21), 85},
+  {QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02, QMI_IDL_TYPE16(0, 122), 21},
+  {QMI_LOC_DELETE_GEOFENCE_IND_V02, QMI_IDL_TYPE16(0, 124), 21},
+  {QMI_LOC_QUERY_GEOFENCE_IND_V02, QMI_IDL_TYPE16(0, 126), 65},
+  {QMI_LOC_EDIT_GEOFENCE_IND_V02, QMI_IDL_TYPE16(0, 132), 28},
+  {QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02, QMI_IDL_TYPE16(0, 137), 391},
+  {QMI_LOC_INJECT_MOTION_DATA_IND_V02, QMI_IDL_TYPE16(0, 139), 7},
+  {QMI_LOC_GET_NI_GEOFENCE_ID_LIST_IND_V02, QMI_IDL_TYPE16(0, 141), 82},
+  {QMI_LOC_INJECT_GSM_CELL_INFO_IND_V02, QMI_IDL_TYPE16(0, 143), 7},
+  {QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_IND_V02, QMI_IDL_TYPE16(0, 151), 7},
+  {QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_IND_V02, QMI_IDL_TYPE16(0, 153), 7},
+  {QMI_LOC_EVENT_PEDOMETER_CONTROL_IND_V02, QMI_IDL_TYPE16(0, 22), 15},
+  {QMI_LOC_EVENT_MOTION_DATA_CONTROL_IND_V02, QMI_IDL_TYPE16(0, 23), 4},
+  {QMI_LOC_PEDOMETER_REPORT_IND_V02, QMI_IDL_TYPE16(0, 155), 7},
+  {QMI_LOC_INJECT_WCDMA_CELL_INFO_IND_V02, QMI_IDL_TYPE16(0, 145), 7},
+  {QMI_LOC_INJECT_TDSCDMA_CELL_INFO_IND_V02, QMI_IDL_TYPE16(0, 147), 7},
+  {QMI_LOC_INJECT_SUBSCRIBER_ID_IND_V02, QMI_IDL_TYPE16(0, 149), 7},
+  {QMI_LOC_SET_GEOFENCE_ENGINE_CONFIG_IND_V02, QMI_IDL_TYPE16(0, 128), 14},
+  {QMI_LOC_GET_GEOFENCE_ENGINE_CONFIG_IND_V02, QMI_IDL_TYPE16(0, 130), 39},
+  {QMI_LOC_GET_BATCH_SIZE_IND_V02, QMI_IDL_TYPE16(0, 157), 21},
+  {QMI_LOC_START_BATCHING_IND_V02, QMI_IDL_TYPE16(0, 159), 7},
+  {QMI_LOC_EVENT_BATCH_FULL_NOTIFICATION_IND_V02, QMI_IDL_TYPE16(0, 160), 7},
+  {QMI_LOC_EVENT_LIVE_BATCHED_POSITION_REPORT_IND_V02, QMI_IDL_TYPE16(0, 161), 90},
+  {QMI_LOC_READ_FROM_BATCH_IND_V02, QMI_IDL_TYPE16(0, 163), 460},
+  {QMI_LOC_STOP_BATCHING_IND_V02, QMI_IDL_TYPE16(0, 165), 14},
+  {QMI_LOC_RELEASE_BATCH_IND_V02, QMI_IDL_TYPE16(0, 167), 14},
+  {QMI_LOC_EVENT_INJECT_WIFI_AP_DATA_REQ_IND_V02, QMI_IDL_TYPE16(0, 168), 0},
+  {QMI_LOC_INJECT_WIFI_AP_DATA_IND_V02, QMI_IDL_TYPE16(0, 170), 7},
+  {QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_IND_V02, QMI_IDL_TYPE16(0, 172), 7},
+  {QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_IND_V02, QMI_IDL_TYPE16(0, 174), 7},
+  {QMI_LOC_EVENT_GEOFENCE_BATCHED_BREACH_NOTIFICATION_IND_V02, QMI_IDL_TYPE16(0, 24), 1254},
+  {QMI_LOC_EVENT_VEHICLE_DATA_READY_STATUS_IND_V02, QMI_IDL_TYPE16(0, 175), 12},
+  {QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_IND_V02, QMI_IDL_TYPE16(0, 177), 7},
+  {QMI_LOC_GET_AVAILABLE_WWAN_POSITION_IND_V02, QMI_IDL_TYPE16(0, 179), 145},
+  {QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_IND_V02, QMI_IDL_TYPE16(0, 181), 7},
+  {QMI_LOC_SET_XTRA_VERSION_CHECK_IND_V02, QMI_IDL_TYPE16(0, 183), 7},
+  {QMI_LOC_EVENT_GNSS_MEASUREMENT_REPORT_IND_V02, QMI_IDL_TYPE16(0, 186), 1610},
+  {QMI_LOC_EVENT_SV_POLYNOMIAL_REPORT_IND_V02, QMI_IDL_TYPE16(0, 187), 325},
+  {QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_IND_V02, QMI_IDL_TYPE16(0, 185), 7},
+  {QMI_LOC_ADD_GEOFENCE_CONTEXT_IND_V02, QMI_IDL_TYPE16(0, 189), 28},
+  {QMI_LOC_SET_GEOFENCE_ENGINE_CONTEXT_IND_V02, QMI_IDL_TYPE16(0, 191), 14},
+  {QMI_LOC_DELETE_GEOFENCE_CONTEXT_IND_V02, QMI_IDL_TYPE16(0, 193), 28},
+  {QMI_LOC_EVENT_GEOFENCE_PROXIMITY_NOTIFICATION_IND_V02, QMI_IDL_TYPE16(0, 25), 21},
+  {QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_IND_V02, QMI_IDL_TYPE16(0, 195), 7},
+  {QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_IND_V02, QMI_IDL_TYPE16(0, 197), 7},
+  {QMI_LOC_GDT_UPLOAD_END_IND_V02, QMI_IDL_TYPE16(0, 199), 7},
+  {QMI_LOC_EVENT_GDT_UPLOAD_BEGIN_STATUS_REQ_IND_V02, QMI_IDL_TYPE16(0, 27), 273},
+  {QMI_LOC_EVENT_GDT_UPLOAD_END_REQ_IND_V02, QMI_IDL_TYPE16(0, 28), 21},
+  {QMI_LOC_START_DBT_IND_V02, QMI_IDL_TYPE16(0, 201), 11},
+  {QMI_LOC_EVENT_DBT_POSITION_REPORT_IND_V02, QMI_IDL_TYPE16(0, 204), 276},
+  {QMI_LOC_EVENT_DBT_SESSION_STATUS_IND_V02, QMI_IDL_TYPE16(0, 205), 11},
+  {QMI_LOC_STOP_DBT_IND_V02, QMI_IDL_TYPE16(0, 203), 11},
+  {QMI_LOC_EVENT_GEOFENCE_BATCHED_DWELL_NOTIFICATION_IND_V02, QMI_IDL_TYPE16(0, 26), 1247},
+  {QMI_LOC_EVENT_GET_TIME_ZONE_INFO_IND_V02, QMI_IDL_TYPE16(0, 133), 7},
+  {QMI_LOC_INJECT_TIME_ZONE_INFO_IND_V02, QMI_IDL_TYPE16(0, 135), 7}
+};
+
+/*Service Object*/
+struct qmi_idl_service_object loc_qmi_idl_service_object_v02 = {
+  0x06,
+  0x02,
+  0x10,
+  8204,
+  { sizeof(loc_service_command_messages_v02)/sizeof(qmi_idl_service_message_table_entry),
+    sizeof(loc_service_response_messages_v02)/sizeof(qmi_idl_service_message_table_entry),
+    sizeof(loc_service_indication_messages_v02)/sizeof(qmi_idl_service_message_table_entry) },
+  { loc_service_command_messages_v02, loc_service_response_messages_v02, loc_service_indication_messages_v02},
+  &loc_qmi_idl_type_table_object_v02,
+  0x28,
+  NULL
+};
+
+/* Service Object Accessor */
+qmi_idl_service_object_type loc_get_service_object_internal_v02
+ ( int32_t idl_maj_version, int32_t idl_min_version, int32_t library_version ){
+  if ( LOC_V02_IDL_MAJOR_VERS != idl_maj_version || LOC_V02_IDL_MINOR_VERS != idl_min_version
+       || LOC_V02_IDL_TOOL_VERS != library_version)
+  {
+    return NULL;
+  }
+  return (qmi_idl_service_object_type)&loc_qmi_idl_service_object_v02;
+}
+
diff --git a/gps/loc_api/loc_api_v02/location_service_v02.h b/gps/loc_api/loc_api_v02/location_service_v02.h
new file mode 100644
index 0000000..e6f55f0
--- /dev/null
+++ b/gps/loc_api/loc_api_v02/location_service_v02.h
@@ -0,0 +1,14246 @@
+/* Copyright (c) 2011-2015, 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 LOC_SERVICE_02_H
+#define LOC_SERVICE_02_H
+/**
+  @file location_service_v02.h
+
+  @brief This is the public header file which defines the loc service Data structures.
+
+  This header file defines the types and structures that were defined in
+  loc. It contains the constant values defined, enums, structures,
+  messages, and service message IDs (in that order) Structures that were
+  defined in the IDL as messages contain mandatory elements, optional
+  elements, a combination of mandatory and optional elements (mandatory
+  always come before optionals in the structure), or nothing (null message)
+
+  An optional element in a message is preceded by a uint8_t value that must be
+  set to true if the element is going to be included. When decoding a received
+  message, the uint8_t values will be set to true or false by the decode
+  routine, and should be checked before accessing the values that they
+  correspond to.
+
+  Variable sized arrays are defined as static sized arrays with an unsigned
+  integer (32 bit) preceding it that must be set to the number of elements
+  in the array that are valid. For Example:
+
+  uint32_t test_opaque_len;
+  uint8_t test_opaque[16];
+
+  If only 4 elements are added to test_opaque[] then test_opaque_len must be
+  set to 4 before sending the message.  When decoding, the _len value is set
+  by the decode routine and should be checked so that the correct number of
+  elements in the array will be accessed.
+
+*/
+/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*
+ *THIS IS AN AUTO GENERATED FILE. DO NOT ALTER IN ANY WAY
+ *====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/
+
+/* This file was generated with Tool version 6.14.4
+   It was generated on: Fri Mar 27 2015 (Spin 0)
+   From IDL File: location_service_v02.idl */
+
+/** @defgroup loc_qmi_consts Constant values defined in the IDL */
+/** @defgroup loc_qmi_msg_ids Constant values for QMI message IDs */
+/** @defgroup loc_qmi_enums Enumerated types used in QMI messages */
+/** @defgroup loc_qmi_messages Structures sent as QMI messages */
+/** @defgroup loc_qmi_aggregates Aggregate types used in QMI messages */
+/** @defgroup loc_qmi_accessor Accessor for QMI service object */
+/** @defgroup loc_qmi_version Constant values for versioning information */
+
+#include <stdint.h>
+#include "qmi_idl_lib.h"
+#include "common_v01.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @addtogroup loc_qmi_version
+    @{
+  */
+/** Major Version Number of the IDL used to generate this file */
+#define LOC_V02_IDL_MAJOR_VERS 0x02
+/** Revision Number of the IDL used to generate this file */
+#define LOC_V02_IDL_MINOR_VERS 0x28
+/** Major Version Number of the qmi_idl_compiler used to generate this file */
+#define LOC_V02_IDL_TOOL_VERS 0x06
+/** Maximum Defined Message ID */
+#define LOC_V02_MAX_MESSAGE_ID 0x0098
+/**
+    @}
+  */
+
+
+/** @addtogroup loc_qmi_consts
+    @{
+  */
+
+/**  Maximum string length for the Provider field in the application ID.  */
+#define QMI_LOC_MAX_APP_ID_PROVIDER_LENGTH_V02 24
+
+/**  Maximum string length for the Name field in the application ID.  */
+#define QMI_LOC_MAX_APP_ID_NAME_LENGTH_V02 32
+
+/**  Maximum string length for the Version field in the application ID.  */
+#define QMI_LOC_MAX_APP_ID_VERSION_LENGTH_V02 8
+
+/**  Maximum length of the list containing the SVs that were used to generate
+     a position report.  */
+#define QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02 80
+
+/**  Maximum number of satellites in the satellite report.  */
+#define QMI_LOC_SV_INFO_LIST_MAX_SIZE_V02 80
+
+/**  Maximum NMEA string length.  */
+#define QMI_LOC_NMEA_STRING_MAX_LENGTH_V02 200
+
+/**  Maximum length of the requestor ID string.  */
+#define QMI_LOC_NI_MAX_REQUESTOR_ID_LENGTH_V02 200
+
+/**  Session ID byte length.  */
+#define QMI_LOC_NI_SUPL_SLP_SESSION_ID_BYTE_LENGTH_V02 4
+
+/**  Maximum client name length allowed.  */
+#define QMI_LOC_NI_MAX_CLIENT_NAME_LENGTH_V02 64
+
+/**  Maximum URL length accepted by the location engine.  */
+#define QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 255
+
+/**  IPv6 address length in bytes.  */
+#define QMI_LOC_IPV6_ADDR_LENGTH_V02 8
+
+/**  SUPL hash length.  */
+#define QMI_LOC_NI_SUPL_HASH_LENGTH_V02 8
+
+/**  Maximum client address length allowed.  */
+#define QMI_LOC_NI_MAX_EXT_CLIENT_ADDRESS_V02 20
+
+/**  Maximum codeword length allowed.  */
+#define QMI_LOC_NI_CODEWORD_MAX_LENGTH_V02 20
+
+/**  Maximum number of NTP Servers sent out with this event. */
+#define QMI_LOC_MAX_NTP_SERVERS_V02 3
+
+/**  Maximum number of predicted orbits servers supported in the location
+     engine.  */
+#define QMI_LOC_MAX_PREDICTED_ORBITS_SERVERS_V02 3
+
+/**  Maximum length of the list, where each element of the list contains the
+     continuous range of Geofences that were breached at a given position.  */
+#define QMI_LOC_MAX_GEOFENCE_ID_CONTINUOUS_LIST_LENGTH_V02 80
+
+/**  Maximum length of the list that contains a discrete number Geofences that
+     were breached at a given position.  */
+#define QMI_LOC_MAX_GEOFENCE_ID_DISCRETE_LIST_LENGTH_V02 80
+
+/**  Maximum length that can be injected.  */
+#define QMI_LOC_MAX_GDT_PATH_LEN_V02 255
+
+/**  Maximum GNSS Measurement Engine Firmware Version String length.  */
+#define QMI_LOC_GNSS_ME_VERSION_STRING_MAX_LENGTH_V02 127
+
+/**  Maximum GNSS Measurement Engine Hosted Software Version String length.  */
+#define QMI_LOC_GNSS_HOSTED_SW_VERSION_STRING_MAX_LENGTH_V02 127
+
+/**  Maximum GNSS Measurement Engine Full Version String length.  */
+#define QMI_LOC_GNSS_SW_VERSION_STRING_MAX_LENGTH_V02 255
+
+/**  Maximum part length that can be injected. The client should
+     also look at the maxPartSize field in the predicted orbits injection
+     request indication and pick the minimum of the two.  */
+#define QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02 1024
+
+/**  Maximum length of the delete SV information list  */
+#define QMI_LOC_DELETE_MAX_SV_INFO_LENGTH_V02 128
+
+/**  Maximum length of the Delete BDS SV Information list.  */
+#define QMI_LOC_DELETE_MAX_BDS_SV_INFO_LENGTH_V02 37
+
+/**  MAC address length in bytes.  */
+#define QMI_LOC_WIFI_MAC_ADDR_LENGTH_V02 6
+
+/**  Wi-Fi SSID string maximum length.   */
+#define QMI_LOC_MAX_WIFI_AP_SSID_STR_LENGTH_V02 32
+
+/**  Maximum number of APs that the sender can report.  */
+#define QMI_LOC_WIFI_MAX_REPORTED_APS_PER_MSG_V02 50
+
+/**  Maximum number of samples that can be injected in a TLV.  */
+#define QMI_LOC_SENSOR_DATA_MAX_SAMPLES_V02 50
+
+/**  Maximum APN string length allowed.  */
+#define QMI_LOC_MAX_APN_NAME_LENGTH_V02 100
+
+/**  Maximum APN profiles supported. */
+#define QMI_LOC_MAX_APN_PROFILES_V02 6
+
+/**  Maximum length of the SUPL certificate. */
+#define QMI_LOC_MAX_SUPL_CERT_LENGTH_V02 2000
+
+/**  Maximum number of motion states used by the Geofence engine.  */
+#define QMI_LOC_GEOFENCE_MAX_MOTION_STATES_V02 20
+
+/**  Maximum length of the network-initiated Geofence ID
+     list.  */
+#define QMI_LOC_MAX_NI_GEOFENCE_ID_LIST_LENGTH_V02 16
+
+/**  Maximum value of WDMA frequency for injection of WCDMA cell
+     information.  */
+#define QMI_LOC_MAX_WCDMA_FREQ_V02 16383
+
+/**  Maximum value of PSC for injection of WCDMA cell information.  */
+#define QMI_LOC_MAX_WCDMA_PSC_V02 511
+
+/**  Maximum value of TDSCDMA frequency for injection of TDSCDMA cell
+     information.  */
+#define QMI_LOC_MAX_TDSCDMA_FREQ_V02 16383
+
+/**  Maximum length of the injected network-initiated message.  */
+#define QMI_LOC_MAX_INJECTED_NETWORK_INITIATED_MESSAGE_LENGTH_V02 1024
+
+/**  Maximum number of entries returned from a batch in each indication.  */
+#define QMI_LOC_READ_FROM_BATCH_MAX_SIZE_V02 5
+
+/**  Maximum number of vehicle sensor samples that can be injected.  */
+#define QMI_LOC_VEHICLE_SENSOR_DATA_MAX_SAMPLES_V02 65
+
+/**  Maximum number of axes that can be provided in each sample.  */
+#define QMI_LOC_VEHICLE_SENSOR_DATA_MAX_AXES_V02 3
+
+/**  Maximum number of measurements from an odometer.  */
+#define QMI_LOC_VEHICLE_ODOMETRY_MAX_MEASUREMENTS_V02 3
+#define QMI_LOC_MEAS_STATUS_DONT_USE_BITS_V02 0xFFC0000000000000
+
+/**  Maximum number of satellites in a measurement block for a given system.  */
+#define QMI_LOC_SV_MEAS_LIST_MAX_SIZE_V02 16
+#define QMI_LOC_SV_POLY_VELOCITY_COEF_SIZE_V02 12
+#define QMI_LOC_SV_POLY_XYZ_0_TH_ORDER_COEFF_SIZE_V02 3
+#define QMI_LOC_SV_POLY_XYZ_N_TH_ORDER_COEFF_SIZE_V02 9
+#define QMI_LOC_SV_POLY_SV_CLKBIAS_COEFF_SIZE_V02 4
+
+/**  IBeacon string maximum length.   */
+#define QMI_LOC_MAX_IBEACON_UUID_STR_LENGTH_V02 32
+
+/**  Wi-Fi area ID list length.  */
+#define QMI_LOC_WIFI_AREA_ID_LIST_LENGTH_V02 20
+
+/**  Cell ID list length.   */
+#define QMI_LOC_CELL_ID_LIST_LENGTH_V02 20
+
+/**   IBeacon list length.   */
+#define QMI_LOC_IBEACON_LIST_LENGTH_V02 20
+
+/**  Maximum length that can be injected.  */
+#define QMI_LOC_MAX_GTP_WWAN_CLIENT_DOWNLOADED_DATA_LEN_V02 512
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Response Message; Generic response definition. This message is used to tell
+                    clients whether their message was accepted for further
+                    processing or rejected. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Result Code */
+  qmi_response_type_v01 resp;
+}qmiLocGenRespMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Informs the service of the minor revision of the interface
+                    definition that the control point implements. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Revision */
+  uint32_t revision;
+  /**<   Revision that the control point is using. */
+}qmiLocInformClientRevisionReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint64_t qmiLocEventRegMaskT_v02;
+#define QMI_LOC_EVENT_MASK_POSITION_REPORT_V02 ((qmiLocEventRegMaskT_v02)0x00000001ull) /**<  The control point must enable this mask to receive position report
+       event indications.  */
+#define QMI_LOC_EVENT_MASK_GNSS_SV_INFO_V02 ((qmiLocEventRegMaskT_v02)0x00000002ull) /**<  The control point must enable this mask to receive satellite report
+       event indications. These reports are sent at a 1 Hz rate.  */
+#define QMI_LOC_EVENT_MASK_NMEA_V02 ((qmiLocEventRegMaskT_v02)0x00000004ull) /**<  The control point must enable this mask to receive NMEA reports for
+       position and satellites in view. The report is at a 1 Hz rate.  */
+#define QMI_LOC_EVENT_MASK_NI_NOTIFY_VERIFY_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000008ull) /**<  The control point must enable this mask to receive NI Notify/Verify request
+       event indications.  */
+#define QMI_LOC_EVENT_MASK_INJECT_TIME_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000010ull) /**<  The control point must enable this mask to receive time injection request
+       event indications.  */
+#define QMI_LOC_EVENT_MASK_INJECT_PREDICTED_ORBITS_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000020ull) /**<  The control point must enable this mask to receive predicted orbits request
+       event indications.  */
+#define QMI_LOC_EVENT_MASK_INJECT_POSITION_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000040ull) /**<  The control point must enable this mask to receive position injection request
+       event indications.  */
+#define QMI_LOC_EVENT_MASK_ENGINE_STATE_V02 ((qmiLocEventRegMaskT_v02)0x00000080ull) /**<  The control point must enable this mask to receive engine state report
+       event indications.  */
+#define QMI_LOC_EVENT_MASK_FIX_SESSION_STATE_V02 ((qmiLocEventRegMaskT_v02)0x00000100ull) /**<  The control point must enable this mask to receive fix session status report
+       event indications.  */
+#define QMI_LOC_EVENT_MASK_WIFI_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000200ull) /**<  The control point must enable this mask to receive Wi-Fi position request
+       event indications.  */
+#define QMI_LOC_EVENT_MASK_SENSOR_STREAMING_READY_STATUS_V02 ((qmiLocEventRegMaskT_v02)0x00000400ull) /**<  The control point must enable this mask to receive notifications from the
+       location engine indicating its readiness to accept data from the
+       sensors (accelerometer, gyroscope, etc.).  */
+#define QMI_LOC_EVENT_MASK_TIME_SYNC_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000800ull) /**<  The control point must enable this mask to receive time sync requests
+       from the GPS engine. Time sync enables the GPS engine to synchronize
+       its clock with the sensor processor's clock.  */
+#define QMI_LOC_EVENT_MASK_SET_SPI_STREAMING_REPORT_V02 ((qmiLocEventRegMaskT_v02)0x00001000ull) /**<  The control point must enable this mask to receive Stationary Position
+       Indicator (SPI) streaming report indications.  */
+#define QMI_LOC_EVENT_MASK_LOCATION_SERVER_CONNECTION_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00002000ull) /**<  The control point must enable this mask to receive location server
+       requests. These requests are generated when the service wishes to
+       establish a connection with a location server. */
+#define QMI_LOC_EVENT_MASK_NI_GEOFENCE_NOTIFICATION_V02 ((qmiLocEventRegMaskT_v02)0x00004000ull) /**<  The control point must enable this mask to receive notifications
+       related to network-initiated Geofences. These events notify the client
+       when a network-initiated Geofence is added, deleted, or edited.  */
+#define QMI_LOC_EVENT_MASK_GEOFENCE_GEN_ALERT_V02 ((qmiLocEventRegMaskT_v02)0x00008000ull) /**<  The control point must enable this mask to receive Geofence alerts.
+       These alerts are generated to inform the client of the changes that may
+       affect a Geofence, e.g., if GPS is turned off or if the network is
+       unavailable.  */
+#define QMI_LOC_EVENT_MASK_GEOFENCE_BREACH_NOTIFICATION_V02 ((qmiLocEventRegMaskT_v02)0x00010000ull) /**<  The control point must enable this mask to receive notifications when
+       a Geofence is breached. These events are generated when a UE enters
+       or leaves the perimeter of a Geofence. This breach report is for a single
+       Geofence . */
+#define QMI_LOC_EVENT_MASK_PEDOMETER_CONTROL_V02 ((qmiLocEventRegMaskT_v02)0x00020000ull) /**<  The control point must enable this mask to register for pedometer
+       control requests from the location engine. The location engine sends
+       this event to control the injection of pedometer reports.  */
+#define QMI_LOC_EVENT_MASK_MOTION_DATA_CONTROL_V02 ((qmiLocEventRegMaskT_v02)0x00040000ull) /**<  The control point must enable this mask to register for motion data
+       control requests from the location engine. The location engine sends
+       this event to control the injection of motion data.  */
+#define QMI_LOC_EVENT_MASK_BATCH_FULL_NOTIFICATION_V02 ((qmiLocEventRegMaskT_v02)0x00080000ull) /**<  The control point must enable this mask to receive notification when
+       a batch is full. The location engine sends this event to notify of Batch Full
+       for ongoing batching session.  */
+#define QMI_LOC_EVENT_MASK_LIVE_BATCHED_POSITION_REPORT_V02 ((qmiLocEventRegMaskT_v02)0x00100000ull) /**<  The control point must enable this mask to receive position report
+       indications along with an ongoing batching session. The location engine sends
+       this event to notify the batched position report while a batching session
+       is ongoing.  */
+#define QMI_LOC_EVENT_MASK_INJECT_WIFI_AP_DATA_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00200000ull) /**<  The control point must enable this mask to receive Wi-Fi AP data inject request
+       event indications.  */
+#define QMI_LOC_EVENT_MASK_GEOFENCE_BATCH_BREACH_NOTIFICATION_V02 ((qmiLocEventRegMaskT_v02)0x00400000ull) /**<  The control point must enable this mask to receive notifications when
+       a Geofence is breached. These events are generated when a UE enters
+       or leaves the perimeter of a Geofence. This breach notification is for
+       multiple Geofences. Breaches from multiple Geofences are all batched and
+       sent in the same notification .    */
+#define QMI_LOC_EVENT_MASK_VEHICLE_DATA_READY_STATUS_V02 ((qmiLocEventRegMaskT_v02)0x00800000ull) /**<  The control point must enable this mask to receive notifications from the
+       location engine indicating its readiness to accept vehicle data (vehicle
+       accelerometer, vehicle angular rate, vehicle odometry, etc.). */
+#define QMI_LOC_EVENT_MASK_GNSS_MEASUREMENT_REPORT_V02 ((qmiLocEventRegMaskT_v02)0x01000000ull) /**<  The control point must enable this mask to receive system clock and satellite
+       measurement report events (system clock, SV time, Doppler, etc.). Reports are
+       generated only for the GNSS satellite constellations that are enabled using
+       QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG.   */
+#define QMI_LOC_EVENT_MASK_GNSS_SV_POLYNOMIAL_REPORT_V02 ((qmiLocEventRegMaskT_v02)0x02000000ull) /**<  The control point must enable this mask to receive satellite position
+        reports as polynomials. Reports are generated only for the GNSS satellite
+        constellations that are enabled using QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG.  */
+#define QMI_LOC_EVENT_MASK_GEOFENCE_PROXIMITY_NOTIFICATION_V02 ((qmiLocEventRegMaskT_v02)0x04000000ull) /**<  The control point must enable this mask to receive notifications when a Geofence proximity is entered
+  and exited. The proximity of a Geofence may be due to different contexts. These contexts are identified
+  using the context ID in this indication. The context of a Geofence may contain Wi-Fi area ID lists, IBeacon lists,
+  Cell-ID list, and so forth.    */
+#define QMI_LOC_EVENT_MASK_GDT_UPLOAD_BEGIN_REQ_V02 ((qmiLocEventRegMaskT_v02)0x08000000ull) /**<  The control point must enable this mask to receive Generic Data Transport (GDT)
+        session begin request event indications.  */
+#define QMI_LOC_EVENT_MASK_GDT_UPLOAD_END_REQ_V02 ((qmiLocEventRegMaskT_v02)0x10000000ull) /**<  The control point must enable this mask to receive GDT
+        session end request event indications.  */
+#define QMI_LOC_EVENT_MASK_GEOFENCE_BATCH_DWELL_NOTIFICATION_V02 ((qmiLocEventRegMaskT_v02)0x20000000ull) /**<  The control point must enable this mask to receive notifications when
+       a Geofence is dwelled. These events are generated when a UE enters
+       or leaves the perimeter of a Geofence and dwells inside or outside for a specified time.
+       This dwell notification is for multiple Geofences. Dwells from multiple Geofences are all batched and
+       sent in the same notification .    */
+#define QMI_LOC_EVENT_MASK_GET_TIME_ZONE_REQ_V02 ((qmiLocEventRegMaskT_v02)0x40000000ull) /**<  The control point must enable this mask to receive requests for time zone information from
+       the service. These events are generated when there is a need for time zone information in the
+       modem .  */
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to register for events from the
+                    location subsystem. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Event Registration Mask */
+  qmiLocEventRegMaskT_v02 eventRegMask;
+  /**<   Specifies the events that the control point is interested in receiving.
+ Valid bitmasks:
+      - QMI_LOC_EVENT_MASK_POSITION_REPORT (0x00000001) --  The control point must enable this mask to receive position report
+       event indications.
+      - QMI_LOC_EVENT_MASK_GNSS_SV_INFO (0x00000002) --  The control point must enable this mask to receive satellite report
+       event indications. These reports are sent at a 1 Hz rate.
+      - QMI_LOC_EVENT_MASK_NMEA (0x00000004) --  The control point must enable this mask to receive NMEA reports for
+       position and satellites in view. The report is at a 1 Hz rate.
+      - QMI_LOC_EVENT_MASK_NI_NOTIFY_VERIFY_REQ (0x00000008) --  The control point must enable this mask to receive NI Notify/Verify request
+       event indications.
+      - QMI_LOC_EVENT_MASK_INJECT_TIME_REQ (0x00000010) --  The control point must enable this mask to receive time injection request
+       event indications.
+      - QMI_LOC_EVENT_MASK_INJECT_PREDICTED_ORBITS_REQ (0x00000020) --  The control point must enable this mask to receive predicted orbits request
+       event indications.
+      - QMI_LOC_EVENT_MASK_INJECT_POSITION_REQ (0x00000040) --  The control point must enable this mask to receive position injection request
+       event indications.
+      - QMI_LOC_EVENT_MASK_ENGINE_STATE (0x00000080) --  The control point must enable this mask to receive engine state report
+       event indications.
+      - QMI_LOC_EVENT_MASK_FIX_SESSION_STATE (0x00000100) --  The control point must enable this mask to receive fix session status report
+       event indications.
+      - QMI_LOC_EVENT_MASK_WIFI_REQ (0x00000200) --  The control point must enable this mask to receive Wi-Fi position request
+       event indications.
+      - QMI_LOC_EVENT_MASK_SENSOR_STREAMING_READY_STATUS (0x00000400) --  The control point must enable this mask to receive notifications from the
+       location engine indicating its readiness to accept data from the
+       sensors (accelerometer, gyroscope, etc.).
+      - QMI_LOC_EVENT_MASK_TIME_SYNC_REQ (0x00000800) --  The control point must enable this mask to receive time sync requests
+       from the GPS engine. Time sync enables the GPS engine to synchronize
+       its clock with the sensor processor's clock.
+      - QMI_LOC_EVENT_MASK_SET_SPI_STREAMING_REPORT (0x00001000) --  The control point must enable this mask to receive Stationary Position
+       Indicator (SPI) streaming report indications.
+      - QMI_LOC_EVENT_MASK_LOCATION_SERVER_CONNECTION_REQ (0x00002000) --  The control point must enable this mask to receive location server
+       requests. These requests are generated when the service wishes to
+       establish a connection with a location server.
+      - QMI_LOC_EVENT_MASK_NI_GEOFENCE_NOTIFICATION (0x00004000) --  The control point must enable this mask to receive notifications
+       related to network-initiated Geofences. These events notify the client
+       when a network-initiated Geofence is added, deleted, or edited.
+      - QMI_LOC_EVENT_MASK_GEOFENCE_GEN_ALERT (0x00008000) --  The control point must enable this mask to receive Geofence alerts.
+       These alerts are generated to inform the client of the changes that may
+       affect a Geofence, e.g., if GPS is turned off or if the network is
+       unavailable.
+      - QMI_LOC_EVENT_MASK_GEOFENCE_BREACH_NOTIFICATION (0x00010000) --  The control point must enable this mask to receive notifications when
+       a Geofence is breached. These events are generated when a UE enters
+       or leaves the perimeter of a Geofence. This breach report is for a single
+       Geofence .
+      - QMI_LOC_EVENT_MASK_PEDOMETER_CONTROL (0x00020000) --  The control point must enable this mask to register for pedometer
+       control requests from the location engine. The location engine sends
+       this event to control the injection of pedometer reports.
+      - QMI_LOC_EVENT_MASK_MOTION_DATA_CONTROL (0x00040000) --  The control point must enable this mask to register for motion data
+       control requests from the location engine. The location engine sends
+       this event to control the injection of motion data.
+      - QMI_LOC_EVENT_MASK_BATCH_FULL_NOTIFICATION (0x00080000) --  The control point must enable this mask to receive notification when
+       a batch is full. The location engine sends this event to notify of Batch Full
+       for ongoing batching session.
+      - QMI_LOC_EVENT_MASK_LIVE_BATCHED_POSITION_REPORT (0x00100000) --  The control point must enable this mask to receive position report
+       indications along with an ongoing batching session. The location engine sends
+       this event to notify the batched position report while a batching session
+       is ongoing.
+      - QMI_LOC_EVENT_MASK_INJECT_WIFI_AP_DATA_REQ (0x00200000) --  The control point must enable this mask to receive Wi-Fi AP data inject request
+       event indications.
+      - QMI_LOC_EVENT_MASK_GEOFENCE_BATCH_BREACH_NOTIFICATION (0x00400000) --  The control point must enable this mask to receive notifications when
+       a Geofence is breached. These events are generated when a UE enters
+       or leaves the perimeter of a Geofence. This breach notification is for
+       multiple Geofences. Breaches from multiple Geofences are all batched and
+       sent in the same notification .
+      - QMI_LOC_EVENT_MASK_VEHICLE_DATA_READY_STATUS (0x00800000) --  The control point must enable this mask to receive notifications from the
+       location engine indicating its readiness to accept vehicle data (vehicle
+       accelerometer, vehicle angular rate, vehicle odometry, etc.).
+      - QMI_LOC_EVENT_MASK_GNSS_MEASUREMENT_REPORT (0x01000000) --  The control point must enable this mask to receive system clock and satellite
+       measurement report events (system clock, SV time, Doppler, etc.). Reports are
+       generated only for the GNSS satellite constellations that are enabled using
+       QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG.
+      - QMI_LOC_EVENT_MASK_GNSS_SV_POLYNOMIAL_REPORT (0x02000000) --  The control point must enable this mask to receive satellite position
+        reports as polynomials. Reports are generated only for the GNSS satellite
+        constellations that are enabled using QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG.
+      - QMI_LOC_EVENT_MASK_GEOFENCE_PROXIMITY_NOTIFICATION (0x04000000) --  The control point must enable this mask to receive notifications when a Geofence proximity is entered
+  and exited. The proximity of a Geofence may be due to different contexts. These contexts are identified
+  using the context ID in this indication. The context of a Geofence may contain Wi-Fi area ID lists, IBeacon lists,
+  Cell-ID list, and so forth.
+      - QMI_LOC_EVENT_MASK_GDT_UPLOAD_BEGIN_REQ (0x08000000) --  The control point must enable this mask to receive Generic Data Transport (GDT)
+        session begin request event indications.
+      - QMI_LOC_EVENT_MASK_GDT_UPLOAD_END_REQ (0x10000000) --  The control point must enable this mask to receive GDT
+        session end request event indications.
+      - QMI_LOC_EVENT_MASK_GEOFENCE_BATCH_DWELL_NOTIFICATION (0x20000000) --  The control point must enable this mask to receive notifications when
+       a Geofence is dwelled. These events are generated when a UE enters
+       or leaves the perimeter of a Geofence and dwells inside or outside for a specified time.
+       This dwell notification is for multiple Geofences. Dwells from multiple Geofences are all batched and
+       sent in the same notification .
+      - QMI_LOC_EVENT_MASK_GET_TIME_ZONE_REQ (0x40000000) --  The control point must enable this mask to receive requests for time zone information from
+       the service. These events are generated when there is a need for time zone information in the
+       modem .
+
+ Multiple events can be registered by ORing the individual masks and
+ sending them in this TLV. All unused bits in this mask must be set to 0.
+ */
+}qmiLocRegEventsReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCFIXRECURRENCEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_RECURRENCE_PERIODIC_V02 = 1, /**<  Request periodic position fixes  */
+  eQMI_LOC_RECURRENCE_SINGLE_V02 = 2, /**<  Request a single position fix  */
+  QMILOCFIXRECURRENCEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocFixRecurrenceEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCACCURACYLEVELENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_ACCURACY_LOW_V02 = 1, /**<  Low accuracy  */
+  eQMI_LOC_ACCURACY_MED_V02 = 2, /**<  Medium accuracy  */
+  eQMI_LOC_ACCURACY_HIGH_V02 = 3, /**<  High accuracy  */
+  QMILOCACCURACYLEVELENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocAccuracyLevelEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCINTERMEDIATEREPORTSTATEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_INTERMEDIATE_REPORTS_ON_V02 = 1, /**<  Intermediate reports are turned on  */
+  eQMI_LOC_INTERMEDIATE_REPORTS_OFF_V02 = 2, /**<  Intermediate reports are turned off  */
+  QMILOCINTERMEDIATEREPORTSTATEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocIntermediateReportStateEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCCONFIGINCLUDEALTITUDEASSUMEDINGNSSSVINFOENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_ALTITUDE_ASSUMED_IN_GNSS_SV_INFO_ENABLED_V02 = 1, /**<  Enable Altitude Assumed information in GNSS SV Info Event.  */
+  eQMI_LOC_ALTITUDE_ASSUMED_IN_GNSS_SV_INFO_DISABLED_V02 = 2, /**<  Disable Altitude Assumed information in GNSS SV Info Event.  */
+  QMILOCCONFIGINCLUDEALTITUDEASSUMEDINGNSSSVINFOENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocConfigIncludeAltitudeAssumedInGnssSvInfoEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  char applicationProvider[QMI_LOC_MAX_APP_ID_PROVIDER_LENGTH_V02 + 1];
+  /**<   Application provider. */
+
+  char applicationName[QMI_LOC_MAX_APP_ID_NAME_LENGTH_V02 + 1];
+  /**<   Application name. */
+
+  uint8_t applicationVersion_valid;
+  /**<   Specifies whether the application version string contains
+        a valid value: \begin{itemize1}
+       \item    0x00 (FALSE) -- Application version string is invalid
+       \item    0x01 (TRUE) -- Application version string is valid
+       \vspace{-0.18in} \end{itemize1} */
+
+  char applicationVersion[QMI_LOC_MAX_APP_ID_VERSION_LENGTH_V02 + 1];
+  /**<   Application version. */
+}qmiLocApplicationIdStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to initiate a GPS session. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Session ID */
+  uint8_t sessionId;
+  /**<   ID of the session as identified by the control point. The session ID
+       is reported back in the position reports. The control point must
+       specify the same session ID in the QMI_LOC_STOP_REQ message. \n
+       - Range: 0 to 255
+  */
+
+  /* Optional */
+  /*  Recurrence Type */
+  uint8_t fixRecurrence_valid;  /**< Must be set to true if fixRecurrence is being passed */
+  qmiLocFixRecurrenceEnumT_v02 fixRecurrence;
+  /**<   Specifies the type of session in which the control point is interested.
+ If this TLV is not specified, recurrence defaults to SINGLE.
+
+ Valid values: \n
+      - eQMI_LOC_RECURRENCE_PERIODIC (1) --  Request periodic position fixes
+      - eQMI_LOC_RECURRENCE_SINGLE (2) --  Request a single position fix
+ */
+
+  /* Optional */
+  /*  Horizontal Accuracy */
+  uint8_t horizontalAccuracyLevel_valid;  /**< Must be set to true if horizontalAccuracyLevel is being passed */
+  qmiLocAccuracyLevelEnumT_v02 horizontalAccuracyLevel;
+  /**<   Specifies the horizontal accuracy level required by the control point.
+ If not specified, accuracy defaults to LOW.
+
+ Valid values: \n
+      - eQMI_LOC_ACCURACY_LOW (1) --  Low accuracy
+      - eQMI_LOC_ACCURACY_MED (2) --  Medium accuracy
+      - eQMI_LOC_ACCURACY_HIGH (3) --  High accuracy
+ */
+
+  /* Optional */
+  /*  Enable/Disable Intermediate Reports */
+  uint8_t intermediateReportState_valid;  /**< Must be set to true if intermediateReportState is being passed */
+  qmiLocIntermediateReportStateEnumT_v02 intermediateReportState;
+  /**<   Specifies if the control point is interested in receiving intermediate
+ reports. The control point must explicitly set this field to OFF if it
+ does not wish to receive intermediate position reports. Intermediate
+ position reports are generated at 1 Hz and are ON by default. If
+ intermediate reports are turned ON, the client receives position reports
+ even if the accuracy criteria are not met. The status in such a position
+ report is set to IN_PROGRESS in order for the control point to identify
+ intermediate reports.
+
+ Valid values: \n
+      - eQMI_LOC_INTERMEDIATE_REPORTS_ON (1) --  Intermediate reports are turned on
+      - eQMI_LOC_INTERMEDIATE_REPORTS_OFF (2) --  Intermediate reports are turned off
+ */
+
+  /* Optional */
+  /*  Minimum Interval Between Final Position Reports */
+  uint8_t minInterval_valid;  /**< Must be set to true if minInterval is being passed */
+  uint32_t minInterval;
+  /**<   Minimum time interval, specified by the control point, that must elapse between
+       final position reports. \n
+       - Units: Milliseconds \n
+       - Default: 1000 ms
+  */
+
+  /* Optional */
+  /*  ID of the Application that Sent this Request */
+  uint8_t applicationId_valid;  /**< Must be set to true if applicationId is being passed */
+  qmiLocApplicationIdStructT_v02 applicationId;
+  /**<   \n Application provider, name, and version.*/
+
+  /* Optional */
+  /*  Configuration for Altitude Assumed Info in GNSS SV Info Event */
+  uint8_t configAltitudeAssumed_valid;  /**< Must be set to true if configAltitudeAssumed is being passed */
+  qmiLocConfigIncludeAltitudeAssumedInGnssSvInfoEnumT_v02 configAltitudeAssumed;
+  /**<   Specifies the configuration to include Altitude Assumed information in the GNSS SV Info Event.
+ When enabled, an additional GNSS SV Info event indication is sent to the control
+ point that also includes the altitude assumed information.
+
+ If not specified, the configuration defaults to ENABLED.
+
+ Valid values: \n
+      - eQMI_LOC_ALTITUDE_ASSUMED_IN_GNSS_SV_INFO_ENABLED (1) --  Enable Altitude Assumed information in GNSS SV Info Event.
+      - eQMI_LOC_ALTITUDE_ASSUMED_IN_GNSS_SV_INFO_DISABLED (2) --  Disable Altitude Assumed information in GNSS SV Info Event.
+ */
+
+  /* Optional */
+  /*  Minimum Interval Between Intermediate Position Reports */
+  uint8_t minIntermediatePositionReportInterval_valid;  /**< Must be set to true if minIntermediatePositionReportInterval is being passed */
+  uint32_t minIntermediatePositionReportInterval;
+  /**<   Minimum time interval for intermediate position reports, specified by the control point,
+       that, between the position reports elapsed time, must be longer than the interval time.
+       If this optional value is not set or set to the default value (0), the intermediate position
+       will be reported when it is ready. \n
+       - Units: Milliseconds \n
+       - Default: 0 ms
+  */
+}qmiLocStartReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to stop a GPS session. */
+typedef struct {
+
+  /* Mandatory */
+  /*   Session ID */
+  uint8_t sessionId;
+  /**<   ID of the session that was specified in the Start request
+       (QMI_LOC_START_REQ).\n
+       - Range: 0 to 255 */
+}qmiLocStopReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocPosTechMaskT_v02;
+#define QMI_LOC_POS_TECH_MASK_SATELLITE_V02 ((qmiLocPosTechMaskT_v02)0x00000001) /**<  Satellites were used to generate the fix  */
+#define QMI_LOC_POS_TECH_MASK_CELLID_V02 ((qmiLocPosTechMaskT_v02)0x00000002) /**<  Cell towers were used to generate the fix  */
+#define QMI_LOC_POS_TECH_MASK_WIFI_V02 ((qmiLocPosTechMaskT_v02)0x00000004) /**<  Wi-Fi access points were used to generate the fix  */
+#define QMI_LOC_POS_TECH_MASK_SENSORS_V02 ((qmiLocPosTechMaskT_v02)0x00000008) /**<  Sensors were used to generate the fix  */
+#define QMI_LOC_POS_TECH_MASK_REFERENCE_LOCATION_V02 ((qmiLocPosTechMaskT_v02)0x00000010) /**<  Reference Location was used to generate the fix  */
+#define QMI_LOC_POS_TECH_MASK_INJECTED_COARSE_POSITION_V02 ((qmiLocPosTechMaskT_v02)0x00000020) /**<  Coarse position injected into the location engine was used to
+        generate the fix  */
+#define QMI_LOC_POS_TECH_MASK_AFLT_V02 ((qmiLocPosTechMaskT_v02)0x00000040) /**<  AFLT was used to generate the fix  */
+#define QMI_LOC_POS_TECH_MASK_HYBRID_V02 ((qmiLocPosTechMaskT_v02)0x00000080) /**<  GNSS and network-provided measurements were used to
+        generate the fix  */
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSESSIONSTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SESS_STATUS_SUCCESS_V02 = 0, /**<  Session was successful  */
+  eQMI_LOC_SESS_STATUS_IN_PROGRESS_V02 = 1, /**<  Session is still in progress; further position reports will be generated
+       until either the fix criteria specified by the client are met or the
+       client response timeout occurs  */
+  eQMI_LOC_SESS_STATUS_GENERAL_FAILURE_V02 = 2, /**<  Session failed  */
+  eQMI_LOC_SESS_STATUS_TIMEOUT_V02 = 3, /**<  Fix request failed because the session timed out  */
+  eQMI_LOC_SESS_STATUS_USER_END_V02 = 4, /**<  Fix request failed because the session was ended by the user  */
+  eQMI_LOC_SESS_STATUS_BAD_PARAMETER_V02 = 5, /**<  Fix request failed due to bad parameters in the request  */
+  eQMI_LOC_SESS_STATUS_PHONE_OFFLINE_V02 = 6, /**<  Fix request failed because the phone is offline  */
+  eQMI_LOC_SESS_STATUS_ENGINE_LOCKED_V02 = 7, /**<  Fix request failed because the engine is locked  */
+  QMILOCSESSIONSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocSessionStatusEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint16_t gpsWeek;
+  /**<   Current GPS week as calculated from midnight, Jan. 6, 1980. \n
+       - Units: Weeks */
+
+  uint32_t gpsTimeOfWeekMs;
+  /**<   Amount of time into the current GPS week. \n
+       - Units: Milliseconds */
+}qmiLocGPSTimeStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  float PDOP;
+  /**<   Position dilution of precision.
+       \begin{itemize1}
+       \item    Range: 1 (highest accuracy) to 50 (lowest accuracy)
+       \item    PDOP = square root of (HDOP^2 + VDOP^2)
+       \vspace{-0.18in} \end{itemize1} */
+
+  float HDOP;
+  /**<   Horizontal dilution of precision.
+       \begin{itemize1}
+       \item    Range: 1 (highest accuracy) to 50 (lowest accuracy)
+       \vspace{-0.18in} \end{itemize1} */
+
+  float VDOP;
+  /**<   Vertical dilution of precision.
+       \begin{itemize1}
+       \item    Range: 1 (highest accuracy) to 50 (lowest accuracy)
+       \vspace{-0.18in} \end{itemize1} */
+}qmiLocDOPStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocSensorUsageMaskT_v02;
+#define QMI_LOC_SENSOR_MASK_USED_ACCEL_V02 ((qmiLocSensorUsageMaskT_v02)0x00000001) /**<  Bitmask to specify whether an accelerometer was used.  */
+#define QMI_LOC_SENSOR_MASK_USED_GYRO_V02 ((qmiLocSensorUsageMaskT_v02)0x00000002) /**<  Bitmask to specify whether a gyroscope was used.  */
+typedef uint32_t qmiLocSensorAidedMaskT_v02;
+#define QMI_LOC_SENSOR_AIDED_MASK_HEADING_V02 ((qmiLocSensorAidedMaskT_v02)0x00000001) /**<  Bitmask to specify whether a sensor was used to calculate heading.  */
+#define QMI_LOC_SENSOR_AIDED_MASK_SPEED_V02 ((qmiLocSensorAidedMaskT_v02)0x00000002) /**<  Bitmask to specify whether a sensor was used to calculate speed.  */
+#define QMI_LOC_SENSOR_AIDED_MASK_POSITION_V02 ((qmiLocSensorAidedMaskT_v02)0x00000004) /**<  Bitmask to specify whether a sensor was used to calculate position.  */
+#define QMI_LOC_SENSOR_AIDED_MASK_VELOCITY_V02 ((qmiLocSensorAidedMaskT_v02)0x00000008) /**<  Bitmask to specify whether a sensor was used to calculate velocity.  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocSensorUsageMaskT_v02 usageMask;
+  /**<   Specifies which sensors were used in calculating the position in the
+       position report.
+
+       Valid bitmasks: \begin{itemize1}
+       \item    0x00000001 -- SENSOR_USED_ ACCEL
+       \item    0x00000002 -- SENSOR_USED_ GYRO
+       \vspace{-0.18in} \end{itemize1} */
+
+  qmiLocSensorAidedMaskT_v02 aidingIndicatorMask;
+  /**<   Specifies which results were aided by sensors.
+
+       Valid bitmasks: \n
+         - 0x00000001 -- AIDED_HEADING \n
+         - 0x00000002 -- AIDED_SPEED \n
+         - 0x00000004 -- AIDED_POSITION \n
+         - 0x00000008 -- AIDED_VELOCITY */
+}qmiLocSensorUsageIndicatorStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCTIMESOURCEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_TIME_SRC_INVALID_V02 = 0, /**<  Invalid time.  */
+  eQMI_LOC_TIME_SRC_NETWORK_TIME_TRANSFER_V02 = 1, /**<  Time is set by the 1X system  */
+  eQMI_LOC_TIME_SRC_NETWORK_TIME_TAGGING_V02 = 2, /**<  Time is set by WCDMA/GSM time tagging (that is,
+       associating network time with GPS time)  */
+  eQMI_LOC_TIME_SRC_EXTERNAL_INPUT_V02 = 3, /**<  Time is set by an external injection  */
+  eQMI_LOC_TIME_SRC_TOW_DECODE_V02 = 4, /**<  Time is set after decoding over-the-air GPS navigation data
+       from one GPS satellite  */
+  eQMI_LOC_TIME_SRC_TOW_CONFIRMED_V02 = 5, /**<  Time is set after decoding over-the-air GPS navigation data
+       from multiple satellites  */
+  eQMI_LOC_TIME_SRC_TOW_AND_WEEK_CONFIRMED_V02 = 6, /**<  Both time of the week and the GPS week number are known  */
+  eQMI_LOC_TIME_SRC_NAV_SOLUTION_V02 = 7, /**<  Time is set by the position engine after the fix is obtained  */
+  eQMI_LOC_TIME_SRC_SOLVE_FOR_TIME_V02 = 8, /**<  Time is set by the position engine after performing SFT;
+       this is done when the clock time uncertainty is large  */
+  eQMI_LOC_TIME_SRC_GLO_TOW_DECODE_V02 = 9, /**<  Time is set after decoding GLO satellites  */
+  eQMI_LOC_TIME_SRC_TIME_TRANSFORM_V02 = 10, /**<  Time is set after transforming the GPS to GLO time  */
+  eQMI_LOC_TIME_SRC_WCDMA_SLEEP_TIME_TAGGING_V02 = 11, /**<  Time is set by the sleep time tag provided by the WCDMA network  */
+  eQMI_LOC_TIME_SRC_GSM_SLEEP_TIME_TAGGING_V02 = 12, /**<  Time is set by the sleep time tag provided by the GSM network  */
+  eQMI_LOC_TIME_SRC_UNKNOWN_V02 = 13, /**<  Source of the time is unknown  */
+  eQMI_LOC_TIME_SRC_SYSTEM_TIMETICK_V02 = 14, /**<  Time is derived from the system clock (better known as the slow clock);
+       GNSS time is maintained irrespective of the GNSS receiver state  */
+  eQMI_LOC_TIME_SRC_QZSS_TOW_DECODE_V02 = 15, /**<  Time is set after decoding QZSS satellites  */
+  eQMI_LOC_TIME_SRC_BDS_TOW_DECODE_V02 = 16, /**<  Time is set after decoding BDS satellites  */
+  QMILOCTIMESOURCEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocTimeSourceEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCRELIABILITYENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_RELIABILITY_NOT_SET_V02 = 0, /**<  Location reliability is not set  */
+  eQMI_LOC_RELIABILITY_VERY_LOW_V02 = 1, /**<  Location reliability is very low; use it at your own risk  */
+  eQMI_LOC_RELIABILITY_LOW_V02 = 2, /**<  Location reliability is low; little or no cross-checking is possible  */
+  eQMI_LOC_RELIABILITY_MEDIUM_V02 = 3, /**<  Location reliability is medium; limited cross-check passed   */
+  eQMI_LOC_RELIABILITY_HIGH_V02 = 4, /**<  Location reliability is high; strong cross-check passed  */
+  QMILOCRELIABILITYENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocReliabilityEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sends the position report to the control point. */
+typedef struct {
+
+  /* Mandatory */
+  /*   Session Status */
+  qmiLocSessionStatusEnumT_v02 sessionStatus;
+  /**<   Session status.
+
+ Valid values: \n
+      - eQMI_LOC_SESS_STATUS_SUCCESS (0) --  Session was successful
+      - eQMI_LOC_SESS_STATUS_IN_PROGRESS (1) --  Session is still in progress; further position reports will be generated
+       until either the fix criteria specified by the client are met or the
+       client response timeout occurs
+      - eQMI_LOC_SESS_STATUS_GENERAL_FAILURE (2) --  Session failed
+      - eQMI_LOC_SESS_STATUS_TIMEOUT (3) --  Fix request failed because the session timed out
+      - eQMI_LOC_SESS_STATUS_USER_END (4) --  Fix request failed because the session was ended by the user
+      - eQMI_LOC_SESS_STATUS_BAD_PARAMETER (5) --  Fix request failed due to bad parameters in the request
+      - eQMI_LOC_SESS_STATUS_PHONE_OFFLINE (6) --  Fix request failed because the phone is offline
+      - eQMI_LOC_SESS_STATUS_ENGINE_LOCKED (7) --  Fix request failed because the engine is locked
+ */
+
+  /* Mandatory */
+  /*   Session ID */
+  uint8_t sessionId;
+  /**<    ID of the session that was specified in the Start request
+        QMI_LOC_START_REQ. \n
+        - Range: 0 to 255 */
+
+  /* Optional */
+  /*  Latitude */
+  uint8_t latitude_valid;  /**< Must be set to true if latitude is being passed */
+  double latitude;
+  /**<   Latitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -90.0 to 90.0   \begin{itemize1}
+         \item    Positive values indicate northern latitude
+         \item    Negative values indicate southern latitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  /* Optional */
+  /*   Longitude */
+  uint8_t longitude_valid;  /**< Must be set to true if longitude is being passed */
+  double longitude;
+  /**<   Longitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -180.0 to 180.0   \begin{itemize1}
+         \item    Positive values indicate eastern longitude
+         \item    Negative values indicate western longitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  /* Optional */
+  /*   Circular Horizontal Position Uncertainty */
+  uint8_t horUncCircular_valid;  /**< Must be set to true if horUncCircular is being passed */
+  float horUncCircular;
+  /**<   Horizontal position uncertainty (circular).\n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Horizontal Elliptical Uncertainty (Semi-Minor Axis) */
+  uint8_t horUncEllipseSemiMinor_valid;  /**< Must be set to true if horUncEllipseSemiMinor is being passed */
+  float horUncEllipseSemiMinor;
+  /**<   Semi-minor axis of horizontal elliptical uncertainty.\n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Horizontal Elliptical Uncertainty (Semi-Major Axis) */
+  uint8_t horUncEllipseSemiMajor_valid;  /**< Must be set to true if horUncEllipseSemiMajor is being passed */
+  float horUncEllipseSemiMajor;
+  /**<   Semi-major axis of horizontal elliptical uncertainty.\n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Elliptical Horizontal Uncertainty Azimuth */
+  uint8_t horUncEllipseOrientAzimuth_valid;  /**< Must be set to true if horUncEllipseOrientAzimuth is being passed */
+  float horUncEllipseOrientAzimuth;
+  /**<   Elliptical horizontal uncertainty azimuth of orientation.\n
+       - Units: Decimal degrees \n
+       - Range: 0 to 180 */
+
+  /* Optional */
+  /*  Horizontal Confidence */
+  uint8_t horConfidence_valid;  /**< Must be set to true if horConfidence is being passed */
+  uint8_t horConfidence;
+  /**<   Horizontal uncertainty confidence.
+       If both elliptical and horizontal uncertainties are specified in this message,
+       the confidence corresponds to the elliptical uncertainty. \n
+       - Units: Percent \n
+       - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Horizontal Reliability */
+  uint8_t horReliability_valid;  /**< Must be set to true if horReliability is being passed */
+  qmiLocReliabilityEnumT_v02 horReliability;
+  /**<   Specifies the reliability of the horizontal position.
+ Valid values: \n
+      - eQMI_LOC_RELIABILITY_NOT_SET (0) --  Location reliability is not set
+      - eQMI_LOC_RELIABILITY_VERY_LOW (1) --  Location reliability is very low; use it at your own risk
+      - eQMI_LOC_RELIABILITY_LOW (2) --  Location reliability is low; little or no cross-checking is possible
+      - eQMI_LOC_RELIABILITY_MEDIUM (3) --  Location reliability is medium; limited cross-check passed
+      - eQMI_LOC_RELIABILITY_HIGH (4) --  Location reliability is high; strong cross-check passed
+ */
+
+  /* Optional */
+  /*  Horizontal Speed */
+  uint8_t speedHorizontal_valid;  /**< Must be set to true if speedHorizontal is being passed */
+  float speedHorizontal;
+  /**<   Horizontal speed.\n
+       - Units: Meters/second */
+
+  /* Optional */
+  /*  Speed Uncertainty */
+  uint8_t speedUnc_valid;  /**< Must be set to true if speedUnc is being passed */
+  float speedUnc;
+  /**<   3-D Speed uncertainty.\n
+       - Units: Meters/second */
+
+  /* Optional */
+  /*  Altitude With Respect to Ellipsoid */
+  uint8_t altitudeWrtEllipsoid_valid;  /**< Must be set to true if altitudeWrtEllipsoid is being passed */
+  float altitudeWrtEllipsoid;
+  /**<   Altitude with respect to the WGS84 ellipsoid.\n
+       - Units: Meters \n
+       - Range: -500 to 15883 */
+
+  /* Optional */
+  /*  Altitude With Respect to Sea Level */
+  uint8_t altitudeWrtMeanSeaLevel_valid;  /**< Must be set to true if altitudeWrtMeanSeaLevel is being passed */
+  float altitudeWrtMeanSeaLevel;
+  /**<   Altitude with respect to mean sea level.\n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Vertical Uncertainty */
+  uint8_t vertUnc_valid;  /**< Must be set to true if vertUnc is being passed */
+  float vertUnc;
+  /**<   Vertical uncertainty.\n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Vertical Confidence */
+  uint8_t vertConfidence_valid;  /**< Must be set to true if vertConfidence is being passed */
+  uint8_t vertConfidence;
+  /**<   Vertical uncertainty confidence.\n
+       - Units: Percent \n
+       - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Vertical Reliability */
+  uint8_t vertReliability_valid;  /**< Must be set to true if vertReliability is being passed */
+  qmiLocReliabilityEnumT_v02 vertReliability;
+  /**<   Specifies the reliability of the vertical position.
+ Valid values: \n
+      - eQMI_LOC_RELIABILITY_NOT_SET (0) --  Location reliability is not set
+      - eQMI_LOC_RELIABILITY_VERY_LOW (1) --  Location reliability is very low; use it at your own risk
+      - eQMI_LOC_RELIABILITY_LOW (2) --  Location reliability is low; little or no cross-checking is possible
+      - eQMI_LOC_RELIABILITY_MEDIUM (3) --  Location reliability is medium; limited cross-check passed
+      - eQMI_LOC_RELIABILITY_HIGH (4) --  Location reliability is high; strong cross-check passed
+ */
+
+  /* Optional */
+  /*  Vertical Speed */
+  uint8_t speedVertical_valid;  /**< Must be set to true if speedVertical is being passed */
+  float speedVertical;
+  /**<   Vertical speed.\n
+         - Units: Meters/second */
+
+  /* Optional */
+  /*  Heading */
+  uint8_t heading_valid;  /**< Must be set to true if heading is being passed */
+  float heading;
+  /**<   Heading.\n
+         - Units: Degrees \n
+         - Range: 0 to 359.999  */
+
+  /* Optional */
+  /*  Heading Uncertainty */
+  uint8_t headingUnc_valid;  /**< Must be set to true if headingUnc is being passed */
+  float headingUnc;
+  /**<   Heading uncertainty.\n
+       - Units: Degrees \n
+       - Range: 0 to 359.999 */
+
+  /* Optional */
+  /*  Magnetic Deviation */
+  uint8_t magneticDeviation_valid;  /**< Must be set to true if magneticDeviation is being passed */
+  float magneticDeviation;
+  /**<   Difference between the bearing to true north and the bearing shown
+      on a magnetic compass. The deviation is positive when the magnetic
+      north is east of true north. */
+
+  /* Optional */
+  /*  Technology Used */
+  uint8_t technologyMask_valid;  /**< Must be set to true if technologyMask is being passed */
+  qmiLocPosTechMaskT_v02 technologyMask;
+  /**<   Technology used in computing this fix.
+ Valid bitmasks: \n
+      - QMI_LOC_POS_TECH_MASK_SATELLITE (0x00000001) --  Satellites were used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_CELLID (0x00000002) --  Cell towers were used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_WIFI (0x00000004) --  Wi-Fi access points were used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_SENSORS (0x00000008) --  Sensors were used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_REFERENCE_LOCATION (0x00000010) --  Reference Location was used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_INJECTED_COARSE_POSITION (0x00000020) --  Coarse position injected into the location engine was used to
+        generate the fix
+      - QMI_LOC_POS_TECH_MASK_AFLT (0x00000040) --  AFLT was used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_HYBRID (0x00000080) --  GNSS and network-provided measurements were used to
+        generate the fix
+ */
+
+  /* Optional */
+  /*  Dilution of Precision */
+  uint8_t DOP_valid;  /**< Must be set to true if DOP is being passed */
+  qmiLocDOPStructT_v02 DOP;
+  /**<   \vspace{0.06in} \n Dilution of precision associated with this position. */
+
+  /* Optional */
+  /*  UTC Timestamp */
+  uint8_t timestampUtc_valid;  /**< Must be set to true if timestampUtc is being passed */
+  uint64_t timestampUtc;
+  /**<   UTC timestamp. \n
+       - Units: Milliseconds since Jan. 1, 1970 */
+
+  /* Optional */
+  /*  Leap Seconds */
+  uint8_t leapSeconds_valid;  /**< Must be set to true if leapSeconds is being passed */
+  uint8_t leapSeconds;
+  /**<   Leap second information. If leapSeconds is not available,
+         timestampUtc is calculated based on a hard-coded value
+         for leap seconds. \n
+         - Units: Seconds */
+
+  /* Optional */
+  /*  GPS Time */
+  uint8_t gpsTime_valid;  /**< Must be set to true if gpsTime is being passed */
+  qmiLocGPSTimeStructT_v02 gpsTime;
+  /**<   \vspace{0.06in} \n The number of weeks since Jan. 5, 1980, and
+       milliseconds into the current week. */
+
+  /* Optional */
+  /*  Time Uncertainty */
+  uint8_t timeUnc_valid;  /**< Must be set to true if timeUnc is being passed */
+  float timeUnc;
+  /**<   Time uncertainty. \n
+       - Units: Milliseconds */
+
+  /* Optional */
+  /*  Time Source */
+  uint8_t timeSrc_valid;  /**< Must be set to true if timeSrc is being passed */
+  qmiLocTimeSourceEnumT_v02 timeSrc;
+  /**<   Time source. Valid values: \n
+      - eQMI_LOC_TIME_SRC_INVALID (0) --  Invalid time.
+      - eQMI_LOC_TIME_SRC_NETWORK_TIME_TRANSFER (1) --  Time is set by the 1X system
+      - eQMI_LOC_TIME_SRC_NETWORK_TIME_TAGGING (2) --  Time is set by WCDMA/GSM time tagging (that is,
+       associating network time with GPS time)
+      - eQMI_LOC_TIME_SRC_EXTERNAL_INPUT (3) --  Time is set by an external injection
+      - eQMI_LOC_TIME_SRC_TOW_DECODE (4) --  Time is set after decoding over-the-air GPS navigation data
+       from one GPS satellite
+      - eQMI_LOC_TIME_SRC_TOW_CONFIRMED (5) --  Time is set after decoding over-the-air GPS navigation data
+       from multiple satellites
+      - eQMI_LOC_TIME_SRC_TOW_AND_WEEK_CONFIRMED (6) --  Both time of the week and the GPS week number are known
+      - eQMI_LOC_TIME_SRC_NAV_SOLUTION (7) --  Time is set by the position engine after the fix is obtained
+      - eQMI_LOC_TIME_SRC_SOLVE_FOR_TIME (8) --  Time is set by the position engine after performing SFT;
+       this is done when the clock time uncertainty is large
+      - eQMI_LOC_TIME_SRC_GLO_TOW_DECODE (9) --  Time is set after decoding GLO satellites
+      - eQMI_LOC_TIME_SRC_TIME_TRANSFORM (10) --  Time is set after transforming the GPS to GLO time
+      - eQMI_LOC_TIME_SRC_WCDMA_SLEEP_TIME_TAGGING (11) --  Time is set by the sleep time tag provided by the WCDMA network
+      - eQMI_LOC_TIME_SRC_GSM_SLEEP_TIME_TAGGING (12) --  Time is set by the sleep time tag provided by the GSM network
+      - eQMI_LOC_TIME_SRC_UNKNOWN (13) --  Source of the time is unknown
+      - eQMI_LOC_TIME_SRC_SYSTEM_TIMETICK (14) --  Time is derived from the system clock (better known as the slow clock);
+       GNSS time is maintained irrespective of the GNSS receiver state
+      - eQMI_LOC_TIME_SRC_QZSS_TOW_DECODE (15) --  Time is set after decoding QZSS satellites
+      - eQMI_LOC_TIME_SRC_BDS_TOW_DECODE (16) --  Time is set after decoding BDS satellites  */
+
+  /* Optional */
+  /*  Sensor Data Usage */
+  uint8_t sensorDataUsage_valid;  /**< Must be set to true if sensorDataUsage is being passed */
+  qmiLocSensorUsageIndicatorStructT_v02 sensorDataUsage;
+  /**<   \vspace{0.06in} \n Indicates whether sensor data was used in computing the position in this
+       position report. */
+
+  /* Optional */
+  /*  Fix Count for This Session */
+  uint8_t fixId_valid;  /**< Must be set to true if fixId is being passed */
+  uint32_t fixId;
+  /**<   Fix count for the session. Starts with 0 and increments by one
+       for each successive position report for a particular session. */
+
+  /* Optional */
+  /*  SVs Used to Calculate the Fix */
+  uint8_t gnssSvUsedList_valid;  /**< Must be set to true if gnssSvUsedList is being passed */
+  uint32_t gnssSvUsedList_len;  /**< Must be set to # of elements in gnssSvUsedList */
+  uint16_t gnssSvUsedList[QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02];
+  /**<   Each entry in the list contains the SV ID of a satellite
+      used for calculating this position report. The following
+      information is associated with each SV ID: \n
+      Range: \n
+      - For GPS:     1 to 32 \n
+      - For SBAS:    33 to 64 \n
+      - For GLONASS: 65 to 96 \n
+      - For QZSS:    193 to 197 \n
+      - For BDS:     201 to 237
+      */
+
+  /* Optional */
+  /*  Altitude Assumed */
+  uint8_t altitudeAssumed_valid;  /**< Must be set to true if altitudeAssumed is being passed */
+  uint8_t altitudeAssumed;
+  /**<   Indicates whether altitude is assumed or calculated: \begin{itemize1}
+         \item    0x00 (FALSE) -- Altitude is calculated
+         \item    0x01 (TRUE) -- Altitude is assumed; there may not be enough
+                                 satellites to determine the precise altitude
+        \vspace{-0.18in} \end{itemize1}*/
+}qmiLocEventPositionReportIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSVSYSTEMENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SV_SYSTEM_GPS_V02 = 1, /**<  GPS satellite  */
+  eQMI_LOC_SV_SYSTEM_GALILEO_V02 = 2, /**<  GALILEO satellite  */
+  eQMI_LOC_SV_SYSTEM_SBAS_V02 = 3, /**<  SBAS satellite  */
+  eQMI_LOC_SV_SYSTEM_COMPASS_V02 = 4, /**<  COMPASS satellite  */
+  eQMI_LOC_SV_SYSTEM_GLONASS_V02 = 5, /**<  GLONASS satellite  */
+  eQMI_LOC_SV_SYSTEM_BDS_V02 = 6, /**<  BDS satellite  */
+  QMILOCSVSYSTEMENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocSvSystemEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSVSTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SV_STATUS_IDLE_V02 = 1, /**<  SV is not being actively processed  */
+  eQMI_LOC_SV_STATUS_SEARCH_V02 = 2, /**<  The system is searching for this SV  */
+  eQMI_LOC_SV_STATUS_TRACK_V02 = 3, /**<  SV is being tracked  */
+  QMILOCSVSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocSvStatusEnumT_v02;
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocSvInfoValidMaskT_v02;
+#define QMI_LOC_SV_INFO_MASK_VALID_SYSTEM_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000001) /**<  System field is valid in SV information  */
+#define QMI_LOC_SV_INFO_MASK_VALID_GNSS_SVID_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000002) /**<  gnssSvId field is valid in SV information  */
+#define QMI_LOC_SV_INFO_MASK_VALID_HEALTH_STATUS_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000004) /**<  healthStatus field is valid in SV information  */
+#define QMI_LOC_SV_INFO_MASK_VALID_PROCESS_STATUS_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000008) /**<  processStatus field is valid in SV information  */
+#define QMI_LOC_SV_INFO_MASK_VALID_SVINFO_MASK_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000010) /**<  svInfoMask field is valid in SV information  */
+#define QMI_LOC_SV_INFO_MASK_VALID_ELEVATION_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000020) /**<  Elevation field is valid in SV information  */
+#define QMI_LOC_SV_INFO_MASK_VALID_AZIMUTH_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000040) /**<  Azimuth field is valid in SV information  */
+#define QMI_LOC_SV_INFO_MASK_VALID_SNR_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000080) /**<  SNR field is valid in SV information  */
+typedef uint8_t qmiLocSvInfoMaskT_v02;
+#define QMI_LOC_SVINFO_MASK_HAS_EPHEMERIS_V02 ((qmiLocSvInfoMaskT_v02)0x01) /**<  Ephemeris is available for this SV  */
+#define QMI_LOC_SVINFO_MASK_HAS_ALMANAC_V02 ((qmiLocSvInfoMaskT_v02)0x02) /**<  Almanac is available for this SV  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocSvInfoValidMaskT_v02 validMask;
+  /**<   Bitmask indicating which of the fields in this TLV are valid.
+
+         Valid bitmasks: \begin{itemize1}
+         \item    0x00000001 -- VALID_SYSTEM
+         \item    0x00000002 -- VALID_GNSS_SVID
+         \item    0x00000004 -- VALID_HEALTH_ STATUS
+         \item    0x00000008 -- VALID_PROCESS_ STATUS
+         \item    0x00000010 -- VALID_SVINFO_ MASK
+         \item    0x00000020 -- VALID_ELEVATION
+         \item    0x00000040 -- VALID_AZIMUTH
+         \item    0x00000080 -- VALID_SNR
+         \vspace{-0.18in} \end{itemize1}  */
+
+  qmiLocSvSystemEnumT_v02 system;
+  /**<   Indicates to which constellation this SV belongs.
+
+ Valid values: \n
+      - eQMI_LOC_SV_SYSTEM_GPS (1) --  GPS satellite
+      - eQMI_LOC_SV_SYSTEM_GALILEO (2) --  GALILEO satellite
+      - eQMI_LOC_SV_SYSTEM_SBAS (3) --  SBAS satellite
+      - eQMI_LOC_SV_SYSTEM_COMPASS (4) --  COMPASS satellite
+      - eQMI_LOC_SV_SYSTEM_GLONASS (5) --  GLONASS satellite
+      - eQMI_LOC_SV_SYSTEM_BDS (6) --  BDS satellite
+ */
+
+  uint16_t gnssSvId;
+  /**<   GNSS SV ID.
+         \begin{itemize1}
+         \item Range:  \begin{itemize1}
+           \item For GPS:      1 to 32
+           \item For GLONASS:  1 to 32
+           \item For SBAS:     120 to 151
+           \item For BDS:      201 to 237
+         \end{itemize1} \end{itemize1}
+
+        The GPS and GLONASS SVs can be disambiguated using the system field. */
+
+  uint8_t healthStatus;
+  /**<   Health status.
+         \begin{itemize1}
+         \item    Range: 0 to 1; 0 = unhealthy, \n 1 = healthy
+         \vspace{-0.18in} \end{itemize1}*/
+
+  qmiLocSvStatusEnumT_v02 svStatus;
+  /**<   SV processing status.
+
+ Valid values: \n
+      - eQMI_LOC_SV_STATUS_IDLE (1) --  SV is not being actively processed
+      - eQMI_LOC_SV_STATUS_SEARCH (2) --  The system is searching for this SV
+      - eQMI_LOC_SV_STATUS_TRACK (3) --  SV is being tracked
+ */
+
+  qmiLocSvInfoMaskT_v02 svInfoMask;
+  /**<   Indicates whether almanac and ephemeris information is available. \n
+         Valid bitmasks:
+
+           - 0x01 -- SVINFO_HAS_EPHEMERIS \n
+           - 0x02 -- SVINFO_HAS_ALMANAC
+    */
+
+  float elevation;
+  /**<   SV elevation angle.\n
+         - Units: Degrees \n
+         - Range: 0 to 90 */
+
+  float azimuth;
+  /**<   SV azimuth angle.\n
+         - Units: Degrees \n
+         - Range: 0 to 360 */
+
+  float snr;
+  /**<   SV signal-to-noise ratio. \n
+         - Units: dB-Hz */
+}qmiLocSvInfoStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sends a satellite report to the control point. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Altitude Assumed */
+  uint8_t altitudeAssumed;
+  /**<   Indicates whether altitude is assumed or calculated: \begin{itemize1}
+         \item    0x00 (FALSE) -- Valid altitude is calculated
+         \item    0x01 (TRUE) -- Valid altitude is assumed; there may not be
+                                 enough satellites to determine precise altitude
+          \vspace{-0.18in} \end{itemize1}*/
+
+  /* Optional */
+  /*  Satellite Info */
+  uint8_t svList_valid;  /**< Must be set to true if svList is being passed */
+  uint32_t svList_len;  /**< Must be set to # of elements in svList */
+  qmiLocSvInfoStructT_v02 svList[QMI_LOC_SV_INFO_LIST_MAX_SIZE_V02];
+  /**<   \vspace{0.06in} \n SV information list. */
+}qmiLocEventGnssSvInfoIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sends NMEA sentences to the control point */
+typedef struct {
+
+  /* Mandatory */
+  /*  NMEA String */
+  char nmea[QMI_LOC_NMEA_STRING_MAX_LENGTH_V02 + 1];
+  /**<   NMEA string.
+       \begin{itemize1}
+       \item    Type: NULL-terminated string
+       \item    Maximum string length (including NULL terminator): 201
+       \vspace{-0.18in} \end{itemize1}*/
+}qmiLocEventNmeaIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCNINOTIFYVERIFYENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_NI_USER_NO_NOTIFY_NO_VERIFY_V02 = 1, /**<  No notification and no verification required  */
+  eQMI_LOC_NI_USER_NOTIFY_ONLY_V02 = 2, /**<  Notify only; no verification required  */
+  eQMI_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP_V02 = 3, /**<  Notify and verify, but no response required.  */
+  eQMI_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP_V02 = 4, /**<  Notify and verify, and require a response  */
+  eQMI_LOC_NI_USER_NOTIFY_VERIFY_PRIVACY_OVERRIDE_V02 = 5, /**<  Notify and verify; privacy override  */
+  QMILOCNINOTIFYVERIFYENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocNiNotifyVerifyEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCNIVXPOSMODEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_NI_VX_MS_ASSISTED_ONLY_V02 = 1, /**<  MS-assisted only allowed  */
+  eQMI_LOC_NI_VX_MS_BASED_ONLY_V02 = 2, /**<  MS-based only allowed  */
+  eQMI_LOC_NI_VX_MS_ASSISTED_PREFERRED_MS_BASED_ALLOWED_V02 = 3, /**<  MS-assisted preferred, but MS-based allowed  */
+  eQMI_LOC_NI_VX_MS_BASED_PREFERRED_MS_ASSISTED_ALLOWED_V02 = 4, /**<  MS-based preferred, but MS-assisted allowed  */
+  QMILOCNIVXPOSMODEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocNiVxPosModeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCNIVXREQUESTORIDENCODINGSCHEMEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_NI_VX_OCTET_V02 = 0, /**<  Encoding is Octet  */
+  eQMI_LOC_NI_VX_EXN_PROTOCOL_MSG_V02 = 1, /**<  Encoding is EXN protocol message  */
+  eQMI_LOC_NI_VX_ASCII_V02 = 2, /**<  Encoding is ASCII  */
+  eQMI_LOC_NI_VX_IA5_V02 = 3, /**<  Encoding is IA5  */
+  eQMI_LOC_NI_VX_UNICODE_V02 = 4, /**<  Encoding is Unicode  */
+  eQMI_LOC_NI_VX_SHIFT_JIS_V02 = 5, /**<  Encoding is Shift JIS  */
+  eQMI_LOC_NI_VX_KOREAN_V02 = 6, /**<  Encoding is Korean  */
+  eQMI_LOC_NI_VX_LATIN_HEBREW_V02 = 7, /**<  Encoding is Latin Hebrew  */
+  eQMI_LOC_NI_VX_LATIN_V02 = 8, /**<  Encoding is Latin  */
+  eQMI_LOC_NI_VX_GSM_V02 = 9, /**<  Encoding is GSM  */
+  QMILOCNIVXREQUESTORIDENCODINGSCHEMEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocNiVxRequestorIdEncodingSchemeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint8_t posQosIncl;
+  /**<   Indicates whether quality of service is included:\n
+         - 0x01 (TRUE) --  QoS is included \n
+         - 0x00 (FALSE) -- QoS is not included */
+
+  uint8_t posQos;
+  /**<   Position QoS timeout. \n
+         - Units: Seconds \n
+         - Range: 0 to 255 */
+
+  uint32_t numFixes;
+  /**<   Number of fixes allowed. */
+
+  uint32_t timeBetweenFixes;
+  /**<   Time between fixes. \n
+         - Units: Seconds */
+
+  qmiLocNiVxPosModeEnumT_v02 posMode;
+  /**<   Position mode.
+ Valid values:
+
+      - eQMI_LOC_NI_VX_MS_ASSISTED_ONLY (1) --  MS-assisted only allowed
+      - eQMI_LOC_NI_VX_MS_BASED_ONLY (2) --  MS-based only allowed
+      - eQMI_LOC_NI_VX_MS_ASSISTED_PREFERRED_MS_BASED_ALLOWED (3) --  MS-assisted preferred, but MS-based allowed
+      - eQMI_LOC_NI_VX_MS_BASED_PREFERRED_MS_ASSISTED_ALLOWED (4) --  MS-based preferred, but MS-assisted allowed
+ */
+
+  qmiLocNiVxRequestorIdEncodingSchemeEnumT_v02 encodingScheme;
+  /**<   VX encoding scheme.
+
+ Valid values:
+
+      - eQMI_LOC_NI_VX_OCTET (0) --  Encoding is Octet
+      - eQMI_LOC_NI_VX_EXN_PROTOCOL_MSG (1) --  Encoding is EXN protocol message
+      - eQMI_LOC_NI_VX_ASCII (2) --  Encoding is ASCII
+      - eQMI_LOC_NI_VX_IA5 (3) --  Encoding is IA5
+      - eQMI_LOC_NI_VX_UNICODE (4) --  Encoding is Unicode
+      - eQMI_LOC_NI_VX_SHIFT_JIS (5) --  Encoding is Shift JIS
+      - eQMI_LOC_NI_VX_KOREAN (6) --  Encoding is Korean
+      - eQMI_LOC_NI_VX_LATIN_HEBREW (7) --  Encoding is Latin Hebrew
+      - eQMI_LOC_NI_VX_LATIN (8) --  Encoding is Latin
+      - eQMI_LOC_NI_VX_GSM (9) --  Encoding is GSM
+ */
+
+  uint32_t requestorId_len;  /**< Must be set to # of elements in requestorId */
+  uint8_t requestorId[QMI_LOC_NI_MAX_REQUESTOR_ID_LENGTH_V02];
+  /**<   Requestor ID. \n
+       - Type:  Array of bytes \n
+       - Maximum array length: 200
+  */
+
+  uint16_t userRespTimerInSeconds;
+  /**<   Time to wait for the user to respond. \n
+         - Units: Seconds */
+}qmiLocNiVxNotifyVerifyStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCNISUPLPOSMETHODENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_NI_SUPL_POSMETHOD_AGPS_SETASSISTED_V02 = 1, /**<  Set assisted  */
+  eQMI_LOC_NI_SUPL_POSMETHOD_AGPS_SETBASED_V02 = 2, /**<  Set based  */
+  eQMI_LOC_NI_SUPL_POSMETHOD_AGPS_SETASSISTED_PREF_V02 = 3, /**<  Set assisted preferred  */
+  eQMI_LOC_NI_SUPL_POSMETHOD_AGPS_SETBASED_PREF_V02 = 4, /**<  Set based preferred  */
+  eQMI_LOC_NI_SUPL_POSMETHOD_AUTONOMOUS_GPS_V02 = 5, /**<  Standalone GPS  */
+  eQMI_LOC_NI_SUPL_POSMETHOD_AFLT_V02 = 6, /**<  Advanced forward link trilateration  */
+  eQMI_LOC_NI_SUPL_POSMETHOD_ECID_V02 = 7, /**<  Exclusive chip ID  */
+  eQMI_LOC_NI_SUPL_POSMETHOD_EOTD_V02 = 8, /**<  Enhnaced observed time difference  */
+  eQMI_LOC_NI_SUPL_POSMETHOD_OTDOA_V02 = 9, /**<  Observed time delay of arrival  */
+  eQMI_LOC_NI_SUPL_POSMETHOD_NO_POSITION_V02 = 10, /**<  No position  */
+  QMILOCNISUPLPOSMETHODENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocNiSuplPosMethodEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCNIDATACODINGSCHEMEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_NI_SS_GERMAN_V02 = 12, /**<  Language is German  */
+  eQMI_LOC_NI_SS_ENGLISH_V02 = 13, /**<  Language is English  */
+  eQMI_LOC_NI_SS_ITALIAN_V02 = 14, /**<  Language is Italian  */
+  eQMI_LOC_NI_SS_FRENCH_V02 = 15, /**<  Language is French  */
+  eQMI_LOC_NI_SS_SPANISH_V02 = 16, /**<  Language is Spanish  */
+  eQMI_LOC_NI_SS_DUTCH_V02 = 17, /**<  Language is Dutch  */
+  eQMI_LOC_NI_SS_SWEDISH_V02 = 18, /**<  Language is Swedish  */
+  eQMI_LOC_NI_SS_DANISH_V02 = 19, /**<  Language is Danish  */
+  eQMI_LOC_NI_SS_PORTUGUESE_V02 = 20, /**<  Language is Portuguese  */
+  eQMI_LOC_NI_SS_FINNISH_V02 = 21, /**<  Language is Finnish  */
+  eQMI_LOC_NI_SS_NORWEGIAN_V02 = 22, /**<  Language is Norwegian  */
+  eQMI_LOC_NI_SS_GREEK_V02 = 23, /**<  Language is Greek  */
+  eQMI_LOC_NI_SS_TURKISH_V02 = 24, /**<  Language is Turkish  */
+  eQMI_LOC_NI_SS_HUNGARIAN_V02 = 25, /**<  Language is Hungarian  */
+  eQMI_LOC_NI_SS_POLISH_V02 = 26, /**<  Language is Polish  */
+  eQMI_LOC_NI_SS_LANGUAGE_UNSPEC_V02 = 27, /**<  Language is unspecified  */
+  eQMI_LOC_NI_SUPL_UTF8_V02 = 28, /**<  Encoding is UTF 8  */
+  eQMI_LOC_NI_SUPL_UCS2_V02 = 29, /**<  Encoding is UCS 2  */
+  eQMI_LOC_NI_SUPL_GSM_DEFAULT_V02 = 30, /**<  Encoding is GSM default  */
+  QMILOCNIDATACODINGSCHEMEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocNiDataCodingSchemeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCNISUPLFORMATENUMTYPE_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_NI_SUPL_FORMAT_LOGICAL_NAME_V02 = 0, /**<  SUPL logical name format  */
+  eQMI_LOC_NI_SUPL_FORMAT_EMAIL_ADDRESS_V02 = 1, /**<  SUPL email address format  */
+  eQMI_LOC_NI_SUPL_FORMAT_MSISDN_V02 = 2, /**<  SUPL MS-ISDN format  */
+  eQMI_LOC_NI_SUPL_FORMAT_URL_V02 = 3, /**<  SUPL URL format  */
+  eQMI_LOC_NI_SUPL_FORMAT_SIP_URL_V02 = 4, /**<  SUPL SIP URL format  */
+  eQMI_LOC_NI_SUPL_FORMAT_MIN_V02 = 5, /**<  SUPL MIN format  */
+  eQMI_LOC_NI_SUPL_FORMAT_MDN_V02 = 6, /**<  SUPL MDN format  */
+  eQMI_LOC_NI_SUPL_FORMAT_IMSPUBLIC_IDENTITY_V02 = 7, /**<  SUPL IMS public identity  */
+  eQMI_LOC_NI_SUPL_FORMAT_OSS_UNKNOWN_V02 = 2147483647, /**<  SUPL unknown format  */
+  QMILOCNISUPLFORMATENUMTYPE_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocNiSuplFormatEnumType_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocNiSuplFormatEnumType_v02 formatType;
+  /**<   Format of the formatted string.
+
+ Valid values: \n
+      - eQMI_LOC_NI_SUPL_FORMAT_LOGICAL_NAME (0) --  SUPL logical name format
+      - eQMI_LOC_NI_SUPL_FORMAT_EMAIL_ADDRESS (1) --  SUPL email address format
+      - eQMI_LOC_NI_SUPL_FORMAT_MSISDN (2) --  SUPL MS-ISDN format
+      - eQMI_LOC_NI_SUPL_FORMAT_URL (3) --  SUPL URL format
+      - eQMI_LOC_NI_SUPL_FORMAT_SIP_URL (4) --  SUPL SIP URL format
+      - eQMI_LOC_NI_SUPL_FORMAT_MIN (5) --  SUPL MIN format
+      - eQMI_LOC_NI_SUPL_FORMAT_MDN (6) --  SUPL MDN format
+      - eQMI_LOC_NI_SUPL_FORMAT_IMSPUBLIC_IDENTITY (7) --  SUPL IMS public identity
+      - eQMI_LOC_NI_SUPL_FORMAT_OSS_UNKNOWN (2147483647) --  SUPL unknown format
+ */
+
+  uint32_t formattedString_len;  /**< Must be set to # of elements in formattedString */
+  uint8_t formattedString[QMI_LOC_NI_MAX_CLIENT_NAME_LENGTH_V02];
+  /**<   Formatted string. \n
+        - Type: Byte array \n
+        - Maximum string length: 64
+   */
+}qmiLocNiSuplFormattedStringStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+typedef uint8_t qmiLocSuplQopValidMaskT_v02;
+#define QMI_LOC_NI_SUPL_MASK_QOP_HORZ_ACC_VALID_V02 ((qmiLocSuplQopValidMaskT_v02)0x01) /**<  Horizontal accuracy is valid in the Quality of Position (QoP)  */
+#define QMI_LOC_NI_SUPL_MASK_QOP_VER_ACC_VALID_V02 ((qmiLocSuplQopValidMaskT_v02)0x02) /**<  Vertical accuracy is valid in the QoP  */
+#define QMI_LOC_NI_SUPL_MASK_QOP_MAXAGE_VALID_V02 ((qmiLocSuplQopValidMaskT_v02)0x04) /**<  Vertical accuracy is valid in the QoP  */
+#define QMI_LOC_NI_SUPL_MASK_QOP_DELAY_VALID_V02 ((qmiLocSuplQopValidMaskT_v02)0x08) /**<  Vertical accuracy is valid in the QoP  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocSuplQopValidMaskT_v02 validMask;
+  /**<   Bit field indicating which fields are valid in this value.
+
+        Valid bitmasks: \n
+          - 0x01 -- QOP_HORZ_ACC_VALID \n
+          - 0x02 -- QOP_VER_ACC_VALID \n
+          - 0x04 -- QOP_MAXAGE_VALID \n
+          - 0x08 -- QOP_DELAY_VALID*/
+
+  uint8_t horizontalAccuracy;
+  /**<   Horizontal accuracy. \n
+        - Units: Meters */
+
+  uint8_t verticalAccuracy;
+  /**<   Vertical accuracy. \n
+        - Units: Meters */
+
+  uint16_t maxLocAge;
+  /**<   Maximum age of the location if the engine sends a previously
+        computed position. \n
+        - Units: Seconds */
+
+  uint8_t delay;
+  /**<   Delay the server is willing to tolerate for the fix. \n
+        - Units: Seconds */
+}qmiLocNiSuplQopStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+typedef uint8_t qmiLocServerAddrTypeMaskT_v02;
+#define QMI_LOC_SERVER_ADDR_TYPE_IPV4_MASK_V02 ((qmiLocServerAddrTypeMaskT_v02)0x01) /**<  IPv4 server address type  */
+#define QMI_LOC_SERVER_ADDR_TYPE_IPV6_MASK_V02 ((qmiLocServerAddrTypeMaskT_v02)0x02) /**<  IPv6 server address type  */
+#define QMI_LOC_SERVER_ADDR_TYPE_URL_MASK_V02 ((qmiLocServerAddrTypeMaskT_v02)0x04) /**<  URL server address type  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t addr;
+  /**<   IPv4 address. */
+
+  uint16_t port;
+  /**<   IPv4 port. */
+}qmiLocIpV4AddrStructType_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint16_t addr[QMI_LOC_IPV6_ADDR_LENGTH_V02];
+  /**<   IPv6 address. \n
+       - Type: Array of unsigned integers \n
+       - Maximum length of the array: 8 */
+
+  uint32_t port;
+  /**<   IPv6 port. */
+}qmiLocIpV6AddrStructType_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocServerAddrTypeMaskT_v02 suplServerAddrTypeMask;
+  /**<   Mask specifying the valid fields in this value.
+
+       Valid bitmasks: \n
+         - 0x01 -- IPv4 \n
+         - 0x02 -- IPv6 \n
+         - 0x04 -- URL
+  */
+
+  qmiLocIpV4AddrStructType_v02 ipv4Addr;
+  /**<   IPv4 address and port. */
+
+  qmiLocIpV6AddrStructType_v02 ipv6Addr;
+  /**<   IPv6 address and port. */
+
+  char urlAddr[QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 + 1];
+  /**<   URL.
+       \begin{itemize1}
+       \item    Type: NULL-terminated string
+       \item    Maximum string length (including NULL terminator): 256
+       \vspace{-0.18in} \end{itemize1}
+        */
+}qmiLocNiSuplServerInfoStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocNiSuplNotifyVerifyValidMaskT_v02;
+#define QMI_LOC_SUPL_SERVER_INFO_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000001) /**<  Mask to denote that the server information
+      is present in an NI SUPL Notify/Verify request event. This mask is set in
+     the valid_flags field of a Notify/Verify structure.  */
+#define QMI_LOC_SUPL_SESSION_ID_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000002) /**<  Mask to denote that the SUPL session ID
+       is present in an NI SUPL Notify/Verify request event.
+      This mask is set in the valid_flags field of a
+      Notify/Verify structure.   */
+#define QMI_LOC_SUPL_HASH_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000004) /**<  Mask to denote that the SUPL hash is present
+       in an NI Notify/Verify request event.
+      This mask is set in the valid_flags field of a
+      Notify/Verify structure.   */
+#define QMI_LOC_SUPL_POS_METHOD_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000008) /**<  Mask to denote that the position method is present
+       in an NI SUPL Notify/Verify request event.
+      This mask is set in the valid_flags field of a
+      Notify/Verify structure.  */
+#define QMI_LOC_SUPL_DATA_CODING_SCHEME_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000010) /**<  Mask to denote that the data coding scheme
+       is present in an NI SUPL Notify/Verify request event.
+      This mask is set in the valid_flags field of a
+      Notify/Verify structure.  */
+#define QMI_LOC_SUPL_REQUESTOR_ID_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000020) /**<  Mask to denote that the requestor ID
+       is present in an NI Notify/Verify request event.
+      This mask is set in the valid_flags field of a
+      Notify/Verify structure.  */
+#define QMI_LOC_SUPL_CLIENT_NAME_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000040) /**<  Mask to denote that the requestor ID
+       is present in an NI Notify/Verify request event.
+       This mask is set in the valid_flags field of a
+       Notify/Verify structure.  */
+#define QMI_LOC_SUPL_QOP_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000080) /**<  Mask to denote that the quality of position
+       is present in an NI Notify/Verify request event.
+       This mask is set in the valid_flags field of a
+       Notify/Verify structure.  */
+#define QMI_LOC_SUPL_USER_RESP_TIMER_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000100) /**<  Mask to denote that the user response timer
+       is present in an NI Notify/Verify request event.
+       This mask is set in the valid_flags field of a
+       Notify/Verify structure.  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocNiSuplNotifyVerifyValidMaskT_v02 valid_flags;
+  /**<   Indicates which of the following fields are present in this value.
+
+        Valid bitmasks: \begin{itemize1}
+        \item    0x00000001 -- SUPL_SERVER_INFO
+        \item    0x00000002 -- SUPL_SESSION_ID
+        \item    0x00000004 -- SUPL_HASH
+        \item    0x00000008 -- SUPL_POS_METHOD
+        \item    0x00000010 -- SUPL_DATA_ CODING_SCHEME
+        \item    0x00000020 -- SUPL_REQUESTOR_ ID
+        \item    0x00000040 -- SUPL_CLIENT_ NAME
+        \item    0x00000080 -- SUPL_QOP
+        \item    0x00000100 -- SUPL_USER_RESP_ TIMER
+        \vspace{-0.18in} \end{itemize1}
+  */
+
+  qmiLocNiSuplServerInfoStructT_v02 suplServerInfo;
+  /**<   SUPL server information. */
+
+  uint8_t suplSessionId[QMI_LOC_NI_SUPL_SLP_SESSION_ID_BYTE_LENGTH_V02];
+  /**<   SUPL session ID. \n
+       - Type: Array of unsigned integers \n
+       - Maximum length of the array: 4 */
+
+  uint8_t suplHash[QMI_LOC_NI_SUPL_HASH_LENGTH_V02];
+  /**<   Hash for SUPL_INIT; used to validate that the message was not
+       corrupted. \n
+       - Type: Array of unsigned integers \n
+       - Length of the array: 8 */
+
+  qmiLocNiSuplPosMethodEnumT_v02 posMethod;
+  /**<   GPS mode to be used for the fix.
+ Valid values:
+
+      - eQMI_LOC_NI_SUPL_POSMETHOD_AGPS_SETASSISTED (1) --  Set assisted
+      - eQMI_LOC_NI_SUPL_POSMETHOD_AGPS_SETBASED (2) --  Set based
+      - eQMI_LOC_NI_SUPL_POSMETHOD_AGPS_SETASSISTED_PREF (3) --  Set assisted preferred
+      - eQMI_LOC_NI_SUPL_POSMETHOD_AGPS_SETBASED_PREF (4) --  Set based preferred
+      - eQMI_LOC_NI_SUPL_POSMETHOD_AUTONOMOUS_GPS (5) --  Standalone GPS
+      - eQMI_LOC_NI_SUPL_POSMETHOD_AFLT (6) --  Advanced forward link trilateration
+      - eQMI_LOC_NI_SUPL_POSMETHOD_ECID (7) --  Exclusive chip ID
+      - eQMI_LOC_NI_SUPL_POSMETHOD_EOTD (8) --  Enhnaced observed time difference
+      - eQMI_LOC_NI_SUPL_POSMETHOD_OTDOA (9) --  Observed time delay of arrival
+      - eQMI_LOC_NI_SUPL_POSMETHOD_NO_POSITION (10) --  No position
+ */
+
+  qmiLocNiDataCodingSchemeEnumT_v02 dataCodingScheme;
+  /**<   Data coding scheme applies to both the requestor ID and the client
+ name.
+
+ Valid values: \n
+      - eQMI_LOC_NI_SS_GERMAN (12) --  Language is German
+      - eQMI_LOC_NI_SS_ENGLISH (13) --  Language is English
+      - eQMI_LOC_NI_SS_ITALIAN (14) --  Language is Italian
+      - eQMI_LOC_NI_SS_FRENCH (15) --  Language is French
+      - eQMI_LOC_NI_SS_SPANISH (16) --  Language is Spanish
+      - eQMI_LOC_NI_SS_DUTCH (17) --  Language is Dutch
+      - eQMI_LOC_NI_SS_SWEDISH (18) --  Language is Swedish
+      - eQMI_LOC_NI_SS_DANISH (19) --  Language is Danish
+      - eQMI_LOC_NI_SS_PORTUGUESE (20) --  Language is Portuguese
+      - eQMI_LOC_NI_SS_FINNISH (21) --  Language is Finnish
+      - eQMI_LOC_NI_SS_NORWEGIAN (22) --  Language is Norwegian
+      - eQMI_LOC_NI_SS_GREEK (23) --  Language is Greek
+      - eQMI_LOC_NI_SS_TURKISH (24) --  Language is Turkish
+      - eQMI_LOC_NI_SS_HUNGARIAN (25) --  Language is Hungarian
+      - eQMI_LOC_NI_SS_POLISH (26) --  Language is Polish
+      - eQMI_LOC_NI_SS_LANGUAGE_UNSPEC (27) --  Language is unspecified
+      - eQMI_LOC_NI_SUPL_UTF8 (28) --  Encoding is UTF 8
+      - eQMI_LOC_NI_SUPL_UCS2 (29) --  Encoding is UCS 2
+      - eQMI_LOC_NI_SUPL_GSM_DEFAULT (30) --  Encoding is GSM default
+ */
+
+  qmiLocNiSuplFormattedStringStructT_v02 requestorId;
+  /**<   Requestor ID. The encoding scheme for requestor_id is specified in
+       the dataCodingScheme field. */
+
+  qmiLocNiSuplFormattedStringStructT_v02 clientName;
+  /**<   Client name. The encoding scheme for client_name is specified in
+       the dataCodingScheme field. */
+
+  qmiLocNiSuplQopStructT_v02 suplQop;
+  /**<   SUPL QoP. */
+
+  uint16_t userResponseTimer;
+  /**<   Time to wait for the user to respond. \n
+       - Units: Seconds*/
+}qmiLocNiSuplNotifyVerifyStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCNILOCATIONTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_NI_LOCATIONTYPE_CURRENT_LOCATION_V02 = 1, /**<  Current location  */
+  eQMI_LOC_NI_LOCATIONTYPE_CURRENT_OR_LAST_KNOWN_LOCATION_V02 = 2, /**<  Last known location; may be the current location  */
+  eQMI_LOC_NI_LOCATIONTYPE_INITIAL_LOCATION_V02 = 3, /**<  Initial location  */
+  QMILOCNILOCATIONTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocNiLocationTypeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocNiDataCodingSchemeEnumT_v02 dataCodingScheme;
+  /**<   Identifies the coding scheme of the coded string.
+
+ Valid values: \n
+      - eQMI_LOC_NI_SS_GERMAN (12) --  Language is German
+      - eQMI_LOC_NI_SS_ENGLISH (13) --  Language is English
+      - eQMI_LOC_NI_SS_ITALIAN (14) --  Language is Italian
+      - eQMI_LOC_NI_SS_FRENCH (15) --  Language is French
+      - eQMI_LOC_NI_SS_SPANISH (16) --  Language is Spanish
+      - eQMI_LOC_NI_SS_DUTCH (17) --  Language is Dutch
+      - eQMI_LOC_NI_SS_SWEDISH (18) --  Language is Swedish
+      - eQMI_LOC_NI_SS_DANISH (19) --  Language is Danish
+      - eQMI_LOC_NI_SS_PORTUGUESE (20) --  Language is Portuguese
+      - eQMI_LOC_NI_SS_FINNISH (21) --  Language is Finnish
+      - eQMI_LOC_NI_SS_NORWEGIAN (22) --  Language is Norwegian
+      - eQMI_LOC_NI_SS_GREEK (23) --  Language is Greek
+      - eQMI_LOC_NI_SS_TURKISH (24) --  Language is Turkish
+      - eQMI_LOC_NI_SS_HUNGARIAN (25) --  Language is Hungarian
+      - eQMI_LOC_NI_SS_POLISH (26) --  Language is Polish
+      - eQMI_LOC_NI_SS_LANGUAGE_UNSPEC (27) --  Language is unspecified
+      - eQMI_LOC_NI_SUPL_UTF8 (28) --  Encoding is UTF 8
+      - eQMI_LOC_NI_SUPL_UCS2 (29) --  Encoding is UCS 2
+      - eQMI_LOC_NI_SUPL_GSM_DEFAULT (30) --  Encoding is GSM default
+ */
+
+  uint32_t codedString_len;  /**< Must be set to # of elements in codedString */
+  uint8_t codedString[QMI_LOC_NI_CODEWORD_MAX_LENGTH_V02];
+  /**<   Coded string. \n
+       - Type: Array of bytes \n
+       - Maximum string length: 20 */
+}qmiLocNiUmtsCpCodedStringStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+typedef uint16_t qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02;
+#define QMI_LOC_UMTS_CP_INVOKE_ID_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0001) /**<  Mask to denote that the invoke ID
+       is present in an NI Notify/Verify request event.
+      This mask is set in the valid flags field of a
+       Notify/Verify structure.  */
+#define QMI_LOC_UMTS_CP_DATA_CODING_SCHEME_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0002) /**<  Mask to denote that the data coding scheme
+       is present in an NI Notify/Verify request event.
+       This mask is set in the valid flags field of a
+       Notify/Verify structure.  */
+#define QMI_LOC_UMTS_CP_NOTIFICATION_TEXT_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0004) /**<  Mask to denote that the notification text
+       is present in an NI Notify/Verify request event.
+      This mask is set in the valid flags field of a
+       Notify/Verify structure.  */
+#define QMI_LOC_UMTS_CP_CLIENT_ADDRESS_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0008) /**<  Mask to denote that the client address
+       is present in an NI Notify/Verify request event.
+      This mask is set in the valid flags field of a
+       Notify/Verify structure.  */
+#define QMI_LOC_UMTS_CP_LOCATION_TYPE_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0010) /**<  Mask to denote that the location type
+       is present in an NI Notify/Verify request event.
+       This mask is set in the valid flags field of a
+       Notify/Verify structure.  */
+#define QMI_LOC_UMTS_CP_REQUESTOR_ID_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0020) /**<  Mask to denote that the requestor ID
+       is present in an NI Notify/Verify request event.
+       This mask is set in the valid flags field of a
+       Notify/Verify structure.  */
+#define QMI_LOC_UMTS_CP_CODEWORD_STRING_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0040) /**<  Mask to denote that the code word string
+       is present in an NI Notify/Verify request event.
+       This mask is set in the valid flags field of a
+       Notify/Verify structure.  */
+#define QMI_LOC_UMTS_CP_SERVICE_TYPE_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0080) /**<  Mask to denote that the service type
+       is present in an NI Notify/Verify request event.
+       This mask is set in the valid flags field of a
+       Notify/Verify structure.  */
+#define QMI_LOC_UMTS_CP_USER_RESP_TIMER_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0100) /**<  Mask to denote that the user response timer
+       is present in an NI Notify/Verify request event.
+       This mask is set in the valid flags field of a
+       Notify/Verify structure.  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02 valid_flags;
+  /**<   Fields that are valid in this value.
+
+       Valid bitmasks: \begin{itemize1}
+       \item    0x0001 -- INVOKE_ID_MASK
+       \item    0x0002 -- DATA_CODING_ SCHEME_MASK
+       \item    0x0004 -- NOTIFICATION_TEXT_ MASK
+       \item    0x0008 -- CLIENT_ADDRESS_ MASK
+       \item    0x0010 -- LOCATION_TYPE_ MASK
+       \item    0x0020 -- REQUESTOR_ID_MASK
+       \item    0x0040 -- CODEWORD_STRING_ MASK
+       \item    0x0080 -- SERVICE_TYPE_MASK
+       \item    0x0100 -- USER_RESP_TIMER_ MASK
+       \vspace{-0.18in} \end{itemize1}
+  */
+
+  uint8_t invokeId;
+  /**<   Supplementary Services invoke ID. */
+
+  qmiLocNiDataCodingSchemeEnumT_v02 dataCodingScheme;
+  /**<   Type of data encoding scheme for the text.
+ Applies to both the notification text and the client address.
+
+ Valid values: \n
+      - eQMI_LOC_NI_SS_GERMAN (12) --  Language is German
+      - eQMI_LOC_NI_SS_ENGLISH (13) --  Language is English
+      - eQMI_LOC_NI_SS_ITALIAN (14) --  Language is Italian
+      - eQMI_LOC_NI_SS_FRENCH (15) --  Language is French
+      - eQMI_LOC_NI_SS_SPANISH (16) --  Language is Spanish
+      - eQMI_LOC_NI_SS_DUTCH (17) --  Language is Dutch
+      - eQMI_LOC_NI_SS_SWEDISH (18) --  Language is Swedish
+      - eQMI_LOC_NI_SS_DANISH (19) --  Language is Danish
+      - eQMI_LOC_NI_SS_PORTUGUESE (20) --  Language is Portuguese
+      - eQMI_LOC_NI_SS_FINNISH (21) --  Language is Finnish
+      - eQMI_LOC_NI_SS_NORWEGIAN (22) --  Language is Norwegian
+      - eQMI_LOC_NI_SS_GREEK (23) --  Language is Greek
+      - eQMI_LOC_NI_SS_TURKISH (24) --  Language is Turkish
+      - eQMI_LOC_NI_SS_HUNGARIAN (25) --  Language is Hungarian
+      - eQMI_LOC_NI_SS_POLISH (26) --  Language is Polish
+      - eQMI_LOC_NI_SS_LANGUAGE_UNSPEC (27) --  Language is unspecified
+      - eQMI_LOC_NI_SUPL_UTF8 (28) --  Encoding is UTF 8
+      - eQMI_LOC_NI_SUPL_UCS2 (29) --  Encoding is UCS 2
+      - eQMI_LOC_NI_SUPL_GSM_DEFAULT (30) --  Encoding is GSM default
+ */
+
+  uint32_t notificationText_len;  /**< Must be set to # of elements in notificationText */
+  uint8_t notificationText[QMI_LOC_NI_MAX_CLIENT_NAME_LENGTH_V02];
+  /**<   Notification text; the encoding method is specified in
+       dataCodingScheme. \n
+       - Type: Array of bytes \n
+       - Maximum array length: 64 */
+
+  uint32_t clientAddress_len;  /**< Must be set to # of elements in clientAddress */
+  uint8_t clientAddress[QMI_LOC_NI_MAX_EXT_CLIENT_ADDRESS_V02];
+  /**<   Client address; the encoding method is specified in
+       dataCodingScheme. \n
+       - Maximum array length: 20 */
+
+  qmiLocNiLocationTypeEnumT_v02 locationType;
+  /**<   Location type.
+
+ Valid values: \n
+      - eQMI_LOC_NI_LOCATIONTYPE_CURRENT_LOCATION (1) --  Current location
+      - eQMI_LOC_NI_LOCATIONTYPE_CURRENT_OR_LAST_KNOWN_LOCATION (2) --  Last known location; may be the current location
+      - eQMI_LOC_NI_LOCATIONTYPE_INITIAL_LOCATION (3) --  Initial location
+ */
+
+  qmiLocNiUmtsCpCodedStringStructT_v02 requestorId;
+  /**<   Requestor ID; the encoding method is specified in the
+       qmiLocNiUmtsCpCodedStringStructT.dataCodingScheme field. */
+
+  qmiLocNiUmtsCpCodedStringStructT_v02 codewordString;
+  /**<   Codeword string; the encoding method is specified in the
+       qmiLocNiUmtsCpCodedStringStructT.dataCodingScheme field. */
+
+  uint8_t lcsServiceTypeId;
+  /**<   Service type ID. */
+
+  uint16_t userResponseTimer;
+  /**<   Time to wait for the user to respond. \n
+       - Units: Seconds */
+}qmiLocNiUmtsCpNotifyVerifyStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCNISERVICEINTERACTIONENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_NI_SERVICE_INTERACTION_ONGOING_NI_INCOMING_MO_V02 = 1, /**<  Service interaction between ongoing NI and incoming MO sessions.  */
+  QMILOCNISERVICEINTERACTIONENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocNiServiceInteractionEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocNiVxNotifyVerifyStructT_v02 niVxReq;
+  /**<   Ongoing NI session request; this information is currently not filled. */
+
+  qmiLocNiServiceInteractionEnumT_v02 serviceInteractionType;
+  /**<   Service interaction type specified in qmiLocNiServiceInteractionEnumT.
+
+ Valid values: \n
+      - eQMI_LOC_NI_SERVICE_INTERACTION_ONGOING_NI_INCOMING_MO (1) --  Service interaction between ongoing NI and incoming MO sessions.
+ */
+}qmiLocNiVxServiceInteractionStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+typedef uint16_t qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02;
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_WLAN_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0001) /**<  Denotes that WLAN measurements are allowed as part of location ID
+       and multiple location IDs in the SUPL_POS_INIT message.  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_GSM_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0002) /**<  Denotes that GSM measurements are allowed as part of location ID
+       and multiple location ID in the SUPL_POS_INIT message.  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_WCDMA_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0004) /**<  Denotes that WCDMA measurements are allowed as part of location ID
+       and multiple location ID in the SUPL_POS_INIT message.  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_CDMA_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0008) /**<  Denotes that CDMA measurements are allowed as part of location ID
+       and multiple location ID in the SUPL_POS_INIT message.  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_HRDP_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0010) /**<  Denotes that HRDP measurements are allowed as part of location ID
+       and multiple location ID in the SUPL_POS_INIT message.  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_UMB_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0020) /**<  Denotes that UMB measurements are allowed as part of location ID
+       and multiple location ID in the SUPL_POS_INIT message.  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_LTE_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0040) /**<  Denotes that LTE measurements are allowed as part of location ID
+       and multiple location ID in the SUPL_POS_INIT message.  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_WIMAX_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0080) /**<  Denotes that WIMAX measurements are allowed as part of location ID
+       and multiple location ID in the SUPL_POS_INIT message.  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_HISTORIC_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0100) /**<  Denotes that historical information is allowed as part of
+       multiple location ID in the SUPL_POS_INIT message.  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_NONSVRV_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0200) /**<  Denotes that information about nonserving cells is allowed
+       as part of multiple location ID in the SUPL_POS_INIT message.  */
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCNISUPLVER2EXTTRIGGERTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SUPL_VER_2_EXT_TRIGGER_TYPE_SINGLE_SHOT_V02 = -1, /**<  SUPL INIT message indicates a request for a single shot
+       triggered session  */
+  eQMI_LOC_SUPL_VER_2_EXT_TRIGGER_TYPE_PERIODIC_V02 = 0, /**<  SUPL INIT message indicates a request for a periodic
+       triggered session  */
+  eQMI_LOC_SUPL_VER_2_EXT_TRIGGER_TYPE_AREA_EVENT_V02 = 1, /**<  SUPL INIT message indicates a request for an area event
+       triggered session  */
+  QMILOCNISUPLVER2EXTTRIGGERTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocNiSuplVer2ExtTriggerTypeEnumT_v02;
+/**
+    @}
+  */
+
+typedef uint16_t qmiLocNiSuplVer2ExtGnssTypeMaskT_v02;
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_GNSS_GPS_V02 ((qmiLocNiSuplVer2ExtGnssTypeMaskT_v02)0x0001) /**<  GPS is allowed to be used as the positioning technology  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_GNSS_GLONASS_V02 ((qmiLocNiSuplVer2ExtGnssTypeMaskT_v02)0x0002) /**<  GLONASS is allowed to be used as the positioning technology  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_GNSS_GALILEO_V02 ((qmiLocNiSuplVer2ExtGnssTypeMaskT_v02)0x0004) /**<  Galileo is allowed to be used as the positioning technology  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_GNSS_SBAS_V02 ((qmiLocNiSuplVer2ExtGnssTypeMaskT_v02)0x0008) /**<  SBAS is allowed to be used as the positioning technology  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_GNSS_QZSS_V02 ((qmiLocNiSuplVer2ExtGnssTypeMaskT_v02)0x0010) /**<  QZSS is allowed to be used as the positioning technology  */
+#define QMI_LOC_SUPL_VER_2_EXT_MASK_GNSS_MODERN_GPS_V02 ((qmiLocNiSuplVer2ExtGnssTypeMaskT_v02)0x0020) /**<  Modern GPS is allowed to be used as the positioning technology  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02 supportedNetworksMask;
+  /**<   Specifies which type of network measurements are allowed to be sent as
+       part of the Location ID or Multiple Location IDs parameter in the
+       SUPL_POS_INIT message (see \hyperref[S4]{[S4]}).
+
+       Valid bitmasks: \begin{itemize1}
+       \item    0x0001 -- SUPPORTED_NETWORK_ WLAN
+       \item    0x0002 -- SUPPORTED_NETWORK_ GSM
+       \item    0x0004 -- SUPPORTED_NETWORK_ WCDMA
+       \item    0x0008 -- SUPPORTED_NETWORK_ CDMA
+       \item    0x0010 -- SUPPORTED_NETWORK_ HRDP
+       \item    0x0020 -- SUPPORTED_NETWORK_ UMB
+       \item    0x0040 -- SUPPORTED_NETWORK_ LTE
+       \item    0x0080 -- SUPPORTED_NETWORK_ WIMAX
+       \item    0x0100 -- SUPPORTED_NETWORK_ HISTORIC
+       \item    0x0200 -- SUPPORTED_NETWORK_ NONSVRV
+       \vspace{-0.18in} \end{itemize1}
+   */
+
+  qmiLocNiSuplVer2ExtTriggerTypeEnumT_v02 triggerType;
+  /**<   Specifies the type of session trigger requested in the
+ SUPL_POS_INIT message (refer to \hyperref[S4]{[S4]}).
+
+ Valid values: \n
+      - eQMI_LOC_SUPL_VER_2_EXT_TRIGGER_TYPE_SINGLE_SHOT (-1) --  SUPL INIT message indicates a request for a single shot
+       triggered session
+      - eQMI_LOC_SUPL_VER_2_EXT_TRIGGER_TYPE_PERIODIC (0) --  SUPL INIT message indicates a request for a periodic
+       triggered session
+      - eQMI_LOC_SUPL_VER_2_EXT_TRIGGER_TYPE_AREA_EVENT (1) --  SUPL INIT message indicates a request for an area event
+       triggered session
+ */
+
+  qmiLocNiSuplVer2ExtGnssTypeMaskT_v02 gnssType;
+  /**<   Specifies which GNSS technologies are allowed as positioning
+       technologies.
+
+       Valid bitmasks: \n
+        - 0x0001 -- GNSS_GPS \n
+        - 0x0002 -- GNSS_GLONASS \n
+        - 0x0004 -- GNSS_GALILEO \n
+        - 0x0008 -- GNSS_SBAS \n
+        - 0x0010 -- GNSS_QZSS \n
+        - 0x0020 -- GNSS_MODERN_GPS
+  */
+}qmiLocNiSuplVer2ExtStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  char eslpUrl[QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 + 1];
+  /**<   ESLP URL. \n
+       Maximum length: 255 bytes */
+}qmiLocEmergencyNotificationStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Indicates an NI Notify/Verify request to the control point. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Notification Type */
+  qmiLocNiNotifyVerifyEnumT_v02 notificationType;
+  /**<   Type of notification/verification performed.
+
+ Valid values: \n
+      - eQMI_LOC_NI_USER_NO_NOTIFY_NO_VERIFY (1) --  No notification and no verification required
+      - eQMI_LOC_NI_USER_NOTIFY_ONLY (2) --  Notify only; no verification required
+      - eQMI_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP (3) --  Notify and verify, but no response required.
+      - eQMI_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP (4) --  Notify and verify, and require a response
+      - eQMI_LOC_NI_USER_NOTIFY_VERIFY_PRIVACY_OVERRIDE (5) --  Notify and verify; privacy override
+ */
+
+  /* Optional */
+  /*  Network Initiated Vx Request */
+  uint8_t NiVxInd_valid;  /**< Must be set to true if NiVxInd is being passed */
+  qmiLocNiVxNotifyVerifyStructT_v02 NiVxInd;
+  /**<   \vspace{0.06in} \n Optional NI Vx request payload. */
+
+  /* Optional */
+  /*  Network Initiated SUPL Request */
+  uint8_t NiSuplInd_valid;  /**< Must be set to true if NiSuplInd is being passed */
+  qmiLocNiSuplNotifyVerifyStructT_v02 NiSuplInd;
+  /**<   \vspace{0.06in} \n Optional NI SUPL request payload. */
+
+  /* Optional */
+  /*  Network Initiated UMTS Control Plane Request */
+  uint8_t NiUmtsCpInd_valid;  /**< Must be set to true if NiUmtsCpInd is being passed */
+  qmiLocNiUmtsCpNotifyVerifyStructT_v02 NiUmtsCpInd;
+  /**<   \vspace{0.06in} \n Optional NI UMTS-CP request payload. */
+
+  /* Optional */
+  /*  Network Initiated Service Interaction Request */
+  uint8_t NiVxServiceInteractionInd_valid;  /**< Must be set to true if NiVxServiceInteractionInd is being passed */
+  qmiLocNiVxServiceInteractionStructT_v02 NiVxServiceInteractionInd;
+  /**<   \vspace{0.06in} \n Optional NI service interaction payload. */
+
+  /* Optional */
+  /*  Network Initiated SUPL Version 2 Extension */
+  uint8_t NiSuplVer2ExtInd_valid;  /**< Must be set to true if NiSuplVer2ExtInd is being passed */
+  qmiLocNiSuplVer2ExtStructT_v02 NiSuplVer2ExtInd;
+  /**<   \vspace{0.06in} \n Optional NI SUPL Version 2 Extension payload. When present,
+          this payload is to be used in conjunction with the SUPL
+          indication payload. */
+
+  /* Optional */
+  /*  SUPL Emergency Notification */
+  uint8_t suplEmergencyNotification_valid;  /**< Must be set to true if suplEmergencyNotification is being passed */
+  qmiLocEmergencyNotificationStructT_v02 suplEmergencyNotification;
+  /**<   \vspace{0.06in} \n This specifies that the corresponding NI notification is an
+        emergency notification. Emergency notification
+        can be given even without an Emergency SUPL Location Platform (ESLP)
+        address. */
+}qmiLocEventNiNotifyVerifyReqIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  char serverUrl[QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 + 1];
+  /**<   Assistance server URL.
+       \begin{itemize1}
+       \item    Type: NULL-terminated string
+       \item    Maximum string length (including NULL terminator): 256
+       \vspace{-0.18in} \end{itemize1} */
+}qmiLocAssistanceServerUrlStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t delayThreshold;
+  /**<   The time server is to be skipped if a one-way delay to the server
+       exceeds this threshold. \n
+       - Units: Milliseconds */
+
+  uint32_t timeServerList_len;  /**< Must be set to # of elements in timeServerList */
+  qmiLocAssistanceServerUrlStructT_v02 timeServerList[QMI_LOC_MAX_NTP_SERVERS_V02];
+  /**<   List of Time Server URL's that are recommended by the service for time
+       information, the list is ordered, the client is to use the first
+       server specified in the list as the primary URL to fetch NTP time,
+       the second one as secondary, and so on. \n
+       - Maximum server list items: 3 */
+}qmiLocTimeServerListStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Requests the control point to inject time information. */
+typedef struct {
+
+  /* Optional */
+  /*  Time Server Info */
+  uint8_t timeServerInfo_valid;  /**< Must be set to true if timeServerInfo is being passed */
+  qmiLocTimeServerListStructT_v02 timeServerInfo;
+  /**<   \vspace{0.06in} \n Contains information about the time servers recommended by the
+       location service for NTP time. */
+}qmiLocEventInjectTimeReqIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t maxFileSizeInBytes;
+  /**<   Maximum allowable predicted orbits file size (in bytes). */
+
+  uint32_t maxPartSize;
+  /**<   Maximum allowable predicted orbits file chunk size (in bytes). */
+}qmiLocPredictedOrbitsAllowedSizesStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t serverList_len;  /**< Must be set to # of elements in serverList */
+  qmiLocAssistanceServerUrlStructT_v02 serverList[QMI_LOC_MAX_PREDICTED_ORBITS_SERVERS_V02];
+  /**<   List of predicted orbits URLs. The list is ordered, so the client
+       must use the first server specified in the list as the primary URL
+       from which to download predicted orbits data, the second one as
+       secondary, and so on. \n
+       - Maximum number of servers that can be specified: 3 */
+}qmiLocPredictedOrbitsServerListStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Requests the control point to inject predicted orbits data. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Allowed Sizes */
+  qmiLocPredictedOrbitsAllowedSizesStructT_v02 allowedSizes;
+  /**<   \vspace{0.06in} \n Maximum part and file size allowed to be injected in the engine. */
+
+  /* Optional */
+  /*  Server List */
+  uint8_t serverList_valid;  /**< Must be set to true if serverList is being passed */
+  qmiLocPredictedOrbitsServerListStructT_v02 serverList;
+  /**<   \vspace{0.06in} \n List of servers that can be used by the client to download
+       predicted orbits data. */
+}qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Requests the control point to inject a position. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Latitude */
+  double latitude;
+  /**<   Latitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -90.0 to 90.0      \begin{itemize1}
+         \item    Positive values indicate northern latitude
+         \item    Negative values indicate southern latitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  /* Mandatory */
+  /*  Longitude */
+  double longitude;
+  /**<   Longitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -180.0 to 180.0     \begin{itemize1}
+         \item    Positive values indicate eastern longitude
+         \item    Negative values indicate western longitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  /* Mandatory */
+  /*  Circular Horizontal Uncertainty */
+  float horUncCircular;
+  /**<   Horizontal position uncertainty (circular).\n
+       - Units: Meters */
+
+  /* Mandatory */
+  /*  UTC Timestamp */
+  uint64_t timestampUtc;
+  /**<   UTC timestamp.
+       \begin{itemize1}
+       \item    Units: Milliseconds since Jan. 1, 1970
+       \vspace{-0.18in} \end{itemize1} */
+}qmiLocEventInjectPositionReqIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCENGINESTATEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_ENGINE_STATE_ON_V02 = 1, /**<  Location engine is on  */
+  eQMI_LOC_ENGINE_STATE_OFF_V02 = 2, /**<  Location engine is off  */
+  QMILOCENGINESTATEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocEngineStateEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sends the engine state to the control point. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Engine State */
+  qmiLocEngineStateEnumT_v02 engineState;
+  /**<   Location engine state.
+
+ Valid values: \n
+      - eQMI_LOC_ENGINE_STATE_ON (1) --  Location engine is on
+      - eQMI_LOC_ENGINE_STATE_OFF (2) --  Location engine is off
+ */
+}qmiLocEventEngineStateIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCFIXSESSIONSTATEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_FIX_SESSION_STARTED_V02 = 1, /**<  Location fix session has started  */
+  eQMI_LOC_FIX_SESSION_FINISHED_V02 = 2, /**<  Location fix session has ended  */
+  QMILOCFIXSESSIONSTATEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocFixSessionStateEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sends the fix session state to the control point. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Session State */
+  qmiLocFixSessionStateEnumT_v02 sessionState;
+  /**<   LOC fix session state.
+
+ Valid values: \n
+      - eQMI_LOC_FIX_SESSION_STARTED (1) --  Location fix session has started
+      - eQMI_LOC_FIX_SESSION_FINISHED (2) --  Location fix session has ended
+ */
+
+  /* Optional */
+  /*  Session ID */
+  uint8_t sessionId_valid;  /**< Must be set to true if sessionId is being passed */
+  uint8_t sessionId;
+  /**<   ID of the session that was specified in the Start request.
+    This may not be specified for a fix session corresponding to
+    a network-initiated request. \n
+    - Range: 0 to 255 */
+}qmiLocEventFixSessionStateIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCWIFIREQUESTENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_WIFI_START_PERIODIC_HI_FREQ_FIXES_V02 = 0, /**<  Start periodic fixes with high frequency  */
+  eQMI_LOC_WIFI_START_PERIODIC_KEEP_WARM_V02 = 1, /**<  Keep warm for low frequency fixes without data downloads  */
+  eQMI_LOC_WIFI_STOP_PERIODIC_FIXES_V02 = 2, /**<  Stop periodic fixes request  */
+  QMILOCWIFIREQUESTENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocWifiRequestEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sends a Wi-Fi request to the control point. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Request Type */
+  qmiLocWifiRequestEnumT_v02 requestType;
+  /**<   Request type.
+
+ Valid values: \n
+      - eQMI_LOC_WIFI_START_PERIODIC_HI_FREQ_FIXES (0) --  Start periodic fixes with high frequency
+      - eQMI_LOC_WIFI_START_PERIODIC_KEEP_WARM (1) --  Keep warm for low frequency fixes without data downloads
+      - eQMI_LOC_WIFI_STOP_PERIODIC_FIXES (2) --  Stop periodic fixes request
+ */
+
+  /* Optional */
+  /*  Time Between Fixes */
+  uint8_t tbfInMs_valid;  /**< Must be set to true if tbfInMs is being passed */
+  uint16_t tbfInMs;
+  /**<   Time between fixes for a periodic request.\n
+        - Units: Milliseconds */
+}qmiLocEventWifiReqIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint16_t samplesPerBatch;
+  /**<   Specifies the number of samples per batch the GNSS location engine is to
+       receive. The sensor sampling frequency can be computed as follows: \vspace{-0.06in} \n
+
+       samplingFrequency = samplesPerBatch * batchesPerSecond  \vspace{-0.06in} \n
+
+       samplesPerBatch must be a nonzero positive value.
+  */
+
+  uint16_t batchesPerSecond;
+  /**<   Number of sensor-data batches the GNSS location engine is to receive
+       per second. The rate is specified in an integral number of batches per
+       second (Hz).  \vspace{-0.06in} \n
+
+       batchesPerSecond must be a nonzero positive value.
+  */
+}qmiLocSensorControlConfigSamplingSpecStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint8_t injectEnable;
+  /**<   Indicates whether the GNSS location engine is ready to accept data from this
+       sensor.
+
+       Valid values: \begin{itemize1}
+       \item    0x01 (TRUE)  -- GNSS location engine is ready to accept sensor
+                                data
+       \item    0x00 (FALSE) -- GNSS location engine is not ready to accept
+                                sensor data
+        \vspace{-0.18in} \end{itemize1}
+  */
+
+  qmiLocSensorControlConfigSamplingSpecStructT_v02 dataFrequency;
+  /**<   Rate at which the GNSS engine would like the sensor to be sampled. \n
+       The rate is specified in integral number of samples per second (Hz)\n
+       and batches per second.
+  */
+}qmiLocSensorReadyStatusStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Notifies the control point if the GNSS location engine is
+                    ready to accept sensor data. */
+typedef struct {
+
+  /* Optional */
+  /*  Accelerometer Accept Ready */
+  uint8_t accelReady_valid;  /**< Must be set to true if accelReady is being passed */
+  qmiLocSensorReadyStatusStructT_v02 accelReady;
+  /**<   \vspace{0.06in} \n Indicates whether the GNSS location engine is ready
+         to accept accelerometer sensor data.
+   */
+
+  /* Optional */
+  /*  Gyroscope Accept Ready */
+  uint8_t gyroReady_valid;  /**< Must be set to true if gyroReady is being passed */
+  qmiLocSensorReadyStatusStructT_v02 gyroReady;
+  /**<   \vspace{0.06in} \n Indicates whether the GNSS location engine is ready
+         to accept gyroscope sensor data.
+   */
+
+  /* Optional */
+  /*  Accelerometer Temperature Accept Ready */
+  uint8_t accelTemperatureReady_valid;  /**< Must be set to true if accelTemperatureReady is being passed */
+  qmiLocSensorReadyStatusStructT_v02 accelTemperatureReady;
+  /**<   \vspace{0.06in} \n Indicates whether the GNSS location engine is ready
+        to accept accelerometer temperature data.
+   */
+
+  /* Optional */
+  /*  Gyroscope Temperature Accept Ready */
+  uint8_t gyroTemperatureReady_valid;  /**< Must be set to true if gyroTemperatureReady is being passed */
+  qmiLocSensorReadyStatusStructT_v02 gyroTemperatureReady;
+  /**<   \vspace{0.06in} \n Indicates whether the GNSS location engine is ready
+         to accept gyroscope temperature data.
+   */
+
+  /* Optional */
+  /*  Calibrated Magnetometer Accept Ready */
+  uint8_t calibratedMagReady_valid;  /**< Must be set to true if calibratedMagReady is being passed */
+  qmiLocSensorReadyStatusStructT_v02 calibratedMagReady;
+  /**<   \vspace{0.06in} \n Indicates whether the GNSS location engine is ready
+         to accept calibrated magnetometer data.
+   */
+
+  /* Optional */
+  /*  Uncalibrated Magnetometer Accept Ready */
+  uint8_t uncalibratedMagReady_valid;  /**< Must be set to true if uncalibratedMagReady is being passed */
+  qmiLocSensorReadyStatusStructT_v02 uncalibratedMagReady;
+  /**<   \vspace{0.06in} \n Indicates whether the GNSS location engine is ready
+         to accept uncalibrated magnetometer data.
+   */
+}qmiLocEventSensorStreamingReadyStatusIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Notifies the control point to inject time synchronization
+                    data. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Opaque Time Sync Reference Counter */
+  uint32_t refCounter;
+  /**<   This TLV is sent to registered control points. It is sent by
+        the location engine when it needs to synchronize location engine and
+        control point (sensor processor) times.
+        This TLV must be echoed back in the Time Sync Inject request. */
+}qmiLocEventTimeSyncReqIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Requests the control point to enable Stationary Position
+                    Indicator (SPI) streaming reports. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Enable/Disable SPI Requests */
+  uint8_t enable;
+  /**<   Indicates whether the client is to start or stop sending an SPI status stream.
+       \begin{itemize1}
+       \item    0x01 (TRUE)  -- Client is to start sending an SPI status stream
+       \item    0x00 (FALSE) -- Client is to stop sending an SPI status stream
+       \vspace{-0.18in} \end{itemize1}*/
+}qmiLocEventSetSpiStreamingReportIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCWWANTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_WWAN_TYPE_INTERNET_V02 = 0, /**<  Bring up the WWAN type used for an Internet connection  */
+  eQMI_LOC_WWAN_TYPE_AGNSS_V02 = 1, /**<  Bring up the WWAN type used for AGNSS connections  */
+  eQMI_LOC_WWAN_TYPE_AGNSS_EMERGENCY_V02 = 2, /**<  Bring up the WWAN type used for AGNSS Emergency connections  */
+  QMILOCWWANTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocWWANTypeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSERVERREQUESTENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SERVER_REQUEST_OPEN_V02 = 1, /**<  Open a connection to the location server  */
+  eQMI_LOC_SERVER_REQUEST_CLOSE_V02 = 2, /**<  Close a connection to the location server  */
+  QMILOCSERVERREQUESTENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocServerRequestEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Requests the client to open or close a connection
+                    to the assisted GPS location server. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Connection Handle */
+  uint32_t connHandle;
+  /**<   Identifies a connection across Open and Close request events. */
+
+  /* Mandatory */
+  /*  Request Type */
+  qmiLocServerRequestEnumT_v02 requestType;
+  /**<   Open or close a connection to the location server.
+
+ Valid values: \n
+      - eQMI_LOC_SERVER_REQUEST_OPEN (1) --  Open a connection to the location server
+      - eQMI_LOC_SERVER_REQUEST_CLOSE (2) --  Close a connection to the location server
+ */
+
+  /* Mandatory */
+  /*  WWAN Type */
+  qmiLocWWANTypeEnumT_v02 wwanType;
+  /**<   Identifies the WWAN type for this request.
+ Valid values: \n
+      - eQMI_LOC_WWAN_TYPE_INTERNET (0) --  Bring up the WWAN type used for an Internet connection
+      - eQMI_LOC_WWAN_TYPE_AGNSS (1) --  Bring up the WWAN type used for AGNSS connections
+      - eQMI_LOC_WWAN_TYPE_AGNSS_EMERGENCY (2) --  Bring up the WWAN type used for AGNSS Emergency connections
+ */
+}qmiLocEventLocationServerConnectionReqIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCNIGEOFENCEOPERATIONENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_NI_GEOFENCE_ADDED_V02 = 1, /**<  An NI Geofence was added  */
+  eQMI_LOC_NI_GEOFENCE_DELETED_V02 = 2, /**<  An NI Geofence was deleted  */
+  eQMI_LOC_NI_GEOFENCE_EDITED_V02 = 3, /**<  An NI Geofence was edited; the control point can query the
+       Geofence to find the its current state  */
+  QMILOCNIGEOFENCEOPERATIONENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocNiGeofenceOperationEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Informs the control point about
+                    network-initiated Geofences. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Geofence ID */
+  uint32_t geofenceId;
+  /**<   ID of the Geofence for which this
+       notification was generated. */
+
+  /* Mandatory */
+  /*  Operation Type */
+  qmiLocNiGeofenceOperationEnumT_v02 operationType;
+  /**<   Operation for which this notification was generated.
+
+ Valid values: \n
+      - eQMI_LOC_NI_GEOFENCE_ADDED (1) --  An NI Geofence was added
+      - eQMI_LOC_NI_GEOFENCE_DELETED (2) --  An NI Geofence was deleted
+      - eQMI_LOC_NI_GEOFENCE_EDITED (3) --  An NI Geofence was edited; the control point can query the
+       Geofence to find the its current state
+ */
+}qmiLocEventNiGeofenceNotificationIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGEOFENCEGENALERTENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GEOFENCE_GEN_ALERT_GNSS_UNAVAILABLE_V02 = 1, /**<  GNSS is unavailable and GNSS position fixes
+       cannot be used to monitor Geofences  */
+  eQMI_LOC_GEOFENCE_GEN_ALERT_GNSS_AVAILABLE_V02 = 2, /**<  GNSS is now available and GNSS postion fixes can
+       be used to monitor Geofences  */
+  eQMI_LOC_GEOFENCE_GEN_ALERT_OOS_V02 = 3, /**<  The engine is out of service and no cell ID coverage
+       information is available  */
+  eQMI_LOC_GEOFENCE_GEN_ALERT_TIME_INVALID_V02 = 4, /**<  The engine has an invalid time  */
+  QMILOCGEOFENCEGENALERTENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGeofenceGenAlertEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Notifies the control point of the
+                    Geofence status. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Geofence General Alert */
+  qmiLocGeofenceGenAlertEnumT_v02 geofenceAlert;
+  /**<   Specifies the Geofence general alert type.
+
+ Valid values: \n
+      - eQMI_LOC_GEOFENCE_GEN_ALERT_GNSS_UNAVAILABLE (1) --  GNSS is unavailable and GNSS position fixes
+       cannot be used to monitor Geofences
+      - eQMI_LOC_GEOFENCE_GEN_ALERT_GNSS_AVAILABLE (2) --  GNSS is now available and GNSS postion fixes can
+       be used to monitor Geofences
+      - eQMI_LOC_GEOFENCE_GEN_ALERT_OOS (3) --  The engine is out of service and no cell ID coverage
+       information is available
+      - eQMI_LOC_GEOFENCE_GEN_ALERT_TIME_INVALID (4) --  The engine has an invalid time
+ */
+}qmiLocEventGeofenceGenAlertIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGEOFENCEBREACHTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GEOFENCE_BREACH_TYPE_ENTERING_V02 = 1, /**<  Denotes that a client entered the Geofence  */
+  eQMI_LOC_GEOFENCE_BREACH_TYPE_LEAVING_V02 = 2, /**<  Denotes that a client left the Geofence  */
+  QMILOCGEOFENCEBREACHTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGeofenceBreachTypeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  /*  UTC Timestamp */
+  uint64_t timestampUtc;
+  /**<   UTC timestamp.
+       \begin{itemize1}
+       \item    Units: Milliseconds since Jan. 1, 1970
+       \vspace{-0.18in} \end{itemize1} */
+
+  /*  Latitude */
+  double latitude;
+  /**<   Latitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -90.0 to 90.0       \begin{itemize1}
+         \item    Positive values indicate northern latitude
+         \item    Negative values indicate southern latitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  /*   Longitude */
+  double longitude;
+  /**<   Longitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -180.0 to 180.0     \begin{itemize1}
+         \item    Positive values indicate eastern longitude
+         \item    Negative values indicate western longitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  /*  Horizontal Elliptical Uncertainty (Semi-Minor Axis) */
+  float horUncEllipseSemiMinor;
+  /**<   Semi-minor axis of horizontal elliptical uncertainty.\n
+       - Units: Meters */
+
+  /*  Horizontal Elliptical Uncertainty (Semi-Major Axis) */
+  float horUncEllipseSemiMajor;
+  /**<   Semi-major axis of horizontal elliptical uncertainty.\n
+       - Units: Meters */
+
+  /*  Elliptical Horizontal Uncertainty Azimuth */
+  float horUncEllipseOrientAzimuth;
+  /**<   Elliptical horizontal uncertainty azimuth of orientation.\n
+       - Units: Decimal degrees \n
+       - Range: 0 to 180 */
+
+  /*  Horizontal Speed validity bit */
+  uint8_t speedHorizontal_valid;
+  /**<   Indicates whether the Horizontal speed field contains valid
+       information.
+       \begin{itemize1}
+       \item    0x01 (TRUE)  --  Horizontal speed is valid
+       \item    0x00 (FALSE) --  Horizontal speed is invalid
+                                 and is to be ignored
+       \vspace{-0.18in} \end{itemize1} */
+
+  /*  Horizontal Speed */
+  float speedHorizontal;
+  /**<   Horizontal speed.\n
+       - Units: Meters/second */
+
+  /*  Altitude validity bit */
+  uint8_t altitudeWrtEllipsoid_valid;
+  /**<   Indicates whether the altitude field contains valid
+       information.
+       \begin{itemize1}
+       \item    0x01 (TRUE)  --  Altitude field is valid
+       \item    0x00 (FALSE) --  Altitude field is invalid
+                                 and is to be ignored
+       \vspace{-0.18in} \end{itemize1}
+       */
+
+  /*  Altitude With Respect to Ellipsoid */
+  float altitudeWrtEllipsoid;
+  /**<   Altitude with respect to the WGS84 ellipsoid.\n
+       - Units: Meters \n
+       - Range: -500 to 15883 */
+
+  /*  Vertical Uncertainty validity bit */
+  uint8_t vertUnc_valid;
+  /**<   Indicates whether the Vertical Uncertainty field contains valid
+       information.
+       \begin{itemize1}
+       \item    0x01 (TRUE)  --  Vertical Uncertainty field is valid
+       \item    0x00 (FALSE) --  Vertical Uncertainty field is invalid
+                                 and is to be ignored
+       \vspace{-0.18in} \end{itemize1} */
+
+  /*  Vertical Uncertainty */
+  float vertUnc;
+  /**<   Vertical uncertainty.\n
+       - Units: Meters */
+
+  /*  Vertical Speed validity bit */
+  uint8_t speedVertical_valid;
+  /**<   Indicates whether the Vertical Speed field contains valid
+       information.
+       \begin{itemize1}
+       \item    0x01 (TRUE)  --  Vertical Speed field is valid
+       \item    0x00 (FALSE) --  Vertical Speed field is invalid
+                                 and is to be ignored
+       \vspace{-0.18in} \end{itemize1} */
+
+  /*  Vertical Speed */
+  float speedVertical;
+  /**<   Vertical speed.\n
+       - Units: Meters/second */
+
+  /*  heading validity bit */
+  uint8_t heading_valid;
+  /**<   Indicates whether the Heading field contains valid
+       information.
+       \begin{itemize1}
+       \item    0x01 (TRUE)  --  Heading field is valid
+       \item    0x00 (FALSE) --  Heading field is invalid
+                                 and is to be ignored
+       \vspace{-0.18in} \end{itemize1} */
+
+  /*  Heading */
+  float heading;
+  /**<   Heading.\n
+        - Units: Degrees \n
+        - Range: 0 to 359.999  */
+}qmiLocGeofencePositionStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGEOFENCECONFIDENCEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GEOFENCE_CONFIDENCE_LOW_V02 = 0x01, /**<  Geofence engine indicates a breach with
+       low confidence; this setting results in lower
+       power usage, and it can impact the yield because
+       incorrect breach events may be sent  */
+  eQMI_LOC_GEOFENCE_CONFIDENCE_MED_V02 = 0x02, /**<  (Default) Geofence engine indicates a breach with
+       medium confidence  */
+  eQMI_LOC_GEOFENCE_CONFIDENCE_HIGH_V02 = 0x03, /**<  Geofence engine indicates a breach with
+       high confidence; this setting results in higher
+       power usage  */
+  QMILOCGEOFENCECONFIDENCEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGeofenceConfidenceEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Notifies the control point of
+                    a Geofence breach event. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Geofence ID */
+  uint32_t geofenceId;
+  /**<   ID of the Geofence for which this
+       notification was generated. */
+
+  /* Mandatory */
+  /*  Geofence Breach Type */
+  qmiLocGeofenceBreachTypeEnumT_v02 breachType;
+  /**<   The type of breach that generated this event.
+
+ Valid values: \n
+      - eQMI_LOC_GEOFENCE_BREACH_TYPE_ENTERING (1) --  Denotes that a client entered the Geofence
+      - eQMI_LOC_GEOFENCE_BREACH_TYPE_LEAVING (2) --  Denotes that a client left the Geofence
+ */
+
+  /* Optional */
+  /*  Geofence Position */
+  uint8_t geofencePosition_valid;  /**< Must be set to true if geofencePosition is being passed */
+  qmiLocGeofencePositionStructT_v02 geofencePosition;
+  /**<   \vspace{0.06in} \n Position of the client when it breached the Geofence.
+       This TLV is included if the client configures the
+       Geofence to report position. The position is reported
+       at the same confidence level that was specified in the
+       Add Circular Geofence request. */
+
+  /* Optional */
+  /*  Geofence Breach Confidence */
+  uint8_t breachConfidence_valid;  /**< Must be set to true if breachConfidence is being passed */
+  qmiLocGeofenceConfidenceEnumT_v02 breachConfidence;
+  /**<   \vspace{0.06in} \n
+ Given a breach event, the confidence determines the probability
+ that the breach happened at the Geofence boundary.
+ Valid values: \n
+      - eQMI_LOC_GEOFENCE_CONFIDENCE_LOW (0x01) --  Geofence engine indicates a breach with
+       low confidence; this setting results in lower
+       power usage, and it can impact the yield because
+       incorrect breach events may be sent
+      - eQMI_LOC_GEOFENCE_CONFIDENCE_MED (0x02) --  (Default) Geofence engine indicates a breach with
+       medium confidence
+      - eQMI_LOC_GEOFENCE_CONFIDENCE_HIGH (0x03) --  Geofence engine indicates a breach with
+       high confidence; this setting results in higher
+       power usage
+ */
+}qmiLocEventGeofenceBreachIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Recommends how pedometer reports are to be
+                    sent to the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Request Pedometer Data */
+  uint8_t requestPedometerData;
+  /**<   Indicates whether the GNSS location engine is requesting the client to
+          send pedometer data.
+       \begin{itemize1}
+       \item    0x01 (TRUE)  -- GNSS location engine is requesting
+                                pedometer data
+       \item    0x00 (FALSE) -- GNSS location engine is not requesting
+                                pedometer data
+       \vspace{-0.18in} \end{itemize1}
+  */
+
+  /* Optional */
+  /*  Reset Step Count */
+  uint8_t resetStepCount_valid;  /**< Must be set to true if resetStepCount is being passed */
+  uint8_t resetStepCount;
+  /**<   Indicates whether the location engine is to reset the step count.
+       \begin{itemize1}
+       \item    0x01 (TRUE)  -- Pedometer step count is to be reset
+       \item    0x00 (FALSE) -- Pedometer step count is not to be reset
+       \vspace{-0.18in} \end{itemize1} */
+
+  /* Optional */
+  /*  Step Count Threshold */
+  uint8_t stepCountThreshold_valid;  /**< Must be set to true if stepCountThreshold is being passed */
+  uint32_t stepCountThreshold;
+  /**<   Specifies the number of steps to be sampled in a pedometer report,
+       as recommended by the the location engine. If the threshold is set to 0,
+       the location engine wants a pedometer report at every step event.
+  */
+}qmiLocEventPedometerControlIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Recommends how motion data reports are to be
+                    sent to the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Request Motion Data */
+  uint8_t requestMotionData;
+  /**<   Indicates whether the GNSS location engine is requesting
+       the client to send motion data.
+       \begin{itemize1}
+       \item    0x01 (TRUE)  -- GNSS location engine is requesting
+                                motion data
+       \item    0x00 (FALSE) -- GNSS location engine is not requesting
+                                motion data
+       \vspace{-0.18in} \end{itemize1}
+  */
+}qmiLocEventMotionDataControlIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  /*  Low Geofence ID */
+  uint32_t idLow;
+  /**<   Contains the starting ID of the Geofence in the range of the continuous
+       range of Geofences that were breached at the same position. */
+
+  /*  High Geofence ID */
+  uint32_t idHigh;
+  /**<   Contains the ending ID of the Geofence in the range of the continuous
+         range of Geofences that were breached at the same position. */
+}qmiLocGeofenceIdContinuousStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Notifies the control point of a Geofence breach event by
+                    batching all the Geofences that were breached. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Geofence Breach Type */
+  qmiLocGeofenceBreachTypeEnumT_v02 breachType;
+  /**<   Type of breach that generated this event.
+
+ Valid values: \n
+      - eQMI_LOC_GEOFENCE_BREACH_TYPE_ENTERING (1) --  Denotes that a client entered the Geofence
+      - eQMI_LOC_GEOFENCE_BREACH_TYPE_LEAVING (2) --  Denotes that a client left the Geofence
+ */
+
+  /* Optional */
+  /*  Geofence ID Continuous */
+  uint8_t geofenceIdContinuousList_valid;  /**< Must be set to true if geofenceIdContinuousList is being passed */
+  uint32_t geofenceIdContinuousList_len;  /**< Must be set to # of elements in geofenceIdContinuousList */
+  qmiLocGeofenceIdContinuousStructT_v02 geofenceIdContinuousList[QMI_LOC_MAX_GEOFENCE_ID_CONTINUOUS_LIST_LENGTH_V02];
+  /**<   \vspace{0.06in} \n Each entry in the list contains the continuous range of Geofence IDs that were breached
+      at the same position. This list does not overlap with the discrete Geofence ID list. */
+
+  /* Optional */
+  /*  Geofence ID Discrete */
+  uint8_t geofenceIdDiscreteList_valid;  /**< Must be set to true if geofenceIdDiscreteList is being passed */
+  uint32_t geofenceIdDiscreteList_len;  /**< Must be set to # of elements in geofenceIdDiscreteList */
+  uint32_t geofenceIdDiscreteList[QMI_LOC_MAX_GEOFENCE_ID_DISCRETE_LIST_LENGTH_V02];
+  /**<   This list contains the Geofence IDs that were breached at the same position.
+       This list does not overlap with the continuous Geofence ID list. */
+
+  /* Optional */
+  /*  Geofence Position */
+  uint8_t geofencePosition_valid;  /**< Must be set to true if geofencePosition is being passed */
+  qmiLocGeofencePositionStructT_v02 geofencePosition;
+  /**<   \vspace{0.06in} \n Position of the client when it breached the Geofence.
+       This TLV is included if the client configures the
+       Geofence to report its position. The position is reported
+       at the same confidence level that was specified in the
+       Add Circular Geofence request. */
+
+  /* Optional */
+  /*  Geofence Breach Confidence */
+  uint8_t breachConfidence_valid;  /**< Must be set to true if breachConfidence is being passed */
+  qmiLocGeofenceConfidenceEnumT_v02 breachConfidence;
+  /**<   \vspace{0.06in} \n
+ Given a breach event, the confidence determines the probability
+ that the breach happened at the Geofence boundary.
+ Valid values: \n
+      - eQMI_LOC_GEOFENCE_CONFIDENCE_LOW (0x01) --  Geofence engine indicates a breach with
+       low confidence; this setting results in lower
+       power usage, and it can impact the yield because
+       incorrect breach events may be sent
+      - eQMI_LOC_GEOFENCE_CONFIDENCE_MED (0x02) --  (Default) Geofence engine indicates a breach with
+       medium confidence
+      - eQMI_LOC_GEOFENCE_CONFIDENCE_HIGH (0x03) --  Geofence engine indicates a breach with
+       high confidence; this setting results in higher
+       power usage
+ */
+
+  /* Optional */
+  /*  Heading Uncertainty */
+  uint8_t headingUnc_valid;  /**< Must be set to true if headingUnc is being passed */
+  float headingUnc;
+  /**<   Heading uncertainty.\n
+       - Units: Degrees \n
+       - Range: 0 to 359.999 */
+
+  /* Optional */
+  /*  Vertical Uncertainty */
+  uint8_t vertUnc_valid;  /**< Must be set to true if vertUnc is being passed */
+  float vertUnc;
+  /**<   Vertical uncertainty.\n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Speed Uncertainty */
+  uint8_t speedUnc_valid;  /**< Must be set to true if speedUnc is being passed */
+  float speedUnc;
+  /**<   3-D speed uncertainty.\n
+       - Units: Meters/second */
+
+  /* Optional */
+  /*  Horizontal Confidence */
+  uint8_t horConfidence_valid;  /**< Must be set to true if horConfidence is being passed */
+  uint8_t horConfidence;
+  /**<   Horizontal uncertainty confidence.\n
+       - Units: Percent \n
+       - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Vertical Confidence */
+  uint8_t vertConfidence_valid;  /**< Must be set to true if vertConfidence is being passed */
+  uint8_t vertConfidence;
+  /**<   Vertical uncertainty confidence.\n
+       - Units: Percent \n
+       - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Dilution of Precision */
+  uint8_t DOP_valid;  /**< Must be set to true if DOP is being passed */
+  qmiLocDOPStructT_v02 DOP;
+  /**<   \vspace{0.06in} \n Dilution of precision associated with this position. */
+
+  /* Optional */
+  /*  SVs Used to Calculate the Fix */
+  uint8_t gnssSvUsedList_valid;  /**< Must be set to true if gnssSvUsedList is being passed */
+  uint32_t gnssSvUsedList_len;  /**< Must be set to # of elements in gnssSvUsedList */
+  uint16_t gnssSvUsedList[QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02];
+  /**<   Each entry in the list contains the SV ID of a satellite
+      used for calculating this position report. The following
+      information is associated with each SV ID: \n
+         Range:    \n
+         - For GPS:     1 to 32 \n
+         - For SBAS:    33 to 64 \n
+         - For GLONASS: 65 to 96 \n
+         - For QZSS:    193 to 197 \n
+         - For BDS:     201 to 237
+        */
+}qmiLocEventGeofenceBatchedBreachIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGEOFENCEPROXIMITYTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GEOFENCE_PROXIMITY_TYPE_IN_V02 = 1, /**<  Denotes that a client is in proximity of the Geofence \n  */
+  eQMI_LOC_GEOFENCE_PROXIMITY_TYPE_OUT_V02 = 2, /**<  Denotes that a client is out of proximity of the Geofence  */
+  QMILOCGEOFENCEPROXIMITYTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGeofenceProximityTypeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Notifies the control point of a Geofence proximity event. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Geofence Breach Type */
+  qmiLocGeofenceProximityTypeEnumT_v02 proximityType;
+  /**<   Valid values: \n
+      - eQMI_LOC_GEOFENCE_PROXIMITY_TYPE_IN (1) --  Denotes that a client is in proximity of the Geofence \n
+      - eQMI_LOC_GEOFENCE_PROXIMITY_TYPE_OUT (2) --  Denotes that a client is out of proximity of the Geofence
+ */
+
+  /* Mandatory */
+  /*  Geofence ID */
+  uint32_t geofenceId;
+  /**<   Identifier of the Geofence that is in proximity to the handset.
+  */
+
+  /* Optional */
+  /*  Geofence Context ID */
+  uint8_t contextId_valid;  /**< Must be set to true if contextId is being passed */
+  uint32_t contextId;
+  /**<    Identifier for the context of the Geofence to which the handset is in proximity.
+        A single Geofence may be associated with different contexts.
+  */
+}qmiLocEventGeofenceProximityIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGEOFENCEDWELLTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GEOFENCE_DWELL_TYPE_INSIDE_V02 = 1, /**<  Denotes that a client dwelled inside the Geofence  */
+  eQMI_LOC_GEOFENCE_DWELL_TYPE_OUTSIDE_V02 = 2, /**<  Denotes that a client dwelled outside of Geofence  */
+  QMILOCGEOFENCEDWELLTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGeofenceDwellTypeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Notifies the control point of a Geofence dwell event by
+                    batching all the Geofences that were dwelled in. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Geofence Dwell Type */
+  qmiLocGeofenceDwellTypeEnumT_v02 dwellType;
+  /**<   Type of breach that generated this event.
+
+ Valid values: \n
+      - eQMI_LOC_GEOFENCE_DWELL_TYPE_INSIDE (1) --  Denotes that a client dwelled inside the Geofence
+      - eQMI_LOC_GEOFENCE_DWELL_TYPE_OUTSIDE (2) --  Denotes that a client dwelled outside of Geofence
+ */
+
+  /* Optional */
+  /*  Geofence ID Continuous */
+  uint8_t geofenceIdContinuousList_valid;  /**< Must be set to true if geofenceIdContinuousList is being passed */
+  uint32_t geofenceIdContinuousList_len;  /**< Must be set to # of elements in geofenceIdContinuousList */
+  qmiLocGeofenceIdContinuousStructT_v02 geofenceIdContinuousList[QMI_LOC_MAX_GEOFENCE_ID_CONTINUOUS_LIST_LENGTH_V02];
+  /**<   Each entry in the list contains the continuous range of Geofence IDs that were dwelled.
+       This list does not overlap with the discrete Geofence ID list. */
+
+  /* Optional */
+  /*  Geofence ID Discrete */
+  uint8_t geofenceIdDiscreteList_valid;  /**< Must be set to true if geofenceIdDiscreteList is being passed */
+  uint32_t geofenceIdDiscreteList_len;  /**< Must be set to # of elements in geofenceIdDiscreteList */
+  uint32_t geofenceIdDiscreteList[QMI_LOC_MAX_GEOFENCE_ID_DISCRETE_LIST_LENGTH_V02];
+  /**<   This list contains the Geofence IDs that were dwelled.
+       This list does not overlap with the continuous Geofence ID list. */
+
+  /* Optional */
+  /*  Geofence Position */
+  uint8_t geofencePosition_valid;  /**< Must be set to true if geofencePosition is being passed */
+  qmiLocGeofencePositionStructT_v02 geofencePosition;
+  /**<   The latest position calculated by the geofence engine when
+       the dwell notification is sent. */
+
+  /* Optional */
+  /*  Heading Uncertainty */
+  uint8_t headingUnc_valid;  /**< Must be set to true if headingUnc is being passed */
+  float headingUnc;
+  /**<   Heading uncertainty.\n
+       - Units: Degrees \n
+       - Range: 0 to 359.999 */
+
+  /* Optional */
+  /*  Vertical Uncertainty */
+  uint8_t vertUnc_valid;  /**< Must be set to true if vertUnc is being passed */
+  float vertUnc;
+  /**<   Vertical uncertainty.\n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Speed Uncertainty */
+  uint8_t speedUnc_valid;  /**< Must be set to true if speedUnc is being passed */
+  float speedUnc;
+  /**<   3-D speed uncertainty.\n
+       - Units: Meters/second */
+
+  /* Optional */
+  /*  Horizontal Confidence */
+  uint8_t horConfidence_valid;  /**< Must be set to true if horConfidence is being passed */
+  uint8_t horConfidence;
+  /**<   Horizontal uncertainty confidence.\n
+       - Units: Percent \n
+       - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Vertical Confidence */
+  uint8_t vertConfidence_valid;  /**< Must be set to true if vertConfidence is being passed */
+  uint8_t vertConfidence;
+  /**<   Vertical uncertainty confidence.\n
+       - Units: Percent \n
+       - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Dilution of Precision */
+  uint8_t DOP_valid;  /**< Must be set to true if DOP is being passed */
+  qmiLocDOPStructT_v02 DOP;
+  /**<   \vspace{0.06in} \n Dilution of precision associated with this position. */
+
+  /* Optional */
+  /*  SVs Used to Calculate the Fix */
+  uint8_t gnssSvUsedList_valid;  /**< Must be set to true if gnssSvUsedList is being passed */
+  uint32_t gnssSvUsedList_len;  /**< Must be set to # of elements in gnssSvUsedList */
+  uint16_t gnssSvUsedList[QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02];
+  /**<   Each entry in the list contains the SV ID of a satellite
+      used for calculating this position report. The following
+      information is associated with each SV ID: \n
+         Range:    \n
+         - For GPS:     1 to 32 \n
+         - For SBAS:    33 to 64 \n
+         - For GLONASS: 65 to 96 \n
+         - For QZSS:    193 to 197 \n
+         - For BDS:     201 to 237
+        */
+}qmiLocEventGeofenceBatchedDwellIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGDTSERVICEIDENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GDT_SERVICE_WWAN_V02 = 1, /**<  GDT service for WWAN   */
+  QMILOCGDTSERVICEIDENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGdtServiceIdEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGDTACCESSSTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GDT_ACCESS_ALLOWED_V02 = 1, /**<  GDT access to the service is allowed   */
+  eQMI_LOC_GDT_ACCESS_FAILED_V02 = 2, /**<  Any type of GDT access error   */
+  eQMI_LOC_GDT_ACCESS_NOT_ALLOWED_V02 = 3, /**<  GDT access to the service is not allowed   */
+  QMILOCGDTACCESSSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGdtAccessStatusEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Requests the control point to transfer data. */
+typedef struct {
+
+  /* Mandatory */
+  /*  GDT service ID */
+  qmiLocGdtServiceIdEnumT_v02 serviceId;
+  /**<   Values: \n
+
+      - eQMI_LOC_GDT_SERVICE_WWAN (1) --  GDT service for WWAN   */
+
+  /* Mandatory */
+  /*  Session ID */
+  uint32_t sessionId;
+  /**<   Session ID. */
+
+  /* Mandatory */
+  /*  Data */
+  uint32_t filePath_len;  /**< Must be set to # of elements in filePath */
+  char filePath[QMI_LOC_MAX_GDT_PATH_LEN_V02];
+  /**<   File path to the data. \n
+         - Type: Array of bytes \n
+         - Maximum length of the array: 255
+    */
+}qmiLocEventGdtUploadBeginStatusReqIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGDTENDSTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GDT_SUCCESS_V02 = 1, /**<  The sent data was accepted   */
+  eQMI_LOC_GDT_FAILED_V02 = 2, /**<  The sent data was not accepted   */
+  eQMI_LOC_GDT_INVALID_V02 = 3, /**<  General error in the received data  */
+  QMILOCGDTENDSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGdtEndStatusEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Requests the control point to report the status of the
+                    transfered data. */
+typedef struct {
+
+  /* Mandatory */
+  /*  GDT Service ID */
+  qmiLocGdtServiceIdEnumT_v02 serviceId;
+  /**<   Values: \n
+
+      - eQMI_LOC_GDT_SERVICE_WWAN (1) --  GDT service for WWAN   */
+
+  /* Mandatory */
+  /*  Session ID */
+  uint32_t sessionId;
+
+  /* Mandatory */
+  /*  GDT End Status */
+  qmiLocGdtEndStatusEnumT_v02 endStatus;
+  /**<   Values: \n
+
+      - eQMI_LOC_GDT_SUCCESS (1) --  The sent data was accepted
+      - eQMI_LOC_GDT_FAILED (2) --  The sent data was not accepted
+      - eQMI_LOC_GDT_INVALID (3) --  General error in the received data  */
+}qmiLocEventGdtUploadEndReqIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SUCCESS_V02 = 0, /**<  Request was completed successfully \n  */
+  eQMI_LOC_GENERAL_FAILURE_V02 = 1, /**<  Request failed because of a general failure \n  */
+  eQMI_LOC_UNSUPPORTED_V02 = 2, /**<  Request failed because it is not supported \n  */
+  eQMI_LOC_INVALID_PARAMETER_V02 = 3, /**<  Request failed because it contained invalid parameters \n  */
+  eQMI_LOC_ENGINE_BUSY_V02 = 4, /**<  Request failed because the engine is busy \n  */
+  eQMI_LOC_PHONE_OFFLINE_V02 = 5, /**<  Request failed because the phone is offline \n  */
+  eQMI_LOC_TIMEOUT_V02 = 6, /**<  Request failed because it timed out \n  */
+  eQMI_LOC_CONFIG_NOT_SUPPORTED_V02 = 7, /**<  Request failed because an undefined configuration was requested \n  */
+  eQMI_LOC_INSUFFICIENT_MEMORY_V02 = 8, /**<  Request failed because the engine could not allocate sufficient memory for the request \n  */
+  eQMI_LOC_MAX_GEOFENCE_PROGRAMMED_V02 = 9, /**<  Request failed because the maximum number of Geofences are already programmed \n  */
+  eQMI_LOC_XTRA_VERSION_CHECK_FAILURE_V02 = 10, /**<  Location service failed because of an XTRA version-based file format check failure  */
+  QMILOCSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocStatusEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Client can query the service revision using this message. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetServiceRevisionReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Client can query the service revision using this message. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Revision Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Revision request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Mandatory */
+  /*  Interface Definition Minor Revision */
+  uint32_t revision;
+  /**<   Revision of the service. This is the minor revision of the interface that
+       the service implements. Minor revision updates of the service are always
+       backward compatible. */
+
+  /* Optional */
+  /*  GNSS Measurement Engine Firmware Version String */
+  uint8_t gnssMeFWVerString_valid;  /**< Must be set to true if gnssMeFWVerString is being passed */
+  char gnssMeFWVerString[QMI_LOC_GNSS_ME_VERSION_STRING_MAX_LENGTH_V02 + 1];
+  /**<   Version of the GNSS measurement engine software running under the LOC API.
+       \begin{itemize1}
+       \item    Type: NULL-terminated string
+       \item    Maximum string length (including NULL terminator): 128
+       \vspace{0.1in} \end{itemize1}
+
+       \textbf{Note:} This string is only provided on platforms that have
+       a measurement engine that supports this version string. On all other
+       platforms, this optional TLV is not provided. */
+
+  /* Optional */
+  /*  GNSS Hosted Software Version String */
+  uint8_t gnssHostSWVerString_valid;  /**< Must be set to true if gnssHostSWVerString is being passed */
+  char gnssHostSWVerString[QMI_LOC_GNSS_HOSTED_SW_VERSION_STRING_MAX_LENGTH_V02 + 1];
+  /**<   Version of the GNSS hosted software running under the LOC API.
+       \begin{itemize1}
+       \item    Type: NULL-terminated string
+       \item    Maximum string length (including NULL terminator): 128
+       \vspace{0.1in}\end{itemize1}
+
+       \textbf{Note:} This string is only provided on hosted architectures
+       (measurement and position engine running on different processors) that
+       support this version string. On all other platforms, this optional TLV
+       is not provided. */
+
+  /* Optional */
+  /*  GNSS Software Version String */
+  uint8_t gnssSWVerString_valid;  /**< Must be set to true if gnssSWVerString is being passed */
+  char gnssSWVerString[QMI_LOC_GNSS_SW_VERSION_STRING_MAX_LENGTH_V02 + 1];
+  /**<   Aggregate version of the GNSS software.
+       \begin{itemize1}
+       \item    Type: NULL-terminated string
+       \item    Maximum string length (including NULL terminator): 256
+       \vspace{-0.18in} \end{itemize1} */
+}qmiLocGetServiceRevisionIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Gets the fix criteria from the location engine. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetFixCriteriaReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Gets the fix criteria from the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Fix Criteria Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Fix Criteria request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Horizontal Accuracy */
+  uint8_t horizontalAccuracyLevel_valid;  /**< Must be set to true if horizontalAccuracyLevel is being passed */
+  qmiLocAccuracyLevelEnumT_v02 horizontalAccuracyLevel;
+  /**<   Horizontal accuracy level.
+
+ Valid values: \n
+      - eQMI_LOC_ACCURACY_LOW (1) --  Low accuracy
+      - eQMI_LOC_ACCURACY_MED (2) --  Medium accuracy
+      - eQMI_LOC_ACCURACY_HIGH (3) --  High accuracy
+ */
+
+  /* Optional */
+  /*  Enable/Disable Intermediate Fixes */
+  uint8_t intermediateReportState_valid;  /**< Must be set to true if intermediateReportState is being passed */
+  qmiLocIntermediateReportStateEnumT_v02 intermediateReportState;
+  /**<   Intermediate Report state (ON, OFF).\n
+ The client must explicitly set this field to OFF to stop receiving
+ intermediate position reports. Intermediate position reports are
+ generated at 1 Hz and are ON by default. If intermediate reports
+ are turned ON, the client receives position reports even if the
+ accuracy criteria is not met. The status in the position report is
+ set to IN_PROGRESS for intermediate reports.
+
+ Valid values: \n
+      - eQMI_LOC_INTERMEDIATE_REPORTS_ON (1) --  Intermediate reports are turned on
+      - eQMI_LOC_INTERMEDIATE_REPORTS_OFF (2) --  Intermediate reports are turned off
+ */
+
+  /* Optional */
+  /*  Minimum Interval Between Fixes */
+  uint8_t minInterval_valid;  /**< Must be set to true if minInterval is being passed */
+  uint32_t minInterval;
+  /**<   Time that must elapse before alerting the client. \n
+       - Units: Milliseconds */
+
+  /* Optional */
+  /*  ID of the Application that Sent the Position Request */
+  uint8_t applicationId_valid;  /**< Must be set to true if applicationId is being passed */
+  qmiLocApplicationIdStructT_v02 applicationId;
+  /**<   \vspace{0.06in} \n Application provider, name, and version.*/
+}qmiLocGetFixCriteriaIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCNIUSERRESPENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_NI_LCS_NOTIFY_VERIFY_ACCEPT_V02 = 1, /**<  User accepted the Notify/Verify request  */
+  eQMI_LOC_NI_LCS_NOTIFY_VERIFY_DENY_V02 = 2, /**<  User denied the Notify/Verify request  */
+  eQMI_LOC_NI_LCS_NOTIFY_VERIFY_NORESP_V02 = 3, /**<  User did not respond to the Notify/Verify request  */
+  QMILOCNIUSERRESPENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocNiUserRespEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Sends the NI user response back to the engine; success or
+                    failure is reported in a separate indication. */
+typedef struct {
+
+  /* Mandatory */
+  /*  User Response */
+  qmiLocNiUserRespEnumT_v02 userResp;
+  /**<   User accepted or denied.
+
+ Valid values: \n
+      - eQMI_LOC_NI_LCS_NOTIFY_VERIFY_ACCEPT (1) --  User accepted the Notify/Verify request
+      - eQMI_LOC_NI_LCS_NOTIFY_VERIFY_DENY (2) --  User denied the Notify/Verify request
+      - eQMI_LOC_NI_LCS_NOTIFY_VERIFY_NORESP (3) --  User did not respond to the Notify/Verify request
+ */
+
+  /* Mandatory */
+  /*  Notification Type */
+  qmiLocNiNotifyVerifyEnumT_v02 notificationType;
+  /**<   Type of notification/verification performed.
+
+ Valid values: \n
+      - eQMI_LOC_NI_USER_NO_NOTIFY_NO_VERIFY (1) --  No notification and no verification required
+      - eQMI_LOC_NI_USER_NOTIFY_ONLY (2) --  Notify only; no verification required
+      - eQMI_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP (3) --  Notify and verify, but no response required.
+      - eQMI_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP (4) --  Notify and verify, and require a response
+      - eQMI_LOC_NI_USER_NOTIFY_VERIFY_PRIVACY_OVERRIDE (5) --  Notify and verify; privacy override
+ */
+
+  /* Optional */
+  /*  Network Initiated Vx Request */
+  uint8_t NiVxPayload_valid;  /**< Must be set to true if NiVxPayload is being passed */
+  qmiLocNiVxNotifyVerifyStructT_v02 NiVxPayload;
+  /**<   \vspace{0.06in} \n Optional NI VX request payload. */
+
+  /* Optional */
+  /*  Network Initiated SUPL Request */
+  uint8_t NiSuplPayload_valid;  /**< Must be set to true if NiSuplPayload is being passed */
+  qmiLocNiSuplNotifyVerifyStructT_v02 NiSuplPayload;
+  /**<   \vspace{0.06in} \n Optional NI SUPL request payload. */
+
+  /* Optional */
+  /*  Network Initiated UMTS Control Plane Request */
+  uint8_t NiUmtsCpPayload_valid;  /**< Must be set to true if NiUmtsCpPayload is being passed */
+  qmiLocNiUmtsCpNotifyVerifyStructT_v02 NiUmtsCpPayload;
+  /**<   \vspace{0.06in} \n Optional NI UMTS-CP request payload. */
+
+  /* Optional */
+  /*  Network Initiated Service Interaction Request */
+  uint8_t NiVxServiceInteractionPayload_valid;  /**< Must be set to true if NiVxServiceInteractionPayload is being passed */
+  qmiLocNiVxServiceInteractionStructT_v02 NiVxServiceInteractionPayload;
+  /**<   \vspace{0.06in} \n Optional NI service interaction payload. */
+
+  /* Optional */
+  /*  Network Initiated SUPL Version 2 Extension */
+  uint8_t NiSuplVer2ExtPayload_valid;  /**< Must be set to true if NiSuplVer2ExtPayload is being passed */
+  qmiLocNiSuplVer2ExtStructT_v02 NiSuplVer2ExtPayload;
+  /**<   \vspace{0.06in} \n Optional SUPL Version 2 Extension payload. */
+
+  /* Optional */
+  /*  SUPL Emergency Notification */
+  uint8_t suplEmergencyNotification_valid;  /**< Must be set to true if suplEmergencyNotification is being passed */
+  qmiLocEmergencyNotificationStructT_v02 suplEmergencyNotification;
+  /**<    \vspace{0.06in} \n SUPL emergency notification payload. Emergency notification
+        can be given even without an ESLP address */
+}qmiLocNiUserRespReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sends the NI user response back to the engine; success or
+                    failure is reported in a separate indication. */
+typedef struct {
+
+  /* Mandatory */
+  /*  NI User Response Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the NI User Response request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocNiUserRespIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCPREDICTEDORBITSDATAFORMATENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_PREDICTED_ORBITS_XTRA_V02 = 0, /**<  Default is QCOM-XTRA format.  */
+  QMILOCPREDICTEDORBITSDATAFORMATENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocPredictedOrbitsDataFormatEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects predicted orbits data. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Total Size */
+  uint32_t totalSize;
+  /**<   Total size of the predicted orbits data to be injected. \n
+        - Units: Bytes */
+
+  /* Mandatory */
+  /*  Total Parts */
+  uint16_t totalParts;
+  /**<   Total number of parts into which the predicted orbits data is
+        divided. */
+
+  /* Mandatory */
+  /*  Part Number */
+  uint16_t partNum;
+  /**<   Number of the current predicted orbits data part; starts at 1. */
+
+  /* Mandatory */
+  /*  Data */
+  uint32_t partData_len;  /**< Must be set to # of elements in partData */
+  char partData[QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02];
+  /**<   Predicted orbits data. \n
+         - Type: Array of bytes \n
+         - Maximum length of the array: 1024
+    */
+
+  /* Optional */
+  /*  Format Type */
+  uint8_t formatType_valid;  /**< Must be set to true if formatType is being passed */
+  qmiLocPredictedOrbitsDataFormatEnumT_v02 formatType;
+  /**<   Predicted orbits data format. \n
+ Valid values: \n
+      - eQMI_LOC_PREDICTED_ORBITS_XTRA (0) --  Default is QCOM-XTRA format.
+ */
+}qmiLocInjectPredictedOrbitsDataReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects predicted orbits data. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Data Injection Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Data Injection request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Part Number */
+  uint8_t partNum_valid;  /**< Must be set to true if partNum is being passed */
+  uint16_t partNum;
+  /**<   Number of the predicted orbits data part for which this indication
+      is sent; starts at 1. */
+}qmiLocInjectPredictedOrbitsDataIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Gets the predicted orbits data source. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetPredictedOrbitsDataSourceReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Gets the predicted orbits data source. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Predicted Orbits Data Source Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the query request for a predicted orbits data source.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Allowed Sizes */
+  uint8_t allowedSizes_valid;  /**< Must be set to true if allowedSizes is being passed */
+  qmiLocPredictedOrbitsAllowedSizesStructT_v02 allowedSizes;
+  /**<   \n Maximum part and file size allowed to be injected in the engine. */
+
+  /* Optional */
+  /*  Server List */
+  uint8_t serverList_valid;  /**< Must be set to true if serverList is being passed */
+  qmiLocPredictedOrbitsServerListStructT_v02 serverList;
+  /**<   \n List of servers that can be used by the client to download
+       predicted orbits data. */
+}qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Gets the predicted orbits data validity. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetPredictedOrbitsDataValidityReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint64_t startTimeInUTC;
+  /**<   Predicted orbits data is valid starting from this time. \n
+       - Units: Seconds (since Jan. 1, 1970)
+        */
+
+  uint16_t durationHours;
+  /**<   Duration from the start time for which the data is valid.\n
+       - Units: Hours
+        */
+}qmiLocPredictedOrbitsDataValidityStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Gets the predicted orbits data validity. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Predicted Orbits Data Validity Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the query request for predicted orbits data validity.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Validity Info */
+  uint8_t validityInfo_valid;  /**< Must be set to true if validityInfo is being passed */
+  qmiLocPredictedOrbitsDataValidityStructT_v02 validityInfo;
+}qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects UTC time in the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  UTC Time */
+  uint64_t timeUtc;
+  /**<   UTC time since Jan. 1, 1970.\n
+       - Units: Milliseconds */
+
+  /* Mandatory */
+  /*  Time Uncertainty */
+  uint32_t timeUnc;
+  /**<   Time uncertainty.\n
+       - Units: Milliseconds */
+}qmiLocInjectUtcTimeReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects UTC time in the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  UTC Time Injection Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the UTC Time Injection request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocInjectUtcTimeIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCALTSRCENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_ALT_SRC_UNKNOWN_V02 = 0, /**<  Source is unknown  */
+  eQMI_LOC_ALT_SRC_GPS_V02 = 1, /**<  GPS is the source  */
+  eQMI_LOC_ALT_SRC_CELL_ID_V02 = 2, /**<  Cell ID provided the source  */
+  eQMI_LOC_ALT_SRC_ENHANCED_CELL_ID_V02 = 3, /**<  Source is enhanced cell ID  */
+  eQMI_LOC_ALT_SRC_WIFI_V02 = 4, /**<  Wi-Fi is the source  */
+  eQMI_LOC_ALT_SRC_TERRESTRIAL_V02 = 5, /**<  Terrestrial source  */
+  eQMI_LOC_ALT_SRC_TERRESTRIAL_HYBRID_V02 = 6, /**<  Hybrid terrestrial source  */
+  eQMI_LOC_ALT_SRC_ALTITUDE_DATABASE_V02 = 7, /**<  Altitude database is the source  */
+  eQMI_LOC_ALT_SRC_BAROMETRIC_ALTIMETER_V02 = 8, /**<  Barometric altimeter is the source  */
+  eQMI_LOC_ALT_SRC_OTHER_V02 = 9, /**<  Other sources  */
+  QMILOCALTSRCENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocAltSrcEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCALTSRCLINKAGEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_ALT_SRC_LINKAGE_NOT_SPECIFIED_V02 = 0, /**<  Not specified  */
+  eQMI_LOC_ALT_SRC_LINKAGE_FULLY_INTERDEPENDENT_V02 = 1, /**<  Fully interdependent  */
+  eQMI_LOC_ALT_SRC_LINKAGE_DEPENDS_ON_LAT_LONG_V02 = 2, /**<  Depends on latitude and longitude  */
+  eQMI_LOC_ALT_SRC_LINKAGE_FULLY_INDEPENDENT_V02 = 3, /**<  Fully independent  */
+  QMILOCALTSRCLINKAGEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocAltSrcLinkageEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCALTSRCUNCERTAINTYCOVERAGEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_ALT_UNCERTAINTY_NOT_SPECIFIED_V02 = 0, /**<  Not specified  */
+  eQMI_LOC_ALT_UNCERTAINTY_POINT_V02 = 1, /**<  Altitude uncertainty is valid at the injected horizontal
+       position coordinates only  */
+  eQMI_LOC_ALT_UNCERTAINTY_FULL_V02 = 2, /**<  Altitude uncertainty applies to the position of the device
+       regardless of horizontal position (within the horizontal
+       uncertainty region, if provided)  */
+  QMILOCALTSRCUNCERTAINTYCOVERAGEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocAltSrcUncertaintyCoverageEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocAltSrcEnumT_v02 source;
+  /**<   Specifies the source of the altitude.
+
+ Valid values: \n
+      - eQMI_LOC_ALT_SRC_UNKNOWN (0) --  Source is unknown
+      - eQMI_LOC_ALT_SRC_GPS (1) --  GPS is the source
+      - eQMI_LOC_ALT_SRC_CELL_ID (2) --  Cell ID provided the source
+      - eQMI_LOC_ALT_SRC_ENHANCED_CELL_ID (3) --  Source is enhanced cell ID
+      - eQMI_LOC_ALT_SRC_WIFI (4) --  Wi-Fi is the source
+      - eQMI_LOC_ALT_SRC_TERRESTRIAL (5) --  Terrestrial source
+      - eQMI_LOC_ALT_SRC_TERRESTRIAL_HYBRID (6) --  Hybrid terrestrial source
+      - eQMI_LOC_ALT_SRC_ALTITUDE_DATABASE (7) --  Altitude database is the source
+      - eQMI_LOC_ALT_SRC_BAROMETRIC_ALTIMETER (8) --  Barometric altimeter is the source
+      - eQMI_LOC_ALT_SRC_OTHER (9) --  Other sources
+ */
+
+  qmiLocAltSrcLinkageEnumT_v02 linkage;
+  /**<   Specifies the dependency between the horizontal and
+ altitude position components.
+
+ Valid values: \n
+      - eQMI_LOC_ALT_SRC_LINKAGE_NOT_SPECIFIED (0) --  Not specified
+      - eQMI_LOC_ALT_SRC_LINKAGE_FULLY_INTERDEPENDENT (1) --  Fully interdependent
+      - eQMI_LOC_ALT_SRC_LINKAGE_DEPENDS_ON_LAT_LONG (2) --  Depends on latitude and longitude
+      - eQMI_LOC_ALT_SRC_LINKAGE_FULLY_INDEPENDENT (3) --  Fully independent
+ */
+
+  qmiLocAltSrcUncertaintyCoverageEnumT_v02 coverage;
+  /**<   Specifies the region of uncertainty.
+
+ Valid values: \n
+      - eQMI_LOC_ALT_UNCERTAINTY_NOT_SPECIFIED (0) --  Not specified
+      - eQMI_LOC_ALT_UNCERTAINTY_POINT (1) --  Altitude uncertainty is valid at the injected horizontal
+       position coordinates only
+      - eQMI_LOC_ALT_UNCERTAINTY_FULL (2) --  Altitude uncertainty applies to the position of the device
+       regardless of horizontal position (within the horizontal
+       uncertainty region, if provided)
+ */
+}qmiLocAltitudeSrcInfoStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCPOSITIONSRCENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_POSITION_SRC_GNSS_V02 = 0, /**<  Position source is GNSS  */
+  eQMI_LOC_POSITION_SRC_CELLID_V02 = 1, /**<  Position source is Cell ID  */
+  eQMI_LOC_POSITION_SRC_ENH_CELLID_V02 = 2, /**<  Position source is Enhanced Cell ID  */
+  eQMI_LOC_POSITION_SRC_WIFI_V02 = 3, /**<  Position source is Wi-Fi  */
+  eQMI_LOC_POSITION_SRC_TERRESTRIAL_V02 = 4, /**<  Position source is Terrestrial  */
+  eQMI_LOC_POSITION_SRC_GNSS_TERRESTRIAL_HYBRID_V02 = 5, /**<  Position source is GNSS Terrestrial Hybrid  */
+  eQMI_LOC_POSITION_SRC_OTHER_V02 = 6, /**<  Other sources  */
+  QMILOCPOSITIONSRCENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocPositionSrcEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects a position to the location engine. */
+typedef struct {
+
+  /* Optional */
+  /*  Latitude */
+  uint8_t latitude_valid;  /**< Must be set to true if latitude is being passed */
+  double latitude;
+  /**<   Latitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -90.0 to 90.0       \begin{itemize1}
+         \item    Positive values indicate northern latitude
+         \item    Negative values indicate southern latitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1}
+    */
+
+  /* Optional */
+  /*  Longitude */
+  uint8_t longitude_valid;  /**< Must be set to true if longitude is being passed */
+  double longitude;
+  /**<   Longitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -180.0 to 180.0     \begin{itemize1}
+         \item    Positive values indicate eastern longitude
+         \item    Negative values indicate western longitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1}
+   */
+
+  /* Optional */
+  /*  Circular Horizontal Uncertainty */
+  uint8_t horUncCircular_valid;  /**< Must be set to true if horUncCircular is being passed */
+  float horUncCircular;
+  /**<   Horizontal position uncertainty (circular).\n
+        - Units: Meters */
+
+  /* Optional */
+  /*  Horizontal Confidence */
+  uint8_t horConfidence_valid;  /**< Must be set to true if horConfidence is being passed */
+  uint8_t horConfidence;
+  /**<   Horizontal confidence, as defined by ETSI TS 101 109 (\hyperref[S4]{[S4]}).
+        \begin{itemize1}
+        \item    Units: Percent (1 to 99)
+        \item    0, 101 to 255 -- invalid value
+        \item    If 100 is received, reinterpret to 99
+        \end{itemize1}
+        This field must be specified together with horizontal uncertainty.
+        If not specified when horUncCircular is set, the default value is 50. */
+
+  /* Optional */
+  /*  Horizontal Reliability */
+  uint8_t horReliability_valid;  /**< Must be set to true if horReliability is being passed */
+  qmiLocReliabilityEnumT_v02 horReliability;
+  /**<   Specifies the reliability of the horizontal position.
+
+ Valid values: \n
+      - eQMI_LOC_RELIABILITY_NOT_SET (0) --  Location reliability is not set
+      - eQMI_LOC_RELIABILITY_VERY_LOW (1) --  Location reliability is very low; use it at your own risk
+      - eQMI_LOC_RELIABILITY_LOW (2) --  Location reliability is low; little or no cross-checking is possible
+      - eQMI_LOC_RELIABILITY_MEDIUM (3) --  Location reliability is medium; limited cross-check passed
+      - eQMI_LOC_RELIABILITY_HIGH (4) --  Location reliability is high; strong cross-check passed
+ */
+
+  /* Optional */
+  /*  Altitude With Respect to Ellipsoid */
+  uint8_t altitudeWrtEllipsoid_valid;  /**< Must be set to true if altitudeWrtEllipsoid is being passed */
+  float altitudeWrtEllipsoid;
+  /**<   Altitude with respect to the WGS84 ellipsoid.
+        \begin{itemize1}
+        \item    Units: Meters    \begin{itemize1}
+          \item    Positive = height
+          \item    Negative = depth
+        \vspace{-0.18in} \end{itemize1} \end{itemize1}*/
+
+  /* Optional */
+  /*  Altitude With Respect to Sea Level */
+  uint8_t altitudeWrtMeanSeaLevel_valid;  /**< Must be set to true if altitudeWrtMeanSeaLevel is being passed */
+  float altitudeWrtMeanSeaLevel;
+  /**<   Altitude with respect to mean sea level.\n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Vertical Uncertainty */
+  uint8_t vertUnc_valid;  /**< Must be set to true if vertUnc is being passed */
+  float vertUnc;
+  /**<   Vertical uncertainty. This is mandatory if either altitudeWrtEllipsoid
+        or altitudeWrtMeanSeaLevel is specified.\n
+        - Units: Meters */
+
+  /* Optional */
+  /*  Vertical Confidence */
+  uint8_t vertConfidence_valid;  /**< Must be set to true if vertConfidence is being passed */
+  uint8_t vertConfidence;
+  /**<   Vertical confidence, as defined by  ETSI TS 101 109 (\hyperref[S4]{[S4]}).
+        \begin{itemize1}
+        \item    Units: Percent (0-99)
+        \item    0 -- invalid value
+        \item    100 to 256 -- not used
+        \item    If 100 is received, reinterpret to 99
+        \end{itemize1}
+        This field must be specified together with the vertical uncertainty.
+        If not specified, the default value will be 50. */
+
+  /* Optional */
+  /*  Vertical Reliability */
+  uint8_t vertReliability_valid;  /**< Must be set to true if vertReliability is being passed */
+  qmiLocReliabilityEnumT_v02 vertReliability;
+  /**<   Specifies the reliability of the vertical position.
+
+ Valid values: \n
+      - eQMI_LOC_RELIABILITY_NOT_SET (0) --  Location reliability is not set
+      - eQMI_LOC_RELIABILITY_VERY_LOW (1) --  Location reliability is very low; use it at your own risk
+      - eQMI_LOC_RELIABILITY_LOW (2) --  Location reliability is low; little or no cross-checking is possible
+      - eQMI_LOC_RELIABILITY_MEDIUM (3) --  Location reliability is medium; limited cross-check passed
+      - eQMI_LOC_RELIABILITY_HIGH (4) --  Location reliability is high; strong cross-check passed
+ */
+
+  /* Optional */
+  /*  Altitude Source Info */
+  uint8_t altSourceInfo_valid;  /**< Must be set to true if altSourceInfo is being passed */
+  qmiLocAltitudeSrcInfoStructT_v02 altSourceInfo;
+  /**<   \vspace{0.06in} \n Specifies information regarding the altitude source. */
+
+  /* Optional */
+  /*  UTC Timestamp */
+  uint8_t timestampUtc_valid;  /**< Must be set to true if timestampUtc is being passed */
+  uint64_t timestampUtc;
+  /**<   UTC timestamp. \n
+        - Units: Milliseconds (since Jan. 1, 1970) */
+
+  /* Optional */
+  /*  Position Age */
+  uint8_t timestampAge_valid;  /**< Must be set to true if timestampAge is being passed */
+  int32_t timestampAge;
+  /**<   Position age, which is an estimate of how long ago this fix was made. \n
+        - Units: Milliseconds */
+
+  /* Optional */
+  /*  Position Source */
+  uint8_t positionSrc_valid;  /**< Must be set to true if positionSrc is being passed */
+  qmiLocPositionSrcEnumT_v02 positionSrc;
+  /**<   Source from which this position was obtained.
+
+ Valid values: \n
+      - eQMI_LOC_POSITION_SRC_GNSS (0) --  Position source is GNSS
+      - eQMI_LOC_POSITION_SRC_CELLID (1) --  Position source is Cell ID
+      - eQMI_LOC_POSITION_SRC_ENH_CELLID (2) --  Position source is Enhanced Cell ID
+      - eQMI_LOC_POSITION_SRC_WIFI (3) --  Position source is Wi-Fi
+      - eQMI_LOC_POSITION_SRC_TERRESTRIAL (4) --  Position source is Terrestrial
+      - eQMI_LOC_POSITION_SRC_GNSS_TERRESTRIAL_HYBRID (5) --  Position source is GNSS Terrestrial Hybrid
+      - eQMI_LOC_POSITION_SRC_OTHER (6) --  Other sources
+
+ If altitude is specified and the altitude source is not specified, the engine
+ assumes that the altitude was obtained using the specified position source. \n
+ If both altitude and altitude source are specified, the engine assumes
+ that only latitude and longitude were obtained using the specified position
+ source.
+ */
+
+  /* Optional */
+  /*  Raw Circular Horizontal Uncertainty */
+  uint8_t rawHorUncCircular_valid;  /**< Must be set to true if rawHorUncCircular is being passed */
+  float rawHorUncCircular;
+  /**<   Horizontal position uncertainty (circular) without any optimization.\n
+        - Units: Meters */
+
+  /* Optional */
+  /*  Raw Horizontal Confidence */
+  uint8_t rawHorConfidence_valid;  /**< Must be set to true if rawHorConfidence is being passed */
+  uint8_t rawHorConfidence;
+  /**<   Horizontal confidence associated with raw horizontal uncertainty,
+        as defined by ETSI TS 101 109 (\hyperref[S4]{[S4]}).
+        \begin{itemize1}
+        \item    Units: Percent (1 to 99)
+        \item    0, 101 to 255 -- invalid value
+        \item    If 100 is received, reinterpret to 99
+        \end{itemize1}
+        This field must be specified together with raw horizontal uncertainty.
+        If not specified when rawHorUncCircular is set, the default value is 50. */
+}qmiLocInjectPositionReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects a position to the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  UTC Position Injection Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the UTC Position Injection request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocInjectPositionIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCLOCKENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_LOCK_NONE_V02 = 1, /**<  Do not lock any position sessions  */
+  eQMI_LOC_LOCK_MI_V02 = 2, /**<  Lock mobile-initiated position sessions  */
+  eQMI_LOC_LOCK_MT_V02 = 3, /**<  Lock mobile-terminated position sessions  */
+  eQMI_LOC_LOCK_ALL_V02 = 4, /**<  Lock all position sessions  */
+  QMILOCLOCKENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocLockEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Sets the location engine lock. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Lock Type */
+  qmiLocLockEnumT_v02 lockType;
+  /**<   Type of lock.
+
+ Valid values: \n
+      - eQMI_LOC_LOCK_NONE (1) --  Do not lock any position sessions
+      - eQMI_LOC_LOCK_MI (2) --  Lock mobile-initiated position sessions
+      - eQMI_LOC_LOCK_MT (3) --  Lock mobile-terminated position sessions
+      - eQMI_LOC_LOCK_ALL (4) --  Lock all position sessions
+ */
+}qmiLocSetEngineLockReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sets the location engine lock. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set Engine Lock Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set Engine Lock request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocSetEngineLockIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Gets the location engine lock. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetEngineLockReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Gets the location engine lock. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Engine Lock Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Engine Lock request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Lock Type */
+  uint8_t lockType_valid;  /**< Must be set to true if lockType is being passed */
+  qmiLocLockEnumT_v02 lockType;
+  /**<   Type of lock.
+
+ Valid values: \n
+      - eQMI_LOC_LOCK_NONE (1) --  Do not lock any position sessions
+      - eQMI_LOC_LOCK_MI (2) --  Lock mobile-initiated position sessions
+      - eQMI_LOC_LOCK_MT (3) --  Lock mobile-terminated position sessions
+      - eQMI_LOC_LOCK_ALL (4) --  Lock all position sessions
+ */
+}qmiLocGetEngineLockIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Sets the SBAS configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  SBAS Config */
+  uint8_t sbasConfig;
+  /**<   Indicates whether SBAS configuration is enabled.
+       \begin{itemize1}
+       \item    0x01 (TRUE) -- SBAS configuration is enabled
+       \item    0x00 (FALSE) -- SBAS configuration is disabled
+       \vspace{-0.18in} \end{itemize1}*/
+}qmiLocSetSbasConfigReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sets the SBAS configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set SBAS Config Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set SBAS Configuration request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocSetSbasConfigIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Gets the SBAS configuration from the location engine. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetSbasConfigReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Gets the SBAS configuration from the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get SBAS Config Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get SBAS Configuration request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  SBAS Config */
+  uint8_t sbasConfig_valid;  /**< Must be set to true if sbasConfig is being passed */
+  uint8_t sbasConfig;
+  /**<   Indicates whether SBAS configuration is enabled.
+       \begin{itemize1}
+       \item    0x01 (TRUE) -- SBAS configuration is enabled
+       \item    0x00 (FALSE) -- SBAS configuration is disabled
+       \vspace{-0.18in} \end{itemize1}*/
+}qmiLocGetSbasConfigIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocNmeaSentenceMaskT_v02;
+#define QMI_LOC_NMEA_MASK_GGA_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000001) /**<  Enable GGA type  */
+#define QMI_LOC_NMEA_MASK_RMC_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000002) /**<  Enable RMC type  */
+#define QMI_LOC_NMEA_MASK_GSV_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000004) /**<  Enable GSV type  */
+#define QMI_LOC_NMEA_MASK_GSA_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000008) /**<  Enable GSA type  */
+#define QMI_LOC_NMEA_MASK_VTG_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000010) /**<  Enable VTG type  */
+#define QMI_LOC_NMEA_MASK_PQXFI_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000020) /**<  Enable PQXFI type  */
+#define QMI_LOC_NMEA_MASK_PSTIS_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000040) /**<  Enable PSTIS type  */
+#define QMI_LOC_NMEA_MASK_GLGSV_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000080) /**<  Enable GLGSV type  */
+#define QMI_LOC_NMEA_MASK_GNGSA_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000100) /**<  Enable GNGSA type  */
+#define QMI_LOC_NMEA_MASK_GNGNS_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000200) /**<  Enable GNGNS type  */
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Sets the NMEA types. */
+typedef struct {
+
+  /* Mandatory */
+  /*  NMEA Sentence Types */
+  qmiLocNmeaSentenceMaskT_v02 nmeaSentenceType;
+  /**<   Bitmasks of NMEA types to enable.
+
+ Valid bitmasks: \n
+      - QMI_LOC_NMEA_MASK_GGA (0x00000001) --  Enable GGA type
+      - QMI_LOC_NMEA_MASK_RMC (0x00000002) --  Enable RMC type
+      - QMI_LOC_NMEA_MASK_GSV (0x00000004) --  Enable GSV type
+      - QMI_LOC_NMEA_MASK_GSA (0x00000008) --  Enable GSA type
+      - QMI_LOC_NMEA_MASK_VTG (0x00000010) --  Enable VTG type
+      - QMI_LOC_NMEA_MASK_PQXFI (0x00000020) --  Enable PQXFI type
+      - QMI_LOC_NMEA_MASK_PSTIS (0x00000040) --  Enable PSTIS type
+      - QMI_LOC_NMEA_MASK_GLGSV (0x00000080) --  Enable GLGSV type
+      - QMI_LOC_NMEA_MASK_GNGSA (0x00000100) --  Enable GNGSA type
+      - QMI_LOC_NMEA_MASK_GNGNS (0x00000200) --  Enable GNGNS type
+ */
+}qmiLocSetNmeaTypesReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sets the NMEA types. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set NMEA Types Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of Set NMEA Types request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocSetNmeaTypesIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Gets the NMEA types from the location engine. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetNmeaTypesReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Gets the NMEA types from the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get NMEA Types Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get NMEA Types request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  NMEA Sentence Types */
+  uint8_t nmeaSentenceType_valid;  /**< Must be set to true if nmeaSentenceType is being passed */
+  qmiLocNmeaSentenceMaskT_v02 nmeaSentenceType;
+  /**<   NMEA types to enable.
+
+ Valid bitmasks: \n
+      - QMI_LOC_NMEA_MASK_GGA (0x00000001) --  Enable GGA type
+      - QMI_LOC_NMEA_MASK_RMC (0x00000002) --  Enable RMC type
+      - QMI_LOC_NMEA_MASK_GSV (0x00000004) --  Enable GSV type
+      - QMI_LOC_NMEA_MASK_GSA (0x00000008) --  Enable GSA type
+      - QMI_LOC_NMEA_MASK_VTG (0x00000010) --  Enable VTG type
+      - QMI_LOC_NMEA_MASK_PQXFI (0x00000020) --  Enable PQXFI type
+      - QMI_LOC_NMEA_MASK_PSTIS (0x00000040) --  Enable PSTIS type
+      - QMI_LOC_NMEA_MASK_GLGSV (0x00000080) --  Enable GLGSV type
+      - QMI_LOC_NMEA_MASK_GNGSA (0x00000100) --  Enable GNGSA type
+      - QMI_LOC_NMEA_MASK_GNGNS (0x00000200) --  Enable GNGNS type
+ */
+}qmiLocGetNmeaTypesIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Enables/disables Low Power Mode (LPM) configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Enable Low Power Mode */
+  uint8_t lowPowerMode;
+  /**<   Indicates whether to enable Low Power mode:\n
+       - 0x01 (TRUE) -- Enable LPM \n
+       - 0x00 (FALSE) -- Disable LPM */
+}qmiLocSetLowPowerModeReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Enables/disables Low Power Mode (LPM) configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set LPM Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set Low Power Mode request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocSetLowPowerModeIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Gets the LPM status from the location engine. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetLowPowerModeReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Gets the LPM status from the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get LPM Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get LPM request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Enable/Disable LPM */
+  uint8_t lowPowerMode_valid;  /**< Must be set to true if lowPowerMode is being passed */
+  uint8_t lowPowerMode;
+  /**<   Indicates whether to enable Low Power mode:\n
+       - 0x01 (TRUE) -- Enable LPM \n
+       - 0x00 (FALSE) -- Disable LPM */
+}qmiLocGetLowPowerModeIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSERVERTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SERVER_TYPE_CDMA_PDE_V02 = 1, /**<  Server type is CDMA PDE  */
+  eQMI_LOC_SERVER_TYPE_CDMA_MPC_V02 = 2, /**<  Server type is CDMA MPC  */
+  eQMI_LOC_SERVER_TYPE_UMTS_SLP_V02 = 3, /**<  Server type is UMTS SLP  */
+  eQMI_LOC_SERVER_TYPE_CUSTOM_PDE_V02 = 4, /**<  Server type is custom PDE  */
+  QMILOCSERVERTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocServerTypeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Specifies the A-GPS server type and address. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Server Type */
+  qmiLocServerTypeEnumT_v02 serverType;
+  /**<   Type of server.
+
+ Valid values: \n
+      - eQMI_LOC_SERVER_TYPE_CDMA_PDE (1) --  Server type is CDMA PDE
+      - eQMI_LOC_SERVER_TYPE_CDMA_MPC (2) --  Server type is CDMA MPC
+      - eQMI_LOC_SERVER_TYPE_UMTS_SLP (3) --  Server type is UMTS SLP
+      - eQMI_LOC_SERVER_TYPE_CUSTOM_PDE (4) --  Server type is custom PDE
+ */
+
+  /* Optional */
+  /*  IPv4 Address */
+  uint8_t ipv4Addr_valid;  /**< Must be set to true if ipv4Addr is being passed */
+  qmiLocIpV4AddrStructType_v02 ipv4Addr;
+  /**<   \vspace{0.06in} \n IPv4 address and port. */
+
+  /* Optional */
+  /*  IPv6 Address */
+  uint8_t ipv6Addr_valid;  /**< Must be set to true if ipv6Addr is being passed */
+  qmiLocIpV6AddrStructType_v02 ipv6Addr;
+  /**<   \vspace{0.06in} \n IPv6 address and port. */
+
+  /* Optional */
+  /*  Uniform Resource Locator */
+  uint8_t urlAddr_valid;  /**< Must be set to true if urlAddr is being passed */
+  char urlAddr[QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 + 1];
+  /**<   URL address.
+       \begin{itemize1}
+       \item    Type: NULL-terminated string
+       \item    Maximum string length (including NULL terminator): 256
+       \vspace{-0.18in} \end{itemize1}
+  */
+}qmiLocSetServerReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Specifies the A-GPS server type and address. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set Server Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set Server request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocSetServerIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Gets the location server from the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Server Type */
+  qmiLocServerTypeEnumT_v02 serverType;
+  /**<   Type of server.
+
+ Valid values: \n
+      - eQMI_LOC_SERVER_TYPE_CDMA_PDE (1) --  Server type is CDMA PDE
+      - eQMI_LOC_SERVER_TYPE_CDMA_MPC (2) --  Server type is CDMA MPC
+      - eQMI_LOC_SERVER_TYPE_UMTS_SLP (3) --  Server type is UMTS SLP
+      - eQMI_LOC_SERVER_TYPE_CUSTOM_PDE (4) --  Server type is custom PDE
+ */
+
+  /* Optional */
+  /*  Server Address Type */
+  uint8_t serverAddrTypeMask_valid;  /**< Must be set to true if serverAddrTypeMask is being passed */
+  qmiLocServerAddrTypeMaskT_v02 serverAddrTypeMask;
+  /**<   Type of address the client wants. If unspecified, the
+       indication will contain all the types of addresses
+       it has for the specified server type.
+
+       Valid bitmasks: \n
+         - 0x01 -- IPv4 \n
+         - 0x02 -- IPv6 \n
+         - 0x04 -- URL
+  */
+}qmiLocGetServerReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Gets the location server from the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Server Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Server request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Mandatory */
+  /*  Server Type */
+  qmiLocServerTypeEnumT_v02 serverType;
+  /**<   Type of server.
+
+ Valid values: \n
+      - eQMI_LOC_SERVER_TYPE_CDMA_PDE (1) --  Server type is CDMA PDE
+      - eQMI_LOC_SERVER_TYPE_CDMA_MPC (2) --  Server type is CDMA MPC
+      - eQMI_LOC_SERVER_TYPE_UMTS_SLP (3) --  Server type is UMTS SLP
+      - eQMI_LOC_SERVER_TYPE_CUSTOM_PDE (4) --  Server type is custom PDE
+ */
+
+  /* Optional */
+  /*  IPv4 Address */
+  uint8_t ipv4Addr_valid;  /**< Must be set to true if ipv4Addr is being passed */
+  qmiLocIpV4AddrStructType_v02 ipv4Addr;
+  /**<   \vspace{0.06in} \n IPv4 address and port. */
+
+  /* Optional */
+  /*  IPv6 Address */
+  uint8_t ipv6Addr_valid;  /**< Must be set to true if ipv6Addr is being passed */
+  qmiLocIpV6AddrStructType_v02 ipv6Addr;
+  /**<   \vspace{0.06in} \n IPv6 address and port. */
+
+  /* Optional */
+  /*  Uniform Resource Locator */
+  uint8_t urlAddr_valid;  /**< Must be set to true if urlAddr is being passed */
+  char urlAddr[QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 + 1];
+  /**<   URL.
+       \begin{itemize1}
+       \item    Type: NULL-terminated string
+       \item    Maximum string length (including NULL terminator): 256
+       \vspace{-0.18in} \end{itemize1}
+  */
+}qmiLocGetServerIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint64_t qmiLocDeleteGnssDataMaskT_v02;
+#define QMI_LOC_MASK_DELETE_GPS_SVDIR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000001ull) /**<  Mask to delete GPS SVDIR  */
+#define QMI_LOC_MASK_DELETE_GPS_SVSTEER_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000002ull) /**<  Mask to delete GPS SVSTEER  */
+#define QMI_LOC_MASK_DELETE_GPS_TIME_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000004ull) /**<  Mask to delete GPS time  */
+#define QMI_LOC_MASK_DELETE_GPS_ALM_CORR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000008ull) /**<  Mask to delete almanac correlation  */
+#define QMI_LOC_MASK_DELETE_GLO_SVDIR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000010ull) /**<  Mask to delete GLONASS SVDIR  */
+#define QMI_LOC_MASK_DELETE_GLO_SVSTEER_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000020ull) /**<  Mask to delete GLONASS SVSTEER  */
+#define QMI_LOC_MASK_DELETE_GLO_TIME_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000040ull) /**<  Mask to delete GLONASS time  */
+#define QMI_LOC_MASK_DELETE_GLO_ALM_CORR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000080ull) /**<  Mask to delete GLONASS almanac correlation  */
+#define QMI_LOC_MASK_DELETE_SBAS_SVDIR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000100ull) /**<  Mask to delete SBAS SVDIR  */
+#define QMI_LOC_MASK_DELETE_SBAS_SVSTEER_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000200ull) /**<  Mask to delete SBAS SVSTEER  */
+#define QMI_LOC_MASK_DELETE_POSITION_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000400ull) /**<  Mask to delete position estimate  */
+#define QMI_LOC_MASK_DELETE_TIME_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000800ull) /**<  Mask to delete time estimate  */
+#define QMI_LOC_MASK_DELETE_IONO_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00001000ull) /**<  Mask to delete IONO  */
+#define QMI_LOC_MASK_DELETE_UTC_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00002000ull) /**<  Mask to delete UTC estimate  */
+#define QMI_LOC_MASK_DELETE_HEALTH_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00004000ull) /**<  Mask to delete SV health record  */
+#define QMI_LOC_MASK_DELETE_SADATA_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00008000ull) /**<  Mask to delete SADATA  */
+#define QMI_LOC_MASK_DELETE_RTI_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00010000ull) /**<  Mask to delete RTI  */
+#define QMI_LOC_MASK_DELETE_SV_NO_EXIST_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00020000ull) /**<  Mask to delete SV_NO_EXIST  */
+#define QMI_LOC_MASK_DELETE_FREQ_BIAS_EST_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00040000ull) /**<  Mask to delete frequency bias estimate  */
+#define QMI_LOC_MASK_DELETE_BDS_SVDIR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00080000ull) /**<  Mask to delete BDS SVDIR  */
+#define QMI_LOC_MASK_DELETE_BDS_SVSTEER_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00100000ull) /**<  Mask to delete BDS SVSTEER  */
+#define QMI_LOC_MASK_DELETE_BDS_TIME_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00200000ull) /**<  Mask to delete BDS time  */
+#define QMI_LOC_MASK_DELETE_BDS_ALM_CORR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00400000ull) /**<  Mask to delete BDS almanac correlation  */
+#define QMI_LOC_MASK_DELETE_GNSS_SV_BLACKLIST_GPS_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00800000ull) /**<  Mask to delete GNSS SV blacklist GPS   */
+#define QMI_LOC_MASK_DELETE_GNSS_SV_BLACKLIST_GLO_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x01000000ull) /**<  Mask to delete GNSS SV blacklist GLO   */
+#define QMI_LOC_MASK_DELETE_GNSS_SV_BLACKLIST_BDS_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x02000000ull) /**<  Mask to delete GNSS SV blacklist BDS   */
+typedef uint32_t qmiLocDeleteCelldbDataMaskT_v02;
+#define QMI_LOC_MASK_DELETE_CELLDB_POS_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000001) /**<  Mask to delete cell database position  */
+#define QMI_LOC_MASK_DELETE_CELLDB_LATEST_GPS_POS_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000002) /**<  Mask to delete cell database latest GPS position  */
+#define QMI_LOC_MASK_DELETE_CELLDB_OTA_POS_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000004) /**<  Mask to delete cell database OTA position  */
+#define QMI_LOC_MASK_DELETE_CELLDB_EXT_REF_POS_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000008) /**<  Mask to delete cell database external reference position  */
+#define QMI_LOC_MASK_DELETE_CELLDB_TIMETAG_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000010) /**<  Mask to delete cell database time tag  */
+#define QMI_LOC_MASK_DELETE_CELLDB_CELLID_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000020) /**<  Mask to delete cell database cell ID  */
+#define QMI_LOC_MASK_DELETE_CELLDB_CACHED_CELLID_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000040) /**<  Mask to delete cell database cached cell ID  */
+#define QMI_LOC_MASK_DELETE_CELLDB_LAST_SRV_CELL_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000080) /**<  Mask to delete cell database last service cell  */
+#define QMI_LOC_MASK_DELETE_CELLDB_CUR_SRV_CELL_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000100) /**<  Mask to delete cell database current service cell  */
+#define QMI_LOC_MASK_DELETE_CELLDB_NEIGHBOR_INFO_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000200) /**<  Mask to delete cell database neighbor information  */
+typedef uint32_t qmiLocDeleteClockInfoMaskT_v02;
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_TIME_EST_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000001) /**<  Mask to delete time estimate from clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_FREQ_EST_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000002) /**<  Mask to delete frequency estimate from clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_WEEK_NUMBER_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000004) /**<  Mask to delete week number from clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_RTC_TIME_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000008) /**<  Mask to delete RTC time from clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_TIME_TRANSFER_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000010) /**<  Mask to delete time transfer from clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_GPSTIME_EST_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000020) /**<  Mask to delete GPS time estimate from clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_GLOTIME_EST_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000040) /**<  Mask to delete GLONASS time estimate from clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_GLODAY_NUMBER_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000080) /**<  Mask to delete GLONASS day number from clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_GLO4YEAR_NUMBER_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000100) /**<  Mask to delete GLONASS four year number from clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_GLO_RF_GRP_DELAY_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000200) /**<  Mask to delete GLONASS RF GRP delay from clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_DISABLE_TT_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000400) /**<  Mask to delete disable TT from clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_GG_LEAPSEC_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000800) /**<  Mask to delete a BDS time estimate from the clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_GG_GGTB_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00001000) /**<  Mask to delete a BDS time estimate from the clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_BDSTIME_EST_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00002000) /**<  Mask to delete a BDS time estimate from the clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_GB_GBTB_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00004000) /**<  Mask to delete Glonass-to-BDS time bias-related information from the
+      clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_BG_BGTB_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00008000) /**<  Mask to delete BDS-to-GLONASS time bias-related information from the
+       clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_BDSWEEK_NUMBER_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00010000) /**<  Mask to delete the BDS week number from the clock information  */
+#define QMI_LOC_MASK_DELETE_CLOCK_INFO_BDS_RF_GRP_DELAY_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00020000) /**<  Mask to delete the BDS RF GRP delay from the clock information  */
+typedef uint8_t qmiLocDeleteSvInfoMaskT_v02;
+#define QMI_LOC_MASK_DELETE_EPHEMERIS_V02 ((qmiLocDeleteSvInfoMaskT_v02)0x01) /**<  Delete ephemeris for the satellite  */
+#define QMI_LOC_MASK_DELETE_ALMANAC_V02 ((qmiLocDeleteSvInfoMaskT_v02)0x02) /**<  Delete almanac for the satellite  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint16_t gnssSvId;
+  /**<   SV ID of the satellite whose data is to be deleted.
+       \begin{itemize1}
+       \item    Range:    \begin{itemize1}
+         \item    For GPS:     1 to 32
+         \item    For SBAS:    33 to 64
+         \item    For GLONASS: 65 to 96
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  qmiLocSvSystemEnumT_v02 system;
+  /**<   Indicates to which constellation this SV belongs.
+
+ Valid values: \n
+      - eQMI_LOC_SV_SYSTEM_GPS (1) --  GPS satellite
+      - eQMI_LOC_SV_SYSTEM_GALILEO (2) --  GALILEO satellite
+      - eQMI_LOC_SV_SYSTEM_SBAS (3) --  SBAS satellite
+      - eQMI_LOC_SV_SYSTEM_COMPASS (4) --  COMPASS satellite
+      - eQMI_LOC_SV_SYSTEM_GLONASS (5) --  GLONASS satellite
+      - eQMI_LOC_SV_SYSTEM_BDS (6) --  BDS satellite
+ */
+
+  qmiLocDeleteSvInfoMaskT_v02 deleteSvInfoMask;
+  /**<   Indicates if the ephemeris or almanac for a satellite
+       is to be deleted. \n
+       Valid values: \n
+       - 0x01 -- DELETE_EPHEMERIS \n
+       - 0x02 -- DELETE_ALMANAC
+  */
+}qmiLocDeleteSvInfoStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint16_t gnssSvId;
+  /**<   SV ID of the satellite whose data is to be deleted. \n
+       Range for BDS:     201 to 237 */
+
+  qmiLocDeleteSvInfoMaskT_v02 deleteSvInfoMask;
+  /**<   Indicates if the ephemeris or almanac for a satellite
+ is to be deleted. \n
+ Valid values: \n
+      - QMI_LOC_MASK_DELETE_EPHEMERIS (0x01) --  Delete ephemeris for the satellite
+      - QMI_LOC_MASK_DELETE_ALMANAC (0x02) --  Delete almanac for the satellite
+ */
+}qmiLocDeleteBDSSvInfoStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; This command is used to delete the location engine
+                    assistance data */
+typedef struct {
+
+  /* Mandatory */
+  /*  Delete All */
+  uint8_t deleteAllFlag;
+  /**<   Indicates whether all assistance data is to be deleted.
+
+       Valid values: \begin{itemize1}
+       \item    0x01 (TRUE)  -- All assistance data is to be deleted; if
+                                this flag is set, all the other information
+                         contained in the optional fields for this
+                                message are ignored
+       \item    0x00 (FALSE) -- The optional fields in the message are to be
+                                used to determine which data is to be deleted
+       \vspace{-0.18in} \end{itemize1} */
+
+  /* Optional */
+  /*  Delete SV Info */
+  uint8_t deleteSvInfoList_valid;  /**< Must be set to true if deleteSvInfoList is being passed */
+  uint32_t deleteSvInfoList_len;  /**< Must be set to # of elements in deleteSvInfoList */
+  qmiLocDeleteSvInfoStructT_v02 deleteSvInfoList[QMI_LOC_DELETE_MAX_SV_INFO_LENGTH_V02];
+  /**<   \vspace{0.06in} \n List of satellites for which the assistance data is to be deleted.
+  */
+
+  /* Optional */
+  /*  Delete GNSS Data */
+  uint8_t deleteGnssDataMask_valid;  /**< Must be set to true if deleteGnssDataMask is being passed */
+  qmiLocDeleteGnssDataMaskT_v02 deleteGnssDataMask;
+  /**<   Mask for the GNSS data that is to be deleted.
+
+ Valid values: \n
+      - QMI_LOC_MASK_DELETE_GPS_SVDIR (0x00000001) --  Mask to delete GPS SVDIR
+      - QMI_LOC_MASK_DELETE_GPS_SVSTEER (0x00000002) --  Mask to delete GPS SVSTEER
+      - QMI_LOC_MASK_DELETE_GPS_TIME (0x00000004) --  Mask to delete GPS time
+      - QMI_LOC_MASK_DELETE_GPS_ALM_CORR (0x00000008) --  Mask to delete almanac correlation
+      - QMI_LOC_MASK_DELETE_GLO_SVDIR (0x00000010) --  Mask to delete GLONASS SVDIR
+      - QMI_LOC_MASK_DELETE_GLO_SVSTEER (0x00000020) --  Mask to delete GLONASS SVSTEER
+      - QMI_LOC_MASK_DELETE_GLO_TIME (0x00000040) --  Mask to delete GLONASS time
+      - QMI_LOC_MASK_DELETE_GLO_ALM_CORR (0x00000080) --  Mask to delete GLONASS almanac correlation
+      - QMI_LOC_MASK_DELETE_SBAS_SVDIR (0x00000100) --  Mask to delete SBAS SVDIR
+      - QMI_LOC_MASK_DELETE_SBAS_SVSTEER (0x00000200) --  Mask to delete SBAS SVSTEER
+      - QMI_LOC_MASK_DELETE_POSITION (0x00000400) --  Mask to delete position estimate
+      - QMI_LOC_MASK_DELETE_TIME (0x00000800) --  Mask to delete time estimate
+      - QMI_LOC_MASK_DELETE_IONO (0x00001000) --  Mask to delete IONO
+      - QMI_LOC_MASK_DELETE_UTC (0x00002000) --  Mask to delete UTC estimate
+      - QMI_LOC_MASK_DELETE_HEALTH (0x00004000) --  Mask to delete SV health record
+      - QMI_LOC_MASK_DELETE_SADATA (0x00008000) --  Mask to delete SADATA
+      - QMI_LOC_MASK_DELETE_RTI (0x00010000) --  Mask to delete RTI
+      - QMI_LOC_MASK_DELETE_SV_NO_EXIST (0x00020000) --  Mask to delete SV_NO_EXIST
+      - QMI_LOC_MASK_DELETE_FREQ_BIAS_EST (0x00040000) --  Mask to delete frequency bias estimate
+      - QMI_LOC_MASK_DELETE_BDS_SVDIR (0x00080000) --  Mask to delete BDS SVDIR
+      - QMI_LOC_MASK_DELETE_BDS_SVSTEER (0x00100000) --  Mask to delete BDS SVSTEER
+      - QMI_LOC_MASK_DELETE_BDS_TIME (0x00200000) --  Mask to delete BDS time
+      - QMI_LOC_MASK_DELETE_BDS_ALM_CORR (0x00400000) --  Mask to delete BDS almanac correlation
+      - QMI_LOC_MASK_DELETE_GNSS_SV_BLACKLIST_GPS (0x00800000) --  Mask to delete GNSS SV blacklist GPS
+      - QMI_LOC_MASK_DELETE_GNSS_SV_BLACKLIST_GLO (0x01000000) --  Mask to delete GNSS SV blacklist GLO
+      - QMI_LOC_MASK_DELETE_GNSS_SV_BLACKLIST_BDS (0x02000000) --  Mask to delete GNSS SV blacklist BDS
+ */
+
+  /* Optional */
+  /*  Delete Cell Database */
+  uint8_t deleteCellDbDataMask_valid;  /**< Must be set to true if deleteCellDbDataMask is being passed */
+  qmiLocDeleteCelldbDataMaskT_v02 deleteCellDbDataMask;
+  /**<   Mask for the cell database assistance data that is to be deleted.
+
+       Valid values: \begin{itemize1}
+       \item    0x00000001 -- DELETE_CELLDB_ POS
+       \item    0x00000002 -- DELETE_CELLDB_ LATEST_GPS_POS
+       \item    0x00000004 -- DELETE_CELLDB_ OTA_POS
+       \item    0x00000008 -- DELETE_CELLDB_ EXT_REF_POS
+       \item    0x00000010 -- DELETE_CELLDB_ TIMETAG
+       \item    0x00000020 -- DELETE_CELLDB_ CELLID
+       \item    0x00000040 -- DELETE_CELLDB_ CACHED_CELLID
+       \item    0x00000080 -- DELETE_CELLDB_ LAST_SRV_CELL
+       \item    0x00000100 -- DELETE_CELLDB_ CUR_SRV_CELL
+       \item    0x00000200 -- DELETE_CELLDB_ NEIGHBOR_INFO
+       \vspace{-0.18in} \end{itemize1}
+  */
+
+  /* Optional */
+  /*  Delete Clock Info */
+  uint8_t deleteClockInfoMask_valid;  /**< Must be set to true if deleteClockInfoMask is being passed */
+  qmiLocDeleteClockInfoMaskT_v02 deleteClockInfoMask;
+  /**<   Mask for the clock information assistance data that is to be deleted.
+
+ Valid bitmasks: \n
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_TIME_EST (0x00000001) --  Mask to delete time estimate from clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_FREQ_EST (0x00000002) --  Mask to delete frequency estimate from clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_WEEK_NUMBER (0x00000004) --  Mask to delete week number from clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_RTC_TIME (0x00000008) --  Mask to delete RTC time from clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_TIME_TRANSFER (0x00000010) --  Mask to delete time transfer from clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_GPSTIME_EST (0x00000020) --  Mask to delete GPS time estimate from clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_GLOTIME_EST (0x00000040) --  Mask to delete GLONASS time estimate from clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_GLODAY_NUMBER (0x00000080) --  Mask to delete GLONASS day number from clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_GLO4YEAR_NUMBER (0x00000100) --  Mask to delete GLONASS four year number from clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_GLO_RF_GRP_DELAY (0x00000200) --  Mask to delete GLONASS RF GRP delay from clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_DISABLE_TT (0x00000400) --  Mask to delete disable TT from clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_GG_LEAPSEC (0x00000800) --  Mask to delete a BDS time estimate from the clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_GG_GGTB (0x00001000) --  Mask to delete a BDS time estimate from the clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_BDSTIME_EST (0x00002000) --  Mask to delete a BDS time estimate from the clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_GB_GBTB (0x00004000) --  Mask to delete Glonass-to-BDS time bias-related information from the
+      clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_BG_BGTB (0x00008000) --  Mask to delete BDS-to-GLONASS time bias-related information from the
+       clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_BDSWEEK_NUMBER (0x00010000) --  Mask to delete the BDS week number from the clock information
+      - QMI_LOC_MASK_DELETE_CLOCK_INFO_BDS_RF_GRP_DELAY (0x00020000) --  Mask to delete the BDS RF GRP delay from the clock information
+ */
+
+  /* Optional */
+  /*  Delete BDS SV Info */
+  uint8_t deleteBdsSvInfoList_valid;  /**< Must be set to true if deleteBdsSvInfoList is being passed */
+  uint32_t deleteBdsSvInfoList_len;  /**< Must be set to # of elements in deleteBdsSvInfoList */
+  qmiLocDeleteBDSSvInfoStructT_v02 deleteBdsSvInfoList[QMI_LOC_DELETE_MAX_BDS_SV_INFO_LENGTH_V02];
+  /**<   \vspace{0.06in} \n List of BDS satellites for which the assistance data is to be deleted.
+  */
+}qmiLocDeleteAssistDataReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; This command is used to delete the location engine
+                    assistance data */
+typedef struct {
+
+  /* Mandatory */
+  /*  Delete Assist Data Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Delete Assist Data request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocDeleteAssistDataIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Enables/disables XTRA-T session control. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Enable XTRA-T */
+  uint8_t xtraTSessionControl;
+  /**<   Indicates whether to enable XTRA-T:\n
+       - 0x01 (TRUE) -- Enable XTRA-T \n
+       - 0x00 (FALSE) -- Disable XTRA-T */
+}qmiLocSetXtraTSessionControlReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Enables/disables XTRA-T session control. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set XTRA-T Session Control Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set XTRA-T Session Control request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocSetXtraTSessionControlIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Gets the XTRA-T session control value from the location
+                    engine. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetXtraTSessionControlReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Gets the XTRA-T session control value from the location
+                    engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get XTRA-T Session Control Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get XTRA-T Session Control request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Enable/Disable XTRA-T */
+  uint8_t xtraTSessionControl_valid;  /**< Must be set to true if xtraTSessionControl is being passed */
+  uint8_t xtraTSessionControl;
+  /**<   Indicates whether to enable XTRA-T:\n
+       - 0x01 (TRUE) -- Enable XTRA-T \n
+       - 0x00 (FALSE) -- Disable XTRA-T */
+}qmiLocGetXtraTSessionControlIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t wifiPositionTime;
+  /**<   Common counter (typically, the number of milliseconds since bootup).
+        This field is only to be provided if the modem and host processors are
+        synchronized. */
+}qmiLocWifiFixTimeStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCWIFIFIXERRORCODEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_WIFI_FIX_ERROR_SUCCESS_V02 = 0, /**<  Wi-Fi fix is successful. */
+  eQMI_LOC_WIFI_FIX_ERROR_WIFI_NOT_AVAILABLE_V02 = 1, /**<  Wi-Fi fix failed because Wi-Fi is not available on the device.  */
+  eQMI_LOC_WIFI_FIX_ERROR_NO_AP_FOUND_V02 = 2, /**<  Wi-Fi fix failed because no access points were found.  */
+  eQMI_LOC_WIFI_FIX_ERROR_UNAUTHORIZED_V02 = 3, /**<  Wi-Fi fix failed because the server denied access due to bad authorization
+   code.  */
+  eQMI_LOC_WIFI_FIX_ERROR_SERVER_UNAVAILABLE_V02 = 4, /**<  Wi-Fi fix failed because the Wi-Fi server was unavailable.  */
+  eQMI_LOC_WIFI_FIX_ERROR_LOCATION_CANNOT_BE_DETERMINED_V02 = 5, /**<  Wi-Fi fix failed even though APs were found and the server could be reached.
+   This may be because the APs found are not in the database.  */
+  eQMI_LOC_WIFI_FIX_ERROR_UNKNOWN_V02 = 6, /**<  Wi-Fi fix failed, but the cause could not be determined.  */
+  QMILOCWIFIFIXERRORCODEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocWifiFixErrorCodeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  double lat;
+  /**<   Wi-Fi position latitude. \n
+        - Type: Floating point \n
+        - Units: Degrees */
+
+  double lon;
+  /**<   Wi-Fi position longitude. \n
+        - Type: Floating point \n
+        - Units: Degrees */
+
+  uint16_t hepe;
+  /**<   Wi-Fi position HEPE.\n
+        - Units: Meters */
+
+  uint8_t numApsUsed;
+  /**<   Number of Access Points (AP) used to generate a fix. */
+
+  qmiLocWifiFixErrorCodeEnumT_v02 fixErrorCode;
+  /**<   Wi-Fi position error code; set to 0 if the fix succeeds. This position
+ is only used by a module if the value is 0. If there was a failure,
+ the error code provided by the Wi-Fi positioning system can be provided
+ here.
+
+ Valid values: \n
+      - eQMI_LOC_WIFI_FIX_ERROR_SUCCESS (0) --  Wi-Fi fix is successful.
+      - eQMI_LOC_WIFI_FIX_ERROR_WIFI_NOT_AVAILABLE (1) --  Wi-Fi fix failed because Wi-Fi is not available on the device.
+      - eQMI_LOC_WIFI_FIX_ERROR_NO_AP_FOUND (2) --  Wi-Fi fix failed because no access points were found.
+      - eQMI_LOC_WIFI_FIX_ERROR_UNAUTHORIZED (3) --  Wi-Fi fix failed because the server denied access due to bad authorization
+   code.
+      - eQMI_LOC_WIFI_FIX_ERROR_SERVER_UNAVAILABLE (4) --  Wi-Fi fix failed because the Wi-Fi server was unavailable.
+      - eQMI_LOC_WIFI_FIX_ERROR_LOCATION_CANNOT_BE_DETERMINED (5) --  Wi-Fi fix failed even though APs were found and the server could be reached.
+   This may be because the APs found are not in the database.
+      - eQMI_LOC_WIFI_FIX_ERROR_UNKNOWN (6) --  Wi-Fi fix failed, but the cause could not be determined.
+ */
+}qmiLocWifiFixPosStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+typedef uint8_t qmiLocWifiApQualifierMaskT_v02;
+#define QMI_LOC_WIFI_AP_QUALIFIER_BEING_USED_V02 ((qmiLocWifiApQualifierMaskT_v02)0x01) /**<  Access point is being used by the WPS.  */
+#define QMI_LOC_WIFI_AP_QUALIFIER_HIDDEN_SSID_V02 ((qmiLocWifiApQualifierMaskT_v02)0x02) /**<  AP does not broadcast SSID.  */
+#define QMI_LOC_WIFI_AP_QUALIFIER_PRIVATE_V02 ((qmiLocWifiApQualifierMaskT_v02)0x04) /**<  AP has encryption turned on.  */
+#define QMI_LOC_WIFI_AP_QUALIFIER_INFRASTRUCTURE_MODE_V02 ((qmiLocWifiApQualifierMaskT_v02)0x08) /**<  AP is in infrastructure mode and not in ad-hoc/unknown mode.  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint8_t macAddr[QMI_LOC_WIFI_MAC_ADDR_LENGTH_V02];
+  /**<   Associated MAC address of the AP. \n
+        - Type: Array of unsigned integers \n
+        - Address length: 6
+   */
+
+  int32_t rssi;
+  /**<   Receive signal strength indicator.\n
+        - Units: dBm (offset with +100 dB) */
+
+  uint16_t channel;
+  /**<   Wi-Fi channel on which a beacon was received. */
+
+  qmiLocWifiApQualifierMaskT_v02 apQualifier;
+  /**<   A bitmask of Boolean qualifiers for APs.
+        All unused bits in this mask must be set to 0.
+
+        Valid values: \n
+          - 0x01 -- BEING_USED \n
+          - 0x02 -- HIDDEN_SSID \n
+          - 0x04 -- PRIVATE \n
+          - 0x08 -- INFRASTRUCTURE_MODE
+         */
+}qmiLocWifiApInfoStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  char ssid[QMI_LOC_MAX_WIFI_AP_SSID_STR_LENGTH_V02 + 1];
+  /**<   NULL-terminated SSID string of the Wi-Fi AP. Its maximum length according to the ASCII standard is 32 octets. */
+}qmiLocWifiApSsidStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects the Wi-Fi position. */
+typedef struct {
+
+  /* Optional */
+  /*  Wi-Fi Fix Time */
+  uint8_t wifiFixTime_valid;  /**< Must be set to true if wifiFixTime is being passed */
+  qmiLocWifiFixTimeStructT_v02 wifiFixTime;
+  /**<   \vspace{0.06in} \n Time of Wi-Fi position fix. */
+
+  /* Optional */
+  /*  Wi-Fi Position */
+  uint8_t wifiFixPosition_valid;  /**< Must be set to true if wifiFixPosition is being passed */
+  qmiLocWifiFixPosStructT_v02 wifiFixPosition;
+  /**<   \vspace{0.06in} \n Wi-Fi position fix. */
+
+  /* Optional */
+  /*  Wi-Fi Access Point Information */
+  uint8_t apInfo_valid;  /**< Must be set to true if apInfo is being passed */
+  uint32_t apInfo_len;  /**< Must be set to # of elements in apInfo */
+  qmiLocWifiApInfoStructT_v02 apInfo[QMI_LOC_WIFI_MAX_REPORTED_APS_PER_MSG_V02];
+  /**<   \vspace{0.06in} \n AP scan list.
+        SSID of the Wi-Fi AP.
+        The ordering of the Wi-Fi AP SSID list should matchthe Wi-Fi AP MAC address list if both are provided,
+        that is, the first element of the Wi-Fi AP SSID list must be the SSID of the AP whose MAC
+        address is in the first element in the Wi-Fi AP Info MAC Address, and so on. */
+
+  /* Optional */
+  /*  Horizontal Reliability */
+  uint8_t horizontalReliability_valid;  /**< Must be set to true if horizontalReliability is being passed */
+  qmiLocReliabilityEnumT_v02 horizontalReliability;
+  /**<   Specifies the reliability of the horizontal position.
+
+ Valid values: \n
+      - eQMI_LOC_RELIABILITY_NOT_SET (0) --  Location reliability is not set
+      - eQMI_LOC_RELIABILITY_VERY_LOW (1) --  Location reliability is very low; use it at your own risk
+      - eQMI_LOC_RELIABILITY_LOW (2) --  Location reliability is low; little or no cross-checking is possible
+      - eQMI_LOC_RELIABILITY_MEDIUM (3) --  Location reliability is medium; limited cross-check passed
+      - eQMI_LOC_RELIABILITY_HIGH (4) --  Location reliability is high; strong cross-check passed
+ */
+
+  /* Optional */
+  /*  Raw HEPE */
+  uint8_t rawHepe_valid;  /**< Must be set to true if rawHepe is being passed */
+  uint16_t rawHepe;
+  /**<   Wi-Fi position raw HEPE, which has no optimization.\n
+        - Units: Meters */
+
+  /* Optional */
+  /*  Wi-Fi AP SSID String */
+  uint8_t wifiApSsidInfo_valid;  /**< Must be set to true if wifiApSsidInfo is being passed */
+  uint32_t wifiApSsidInfo_len;  /**< Must be set to # of elements in wifiApSsidInfo */
+  qmiLocWifiApSsidStructT_v02 wifiApSsidInfo[QMI_LOC_WIFI_MAX_REPORTED_APS_PER_MSG_V02];
+  /**<   \vspace{0.04in} \n
+        The ordering of the Wi-Fi AP SSID list should match the Wi-Fi AP MAC address list if both are provided,
+        that is, the first element of the Wi-Fi AP SSID list must be the SSID of the AP whose MAC
+        address is in the first element in the Wi-Fi AP Info MAC address, and so on.*/
+}qmiLocInjectWifiPositionReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects the Wi-Fi position. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Inject Wi-Fi Position Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Inject Wi-Fi Position request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocInjectWifiPositionIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCWIFISTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_WIFI_STATUS_AVAILABLE_V02 = 1, /**<  Wi-Fi is available  */
+  eQMI_LOC_WIFI_STATUS_UNAVAILABLE_V02 = 2, /**<  Wi-Fi is not available  */
+  QMILOCWIFISTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocWifiStatusEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Notifies the location engine of the Wi-Fi status. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Availablility of Wi-Fi */
+  qmiLocWifiStatusEnumT_v02 wifiStatus;
+  /**<   Wi-Fi status information.
+
+ Valid values: \n
+      - eQMI_LOC_WIFI_STATUS_AVAILABLE (1) --  Wi-Fi is available
+      - eQMI_LOC_WIFI_STATUS_UNAVAILABLE (2) --  Wi-Fi is not available
+ */
+}qmiLocNotifyWifiStatusReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Notifies the location engine of the Wi-Fi status. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Status of Notify Wi-Fi Status Request */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Notify Wi-Fi Status request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocNotifyWifiStatusIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Gets the mask of the events for which a client has
+                    registered. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetRegisteredEventsReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Gets the mask of the events for which a client has
+                    registered. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Registered Events Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Registered Events request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Event Registration Mask */
+  uint8_t eventRegMask_valid;  /**< Must be set to true if eventRegMask is being passed */
+  qmiLocEventRegMaskT_v02 eventRegMask;
+  /**<   Event registration mask.
+ Valid bitmasks: \n
+      - QMI_LOC_EVENT_MASK_POSITION_REPORT (0x00000001) --  The control point must enable this mask to receive position report
+       event indications.
+      - QMI_LOC_EVENT_MASK_GNSS_SV_INFO (0x00000002) --  The control point must enable this mask to receive satellite report
+       event indications. These reports are sent at a 1 Hz rate.
+      - QMI_LOC_EVENT_MASK_NMEA (0x00000004) --  The control point must enable this mask to receive NMEA reports for
+       position and satellites in view. The report is at a 1 Hz rate.
+      - QMI_LOC_EVENT_MASK_NI_NOTIFY_VERIFY_REQ (0x00000008) --  The control point must enable this mask to receive NI Notify/Verify request
+       event indications.
+      - QMI_LOC_EVENT_MASK_INJECT_TIME_REQ (0x00000010) --  The control point must enable this mask to receive time injection request
+       event indications.
+      - QMI_LOC_EVENT_MASK_INJECT_PREDICTED_ORBITS_REQ (0x00000020) --  The control point must enable this mask to receive predicted orbits request
+       event indications.
+      - QMI_LOC_EVENT_MASK_INJECT_POSITION_REQ (0x00000040) --  The control point must enable this mask to receive position injection request
+       event indications.
+      - QMI_LOC_EVENT_MASK_ENGINE_STATE (0x00000080) --  The control point must enable this mask to receive engine state report
+       event indications.
+      - QMI_LOC_EVENT_MASK_FIX_SESSION_STATE (0x00000100) --  The control point must enable this mask to receive fix session status report
+       event indications.
+      - QMI_LOC_EVENT_MASK_WIFI_REQ (0x00000200) --  The control point must enable this mask to receive Wi-Fi position request
+       event indications.
+      - QMI_LOC_EVENT_MASK_SENSOR_STREAMING_READY_STATUS (0x00000400) --  The control point must enable this mask to receive notifications from the
+       location engine indicating its readiness to accept data from the
+       sensors (accelerometer, gyroscope, etc.).
+      - QMI_LOC_EVENT_MASK_TIME_SYNC_REQ (0x00000800) --  The control point must enable this mask to receive time sync requests
+       from the GPS engine. Time sync enables the GPS engine to synchronize
+       its clock with the sensor processor's clock.
+      - QMI_LOC_EVENT_MASK_SET_SPI_STREAMING_REPORT (0x00001000) --  The control point must enable this mask to receive Stationary Position
+       Indicator (SPI) streaming report indications.
+      - QMI_LOC_EVENT_MASK_LOCATION_SERVER_CONNECTION_REQ (0x00002000) --  The control point must enable this mask to receive location server
+       requests. These requests are generated when the service wishes to
+       establish a connection with a location server.
+      - QMI_LOC_EVENT_MASK_NI_GEOFENCE_NOTIFICATION (0x00004000) --  The control point must enable this mask to receive notifications
+       related to network-initiated Geofences. These events notify the client
+       when a network-initiated Geofence is added, deleted, or edited.
+      - QMI_LOC_EVENT_MASK_GEOFENCE_GEN_ALERT (0x00008000) --  The control point must enable this mask to receive Geofence alerts.
+       These alerts are generated to inform the client of the changes that may
+       affect a Geofence, e.g., if GPS is turned off or if the network is
+       unavailable.
+      - QMI_LOC_EVENT_MASK_GEOFENCE_BREACH_NOTIFICATION (0x00010000) --  The control point must enable this mask to receive notifications when
+       a Geofence is breached. These events are generated when a UE enters
+       or leaves the perimeter of a Geofence. This breach report is for a single
+       Geofence .
+      - QMI_LOC_EVENT_MASK_PEDOMETER_CONTROL (0x00020000) --  The control point must enable this mask to register for pedometer
+       control requests from the location engine. The location engine sends
+       this event to control the injection of pedometer reports.
+      - QMI_LOC_EVENT_MASK_MOTION_DATA_CONTROL (0x00040000) --  The control point must enable this mask to register for motion data
+       control requests from the location engine. The location engine sends
+       this event to control the injection of motion data.
+      - QMI_LOC_EVENT_MASK_BATCH_FULL_NOTIFICATION (0x00080000) --  The control point must enable this mask to receive notification when
+       a batch is full. The location engine sends this event to notify of Batch Full
+       for ongoing batching session.
+      - QMI_LOC_EVENT_MASK_LIVE_BATCHED_POSITION_REPORT (0x00100000) --  The control point must enable this mask to receive position report
+       indications along with an ongoing batching session. The location engine sends
+       this event to notify the batched position report while a batching session
+       is ongoing.
+      - QMI_LOC_EVENT_MASK_INJECT_WIFI_AP_DATA_REQ (0x00200000) --  The control point must enable this mask to receive Wi-Fi AP data inject request
+       event indications.
+      - QMI_LOC_EVENT_MASK_GEOFENCE_BATCH_BREACH_NOTIFICATION (0x00400000) --  The control point must enable this mask to receive notifications when
+       a Geofence is breached. These events are generated when a UE enters
+       or leaves the perimeter of a Geofence. This breach notification is for
+       multiple Geofences. Breaches from multiple Geofences are all batched and
+       sent in the same notification .
+      - QMI_LOC_EVENT_MASK_VEHICLE_DATA_READY_STATUS (0x00800000) --  The control point must enable this mask to receive notifications from the
+       location engine indicating its readiness to accept vehicle data (vehicle
+       accelerometer, vehicle angular rate, vehicle odometry, etc.).
+      - QMI_LOC_EVENT_MASK_GNSS_MEASUREMENT_REPORT (0x01000000) --  The control point must enable this mask to receive system clock and satellite
+       measurement report events (system clock, SV time, Doppler, etc.). Reports are
+       generated only for the GNSS satellite constellations that are enabled using
+       QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG.
+      - QMI_LOC_EVENT_MASK_GNSS_SV_POLYNOMIAL_REPORT (0x02000000) --  The control point must enable this mask to receive satellite position
+        reports as polynomials. Reports are generated only for the GNSS satellite
+        constellations that are enabled using QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG.
+      - QMI_LOC_EVENT_MASK_GEOFENCE_PROXIMITY_NOTIFICATION (0x04000000) --  The control point must enable this mask to receive notifications when a Geofence proximity is entered
+  and exited. The proximity of a Geofence may be due to different contexts. These contexts are identified
+  using the context ID in this indication. The context of a Geofence may contain Wi-Fi area ID lists, IBeacon lists,
+  Cell-ID list, and so forth.
+      - QMI_LOC_EVENT_MASK_GDT_UPLOAD_BEGIN_REQ (0x08000000) --  The control point must enable this mask to receive Generic Data Transport (GDT)
+        session begin request event indications.
+      - QMI_LOC_EVENT_MASK_GDT_UPLOAD_END_REQ (0x10000000) --  The control point must enable this mask to receive GDT
+        session end request event indications.
+      - QMI_LOC_EVENT_MASK_GEOFENCE_BATCH_DWELL_NOTIFICATION (0x20000000) --  The control point must enable this mask to receive notifications when
+       a Geofence is dwelled. These events are generated when a UE enters
+       or leaves the perimeter of a Geofence and dwells inside or outside for a specified time.
+       This dwell notification is for multiple Geofences. Dwells from multiple Geofences are all batched and
+       sent in the same notification .
+      - QMI_LOC_EVENT_MASK_GET_TIME_ZONE_REQ (0x40000000) --  The control point must enable this mask to receive requests for time zone information from
+       the service. These events are generated when there is a need for time zone information in the
+       modem .
+ */
+}qmiLocGetRegisteredEventsIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCOPERATIONMODEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_OPER_MODE_DEFAULT_V02 = 1, /**<  Use the default engine mode  */
+  eQMI_LOC_OPER_MODE_MSB_V02 = 2, /**<  Use the MS-based mode  */
+  eQMI_LOC_OPER_MODE_MSA_V02 = 3, /**<  Use the MS-assisted mode  */
+  eQMI_LOC_OPER_MODE_STANDALONE_V02 = 4, /**<  Use Standalone mode  */
+  eQMI_LOC_OPER_MODE_CELL_ID_V02 = 5, /**<  Use cell ID; this mode is only valid for GSM/UMTS networks  */
+  eQMI_LOC_OPER_MODE_WWAN_V02 = 6, /**<  Use WWAN measurements to calculate the position; if this mode is
+       set, AFLT will be used for 1X networks and OTDOA will be used
+       for LTE networks  */
+  QMILOCOPERATIONMODEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocOperationModeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Tells the engine to use the specified operation mode while
+                    making the position fixes. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Operation Mode */
+  qmiLocOperationModeEnumT_v02 operationMode;
+  /**<   Preferred operation mode.
+
+ Valid values: \n
+      - eQMI_LOC_OPER_MODE_DEFAULT (1) --  Use the default engine mode
+      - eQMI_LOC_OPER_MODE_MSB (2) --  Use the MS-based mode
+      - eQMI_LOC_OPER_MODE_MSA (3) --  Use the MS-assisted mode
+      - eQMI_LOC_OPER_MODE_STANDALONE (4) --  Use Standalone mode
+      - eQMI_LOC_OPER_MODE_CELL_ID (5) --  Use cell ID; this mode is only valid for GSM/UMTS networks
+      - eQMI_LOC_OPER_MODE_WWAN (6) --  Use WWAN measurements to calculate the position; if this mode is
+       set, AFLT will be used for 1X networks and OTDOA will be used
+       for LTE networks
+ */
+}qmiLocSetOperationModeReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Tells the engine to use the specified operation mode while
+                    making the position fixes. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set Operation Mode Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set Operation Mode request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocSetOperationModeIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Gets the current operation mode from the engine. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetOperationModeReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Gets the current operation mode from the engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Operation Mode Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Operation Mode request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Operation Mode */
+  uint8_t operationMode_valid;  /**< Must be set to true if operationMode is being passed */
+  qmiLocOperationModeEnumT_v02 operationMode;
+  /**<   Current operation mode.
+
+ Valid values: \n
+      - eQMI_LOC_OPER_MODE_DEFAULT (1) --  Use the default engine mode
+      - eQMI_LOC_OPER_MODE_MSB (2) --  Use the MS-based mode
+      - eQMI_LOC_OPER_MODE_MSA (3) --  Use the MS-assisted mode
+      - eQMI_LOC_OPER_MODE_STANDALONE (4) --  Use Standalone mode
+      - eQMI_LOC_OPER_MODE_CELL_ID (5) --  Use cell ID; this mode is only valid for GSM/UMTS networks
+      - eQMI_LOC_OPER_MODE_WWAN (6) --  Use WWAN measurements to calculate the position; if this mode is
+       set, AFLT will be used for 1X networks and OTDOA will be used
+       for LTE networks
+ */
+}qmiLocGetOperationModeIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to set the SPI status, which
+                    indicates whether the device is stationary. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Stationary Status */
+  uint8_t stationary;
+  /**<   Indicates whether the device is stationary:
+       \begin{itemize1}
+       \item    0x00 (FALSE) -- Device is not stationary
+       \item    0x01 (TRUE)  -- Device is stationary
+       \vspace{-0.18in} \end{itemize1}*/
+
+  /* Optional */
+  /*  Confidence */
+  uint8_t confidenceStationary_valid;  /**< Must be set to true if confidenceStationary is being passed */
+  uint8_t confidenceStationary;
+  /**<   Confidence in the Stationary state expressed as a percentage.\n
+       - Range: 0 to 100 */
+}qmiLocSetSpiStatusReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to set the SPI status, which
+                    indicates whether the device is stationary. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Status of SPI Status Request */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the SPI Status request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocSetSpiStatusIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint8_t qmiLocSensorDataFlagMaskT_v02;
+#define QMI_LOC_SENSOR_DATA_FLAG_SIGN_REVERSAL_V02 ((qmiLocSensorDataFlagMaskT_v02)0x01) /**<  Bitmask to specify that a sign reversal is required while interpreting
+     the sensor data; only applies to the accelerometer samples  */
+#define QMI_LOC_SENSOR_DATA_FLAG_SENSOR_TIME_IS_MODEM_TIME_V02 ((qmiLocSensorDataFlagMaskT_v02)0x02) /**<  Bitmask to specify that the sensor time stamp is the same as the modem
+       time stamp  */
+#define QMI_LOC_SENSOR_DATA_FLAG_CALIBRATED_DATA_V02 ((qmiLocSensorDataFlagMaskT_v02)0x04) /**<  Bitmask to specify that the injected sensor data is calibrated  */
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSENSORDATATIMESOURCEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SENSOR_TIME_SOURCE_UNSPECIFIED_V02 = 0, /**<  Sensor time source is unspecified  */
+  eQMI_LOC_SENSOR_TIME_SOURCE_COMMON_V02 = 1, /**<  Time source is common between the sensors and
+       the location engine  */
+  QMILOCSENSORDATATIMESOURCEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocSensorDataTimeSourceEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint16_t timeOffset;
+  /**<   Sample time offset. This time offset must be
+       relative to the timestamp of the first sensor data sample.\n
+       - Units: Milliseconds */
+
+  float xAxis;
+  /**<   Sensor x-axis sample. \n
+       - Units Accelerometer: Meters/seconds^2 \n
+       - Units Gyroscope:     Radians/second \n
+       - Units Magnetometer:  microTesla */
+
+  float yAxis;
+  /**<   Sensor y-axis sample. \n
+       - Units Accelerometer: Meters/seconds^2 \n
+       - Units Gyroscope:     Radians/second \n
+       - Units Magnetometer:  microTesla */
+
+  float zAxis;
+  /**<   Sensor z-axis sample. \n
+       - Units Accelerometer: Meters/seconds^2 ) \n
+       - Units Gyroscope:     Radians/second \n
+       - Units Magnetometer:  microTesla */
+}qmiLoc3AxisSensorSampleStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t timeOfFirstSample;
+  /**<   Denotes a full 32-bit timestamp of the first (oldest) sample in this
+       message.The timestamp is in the time reference scale that is
+       used by the sensor time source.\n
+       - Units: Milliseconds */
+
+  qmiLocSensorDataFlagMaskT_v02 flags;
+  /**<   Flags to indicate any deviation from the default measurement
+ assumptions. All unused bits in this field must be set to 0.
+
+ Valid bitmasks:
+      - QMI_LOC_SENSOR_DATA_FLAG_SIGN_REVERSAL (0x01) --  Bitmask to specify that a sign reversal is required while interpreting
+     the sensor data; only applies to the accelerometer samples
+      - QMI_LOC_SENSOR_DATA_FLAG_SENSOR_TIME_IS_MODEM_TIME (0x02) --  Bitmask to specify that the sensor time stamp is the same as the modem
+       time stamp
+      - QMI_LOC_SENSOR_DATA_FLAG_CALIBRATED_DATA (0x04) --  Bitmask to specify that the injected sensor data is calibrated  */
+
+  uint32_t sensorData_len;  /**< Must be set to # of elements in sensorData */
+  qmiLoc3AxisSensorSampleStructT_v02 sensorData[QMI_LOC_SENSOR_DATA_MAX_SAMPLES_V02];
+  /**<   Variable length array to specify sensor samples. \n
+       - Maximum length of the array: 50 */
+}qmiLoc3AxisSensorSampleListStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint16_t timeOffset;
+  /**<   Sample time offset. This time offset must be
+       relative to the timestamp of the first sensor sample.\n
+       - Units: Milliseconds */
+
+  float temperature;
+  /**<   Sensor temperature. \n
+       - Type: Floating point \n
+       - Units: Degrees Celsius \n
+       - Range: -50 to +100.00 */
+}qmiLocSensorTemperatureSampleStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocSensorDataTimeSourceEnumT_v02 timeSource;
+  /**<   Denotes the time source of the sensor data. Location service will use
+ this field to identify the time reference used in the
+ sensor data timestamps.
+
+ Valid values: \n
+      - eQMI_LOC_SENSOR_TIME_SOURCE_UNSPECIFIED (0) --  Sensor time source is unspecified
+      - eQMI_LOC_SENSOR_TIME_SOURCE_COMMON (1) --  Time source is common between the sensors and
+       the location engine
+ */
+
+  uint32_t timeOfFirstSample;
+  /**<   Denotes a full 32-bit timestamp of the first (oldest) sample in this
+       message. The timestamp is in the time reference scale that is
+       used by the sensor time source.\n
+       - Units: Milliseconds */
+
+  uint32_t temperatureData_len;  /**< Must be set to # of elements in temperatureData */
+  qmiLocSensorTemperatureSampleStructT_v02 temperatureData[QMI_LOC_SENSOR_DATA_MAX_SAMPLES_V02];
+  /**<   Variable length array to specify sensor temperature samples. \n
+       - Maximum length of the array: 50 */
+}qmiLocSensorTemperatureSampleListStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to inject sensor data into the
+                    GNSS location engine. */
+typedef struct {
+
+  /* Optional */
+  /*  Opaque Identifier */
+  uint8_t opaqueIdentifier_valid;  /**< Must be set to true if opaqueIdentifier is being passed */
+  uint32_t opaqueIdentifier;
+  /**<   An opaque identifier that is sent in by the client that will be echoed
+       in the indication so the client can relate the indication to the
+       request. */
+
+  /* Optional */
+  /*  3-Axis Accelerometer Data */
+  uint8_t threeAxisAccelData_valid;  /**< Must be set to true if threeAxisAccelData is being passed */
+  qmiLoc3AxisSensorSampleListStructT_v02 threeAxisAccelData;
+  /**<   \vspace{0.06in} \n Accelerometer sensor samples. */
+
+  /* Optional */
+  /*  3-Axis Gyroscope Data */
+  uint8_t threeAxisGyroData_valid;  /**< Must be set to true if threeAxisGyroData is being passed */
+  qmiLoc3AxisSensorSampleListStructT_v02 threeAxisGyroData;
+  /**<   \vspace{0.06in} \n Gyroscope sensor samples. */
+
+  /* Optional */
+  /*  3-Axis Accelerometer Data Time Source */
+  uint8_t threeAxisAccelDataTimeSource_valid;  /**< Must be set to true if threeAxisAccelDataTimeSource is being passed */
+  qmiLocSensorDataTimeSourceEnumT_v02 threeAxisAccelDataTimeSource;
+  /**<   Time source for the 3-axis accelerometer data. The location service uses
+ this field to identify the time reference used in the accelerometer data
+ timestamps. If not specified, the location service assumes that the
+ time source for the accelereometer data is unknown. \n
+ Values: \n
+      - eQMI_LOC_SENSOR_TIME_SOURCE_UNSPECIFIED (0) --  Sensor time source is unspecified
+      - eQMI_LOC_SENSOR_TIME_SOURCE_COMMON (1) --  Time source is common between the sensors and
+       the location engine
+ */
+
+  /* Optional */
+  /*  3-Axis Gyroscope Data Time Source */
+  uint8_t threeAxisGyroDataTimeSource_valid;  /**< Must be set to true if threeAxisGyroDataTimeSource is being passed */
+  qmiLocSensorDataTimeSourceEnumT_v02 threeAxisGyroDataTimeSource;
+  /**<   Time source for the 3-axis gyroscope data. The location service uses
+ this field to identify the time reference used in the gyroscope data
+ timestamps. If not specified, the location service assumes that the
+ time source for the gyroscope data is unknown. \n
+ Values: \n
+      - eQMI_LOC_SENSOR_TIME_SOURCE_UNSPECIFIED (0) --  Sensor time source is unspecified
+      - eQMI_LOC_SENSOR_TIME_SOURCE_COMMON (1) --  Time source is common between the sensors and
+       the location engine
+ */
+
+  /* Optional */
+  /*  Accelerometer Temperature Data */
+  uint8_t accelTemperatureData_valid;  /**< Must be set to true if accelTemperatureData is being passed */
+  qmiLocSensorTemperatureSampleListStructT_v02 accelTemperatureData;
+  /**<   \vspace{0.06in}  \nAccelerometer temperature samples. This data is optional and does not
+       have to be included in the message along with accelerometer data. */
+
+  /* Optional */
+  /*  Gyroscope Temperature Data */
+  uint8_t gyroTemperatureData_valid;  /**< Must be set to true if gyroTemperatureData is being passed */
+  qmiLocSensorTemperatureSampleListStructT_v02 gyroTemperatureData;
+  /**<   \vspace{0.06in} \n Gyroscope temperature samples. This data is optional and does not
+       have to be included in the message along with gyroscope data. */
+
+  /* Optional */
+  /*  3-Axis Magnetometer Data */
+  uint8_t threeAxisMagData_valid;  /**< Must be set to true if threeAxisMagData is being passed */
+  qmiLoc3AxisSensorSampleListStructT_v02 threeAxisMagData;
+  /**<   \vspace{0.06in} \n Magnetometer sensor samples. */
+
+  /* Optional */
+  /*  3-Axis Magnetometer Data Time Source */
+  uint8_t threeAxisMagDataTimeSource_valid;  /**< Must be set to true if threeAxisMagDataTimeSource is being passed */
+  qmiLocSensorDataTimeSourceEnumT_v02 threeAxisMagDataTimeSource;
+  /**<   Time source for the 3-axis magnetometer data. The location service uses
+ this field to identify the time reference used in the magnetometer data
+ timestamps. If not specified, the location service assumes that the
+ time source for the magnetometer data is unknown. \n
+ Values: \n
+      - eQMI_LOC_SENSOR_TIME_SOURCE_UNSPECIFIED (0) --  Sensor time source is unspecified
+      - eQMI_LOC_SENSOR_TIME_SOURCE_COMMON (1) --  Time source is common between the sensors and
+       the location engine
+ */
+}qmiLocInjectSensorDataReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to inject sensor data into the
+                    GNSS location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Inject Sensor Data Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Inject Sensor Data request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Opaque Identifier */
+  uint8_t opaqueIdentifier_valid;  /**< Must be set to true if opaqueIdentifier is being passed */
+  uint32_t opaqueIdentifier;
+  /**<   Opaque identifier that was sent in by the client echoed
+       so the client can relate the indication to the request. */
+
+  /* Optional */
+  /*  Accelerometer Samples Accepted */
+  uint8_t threeAxisAccelSamplesAccepted_valid;  /**< Must be set to true if threeAxisAccelSamplesAccepted is being passed */
+  uint8_t threeAxisAccelSamplesAccepted;
+  /**<   Lets the client know how many 3-axis accelerometer samples
+       were accepted. This field is present only if the accelerometer
+       samples were sent in the request. */
+
+  /* Optional */
+  /*  Gyroscope Samples Accepted */
+  uint8_t threeAxisGyroSamplesAccepted_valid;  /**< Must be set to true if threeAxisGyroSamplesAccepted is being passed */
+  uint8_t threeAxisGyroSamplesAccepted;
+  /**<   Lets the client know how many 3-axis gyroscope samples were
+       accepted. This field is present only if the gyroscope
+       samples were sent in the request. */
+
+  /* Optional */
+  /*  Accelerometer Temperature Samples Accepted */
+  uint8_t accelTemperatureSamplesAccepted_valid;  /**< Must be set to true if accelTemperatureSamplesAccepted is being passed */
+  uint8_t accelTemperatureSamplesAccepted;
+  /**<   Lets the client know how many accelerometer temperature
+       samples were accepted. This field is present only if the accelerometer
+       temperature samples were sent in the request. */
+
+  /* Optional */
+  /*  Gyroscope Temperature Samples Accepted */
+  uint8_t gyroTemperatureSamplesAccepted_valid;  /**< Must be set to true if gyroTemperatureSamplesAccepted is being passed */
+  uint8_t gyroTemperatureSamplesAccepted;
+  /**<   Lets the client know how many gyroscope temperature samples
+       were accepted. This field is present only if the gyroscope
+       temperature samples were sent in the request. */
+
+  /* Optional */
+  /*  Magnetometer Samples Accepted */
+  uint8_t threeAxisMagSamplesAccepted_valid;  /**< Must be set to true if threeAxisMagSamplesAccepted is being passed */
+  uint8_t threeAxisMagSamplesAccepted;
+  /**<   Lets the client know how many 3-axis magnetometer samples
+       were accepted. This field is present only if the magnetometer
+       samples were sent in the request. */
+}qmiLocInjectSensorDataIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to inject time sync data. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Reference Time Sync Counter */
+  uint32_t refCounter;
+  /**<   Must be set to the value that was sent to the control point when the
+       GNSS location engine requested time sync injection. */
+
+  /* Mandatory */
+  /*  Sensor Receive Time */
+  uint32_t sensorProcRxTime;
+  /**<   Value of the sensor time when the control point received the
+       Time Sync Inject request from the GNSS location engine.
+
+       Must be monotonically increasing, jitter @latexonly $\leq$ @endlatexonly 1
+       millisecond, never stopping until the process is rebooted.\n
+       - Units: Milliseconds */
+
+  /* Mandatory */
+  /*  Sensor Transmit Time */
+  uint32_t sensorProcTxTime;
+  /**<   Value of the sensor time when the control point injects this message
+       for use by the GNSS location engine.
+
+       Must be monotonically increasing, jitter @latexonly $\leq$ @endlatexonly 1
+       millisecond, never stopping until the process is rebooted.\n
+       - Units: Milliseconds */
+}qmiLocInjectTimeSyncDataReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to inject time sync data. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Inject Time Sync Data Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Inject Time Sync Data request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocInjectTimeSyncDataIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCCRADLEMOUNTSTATEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_CRADLE_STATE_NOT_MOUNTED_V02 = 0, /**<  Device is mounted on the cradle */
+  eQMI_LOC_CRADLE_STATE_MOUNTED_V02 = 1, /**<  Device is not mounted on the cradle */
+  eQMI_LOC_CRADLE_STATE_UNKNOWN_V02 = 2, /**<  Unknown cradle mount state */
+  QMILOCCRADLEMOUNTSTATEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocCradleMountStateEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to get the current
+                    cradle mount configuration. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetCradleMountConfigReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to get the current
+                    cradle mount configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Cradle Mount Config Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Cradle Mount Configuration request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Cradle Mount State */
+  uint8_t cradleMountState_valid;  /**< Must be set to true if cradleMountState is being passed */
+  qmiLocCradleMountStateEnumT_v02 cradleMountState;
+  /**<   Cradle Mount state set by the control point.
+
+ Valid values: \n
+      - eQMI_LOC_CRADLE_STATE_NOT_MOUNTED (0) --  Device is mounted on the cradle
+      - eQMI_LOC_CRADLE_STATE_MOUNTED (1) --  Device is not mounted on the cradle
+      - eQMI_LOC_CRADLE_STATE_UNKNOWN (2) --  Unknown cradle mount state
+ */
+
+  /* Optional */
+  /*  Cradle Mount Confidence */
+  uint8_t confidenceCradleMountState_valid;  /**< Must be set to true if confidenceCradleMountState is being passed */
+  uint8_t confidenceCradleMountState;
+  /**<   Confidence of the Cradle Mount state expressed as a percentage.\n
+       - Range: 0 to 100 */
+}qmiLocGetCradleMountConfigIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to set the current
+                    cradle mount configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Cradle Mount State */
+  qmiLocCradleMountStateEnumT_v02 cradleMountState;
+  /**<   Cradle Mount state set by the control point.
+
+ Valid values: \n
+      - eQMI_LOC_CRADLE_STATE_NOT_MOUNTED (0) --  Device is mounted on the cradle
+      - eQMI_LOC_CRADLE_STATE_MOUNTED (1) --  Device is not mounted on the cradle
+      - eQMI_LOC_CRADLE_STATE_UNKNOWN (2) --  Unknown cradle mount state
+ */
+
+  /* Optional */
+  /*  Cradle Mount Confidence */
+  uint8_t confidenceCradleMountState_valid;  /**< Must be set to true if confidenceCradleMountState is being passed */
+  uint8_t confidenceCradleMountState;
+  /**<   Confidence in the Cradle Mount state expressed as a percentage.\n
+       - Range: 0 to 100 */
+}qmiLocSetCradleMountConfigReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to set the current
+                    cradle mount configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set Cradle Mount Config Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set Cradle Mount Configuration request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocSetCradleMountConfigIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCEXTERNALPOWERCONFIGENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_EXTERNAL_POWER_NOT_CONNECTED_V02 = 0, /**<  Device is not connected to an external power source  */
+  eQMI_LOC_EXTERNAL_POWER_CONNECTED_V02 = 1, /**<  Device is connected to an external power source  */
+  eQMI_LOC_EXTERNAL_POWER_UNKNOWN_V02 = 2, /**<  Unknown external power state  */
+  QMILOCEXTERNALPOWERCONFIGENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocExternalPowerConfigEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to get the current
+                    external power configuration. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetExternalPowerConfigReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to get the current
+                    external power configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Ext Power Config Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get External Power Configuration request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  External Power State */
+  uint8_t externalPowerState_valid;  /**< Must be set to true if externalPowerState is being passed */
+  qmiLocExternalPowerConfigEnumT_v02 externalPowerState;
+  /**<   Power state; injected by the control point.
+
+ Valid values: \n
+      - eQMI_LOC_EXTERNAL_POWER_NOT_CONNECTED (0) --  Device is not connected to an external power source
+      - eQMI_LOC_EXTERNAL_POWER_CONNECTED (1) --  Device is connected to an external power source
+      - eQMI_LOC_EXTERNAL_POWER_UNKNOWN (2) --  Unknown external power state
+ */
+}qmiLocGetExternalPowerConfigIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to set the current
+                    external power configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  External Power State */
+  qmiLocExternalPowerConfigEnumT_v02 externalPowerState;
+  /**<   Power state; injected by the control point.
+
+ Valid values: \n
+      - eQMI_LOC_EXTERNAL_POWER_NOT_CONNECTED (0) --  Device is not connected to an external power source
+      - eQMI_LOC_EXTERNAL_POWER_CONNECTED (1) --  Device is connected to an external power source
+      - eQMI_LOC_EXTERNAL_POWER_UNKNOWN (2) --  Unknown external power state
+ */
+}qmiLocSetExternalPowerConfigReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to set the current
+                    external power configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set Ext Power Config Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set External Power Configuration request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocSetExternalPowerConfigIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSERVERPDNENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV4_V02 = 0x01, /**<  IPv4 PDN type  */
+  eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV6_V02 = 0x02, /**<  IPv6 PDN type  */
+  eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV4V6_V02 = 0x03, /**<  IPv4v6 PDN type  */
+  eQMI_LOC_APN_PROFILE_PDN_TYPE_PPP_V02 = 0x04, /**<  PPP PDN type  */
+  QMILOCSERVERPDNENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocServerPDNEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocServerPDNEnumT_v02 pdnType;
+  /**<   PDN type of the APN profile.
+
+ Valid values: \n
+      - eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV4 (0x01) --  IPv4 PDN type
+      - eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV6 (0x02) --  IPv6 PDN type
+      - eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV4V6 (0x03) --  IPv4v6 PDN type
+      - eQMI_LOC_APN_PROFILE_PDN_TYPE_PPP (0x04) --  PPP PDN type
+ */
+
+  char apnName[QMI_LOC_MAX_APN_NAME_LENGTH_V02 + 1];
+  /**<   APN name.
+       \begin{itemize1}
+       \item    Type: NULL-terminated string
+       \item    Maximum string length (including NULL terminator): 101
+       \vspace{-0.18in} \end{itemize1}
+  */
+}qmiLocApnProfilesStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSERVERREQSTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SERVER_REQ_STATUS_SUCCESS_V02 = 1, /**<  Location server request was successful  */
+  eQMI_LOC_SERVER_REQ_STATUS_FAILURE_V02 = 2, /**<  Location server request failed  */
+  QMILOCSERVERREQSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocServerReqStatusEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to inform the service about the
+                    status of the location server connection request that the
+                    service may have sent via the
+                    QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND event. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Connection Handle */
+  uint32_t connHandle;
+  /**<   Connection handle that the service specified in the
+       Location Server Connection request event. */
+
+  /* Mandatory */
+  /*  Request Type */
+  qmiLocServerRequestEnumT_v02 requestType;
+  /**<   Type of connection request service that was specified in the
+ Location Server Connection Request event.
+
+ Valid values: \n
+      - eQMI_LOC_SERVER_REQUEST_OPEN (1) --  Open a connection to the location server
+      - eQMI_LOC_SERVER_REQUEST_CLOSE (2) --  Close a connection to the location server
+ */
+
+  /* Mandatory */
+  /*  Connection Status */
+  qmiLocServerReqStatusEnumT_v02 statusType;
+  /**<   Status of the Connection request.
+
+ Valid values: \n
+      - eQMI_LOC_SERVER_REQ_STATUS_SUCCESS (1) --  Location server request was successful
+      - eQMI_LOC_SERVER_REQ_STATUS_FAILURE (2) --  Location server request failed
+ */
+
+  /* Optional */
+  /*  APN Profile */
+  uint8_t apnProfile_valid;  /**< Must be set to true if apnProfile is being passed */
+  qmiLocApnProfilesStructT_v02 apnProfile;
+  /**<   \vspace{0.06in} \n Access Point Name (APN) profile information is present only when
+       requestType is OPEN and statusType is SUCCESS. */
+}qmiLocInformLocationServerConnStatusReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to inform the service about the
+                    status of the location server connection request that the
+                    service may have sent via the
+                    QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND event. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Status of Inform Loc Server Conn Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Inform Location Server Connection Status request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocInformLocationServerConnStatusIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCVXVERSIONENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_VX_VERSION_V1_ONLY_V02 = 1, /**<  V1 VX version  */
+  eQMI_LOC_VX_VERSION_V2_ONLY_V02 = 2, /**<  V2 VX version  */
+  QMILOCVXVERSIONENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocVxVersionEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSUPLVERSIONENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SUPL_VERSION_1_0_V02 = 1, /**<  SUPL version 1.0  */
+  eQMI_LOC_SUPL_VERSION_2_0_V02 = 2, /**<  SUPL version 2.0  */
+  QMILOCSUPLVERSIONENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocSuplVersionEnumT_v02;
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocLppConfigMaskT_v02;
+#define QMI_LOC_LPP_CONFIG_ENABLE_USER_PLANE_V02 ((qmiLocLppConfigMaskT_v02)0x00000001) /**<  Enable user plane configuration for LTE Positioning Profile (LPP)  */
+#define QMI_LOC_LPP_CONFIG_ENABLE_CONTROL_PLANE_V02 ((qmiLocLppConfigMaskT_v02)0x00000002) /**<  Enable control plane configuration for LPP  */
+typedef uint32_t qmiLocAssistedGlonassProtocolMaskT_v02;
+#define QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_RRC_CP_V02 ((qmiLocAssistedGlonassProtocolMaskT_v02)0x00000001) /**<  Assisted GLONASS is supported over RRC in the control plane  */
+#define QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_RRLP_UP_V02 ((qmiLocAssistedGlonassProtocolMaskT_v02)0x00000002) /**<  Assisted GLONASS is supported over RRLP in the user plane  */
+#define QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_LPP_UP_V02 ((qmiLocAssistedGlonassProtocolMaskT_v02)0x00000004) /**<  Assisted GLONASS is supported over LPP in the user plane;
+       QMI_LOC_LPP_CONFIG_ENABLE_USER_PLANE must be set
+       in the LPP configuration for this to take effect  */
+#define QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_LPP_CP_V02 ((qmiLocAssistedGlonassProtocolMaskT_v02)0x00000008) /**<  Assisted GLONASS is supported over LPP in the control plane;
+       QMI_LOC_LPP_CONFIG_ENABLE_CONTROL_PLANE must be set
+       in the LPP configuration for this to take effect  */
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSUPLHASHALGOENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SUPL_HASH_ALGO_SHA1_V02 = 0, /**<  SHA-1 hash algorithm for SUPL version 2.0 or later  */
+  eQMI_LOC_SUPL_HASH_ALGO_SHA256_V02 = 1, /**<  SHA-256 hash algorithm for SUPL version 2.0 or later  */
+  QMILOCSUPLHASHALGOENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocSuplHashAlgoEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSUPLTLSVERSIONENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SUPL_TLS_VERSION_1_0_V02 = 0, /**<  SUPL TLS version 1.0  */
+  eQMI_LOC_SUPL_TLS_VERSION_1_1_V02 = 1, /**<  SUPL TLS version 1.1  */
+  QMILOCSUPLTLSVERSIONENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocSuplTlsVersionEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCEMERGENCYPROTOCOLENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_EMERGENCY_PROTOCOL_WCDMA_CP_V02 = 0, /**<  Use Control Plane Protocol during an emergency while on WCDMA  */
+  eQMI_LOC_EMERGENCY_PROTOCOL_WCDMA_UP_V02 = 1, /**<  Use SUPL 2.0 emergency services during an emergency while on WCDMA  */
+  QMILOCEMERGENCYPROTOCOLENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocEmergencyProtocolEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to configure parameters stored
+                    in the nonvolatile memory. */
+typedef struct {
+
+  /* Optional */
+  /*  SUPL Security */
+  uint8_t suplSecurity_valid;  /**< Must be set to true if suplSecurity is being passed */
+  uint8_t suplSecurity;
+  /**<   Indicates whether SUPL security is enabled.
+       \begin{itemize1}
+       \item    0x01 (TRUE) -- SUPL security is enabled
+       \item    0x00 (FALSE) -- SUPL security is disabled
+       \vspace{-0.18in} \end{itemize1} */
+
+  /* Optional */
+  /*  VX Version */
+  uint8_t vxVersion_valid;  /**< Must be set to true if vxVersion is being passed */
+  qmiLocVxVersionEnumT_v02 vxVersion;
+  /**<   VX version.
+
+ Valid values: \n
+      - eQMI_LOC_VX_VERSION_V1_ONLY (1) --  V1 VX version
+      - eQMI_LOC_VX_VERSION_V2_ONLY (2) --  V2 VX version
+ */
+
+  /* Optional */
+  /*  SUPL Version */
+  uint8_t suplVersion_valid;  /**< Must be set to true if suplVersion is being passed */
+  qmiLocSuplVersionEnumT_v02 suplVersion;
+  /**<   SUPL version.
+
+ Valid values: \n
+      - eQMI_LOC_SUPL_VERSION_1_0 (1) --  SUPL version 1.0
+      - eQMI_LOC_SUPL_VERSION_2_0 (2) --  SUPL version 2.0
+ */
+
+  /* Optional */
+  /*  LPP Configuration */
+  uint8_t lppConfig_valid;  /**< Must be set to true if lppConfig is being passed */
+  qmiLocLppConfigMaskT_v02 lppConfig;
+  /**<   LTE Positioning Profile (LPP) configuration.
+
+      Valid bitmasks: \begin{itemize1}
+      \item    0x00000001 -- LPP_CONFIG_ ENABLE_USER_PLANE
+      \item    0x00000002 -- LPP_CONFIG_ ENABLE_CONTROL_PLANE
+      \vspace{-0.18in} \end{itemize1}
+  */
+
+  /* Optional */
+  /*  Assisted GLONASS Protocol Mask */
+  uint8_t assistedGlonassProtocolMask_valid;  /**< Must be set to true if assistedGlonassProtocolMask is being passed */
+  qmiLocAssistedGlonassProtocolMaskT_v02 assistedGlonassProtocolMask;
+  /**<   Configures the protocols that the location service supports
+ for assisted GLONASS.
+
+ Valid bitmasks: \n
+      - QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_RRC_CP (0x00000001) --  Assisted GLONASS is supported over RRC in the control plane
+      - QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_RRLP_UP (0x00000002) --  Assisted GLONASS is supported over RRLP in the user plane
+      - QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_LPP_UP (0x00000004) --  Assisted GLONASS is supported over LPP in the user plane;
+       QMI_LOC_LPP_CONFIG_ENABLE_USER_PLANE must be set
+       in the LPP configuration for this to take effect
+      - QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_LPP_CP (0x00000008) --  Assisted GLONASS is supported over LPP in the control plane;
+       QMI_LOC_LPP_CONFIG_ENABLE_CONTROL_PLANE must be set
+       in the LPP configuration for this to take effect
+ */
+
+  /* Optional */
+  /*  SUPL Hash Algorithm */
+  uint8_t suplHashAlgo_valid;  /**< Must be set to true if suplHashAlgo is being passed */
+  qmiLocSuplHashAlgoEnumT_v02 suplHashAlgo;
+  /**<   SUPL hash algorithm to be used.
+
+ Valid values: \n
+      - eQMI_LOC_SUPL_HASH_ALGO_SHA1 (0) --  SHA-1 hash algorithm for SUPL version 2.0 or later
+      - eQMI_LOC_SUPL_HASH_ALGO_SHA256 (1) --  SHA-256 hash algorithm for SUPL version 2.0 or later
+ */
+
+  /* Optional */
+  /*  SUPL TLS Version */
+  uint8_t suplTlsVersion_valid;  /**< Must be set to true if suplTlsVersion is being passed */
+  qmiLocSuplTlsVersionEnumT_v02 suplTlsVersion;
+  /**<   SUPL Transport Layer Security (TLS) version. This configuration is only
+ applicable to SUPL 2.0 or later, as SUPL 1.0 always uses TLS version 1.0.
+
+ Valid values: \n
+      - eQMI_LOC_SUPL_TLS_VERSION_1_0 (0) --  SUPL TLS version 1.0
+      - eQMI_LOC_SUPL_TLS_VERSION_1_1 (1) --  SUPL TLS version 1.1
+ */
+
+  /* Optional */
+  /*  Emergency Protocol */
+  uint8_t emergencyProtocol_valid;  /**< Must be set to true if emergencyProtocol is being passed */
+  qmiLocEmergencyProtocolEnumT_v02 emergencyProtocol;
+  /**<   Configures the protocol to be used during an emergency. \n
+ \textbf{Note:} Currently, this can only be selected on WCDMA. For GSM
+ and 1X, the UE only allows a control plane NI trigger for positioning.
+ For LTE, the UE allows either a SUPL or a control plane NI trigger.
+
+ Valid values: \n
+      - eQMI_LOC_EMERGENCY_PROTOCOL_WCDMA_CP (0) --  Use Control Plane Protocol during an emergency while on WCDMA
+      - eQMI_LOC_EMERGENCY_PROTOCOL_WCDMA_UP (1) --  Use SUPL 2.0 emergency services during an emergency while on WCDMA
+ */
+
+  /* Optional */
+  /*  Wi-Fi Scan Injection Timeout Period */
+  uint8_t wifiScanInjectTimeout_valid;  /**< Must be set to true if wifiScanInjectTimeout is being passed */
+  uint8_t wifiScanInjectTimeout;
+  /**<   Configures the timeout duration that the service waits for scan results
+  injection from the control point after the event notification is sent. \n
+       \textbf{Note:} The timeout value is in seconds. \n
+         Values: \n
+       0 to 10 seconds \n
+       The minimum value (0 seconds) is the default. At this value, the service
+       disables sending the Wi-Fi scan injection notification and ignores any
+       scan results injection request.
+  */
+}qmiLocSetProtocolConfigParametersReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint64_t qmiLocProtocolConfigParamMaskT_v02;
+#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_SECURITY_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000001ull) /**<  Mask for the SUPL security configuration parameter  */
+#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_VX_VERSION_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000002ull) /**<  Mask for the VX version configuration parameter  */
+#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_VERSION_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000004ull) /**<  Mask for the SUPL version configuration parameter  */
+#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_LPP_CONFIG_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000008ull) /**<  Mask for the LPP configuration parameter  */
+#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_ASSISTED_GLONASS_PROTOCOL_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000010ull) /**<  Mask for the assisted GLONASS configuration parameter  */
+#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_HASH_ALGO_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000020ull) /**<  Mask for the SUPL hash algorithm configuration parameter  */
+#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_TLS_VERSION_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000040ull) /**<  Mask for the SUPL TLS version configuration parameter  */
+#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_EMERGENCY_PROTOCOL_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000080ull) /**<  Mask for the emergency protocol configuration parameter  */
+#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_WIFI_SCAN_INJECT_TIMEOUT_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000100ull) /**<  Mask for the Wi-Fi scan injection timeout configuration parameter  */
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to configure parameters stored
+                    in the nonvolatile memory. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set Config Params Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set Configuration Parameters request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Failed Parameters */
+  uint8_t failedProtocolConfigParamMask_valid;  /**< Must be set to true if failedProtocolConfigParamMask is being passed */
+  qmiLocProtocolConfigParamMaskT_v02 failedProtocolConfigParamMask;
+  /**<   Identifies parameters that were not set successfully. This field
+ is sent only if the status is not SUCCESS.
+
+ Valid bitmasks: \n
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_SECURITY (0x0000000000000001) --  Mask for the SUPL security configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_VX_VERSION (0x0000000000000002) --  Mask for the VX version configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_VERSION (0x0000000000000004) --  Mask for the SUPL version configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_LPP_CONFIG (0x0000000000000008) --  Mask for the LPP configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_ASSISTED_GLONASS_PROTOCOL (0x0000000000000010) --  Mask for the assisted GLONASS configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_HASH_ALGO (0x0000000000000020) --  Mask for the SUPL hash algorithm configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_TLS_VERSION (0x0000000000000040) --  Mask for the SUPL TLS version configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_EMERGENCY_PROTOCOL (0x0000000000000080) --  Mask for the emergency protocol configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_WIFI_SCAN_INJECT_TIMEOUT (0x0000000000000100) --  Mask for the Wi-Fi scan injection timeout configuration parameter
+ */
+}qmiLocSetProtocolConfigParametersIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to get the configuration
+                    parameters stored in the nonvolatile memory. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Config Parameters */
+  qmiLocProtocolConfigParamMaskT_v02 getProtocolConfigParamMask;
+  /**<   Mask denoting the configuration parameters to be retrieved.
+
+ Valid bitmasks: \n
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_SECURITY (0x0000000000000001) --  Mask for the SUPL security configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_VX_VERSION (0x0000000000000002) --  Mask for the VX version configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_VERSION (0x0000000000000004) --  Mask for the SUPL version configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_LPP_CONFIG (0x0000000000000008) --  Mask for the LPP configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_ASSISTED_GLONASS_PROTOCOL (0x0000000000000010) --  Mask for the assisted GLONASS configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_HASH_ALGO (0x0000000000000020) --  Mask for the SUPL hash algorithm configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_TLS_VERSION (0x0000000000000040) --  Mask for the SUPL TLS version configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_EMERGENCY_PROTOCOL (0x0000000000000080) --  Mask for the emergency protocol configuration parameter
+      - QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_WIFI_SCAN_INJECT_TIMEOUT (0x0000000000000100) --  Mask for the Wi-Fi scan injection timeout configuration parameter
+ */
+}qmiLocGetProtocolConfigParametersReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to get the configuration
+                    parameters stored in the nonvolatile memory. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Config Params Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Configuration Parameters request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  SUPL Security */
+  uint8_t suplSecurity_valid;  /**< Must be set to true if suplSecurity is being passed */
+  uint8_t suplSecurity;
+  /**<   Indicates whether SUPL security is enabled.
+       \begin{itemize1}
+       \item    0x01 (TRUE) -- SUPL security is enabled
+       \item    0x00 (FALSE) -- SUPL security is disabled
+       \vspace{-0.18in} \end{itemize1}*/
+
+  /* Optional */
+  /*  VX Version */
+  uint8_t vxVersion_valid;  /**< Must be set to true if vxVersion is being passed */
+  qmiLocVxVersionEnumT_v02 vxVersion;
+  /**<   VX version.
+
+ Valid values: \n
+      - eQMI_LOC_VX_VERSION_V1_ONLY (1) --  V1 VX version
+      - eQMI_LOC_VX_VERSION_V2_ONLY (2) --  V2 VX version
+ */
+
+  /* Optional */
+  /*  SUPL Version */
+  uint8_t suplVersion_valid;  /**< Must be set to true if suplVersion is being passed */
+  qmiLocSuplVersionEnumT_v02 suplVersion;
+  /**<   SUPL version.
+
+ Valid values: \n
+      - eQMI_LOC_SUPL_VERSION_1_0 (1) --  SUPL version 1.0
+      - eQMI_LOC_SUPL_VERSION_2_0 (2) --  SUPL version 2.0
+ */
+
+  /* Optional */
+  /*  LPP Configuration */
+  uint8_t lppConfig_valid;  /**< Must be set to true if lppConfig is being passed */
+  qmiLocLppConfigMaskT_v02 lppConfig;
+  /**<   LTE Positioning Profile (LPP) configuration.
+
+      Valid bitmasks: \begin{itemize1}
+      \item    0x00000001 -- LPP_CONFIG_ ENABLE_USER_PLANE
+      \item    0x00000002 -- LPP_CONFIG_ ENABLE_CONTROL_PLANE
+      \vspace{-0.18in} \end{itemize1}
+  */
+
+  /* Optional */
+  /*  Assisted GLONASS Protocol Mask */
+  uint8_t assistedGlonassProtocolMask_valid;  /**< Must be set to true if assistedGlonassProtocolMask is being passed */
+  qmiLocAssistedGlonassProtocolMaskT_v02 assistedGlonassProtocolMask;
+  /**<   Assisted GLONASS Protocol mask.
+
+ Valid bitmasks: \n
+      - QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_RRC_CP (0x00000001) --  Assisted GLONASS is supported over RRC in the control plane
+      - QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_RRLP_UP (0x00000002) --  Assisted GLONASS is supported over RRLP in the user plane
+      - QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_LPP_UP (0x00000004) --  Assisted GLONASS is supported over LPP in the user plane;
+       QMI_LOC_LPP_CONFIG_ENABLE_USER_PLANE must be set
+       in the LPP configuration for this to take effect
+      - QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_LPP_CP (0x00000008) --  Assisted GLONASS is supported over LPP in the control plane;
+       QMI_LOC_LPP_CONFIG_ENABLE_CONTROL_PLANE must be set
+       in the LPP configuration for this to take effect
+ */
+
+  /* Optional */
+  /*  SUPL Hash Algorithm */
+  uint8_t suplHashAlgo_valid;  /**< Must be set to true if suplHashAlgo is being passed */
+  qmiLocSuplHashAlgoEnumT_v02 suplHashAlgo;
+  /**<   SUPL hash algorithm to be used.
+
+ Valid values: \n
+      - eQMI_LOC_SUPL_HASH_ALGO_SHA1 (0) --  SHA-1 hash algorithm for SUPL version 2.0 or later
+      - eQMI_LOC_SUPL_HASH_ALGO_SHA256 (1) --  SHA-256 hash algorithm for SUPL version 2.0 or later
+ */
+
+  /* Optional */
+  /*  SUPL TLS Version */
+  uint8_t suplTlsVersion_valid;  /**< Must be set to true if suplTlsVersion is being passed */
+  qmiLocSuplTlsVersionEnumT_v02 suplTlsVersion;
+  /**<   SUPL TLS version. This configuration is only
+ applicable to SUPL 2.0 or later, as SUPL 1.0 always uses TLS version 1.0.
+
+ Valid values: \n
+      - eQMI_LOC_SUPL_TLS_VERSION_1_0 (0) --  SUPL TLS version 1.0
+      - eQMI_LOC_SUPL_TLS_VERSION_1_1 (1) --  SUPL TLS version 1.1
+ */
+
+  /* Optional */
+  /*  Emergency Protocol */
+  uint8_t emergencyProtocol_valid;  /**< Must be set to true if emergencyProtocol is being passed */
+  qmiLocEmergencyProtocolEnumT_v02 emergencyProtocol;
+  /**<   Protocol to be used during emergency.
+
+ Valid values: \n
+      - eQMI_LOC_EMERGENCY_PROTOCOL_WCDMA_CP (0) --  Use Control Plane Protocol during an emergency while on WCDMA
+      - eQMI_LOC_EMERGENCY_PROTOCOL_WCDMA_UP (1) --  Use SUPL 2.0 emergency services during an emergency while on WCDMA
+ */
+
+  /* Optional */
+  /*  Wi-Fi Scan Injection Timeout Period */
+  uint8_t wifiScanInjectTimeout_valid;  /**< Must be set to true if wifiScanInjectTimeout is being passed */
+  uint8_t wifiScanInjectTimeout;
+  /**<   Timeout duration that the service waits for a scan results
+  injection from the control point after the event notification is sent. \n
+       Values: \n
+       0 to 10 seconds
+  */
+}qmiLocGetProtocolConfigParametersIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSENSORSCONTROLCONFIGSENSORUSEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SENSOR_CONFIG_SENSOR_USE_ENABLE_V02 = 0, /**<  Sensors data should be requested whenever a position request is
+       received. If sensor data are injected, the positioning engine
+       attempts to improve the heading and positioning performance using sensors.
+       This is the default.
+  */
+  eQMI_LOC_SENSOR_CONFIG_SENSOR_USE_DISABLE_V02 = 1, /**<  Inertial sensors are not to be used to aid heading and position
+       improvement.  */
+  QMILOCSENSORSCONTROLCONFIGSENSORUSEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocSensorsControlConfigSensorUseEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSENSORSCONTROLCONFIGSENSORPROVIDERENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SENSOR_CONFIG_USE_PROVIDER_SSC_V02 = 0, /**<  Sensors data provider is Snapdragon Sensor Core (SSC);
+       this is the default
+   */
+  eQMI_LOC_SENSOR_CONFIG_USE_PROVIDER_NATIVE_V02 = 1, /**<  Sensors data provider is on the host processor  */
+  QMILOCSENSORSCONTROLCONFIGSENSORPROVIDERENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocSensorsControlConfigSensorProviderEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Sets the sensor control configuration. */
+typedef struct {
+
+  /* Optional */
+  /*  Sensors Usage */
+  uint8_t sensorsUsage_valid;  /**< Must be set to true if sensorsUsage is being passed */
+  qmiLocSensorsControlConfigSensorUseEnumT_v02 sensorsUsage;
+  /**<   Controls how sensors are used to aid heading and positioning
+ performance.
+
+ Valid values: \n
+      - eQMI_LOC_SENSOR_CONFIG_SENSOR_USE_ENABLE (0) --  Sensors data should be requested whenever a position request is
+       received. If sensor data are injected, the positioning engine
+       attempts to improve the heading and positioning performance using sensors.
+       This is the default.
+
+      - eQMI_LOC_SENSOR_CONFIG_SENSOR_USE_DISABLE (1) --  Inertial sensors are not to be used to aid heading and position
+       improvement.
+ */
+
+  /* Optional */
+  /*  Sensors Provider */
+  uint8_t sensorProvider_valid;  /**< Must be set to true if sensorProvider is being passed */
+  qmiLocSensorsControlConfigSensorProviderEnumT_v02 sensorProvider;
+  /**<   Controls which sensors data provider is to be used.
+
+ Valid values: \n
+      - eQMI_LOC_SENSOR_CONFIG_USE_PROVIDER_SSC (0) --  Sensors data provider is Snapdragon Sensor Core (SSC);
+       this is the default
+
+      - eQMI_LOC_SENSOR_CONFIG_USE_PROVIDER_NATIVE (1) --  Sensors data provider is on the host processor
+ */
+}qmiLocSetSensorControlConfigReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sets the sensor control configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set Sensor Control Config Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set Sensor Control Configuration request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocSetSensorControlConfigIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Retrieves the current sensor control configuration. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetSensorControlConfigReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Retrieves the current sensor control configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Sensor Control Config Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Sensors Control Configuration request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Sensors Usage */
+  uint8_t sensorsUsage_valid;  /**< Must be set to true if sensorsUsage is being passed */
+  qmiLocSensorsControlConfigSensorUseEnumT_v02 sensorsUsage;
+  /**<   Controls how sensors are used to aid the heading and positioning
+ performance.
+
+ Valid values: \n
+      - eQMI_LOC_SENSOR_CONFIG_SENSOR_USE_ENABLE (0) --  Sensors data should be requested whenever a position request is
+       received. If sensor data are injected, the positioning engine
+       attempts to improve the heading and positioning performance using sensors.
+       This is the default.
+
+      - eQMI_LOC_SENSOR_CONFIG_SENSOR_USE_DISABLE (1) --  Inertial sensors are not to be used to aid heading and position
+       improvement.
+ */
+
+  /* Optional */
+  /*  Sensors Provider */
+  uint8_t sensorProvider_valid;  /**< Must be set to true if sensorProvider is being passed */
+  qmiLocSensorsControlConfigSensorProviderEnumT_v02 sensorProvider;
+  /**<   Controls which sensors data provider to be used.
+
+ Valid values: \n
+      - eQMI_LOC_SENSOR_CONFIG_USE_PROVIDER_SSC (0) --  Sensors data provider is Snapdragon Sensor Core (SSC);
+       this is the default
+
+      - eQMI_LOC_SENSOR_CONFIG_USE_PROVIDER_NATIVE (1) --  Sensors data provider is on the host processor
+ */
+}qmiLocGetSensorControlConfigIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocSensorPropertiesMaskT_v02;
+#define QMI_LOC_SENSOR_PROPERTIES_MASK_GYRO_BIAS_VARIANCE_RANDOM_WALK_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000001) /**<  Denotes the gyro bias variance random walk parameter  */
+#define QMI_LOC_SENSOR_PROPERTIES_MASK_VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000002) /**<  Denotes the velocity random walk spectral density parameter  */
+#define QMI_LOC_SENSOR_PROPERTIES_MASK_ACCELERATION_RANDOM_WALK_SPECTRAL_DENSITY_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000004) /**<  Denotes the acceleration random walk spectral density parameter  */
+#define QMI_LOC_SENSOR_PROPERTIES_MASK_ANGLE_RANDOM_WALK_SPECTRAL_DENSITY_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000008) /**<  Denotes the angle random walk spectral density parameter  */
+#define QMI_LOC_SENSOR_PROPERTIES_MASK_RATE_RANDOM_WALK_SPECTRAL_DENSITY_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000010) /**<  Denotes the rate random walk spectral density parameter  */
+#define QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_DATA_USE_CONTROL_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000020) /**<  Denotes the vehicle data use control parameter  */
+#define QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_VELOCITY_RWSD_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000040) /**<  Denotes the vehicle velocity random walk spectral density  */
+#define QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ACCEL_RWSD_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000080) /**<  Denotes the vehicle accelerometer random walk spectral density  */
+#define QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ANGLE_RWSD_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000100) /**<  Denotes the vehicle angle random walk spectral density   */
+#define QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ANGULAR_RATE_RWSD_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000200) /**<  Denotes the vehicle angular rate random walk spectral density   */
+#define QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ODOMETRY_SCALE_RWSD_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000400) /**<  Denotes the vehicle odometry scale random walk spectral density   */
+#define QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ODOMETRY_VARIANCE_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000800) /**<  Denotes the vehicle odometry variance   */
+typedef uint64_t qmiLocVehicleDataUseControlMaskT_v02;
+#define QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_ACCEL_X_AXIS_V02 ((qmiLocVehicleDataUseControlMaskT_v02)0x0000000000000001ull) /**<  Enable use of X-axis vehicle acceleration sensor data  */
+#define QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_ACCEL_Y_AXIS_V02 ((qmiLocVehicleDataUseControlMaskT_v02)0x0000000000000002ull) /**<  Enable use of Y-axis vehicle acceleration sensor data  */
+#define QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_ACCEL_Z_AXIS_V02 ((qmiLocVehicleDataUseControlMaskT_v02)0x0000000000000004ull) /**<  Enable use of Z-axis vehicle acceleration sensor data  */
+#define QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_GYRO_X_AXIS_V02 ((qmiLocVehicleDataUseControlMaskT_v02)0x0000000000000010ull) /**<  Enable use of X-axis vehicle gyroscope data  */
+#define QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_GYRO_Y_AXIS_V02 ((qmiLocVehicleDataUseControlMaskT_v02)0x0000000000000020ull) /**<  Enable use of Y-axis vehicle gyroscope data  */
+#define QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_GYRO_Z_AXIS_V02 ((qmiLocVehicleDataUseControlMaskT_v02)0x0000000000000040ull) /**<  Enable use of Z-axis vehicle gyroscope data  */
+#define QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_ODOMETRY_V02 ((qmiLocVehicleDataUseControlMaskT_v02)0x0000000000000100ull) /**<  Enable use of odometry data  */
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Sets the properties specific to the type of sensor used.
+                    The control point must set sensor properties before they can be
+                    used to aid in heading and positioning performance improvement.
+   */
+typedef struct {
+
+  /* Optional */
+  /*  Gyro Bias Random Walk Variance */
+  uint8_t gyroBiasVarianceRandomWalk_valid;  /**< Must be set to true if gyroBiasVarianceRandomWalk is being passed */
+  float gyroBiasVarianceRandomWalk;
+  /**<   Specifies the gyro bias random walk variance parameter as a positive
+       floating-point value. This value has internal default value 1.0e-5 radian^2/second^4.
+       The gyro bias variance random walk parameter is derived from either the
+       sensors data sheet or a sensors conformance test. \n
+       - Units: Radians^2/seconds^4
+
+  */
+
+  /* Optional */
+  /*  Velocity Random Walk Spectral Density */
+  uint8_t velocityRandomWalkSpectralDensity_valid;  /**< Must be set to true if velocityRandomWalkSpectralDensity is being passed */
+  float velocityRandomWalkSpectralDensity;
+  /**<   Specifies the velocity random walk spectral density parameter as a positive
+       floating-point value. This value does not have any internal defaults.
+       The velocity random walk spectral density parameter is derived from either the
+       sensors data sheet or a sensors conformance test. \n
+       - Units: Meters/seconds^2/Hertz^0.5
+
+  */
+
+  /* Optional */
+  /*  Acceleration Random Walk Spectral Density */
+  uint8_t accelerationRandomWalkSpectralDensity_valid;  /**< Must be set to true if accelerationRandomWalkSpectralDensity is being passed */
+  float accelerationRandomWalkSpectralDensity;
+  /**<   Specifies the acceleration random walk spectral density parameter as a positive
+       floating-point value. This value does not have any internal defaults.
+       The acceleration random walk spectral density parameter is derived from either the
+       sensors data sheet or a sensors conformance test. \n
+       - Units: Meters/seconds^3/Hertz^0.5
+
+  */
+
+  /* Optional */
+  /*  Angle Random Walk Spectral Density */
+  uint8_t angleRandomWalkSpectralDensity_valid;  /**< Must be set to true if angleRandomWalkSpectralDensity is being passed */
+  float angleRandomWalkSpectralDensity;
+  /**<   Specifies the angle random walk spectral density parameter as a positive
+       floating-point value. This value does not have any internal defaults.
+       The angle random walk spectral density parameter is derived from either the
+       sensors data sheet or a sensors conformance test. \n
+       - Units: Radians/seconds/Hertz^0.5
+
+  */
+
+  /* Optional */
+  /*  Rate Random Walk Spectral Density */
+  uint8_t rateRandomWalkSpectralDensity_valid;  /**< Must be set to true if rateRandomWalkSpectralDensity is being passed */
+  float rateRandomWalkSpectralDensity;
+  /**<   Specifies the rate random walk spectral density parameter as a positive
+       floating-point value. This value does not have any internal defaults.
+       The rate random walk spectral density parameter is derived from either the
+       sensors data sheet or a sensors conformance test. \n
+       - Units: Radians/seconds^2/Hertz^0.5
+
+  */
+
+  /* Optional */
+  /*  Vehicle Data Use Control */
+  uint8_t vehicleDataUse_valid;  /**< Must be set to true if vehicleDataUse is being passed */
+  qmiLocVehicleDataUseControlMaskT_v02 vehicleDataUse;
+  /**<   Identifies which portions of the vehicle data to use in location
+ estimation (information provided by the message
+ QMI_LOC_INJECT_VEHICLE_SENSOR_DATA). Valid bitmasks: \n
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_ACCEL_X_AXIS (0x0000000000000001) --  Enable use of X-axis vehicle acceleration sensor data
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_ACCEL_Y_AXIS (0x0000000000000002) --  Enable use of Y-axis vehicle acceleration sensor data
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_ACCEL_Z_AXIS (0x0000000000000004) --  Enable use of Z-axis vehicle acceleration sensor data
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_GYRO_X_AXIS (0x0000000000000010) --  Enable use of X-axis vehicle gyroscope data
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_GYRO_Y_AXIS (0x0000000000000020) --  Enable use of Y-axis vehicle gyroscope data
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_GYRO_Z_AXIS (0x0000000000000040) --  Enable use of Z-axis vehicle gyroscope data
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_ODOMETRY (0x0000000000000100) --  Enable use of odometry data
+ \b Note: All other bits are reserved for future use and are to be set to 0. */
+
+  /* Optional */
+  /*  Vehicle Velocity Random Walk Spectral Density */
+  uint8_t vehicleVelocityRandomWalkSpectralDensity_valid;  /**< Must be set to true if vehicleVelocityRandomWalkSpectralDensity is being passed */
+  float vehicleVelocityRandomWalkSpectralDensity;
+  /**<   Vehicle velocity random walk spectral density. \n
+       - Type: 32-bit float    \n
+       - Units: Meters/seconds^2/Hz^0.5     \n
+       - Valid values: Positive values  \n
+       - Default: None
+  */
+
+  /* Optional */
+  /*  Vehicle Acceleration Random Walk Spectral Density */
+  uint8_t vehicleAccelRandomWalkSpectralDensity_valid;  /**< Must be set to true if vehicleAccelRandomWalkSpectralDensity is being passed */
+  float vehicleAccelRandomWalkSpectralDensity;
+  /**<   Vehicle accelerometer random walk spectral density. \n
+       - Type: 32-bit float    \n
+       - Units: Meters/seconds^3/Hz^0.5     \n
+       - Valid values: Positive values  \n
+       - Default: None
+  */
+
+  /* Optional */
+  /*  Vehicle Angle Random Walk Spectral Density */
+  uint8_t vehicleAngleRandomWalkSpectralDensity_valid;  /**< Must be set to true if vehicleAngleRandomWalkSpectralDensity is being passed */
+  float vehicleAngleRandomWalkSpectralDensity;
+  /**<   Vehicle angle random walk spectral density. \n
+       - Type: 32-bit float    \n
+       - Units: Radians/seconds/Hz^0.5     \n
+       - Valid values: Positive values  \n
+       - Default: None
+  */
+
+  /* Optional */
+  /*  Vehicle Angular Rate Random Walk Spectral Density */
+  uint8_t vehicleAngularRateRandomWalkSpectralDensity_valid;  /**< Must be set to true if vehicleAngularRateRandomWalkSpectralDensity is being passed */
+  float vehicleAngularRateRandomWalkSpectralDensity;
+  /**<   Vehicle angular rate random walk spectral density. \n
+       - Type: 32-bit float    \n
+       - Units: Radians/seconds^2/Hz^0.5 \n
+       - Valid values: Positive values  \n
+       - Default: None
+  */
+
+  /* Optional */
+  /*  Vehicle Odometry Scale Factor Random Walk Spectral Density */
+  uint8_t vehicleOdometryScaleFactorRandomWalkSpectralDensity_valid;  /**< Must be set to true if vehicleOdometryScaleFactorRandomWalkSpectralDensity is being passed */
+  float vehicleOdometryScaleFactorRandomWalkSpectralDensity;
+  /**<   Vehicle odometry scale factor random walk spectral density. \n
+       - Type: 32-bit float    \n
+       - Units: (1/seconds)/Hz^0.5      \n
+       - Range: Approximately 0.0001 to 0.001 \n
+       - Default: 0.001 (actual calibration recommended)
+  */
+
+  /* Optional */
+  /*  Vehicle Odometry Variance */
+  uint8_t vehicleOdometryVariance_valid;  /**< Must be set to true if vehicleOdometryVariance is being passed */
+  float vehicleOdometryVariance;
+  /**<   Vehicle odometry variance of each odometry sample
+      (coarseness of measurement). \n
+       - Type: 32-bit float    \n
+       - Units: Meters^2    \n
+       - Valid values: Positive values  \n
+       - Default: None
+  */
+}qmiLocSetSensorPropertiesReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sets the properties specific to the type of sensor used.
+                    The control point must set sensor properties before they can be
+                    used to aid in heading and positioning performance improvement.
+   */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set Sensor Properties Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set Sensor Properties request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+
+  /* Optional */
+  /*  Failed Set Sensor Properties */
+  uint8_t failedSensorPropertiesMask_valid;  /**< Must be set to true if failedSensorPropertiesMask is being passed */
+  qmiLocSensorPropertiesMaskT_v02 failedSensorPropertiesMask;
+  /**<   This field is sent only if the status is not SUCCESS.
+ Identifies the parameters that were not set successfully.
+
+ Valid bitmasks:
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_GYRO_BIAS_VARIANCE_RANDOM_WALK (0x00000001) --  Denotes the gyro bias variance random walk parameter
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY (0x00000002) --  Denotes the velocity random walk spectral density parameter
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_ACCELERATION_RANDOM_WALK_SPECTRAL_DENSITY (0x00000004) --  Denotes the acceleration random walk spectral density parameter
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_ANGLE_RANDOM_WALK_SPECTRAL_DENSITY (0x00000008) --  Denotes the angle random walk spectral density parameter
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_RATE_RANDOM_WALK_SPECTRAL_DENSITY (0x00000010) --  Denotes the rate random walk spectral density parameter
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_DATA_USE_CONTROL (0x00000020) --  Denotes the vehicle data use control parameter
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_VELOCITY_RWSD (0x00000040) --  Denotes the vehicle velocity random walk spectral density
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ACCEL_RWSD (0x00000080) --  Denotes the vehicle accelerometer random walk spectral density
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ANGLE_RWSD (0x00000100) --  Denotes the vehicle angle random walk spectral density
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ANGULAR_RATE_RWSD (0x00000200) --  Denotes the vehicle angular rate random walk spectral density
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ODOMETRY_SCALE_RWSD (0x00000400) --  Denotes the vehicle odometry scale random walk spectral density
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ODOMETRY_VARIANCE (0x00000800) --  Denotes the vehicle odometry variance
+ \vspace{-0.18in} \end{itemize1}
+ */
+}qmiLocSetSensorPropertiesIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Retrieves the current sensor properties. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Sensor Properties Config Parameters */
+  qmiLocSensorPropertiesMaskT_v02 getSensorPropertiesMask;
+  /**<   Mask denoting the sensor properties parameters to be retrieved.
+
+ Valid bitmasks:
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_GYRO_BIAS_VARIANCE_RANDOM_WALK (0x00000001) --  Denotes the gyro bias variance random walk parameter
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY (0x00000002) --  Denotes the velocity random walk spectral density parameter
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_ACCELERATION_RANDOM_WALK_SPECTRAL_DENSITY (0x00000004) --  Denotes the acceleration random walk spectral density parameter
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_ANGLE_RANDOM_WALK_SPECTRAL_DENSITY (0x00000008) --  Denotes the angle random walk spectral density parameter
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_RATE_RANDOM_WALK_SPECTRAL_DENSITY (0x00000010) --  Denotes the rate random walk spectral density parameter
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_DATA_USE_CONTROL (0x00000020) --  Denotes the vehicle data use control parameter
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_VELOCITY_RWSD (0x00000040) --  Denotes the vehicle velocity random walk spectral density
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ACCEL_RWSD (0x00000080) --  Denotes the vehicle accelerometer random walk spectral density
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ANGLE_RWSD (0x00000100) --  Denotes the vehicle angle random walk spectral density
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ANGULAR_RATE_RWSD (0x00000200) --  Denotes the vehicle angular rate random walk spectral density
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ODOMETRY_SCALE_RWSD (0x00000400) --  Denotes the vehicle odometry scale random walk spectral density
+      - QMI_LOC_SENSOR_PROPERTIES_MASK_VEHICLE_ODOMETRY_VARIANCE (0x00000800) --  Denotes the vehicle odometry variance
+ */
+}qmiLocGetSensorPropertiesReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Retrieves the current sensor properties. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Sensor Properties Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Sensors Properties request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Gyro Bias Random Walk Variance */
+  uint8_t gyroBiasVarianceRandomWalk_valid;  /**< Must be set to true if gyroBiasVarianceRandomWalk is being passed */
+  float gyroBiasVarianceRandomWalk;
+  /**<   Specifies the gyro bias random walk variance parameter as a positive
+       floating-point value. This value has internal default value 1.0e-5 radian^2/second^4.
+       The gyro bias variance random walk parameter is derived from either the
+       sensors data sheet or a sensors conformance test. \n
+       - Units: Radians^2/seconds^4
+
+  */
+
+  /* Optional */
+  /*  Velocity Random Walk Spectral Density */
+  uint8_t velocityRandomWalkSpectralDensity_valid;  /**< Must be set to true if velocityRandomWalkSpectralDensity is being passed */
+  float velocityRandomWalkSpectralDensity;
+  /**<   Specifies the velocity random walk spectral density parameter as a positive
+       floating-point value. This value does not have any internal defaults.
+       The velocity random walk spectral density parameter is derived from either the
+       sensors data sheet or a sensors conformance test. \n
+       - Units: Meters/seconds^2/Hertz^0.5
+
+  */
+
+  /* Optional */
+  /*  Acceleration Random Walk Spectral Density */
+  uint8_t accelerationRandomWalkSpectralDensity_valid;  /**< Must be set to true if accelerationRandomWalkSpectralDensity is being passed */
+  float accelerationRandomWalkSpectralDensity;
+  /**<   Specifies the acceleration random walk spectral density parameter as a positive
+       floating-point value. This value does not have any internal defaults.
+       The acceleration random walk spectral density parameter is derived from either the
+       sensors data sheet or a sensors conformance test. \n
+       - Units: Meters/seconds^3/Hertz^0.5
+
+  */
+
+  /* Optional */
+  /*  Angle Random Walk Spectral Density */
+  uint8_t angleRandomWalkSpectralDensity_valid;  /**< Must be set to true if angleRandomWalkSpectralDensity is being passed */
+  float angleRandomWalkSpectralDensity;
+  /**<   Specifies the angle random walk spectral density parameter as a positive
+       floating-point value. This value does not have any internal defaults.
+       The angle random walk spectral density parameter is derived from either the
+       sensors data sheet or a sensors conformance test. \n
+       - Units: Radians/seconds/Hertz^0.5
+
+  */
+
+  /* Optional */
+  /*  Rate Random Walk Spectral Density */
+  uint8_t rateRandomWalkSpectralDensity_valid;  /**< Must be set to true if rateRandomWalkSpectralDensity is being passed */
+  float rateRandomWalkSpectralDensity;
+  /**<   Specifies the rate random walk spectral density parameter as a positive
+       floating-point value. This value does not have any internal defaults.
+       The rate random walk spectral density parameter is derived from either the
+       sensors data sheet or a sensors conformance test. \n
+       - Units: Radians/seconds^2/Hertz^0.5
+
+  */
+
+  /* Optional */
+  /*  Vehicle Data Use Control */
+  uint8_t vehicleDataUse_valid;  /**< Must be set to true if vehicleDataUse is being passed */
+  qmiLocVehicleDataUseControlMaskT_v02 vehicleDataUse;
+  /**<   Identifies which portions of the vehicle data to use in location
+ estimation (information provided by message
+ QMI_LOC_INJECT_VEHICLE_SENSOR_DATA). Valid bitmasks: \n
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_ACCEL_X_AXIS (0x0000000000000001) --  Enable use of X-axis vehicle acceleration sensor data
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_ACCEL_Y_AXIS (0x0000000000000002) --  Enable use of Y-axis vehicle acceleration sensor data
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_ACCEL_Z_AXIS (0x0000000000000004) --  Enable use of Z-axis vehicle acceleration sensor data
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_GYRO_X_AXIS (0x0000000000000010) --  Enable use of X-axis vehicle gyroscope data
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_GYRO_Y_AXIS (0x0000000000000020) --  Enable use of Y-axis vehicle gyroscope data
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_GYRO_Z_AXIS (0x0000000000000040) --  Enable use of Z-axis vehicle gyroscope data
+      - QMI_LOC_VEHICLE_DATA_ENABLE_USE_MASK_ODOMETRY (0x0000000000000100) --  Enable use of odometry data
+ @note1 All other bits are reserved for future use and are to be set to 0. */
+
+  /* Optional */
+  /*  Vehicle Velocity Random Walk Spectral Density */
+  uint8_t vehicleVelocityRandomWalkSpectralDensity_valid;  /**< Must be set to true if vehicleVelocityRandomWalkSpectralDensity is being passed */
+  float vehicleVelocityRandomWalkSpectralDensity;
+  /**<   Vehicle velocity random walk spectral density. \n
+       - Type: 32-bit float    \n
+       - Units: Meters/seconds^2/Hz^0.5     \n
+       - Valid values: Positive values  \n
+       - Default: None
+  */
+
+  /* Optional */
+  /*  Vehicle Acceleration Random Walk Spectral Density */
+  uint8_t vehicleAccelRandomWalkSpectralDensity_valid;  /**< Must be set to true if vehicleAccelRandomWalkSpectralDensity is being passed */
+  float vehicleAccelRandomWalkSpectralDensity;
+  /**<   Vehicle accelerometer random walk spectral density. \n
+       - Type: 32-bit float    \n
+       - Units: Meters/seconds^3/Hz^0.5     \n
+       - Valid values: Positive values  \n
+       - Default: None
+  */
+
+  /* Optional */
+  /*  Vehicle Angle Random Walk Spectral Density */
+  uint8_t vehicleAngleRandomWalkSpectralDensity_valid;  /**< Must be set to true if vehicleAngleRandomWalkSpectralDensity is being passed */
+  float vehicleAngleRandomWalkSpectralDensity;
+  /**<   Vehicle angle random walk spectral density. \n
+       - Type: 32-bit float    \n
+       - Units: Radians/seconds/Hz^0.5     \n
+       - Valid values: Positive values  \n
+       - Default: None
+  */
+
+  /* Optional */
+  /*  Vehicle Angular Rate Random Walk Spectral Density */
+  uint8_t vehicleAngularRateRandomWalkSpectralDensity_valid;  /**< Must be set to true if vehicleAngularRateRandomWalkSpectralDensity is being passed */
+  float vehicleAngularRateRandomWalkSpectralDensity;
+  /**<   Vehicle angular rate random walk spectral density. \n
+       - Type: 32-bit float    \n
+       - Units: Radians/seconds^2/Hz^0.5 \n
+       - Valid values: Positive values  \n
+       - Default: None
+  */
+
+  /* Optional */
+  /*  Vehicle Odometry Scale Factor Random Walk Spectral Density */
+  uint8_t vehicleOdometryScaleFactorRandomWalkSpectralDensity_valid;  /**< Must be set to true if vehicleOdometryScaleFactorRandomWalkSpectralDensity is being passed */
+  float vehicleOdometryScaleFactorRandomWalkSpectralDensity;
+  /**<   Vehicle odometry scale factor random walk spectral density. \n
+       - Type: 32-bit float    \n
+       - Units: (1/seconds)/Hz^0.5      \n
+       - Range: Approximately 0.0001 to 0.001 \n
+       - Default: 0.001 (actual calibration recommended)
+  */
+
+  /* Optional */
+  /*  Vehicle Odometry Variance */
+  uint8_t vehicleOdometryVariance_valid;  /**< Must be set to true if vehicleOdometryVariance is being passed */
+  float vehicleOdometryVariance;
+  /**<   Vehicle odometry variance of each odometry sample
+      (coarseness of measurement). \n
+       - Type: 32-bit float    \n
+       - Units: Meters^2    \n
+       - Valid values: Positive values  \n
+       - Default: None
+  */
+}qmiLocGetSensorPropertiesIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSENSORPERFORMANCECONTROLMODEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_SENSOR_PERFORMANCE_CONTROL_MODE_AUTO_V02 = 0, /**<  Sensors usage is to be determined by the GNSS location engine.
+       This mode can optimize power consumption and give a
+       power-balanced positioning and heading enhancement using
+       inertial sensors  */
+  eQMI_LOC_SENSOR_PERFORMANCE_CONTROL_MODE_FORCED_V02 = 1, /**<  Sensors usage is to be forced ON.
+       This mode can be requested by the control point when
+       power consumption is not a restriction to the use of
+       inertial sensors.  */
+  QMILOCSENSORPERFORMANCECONTROLMODEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocSensorPerformanceControlModeEnumT_v02;
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocSensorAlgorithmMaskT_v02;
+#define QMI_LOC_SENSOR_ALGORITHM_MASK_DISABLE_INS_POSITIONING_FILTER_V02 ((qmiLocSensorAlgorithmMaskT_v02)0x00000001) /**<  Inertial sensors are not to be used in Accelerometer-integrated fashion with
+       GNSS. They can still be used for aiding in heading improvements.  */
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Provides fine-grained control of sensor based positioning
+                    performance. */
+typedef struct {
+
+  /* Optional */
+  /*  Sensor Performance Control Mode */
+  uint8_t performanceControlMode_valid;  /**< Must be set to true if performanceControlMode is being passed */
+  qmiLocSensorPerformanceControlModeEnumT_v02 performanceControlMode;
+  /**<   Controls when sensors data is requested during GNSS fix processing.
+ This field is relevant only when sensors have been enabled using the
+ sensors control configuration.
+
+ Valid values: \n
+      - eQMI_LOC_SENSOR_PERFORMANCE_CONTROL_MODE_AUTO (0) --  Sensors usage is to be determined by the GNSS location engine.
+       This mode can optimize power consumption and give a
+       power-balanced positioning and heading enhancement using
+       inertial sensors
+      - eQMI_LOC_SENSOR_PERFORMANCE_CONTROL_MODE_FORCED (1) --  Sensors usage is to be forced ON.
+       This mode can be requested by the control point when
+       power consumption is not a restriction to the use of
+       inertial sensors.
+ */
+
+  /* Optional */
+  /*  Accelerometer Sampling Specification */
+  uint8_t accelSamplingSpec_valid;  /**< Must be set to true if accelSamplingSpec is being passed */
+  qmiLocSensorControlConfigSamplingSpecStructT_v02 accelSamplingSpec;
+  /**<   \vspace{0.06in} \n Sets the nominal rate at which the GNSS location
+       engine is to request acceleration data to be used by the low data rate
+       filter. The sensor data rate is specified in terms of the nominal number
+       of samples per batch and the number of batches per second.
+       However, the final control of the actual requested rate resides with
+       the Sensors Manager Module/GNSS location engine. \n
+       Default: 10 Hz sampling rate and 2 Hz batching rate.
+  */
+
+  /* Optional */
+  /*  Gyroscope Sampling Specification */
+  uint8_t gyroSamplingSpec_valid;  /**< Must be set to true if gyroSamplingSpec is being passed */
+  qmiLocSensorControlConfigSamplingSpecStructT_v02 gyroSamplingSpec;
+  /**<   \vspace{0.06in} \n Sets the nominal rate at which the GNSS location
+       engine is to request gyro data to be used by the high data rate filter.
+       The sensor data rate is specified in terms of the nominal number of
+       samples per batch and the number of batches per second.
+       However, the final control of the actual requested rate resides with
+       the Sensors Manager Module/GNSS location engine. \n
+       Default: 10 Hz sampling rate and 2 Hz batching rate.
+  */
+
+  /* Optional */
+  /*  Algorithm Configuration */
+  uint8_t algorithmConfig_valid;  /**< Must be set to true if algorithmConfig is being passed */
+  qmiLocSensorAlgorithmMaskT_v02 algorithmConfig;
+  /**<   Sets which sensor algorithms are to be used when processing sensor data.
+
+       Valid bitmasks: \begin{itemize1}
+       \item    0x00000001 -- DISABLE_INS_ POSITIONING_FILTER
+       \vspace{-0.18in} \end{itemize1}
+  */
+
+  /* Optional */
+  /*  High Data Rate Filter Accelerometer Sampling Specification */
+  uint8_t accelSamplingSpecHigh_valid;  /**< Must be set to true if accelSamplingSpecHigh is being passed */
+  qmiLocSensorControlConfigSamplingSpecStructT_v02 accelSamplingSpecHigh;
+  /**<   \vspace{0.06in} \n Sets the nominal rate at which the GNSS location engine is to request
+       acceleration data to be used by the high data rate filter. The sensor
+       data rate is specified in terms of the nominal number of samples per
+       batch and the number of batches per second.
+       However, the final control of the actual requested rate resides with
+       the Sensors Manager Module/GNSS location engine. \n
+       Default: 100 Hz sampling rate and 4 Hz batching rate.
+  */
+
+  /* Optional */
+  /*  High Data Rate Filter Gyroscope Sampling Specification */
+  uint8_t gyroSamplingSpecHigh_valid;  /**< Must be set to true if gyroSamplingSpecHigh is being passed */
+  qmiLocSensorControlConfigSamplingSpecStructT_v02 gyroSamplingSpecHigh;
+  /**<   \vspace{0.06in} \n Sets the nominal rate at which the GNSS location engine is to request
+       gyro data to be used by the high data rate filter. The sensor data rate
+       is specified in terms of the nominal number of samples per batch and the
+       number of batches per second.
+       However, the final control of the actual requested rate resides with
+       the Sensors Manager Module/GNSS location engine. \n
+       Default: 100 Hz sampling rate and 4 Hz batching rate.
+  */
+}qmiLocSetSensorPerformanceControlConfigReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocSensorPerformanceControlConfigFailureMaskT_v02;
+#define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_PERFORMANCE_MODE_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000001) /**<  Failed to set the performance mode  */
+#define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_ACCEL_SAMPLING_SPEC_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000002) /**<  Failed to set the accelerometer sampling specification  */
+#define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_GYRO_SAMPLING_SPEC_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000004) /**<  Failed to set the gyroscope sampling specification  */
+#define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_ALGORITHM_CONFIG_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000008) /**<  Failed to set the algorithm configuration  */
+#define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_ACCEL_SAMPLING_SPEC_HIGH_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000010) /**<  Failed to set the accelerometer sampling specification  */
+#define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_GYRO_SAMPLING_SPEC_HIGH_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000020) /**<  Failed to set the gyroscope sampling specification  */
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Provides fine-grained control of sensor based positioning
+                    performance. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set Sensor Perf Control Config Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set Sensor Performance Control Configuration request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Failed Configuration */
+  uint8_t failedConfiguration_valid;  /**< Must be set to true if failedConfiguration is being passed */
+  qmiLocSensorPerformanceControlConfigFailureMaskT_v02 failedConfiguration;
+  /**<   Identifies parameters that were not configured successfully. This field
+       is sent only if the status is not a success.
+
+
+       Valid bitmasks: \begin{itemize1}
+       \item    0x00000001 -- PERFORMANCE_ MODE
+       \item    0x00000002 -- ACCEL_SAMPLING_ SPEC
+       \item    0x00000004 -- GYRO_SAMPLING_ SPEC
+       \item    0x00000008 -- ALGORITHM_ CONFIG
+       \item    0x00000010 -- ACCEL_SAMPLING_ SPEC_HIGH
+       \item    0x00000020 -- GYRO_SAMPLING_ SPEC_HIGH
+       \vspace{-0.18in} \end{itemize1}
+  */
+}qmiLocSetSensorPerformanceControlConfigIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Retrieves the current sensor performance control
+                    configuration. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocGetSensorPerformanceControlConfigReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Retrieves the current sensor performance control
+                    configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Sensor Perf Control Config Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Sensor Performance Control Configuration request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Performance Control Mode */
+  uint8_t performanceControlMode_valid;  /**< Must be set to true if performanceControlMode is being passed */
+  qmiLocSensorPerformanceControlModeEnumT_v02 performanceControlMode;
+  /**<   Controls when sensor data is requested during GNSS fix processing.
+ This field is relevant only when sensors have been enabled using the
+ sensor control configuration.
+
+ Valid values: \n
+      - eQMI_LOC_SENSOR_PERFORMANCE_CONTROL_MODE_AUTO (0) --  Sensors usage is to be determined by the GNSS location engine.
+       This mode can optimize power consumption and give a
+       power-balanced positioning and heading enhancement using
+       inertial sensors
+      - eQMI_LOC_SENSOR_PERFORMANCE_CONTROL_MODE_FORCED (1) --  Sensors usage is to be forced ON.
+       This mode can be requested by the control point when
+       power consumption is not a restriction to the use of
+       inertial sensors.
+ */
+
+  /* Optional */
+  /*  Accelerometer Sampling Specification */
+  uint8_t accelSamplingSpec_valid;  /**< Must be set to true if accelSamplingSpec is being passed */
+  qmiLocSensorControlConfigSamplingSpecStructT_v02 accelSamplingSpec;
+  /**<   \vspace{0.06in} \n Sets the nominal rate at which the GNSS location engine is to request
+       acceleration data to be used by the high data rate filter. The sensor
+       data rate is specified in terms of the nominal number of samples per
+       batch and the number of batches per second.
+       However, the final control of the actual requested rate resides with
+       the Sensors Manager Module/GNSS location engine. \n
+       Default: 10 Hz sampling rate and 2 Hz batching rate.
+  */
+
+  /* Optional */
+  /*  Gyroscope Sampling Specification */
+  uint8_t gyroSamplingSpec_valid;  /**< Must be set to true if gyroSamplingSpec is being passed */
+  qmiLocSensorControlConfigSamplingSpecStructT_v02 gyroSamplingSpec;
+  /**<   \vspace{0.06in} \n Sets the nominal rate at which the GNSS location engine is to request
+       gyro data to be used by the high data rate filter. The sensor data
+       rate is specified in terms of the nominal number of samples per batch
+       and the number of batches per second.
+       However, the final control of the actual requested rate resides with
+       the Sensors Manager Module/GNSS location engine. \n
+       Default: 10 Hz sampling rate and 2 Hz batching rate.
+  */
+
+  /* Optional */
+  /*  Algorithm Configuration */
+  uint8_t algorithmConfig_valid;  /**< Must be set to true if algorithmConfig is being passed */
+  qmiLocSensorAlgorithmMaskT_v02 algorithmConfig;
+  /**<   Informs which sensor algorithms are currently set.
+
+       Valid bitmasks: \begin{itemize1}
+       \item    0x00000001 -- DISABLE_INS_ POSITIONING_FILTER
+       \vspace{-0.18in} \end{itemize1}
+  */
+
+  /* Optional */
+  /*  High Data Rate Filter Accelerometer Sampling Specification */
+  uint8_t accelSamplingSpecHigh_valid;  /**< Must be set to true if accelSamplingSpecHigh is being passed */
+  qmiLocSensorControlConfigSamplingSpecStructT_v02 accelSamplingSpecHigh;
+  /**<   \vspace{0.06in} \n Sets the nominal rate at which the GNSS location engine is to request
+       acceleration data to be used by the high data rate filter. The sensor
+       data rate is specified in terms of the nominal number of samples per
+       batch and the number of batches per second.
+       However, the final control of the actual requested rate resides with
+       the Sensors Manager Module/GNSS location engine. \n
+       Default: 100 Hz sampling rate and 4 Hz batching rate.
+  */
+
+  /* Optional */
+  /*  High Data Rate Filter Gyroscope Sampling Specification */
+  uint8_t gyroSamplingSpecHigh_valid;  /**< Must be set to true if gyroSamplingSpecHigh is being passed */
+  qmiLocSensorControlConfigSamplingSpecStructT_v02 gyroSamplingSpecHigh;
+  /**<   \vspace{0.06in} \n Sets the nominal rate at which the GNSS location engine is to request
+       gyro data to be used by the high data rate filter. The sensor data rate
+       is specified in terms of the nominal number of samples per batch and the
+       number of batches per second.
+       However, the final control of the actual requested rate resides with
+       the Sensors Manager Module/GNSS location engine. \n
+       Default: 100 Hz sampling rate and 4 Hz batching rate.
+  */
+}qmiLocGetSensorPerformanceControlConfigIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects a SUPL certificate to be used in AGNSS sessions. */
+typedef struct {
+
+  /* Mandatory */
+  /*  SUPL Certificate ID */
+  uint8_t suplCertId;
+  /**<   Certificate ID of the SUPL certificate. \n
+       - Units: Bytes \n
+       - Range: 0 to 9  */
+
+  /* Mandatory */
+  /*  SUPL Certificate Data */
+  uint32_t suplCertData_len;  /**< Must be set to # of elements in suplCertData */
+  uint8_t suplCertData[QMI_LOC_MAX_SUPL_CERT_LENGTH_V02];
+  /**<   SUPL certificate contents. \n
+       - Type: Array of bytes \n
+       - Maximum certificate size: 2000 bytes */
+}qmiLocInjectSuplCertificateReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects a SUPL certificate to be used in AGNSS sessions. */
+typedef struct {
+
+  /* Mandatory */
+  /*  SUPL Certificate Injection Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Inject SUPL Certificate request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocInjectSuplCertificateIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Deletes a SUPL certificate. */
+typedef struct {
+
+  /* Optional */
+  /*  SUPL Certificate ID */
+  uint8_t suplCertId_valid;  /**< Must be set to true if suplCertId is being passed */
+  uint8_t suplCertId;
+  /**<   Certificate ID of the SUPL certificate to be deleted. \n
+       - Units: Bytes \n
+       - Range: 0 to 9 \n
+       If suplCertId is not specified,
+       all SUPL certificates are deleted. */
+}qmiLocDeleteSuplCertificateReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Deletes a SUPL certificate. */
+typedef struct {
+
+  /* Mandatory */
+  /*  SUPL Certificate Deletion Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Delete SUPL Certificate request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocDeleteSuplCertificateIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocPositionEngineConfigParamMaskT_v02;
+#define QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_INJECTED_POSITION_CONTROL_V02 ((qmiLocPositionEngineConfigParamMaskT_v02)0x00000001) /**<  Denotes whether the position engine uses the
+       injected position in a direct position calculation.  */
+#define QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_FILTER_SV_USAGE_V02 ((qmiLocPositionEngineConfigParamMaskT_v02)0x00000002) /**<  Denotes whether the position engine filters the
+       SV usage in the fix.  */
+#define QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_STORE_ASSIST_DATA_V02 ((qmiLocPositionEngineConfigParamMaskT_v02)0x00000004) /**<  Denotes whether the position engine stores assistance data
+       in persistent memory.  */
+#define QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_ENABLE_FASTER_TTFF_V02 ((qmiLocPositionEngineConfigParamMaskT_v02)0x00000008) /**<  Denotes whether the position engine stays on to optimize
+       the TTFF for the subsequent position fix.  */
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to configure position engine
+                    functionality. */
+typedef struct {
+
+  /* Optional */
+  /*  Injected Position Control */
+  uint8_t injectedPositionControl_valid;  /**< Must be set to true if injectedPositionControl is being passed */
+  uint8_t injectedPositionControl;
+  /**<   Controls how the injected position is used in the position engine.
+
+       Valid values: \begin{itemize1}
+       \item    0x01 (TRUE) -- Use the injected position in a direct position
+                               calculation
+       \item    0x00 (FALSE) -- Do not use the injected position in a direct
+                                position calculation
+       \end{itemize1}
+       The default value is TRUE.
+  */
+
+  /* Optional */
+  /*  Filter SV Usage */
+  uint8_t filterSvUsage_valid;  /**< Must be set to true if filterSvUsage is being passed */
+  uint8_t filterSvUsage;
+  /**<   Controls whether SV usage is filtered in a position fix.
+
+       Valid values: \begin{itemize1}
+       \item    0x01 (TRUE) -- Filter the usage of SVs in the fix
+       \item    0x00 (FALSE) -- Do not filter the usage of SVs in the fix
+       \end{itemize1}
+       The default value is FALSE.
+  */
+
+  /* Optional */
+  /*  Store Assist Data */
+  uint8_t storeAssistData_valid;  /**< Must be set to true if storeAssistData is being passed */
+  uint8_t storeAssistData;
+  /**<   Controls whether assistance data is to be stored in
+       persistent memory.
+
+       Valid values: \begin{itemize1}
+       \item    0x01 (TRUE) -- Store assistance data in persistent memory
+       \item    0x00 (FALSE) -- Do not store assistance data in persistent memory
+       \end{itemize1}
+       The default value is TRUE.
+  */
+
+  /* Optional */
+  /*  Enable Faster TTFF */
+  uint8_t enableFasterTTFF_valid;  /**< Must be set to true if enableFasterTTFF is being passed */
+  uint8_t enableFasterTTFF;
+  /**<   Allows the receiver to stay on after a position session in order to
+       collect information that will help reduce the Time To First Fix (TTFF)
+       when the next position request is made. The receiver will stay
+       on only if  the engine determines that it needs to collect some
+       information. The receiver will stay on for the duration needed to
+       collect the information.
+       If enabled, the clients may see a delay in receiving the Engine Off
+       event after the position session ends.
+
+       Valid values: \begin{itemize1}
+       \item    0x01 (TRUE) -- Allow the engine to stay on for reduced TTFF
+       \item    0x00 (FALSE) -- Do not allow the engine to stay on for reduced
+                               TTFF
+       \end{itemize1}
+       The default value is TRUE.*/
+}qmiLocSetPositionEngineConfigParametersReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to configure position engine
+                    functionality. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set Position Engine Configuration Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set Configuration Parameters request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Failed Parameters */
+  uint8_t failedPositionEngineConfigParamMask_valid;  /**< Must be set to true if failedPositionEngineConfigParamMask is being passed */
+  qmiLocPositionEngineConfigParamMaskT_v02 failedPositionEngineConfigParamMask;
+  /**<   Identifies the parameters that were not set successfully.
+ This field is sent only if the status is other than SUCCESS.
+
+ Valid bitmasks:\n
+      - QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_INJECTED_POSITION_CONTROL (0x00000001) --  Denotes whether the position engine uses the
+       injected position in a direct position calculation.
+      - QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_FILTER_SV_USAGE (0x00000002) --  Denotes whether the position engine filters the
+       SV usage in the fix.
+      - QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_STORE_ASSIST_DATA (0x00000004) --  Denotes whether the position engine stores assistance data
+       in persistent memory.
+      - QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_ENABLE_FASTER_TTFF (0x00000008) --  Denotes whether the position engine stays on to optimize
+       the TTFF for the subsequent position fix.
+ */
+}qmiLocSetPositionEngineConfigParametersIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to get the position engine
+                    configuration parameters. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Config Parameters */
+  qmiLocPositionEngineConfigParamMaskT_v02 getPositionEngineConfigParamMask;
+  /**<   Mask denoting the configuration parameters to be retrieved.
+
+ Valid bitmasks:
+      - QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_INJECTED_POSITION_CONTROL (0x00000001) --  Denotes whether the position engine uses the
+       injected position in a direct position calculation.
+      - QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_FILTER_SV_USAGE (0x00000002) --  Denotes whether the position engine filters the
+       SV usage in the fix.
+      - QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_STORE_ASSIST_DATA (0x00000004) --  Denotes whether the position engine stores assistance data
+       in persistent memory.
+      - QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_ENABLE_FASTER_TTFF (0x00000008) --  Denotes whether the position engine stays on to optimize
+       the TTFF for the subsequent position fix.
+ */
+}qmiLocGetPositionEngineConfigParametersReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to get the position engine
+                    configuration parameters. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Position Engine Configuration Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Configuration Parameters request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Injected Position Control */
+  uint8_t injectedPositionControl_valid;  /**< Must be set to true if injectedPositionControl is being passed */
+  uint8_t injectedPositionControl;
+  /**<   Specifies whether the injected position is used for a direct calculation
+       in the position engine.
+
+       Valid values: \begin{itemize1}
+       \item    0x01 (TRUE) -- The injected position is used in a direct
+                               position calculation
+       \item    0x00 (FALSE) -- The injected position is not used in a direct
+                                position calculation
+       \end{itemize1}
+       The default value is TRUE.
+  */
+
+  /* Optional */
+  /*  Filter SV Usage */
+  uint8_t filterSvUsage_valid;  /**< Must be set to true if filterSvUsage is being passed */
+  uint8_t filterSvUsage;
+  /**<   Specifies whether SV usage is filtered in a position fix.
+
+       Valid values: \begin{itemize1}
+       \item    0x01 (TRUE) -- SV usage is filtered in the fix
+       \item    0x00 (FALSE) -- SV usage is not filtered in the fix
+       \end{itemize1}
+       The default value is FALSE.
+  */
+
+  /* Optional */
+  /*  Store Assist Data */
+  uint8_t storeAssistData_valid;  /**< Must be set to true if storeAssistData is being passed */
+  uint8_t storeAssistData;
+  /**<   Specifies whether assistance data is stored in persistent memory.
+
+       Valid values: \begin{itemize1}
+       \item    0x01 (TRUE) -- Assistance data is stored in persistent memory
+       \item    0x00 (FALSE) -- Assistance data is not stored in persistent
+                                memory
+       \end{itemize1}
+       The default value is TRUE.
+  */
+
+  /* Optional */
+  /*  Enable Faster TTFF */
+  uint8_t enableFasterTTFF_valid;  /**< Must be set to true if enableFasterTTFF is being passed */
+  uint8_t enableFasterTTFF;
+  /**<   Allows the receiver to stay on after a position session in order to
+       collect information that will help reduce the TTFF
+       when the next position request is made. The receiver will stay
+       on only if  the engine determines that it needs to collect some
+       information. The receiver will stay on for the duration needed to
+       collect the information.
+       If enabled, the clients may see a delay in receiving the Engine Off
+       event after the position session ends.
+
+       Valid values: \begin{itemize1}
+       \item    0x01 (TRUE) -- Allow the engine to stay on for reduced TTFF
+       \item    0x00 (FALSE) -- Do not allow the engine to stay on for reduced
+                               TTFF
+       \end{itemize1}
+        The default value is TRUE.*/
+}qmiLocGetPositionEngineConfigParametersIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint8_t qmiLocGeofenceBreachMaskT_v02;
+#define QMI_LOC_GEOFENCE_BREACH_ENTERING_MASK_V02 ((qmiLocGeofenceBreachMaskT_v02)0x01) /**<  If this mask is set, a breach event is reported
+       when the Geofence is entered  */
+#define QMI_LOC_GEOFENCE_BREACH_LEAVING_MASK_V02 ((qmiLocGeofenceBreachMaskT_v02)0x02) /**<  If this mask is set, a breach event is reported
+       when the Geofence is exited  */
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGEOFENCERESPONSIVENESSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GEOFENCE_RESPONSIVENESS_LOW_V02 = 0x01, /**<  The Geofence is monitored for a breach at a
+       low rate of 15 minutes. The gap between the actual breach and
+       the time it is reported is higher. This
+       setting results in lower power usage.  */
+  eQMI_LOC_GEOFENCE_RESPONSIVENESS_MED_V02 = 0x02, /**<  The Geofence is monitored for a breach at a
+       medium rate of 2 minutes. This is the default setting.  */
+  eQMI_LOC_GEOFENCE_RESPONSIVENESS_HIGH_V02 = 0x03, /**<  The Geofence is monitored for a breach at a
+       high rate of 10 seconds. The gap between the actual breach and
+       the time it is reported is low. This results
+       in higher power usage.  */
+  eQMI_LOC_GEOFENCE_RESPONSIVENESS_ULTRA_HIGH_V02 = 0x04, /**<  The Geofence is monitored for a breach at a
+       very high rate of 1 second. The gap between the actual breach and
+       the time it is reported is very low. This results
+       in very high power usage. This setting must be avoided whenever
+       possible because of the drastic power implications.  */
+  eQMI_LOC_GEOFENCE_RESPONSIVENESS_CUSTOM_V02 = 0x05, /**<  The Geofence is monitored for a breach at a
+       user defined rate. The gap between the actual breach and
+       the time it is reported depends on the user setting. The power implication
+       is inversely proportional to the responsiveness value set by the user.
+       The higher the responsiveness value, the lower the power implications, and vice-versa.  */
+  QMILOCGEOFENCERESPONSIVENESSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGeofenceResponsivenessEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  double latitude;
+  /**<   Latitude of the center of the Geofence.*/
+
+  double longitude;
+  /**<   Longitude of the center of the Geofence.*/
+
+  uint32_t radius;
+  /**<   Radius of the circular Geofence in meters. */
+}qmiLocCircularGeofenceArgsStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGEOFENCEPOSITIONENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GEOFENCE_POSITION_INSIDE_V02 = 0x01, /**<  Position is inside a Geofence  */
+  eQMI_LOC_GEOFENCE_POSITION_OUTSIDE_V02 = 0x02, /**<  Position is outside a Geofence  */
+  QMILOCGEOFENCEPOSITIONENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGeofencePositionEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to add a circular Geofence. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The transaction ID
+       is returned in the Add Circular Geofence
+       indication. */
+
+  /* Mandatory */
+  /*  Circular Geofence Arguments */
+  qmiLocCircularGeofenceArgsStructT_v02 circularGeofenceArgs;
+
+  /* Mandatory */
+  /*  Breach Event Mask */
+  qmiLocGeofenceBreachMaskT_v02 breachMask;
+  /**<   Specifies the breach events in which the client is interested.
+
+       Valid values: \begin{itemize1}
+       \item    0x01 -- GEOFENCE_BREACH_ ENTERING_MASK
+       \item    0x02 -- GEOFENCE_BREACH_ LEAVING_MASK
+       \vspace{-0.18in} \end{itemize1} */
+
+  /* Mandatory */
+  /*  Include Position in Breach Event */
+  uint8_t includePosition;
+  /**<   Specifies whether the Geofence engine is to include the position
+       in a breach event.
+
+       Valid values: \begin{itemize1}
+       \item    0x01 (TRUE) -- Position will be reported with the breach event
+       \item    0x00 (FALSE) -- Position will not be reported with the breach
+                                event
+       \vspace{-0.18in} \end{itemize1} */
+
+  /* Optional */
+  /*  Responsiveness */
+  uint8_t responsiveness_valid;  /**< Must be set to true if responsiveness is being passed */
+  qmiLocGeofenceResponsivenessEnumT_v02 responsiveness;
+  /**<   Specifies the rate of detection for a Geofence breach.
+ This may impact the time lag between the actual breach event and
+ when it is reported. This parameter has power implications
+ and is to be fine-tuned to optimize power savings.
+
+ Valid values: \n
+      - eQMI_LOC_GEOFENCE_RESPONSIVENESS_LOW (0x01) --  The Geofence is monitored for a breach at a
+       low rate of 15 minutes. The gap between the actual breach and
+       the time it is reported is higher. This
+       setting results in lower power usage.
+      - eQMI_LOC_GEOFENCE_RESPONSIVENESS_MED (0x02) --  The Geofence is monitored for a breach at a
+       medium rate of 2 minutes. This is the default setting.
+      - eQMI_LOC_GEOFENCE_RESPONSIVENESS_HIGH (0x03) --  The Geofence is monitored for a breach at a
+       high rate of 10 seconds. The gap between the actual breach and
+       the time it is reported is low. This results
+       in higher power usage.
+      - eQMI_LOC_GEOFENCE_RESPONSIVENESS_ULTRA_HIGH (0x04) --  The Geofence is monitored for a breach at a
+       very high rate of 1 second. The gap between the actual breach and
+       the time it is reported is very low. This results
+       in very high power usage. This setting must be avoided whenever
+       possible because of the drastic power implications.
+      - eQMI_LOC_GEOFENCE_RESPONSIVENESS_CUSTOM (0x05) --  The Geofence is monitored for a breach at a
+       user defined rate. The gap between the actual breach and
+       the time it is reported depends on the user setting. The power implication
+       is inversely proportional to the responsiveness value set by the user.
+       The higher the responsiveness value, the lower the power implications, and vice-versa.
+ */
+
+  /* Optional */
+  /*  Confidence */
+  uint8_t confidence_valid;  /**< Must be set to true if confidence is being passed */
+  qmiLocGeofenceConfidenceEnumT_v02 confidence;
+  /**<   Given a breach event, the confidence determines the probability
+ that the breach happened at the Geofence boundary.
+ This parameter has power implications and
+ is to be fine-tuned to optimize power savings.
+
+ Valid values: \n
+      - eQMI_LOC_GEOFENCE_CONFIDENCE_LOW (0x01) --  Geofence engine indicates a breach with
+       low confidence; this setting results in lower
+       power usage, and it can impact the yield because
+       incorrect breach events may be sent
+      - eQMI_LOC_GEOFENCE_CONFIDENCE_MED (0x02) --  (Default) Geofence engine indicates a breach with
+       medium confidence
+      - eQMI_LOC_GEOFENCE_CONFIDENCE_HIGH (0x03) --  Geofence engine indicates a breach with
+       high confidence; this setting results in higher
+       power usage
+ */
+
+  /* Optional */
+  /*  Custom Responsiveness Value */
+  uint8_t customResponsivenessValue_valid;  /**< Must be set to true if customResponsivenessValue is being passed */
+  uint32_t customResponsivenessValue;
+  /**<   Specifies in seconds the user-defined rate of detection for a Geofence breach.
+       This may impact the time lag between the actual breach event and
+       when it is reported. The gap between the actual breach and
+       the time it is reported depends on the user setting. The power implication
+       is inversely proportional to the responsiveness value set by the user.
+       The higher the responsiveness value, the lower the power implications, and vice-versa.
+       If this field is set, the responsiveness is always treated
+       as eQMI_LOC_GEOFENCE_ RESPONSIVENESS_CUSTOM.
+       The minimum value supported in this field is 1 second, and the maximum value is 65535 seconds.
+       An error is returned if an attempt is made to set this to an unsupported value.
+       If this field is set, the responsiveness is always treated
+       as eQMI_LOC_GEOFENCE_ RESPONSIVENESS_CUSTOM, which means that the other responsiveness
+       types, such as eQMI_LOC_GEOFENCE _RESPONSIVENESS_LOW, eQMI_LOC_GEOFENCE_ RESPONSIVENESS_MEDIUM,
+       eQMI_LOC_GEOFENCE_ RESPONSIVENESS_HIGH, and eQMI_LOC_GEOFENCE_ RESPONSIVENESS_ULTRA_HIGH are all
+       disregarded.
+       If this field is not set, the responsiveness will be treated as
+       eQMI_LOC_GEOFENCE_ RESPONSIVENESS_LOW, eQMI_LOC_GEOFENCE_RESPONSIVENESS_MEDIUM,
+       eQMI_LOC_GEOFENCE_RESPONSIVENESS_HIGH, or eQMI_LOC_GEOFENCE_RESPONSIVENESS_ULTRA_HIGH.
+  */
+
+  /* Optional */
+  /*  Dwell Time of geofence */
+  uint8_t dwellTime_valid;  /**< Must be set to true if dwellTime is being passed */
+  uint32_t dwellTime;
+  /**<   Dwell time is the time spent inside the geofence in seconds.
+       The time a user spends in the geofence before a dwell event is sent .The max acceptable value
+       for dwell time is 65535 seconds.
+  */
+}qmiLocAddCircularGeofenceReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to add a circular Geofence. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Add Circular Geofence Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Add Circular Geofence request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Transaction ID */
+  uint8_t transactionId_valid;  /**< Must be set to true if transactionId is being passed */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Add Circular
+       Geofence request. This parameter will always be present
+       if the status field is set to SUCCESS. */
+
+  /* Optional */
+  /*  Geofence ID */
+  uint8_t geofenceId_valid;  /**< Must be set to true if geofenceId is being passed */
+  uint32_t geofenceId;
+  /**<   Geofence identifier allocated by the engine.
+       The client must include this identifier in all transactions
+       pertaining to this Geofence. */
+}qmiLocAddCircularGeofenceIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to delete a Geofence. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Geofence ID */
+  uint32_t geofenceId;
+  /**<   Identifier for the Geofence that is to be deleted. */
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The transaction ID
+       is returned in the Delete Geofence
+       indication. */
+}qmiLocDeleteGeofenceReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to delete a Geofence. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Delete Geofence Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Delete Geofence request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Geofence ID */
+  uint8_t geofenceId_valid;  /**< Must be set to true if geofenceId is being passed */
+  uint32_t geofenceId;
+  /**<   Identifier for the Geofence that was deleted. */
+
+  /* Optional */
+  /*  Transaction ID */
+  uint8_t transactionId_valid;  /**< Must be set to true if transactionId is being passed */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Delete
+       Geofence request. This parameter will always be present
+       if the status field is set to SUCCESS. */
+}qmiLocDeleteGeofenceIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGEOFENCEORIGINENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GEOFENCE_ORIGIN_NETWORK_V02 = 1, /**<  Geofence was initiated by a network-initiated client  */
+  eQMI_LOC_GEOFENCE_ORIGIN_DEVICE_V02 = 2, /**<  Geofence was initiated by the device  */
+  QMILOCGEOFENCEORIGINENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGeofenceOriginEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGEOFENCESTATEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GEOFENCE_STATE_ACTIVE_V02 = 1, /**<  Geofence is being actively monitored  */
+  eQMI_LOC_GEOFENCE_STATE_SUSPEND_V02 = 2, /**<  Geofence monitoring is suspended  */
+  QMILOCGEOFENCESTATEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGeofenceStateEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to query a Geofence. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Geofence ID */
+  uint32_t geofenceId;
+  /**<   Identifier for the Geofence that is to be queried. */
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The transaction ID
+       is returned with the Query Geofence
+       indication. */
+}qmiLocQueryGeofenceReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to query a Geofence. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Query Geofence Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Query Geofence request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Geofence ID */
+  uint8_t geofenceId_valid;  /**< Must be set to true if geofenceId is being passed */
+  uint32_t geofenceId;
+  /**<   Identifier for the Geofence that was queried. */
+
+  /* Optional */
+  /*  Transaction ID */
+  uint8_t transactionId_valid;  /**< Must be set to true if transactionId is being passed */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Query
+       Geofence request. This parameter will always be present
+       if the status field is set to SUCCESS. */
+
+  /* Optional */
+  /*  Geofence Origin */
+  uint8_t geofenceOrigin_valid;  /**< Must be set to true if geofenceOrigin is being passed */
+  qmiLocGeofenceOriginEnumT_v02 geofenceOrigin;
+  /**<   Originator of the Geofence.
+
+ Valid values: \n
+      - eQMI_LOC_GEOFENCE_ORIGIN_NETWORK (1) --  Geofence was initiated by a network-initiated client
+      - eQMI_LOC_GEOFENCE_ORIGIN_DEVICE (2) --  Geofence was initiated by the device
+ */
+
+  /* Optional */
+  /*  Position with Respect to Geofence */
+  uint8_t posWrtGeofence_valid;  /**< Must be set to true if posWrtGeofence is being passed */
+  qmiLocGeofencePositionEnumT_v02 posWrtGeofence;
+  /**<   Indicates if the client is currently inside or outside
+ the Geofence.
+
+ Valid values: \n
+      - eQMI_LOC_GEOFENCE_POSITION_INSIDE (0x01) --  Position is inside a Geofence
+      - eQMI_LOC_GEOFENCE_POSITION_OUTSIDE (0x02) --  Position is outside a Geofence
+ */
+
+  /* Optional */
+  /*  Circular Geofence Parameters */
+  uint8_t circularGeofenceArgs_valid;  /**< Must be set to true if circularGeofenceArgs is being passed */
+  qmiLocCircularGeofenceArgsStructT_v02 circularGeofenceArgs;
+
+  /* Optional */
+  /*  Geofence State */
+  uint8_t geofenceState_valid;  /**< Must be set to true if geofenceState is being passed */
+  qmiLocGeofenceStateEnumT_v02 geofenceState;
+  /**<   Specifies whether the Geofence is to be actively monitored.
+
+ Valid values: \n
+      - eQMI_LOC_GEOFENCE_STATE_ACTIVE (1) --  Geofence is being actively monitored
+      - eQMI_LOC_GEOFENCE_STATE_SUSPEND (2) --  Geofence monitoring is suspended
+ */
+}qmiLocQueryGeofenceIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocMotionDetectionSourceMaskT_v02;
+#define QMI_LOC_MOTION_DETECTION_SOURCE_SENSORS_V02 ((qmiLocMotionDetectionSourceMaskT_v02)0x00000001) /**<  Sensors are used for motion detection  */
+#define QMI_LOC_MOTION_DETECTION_SOURCE_WIFI_V02 ((qmiLocMotionDetectionSourceMaskT_v02)0x00000002) /**<  Wi-Fi is used for motion detection  */
+#define QMI_LOC_MOTION_DETECTION_SOURCE_WWAN_V02 ((qmiLocMotionDetectionSourceMaskT_v02)0x00000004) /**<  Wireless WAN is used for motion detection  */
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGEOFENCEMOTIONSTATESENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GEOFENCE_MOTION_STATE_STATIONARY_V02 = 0, /**<  Motion state Stationary -- Handset is completely stationary  */
+  eQMI_LOC_GEOFENCE_MOTION_STATE_FIDDLE_V02 = 1, /**<  Motion state Fiddle -- Handset is not in motion but is being "fiddled" with  */
+  eQMI_LOC_GEOFENCE_MOTION_STATE_WALK_V02 = 2, /**<  Motion state Walk -- User is walking with the handset  */
+  eQMI_LOC_GEOFENCE_MOTION_STATE_RUN_V02 = 3, /**<  Motion state Run -- User is running with the handset  */
+  eQMI_LOC_GEOFENCE_MOTION_STATE_DRIVE_V02 = 4, /**<  Motion state Drive -- User is driving with the handset  */
+  QMILOCGEOFENCEMOTIONSTATESENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGeofenceMotionStatesEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocGeofenceMotionStatesEnumT_v02 motionState;
+  /**<   Motion state for which information is being configured. */
+
+  float motionStateSpeed;
+  /**<    Motion state speed in milliseconds.
+
+           These are positive floating values.
+           The state speed must be configured carefully. Very low speed
+           configuration for a state may result in missing Geofence
+           breaches in some scenarios.
+
+           Typical motion state speeds: \n
+           - Stationary speed -- 0 meters/sec
+           - Fiddle speed -- 0 meters/sec \n
+           - Walk speed -- 3 meters/sec    \n
+           - Run speed -- 8 meters/sec \n
+           - Drive speed -- 56 meters/sec
+  */
+}qmiLocGeofenceMotionStateConfigStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to set the Geofence engine configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The transaction ID
+       is returned with the Set Geofence Configuration
+       indication. */
+
+  /* Optional */
+  /*  GNSS Unavailable Indication Timeout */
+  uint8_t gnssUnavailableIndicationTimeout_valid;  /**< Must be set to true if gnssUnavailableIndicationTimeout is being passed */
+  uint32_t gnssUnavailableIndicationTimeout;
+  /**<   In a bad GNSS environment, this is the timeout after which the Geofence
+       engine sends out a GNSS Unavailable indication. The GNSS Unavailable
+       indication is sent under the following conditions: \begin{itemize1}
+       \item If gnssUnavailableIndicationTimeout is less than
+             gnssPositionSessionTimeout, the GNSS
+             Unavailable timeout indication is sent after
+             gnssPositionSessionTimeout expires
+       \item If gnssPositionSessionTimeout is less than
+             gnssUnavailableIndicationTimeout, the
+             GNSS Unavailable timeout indication is sent after
+             gnssUnavailableIndicationTimeout expires
+        \vspace{-0.18in} \end{itemize1} */
+
+  /* Optional */
+  /*  Max Geofences */
+  uint8_t maxGeofences_valid;  /**< Must be set to true if maxGeofences is being passed */
+  uint32_t maxGeofences;
+  /**<   Identifies the maximum number of Geofences that can be supported by
+       the Geofence engine. If this number is less than the currently deployed
+       Geofences, this command fails.
+
+       If the command succeeds, the engine supports the maximum number of
+       Geofences requested, provided there is enough memory to support that
+       many Geofences. Increasing this value to a very large number in a
+       constrained memory environment might affect other modules negatively.
+       This value is determined by phone manufacturers. The default value
+       is 200. */
+
+  /* Optional */
+  /*  Enable Motion Detection Sources */
+  uint8_t enableMotionDetectionSources_valid;  /**< Must be set to true if enableMotionDetectionSources is being passed */
+  qmiLocMotionDetectionSourceMaskT_v02 enableMotionDetectionSources;
+  /**<   Identifies the sources that can be enabled for motion detection by
+ the Geofence engine. The sources of motion detection that are enabled
+ by the Geofence engine are dependent on the platform.
+ These sources can only be set once at boot time and they are not expected to be changed after that.
+ Any attempt to set the value of the motion detection sources at runtime results in an undefined behavior.
+ Valid values: \n
+      - QMI_LOC_MOTION_DETECTION_SOURCE_SENSORS (0x00000001) --  Sensors are used for motion detection
+      - QMI_LOC_MOTION_DETECTION_SOURCE_WIFI (0x00000002) --  Wi-Fi is used for motion detection
+      - QMI_LOC_MOTION_DETECTION_SOURCE_WWAN (0x00000004) --  Wireless WAN is used for motion detection  */
+
+  /* Optional */
+  /*  Enable Coarse Position Injection Usage */
+  uint8_t enableCpiUsage_valid;  /**< Must be set to true if enableCpiUsage is being passed */
+  uint8_t enableCpiUsage;
+  /**<   Indicates whether external Coarse Position Injection (CPI) is used
+       by the Geofence engine.
+       \begin{itemize1}
+       \item    0x01 (TRUE)  -- CPI is enabled (default)
+       \item    0x00 (FALSE) -- CPI is disabled
+       \vspace{-0.18in} \end{itemize1}*/
+
+  /* Optional */
+  /*  GNSS Position QOS Session Timeout */
+  uint8_t gnssPositionSessionTimeout_valid;  /**< Must be set to true if gnssPositionSessionTimeout is being passed */
+  uint32_t gnssPositionSessionTimeout;
+  /**<   Identifies the session timeout value (in seconds) for requesting a
+         position in a bad GNSS environment.
+
+         Valid values: \begin{itemize1}
+   \item If the gnssUnavailableIndicationTimeout value is less than
+         gnssPositionSessionTimeout, in a bad GNSS environment, the GNSS
+         Unavailable timeout indication is sent after
+         gnssPositionSessionTimeout expires.
+   \item If gnssPositionSessionTimeout is less than gnssUnavailableIndicationTimeout,
+         in a bad GNSS environment, the GNSS Unavailable timeout indication
+         is sent after gnssUnavailableIndicationTimeout expires. \vspace{-0.18in} \end{itemize1}
+    */
+
+  /* Optional */
+  /*  GNSS Position Maximum Position Uncertainity Acceptable */
+  uint8_t gnssPositionMaxPuncAcceptable_valid;  /**< Must be set to true if gnssPositionMaxPuncAcceptable is being passed */
+  uint32_t gnssPositionMaxPuncAcceptable;
+  /**<   GNSS maximum position uncertainity in meters acceptable by
+         the Geofence engine.
+
+         Valid values: \n
+         - All positive values
+    */
+
+  /* Optional */
+  /*  Medium Responsiveness Value */
+  uint8_t mediumResponsivenessValue_valid;  /**< Must be set to true if mediumResponsivenessValue is being passed */
+  uint32_t mediumResponsivenessValue;
+  /**<   Medium responsiveness value in seconds that the Geofence engine
+         uses for all medium responsiveness Geofences in the Geofence engine.
+
+         Valid values: \begin{itemize1}
+         \item Positive values (in seconds)
+         \item If the value is configured for less than 30 sec, the value is
+               set at 30 sec
+         \item If the value is configured for more than 600 sec, the value is
+               set at 600 sec
+         \item Default -- The Geofence engine uses 120 sec as the medium
+                          responsiveness value
+         \end{itemize1}
+
+         If the medium responsiveness value is changed, the responsiveness
+         of the existing medium responsiveness Geofence does not change until the next
+         position fix, which is based on the previous medium responsiveness
+         setting.
+    */
+
+  /* Optional */
+  /*  Challenging GNSS Environment Minimum CPI Wait Interval */
+  uint8_t chalGnssEnvMinCpiWaitInterval_valid;  /**< Must be set to true if chalGnssEnvMinCpiWaitInterval is being passed */
+  uint32_t chalGnssEnvMinCpiWaitInterval;
+  /**<   Number of seconds that the Geofence engine is to wait between
+         CPI requests in challenging a GNSS environment.
+
+         Valid values: \n
+         - Positive values (in seconds)
+     */
+
+  /* Optional */
+  /*  Geofence Motion State Information */
+  uint8_t motionStateInfo_valid;  /**< Must be set to true if motionStateInfo is being passed */
+  uint32_t motionStateInfo_len;  /**< Must be set to # of elements in motionStateInfo */
+  qmiLocGeofenceMotionStateConfigStructT_v02 motionStateInfo[QMI_LOC_GEOFENCE_MAX_MOTION_STATES_V02];
+  /**<   \vspace{4pt} \n  Motion state informatino (e.g., motion state speed) that the
+         Geofence engine is to use.
+   */
+}qmiLocSetGeofenceEngineConfigReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to set the Geofence engine configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set Geofence Engine Configuration Status. */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set Geofence Engine Configuration request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+
+  /* Optional */
+  /*  Transaction ID */
+  uint8_t transactionId_valid;  /**< Must be set to true if transactionId is being passed */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Set Geofence Configuration
+       request. This parameter is always present if the status
+       field is set to SUCCESS. */
+}qmiLocSetGeofenceEngineConfigIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to get the Geofence engine configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The transaction ID
+       is returned with the Get Geofence Engine Configuration
+       indication. */
+}qmiLocGetGeofenceEngineConfigReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to get the Geofence engine configuration. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Geofence Engine Configuration Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Geofence Engine Configuration request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+
+  /* Optional */
+  /*  Transaction ID */
+  uint8_t transactionId_valid;  /**< Must be set to true if transactionId is being passed */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Get Geofence Engine Configuration
+       request. This parameter is always present
+       if the status field is set to SUCCESS. */
+
+  /* Optional */
+  /*  GPS Unavailable Indication Timeout */
+  uint8_t gnssUnavailableIndicationTimeout_valid;  /**< Must be set to true if gnssUnavailableIndicationTimeout is being passed */
+  uint32_t gnssUnavailableIndicationTimeout;
+  /**<   In a bad GNSS environment, the timeout after which the Geofence engine
+       sends out a GNSS unavailable indication. */
+
+  /* Optional */
+  /*  Max Geofences */
+  uint8_t maxGeofences_valid;  /**< Must be set to true if maxGeofences is being passed */
+  uint32_t maxGeofences;
+  /**<   Identifies the maximum number of Geofences that are currently supported
+       in the Geofence engine.  */
+
+  /* Optional */
+  /*  Enabled Motion Detection Sources */
+  uint8_t enabledMotionDetectionSources_valid;  /**< Must be set to true if enabledMotionDetectionSources is being passed */
+  qmiLocMotionDetectionSourceMaskT_v02 enabledMotionDetectionSources;
+  /**<   Identifies the sources that are currently enabled for motion detection
+ by the Geofence engine.
+
+ Valid values: \n
+      - QMI_LOC_MOTION_DETECTION_SOURCE_SENSORS (0x00000001) --  Sensors are used for motion detection
+      - QMI_LOC_MOTION_DETECTION_SOURCE_WIFI (0x00000002) --  Wi-Fi is used for motion detection
+      - QMI_LOC_MOTION_DETECTION_SOURCE_WWAN (0x00000004) --  Wireless WAN is used for motion detection  */
+
+  /* Optional */
+  /*  Enabled for CPI Position Injection Usage */
+  uint8_t enabledCpiUsage_valid;  /**< Must be set to true if enabledCpiUsage is being passed */
+  uint8_t enabledCpiUsage;
+  /**<   Indicates whether CPI usage is enabled.
+       \begin{itemize1}
+       \item    0x01 (TRUE)  -- CPI usage is enabled
+       \item    0x00 (FALSE) -- CPI usage is disabled
+       \vspace{-0.18in} \end{itemize1}*/
+}qmiLocGetGeofenceEngineConfigIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to edit a Geofence. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Geofence ID */
+  uint32_t geofenceId;
+  /**<   Identifier for the Geofence to be edited. */
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Edit Geofence
+       request. This parameter will always be present if the
+       status field is set to SUCCESS.
+ */
+
+  /* Optional */
+  /*  Geofence State */
+  uint8_t geofenceState_valid;  /**< Must be set to true if geofenceState is being passed */
+  qmiLocGeofenceStateEnumT_v02 geofenceState;
+  /**<   Specifies whether the Geofence is to be actively monitored.
+
+ Valid values: \n
+      - eQMI_LOC_GEOFENCE_STATE_ACTIVE (1) --  Geofence is being actively monitored
+      - eQMI_LOC_GEOFENCE_STATE_SUSPEND (2) --  Geofence monitoring is suspended
+ */
+
+  /* Optional */
+  /*  Breach Event Mask */
+  uint8_t breachMask_valid;  /**< Must be set to true if breachMask is being passed */
+  qmiLocGeofenceBreachMaskT_v02 breachMask;
+  /**<   Specifies the breach events in which the client is interested.
+
+       Valid values: \begin{itemize1}
+       \item    0x01 -- GEOFENCE_BREACH_ ENTERING_MASK
+       \item    0x02 -- GEOFENCE_BREACH_ LEAVING_MASK
+       \vspace{-0.18in} \end{itemize1} */
+
+  /* Optional */
+  /*  Responsiveness */
+  uint8_t responsiveness_valid;  /**< Must be set to true if responsiveness is being passed */
+  qmiLocGeofenceResponsivenessEnumT_v02 responsiveness;
+  /**<   Specifies the rate of detection for a Geofence breach.
+ This may impact the time lag between the actual breach event and
+ when it is reported. This parameter has power implications
+ and is to be fine-tuned to optimize power savings.
+
+ Valid values: \n
+      - eQMI_LOC_GEOFENCE_RESPONSIVENESS_LOW (0x01) --  The Geofence is monitored for a breach at a
+       low rate of 15 minutes. The gap between the actual breach and
+       the time it is reported is higher. This
+       setting results in lower power usage.
+      - eQMI_LOC_GEOFENCE_RESPONSIVENESS_MED (0x02) --  The Geofence is monitored for a breach at a
+       medium rate of 2 minutes. This is the default setting.
+      - eQMI_LOC_GEOFENCE_RESPONSIVENESS_HIGH (0x03) --  The Geofence is monitored for a breach at a
+       high rate of 10 seconds. The gap between the actual breach and
+       the time it is reported is low. This results
+       in higher power usage.
+      - eQMI_LOC_GEOFENCE_RESPONSIVENESS_ULTRA_HIGH (0x04) --  The Geofence is monitored for a breach at a
+       very high rate of 1 second. The gap between the actual breach and
+       the time it is reported is very low. This results
+       in very high power usage. This setting must be avoided whenever
+       possible because of the drastic power implications.
+      - eQMI_LOC_GEOFENCE_RESPONSIVENESS_CUSTOM (0x05) --  The Geofence is monitored for a breach at a
+       user defined rate. The gap between the actual breach and
+       the time it is reported depends on the user setting. The power implication
+       is inversely proportional to the responsiveness value set by the user.
+       The higher the responsiveness value, the lower the power implications, and vice-versa.
+ */
+}qmiLocEditGeofenceReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocGeofenceConfigParamMaskT_v02;
+#define QMI_LOC_GEOFENCE_PARAM_MASK_GEOFENCE_STATE_V02 ((qmiLocGeofenceConfigParamMaskT_v02)0x00000001) /**<  Mask for the Geofence state parameter.  */
+#define QMI_LOC_GEOFENCE_PARAM_MASK_BREACH_MASK_V02 ((qmiLocGeofenceConfigParamMaskT_v02)0x00000002) /**<  Mask for Geofence breach mask parameter.  */
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to edit a Geofence. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Edit Geofence Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Edit Geofence request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+
+  /* Optional */
+  /*  Geofence ID */
+  uint8_t geofenceId_valid;  /**< Must be set to true if geofenceId is being passed */
+  uint32_t geofenceId;
+  /**<   Identifier for the Geofence that was edited. */
+
+  /* Optional */
+  /*  Transaction ID */
+  uint8_t transactionId_valid;  /**< Must be set to true if transactionId is being passed */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The transaction ID
+       is specified in the Edit Geofence request. */
+
+  /* Optional */
+  /*  Failed Parameters */
+  uint8_t failedParams_valid;  /**< Must be set to true if failedParams is being passed */
+  qmiLocGeofenceConfigParamMaskT_v02 failedParams;
+  /**<   Specified only when the status is not set to SUCCESS. If
+       the mask corresponding to a field is set, it indicates that
+       the Geofence parameter could not be edited.
+
+       Valid values: \begin{itemize1}
+       \item    0x00000001 -- GEOFENCE_PARAM_ MASK_GEOFENCE_STATE
+       \item    0x00000002 -- GEOFENCE_PARAM_ MASK_BREACH_MASK
+       \vspace{-0.18in} \end{itemize1} */
+}qmiLocEditGeofenceIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Requests the control point to inject time zone information. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get time zone info Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get time zone info request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+}qmiLocEventGetTimeZoneReqIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint64_t dstOffset;
+  /**<   The offset for daylight-savings time in seconds. This will be zero if the time zone is not in Daylight Savings
+       Time during the specified UTC timestamp */
+
+  uint64_t rawOffset;
+  /**<    the offset from UTC (in seconds) for the current location. This does not take into effect daylight savings. */
+}qmiLocTimeZoneStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to inject time zone information. */
+typedef struct {
+
+  /* Mandatory */
+  /*  UTC Time */
+  uint64_t timeUtc;
+  /**<   UTC time since Jan. 1, 1970.\n
+       - Units: Milliseconds */
+
+  /* Mandatory */
+  /*  Time Zone information */
+  qmiLocTimeZoneStructT_v02 timeZone;
+  /**<   The time zone information  */
+}qmiLocInjectTimeZoneInfoReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to inject time zone information. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Edit Geofence Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Edit Geofence request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+}qmiLocInjectTimeZoneInfoIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to get the best available
+                    position estimate from the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The transaction ID
+       is returned in the Get Best Available Position indication. */
+}qmiLocGetBestAvailablePositionReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to get the best available
+                    position estimate from the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Best Available Position Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Best Available Position request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+
+  /* Optional */
+  /*  Transaction ID */
+  uint8_t transactionId_valid;  /**< Must be set to true if transactionId is being passed */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Get Best
+       Available Position request. This parameter will
+       always be present if the status field is set to
+       SUCCESS. */
+
+  /* Optional */
+  /*  Latitude */
+  uint8_t latitude_valid;  /**< Must be set to true if latitude is being passed */
+  double latitude;
+  /**<   Latitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item     Range: -90.0 to 90.0      \begin{itemize1}
+         \item    Positive values indicate northern latitude
+         \item    Negative values indicate southern latitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  /* Optional */
+  /*   Longitude */
+  uint8_t longitude_valid;  /**< Must be set to true if longitude is being passed */
+  double longitude;
+  /**<   Longitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -180.0 to 180.0     \begin{itemize1}
+         \item    Positive values indicate eastern longitude
+         \item    Negative values indicate western longitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  /* Optional */
+  /*   Circular Horizontal Position Uncertainty */
+  uint8_t horUncCircular_valid;  /**< Must be set to true if horUncCircular is being passed */
+  float horUncCircular;
+  /**<   Horizontal position uncertainty (circular).\n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Altitude With Respect to Ellipsoid */
+  uint8_t altitudeWrtEllipsoid_valid;  /**< Must be set to true if altitudeWrtEllipsoid is being passed */
+  float altitudeWrtEllipsoid;
+  /**<   Altitude with respect to the WGS84 ellipsoid.\n
+       - Units: Meters \n
+       - Range: -500 to 15883 */
+
+  /* Optional */
+  /*  Vertical Uncertainty */
+  uint8_t vertUnc_valid;  /**< Must be set to true if vertUnc is being passed */
+  float vertUnc;
+  /**<   Vertical uncertainty.\n
+       - Units: Meters */
+
+  /* Optional */
+  /*  UTC Timestamp */
+  uint8_t timestampUtc_valid;  /**< Must be set to true if timestampUtc is being passed */
+  uint64_t timestampUtc;
+  /**<   UTC timestamp.
+       \begin{itemize1}
+       \item Units: Milliseconds since Jan. 1, 1970
+       \vspace{-0.18in} \end{itemize1} */
+
+  /* Optional */
+  /*  Time Uncertainty */
+  uint8_t timeUnc_valid;  /**< Must be set to true if timeUnc is being passed */
+  float timeUnc;
+  /**<   Time uncertainty. \n
+       - Units: Milliseconds */
+
+  /* Optional */
+  /*  Horizontal Elliptical Uncertainty Semi-Minor Axis */
+  uint8_t horUncEllipseSemiMinor_valid;  /**< Must be set to true if horUncEllipseSemiMinor is being passed */
+  float horUncEllipseSemiMinor;
+  /**<   Semi-minor axis of horizontal elliptical uncertainty. \n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Horizontal Elliptical Uncertainty Semi-Major Axis */
+  uint8_t horUncEllipseSemiMajor_valid;  /**< Must be set to true if horUncEllipseSemiMajor is being passed */
+  float horUncEllipseSemiMajor;
+  /**<   Semi-major axis of horizontal elliptical uncertainty. \n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Horizontal Elliptical Uncertainty Azimuth */
+  uint8_t horUncEllipseOrientAzimuth_valid;  /**< Must be set to true if horUncEllipseOrientAzimuth is being passed */
+  float horUncEllipseOrientAzimuth;
+  /**<   Elliptical horizontal uncertainty azimuth of orientation. \n
+       - Units: Decimal degrees \n
+       - Range: 0 to 180 */
+
+  /* Optional */
+  /*  Horizontal Circular Confidence */
+  uint8_t horCircularConfidence_valid;  /**< Must be set to true if horCircularConfidence is being passed */
+  uint8_t horCircularConfidence;
+  /**<   Horizontal circular uncertainty confidence. \n
+       - Units: Percent \n
+       - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Horizontal Elliptical Confidence */
+  uint8_t horEllipticalConfidence_valid;  /**< Must be set to true if horEllipticalConfidence is being passed */
+  uint8_t horEllipticalConfidence;
+  /**<   Horizontal elliptical uncertainty confidence. \n
+       - Units: Percent \n
+       - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Horizontal Reliability */
+  uint8_t horReliability_valid;  /**< Must be set to true if horReliability is being passed */
+  qmiLocReliabilityEnumT_v02 horReliability;
+  /**<   Specifies the reliability of the horizontal position.
+
+ Valid values: \n
+      - eQMI_LOC_RELIABILITY_NOT_SET (0) --  Location reliability is not set
+      - eQMI_LOC_RELIABILITY_VERY_LOW (1) --  Location reliability is very low; use it at your own risk
+      - eQMI_LOC_RELIABILITY_LOW (2) --  Location reliability is low; little or no cross-checking is possible
+      - eQMI_LOC_RELIABILITY_MEDIUM (3) --  Location reliability is medium; limited cross-check passed
+      - eQMI_LOC_RELIABILITY_HIGH (4) --  Location reliability is high; strong cross-check passed
+ */
+
+  /* Optional */
+  /*  Horizontal Speed */
+  uint8_t horSpeed_valid;  /**< Must be set to true if horSpeed is being passed */
+  float horSpeed;
+  /**<   Horizontal speed. \n
+       - Units: Meters/second */
+
+  /* Optional */
+  /*  Horizontal Speed Uncertainty */
+  uint8_t horSpeedUnc_valid;  /**< Must be set to true if horSpeedUnc is being passed */
+  float horSpeedUnc;
+  /**<   Horizontal speed uncertainty. \n
+       - Units: Meters/second */
+
+  /* Optional */
+  /*  Altitude With Respect to Sea Level */
+  uint8_t altitudeWrtMeanSeaLevel_valid;  /**< Must be set to true if altitudeWrtMeanSeaLevel is being passed */
+  float altitudeWrtMeanSeaLevel;
+  /**<   Altitude with respect to mean sea level. \n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Vertical Confidence */
+  uint8_t vertConfidence_valid;  /**< Must be set to true if vertConfidence is being passed */
+  uint8_t vertConfidence;
+  /**<   Vertical uncertainty confidence. \n
+       - Units: Percent \n
+       - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Vertical Reliability */
+  uint8_t vertReliability_valid;  /**< Must be set to true if vertReliability is being passed */
+  qmiLocReliabilityEnumT_v02 vertReliability;
+  /**<   Specifies the reliability of the vertical position.
+
+ Valid values: \n
+      - eQMI_LOC_RELIABILITY_NOT_SET (0) --  Location reliability is not set
+      - eQMI_LOC_RELIABILITY_VERY_LOW (1) --  Location reliability is very low; use it at your own risk
+      - eQMI_LOC_RELIABILITY_LOW (2) --  Location reliability is low; little or no cross-checking is possible
+      - eQMI_LOC_RELIABILITY_MEDIUM (3) --  Location reliability is medium; limited cross-check passed
+      - eQMI_LOC_RELIABILITY_HIGH (4) --  Location reliability is high; strong cross-check passed
+ */
+
+  /* Optional */
+  /*  Vertical Speed */
+  uint8_t vertSpeed_valid;  /**< Must be set to true if vertSpeed is being passed */
+  float vertSpeed;
+  /**<   Vertical speed. \n
+         - Units: Meters/second */
+
+  /* Optional */
+  /*  Vertical Speed Uncertainty */
+  uint8_t vertSpeedUnc_valid;  /**< Must be set to true if vertSpeedUnc is being passed */
+  float vertSpeedUnc;
+  /**<   Vertical speed uncertainty. \n
+       - Units: Meters/second */
+
+  /* Optional */
+  /*  Heading */
+  uint8_t heading_valid;  /**< Must be set to true if heading is being passed */
+  float heading;
+  /**<   Heading. \n
+         - Units: Degrees \n
+         - Range: 0 to 359.999  */
+
+  /* Optional */
+  /*  Heading Uncertainty */
+  uint8_t headingUnc_valid;  /**< Must be set to true if headingUnc is being passed */
+  float headingUnc;
+  /**<   Heading uncertainty. \n
+       - Type: Floating point \n
+       - Range: 0 to 359.999 */
+
+  /* Optional */
+  /*  Magnetic Deviation */
+  uint8_t magneticDeviation_valid;  /**< Must be set to true if magneticDeviation is being passed */
+  float magneticDeviation;
+  /**<   Difference between the bearing to true north and the bearing shown
+      on a magnetic compass. The deviation is positive when the magnetic
+      north is east of true north. */
+
+  /* Optional */
+  /*  Technology Used Mask */
+  uint8_t technologyMask_valid;  /**< Must be set to true if technologyMask is being passed */
+  qmiLocPosTechMaskT_v02 technologyMask;
+  /**<   Technology used in computing this fix.
+ Valid bitmasks: \n
+      - QMI_LOC_POS_TECH_MASK_SATELLITE (0x00000001) --  Satellites were used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_CELLID (0x00000002) --  Cell towers were used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_WIFI (0x00000004) --  Wi-Fi access points were used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_SENSORS (0x00000008) --  Sensors were used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_REFERENCE_LOCATION (0x00000010) --  Reference Location was used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_INJECTED_COARSE_POSITION (0x00000020) --  Coarse position injected into the location engine was used to
+        generate the fix
+      - QMI_LOC_POS_TECH_MASK_AFLT (0x00000040) --  AFLT was used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_HYBRID (0x00000080) --  GNSS and network-provided measurements were used to
+        generate the fix
+ */
+
+  /* Optional */
+  /*  Dilution of Precision */
+  uint8_t DOP_valid;  /**< Must be set to true if DOP is being passed */
+  qmiLocDOPStructT_v02 DOP;
+
+  /* Optional */
+  /*  GPS Time */
+  uint8_t gpsTime_valid;  /**< Must be set to true if gpsTime is being passed */
+  qmiLocGPSTimeStructT_v02 gpsTime;
+
+  /* Optional */
+  /*  Time Source */
+  uint8_t timeSrc_valid;  /**< Must be set to true if timeSrc is being passed */
+  qmiLocTimeSourceEnumT_v02 timeSrc;
+  /**<   Time source.
+ Valid values: \n
+      - eQMI_LOC_TIME_SRC_INVALID (0) --  Invalid time.
+      - eQMI_LOC_TIME_SRC_NETWORK_TIME_TRANSFER (1) --  Time is set by the 1X system
+      - eQMI_LOC_TIME_SRC_NETWORK_TIME_TAGGING (2) --  Time is set by WCDMA/GSM time tagging (that is,
+       associating network time with GPS time)
+      - eQMI_LOC_TIME_SRC_EXTERNAL_INPUT (3) --  Time is set by an external injection
+      - eQMI_LOC_TIME_SRC_TOW_DECODE (4) --  Time is set after decoding over-the-air GPS navigation data
+       from one GPS satellite
+      - eQMI_LOC_TIME_SRC_TOW_CONFIRMED (5) --  Time is set after decoding over-the-air GPS navigation data
+       from multiple satellites
+      - eQMI_LOC_TIME_SRC_TOW_AND_WEEK_CONFIRMED (6) --  Both time of the week and the GPS week number are known
+      - eQMI_LOC_TIME_SRC_NAV_SOLUTION (7) --  Time is set by the position engine after the fix is obtained
+      - eQMI_LOC_TIME_SRC_SOLVE_FOR_TIME (8) --  Time is set by the position engine after performing SFT;
+       this is done when the clock time uncertainty is large
+      - eQMI_LOC_TIME_SRC_GLO_TOW_DECODE (9) --  Time is set after decoding GLO satellites
+      - eQMI_LOC_TIME_SRC_TIME_TRANSFORM (10) --  Time is set after transforming the GPS to GLO time
+      - eQMI_LOC_TIME_SRC_WCDMA_SLEEP_TIME_TAGGING (11) --  Time is set by the sleep time tag provided by the WCDMA network
+      - eQMI_LOC_TIME_SRC_GSM_SLEEP_TIME_TAGGING (12) --  Time is set by the sleep time tag provided by the GSM network
+      - eQMI_LOC_TIME_SRC_UNKNOWN (13) --  Source of the time is unknown
+      - eQMI_LOC_TIME_SRC_SYSTEM_TIMETICK (14) --  Time is derived from the system clock (better known as the slow clock);
+       GNSS time is maintained irrespective of the GNSS receiver state
+      - eQMI_LOC_TIME_SRC_QZSS_TOW_DECODE (15) --  Time is set after decoding QZSS satellites
+      - eQMI_LOC_TIME_SRC_BDS_TOW_DECODE (16) --  Time is set after decoding BDS satellites
+ */
+
+  /* Optional */
+  /*  Sensor Data Usage */
+  uint8_t sensorDataUsage_valid;  /**< Must be set to true if sensorDataUsage is being passed */
+  qmiLocSensorUsageIndicatorStructT_v02 sensorDataUsage;
+
+  /* Optional */
+  /*  SVs Used to Calculate the Fix */
+  uint8_t gnssSvUsedList_valid;  /**< Must be set to true if gnssSvUsedList is being passed */
+  uint32_t gnssSvUsedList_len;  /**< Must be set to # of elements in gnssSvUsedList */
+  uint16_t gnssSvUsedList[QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02];
+  /**<   Each entry in the list contains the SV ID of a satellite
+       used for calculating this position report. The following
+       information is associated with each SV ID: \n
+       Range: \n
+       - For GPS:     1 to 32 \n
+       - For SBAS:    33 to 64 \n
+       - For GLONASS: 65 to 96 \n
+       - For QZSS:    193 to 197 \n
+       - For BDS:     201 to 237
+    */
+}qmiLocGetBestAvailablePositionIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCMOTIONSTATEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_MOTION_STATE_UNKNOWN_V02 = 0, /**<  Device state is not known  */
+  eQMI_LOC_MOTION_STATE_STATIONARY_V02 = 1, /**<  Device state is Stationary  */
+  eQMI_LOC_MOTION_STATE_IN_MOTION_V02 = 2, /**<  Device state is In Motion  */
+  QMILOCMOTIONSTATEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocMotionStateEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCMOTIONMODEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_MOTION_MODE_UNKNOWN_V02 = 0, /**<  Device movement is not known  */
+  eQMI_LOC_MOTION_MODE_STATIONARY_V02 = 1, /**<  Device is not moving  */
+  eQMI_LOC_MOTION_MODE_PEDESTRIAN_UNKNOWN_V02 = 200, /**<  Device movement is in Pedestrian mode; nothing else is known about the movement  */
+  eQMI_LOC_MOTION_MODE_PEDESTRIAN_WALKING_V02 = 201, /**<  Device movement is in pedestrian Walking mode  */
+  eQMI_LOC_MOTION_MODE_PEDESTRIAN_RUNNING_V02 = 202, /**<  Device movement is in pedestrian Running mode  */
+  eQMI_LOC_MOTION_MODE_VEHICLE_UNKNOWN_V02 = 300, /**<  Device movement is in Vehicular mode; nothing else is known about the movement  */
+  QMILOCMOTIONMODEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocMotionModeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocMotionStateEnumT_v02 motion_state;
+  /**<   Current motion state of the user.
+
+ Valid values: \n
+      - eQMI_LOC_MOTION_STATE_UNKNOWN (0) --  Device state is not known
+      - eQMI_LOC_MOTION_STATE_STATIONARY (1) --  Device state is Stationary
+      - eQMI_LOC_MOTION_STATE_IN_MOTION (2) --  Device state is In Motion
+ */
+
+  qmiLocMotionModeEnumT_v02 motion_mode;
+  /**<   Modes of user motion.
+
+ Valid values: \n
+      - eQMI_LOC_MOTION_MODE_UNKNOWN (0) --  Device movement is not known
+      - eQMI_LOC_MOTION_MODE_STATIONARY (1) --  Device is not moving
+      - eQMI_LOC_MOTION_MODE_PEDESTRIAN_UNKNOWN (200) --  Device movement is in Pedestrian mode; nothing else is known about the movement
+      - eQMI_LOC_MOTION_MODE_PEDESTRIAN_WALKING (201) --  Device movement is in pedestrian Walking mode
+      - eQMI_LOC_MOTION_MODE_PEDESTRIAN_RUNNING (202) --  Device movement is in pedestrian Running mode
+      - eQMI_LOC_MOTION_MODE_VEHICLE_UNKNOWN (300) --  Device movement is in Vehicular mode; nothing else is known about the movement
+ */
+
+  float probability_of_state;
+  /**<   Probability that the device is actually undergoing the motion state
+       specified by the combination of the values of motion_state, motion_mode,
+       and motion_sub_mode. \vspace{0.1in}
+
+       This value is a floating point number in the range of 0 to 100, in
+       units of percent probability. Any value greater than 99.9999 is
+       applied as 99.9999. \vspace{0.1in}
+
+       It is recommended that if a particular combination of motion_state and
+       motion_mode cannot be determined with more than 50 percent confidence,
+       that a more general statement of user motion be made.
+       For example, if the mode of In-Motion + Pedestrian-Running can only be
+       determined with 50 percent probability, and the simpler statement of In-Motion
+       can be determined with 90 percent probability, it is recommended that this field
+       be used to simply state In-Motion with 90 percent probability. \vspace{0.1in}
+
+       If the motion_state is not known, the value in this field is not used.
+  */
+
+  uint16_t age;
+  /**<   Age of the motion data in milliseconds at the time of injection.
+  */
+
+  uint16_t timeout;
+  /**<   If the age of the motion data input exceeds the timeout value, the data
+       will no longer be used. The timeout value is in units of milliseconds.
+       Values in the range of 0 to 10000 are accepted. If 65535 is provided,
+       the motion data input is applied until the next input is
+       received. \n
+
+       If the determination of motion data is an instantaneous observation
+       and no notice is guaranteed to be given via the QMI on a change in the
+       state of the motion data, it is recommended that this field be set to 0. \vspace{0.1in}
+
+       If the determination of motion data is continuously monitored
+       external to the QMI and an update is always applied to the QMI upon any
+       change in state, a value of 65535 is used for this field.
+       Note that in this case, if a certain mode is set and is not later
+       unset (e.g., by sending in the request message with a user motion
+       state of Unknown), the value is applied indefinitely.
+  */
+}qmiLocMotionDataStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects motion data for MSM GPS service use. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Motion Data */
+  qmiLocMotionDataStructT_v02 motion_data;
+}qmiLocInjectMotionDataReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects motion data for MSM GPS service use. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Inject Motion Data Request Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Inject Motion Data request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocInjectMotionDataIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to retrieve the list of network
+                    initiated Geofence IDs. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The same transaction ID
+       will be returned in the Get NI Geofence ID List indication. */
+}qmiLocGetNiGeofenceIdListReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to retrieve the list of network
+                    initiated Geofence IDs. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get NI Geofence ID List Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get NI Geofence ID List request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+
+  /* Optional */
+  /*  Transaction ID */
+  uint8_t transactionId_valid;  /**< Must be set to true if transactionId is being passed */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Get NI
+       Geofence ID List request. */
+
+  /* Optional */
+  /*  NI Geofence ID List */
+  uint8_t niGeofenceIdList_valid;  /**< Must be set to true if niGeofenceIdList is being passed */
+  uint32_t niGeofenceIdList_len;  /**< Must be set to # of elements in niGeofenceIdList */
+  uint32_t niGeofenceIdList[QMI_LOC_MAX_NI_GEOFENCE_ID_LIST_LENGTH_V02];
+  /**<   List containing the NI Geofence IDs.
+       - Type: Array of unsigned 32-bit integers \n
+       - Maximum NI Geofence ID List length: 16 */
+}qmiLocGetNiGeofenceIdListIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t MCC;
+  /**<   GSM mobile country code. Refer to ITU-T E.212 \hyperref[S6]{[S6]}. */
+
+  uint32_t MNC;
+  /**<   GSM mobile network code. Refer to \hyperref[S6]{[S6]}. */
+
+  uint32_t LAC;
+  /**<   GSM location area code. Refer to \hyperref[S6]{[S6]}. */
+
+  uint32_t CID;
+  /**<   GSM cell identification. Refer to \hyperref[S6]{[S6]}. */
+}qmiLocGSMCellIdStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects GSM cell information into the location
+                    engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  GSM Cell ID */
+  qmiLocGSMCellIdStructT_v02 gsmCellId;
+  /**<   \vspace{0.06in} \n Identifies the GSM cell on which the device is currently camped. */
+
+  /* Mandatory */
+  /*  Roaming Status */
+  uint8_t roamingStatus;
+  /**<   Indicates whether the device is roaming.
+       \begin{itemize1}
+       \item    0x01 (TRUE)  -- Device is roaming
+       \item    0x00 (FALSE) -- Device is not roaming
+       \vspace{-0.18in} \end{itemize1}*/
+
+  /* Optional */
+  /*  Timing Advance */
+  uint8_t timingAdvance_valid;  /**< Must be set to true if timingAdvance is being passed */
+  uint32_t timingAdvance;
+  /**<   Round trip delay between the MS and the BS, in units of 3.69 microseconds.
+       Refer to 3GPP TS 05.10 and TS 45.010. */
+}qmiLocInjectGSMCellInfoReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects GSM cell information into the location
+                    engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Inject GSM Cell Info Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Inject GSM Cell Info request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+}qmiLocInjectGSMCellInfoIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCROAMINGSTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_PHONE_NOT_ROAMING_V02 = 1, /**<  Modem is camped on a home network  */
+  eQMI_LOC_PHONE_ROAMING_V02 = 2, /**<  Modem is camped on a roaming network  */
+  QMILOCROAMINGSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocRoamingStatusEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t mcc;
+  /**<   WCDMA mobile country code. Refer to ITU-T E.212 \hyperref[S6]{[S6]}. */
+
+  uint32_t mnc;
+  /**<   WCDMA mobile network code. Refer to \hyperref[S6]{[S6]}. */
+
+  uint32_t cid;
+  /**<   WCDMA cell identity. Refer to \hyperref[S6]{[S6]}. */
+}qmiLocWCDMACellIdStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects WCDMA cell information into the location
+                    engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  WCDMA Cell ID */
+  qmiLocWCDMACellIdStructT_v02 wcdmaCellId;
+  /**<   \n Identifies the WCDMA cell on which the device is currently camped. */
+
+  /* Mandatory */
+  /*  Roaming Status */
+  qmiLocRoamingStatusEnumT_v02 roamingStatus;
+  /**<   Indicates whether the device is roaming.
+
+ Valid values: \n
+      - eQMI_LOC_PHONE_NOT_ROAMING (1) --  Modem is camped on a home network
+      - eQMI_LOC_PHONE_ROAMING (2) --  Modem is camped on a roaming network
+ */
+
+  /* Optional */
+  /*  Cell Frequency */
+  uint8_t freq_valid;  /**< Must be set to true if freq is being passed */
+  uint32_t freq;
+  /**<   Frequency information of the serving cell. \n
+       Valid range: 0 to 16383 \n
+       Refer to TS 25.331 \hyperref[S7]{[S7]}. */
+
+  /* Optional */
+  /*  Primary Scrambling Code */
+  uint8_t psc_valid;  /**< Must be set to true if psc is being passed */
+  uint32_t psc;
+  /**<   Primary scrambling code of the serving cell. \n
+       Valid range: 0 to 511 \n
+       Refer to \hyperref[S7]{[S7]}. */
+}qmiLocInjectWCDMACellInfoReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects WCDMA cell information into the location
+                    engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Inject WCDMA Cell Info Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Inject WCDMA Cell Info request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+}qmiLocInjectWCDMACellInfoIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t mcc;
+  /**<   TDSCDMA mobile country code. Refer to ITU-T E.212 \hyperref[S6]{[S6]}. */
+
+  uint32_t mnc;
+  /**<   TDSCDMA mobile network code. Refer to \hyperref[S6]{[S6]}. */
+
+  uint32_t cid;
+  /**<   TDSCDMA cell identity. Refer to TS 25.331 \hyperref[S7]{[S7]}. */
+
+  uint32_t lac;
+  /**<   TDSCDMA location area code. Refer to \hyperref[S6]{[S6]}. */
+}qmiLocTDSCDMACellIdStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects TDSCDMA cell information into the location
+                    engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  TDSCDMA Cell ID */
+  qmiLocTDSCDMACellIdStructT_v02 tdscdmaCellId;
+  /**<   \n Identifies the TDSCDMA cell on which the device is currently camped. */
+
+  /* Mandatory */
+  /*  Roaming Status */
+  qmiLocRoamingStatusEnumT_v02 roamingStatus;
+  /**<   Indicates whether the device is roaming.
+
+ Valid values: \n
+      - eQMI_LOC_PHONE_NOT_ROAMING (1) --  Modem is camped on a home network
+      - eQMI_LOC_PHONE_ROAMING (2) --  Modem is camped on a roaming network
+ */
+
+  /* Optional */
+  /*  Cell Frequency */
+  uint8_t freq_valid;  /**< Must be set to true if freq is being passed */
+  uint32_t freq;
+  /**<   Frequency information of the serving cell. \n
+       Valid range: 0 to 16383 \n
+       Refer to \hyperref[S7]{[S7]}. */
+}qmiLocInjectTDSCDMACellInfoReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects TDSCDMA cell information into the location
+                    engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Inject TDSCDMA Cell Info Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Inject TDSCDMA Cell Info request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+}qmiLocInjectTDSCDMACellInfoIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects the phone's subscriber ID into the location engine. */
+typedef struct {
+
+  /* Optional */
+  /*  Preferred IMSI */
+  uint8_t preferredIMSI_valid;  /**< Must be set to true if preferredIMSI is being passed */
+  uint64_t preferredIMSI;
+  /**<   IMSI number of the preferred RAT. Refer to \hyperref[S6]{[S6]}.*/
+
+  /* Optional */
+  /*  Preferred MSISDN */
+  uint8_t preferredMSISDN_valid;  /**< Must be set to true if preferredMSISDN is being passed */
+  uint64_t preferredMSISDN;
+  /**<   MSISDN number of the preferred RAT. Refer to \hyperref[S6]{[S6]}.*/
+}qmiLocInjectSubscriberIDReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects the phone's subscriber ID into the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Inject Subscriber ID Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Inject Subscriber ID request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+}qmiLocInjectSubscriberIDIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCINJECTEDNETWORKINITIATEDMESSAGETYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_INJECTED_NETWORK_INITIATED_MESSAGE_TYPE_SUPL_V02 = 0, /**<  SUPL network-initiated message is being injected.  */
+  QMILOCINJECTEDNETWORKINITIATEDMESSAGETYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocInjectedNetworkInitiatedMessageTypeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects a network-initiated message into the location
+                    engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Injected Network Initiated Message Type */
+  qmiLocInjectedNetworkInitiatedMessageTypeEnumT_v02 injectedNIMessageType;
+  /**<   Type of the network-initiated message being injected.
+
+ Valid values: \n
+      - eQMI_LOC_INJECTED_NETWORK_INITIATED_MESSAGE_TYPE_SUPL (0) --  SUPL network-initiated message is being injected.  */
+
+  /* Mandatory */
+  /*  Injected Network Initiated Message */
+  uint32_t injectedNIMessage_len;  /**< Must be set to # of elements in injectedNIMessage */
+  uint8_t injectedNIMessage[QMI_LOC_MAX_INJECTED_NETWORK_INITIATED_MESSAGE_LENGTH_V02];
+  /**<   Network-initiated message body.
+       If the inject NI message type is TYPE_SUPL, the message contains
+       a SUPL INIT message as defined in OMA-TS-ULP-V2_0-20110527-C \hyperref[S5]{[S5]}. */
+}qmiLocInjectNetworkInitiatedMessageReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects a network-initiated message into the location
+                    engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Inject Network Initiated Message Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Inject Network Initiated Message request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+}qmiLocInjectNetworkInitiatedMessageIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Notifies the location engine that the device is out of
+                    service. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocWWANOutOfServiceNotificationReqMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Notifies the location engine that the device is out of
+                    service. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Notify WWAN Out of Service Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Notify WWAN Out of Service request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocWWANOutOfServiceNotificationIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to inject pedometer data
+                    into the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Time Source */
+  qmiLocSensorDataTimeSourceEnumT_v02 timeSource;
+  /**<   Time source for the pedometer. The location service uses
+ this field to identify the time reference used in the
+ pedometer data time stamp.
+
+ Valid values: \n
+      - eQMI_LOC_SENSOR_TIME_SOURCE_UNSPECIFIED (0) --  Sensor time source is unspecified
+      - eQMI_LOC_SENSOR_TIME_SOURCE_COMMON (1) --  Time source is common between the sensors and
+       the location engine
+ */
+
+  /* Mandatory */
+  /*  Pedometer Report Timestamp */
+  uint32_t timestamp;
+  /**<   Time stamp of the last step event in this report, that is, the time stamp
+       of the step event that caused this report to be generated.
+       The time stamp is in the time reference scale that is
+       used by the pedometer time source. \n
+       - Units: Milliseconds */
+
+  /* Mandatory */
+  /*  Time Interval */
+  uint32_t timeInterval;
+  /**<   Time interval during which the step count was calculated. Subtracting
+       timeInterval from the timestamp field yields the time when
+       the step detection for the first step in this report started. \n
+       - Units: Milliseconds */
+
+  /* Mandatory */
+  /*  Step Count */
+  uint32_t stepCount;
+  /**<   Number of steps counted during the time interval. */
+
+  /* Optional */
+  /*  Step Confidence */
+  uint8_t stepConfidence_valid;  /**< Must be set to true if stepConfidence is being passed */
+  uint8_t stepConfidence;
+  /**<   Confidence associated with the step. This field is only applicable
+       for a single step report, that is, if the step count is one. \n
+       - Range: 0 to 100 \n
+       \textbf{Note:} The report is ignored if confidence is 0. */
+
+  /* Optional */
+  /*  Step Count Uncertainty */
+  uint8_t stepCountUncertainty_valid;  /**< Must be set to true if stepCountUncertainty is being passed */
+  float stepCountUncertainty;
+  /**<   Uncertainty (in steps) associated with the step count. */
+
+  /* Optional */
+  /*  Step Rate */
+  uint8_t stepRate_valid;  /**< Must be set to true if stepRate is being passed */
+  float stepRate;
+  /**<   Current estimate for the rate of steps per second. \n
+       - Units: steps/second \n
+       - Range: >= 0.0 */
+}qmiLocPedometerReportReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to inject pedometer data
+                    into the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Status of Pedometer Report Request */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Pedometer Report request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocPedometerReportIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to get the batching size. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The transaction ID is returned in the Get
+       Batch Size indication. */
+
+  /* Mandatory */
+  /*  Requested Batch Size */
+  uint32_t batchSize;
+  /**<   Request the service with the number of location fixes to be batched. */
+}qmiLocGetBatchSizeReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to get the batching size. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Batch Size Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Batch Size request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Get Batch
+       Size request.
+       */
+
+  /* Mandatory */
+  /*  Batch Size Supported */
+  uint32_t batchSize;
+  /**<   Number of location fixes that the service is able to batch.
+       The batch size value is returned as 0 in the case of a failure status.
+  */
+}qmiLocGetBatchSizeIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to initiate a batching session. */
+typedef struct {
+
+  /* Optional */
+  /*  Minimum Interval Between Position Reports */
+  uint8_t minInterval_valid;  /**< Must be set to true if minInterval is being passed */
+  uint32_t minInterval;
+  /**<   Minimum time interval, specified by the control point, that must elapse between
+       position reports. \n
+       - Units: milliseconds \n
+       - Default: 60000 ms
+  */
+
+  /* Optional */
+  /*  Horizontal Accuracy Level */
+  uint8_t horizontalAccuracyLevel_valid;  /**< Must be set to true if horizontalAccuracyLevel is being passed */
+  qmiLocAccuracyLevelEnumT_v02 horizontalAccuracyLevel;
+  /**<   Specifies the horizontal accuracy level required by the control point.
+ If not specified, accuracy defaults to LOW.
+
+ Valid values: \n
+      - eQMI_LOC_ACCURACY_LOW (1) --  Low accuracy
+      - eQMI_LOC_ACCURACY_MED (2) --  Medium accuracy
+      - eQMI_LOC_ACCURACY_HIGH (3) --  High accuracy
+ */
+
+  /* Optional */
+  /*  Fix Session Timeout Period */
+  uint8_t fixSessionTimeout_valid;  /**< Must be set to true if fixSessionTimeout is being passed */
+  uint32_t fixSessionTimeout;
+  /**<   Configures the fix session timeout duration. \n
+       - Units: Milliseconds \n
+       - Default: 20,000 ms
+  */
+}qmiLocStartBatchingReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to initiate a batching session. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Start Batching Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Start Batching request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocStartBatchingIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used to notify the control point that the batched buffer is full. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Number of Entries in the Batch During Full Event */
+  uint32_t batchCount;
+  /**<   Number of entries in the batch during a full event.
+  */
+}qmiLocEventBatchFullIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint64_t qmiLocBatchedReportValidFieldsMaskT_v02;
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_LATITUDE_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00000001ull) /**<  Latitude field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_LONGITUDE_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00000002ull) /**<  Longitude field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_HOR_CIR_UNC_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00000004ull) /**<  Horizontal circular uncertainty field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_SPEED_HOR_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00000008ull) /**<  Horizontal speed field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_SPEED_UNC_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00000010ull) /**<  Speed uncertainty field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_ALT_WRT_ELP_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00000020ull) /**<  Altitude with respect to ellipsoid field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_SPEED_VER_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00000040ull) /**<  Vertical speed field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_HEADING_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00000080ull) /**<  Heading field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_HEADING_UNC_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00000100ull) /**<  Heading uncertainty field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_TECH_MASK_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00000200ull) /**<  Technology source mask field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_TIMESTAMP_UTC_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00000400ull) /**<  UTC timestamp field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_TIME_UNC_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00000800ull) /**<  Time uncertainty field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_MAGNETIC_DEV_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00001000ull) /**<  Magnetic deviation field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_VERT_UNC_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00002000ull) /**<  Vertical uncertainty field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_HOR_CONF_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00004000ull) /**<  Horizontal confidence field is valid for this fix  */
+#define QMI_LOC_BATCHED_REPORT_MASK_VALID_TIMESTAMP_GPS_V02 ((qmiLocBatchedReportValidFieldsMaskT_v02)0x00008000ull) /**<  GPS timestamp field is valid for this fix  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t fixId;
+  /**<   Fix count for the session. The count starts at 0 and increments by one for
+  each successive batched position report for a particular session. */
+
+  qmiLocBatchedReportValidFieldsMaskT_v02 validFields;
+  /**<   Mask of all valid fields for this fix.
+ Valid bitmasks: \n
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_LATITUDE (0x00000001) --  Latitude field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_LONGITUDE (0x00000002) --  Longitude field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_HOR_CIR_UNC (0x00000004) --  Horizontal circular uncertainty field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_SPEED_HOR (0x00000008) --  Horizontal speed field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_SPEED_UNC (0x00000010) --  Speed uncertainty field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_ALT_WRT_ELP (0x00000020) --  Altitude with respect to ellipsoid field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_SPEED_VER (0x00000040) --  Vertical speed field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_HEADING (0x00000080) --  Heading field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_HEADING_UNC (0x00000100) --  Heading uncertainty field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_TECH_MASK (0x00000200) --  Technology source mask field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_TIMESTAMP_UTC (0x00000400) --  UTC timestamp field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_TIME_UNC (0x00000800) --  Time uncertainty field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_MAGNETIC_DEV (0x00001000) --  Magnetic deviation field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_VERT_UNC (0x00002000) --  Vertical uncertainty field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_HOR_CONF (0x00004000) --  Horizontal confidence field is valid for this fix
+      - QMI_LOC_BATCHED_REPORT_MASK_VALID_TIMESTAMP_GPS (0x00008000) --  GPS timestamp field is valid for this fix
+ */
+
+  double latitude;
+  /**<   Latitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -90.0 to 90.0   \begin{itemize1}
+         \item    Positive values indicate northern latitude
+         \item    Negative values indicate southern latitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  double longitude;
+  /**<   Longitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -180.0 to 180.0   \begin{itemize1}
+         \item    Positive values indicate eastern longitude
+         \item    Negative values indicate western longitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  float horUncCircular;
+  /**<   Horizontal position uncertainty (circular).\n
+       - Units: Meters */
+
+  float speedHorizontal;
+  /**<   Horizontal speed.\n
+       - Units: Meters/second */
+
+  float speedUnc;
+  /**<   3-D Speed uncertainty.\n
+       - Units: Meters/second */
+
+  float altitudeWrtEllipsoid;
+  /**<   Altitude with respect to the WGS84 ellipsoid.\n
+       - Units: Meters \n
+       - Range: -500 to 15883 */
+
+  float speedVertical;
+  /**<   Vertical speed.\n
+         - Units: Meters/second */
+
+  float heading;
+  /**<   Heading.\n
+         - Units: Degrees \n
+         - Range: 0 to 359.999  */
+
+  float headingUnc;
+  /**<   Heading uncertainty.\n
+       - Units: Degrees \n
+       - Range: 0 to 359.999 */
+
+  qmiLocPosTechMaskT_v02 technologyMask;
+  /**<   Technology used in computing this fix.
+ Valid bitmasks: \n
+      - QMI_LOC_POS_TECH_MASK_SATELLITE (0x00000001) --  Satellites were used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_CELLID (0x00000002) --  Cell towers were used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_WIFI (0x00000004) --  Wi-Fi access points were used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_SENSORS (0x00000008) --  Sensors were used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_REFERENCE_LOCATION (0x00000010) --  Reference Location was used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_INJECTED_COARSE_POSITION (0x00000020) --  Coarse position injected into the location engine was used to
+        generate the fix
+      - QMI_LOC_POS_TECH_MASK_AFLT (0x00000040) --  AFLT was used to generate the fix
+      - QMI_LOC_POS_TECH_MASK_HYBRID (0x00000080) --  GNSS and network-provided measurements were used to
+        generate the fix
+ */
+
+  uint64_t timestampUtc;
+  /**<   UTC timestamp. \n
+       - Units: Milliseconds since Jan. 1, 1970 */
+
+  float timeUnc;
+  /**<   Time uncertainty. \n
+       - Units: Milliseconds */
+
+  float magneticDeviation;
+  /**<   Difference between the bearing to true north and the bearing shown
+      on a magnetic compass. The deviation is positive when the magnetic
+      north is east of true north. */
+
+  float vertUnc;
+  /**<   Vertical uncertainty.\n
+       - Units: Meters */
+
+  uint8_t horConfidence;
+  /**<   Horizontal confidence.
+       - Units: Percent
+       - Range: 0 to 99 */
+
+  qmiLocGPSTimeStructT_v02 gpsTime;
+  /**<   Number of weeks since Jan. 5, 1980, and milliseconds into the current week. */
+}qmiLocBatchedReportStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used to notify the control point with the live batched
+                    position report. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Batched Position Report */
+  qmiLocBatchedReportStructT_v02 liveBatchedReport;
+  /**<   \n Live position report that is also batched. */
+}qmiLocEventLiveBatchedPositionReportIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to retrieve fixes from the batch. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Number of Fix Entries to be Retrieved from the Batch */
+  uint32_t numberOfEntries;
+  /**<   Number of fix entries to be retrieved from the batch. \n
+  Maximum limit -- QMI_LOC_READ_FROM_BATCH_MAX_SIZE.
+  */
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The transaction ID is returned in the Read
+       from Batch indication. */
+}qmiLocReadFromBatchReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to retrieve fixes from the batch. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Read from Batch Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Read from Batch request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Read from Batch
+       request.
+       */
+
+  /* Optional */
+  /*  Number of Fix Entries Returned from the Batch */
+  uint8_t numberOfEntries_valid;  /**< Must be set to true if numberOfEntries is being passed */
+  uint32_t numberOfEntries;
+  /**<   Number of fix entries returned from the batch. */
+
+  /* Optional */
+  /*  List of Batched Position Reports Returned */
+  uint8_t batchedReportList_valid;  /**< Must be set to true if batchedReportList is being passed */
+  uint32_t batchedReportList_len;  /**< Must be set to # of elements in batchedReportList */
+  qmiLocBatchedReportStructT_v02 batchedReportList[QMI_LOC_READ_FROM_BATCH_MAX_SIZE_V02];
+  /**<   \n List of fix reports returned from the batch. */
+}qmiLocReadFromBatchIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to stop an ongoing batching session. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Transaction ID of the request. */
+}qmiLocStopBatchingReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to stop an ongoing batching session. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Stop Batching Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Stop Batching request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Stop Batching request.
+  */
+}qmiLocStopBatchingIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to release the batching buffer. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. */
+}qmiLocReleaseBatchReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to release the batching buffer. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Release Batch Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Release Batch request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Release Batch request.
+  */
+}qmiLocReleaseBatchIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Requests the control point to inject Wi-Fi AP data. */
+typedef struct {
+  /* This element is a placeholder to prevent the declaration of
+     an empty struct.  DO NOT USE THIS FIELD UNDER ANY CIRCUMSTANCE */
+  char __placeholder;
+}qmiLocEventInjectWifiApDataReqIndMsgT_v02;
+
+  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCWIFIAPDATADEVICETYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_WIFI_AP_DATA_DEVICE_TYPE_WLAN_802_11_A_V02 = 0, /**<  Wi-Fi AP device is 802.11a.  */
+  eQMI_LOC_WIFI_AP_DATA_DEVICE_TYPE_WLAN_802_11_B_V02 = 1, /**<  Wi-Fi AP device is 802.11b.  */
+  eQMI_LOC_WIFI_AP_DATA_DEVICE_TYPE_WLAN_802_11_G_V02 = 2, /**<  Wi-Fi AP device is 802.11g.  */
+  QMILOCWIFIAPDATADEVICETYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocWifiApDataDeviceTypeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCWIFIAPDATARTDUNITTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_WIFI_AP_DATA_RTD_UNIT_MICROSEC_V02 = 0, /**<  Wi-Fi AP data Round-trip Delay (RTD) is in microseconds.  */
+  eQMI_LOC_WIFI_AP_DATA_RTD_UNIT_HUNDREDS_OF_NANOSEC_V02 = 1, /**<  Wi-Fi AP data RTD is in hundreds of nanoseconds.  */
+  eQMI_LOC_WIFI_AP_DATA_RTD_UNIT_TENS_OF_NANOSEC_V02 = 2, /**<  Wi-Fi AP data RTD is in tens of nanoseconds.  */
+  eQMI_LOC_WIFI_AP_DATA_RTD_UNIT_NANOSEC_V02 = 3, /**<  Wi-Fi AP data RTD is in nanoseconds.  */
+  eQMI_LOC_WIFI_AP_DATA_RTD_UNIT_TENTH_OF_NANOSEC_V02 = 4, /**<  Wi-Fi AP data RTD is in tenths of nanoseconds.  */
+  QMILOCWIFIAPDATARTDUNITTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocWifiApDataRtdUnitTypeEnumT_v02;
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocWifiApDataMaskT_v02;
+#define QMI_LOC_WIFI_APDATA_MASK_AP_TRANSMIT_POWER_V02 ((qmiLocWifiApDataMaskT_v02)0x00000001) /**<  AP transmit power is valid  */
+#define QMI_LOC_WIFI_APDATA_MASK_AP_ANTENNA_GAIN_V02 ((qmiLocWifiApDataMaskT_v02)0x00000002) /**<  AP antenna gain is valid  */
+#define QMI_LOC_WIFI_APDATA_MASK_AP_SNR_V02 ((qmiLocWifiApDataMaskT_v02)0x00000004) /**<  AP signal-to-noise ratio is valid  */
+#define QMI_LOC_WIFI_APDATA_MASK_AP_DEVICE_TYPE_V02 ((qmiLocWifiApDataMaskT_v02)0x00000008) /**<  AP device type is valid  */
+#define QMI_LOC_WIFI_APDATA_MASK_AP_RSSI_V02 ((qmiLocWifiApDataMaskT_v02)0x00000010) /**<  AP RSSI is valid  */
+#define QMI_LOC_WIFI_APDATA_MASK_AP_CHANNEL_V02 ((qmiLocWifiApDataMaskT_v02)0x00000020) /**<  AP channel is valid    */
+#define QMI_LOC_WIFI_APDATA_MASK_AP_ROUNDTRIP_DELAY_V02 ((qmiLocWifiApDataMaskT_v02)0x00000040) /**<  AP roundtrip delay is valid    */
+#define QMI_LOC_WIFI_APDATA_MASK_AP_ROUNDTRIP_DELAY_ACCURACY_V02 ((qmiLocWifiApDataMaskT_v02)0x00000080) /**<  AP roundtrip delay accuracy is valid   */
+#define QMI_LOC_WIFI_APDATA_MASK_MOBILE_SNR_V02 ((qmiLocWifiApDataMaskT_v02)0x00000100) /**<  Mobile signal-to-noise ratio is valid   */
+#define QMI_LOC_WIFI_APDATA_MASK_MOBILE_RSSI_V02 ((qmiLocWifiApDataMaskT_v02)0x00000200) /**<  Mobile RSSI is valid  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocWifiApDataMaskT_v02 wifiApDataMask;
+  /**<   Specifies which Wi-Fi AP scan information types are being used.
+
+ Valid values: \n
+      - QMI_LOC_WIFI_APDATA_MASK_AP_TRANSMIT_POWER (0x00000001) --  AP transmit power is valid
+      - QMI_LOC_WIFI_APDATA_MASK_AP_ANTENNA_GAIN (0x00000002) --  AP antenna gain is valid
+      - QMI_LOC_WIFI_APDATA_MASK_AP_SNR (0x00000004) --  AP signal-to-noise ratio is valid
+      - QMI_LOC_WIFI_APDATA_MASK_AP_DEVICE_TYPE (0x00000008) --  AP device type is valid
+      - QMI_LOC_WIFI_APDATA_MASK_AP_RSSI (0x00000010) --  AP RSSI is valid
+      - QMI_LOC_WIFI_APDATA_MASK_AP_CHANNEL (0x00000020) --  AP channel is valid
+      - QMI_LOC_WIFI_APDATA_MASK_AP_ROUNDTRIP_DELAY (0x00000040) --  AP roundtrip delay is valid
+      - QMI_LOC_WIFI_APDATA_MASK_AP_ROUNDTRIP_DELAY_ACCURACY (0x00000080) --  AP roundtrip delay accuracy is valid
+      - QMI_LOC_WIFI_APDATA_MASK_MOBILE_SNR (0x00000100) --  Mobile signal-to-noise ratio is valid
+      - QMI_LOC_WIFI_APDATA_MASK_MOBILE_RSSI (0x00000200) --  Mobile RSSI is valid  */
+
+  uint8_t macAddress[QMI_LOC_WIFI_MAC_ADDR_LENGTH_V02];
+  /**<   MAC address. \n
+  Each address is of length QMI_LOC_WIFI_MAC_ADDR_LENGTH.
+  */
+
+  int32_t apTransmitPower;
+  /**<   AP transmit power in dBm.  */
+
+  int32_t apAntennaGain;
+  /**<   AP antenna gain in dBI. */
+
+  int32_t apSignalToNoise;
+  /**<   AP SNR received at the mobile device. */
+
+  qmiLocWifiApDataDeviceTypeEnumT_v02 apDeviceType;
+  /**<   List of AP device types. */
+
+  int32_t apRssi;
+  /**<   AP signal strength indicator in dBm. */
+
+  uint16_t apChannel;
+  /**<   AP Wi-Fi channel on which a beacon was received. */
+
+  uint32_t apRoundTripDelay;
+  /**<   Round trip delay between the mobile device and the AP, in units of
+       apRoundTripDelayUnit. */
+
+  qmiLocWifiApDataRtdUnitTypeEnumT_v02 apRoundTripDelayUnit;
+  /**<   Units of apRoundTripDelay and its accuracy; mandatory if apRoundTripDelay
+       is present. */
+
+  uint8_t apRoundTripDelayAccuracy;
+  /**<   AP's accuracy of round trip delay apRoundTripDelay, in units of
+       apRoundTripDelayUnit. */
+
+  int32_t mobileSignalToNoise;
+  /**<   Mobile SNR received at the AP. */
+
+  int32_t mobileRssi;
+  /**<   Mobile signal strength at the AP. */
+}qmiLocWifiApDataStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects Wi-Fi AP data. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Wi-Fi AP Scan Data */
+  uint32_t wifiApInfo_len;  /**< Must be set to # of elements in wifiApInfo */
+  qmiLocWifiApDataStructT_v02 wifiApInfo[QMI_LOC_WIFI_MAX_REPORTED_APS_PER_MSG_V02];
+  /**<   \n List of Wi-Fi AP scan information entered by the control point. */
+}qmiLocInjectWifiApDataReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects Wi-Fi AP data. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Wi-Fi AP Scan Information Injection Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Inject Wi-Fi AP Scan Information request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+}qmiLocInjectWifiApDataIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCWIFIACCESSPOINTATTACHSTATESENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_WIFI_ACCESS_POINT_ATTACHED_V02 = 0, /**<  Attached to an access point  */
+  eQMI_LOC_WIFI_ACCESS_POINT_DETACHED_V02 = 1, /**<  Detached from an access point  */
+  eQMI_LOC_WIFI_ACCESS_POINT_HANDOVER_V02 = 2, /**<  Handed over to another access point  */
+  QMILOCWIFIACCESSPOINTATTACHSTATESENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocWifiAccessPointAttachStatesEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to inject the Wi-Fi attachment status. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Attach State */
+  qmiLocWifiAccessPointAttachStatesEnumT_v02 attachState;
+  /**<   Wi.Fi access point attach state.
+
+ Valid values: \n
+      - eQMI_LOC_WIFI_ACCESS_POINT_ATTACHED (0) --  Attached to an access point
+      - eQMI_LOC_WIFI_ACCESS_POINT_DETACHED (1) --  Detached from an access point
+      - eQMI_LOC_WIFI_ACCESS_POINT_HANDOVER (2) --  Handed over to another access point  */
+
+  /* Optional */
+  /*  Access Point MAC Address */
+  uint8_t accessPointMacAddress_valid;  /**< Must be set to true if accessPointMacAddress is being passed */
+  uint8_t accessPointMacAddress[QMI_LOC_WIFI_MAC_ADDR_LENGTH_V02];
+  /**<   MAC address of the access point to which the Wi-Fi is attached.
+        This must always be specified if the attach state is Handover.
+        */
+
+  /* Optional */
+  /*  Wi-Fi AP SSID String */
+  uint8_t wifiApSsid_valid;  /**< Must be set to true if wifiApSsid is being passed */
+  char wifiApSsid[QMI_LOC_MAX_WIFI_AP_SSID_STR_LENGTH_V02 + 1];
+  /**<   The NULL-terminated SSID of the Wi-Fi AP. Its maximum length according to the ASCII standard is 32 octets. */
+}qmiLocNotifyWifiAttachmentStatusReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to inject the Wi-Fi attachment status. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Status of Wi-Fi Attachment Status Request */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of Wi-Fi Attachment Status request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+}qmiLocNotifyWifiAttachmentStatusIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCWIFIENABLEDSTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_WIFI_ENABLED_FALSE_V02 = 0, /**<  Wi-Fi is disabled on the device  */
+  eQMI_LOC_WIFI_ENABLED_TRUE_V02 = 1, /**<  Wi-Fi is enabled on the device  */
+  QMILOCWIFIENABLEDSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocWifiEnabledStatusEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to inject the Wi-Fi enabled status. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Enabled Status */
+  qmiLocWifiEnabledStatusEnumT_v02 enabledStatus;
+  /**<   Wi-Fi enabled status on the device.
+
+ Valid values: \n
+      - eQMI_LOC_WIFI_ENABLED_FALSE (0) --  Wi-Fi is disabled on the device
+      - eQMI_LOC_WIFI_ENABLED_TRUE (1) --  Wi-Fi is enabled on the device  */
+}qmiLocNotifyWifiEnabledStatusReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to inject the Wi-Fi enabled status. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Status of Wi-Fi Enabled Status Request */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Wi-Fi Enabled Status request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+}qmiLocNotifyWifiEnabledStatusIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Notifies the control point whether the GNSS location engine is
+                    ready to accept vehicle data. */
+typedef struct {
+
+  /* Optional */
+  /*  Vehicle Accelerometer Ready Status */
+  uint8_t vehicleAccelReadyStatus_valid;  /**< Must be set to true if vehicleAccelReadyStatus is being passed */
+  uint8_t vehicleAccelReadyStatus;
+  /**<   The location service uses this TLV to let a control point know when it is
+       ready or not ready to receive vehicle accelerometer data input.
+       Values: \n
+       - 0x00 -- Not ready  \n
+       - 0x01 -- Ready */
+
+  /* Optional */
+  /*  Vehicle Angular Rate Ready Status */
+  uint8_t vehicleAngularRateReadyStatus_valid;  /**< Must be set to true if vehicleAngularRateReadyStatus is being passed */
+  uint8_t vehicleAngularRateReadyStatus;
+  /**<   The location service uses this TLV to let a control point know when it is
+       ready or not ready to receive vehicle angular rate data input.
+       Values: \n
+       - 0x00 -- Not ready \n
+       - 0x01 -- Ready */
+
+  /* Optional */
+  /*  Vehicle Odometry Ready Status */
+  uint8_t vehicleOdometryReadyStatus_valid;  /**< Must be set to true if vehicleOdometryReadyStatus is being passed */
+  uint8_t vehicleOdometryReadyStatus;
+  /**<   The location service uses this TLV to let a control point know when it is
+       ready or not ready to receive vehicle odometry data input.
+       Values: \n
+       - 0x00 -- Not ready \n
+       - 0x01 -- Ready*/
+}qmiLocEventVehicleDataReadyIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t timeOffset;
+  /**<   Sample time offset. This time offset must be
+       relative to the vehicle sensor time of the first sample. \n
+       - Units: Microseconds \n
+       - Range: Up to over 4000 seconds */
+
+  uint32_t axisSample_len;  /**< Must be set to # of elements in axisSample */
+  float axisSample[QMI_LOC_VEHICLE_SENSOR_DATA_MAX_AXES_V02];
+  /**<   Sensor axis sample.        \n
+       - Type: Floating point     \n
+       - Units accelerometer: Meters/seconds^2 \n
+       - Units gyroscope: Radians/seconds \vspace{4pt}
+
+       Note: The axes samples must be in the following order: \n
+             1. X-Axis \n
+             2. Y-Axis \n
+             3. Z-Axis */
+}qmiLocVehicleSensorSampleStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+typedef uint8_t qmiLocAxesMaskT_v02;
+#define QMI_LOC_MASK_X_AXIS_V02 ((qmiLocAxesMaskT_v02)0x01) /**<  X-axis is valid  */
+#define QMI_LOC_MASK_Y_AXIS_V02 ((qmiLocAxesMaskT_v02)0x02) /**<  Y-axis is valid  */
+#define QMI_LOC_MASK_Z_AXIS_V02 ((qmiLocAxesMaskT_v02)0x04) /**<  Z-axis is valid  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t sampleTimeBase;
+  /**<   Denotes a 32-bit time tag of the reference time from which
+       all samples in this message are offset. This time must
+       be the same as or (slightly) earlier than the first (oldest)
+       sample in this message. \n
+       - Units: Milliseconds \n
+       - Range: Approx. 4 million seconds, or almost 50 days between rollovers */
+
+  qmiLocAxesMaskT_v02 axesValidity;
+  /**<   Identifies the axes that are valid for all sensor samples.
+
+ Valid values: \n
+      - QMI_LOC_MASK_X_AXIS (0x01) --  X-axis is valid
+      - QMI_LOC_MASK_Y_AXIS (0x02) --  Y-axis is valid
+      - QMI_LOC_MASK_Z_AXIS (0x04) --  Z-axis is valid  */
+
+  uint32_t sensorData_len;  /**< Must be set to # of elements in sensorData */
+  qmiLocVehicleSensorSampleStructT_v02 sensorData[QMI_LOC_VEHICLE_SENSOR_DATA_MAX_SAMPLES_V02];
+}qmiLocVehicleSensorSampleListStructType_v02;  /* Type */
+/**
+    @}
+  */
+
+typedef uint32_t qmiLocVehicleOdometryMeasDeviationMaskType_v02;
+#define QMI_LOC_MASK_VEHICLE_ODOMETRY_REVERSE_MOVEMENT_V02 ((qmiLocVehicleOdometryMeasDeviationMaskType_v02)0x00000001) /**<  Odometry data in this message includes at least some data where
+       the vehicle may have been moving in the reverse direction; this
+       bit must be set if odometry data may be in reverse, and should
+       not be set if odometry data is all in the forward direction  */
+#define QMI_LOC_MASK_VEHICLE_ODOMETRY_AFFECTED_BY_ERRORS_V02 ((qmiLocVehicleOdometryMeasDeviationMaskType_v02)0x00000002) /**<  Odometry data in this message includes at least some data affected
+       by a major error source affecting distance-travelled accuracy,
+       such as wheel slippage due to skidding, gravel, snow, or ice, as
+       detected by the vehicle, e.g., via an ABS or other system  */
+#define QMI_LOC_MASK_VEHICLE_ODOMETRY_ABSOLUTE_MEASUREMENT_V02 ((qmiLocVehicleOdometryMeasDeviationMaskType_v02)0x00000004) /**<  Odometry data in this message is an absolute amount since the vehicle
+       began service, and is the same vehicle that is regularly used with
+       this device (so that the offset of this value, since the last time
+       this measurement was used by the location engine, can safely be used
+       as a likely correct estimate of distance travelled since last
+       use)  */
+typedef uint32_t qmiLocVehicleOdometryWheelFlagsMaskT_v02;
+#define QMI_LOC_MASK_VEHICLE_ODOMETRY_LEFT_AND_RIGHT_AVERAGE_V02 ((qmiLocVehicleOdometryWheelFlagsMaskT_v02)0x00000001) /**<  Average of left and right non-turning wheels  */
+#define QMI_LOC_MASK_VEHICLE_ODOMETRY_LEFT_V02 ((qmiLocVehicleOdometryWheelFlagsMaskT_v02)0x00000002) /**<  Left side, non-turning wheel  */
+#define QMI_LOC_MASK_VEHICLE_ODOMETRY_RIGHT_V02 ((qmiLocVehicleOdometryWheelFlagsMaskT_v02)0x00000004) /**<  Right side, non-turning wheel  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t timeOffset;
+  /**<   Sample time offset. This time offset must be
+       relative to the sensor time of the first sample. \n
+       - Units: Microseconds \n
+       - Range: Up to over 4000 seconds */
+
+  uint32_t distanceTravelled_len;  /**< Must be set to # of elements in distanceTravelled */
+  uint32_t distanceTravelled[QMI_LOC_VEHICLE_ODOMETRY_MAX_MEASUREMENTS_V02];
+  /**<    Distance travelled (odometry) sample offset. \n
+        - Units of accumulated distance: Millimeters \n
+        - Range: Over 4000 kilometers
+
+        This measurement (with units in millimeters) is added to
+        the distance_travelled_base measurement (in meters) to
+        get the total distance travelled sample value.
+
+        Note: The order of measurements must be as follows: \n
+        1. Left and right average \n
+        2. Left \n
+        3. Right
+   */
+}qmiLocVehicleOdometrySampleStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t sampleTimeBase;
+  /**<   Denotes a 32-bit time tag of a reference time, from which
+       all samples in this message are offset.  Note this time must
+       be the same or (slightly) earlier than the first (oldest)
+       sample in this message. \n
+       - Units: 1 millisecond \n
+       - Range: ~4 million seconds, or almost 50 days between rollovers */
+
+  qmiLocVehicleOdometryMeasDeviationMaskType_v02 flags;
+  /**<   Flags to indicate any deviation from the default measurement
+ assumptions. Valid bitmasks: \n
+      - QMI_LOC_MASK_VEHICLE_ODOMETRY_REVERSE_MOVEMENT (0x00000001) --  Odometry data in this message includes at least some data where
+       the vehicle may have been moving in the reverse direction; this
+       bit must be set if odometry data may be in reverse, and should
+       not be set if odometry data is all in the forward direction
+      - QMI_LOC_MASK_VEHICLE_ODOMETRY_AFFECTED_BY_ERRORS (0x00000002) --  Odometry data in this message includes at least some data affected
+       by a major error source affecting distance-travelled accuracy,
+       such as wheel slippage due to skidding, gravel, snow, or ice, as
+       detected by the vehicle, e.g., via an ABS or other system
+      - QMI_LOC_MASK_VEHICLE_ODOMETRY_ABSOLUTE_MEASUREMENT (0x00000004) --  Odometry data in this message is an absolute amount since the vehicle
+       began service, and is the same vehicle that is regularly used with
+       this device (so that the offset of this value, since the last time
+       this measurement was used by the location engine, can safely be used
+       as a likely correct estimate of distance travelled since last
+       use)  */
+
+  qmiLocVehicleOdometryWheelFlagsMaskT_v02 wheelFlags;
+  /**<   Delineates for which wheels measurements are being provided
+ in the following samples, where one or more of the following
+ bits must be set, and data samples aligned with these axes must
+ appear in groups, in this order.
+
+ Valid bitmasks: \n
+      - QMI_LOC_MASK_VEHICLE_ODOMETRY_LEFT_AND_RIGHT_AVERAGE (0x00000001) --  Average of left and right non-turning wheels
+      - QMI_LOC_MASK_VEHICLE_ODOMETRY_LEFT (0x00000002) --  Left side, non-turning wheel
+      - QMI_LOC_MASK_VEHICLE_ODOMETRY_RIGHT (0x00000004) --  Right side, non-turning wheel  */
+
+  uint32_t distanceTravelledBase;
+  /**<   Distance traveled base. \n
+        - Units of accumulated distance: Meters \n
+        - Range: Over 4,000,0000 kilometers \vspace{0.06in} \n
+
+        Distance travelled (odometry) is to be reported in a continuously
+        accumulating way from device power up. It may be incremental distance
+        starting at 0, or another arbitrary point, from device power up, or the
+        absolute distance traveled by the vehicle
+        (and if so, set QMI_LOC_MASK_VEHICLE_ODOMETRY_ABSOLUTE_MEASUREMENT),
+        as long as it grows incrementally from device power up.
+
+        This distance_travelled_base is added to the distrance_travelled_offset
+        of each sample (below) to get the absolute distance of each sample
+        point.
+
+        Distance travelled errors are expected to be primarily due to the
+        scale factor, with some allowance for noise due to minor slippage
+        events (e.g., gravel.)
+        Major wheel slippage events that affect odometry
+        must be flagged -- see the flags field.
+
+        Note that other events, such as a vehicle travelling in reverse, may
+        also affect the available accuracy of this information, and notification
+        of those events must be provided -- see the flags field. */
+
+  uint32_t odometryData_len;  /**< Must be set to # of elements in odometryData */
+  qmiLocVehicleOdometrySampleStructT_v02 odometryData[QMI_LOC_VEHICLE_SENSOR_DATA_MAX_SAMPLES_V02];
+  /**<   Variable length array to specify the odometry samples.
+       Maximum length of the array is 50. */
+}qmiLocVehicleOdometrySampleListStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects on-vehicle sensor data into the location engine. */
+typedef struct {
+
+  /* Optional */
+  /*  On-Vehicle Accelerometer Data */
+  uint8_t accelData_valid;  /**< Must be set to true if accelData is being passed */
+  qmiLocVehicleSensorSampleListStructType_v02 accelData;
+  /**<   \vspace{0.06in} \n Vehicle accelerometer sensor samples. */
+
+  /* Optional */
+  /*  On-Vehicle Angular Rotation Data */
+  uint8_t angRotationData_valid;  /**< Must be set to true if angRotationData is being passed */
+  qmiLocVehicleSensorSampleListStructType_v02 angRotationData;
+  /**<   \vspace{0.06in} \n Vehicle angular rotation data sensor samples. */
+
+  /* Optional */
+  /*  Odometry Data */
+  uint8_t odometryData_valid;  /**< Must be set to true if odometryData is being passed */
+  qmiLocVehicleOdometrySampleListStructT_v02 odometryData;
+  /**<   \vspace{0.06in} \n Odometer sensor samples. */
+
+  /* Optional */
+  /*  External Time Sync Information */
+  uint8_t changeInTimeScales_valid;  /**< Must be set to true if changeInTimeScales is being passed */
+  int32_t changeInTimeScales;
+  /**<   This field is to be used in conjunction with an external
+       time-sync mechanism that is aligning the vehicle sensor time scale
+       with the on-device sensor time scale to ensure that updates in
+       that time offset do not appear as jumps in the relative sensor time
+       of the samples provided in this message. If there is no such sync
+       mechanism, e.g., if only the vehicle time is provided, this field
+       may be left at 0.
+
+       This field is defined as the change from the previously-sent QMI
+       message with similar TLVs 0x10, 0x11, or 0x12 in it, to this QMI
+       message in the amount that the sensor_time is ahead of an
+       external vehicle time. \n
+
+       - Units: Microseconds \n
+       - Range: Approximately -2100 seconds to + 2100 seconds, where
+                full-scale (minimum and maximum value) is interpreted
+                as equal to or greater than this value of an offset change
+                (unlikely to be reached in practice, unless there is a
+                startup, major resync, or some other rollover event). */
+}qmiLocInjectVehicleSensorDataReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects on-vehicle sensor data into the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Inject Vehicle Sensor Data Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Inject Vehicle Sensor Data request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+}qmiLocInjectVehicleSensorDataIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to get the first available WWAN
+                    position from the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The transaction ID
+       is returned in the Get Available WWAN Position indication. */
+}qmiLocGetAvailWwanPositionReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to get the first available WWAN
+                    position from the location engine. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Get Available WWAN Position Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Get Available WWAN Position request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+
+  /* Optional */
+  /*  Transaction ID */
+  uint8_t transactionId_valid;  /**< Must be set to true if transactionId is being passed */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Get Available
+       WWAN Position request. This parameter will
+       always be present if the status field is set to
+       SUCCESS. */
+
+  /* Optional */
+  /*  Latitude */
+  uint8_t latitude_valid;  /**< Must be set to true if latitude is being passed */
+  double latitude;
+  /**<   Latitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item     Range: -90.0 to 90.0      \begin{itemize1}
+         \item    Positive values indicate northern latitude
+         \item    Negative values indicate southern latitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  /* Optional */
+  /*  Longitude */
+  uint8_t longitude_valid;  /**< Must be set to true if longitude is being passed */
+  double longitude;
+  /**<   Longitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -180.0 to 180.0     \begin{itemize1}
+         \item    Positive values indicate eastern longitude
+         \item    Negative values indicate western longitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  /* Optional */
+  /*  Circular Horizontal Position Uncertainty */
+  uint8_t horUncCircular_valid;  /**< Must be set to true if horUncCircular is being passed */
+  float horUncCircular;
+  /**<   Horizontal position uncertainty (circular).\n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Altitude With Respect to Ellipsoid */
+  uint8_t altitudeWrtEllipsoid_valid;  /**< Must be set to true if altitudeWrtEllipsoid is being passed */
+  float altitudeWrtEllipsoid;
+  /**<   Altitude with respect to the WGS84 ellipsoid.\n
+       - Units: Meters \n
+       - Range: -500 to 15883 */
+
+  /* Optional */
+  /*  Vertical Uncertainty */
+  uint8_t vertUnc_valid;  /**< Must be set to true if vertUnc is being passed */
+  float vertUnc;
+  /**<   Vertical uncertainty.\n
+       - Units: Meters */
+
+  /* Optional */
+  /*  UTC Timestamp */
+  uint8_t timestampUtc_valid;  /**< Must be set to true if timestampUtc is being passed */
+  uint64_t timestampUtc;
+  /**<   UTC timestamp. \n
+       - Units: Milliseconds since Jan. 1, 1970 */
+
+  /* Optional */
+  /*  Time Uncertainty */
+  uint8_t timeUnc_valid;  /**< Must be set to true if timeUnc is being passed */
+  float timeUnc;
+  /**<   Time uncertainty. \n
+       - Units: Milliseconds */
+
+  /* Optional */
+  /*  Horizontal Elliptical Uncertainty Semi-Minor Axis */
+  uint8_t horUncEllipseSemiMinor_valid;  /**< Must be set to true if horUncEllipseSemiMinor is being passed */
+  float horUncEllipseSemiMinor;
+  /**<   Semi-minor axis of horizontal elliptical uncertainty. \n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Horizontal Elliptical Uncertainty Semi-Major Axis */
+  uint8_t horUncEllipseSemiMajor_valid;  /**< Must be set to true if horUncEllipseSemiMajor is being passed */
+  float horUncEllipseSemiMajor;
+  /**<   Semi-major axis of horizontal elliptical uncertainty. \n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Horizontal Elliptical Uncertainty Azimuth */
+  uint8_t horUncEllipseOrientAzimuth_valid;  /**< Must be set to true if horUncEllipseOrientAzimuth is being passed */
+  float horUncEllipseOrientAzimuth;
+  /**<   Elliptical horizontal uncertainty azimuth of orientation. \n
+       - Units: Decimal degrees \n
+       - Range: 0 to 180 */
+
+  /* Optional */
+  /*  Horizontal Circular Confidence */
+  uint8_t horCircularConfidence_valid;  /**< Must be set to true if horCircularConfidence is being passed */
+  uint8_t horCircularConfidence;
+  /**<   Horizontal circular uncertainty confidence. \n
+       - Units: Percent \n
+       - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Horizontal Elliptical Confidence */
+  uint8_t horEllipticalConfidence_valid;  /**< Must be set to true if horEllipticalConfidence is being passed */
+  uint8_t horEllipticalConfidence;
+  /**<   Horizontal elliptical uncertainty confidence. \n
+       - Units: Percent \n
+       - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Horizontal Reliability */
+  uint8_t horReliability_valid;  /**< Must be set to true if horReliability is being passed */
+  qmiLocReliabilityEnumT_v02 horReliability;
+  /**<   Specifies the reliability of the horizontal position.
+ Valid values: \n
+      - eQMI_LOC_RELIABILITY_NOT_SET (0) --  Location reliability is not set
+      - eQMI_LOC_RELIABILITY_VERY_LOW (1) --  Location reliability is very low; use it at your own risk
+      - eQMI_LOC_RELIABILITY_LOW (2) --  Location reliability is low; little or no cross-checking is possible
+      - eQMI_LOC_RELIABILITY_MEDIUM (3) --  Location reliability is medium; limited cross-check passed
+      - eQMI_LOC_RELIABILITY_HIGH (4) --  Location reliability is high; strong cross-check passed
+ */
+
+  /* Optional */
+  /*  Altitude With Respect to Sea Level */
+  uint8_t altitudeWrtMeanSeaLevel_valid;  /**< Must be set to true if altitudeWrtMeanSeaLevel is being passed */
+  float altitudeWrtMeanSeaLevel;
+  /**<   Altitude with respect to mean sea level. \n
+       - Units: Meters */
+
+  /* Optional */
+  /*  Vertical Confidence */
+  uint8_t vertConfidence_valid;  /**< Must be set to true if vertConfidence is being passed */
+  uint8_t vertConfidence;
+  /**<   Vertical uncertainty confidence. \n
+       - Units: Percent \n
+       - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Vertical Reliability */
+  uint8_t vertReliability_valid;  /**< Must be set to true if vertReliability is being passed */
+  qmiLocReliabilityEnumT_v02 vertReliability;
+  /**<   Specifies the reliability of the vertical position.
+
+ Valid values: \n
+      - eQMI_LOC_RELIABILITY_NOT_SET (0) --  Location reliability is not set
+      - eQMI_LOC_RELIABILITY_VERY_LOW (1) --  Location reliability is very low; use it at your own risk
+      - eQMI_LOC_RELIABILITY_LOW (2) --  Location reliability is low; little or no cross-checking is possible
+      - eQMI_LOC_RELIABILITY_MEDIUM (3) --  Location reliability is medium; limited cross-check passed
+      - eQMI_LOC_RELIABILITY_HIGH (4) --  Location reliability is high; strong cross-check passed
+ */
+
+  /* Optional */
+  /*  GPS Time */
+  uint8_t gpsTime_valid;  /**< Must be set to true if gpsTime is being passed */
+  qmiLocGPSTimeStructT_v02 gpsTime;
+
+  /* Optional */
+  /*  Time Source */
+  uint8_t timeSrc_valid;  /**< Must be set to true if timeSrc is being passed */
+  qmiLocTimeSourceEnumT_v02 timeSrc;
+  /**<   Time source.
+
+ Valid values: \n
+      - eQMI_LOC_TIME_SRC_INVALID (0) --  Invalid time.
+      - eQMI_LOC_TIME_SRC_NETWORK_TIME_TRANSFER (1) --  Time is set by the 1X system
+      - eQMI_LOC_TIME_SRC_NETWORK_TIME_TAGGING (2) --  Time is set by WCDMA/GSM time tagging (that is,
+       associating network time with GPS time)
+      - eQMI_LOC_TIME_SRC_EXTERNAL_INPUT (3) --  Time is set by an external injection
+      - eQMI_LOC_TIME_SRC_TOW_DECODE (4) --  Time is set after decoding over-the-air GPS navigation data
+       from one GPS satellite
+      - eQMI_LOC_TIME_SRC_TOW_CONFIRMED (5) --  Time is set after decoding over-the-air GPS navigation data
+       from multiple satellites
+      - eQMI_LOC_TIME_SRC_TOW_AND_WEEK_CONFIRMED (6) --  Both time of the week and the GPS week number are known
+      - eQMI_LOC_TIME_SRC_NAV_SOLUTION (7) --  Time is set by the position engine after the fix is obtained
+      - eQMI_LOC_TIME_SRC_SOLVE_FOR_TIME (8) --  Time is set by the position engine after performing SFT;
+       this is done when the clock time uncertainty is large
+      - eQMI_LOC_TIME_SRC_GLO_TOW_DECODE (9) --  Time is set after decoding GLO satellites
+      - eQMI_LOC_TIME_SRC_TIME_TRANSFORM (10) --  Time is set after transforming the GPS to GLO time
+      - eQMI_LOC_TIME_SRC_WCDMA_SLEEP_TIME_TAGGING (11) --  Time is set by the sleep time tag provided by the WCDMA network
+      - eQMI_LOC_TIME_SRC_GSM_SLEEP_TIME_TAGGING (12) --  Time is set by the sleep time tag provided by the GSM network
+      - eQMI_LOC_TIME_SRC_UNKNOWN (13) --  Source of the time is unknown
+      - eQMI_LOC_TIME_SRC_SYSTEM_TIMETICK (14) --  Time is derived from the system clock (better known as the slow clock);
+       GNSS time is maintained irrespective of the GNSS receiver state
+      - eQMI_LOC_TIME_SRC_QZSS_TOW_DECODE (15) --  Time is set after decoding QZSS satellites
+      - eQMI_LOC_TIME_SRC_BDS_TOW_DECODE (16) --  Time is set after decoding BDS satellites
+ */
+}qmiLocGetAvailWwanPositionIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCPREMIUMSERVICEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_PREMIUM_SERVICE_GTP_CELL_V02 = 0, /**<  Premium service -- Global terrestrial positioning for the cell  */
+  eQMI_LOC_PREMIUM_SERVICE_SAP_V02 = 1, /**<  Premium service -- Sensor-assisted positioning  */
+  eQMI_LOC_PREMIUM_SERVICE_GTP_ENH_CELL_V02 = 2, /**<  Premium service -- Global terrestrial positioning enhanced cell  */
+  QMILOCPREMIUMSERVICEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocPremiumServiceEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCPREMIUMSERVICECFGENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_PREMIUM_SERVICE_DISABLED_V02 = 0, /**<  Premium service disabled  */
+  eQMI_LOC_PREMIUM_SERVICE_ENABLED_BASIC_V02 = 1, /**<  Premium service enabled for basic  */
+  eQMI_LOC_PREMIUM_SERVICE_ENABLED_PREMIUM_V02 = 2, /**<  Premium service enabled for premium  */
+  QMILOCPREMIUMSERVICECFGENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocPremiumServiceCfgEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to set the configuration */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set Premium Service Type */
+  qmiLocPremiumServiceEnumT_v02 premiumServiceType;
+  /**<   Specifies the premium service to configure.
+
+ Valid values: \n
+      - eQMI_LOC_PREMIUM_SERVICE_GTP_CELL (0) --  Premium service -- Global terrestrial positioning for the cell
+      - eQMI_LOC_PREMIUM_SERVICE_SAP (1) --  Premium service -- Sensor-assisted positioning
+      - eQMI_LOC_PREMIUM_SERVICE_GTP_ENH_CELL (2) --  Premium service -- Global terrestrial positioning enhanced cell
+ */
+
+  /* Mandatory */
+  /*  Set Premium Service Configuration */
+  qmiLocPremiumServiceCfgEnumT_v02 premiumServiceCfg;
+  /**<   Specifies the premium service configuration mode.
+
+ Valid values: \n
+      - eQMI_LOC_PREMIUM_SERVICE_DISABLED (0) --  Premium service disabled
+      - eQMI_LOC_PREMIUM_SERVICE_ENABLED_BASIC (1) --  Premium service enabled for basic
+      - eQMI_LOC_PREMIUM_SERVICE_ENABLED_PREMIUM (2) --  Premium service enabled for premium
+ */
+}qmiLocSetPremiumServicesCfgReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to set the configuration */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set Premium Service Configuration Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set Premium Services Configuration request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+}qmiLocSetPremiumServicesCfgIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCXTRAVERSIONCHECKENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_XTRA_VERSION_CHECK_DISABLE_V02 = 0, /**<  XTRA file version check is not required   */
+  eQMI_LOC_XTRA_VERSION_CHECK_AUTO_V02 = 1, /**<  XTRA file version check is required; the Location service decides the 'expected version' based on the preprovisioned XTRA version configuration  */
+  eQMI_LOC_XTRA_VERSION_CHECK_XTRA2_V02 = 2, /**<  Check the XTRA file against XTRA2 format  */
+  eQMI_LOC_XTRA_VERSION_CHECK_XTRA3_V02 = 3, /**<  Check the XTRA file against XTRA3 format  */
+  QMILOCXTRAVERSIONCHECKENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocXtraVersionCheckEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to enable or disable XTRA version
+                    verification. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set XTRA Version Check Mode */
+  qmiLocXtraVersionCheckEnumT_v02 xtraVersionCheckMode;
+  /**<   Specifies XTRA version check mode.
+
+ Valid values: \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_DISABLE (0) --  XTRA file version check is not required
+      - eQMI_LOC_XTRA_VERSION_CHECK_AUTO (1) --  XTRA file version check is required; the Location service decides the 'expected version' based on the preprovisioned XTRA version configuration
+      - eQMI_LOC_XTRA_VERSION_CHECK_XTRA2 (2) --  Check the XTRA file against XTRA2 format
+      - eQMI_LOC_XTRA_VERSION_CHECK_XTRA3 (3) --  Check the XTRA file against XTRA3 format
+ */
+}qmiLocSetXtraVersionCheckReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to enable or disable XTRA version
+                    verification. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set XTRA Version Check Mode Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set XTRA version check request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure  */
+}qmiLocSetXtraVersionCheckIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint64_t qmiLocGNSSConstellEnumT_v02;
+#define eQMI_SYSTEM_GPS_V02 ((qmiLocGNSSConstellEnumT_v02)0x01ull) /**<  Enable GPS \n  */
+#define eQMI_SYSTEM_GLO_V02 ((qmiLocGNSSConstellEnumT_v02)0x02ull) /**<  Enable GLONASS \n  */
+#define eQMI_SYSTEM_BDS_V02 ((qmiLocGNSSConstellEnumT_v02)0x04ull) /**<  Enable BDS \n  */
+#define eQMI_SYSTEM_GAL_V02 ((qmiLocGNSSConstellEnumT_v02)0x08ull) /**<  Enable Galileo  */
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Sets satellite constellations of interest for reporting. */
+typedef struct {
+
+  /* Optional */
+  /*  GNSS Measurement Report Constellation Control */
+  uint8_t measReportConfig_valid;  /**< Must be set to true if measReportConfig is being passed */
+  qmiLocGNSSConstellEnumT_v02 measReportConfig;
+  /**<   GNSS measurement report constellation control. \n
+ Valid values: \n
+      - eQMI_SYSTEM_GPS (0x01) --  Enable GPS \n
+      - eQMI_SYSTEM_GLO (0x02) --  Enable GLONASS \n
+      - eQMI_SYSTEM_BDS (0x04) --  Enable BDS \n
+      - eQMI_SYSTEM_GAL (0x08) --  Enable Galileo
+ */
+
+  /* Optional */
+  /*  SV Polynomial Report Constellation Control */
+  uint8_t svPolyReportConfig_valid;  /**< Must be set to true if svPolyReportConfig is being passed */
+  qmiLocGNSSConstellEnumT_v02 svPolyReportConfig;
+  /**<   SV polynomial report constellation control. \n
+ Valid values: \n
+      - eQMI_SYSTEM_GPS (0x01) --  Enable GPS \n
+      - eQMI_SYSTEM_GLO (0x02) --  Enable GLONASS \n
+      - eQMI_SYSTEM_BDS (0x04) --  Enable BDS \n
+      - eQMI_SYSTEM_GAL (0x08) --  Enable Galileo
+ */
+}qmiLocSetGNSSConstRepConfigReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sets satellite constellations of interest for reporting. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Set GNSS Constellation Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the GNSS constellation.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocSetGNSSConstRepConfigIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCSOURCEOFFREQENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_FREQ_SOURCE_INVALID_V02 = 0, /**<  Source of the frequency is invalid  */
+  eQMI_LOC_FREQ_SOURCE_EXTERNAL_V02 = 1, /**<  Source of the frequency is from an external injection  */
+  eQMI_LOC_FREQ_SOURCE_PE_CLK_REPORT_V02 = 2, /**<  Source of the frequency is from the GNSS navigation engine  */
+  eQMI_LOC_FREQ_SOURCE_UNKNOWN_V02 = 3, /**<  Source of the frequency is unknown  */
+  QMILOCSOURCEOFFREQENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocSourceofFreqEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  float clockDrift;
+  /**<   Receiver clock drift. \n
+         - Units: Meters per second
+    */
+
+  float clockDriftUnc;
+  /**<   Receiver clock frift uncertainty. \n
+         - Units: Meters per second
+    */
+
+  qmiLocSourceofFreqEnumT_v02 sourceOfFreq;
+  /**<   Source of the clock frequency information.
+
+ Valid values: \n
+      - eQMI_LOC_FREQ_SOURCE_INVALID (0) --  Source of the frequency is invalid
+      - eQMI_LOC_FREQ_SOURCE_EXTERNAL (1) --  Source of the frequency is from an external injection
+      - eQMI_LOC_FREQ_SOURCE_PE_CLK_REPORT (2) --  Source of the frequency is from the GNSS navigation engine
+      - eQMI_LOC_FREQ_SOURCE_UNKNOWN (3) --  Source of the frequency is unknown
+ */
+}qmiLocRcvrClockFrequencyInfoStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint8_t leapSec;
+  /**<   GPS time leap second delta to UTC time.  \n
+         For nonzero values of leapSecUnc, leapSec must be treated as unknown. \n
+             - Units: Seconds
+    */
+
+  uint8_t leapSecUnc;
+  /**<   Uncertainty for the GPS leap second. \n
+             - Units: Seconds
+    */
+}qmiLocLeapSecondInfoStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+typedef uint8_t qmiLocInterSystemBiasValidMaskT_v02;
+#define QMI_LOC_SYS_TIME_BIAS_VALID_V02 ((qmiLocInterSystemBiasValidMaskT_v02)0x01) /**<  System time bias is valid \n  */
+#define QMI_LOC_SYS_TIME_BIAS_UNC_VALID_V02 ((qmiLocInterSystemBiasValidMaskT_v02)0x02) /**<  System time bias uncertainty is valid  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocInterSystemBiasValidMaskT_v02 validMask;
+  /**<   Fields that are valid. \n
+ Valid values: \n
+      - QMI_LOC_SYS_TIME_BIAS_VALID (0x01) --  System time bias is valid \n
+      - QMI_LOC_SYS_TIME_BIAS_UNC_VALID (0x02) --  System time bias uncertainty is valid  \n
+ */
+
+  float timeBias;
+  /**<   System 1 to System 2 time bias.  \n
+             - Units: Milliseconds
+    */
+
+  float timeBiasUnc;
+  /**<   System 1 to System 2 time bias uncertainty.  \n
+             - Units: Milliseconds
+    */
+}qmiLocInterSystemBiasStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  qmiLocSvSystemEnumT_v02 system;
+  /**<   Specifies the satellite system constellation. */
+
+  uint16_t systemWeek;
+  /**<   Current system week. \n
+      - For GPS: Calculated from midnight, Jan. 6, 1980 \n
+      - For BDS: Calculated from 00:00:00 on January 1, 2006 of Coordinated Universal Time (UTC) \n
+      - For GAL: Calculated from 00:00 UT on Sunday August 22, 1999 (midnight between August 21 and August 22) \n
+      If the week is unknown, set this value to 65535. \n
+       - Units: Weeks */
+
+  uint32_t systemMsec;
+  /**<   Amount of time into the current week. \n
+       - Units: Milliseconds */
+
+  float systemClkTimeBias;
+  /**<   System clock time bias (submilliseconds). \n
+            - Units: Milliseconds
+        (system time = systemMsec - systemClkTimeBias)
+    */
+
+  float systemClkTimeUncMs;
+  /**<   Single-sided maximum time bias uncertainty. \n
+                - Units: Milliseconds
+    */
+}qmiLocGnssTimeStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint8_t gloFourYear;
+  /**<   GLONASS four year number from 1996. Refer to GLONASS ICD. \n
+        Applicable only for GLONASS and is to be ignored for other constellations. \n
+        If unknown, set this value to 255.
+    */
+
+  uint16_t gloDays;
+  /**<   GLONASS day number in four years. Refer to GLONASS ICD. \n
+        Applicable only for GLONASS and is to be ignored for other constellations. \n
+        If unknown, set this value to 65535.
+    */
+
+  uint32_t gloMsec;
+  /**<   GLONASS time of day in msec. Refer to GLONASS ICD.    \n
+        - Units: Milliseconds
+    */
+
+  float gloClkTimeBias;
+  /**<   System clock time bias (submillisecond). \n
+            - Units: Milliseconds
+        (system time = systemMsec - systemClkTimeBias)
+    */
+
+  float gloClkTimeUncMs;
+  /**<   Single-sided maximum time bias uncertainty. \n
+                - Units: Milliseconds
+    */
+}qmiLocGloTimeStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t refFCount;
+  /**<   Receiver frame counter value at a reference tick. */
+
+  uint8_t systemRtc_valid;
+  /**<   Validity indicator for the system RTC. */
+
+  uint64_t systemRtcMs;
+  /**<   Platform system RTC value. \n
+        - Units: Milliseconds
+    */
+
+  qmiLocTimeSourceEnumT_v02 sourceOfTime;
+  /**<   Source of the time information.
+
+ Valid values: \n
+      - eQMI_LOC_TIME_SRC_INVALID (0) --  Invalid time.
+      - eQMI_LOC_TIME_SRC_NETWORK_TIME_TRANSFER (1) --  Time is set by the 1X system
+      - eQMI_LOC_TIME_SRC_NETWORK_TIME_TAGGING (2) --  Time is set by WCDMA/GSM time tagging (that is,
+       associating network time with GPS time)
+      - eQMI_LOC_TIME_SRC_EXTERNAL_INPUT (3) --  Time is set by an external injection
+      - eQMI_LOC_TIME_SRC_TOW_DECODE (4) --  Time is set after decoding over-the-air GPS navigation data
+       from one GPS satellite
+      - eQMI_LOC_TIME_SRC_TOW_CONFIRMED (5) --  Time is set after decoding over-the-air GPS navigation data
+       from multiple satellites
+      - eQMI_LOC_TIME_SRC_TOW_AND_WEEK_CONFIRMED (6) --  Both time of the week and the GPS week number are known
+      - eQMI_LOC_TIME_SRC_NAV_SOLUTION (7) --  Time is set by the position engine after the fix is obtained
+      - eQMI_LOC_TIME_SRC_SOLVE_FOR_TIME (8) --  Time is set by the position engine after performing SFT;
+       this is done when the clock time uncertainty is large
+      - eQMI_LOC_TIME_SRC_GLO_TOW_DECODE (9) --  Time is set after decoding GLO satellites
+      - eQMI_LOC_TIME_SRC_TIME_TRANSFORM (10) --  Time is set after transforming the GPS to GLO time
+      - eQMI_LOC_TIME_SRC_WCDMA_SLEEP_TIME_TAGGING (11) --  Time is set by the sleep time tag provided by the WCDMA network
+      - eQMI_LOC_TIME_SRC_GSM_SLEEP_TIME_TAGGING (12) --  Time is set by the sleep time tag provided by the GSM network
+      - eQMI_LOC_TIME_SRC_UNKNOWN (13) --  Source of the time is unknown
+      - eQMI_LOC_TIME_SRC_SYSTEM_TIMETICK (14) --  Time is derived from the system clock (better known as the slow clock);
+       GNSS time is maintained irrespective of the GNSS receiver state
+      - eQMI_LOC_TIME_SRC_QZSS_TOW_DECODE (15) --  Time is set after decoding QZSS satellites
+      - eQMI_LOC_TIME_SRC_BDS_TOW_DECODE (16) --  Time is set after decoding BDS satellites
+ */
+}qmiLocGnssTimeExtStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+typedef uint64_t qmiLocSvMeasStatusValidMaskT_v02;
+#define QMI_LOC_MASK_MEAS_STATUS_SM_STAT_BIT_VALID_V02 ((qmiLocSvMeasStatusValidMaskT_v02)0x00000001ull) /**<  Satellite time in submilliseconds (code-phase)  */
+#define QMI_LOC_MASK_MEAS_STATUS_SB_STAT_BIT_VALID_V02 ((qmiLocSvMeasStatusValidMaskT_v02)0x00000002ull) /**<  Satellite sub-bit time  */
+#define QMI_LOC_MASK_MEAS_STATUS_MS_STAT_BIT_VALID_V02 ((qmiLocSvMeasStatusValidMaskT_v02)0x00000004ull) /**<  Satellite time in milliseconds  */
+#define QMI_LOC_MASK_MEAS_STATUS_BE_CONFIRM_STAT_BIT_VALID_V02 ((qmiLocSvMeasStatusValidMaskT_v02)0x00000008ull) /**<  Signal bit edge is confirmed  */
+#define QMI_LOC_MASK_MEAS_STATUS_VEL_STAT_BIT_VALID_V02 ((qmiLocSvMeasStatusValidMaskT_v02)0x00000010ull) /**<  Satellite Doppler is measured  */
+#define QMI_LOC_MASK_MEAS_STATUS_VEL_FINE_STAT_BIT_VALID_V02 ((qmiLocSvMeasStatusValidMaskT_v02)0x00000020ull) /**<  Fine/coarse Doppler measurement indicator  */
+#define QMI_LOC_MASK_MEAS_STATUS_FROM_RNG_DIFF_STAT_BIT_VALID_V02 ((qmiLocSvMeasStatusValidMaskT_v02)0x00000200ull) /**<  Range update from satellite differences  */
+#define QMI_LOC_MASK_MEAS_STATUS_FROM_VE_DIFF_STAT_BIT_VALID_V02 ((qmiLocSvMeasStatusValidMaskT_v02)0x00000400ull) /**<  Doppler update from satellite differences  */
+typedef uint64_t qmiLocSvMeasStatusMaskT_v02;
+#define QMI_LOC_MASK_MEAS_STATUS_SM_VALID_V02 ((qmiLocSvMeasStatusMaskT_v02)0x00000001ull) /**<  Satellite time in submilliseconds (code phase) is known  */
+#define QMI_LOC_MASK_MEAS_STATUS_SB_VALID_V02 ((qmiLocSvMeasStatusMaskT_v02)0x00000002ull) /**<  Satellite sub-bit time is known  */
+#define QMI_LOC_MASK_MEAS_STATUS_MS_VALID_V02 ((qmiLocSvMeasStatusMaskT_v02)0x00000004ull) /**<  Satellite time in milliseconds is known  */
+#define QMI_LOC_MASK_MEAS_STATUS_BE_CONFIRM_V02 ((qmiLocSvMeasStatusMaskT_v02)0x00000008ull) /**<  Signal bit edge is confirmed   */
+#define QMI_LOC_MASK_MEAS_STATUS_VELOCITY_VALID_V02 ((qmiLocSvMeasStatusMaskT_v02)0x00000010ull) /**<  Satellite Doppler is measured  */
+#define QMI_LOC_MASK_MEAS_STATUS_VELOCITY_FINE_V02 ((qmiLocSvMeasStatusMaskT_v02)0x00000020ull) /**<  TRUE: Fine Doppler is measured, FALSE: Coarse Doppler is measured  */
+#define QMI_LOC_MASK_MEAS_STATUS_FROM_RNG_DIFF_V02 ((qmiLocSvMeasStatusMaskT_v02)0x00000200ull) /**<  Range update from satellite differences is measured  */
+#define QMI_LOC_MASK_MEAS_STATUS_FROM_VE_DIFF_V02 ((qmiLocSvMeasStatusMaskT_v02)0x00000400ull) /**<  Doppler update from satellite differences is measured}  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint32_t svTimeMs;
+  /**<       Satellite time in milliseconds. \n
+            - For GPS, BDS, and GAL -- Range is 0 thru (604800000-1) \n
+            - For GLONASS -- Range is 0 thru (86400000-1) \n
+            - Units: Milliseconds \vspace{4pt}
+
+            This is valid when the QMI_LOC_MEAS_ STATUS_MS_VALID bit is set
+            in the measurement status. \vspace{4pt}
+
+            @note All SV times in the current measurement block are
+            alredy propagated to a common reference time epoch.
+    */
+
+  float svTimeSubMs;
+  /**<       Satellite time in submilliseconds. \n
+            Total SV Time = svMs + svSubMs \n
+                - Units: Milliseconds
+    */
+
+  float svTimeUncMs;
+  /**<    Satellite time uncertainty. \n
+                - Units: Milliseconds
+    */
+
+  float dopplerShift;
+  /**<   Satellite Doppler. \n
+             - Units: Meters per second
+    */
+
+  float dopplerShiftUnc;
+  /**<   Satellite Doppler uncertainty. \n
+             - Units: Meters per second
+    */
+
+  uint8_t dopplerAccel_valid;
+  /**<   Validity for Doppler acceleration. */
+
+  float dopplerAccel;
+  /**<   Satellite Doppler acceleration. \n
+             - Units: Hz/second
+    */
+}qmiLocSVTimeSpeedStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+typedef uint16_t qmiLocMeasFieldsValidMaskT_v02;
+#define QMI_LOC_SV_HEALTH_VALID_V02 ((qmiLocMeasFieldsValidMaskT_v02)0x01) /**<  SV health information is valid  */
+#define QMI_LOC_SV_MULTIPATH_EST_VALID_V02 ((qmiLocMeasFieldsValidMaskT_v02)0x02) /**<  Multipath estimate for SV is valid  */
+#define QMI_LOC_SV_FINE_SPEED_VALID_V02 ((qmiLocMeasFieldsValidMaskT_v02)0x04) /**<  Fine speed for SV is valid  */
+#define QMI_LOC_SV_FINE_SPEED_UNC_VALID_V02 ((qmiLocMeasFieldsValidMaskT_v02)0x08) /**<  Fine speed uncertainty for SV is valid  */
+#define QMI_LOC_SV_CARRIER_PHASE_VALID_V02 ((qmiLocMeasFieldsValidMaskT_v02)0x10) /**<  Carrier phase for SV is valid  */
+#define QMI_LOC_SV_SV_DIRECTION_VALID_V02 ((qmiLocMeasFieldsValidMaskT_v02)0x20) /**<  SV direction information for SV is valid  */
+#define QMI_LOC_SV_CYCLESLIP_COUNT_VALID_V02 ((qmiLocMeasFieldsValidMaskT_v02)0x40) /**<  Cycle slip count information is valid  */
+#define QMI_LOC_SV_LOSSOFLOCK_VALID_V02 ((qmiLocMeasFieldsValidMaskT_v02)0x80) /**<  Loss of lock information is valid  */
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint16_t gnssSvId;
+  /**<   GNSS SV ID.
+       \begin{itemize1}
+       \item    Range: \begin{itemize1}
+         \item    For GPS:     1 to 32
+         \item    For SBAS:    33 to 64
+         \item    For GLONASS: 65 to 96. When slot-number to SV ID mapping is unknown, set as 255.
+         \item    For BDS:     201 to 237
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  uint8_t gloFrequency;
+  /**<   GLONASS frequency number + 7. \n
+         Valid only for a GLONASS system and
+         is to be ignored for all other systems. \n
+             - Range: 1 to 14
+    */
+
+  qmiLocSvStatusEnumT_v02 svStatus;
+  /**<   Satellite search state.
+
+ Valid values: \n
+      - eQMI_LOC_SV_STATUS_IDLE (1) --  SV is not being actively processed
+      - eQMI_LOC_SV_STATUS_SEARCH (2) --  The system is searching for this SV
+      - eQMI_LOC_SV_STATUS_TRACK (3) --  SV is being tracked
+ */
+
+  qmiLocMeasFieldsValidMaskT_v02 validMask;
+  /**<   Validity mask (0 = Not valid; 1 = Valid). \n
+
+      - QMI_LOC_SV_HEALTH_VALID (0x01) --  SV health information is valid
+      - QMI_LOC_SV_MULTIPATH_EST_VALID (0x02) --  Multipath estimate for SV is valid
+      - QMI_LOC_SV_FINE_SPEED_VALID (0x04) --  Fine speed for SV is valid
+      - QMI_LOC_SV_FINE_SPEED_UNC_VALID (0x08) --  Fine speed uncertainty for SV is valid
+      - QMI_LOC_SV_CARRIER_PHASE_VALID (0x10) --  Carrier phase for SV is valid
+      - QMI_LOC_SV_SV_DIRECTION_VALID (0x20) --  SV direction information for SV is valid
+      - QMI_LOC_SV_CYCLESLIP_COUNT_VALID (0x40) --  Cycle slip count information is valid
+      - QMI_LOC_SV_LOSSOFLOCK_VALID (0x80) --  Loss of lock information is valid
+ */
+
+  uint8_t healthStatus;
+  /**<   Health status. \n
+         \begin{itemize1}
+         - Range: 0 to 1, where  0 = unhealthy, 1 = healthy
+    */
+
+  qmiLocSvInfoMaskT_v02 svInfoMask;
+  /**<   Indicates whether almanac and ephemeris information is available.
+
+ Valid values: \n
+      - QMI_LOC_SVINFO_MASK_HAS_EPHEMERIS (0x01) --  Ephemeris is available for this SV
+      - QMI_LOC_SVINFO_MASK_HAS_ALMANAC (0x02) --  Almanac is available for this SV
+ */
+
+  qmiLocSvMeasStatusValidMaskT_v02 validMeasStatusMask;
+  /**<   Validity mask for measurement status information. \n
+ A set bit in validMeasStatusMask indicates that the corresponding bit
+ in measurementStatus has valid status information: \n
+ Valid masks: \n
+      - QMI_LOC_MASK_MEAS_STATUS_SM_STAT_BIT_VALID (0x00000001) --  Satellite time in submilliseconds (code-phase)
+      - QMI_LOC_MASK_MEAS_STATUS_SB_STAT_BIT_VALID (0x00000002) --  Satellite sub-bit time
+      - QMI_LOC_MASK_MEAS_STATUS_MS_STAT_BIT_VALID (0x00000004) --  Satellite time in milliseconds
+      - QMI_LOC_MASK_MEAS_STATUS_BE_CONFIRM_STAT_BIT_VALID (0x00000008) --  Signal bit edge is confirmed
+      - QMI_LOC_MASK_MEAS_STATUS_VEL_STAT_BIT_VALID (0x00000010) --  Satellite Doppler is measured
+      - QMI_LOC_MASK_MEAS_STATUS_VEL_FINE_STAT_BIT_VALID (0x00000020) --  Fine/coarse Doppler measurement indicator
+      - QMI_LOC_MASK_MEAS_STATUS_FROM_RNG_DIFF_STAT_BIT_VALID (0x00000200) --  Range update from satellite differences
+      - QMI_LOC_MASK_MEAS_STATUS_FROM_VE_DIFF_STAT_BIT_VALID (0x00000400) --  Doppler update from satellite differences
+\vspace{4pt}
+ Additionally, MSB 0xFFC0000000000000 bits indicate the validity of DONT_USE bits. \n
+
+ */
+
+  qmiLocSvMeasStatusMaskT_v02 measurementStatus;
+  /**<   Bitmask indicating the SV measurement status.
+
+ Valid bitmasks: \n
+      - QMI_LOC_MASK_MEAS_STATUS_SM_VALID (0x00000001) --  Satellite time in submilliseconds (code phase) is known
+      - QMI_LOC_MASK_MEAS_STATUS_SB_VALID (0x00000002) --  Satellite sub-bit time is known
+      - QMI_LOC_MASK_MEAS_STATUS_MS_VALID (0x00000004) --  Satellite time in milliseconds is known
+      - QMI_LOC_MASK_MEAS_STATUS_BE_CONFIRM (0x00000008) --  Signal bit edge is confirmed
+      - QMI_LOC_MASK_MEAS_STATUS_VELOCITY_VALID (0x00000010) --  Satellite Doppler is measured
+      - QMI_LOC_MASK_MEAS_STATUS_VELOCITY_FINE (0x00000020) --  TRUE: Fine Doppler is measured, FALSE: Coarse Doppler is measured
+      - QMI_LOC_MASK_MEAS_STATUS_FROM_RNG_DIFF (0x00000200) --  Range update from satellite differences is measured
+      - QMI_LOC_MASK_MEAS_STATUS_FROM_VE_DIFF (0x00000400) --  Doppler update from satellite differences is measured}
+
+ If any MSB bit in 0xFFC0000000000000 DONT_USE is set, the measurement
+ must not be used by the client.
+ */
+
+  uint16_t CNo;
+  /**<   Carrier to noise ratio.  \n
+             - Units: dBHz \n
+             - Scale: 0.1
+    */
+
+  uint16_t gloRfLoss;
+  /**<   GLONASS RF loss reference to the antenna. \n
+                 - Units: dB \n
+                 - Scale: 0.1
+    */
+
+  int32_t measLatency;
+  /**<   Age of the measurement. A positive value means the measurement precedes the reference time. \n
+                 - Units: Milliseconds
+    */
+
+  qmiLocSVTimeSpeedStructT_v02 svTimeSpeed;
+  /**<   SV time and speed information. */
+
+  uint8_t lossOfLock;
+  /**<   Loss of signal lock indicator.  \n
+             - 0: Signal is in continuous track \n
+             - 1: Signal is not in track
+    */
+
+  float multipathEstimate;
+  /**<   Estimate of multipath in a measurement. \n
+             - Units: Meters
+    */
+
+  float fineSpeed;
+  /**<   Carrier phase derived speed. \n
+             - Units: Meters per second
+    */
+
+  float fineSpeedUnc;
+  /**<   Carrier phase derived speed uncertainty. \n
+             - Units: Meters per second
+    */
+
+  double carrierPhase;
+  /**<   Carrier phase measurement (L1 cycles).
+    */
+
+  uint8_t cycleSlipCount;
+  /**<   Increments when a cycle slip is detected. */
+
+  float svAzimuth;
+  /**<   Satellite azimuth. \n
+                - Units: Radians \n
+                - Range: 0 to 2*pi()
+    */
+
+  float svElevation;
+  /**<   Satellite elevation. \n
+                - Units: Radians \n
+                - Range: 0 to pi()/2
+    */
+}qmiLocSVMeasurementStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sends a satellite measurement report to the control point. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Current Message Sequence Number */
+  uint8_t seqNum;
+  /**<   Current message number. Used for segmentation/assembly of measurement reports. */
+
+  /* Mandatory */
+  /*  Maximum Number of Messages to be Sent for Present Time Epoch */
+  uint8_t maxMessageNum;
+  /**<   Maximum number of messages that are to be sent for the present time epoch. */
+
+  /* Mandatory */
+  /*   Specifies Satellite System Constellation of This Report */
+  qmiLocSvSystemEnumT_v02 system;
+  /**<   Specifies the satellite system constellation of this report.
+
+ Valid values: \n
+      - eQMI_LOC_SV_SYSTEM_GPS (1) --  GPS satellite
+      - eQMI_LOC_SV_SYSTEM_GALILEO (2) --  GALILEO satellite
+      - eQMI_LOC_SV_SYSTEM_SBAS (3) --  SBAS satellite
+      - eQMI_LOC_SV_SYSTEM_COMPASS (4) --  COMPASS satellite
+      - eQMI_LOC_SV_SYSTEM_GLONASS (5) --  GLONASS satellite
+      - eQMI_LOC_SV_SYSTEM_BDS (6) --  BDS satellite
+ */
+
+  /* Optional */
+  /*  GNSS Receiver Clock Frequency Information */
+  uint8_t rcvrClockFrequencyInfo_valid;  /**< Must be set to true if rcvrClockFrequencyInfo is being passed */
+  qmiLocRcvrClockFrequencyInfoStructT_v02 rcvrClockFrequencyInfo;
+
+  /* Optional */
+  /*  Leap Second Information */
+  uint8_t leapSecondInfo_valid;  /**< Must be set to true if leapSecondInfo is being passed */
+  qmiLocLeapSecondInfoStructT_v02 leapSecondInfo;
+
+  /* Optional */
+  /*  GPS to GLONASS Intersystem Time Bias */
+  uint8_t gpsGloInterSystemBias_valid;  /**< Must be set to true if gpsGloInterSystemBias is being passed */
+  qmiLocInterSystemBiasStructT_v02 gpsGloInterSystemBias;
+  /**<   \vspace{4pt} \n
+       This is reported if both GPS and GLONASS system
+       information reporting are enabled. \n
+       - System 1: GPS \n
+       - System 2: GLONASS
+  */
+
+  /* Optional */
+  /*  GPS to BDS Intersystem Time Bias */
+  uint8_t gpsBdsInterSystemBias_valid;  /**< Must be set to true if gpsBdsInterSystemBias is being passed */
+  qmiLocInterSystemBiasStructT_v02 gpsBdsInterSystemBias;
+  /**<   \vspace{4pt} \n
+       This is reported if both GPS and BDS system
+       information reporting are enabled. \n
+       - System 1: GPS \n
+       - System 2: BDS
+  */
+
+  /* Optional */
+  /*  GPS to GALILEO Intersystem Time Bias */
+  uint8_t gpsGalInterSystemBias_valid;  /**< Must be set to true if gpsGalInterSystemBias is being passed */
+  qmiLocInterSystemBiasStructT_v02 gpsGalInterSystemBias;
+  /**<   \vspace{4pt} \n
+       This is reported if both GPS and GALILEO system
+       information reporting are enabled. \n
+       - System 1: GPS \n
+       - System 2: GALILEO
+  */
+
+  /* Optional */
+  /*  BDS to GLONASS Intersystem Time Bias */
+  uint8_t bdsGloInterSystemBias_valid;  /**< Must be set to true if bdsGloInterSystemBias is being passed */
+  qmiLocInterSystemBiasStructT_v02 bdsGloInterSystemBias;
+  /**<   \vspace{4pt} \n
+       This is reported if both BDS and GLONASS system
+       information reporting are enabled. \n
+       - System 1: BDS \n
+       - System 2: GLONASS
+  */
+
+  /* Optional */
+  /*  GAL to GLONASS Intersystem Time Bias */
+  uint8_t galGloInterSystemBias_valid;  /**< Must be set to true if galGloInterSystemBias is being passed */
+  qmiLocInterSystemBiasStructT_v02 galGloInterSystemBias;
+  /**<   \vspace{4pt} \n
+       This is reported if both GAL and GLONASS system
+       information reporting are enabled. \n
+       - System 1: GAL \n
+       - System 2: GLONASS
+  */
+
+  /* Optional */
+  /*  GAL to BDS Intersystem Time Bias */
+  uint8_t galBdsInterSystemBias_valid;  /**< Must be set to true if galBdsInterSystemBias is being passed */
+  qmiLocInterSystemBiasStructT_v02 galBdsInterSystemBias;
+  /**<   \vspace{4pt} \n
+       This is reported if both GAL and BDS system
+       information reporting are enabled. \n
+       - System 1: GAL \n
+       - System 2: BDS
+  */
+
+  /* Optional */
+  /*  Satellite System Time Information for GPS, BDS, GAL Constellation */
+  uint8_t systemTime_valid;  /**< Must be set to true if systemTime is being passed */
+  qmiLocGnssTimeStructT_v02 systemTime;
+
+  /* Optional */
+  /*  GLONASS System Time Information */
+  uint8_t gloTime_valid;  /**< Must be set to true if gloTime is being passed */
+  qmiLocGloTimeStructT_v02 gloTime;
+
+  /* Optional */
+  /*  Extended Time Information */
+  uint8_t systemTimeExt_valid;  /**< Must be set to true if systemTimeExt is being passed */
+  qmiLocGnssTimeExtStructT_v02 systemTimeExt;
+
+  /* Optional */
+  /*  Satellite System Measurement Report for Enabled Constellation */
+  uint8_t svMeasurement_valid;  /**< Must be set to true if svMeasurement is being passed */
+  uint32_t svMeasurement_len;  /**< Must be set to # of elements in svMeasurement */
+  qmiLocSVMeasurementStructT_v02 svMeasurement[QMI_LOC_SV_MEAS_LIST_MAX_SIZE_V02];
+}qmiLocEventGnssSvMeasInfoIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+typedef uint16_t qmiLocSvPolyStatusMaskT_v02;
+#define QMI_LOC_SV_POLY_SRC_ALM_CORR_V02 ((qmiLocSvPolyStatusMaskT_v02)0x01) /**<  Polynomials based on XTRA  */
+#define QMI_LOC_SV_POLY_GLO_STR4_V02 ((qmiLocSvPolyStatusMaskT_v02)0x02) /**<  GLONASS string 4 has been received  */
+typedef uint16_t qmiLocSvPolyStatusMaskValidityT_v02;
+#define QMI_LOC_SV_POLY_SRC_ALM_CORR_VALID_V02 ((qmiLocSvPolyStatusMaskValidityT_v02)0x01) /**<  Validity status for QMI_LOC_SV_POLY_SRC_ALM_CORR  */
+#define QMI_LOC_SV_POLY_GLO_STR4_VALID_V02 ((qmiLocSvPolyStatusMaskValidityT_v02)0x02) /**<  Validity status for QMI_LOC_SV_POLY_GLO_STR4   */
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sends a satellite polynomial report to the control point. */
+typedef struct {
+
+  /* Mandatory */
+  /*  GNSS SV Polynomial Report */
+  uint16_t gnssSvId;
+  /**<   GNSS SV ID. \begin{itemize1}
+       \item    Range:    \begin{itemize1}
+         \item    For GPS:     1 to 32
+         \item    For SBAS:    33 to 64
+         \item    For GLONASS: 65 to 96 (when the slot number to SV ID mapping is unknown, set to 255)
+         \item    For BDS:     201 to 237
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  /* Mandatory */
+  /*  Reference Time for Polynomial Calculations */
+  double T0;
+  /**<    Reference time for polynomial calculations. \n
+           - GPS: Seconds in the week \n
+           - GLO: Full seconds since Jan. 1, 1996 \n
+           - BDS: Full seconds since Jan. 1, 2006
+    */
+
+  /* Mandatory */
+  /*  SV Polynomial Validity Status */
+  qmiLocSvPolyStatusMaskValidityT_v02 svPolyFlagValid;
+  /**<   Validity mask for bits in svPolyFlags. A set bit in svPolyFlagValid indicates that a
+ corresponding bit in svPolyFlags has valid status information.
+
+ Valid bitmasks: \n
+      - QMI_LOC_SV_POLY_SRC_ALM_CORR_VALID (0x01) --  Validity status for QMI_LOC_SV_POLY_SRC_ALM_CORR
+      - QMI_LOC_SV_POLY_GLO_STR4_VALID (0x02) --  Validity status for QMI_LOC_SV_POLY_GLO_STR4   */
+
+  /* Mandatory */
+  /*  SV Polynomial Report Status */
+  qmiLocSvPolyStatusMaskT_v02 svPolyFlags;
+  /**<   Flags indicating the status of a polynomial report.
+
+ Valid bitmasks: \n
+      - QMI_LOC_SV_POLY_SRC_ALM_CORR (0x01) --  Polynomials based on XTRA
+      - QMI_LOC_SV_POLY_GLO_STR4 (0x02) --  GLONASS string 4 has been received  */
+
+  /* Optional */
+  /*  Polynomial Coefficient's 0th Term for X, Y, and Z Coordinates */
+  uint8_t polyCoeffXYZ0_valid;  /**< Must be set to true if polyCoeffXYZ0 is being passed */
+  double polyCoeffXYZ0[QMI_LOC_SV_POLY_XYZ_0_TH_ORDER_COEFF_SIZE_V02];
+  /**<   Polynomial coefficient's 0th term for X, Y, and Z coordinates (C0X, C0Y, C0Z). \n
+             - Units: Meters
+    */
+
+  /* Optional */
+  /*  Polynomial Coefficient's 1st, 2nd, and 3rd Terms for X, Y, and Z Coordinates */
+  uint8_t polyCoefXYZN_valid;  /**< Must be set to true if polyCoefXYZN is being passed */
+  double polyCoefXYZN[QMI_LOC_SV_POLY_XYZ_N_TH_ORDER_COEFF_SIZE_V02];
+  /**<    Polynomial coefficient's 1st, 2nd, and 3rd terms for X, Y, and Z coordinates (C1X, C2X,... C2Z, C3Z). \begin{itemize1}
+          \item Units: \begin{itemize1}
+             \item 1st term -- Meters/second
+             \item 2nd term -- Meters/second^2
+             \item 3rd term -- Meters/seconds^3 \vspace{-0.18in} \end{itemize1} end{itemize1}
+    */
+
+  /* Optional */
+  /*  Polynomial Coefficients for Satellite Clock Bias Correction */
+  uint8_t polyCoefClockBias_valid;  /**< Must be set to true if polyCoefClockBias is being passed */
+  float polyCoefClockBias[QMI_LOC_SV_POLY_SV_CLKBIAS_COEFF_SIZE_V02];
+  /**<    Polynomial coefficients for satellite clock bias correction (C0T, C1T, C2T, C3T). \begin{itemize1}
+          \item Units: \begin{itemize1}
+             \item 0th term -- Milliseconds/second
+             \item 1st term -- Milliseconds/second^2
+             \item 2nd term -- Milliseconds/second^3
+             \item 3rd term -- Milliseconds/second^4 \vspace{-0.18in} \end{itemize1} end{itemize1}
+    */
+
+  /* Optional */
+  /*  GLONASS Frequency Number */
+  uint8_t gloFrequency_valid;  /**< Must be set to true if gloFrequency is being passed */
+  uint8_t gloFrequency;
+  /**<   GLONASS frequency number + 7. \n
+         Valid only for GLONASS systems and
+         must be ignored for all other systems. \n
+             - Range: 1 to 14
+    */
+
+  /* Optional */
+  /*  Ephemeris Reference Time */
+  uint8_t IODE_valid;  /**< Must be set to true if IODE is being passed */
+  uint16_t IODE;
+  /**<   Ephemeris reference time. \n
+         - GPS -- Issue of data ephemeris used (unitless) \n
+         - GLONASS -- Tb 7-bit
+    */
+
+  /* Optional */
+  /*  Enhanced Reference Time */
+  uint8_t enhancedIOD_valid;  /**< Must be set to true if enhancedIOD is being passed */
+  uint32_t enhancedIOD;
+  /**<   For BDS ephemeris, this is TOE.
+    */
+
+  /* Optional */
+  /*  SV Position Uncertainty */
+  uint8_t svPosUnc_valid;  /**< Must be set to true if svPosUnc is being passed */
+  float svPosUnc;
+  /**<    SV position uncertainty. \n
+             - Units: Meters
+    */
+
+  /* Optional */
+  /*  Iono Delay */
+  uint8_t ionoDelay_valid;  /**< Must be set to true if ionoDelay is being passed */
+  float ionoDelay;
+  /**<   Ionospheric delay at T0. \n
+             - Units: Meters
+    */
+
+  /* Optional */
+  /*  Iono Delay Rate */
+  uint8_t ionoDot_valid;  /**< Must be set to true if ionoDot is being passed */
+  float ionoDot;
+  /**<   Ionospheric delay rate. \n
+             - Units: Meters/second
+    */
+
+  /* Optional */
+  /*  SBAS Iono Delay */
+  uint8_t sbasIonoDelay_valid;  /**< Must be set to true if sbasIonoDelay is being passed */
+  float sbasIonoDelay;
+  /**<   SBAS ionospheric delay at T0. \n
+             - Units: Meters
+    */
+
+  /* Optional */
+  /*  SBAS Iono Delay Rate */
+  uint8_t sbasIonoDot_valid;  /**< Must be set to true if sbasIonoDot is being passed */
+  float sbasIonoDot;
+  /**<   SBAS ionospheric delay rate. \n
+             - Units: Meters/second
+    */
+
+  /* Optional */
+  /*  Tropospheric Delay */
+  uint8_t tropoDelay_valid;  /**< Must be set to true if tropoDelay is being passed */
+  float tropoDelay;
+  /**<   Tropospheric delay. \n
+             - Units: Meters
+    */
+
+  /* Optional */
+  /*  Satellite Elevation */
+  uint8_t elevation_valid;  /**< Must be set to true if elevation is being passed */
+  float elevation;
+  /**<   Satellite elevation at T0. \n
+             - Units: Radians
+    */
+
+  /* Optional */
+  /*  Satellite Elevation Rate */
+  uint8_t elevationDot_valid;  /**< Must be set to true if elevationDot is being passed */
+  float elevationDot;
+  /**<   Satellite elevation rate. \n
+             - Units: Radians/second
+    */
+
+  /* Optional */
+  /*  Satellite Elevation Uncertainty */
+  uint8_t elenationUnc_valid;  /**< Must be set to true if elenationUnc is being passed */
+  float elenationUnc;
+  /**<   SV elevation uncertainty. \n
+             - Units: Radians
+    */
+
+  /* Optional */
+  /*  Polynomial Coefficients for SV Velocity */
+  uint8_t velCoef_valid;  /**< Must be set to true if velCoef is being passed */
+  double velCoef[QMI_LOC_SV_POLY_VELOCITY_COEF_SIZE_V02];
+  /**<   Polynomial coefficients for SV velocity (C0X, C1X, C2X, C3X,... C2Z, C3Z). \begin{itemize1}
+         \item Units: \begin{itemize1}
+            \item 0th term -- Meters/second
+            \item 1st term -- Meters/second^2
+            \item 2nd term -- Meters/second^3
+            \item 3rd term -- Meters/second^4 \vspace{-0.18in} \end{itemize1} end{itemize1}
+    */
+}qmiLocEventGnssSvPolyIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  uint8_t wifiApMacAddress[QMI_LOC_WIFI_MAC_ADDR_LENGTH_V02];
+  /**<   MAC address of the Wi-Fi AP. */
+}qmiLocWifiApMacAddressStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  char uuid[QMI_LOC_MAX_IBEACON_UUID_STR_LENGTH_V02 + 1];
+  /**<   NULL-terminated IBeacon identifier string; a 128-bit value. */
+
+  uint32_t majorNumber;
+  /**<   IBeacon major number.*/
+
+  uint32_t minorNumber;
+  /**<   IBeacon minor number.*/
+}qmiLocIBeaconIdStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to inject the Geofence context. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The transaction ID
+       is returned in the Add Geofence Context indication. */
+
+  /* Optional */
+  /*  Geofence ID */
+  uint8_t geofenceId_valid;  /**< Must be set to true if geofenceId is being passed */
+  uint32_t geofenceId;
+  /**<   Geofence identifier allocated by the engine.    \n
+       If the Geofence ID is not provided, a Geofence is created with an Area ID
+       list only (e.g., Wi-Fi only list Geofence). \n
+       If the Geofence ID is provided, the added list is used as assistance data
+       to the existing Geofence. */
+
+  /* Optional */
+  /*  Wi-Fi AP SSID String */
+  uint8_t wifiApSsidInfo_valid;  /**< Must be set to true if wifiApSsidInfo is being passed */
+  uint32_t wifiApSsidInfo_len;  /**< Must be set to # of elements in wifiApSsidInfo */
+  qmiLocWifiApSsidStructT_v02 wifiApSsidInfo[QMI_LOC_WIFI_AREA_ID_LIST_LENGTH_V02];
+  /**<   \vspace{4pt} \n The ordering of the Wi-Fi AP SSID list should match the Wi-Fi AP MAC address
+       list when both are provided,
+       that is, the first element of the Wi-Fi AP SSID list must be the SSID of the AP whose MAC
+       address is in the first element in the Wi-Fi AP MAC address, etc.  */
+
+  /* Optional */
+  /*  Wi-Fi AP MAC Address List for the Geofence */
+  uint8_t wifiApMacAddressList_valid;  /**< Must be set to true if wifiApMacAddressList is being passed */
+  uint32_t wifiApMacAddressList_len;  /**< Must be set to # of elements in wifiApMacAddressList */
+  qmiLocWifiApMacAddressStructT_v02 wifiApMacAddressList[QMI_LOC_WIFI_AREA_ID_LIST_LENGTH_V02];
+  /**<   The ordering of the Wi-Fi AP SSID list should match the Wi-Fi AP MAC address
+       list when both are provided,
+       that is, the first element of the Wi-Fi AP SSID list must be the SSID of the AP whose MAC
+       address is in the first element in the Wi-Fi AP MAC address, etc.  */
+
+  /* Optional */
+  /*  TDSCDMA Cell ID List for the Geofence */
+  uint8_t tdsCdmaCellIDList_valid;  /**< Must be set to true if tdsCdmaCellIDList is being passed */
+  qmiLocTDSCDMACellIdStructT_v02 tdsCdmaCellIDList[QMI_LOC_CELL_ID_LIST_LENGTH_V02];
+  /**<   \n Identifies the TDSCDMA cell on which the device is currently camped. */
+
+  /* Optional */
+  /*  WCDMA Cell ID List for the Geofence */
+  uint8_t wcdmaCellIDList_valid;  /**< Must be set to true if wcdmaCellIDList is being passed */
+  uint32_t wcdmaCellIDList_len;  /**< Must be set to # of elements in wcdmaCellIDList */
+  qmiLocWCDMACellIdStructT_v02 wcdmaCellIDList[QMI_LOC_CELL_ID_LIST_LENGTH_V02];
+  /**<   \n Identifies the WCDMA cell on which the device is currently camped. */
+
+  /* Optional */
+  /*  GSM Cell ID List for the Geofence */
+  uint8_t gsmCellIDList_valid;  /**< Must be set to true if gsmCellIDList is being passed */
+  uint32_t gsmCellIDList_len;  /**< Must be set to # of elements in gsmCellIDList */
+  qmiLocGSMCellIdStructT_v02 gsmCellIDList[QMI_LOC_CELL_ID_LIST_LENGTH_V02];
+  /**<   \n Identifies the GSM cell on which the device is currently camped. */
+
+  /* Optional */
+  /*  IBeacon List of the Geofence */
+  uint8_t iBeaconList_valid;  /**< Must be set to true if iBeaconList is being passed */
+  uint32_t iBeaconList_len;  /**< Must be set to # of elements in iBeaconList */
+  qmiLocIBeaconIdStructT_v02 iBeaconList[QMI_LOC_IBEACON_LIST_LENGTH_V02];
+}qmiLocAddGeofenceContextReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to inject the Geofence context. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Status of the Add Geofence Context Request */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Add Geofence Context request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Transaction ID */
+  uint8_t transactionId_valid;  /**< Must be set to true if transactionId is being passed */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Add Geofence Context
+       request. This parameter is always present
+       if the status field is set to SUCCESS. */
+
+  /* Optional */
+  /*  Geofence ID */
+  uint8_t geofenceId_valid;  /**< Must be set to true if geofenceId is being passed */
+  uint32_t geofenceId;
+  /**<   Geofence identifier allocated by the engine.    \n
+       If the client specifies the Geofence ID during the Add Geofence Context request,
+       the same ID is returned.    \n
+       If the client does not specify the Geofence ID during the Add Geofence Context request,
+       a new Geofence ID is created by the Geofence engine and returned. */
+
+  /* Optional */
+  /*  Context ID */
+  uint8_t contextId_valid;  /**< Must be set to true if contextId is being passed */
+  uint32_t contextId;
+  /**<   Geofence context ID allocated by the engine.
+       The context ID is generated by the Geofence engine to identify the context
+       for a particular Geofence ID.
+       The same Geofence ID may be associated with multiple contexts.  */
+}qmiLocAddGeofenceContextIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to inject the Geofence engine context. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The transaction ID
+       is returned in the Set Geofence Engine Context indication. */
+
+  /* Optional */
+  /*  UTC Timestamp of the Day */
+  uint8_t utcTimeOfDay_valid;  /**< Must be set to true if utcTimeOfDay is being passed */
+  uint64_t utcTimeOfDay;
+  /**<   The UTC time of the day.  */
+
+  /* Optional */
+  /*  Temperature of the Day in Fahrenheit */
+  uint8_t temperature_valid;  /**< Must be set to true if temperature is being passed */
+  int32_t temperature;
+  /**<   The temperature of the day in degrees Fahrenheit.  */
+}qmiLocSetGeofenceEngineContextReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to inject the Geofence engine context. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Status of the Set Geofence Engine Context Request */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Set Geofence Engine Context request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Transaction ID */
+  uint8_t transactionId_valid;  /**< Must be set to true if transactionId is being passed */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Set Geofence Engine Context
+       request. This parameter will always be present
+       if the status field is set to SUCCESS. */
+}qmiLocSetGeofenceEngineContextIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to delete the Geofence context. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Transaction ID */
+  uint32_t transactionId;
+  /**<   Identifies the transaction. The transaction ID
+       is returned in the Delete Geofence Context indication. */
+
+  /* Mandatory */
+  /*  Geofence ID */
+  uint32_t geofenceId;
+  /**<   Identifies the Geofence whose context is to be deleted.  */
+
+  /* Optional */
+  /*  Context ID */
+  uint8_t contextId_valid;  /**< Must be set to true if contextId is being passed */
+  uint32_t contextId;
+  /**<   Identifies the context associated with the Geofence to be deleted.
+       If not specified, all contexts associated with this Geofence are deleted. */
+}qmiLocDeleteGeofenceContextReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to delete the Geofence context. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Status of the Delete Geofence Context Request */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Delete Geofence Context request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Transaction ID */
+  uint8_t transactionId_valid;  /**< Must be set to true if transactionId is being passed */
+  uint32_t transactionId;
+  /**<   Transaction ID that was specified in the Delete Geofence Context request.
+       This parameter will always be present
+       if the status field is set to SUCCESS. */
+
+  /* Optional */
+  /*  Geofence ID */
+  uint8_t geofenceId_valid;  /**< Must be set to true if geofenceId is being passed */
+  uint32_t geofenceId;
+  /**<   Identifier for the Geofence whose context was deleted. */
+
+  /* Optional */
+  /*  Context ID */
+  uint8_t contextId_valid;  /**< Must be set to true if contextId is being passed */
+  uint32_t contextId;
+  /**<   Identifier for the context of the Geofence that was deleted. */
+}qmiLocDeleteGeofenceContextIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Injects Global Terrestrial Positioning (GTP) WWAN client downloaded data. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Data */
+  uint32_t ClientDownloadedData_len;  /**< Must be set to # of elements in ClientDownloadedData */
+  char ClientDownloadedData[QMI_LOC_MAX_GTP_WWAN_CLIENT_DOWNLOADED_DATA_LEN_V02];
+  /**<   WWAN client downloaded data. \n
+         - Type: Array of bytes \n
+         - Maximum length of the array: 512
+    */
+}qmiLocInjectGtpClientDownloadedDataReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Injects Global Terrestrial Positioning (GTP) WWAN client downloaded data. */
+typedef struct {
+
+  /* Mandatory */
+  /*  GTP Client Downloaded Data Injection Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the GTP client downloaded data injection.
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocInjectGtpClientDownloadedDataIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Sends a GDT upload begin response to GDT MP. */
+typedef struct {
+
+  /* Mandatory */
+  /*  GDT Service ID */
+  qmiLocGdtServiceIdEnumT_v02 serviceId;
+  /**<   Values: \n
+      - eQMI_LOC_GDT_SERVICE_WWAN (1) --  GDT service for WWAN   */
+
+  /* Mandatory */
+  /*  Session ID */
+  uint32_t sessionId;
+  /**<   Session ID. */
+
+  /* Mandatory */
+  /*  Access Status to GDT */
+  qmiLocGdtAccessStatusEnumT_v02 gdtAccessStatus;
+  /**<   GDT status information for this service ID.
+
+ Values: \n
+      - eQMI_LOC_GDT_ACCESS_ALLOWED (1) --  GDT access to the service is allowed
+      - eQMI_LOC_GDT_ACCESS_FAILED (2) --  Any type of GDT access error
+      - eQMI_LOC_GDT_ACCESS_NOT_ALLOWED (3) --  GDT access to the service is not allowed
+ */
+}qmiLocGdtUploadBeginStatusReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sends a GDT upload begin response to GDT MP. */
+typedef struct {
+
+  /* Mandatory */
+  /*  GDT Upload Begin Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the GDT begin request.
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocGdtUploadBeginStatusIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCGDTENDACKENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_GDT_ACK_SUCCESS_V02 = 1, /**<  The sent data is accepeted   */
+  eQMI_LOC_GDT_ACK_FAILED_V02 = 2, /**<  The sent data was not accepted   */
+  eQMI_LOC_GDT_ACK_INVALID_V02 = 3, /**<  General error in the received data  */
+  QMILOCGDTENDACKENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocGdtEndAckEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Sends a GDT upload end response to GDT MP. */
+typedef struct {
+
+  /* Mandatory */
+  /*  GDT Service ID */
+  qmiLocGdtServiceIdEnumT_v02 serviceId;
+  /**<   Values: \n
+
+      - eQMI_LOC_GDT_SERVICE_WWAN (1) --  GDT service for WWAN  */
+
+  /* Mandatory */
+  /*  Session ID */
+  uint32_t sessionId;
+  /**<   Session ID. */
+
+  /* Mandatory */
+  /*  Access Status to GDT */
+  qmiLocGdtEndAckEnumT_v02 gdtEndStatus;
+  /**<   GDT end status information for this service ID.
+
+ Valid values: \n
+      - eQMI_LOC_GDT_ACK_SUCCESS (1) --  The sent data is accepeted
+      - eQMI_LOC_GDT_ACK_FAILED (2) --  The sent data was not accepted
+      - eQMI_LOC_GDT_ACK_INVALID (3) --  General error in the received data
+ */
+}qmiLocGdtUploadEndReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Sends a GDT upload end response to GDT MP. */
+typedef struct {
+
+  /* Mandatory */
+  /*  UTC GDT Upload End Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the GDT upload end request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+}qmiLocGdtUploadEndIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCDBTUSAGEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_DBT_USAGE_NAVIGATION_V02 = 1, /**<  Navigation usage type  */
+  QMILOCDBTUSAGEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocDbtUsageEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCDBDISTANCETYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_DBT_DISTANCE_TYPE_STRAIGHT_LINE_V02 = 1, /**<  Straight line distance between
+       location updates   */
+  QMILOCDBDISTANCETYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocDbDistanceTypeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to initiate a Distance Based Tracking (DBT) session. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Request ID */
+  uint8_t reqId;
+  /**<   ID of the request as identified by the control point. The request ID
+       is reported back in the position reports. The control point must
+       specify the same request ID in the QMI_LOC_STOP_DBT_REQ message. \n
+       - Range: 0 to 255
+  */
+
+  /* Mandatory */
+  /*  Minimum Distance Between Position Reports */
+  uint32_t minDistance;
+  /**<   Minimum distance, specified by the control point,
+       that must be traversed between position reports. \n
+       - Units: Meters
+  */
+
+  /* Mandatory */
+  /*  Type of Distance to be Tracked */
+  qmiLocDbDistanceTypeEnumT_v02 distanceType;
+  /**<   Straight line distance or accumulated distance. \n
+
+ Valid values: \n
+      - eQMI_LOC_DBT_DISTANCE_TYPE_STRAIGHT_LINE (1) --  Straight line distance between
+       location updates
+ */
+
+  /* Mandatory */
+  /*  Need Origin Location */
+  uint8_t needOriginLocation;
+  /**<   Indicates whether the control point wants the position
+       corresponding to the origin. \begin{itemize1}
+       \item    0x01 (TRUE)  -- Control point is requesting origin
+                                location
+       \item    0x00 (FALSE) -- Control point is not requesting origin
+                                location
+       \vspace{-0.18in} \end{itemize1}
+  */
+
+  /* Optional */
+  /*  Maximum Latency Threshold for Position Reports */
+  uint8_t maxLatency_valid;  /**< Must be set to true if maxLatency is being passed */
+  uint32_t maxLatency;
+  /**<   Maximum time period, specified by the control point, after the minimum
+       distance criteria has been met within which a location update must
+       be provided. If not specified, an ideal value will be assumed by the
+       engine  \n
+       - Units: seconds
+  */
+
+  /* Optional */
+  /*  Usage Type */
+  uint8_t usageType_valid;  /**< Must be set to true if usageType is being passed */
+  qmiLocDbtUsageEnumT_v02 usageType;
+  /**<   Specifies the type of usage by the control point. It refers specifically
+ to the use case category of the client. For example, a navigation client should
+ set this to QMI_LOC_USAGE_NAVIGATION for better performance in difficult
+ signal conditions, such as tunnels.
+
+ If not specified, the service uses default algorithms to provide an ideal
+ performance.
+
+ Valid values: \n
+      - eQMI_LOC_DBT_USAGE_NAVIGATION (1) --  Navigation usage type
+ */
+}qmiLocStartDbtReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to initiate a Distance Based Tracking (DBT) session. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Start DBT Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Start DBT request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Request ID */
+  uint8_t reqId_valid;  /**< Must be set to true if reqId is being passed */
+  uint8_t reqId;
+  /**<   ID of the DBT start request for which this
+       indication was generated. */
+}qmiLocStartDbtIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Request Message; Used by the control point to stop a DBT session. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Request ID */
+  uint8_t reqId;
+  /**<   ID of the request that was specified in the Start DBT
+        request (QMI_LOC_START_DBT_REQ).\n
+       - Range: 0 to 255 */
+}qmiLocStopDbtReqMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Used by the control point to stop a DBT session. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Stop DBT Status */
+  qmiLocStatusEnumT_v02 status;
+  /**<   Status of the Stop DBT request.
+
+ Valid values: \n
+      - eQMI_LOC_SUCCESS (0) --  Request was completed successfully \n
+      - eQMI_LOC_GENERAL_FAILURE (1) --  Request failed because of a general failure \n
+      - eQMI_LOC_UNSUPPORTED (2) --  Request failed because it is not supported \n
+      - eQMI_LOC_INVALID_PARAMETER (3) --  Request failed because it contained invalid parameters \n
+      - eQMI_LOC_ENGINE_BUSY (4) --  Request failed because the engine is busy \n
+      - eQMI_LOC_PHONE_OFFLINE (5) --  Request failed because the phone is offline \n
+      - eQMI_LOC_TIMEOUT (6) --  Request failed because it timed out \n
+      - eQMI_LOC_CONFIG_NOT_SUPPORTED (7) --  Request failed because an undefined configuration was requested \n
+      - eQMI_LOC_INSUFFICIENT_MEMORY (8) --  Request failed because the engine could not allocate sufficient memory for the request \n
+      - eQMI_LOC_MAX_GEOFENCE_PROGRAMMED (9) --  Request failed because the maximum number of Geofences are already programmed \n
+      - eQMI_LOC_XTRA_VERSION_CHECK_FAILURE (10) --  Location service failed because of an XTRA version-based file format check failure
+ */
+
+  /* Optional */
+  /*  Request ID */
+  uint8_t reqId_valid;  /**< Must be set to true if reqId is being passed */
+  uint8_t reqId;
+  /**<   ID of the DBT stop request for which this
+       indication was generated. */
+}qmiLocStopDbtIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCDBTPOSITIONTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_DBT_POSITION_TYPE_ORIGIN_V02 = 1, /**<  Position reported is at the origin  */
+  eQMI_LOC_DBT_POSITION_TYPE_TRACKING_V02 = 2, /**<  Position reported is of tracking type
+       where the origin location has already
+       been reported  */
+  QMILOCDBTPOSITIONTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocDbtPositionTypeEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_aggregates
+    @{
+  */
+typedef struct {
+
+  /*  UTC Timestamp */
+  uint64_t timestampUtc;
+  /**<   UTC timestamp. \n
+       - Units: Milliseconds since Jan. 1, 1970
+  */
+
+  /*  Latitude */
+  double latitude;
+  /**<   Latitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -90.0 to 90.0       \begin{itemize1}
+         \item    Positive values indicate northern latitude
+         \item    Negative values indicate southern latitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  /*   Longitude */
+  double longitude;
+  /**<   Longitude (specified in WGS84 datum).
+       \begin{itemize1}
+       \item    Type: Floating point
+       \item    Units: Degrees
+       \item    Range: -180.0 to 180.0     \begin{itemize1}
+         \item    Positive values indicate eastern longitude
+         \item    Negative values indicate western longitude
+       \vspace{-0.18in} \end{itemize1} \end{itemize1} */
+
+  /*  Horizontal Elliptical Uncertainty (Semi-Minor Axis) */
+  float horUncEllipseSemiMinor;
+  /**<   Semi-minor axis of horizontal elliptical uncertainty.\n
+       - Units: Meters */
+
+  /*  Horizontal Elliptical Uncertainty (Semi-Major Axis) */
+  float horUncEllipseSemiMajor;
+  /**<   Semi-major axis of horizontal elliptical uncertainty.\n
+       - Units: Meters */
+
+  /*  Elliptical Horizontal Uncertainty Azimuth */
+  float horUncEllipseOrientAzimuth;
+  /**<   Elliptical horizontal uncertainty azimuth of orientation.\n
+       - Units: Decimal degrees \n
+       - Range: 0 to 180 */
+
+  /*  Horizontal Speed Validity Bit */
+  uint8_t speedHorizontal_valid;
+  /**<   Indicates whether the horizontal speed field contains valid
+       information.    \n
+       - 0x01 (TRUE)  --  Horizontal speed is valid \n
+       - 0x00 (FALSE) --  Horizontal speed is invalid
+                                 and is to be ignored \vspace{-0.18in}
+  */
+
+  /*  Horizontal Speed */
+  float speedHorizontal;
+  /**<   Horizontal speed.\n
+       - Units: Meters/second */
+
+  /*  Altitude Validity Bit */
+  uint8_t altitudeWrtEllipsoid_valid;
+  /**<   Indicates whether the altitude field contains valid
+       information.    \n
+       - 0x01 (TRUE)  --  Altitude field is valid \n
+       - 0x00 (FALSE) --  Altitude field is invalid
+                                 and is to be ignored \vspace{-0.18in}
+       */
+
+  /*  Altitude With Respect to Ellipsoid */
+  float altitudeWrtEllipsoid;
+  /**<   Altitude with respect to the WGS84 ellipsoid.\n
+       - Units: Meters \n
+       - Range: -500 to 15883 */
+
+  /*  Vertical Uncertainty Validity Bit */
+  uint8_t vertUnc_valid;
+  /**<   Indicates whether the vertical uncertainty field contains valid
+       information. \n
+       - 0x01 (TRUE)  --  Vertical Uncertainty field is valid \n
+       - 0x00 (FALSE) --  Vertical Uncertainty field is invalid
+                                 and is to be ignored \vspace{-0.18in}
+  */
+
+  /*  Vertical Uncertainty */
+  float vertUnc;
+  /**<   Vertical uncertainty.\n
+       - Units: Meters */
+
+  /*  Vertical Speed Validity Bit */
+  uint8_t speedVertical_valid;
+  /**<   Indicates whether the vertical speed field contains valid
+       information. \n
+       - 0x01 (TRUE)  --  Vertical Speed field is valid \n
+       - 0x00 (FALSE) --  Vertical Speed field is invalid
+                                 and is to be ignored \vspace{-0.18in}
+  */
+
+  /*  Vertical Speed */
+  float speedVertical;
+  /**<   Vertical speed.\n
+       - Units: Meters/second */
+
+  /*  Heading Validity Bit */
+  uint8_t heading_valid;
+  /**<   Indicates whether the heading field contains valid
+       information.    \n
+       - 0x01 (TRUE)  --  Heading field is valid \n
+       - 0x00 (FALSE) --  Heading field is invalid
+                                 and is to be ignored \vspace{-0.18in}
+  */
+
+  /*  Heading */
+  float heading;
+  /**<   Heading.\n
+        - Units: Degrees \n
+        - Range: 0 to 359.999  */
+}qmiLocDbtPositionStructT_v02;  /* Type */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Notifies the control point of
+                    a DBT position report. */
+typedef struct {
+
+  /* Mandatory */
+  /*  Request ID */
+  uint8_t reqId;
+  /**<   ID of the DBT request for which this
+       report was generated. */
+
+  /* Mandatory */
+  /*  DBT Position */
+  qmiLocDbtPositionStructT_v02 dbtPosition;
+  /**<   Position of the client when it has traversed the
+       distance specified.
+       */
+
+  /* Mandatory */
+  /*  DBT Position */
+  qmiLocDbtPositionTypeEnumT_v02 positionType;
+  /**<   Specifies if the position reported is at the
+       origin of the DBT session or during the tracking
+       duration of the session */
+
+  /* Optional */
+  /*  Heading Uncertainty */
+  uint8_t headingUnc_valid;  /**< Must be set to true if headingUnc is being passed */
+  float headingUnc;
+  /**<   Heading uncertainty.\n
+    - Units: Degrees \n
+    - Range: 0 to 359.999 */
+
+  /* Optional */
+  /*  Speed Uncertainty */
+  uint8_t speedUnc_valid;  /**< Must be set to true if speedUnc is being passed */
+  float speedUnc;
+  /**<   3-D speed uncertainty.\n
+    - Units: Meters/second */
+
+  /* Optional */
+  /*  Horizontal Confidence */
+  uint8_t horConfidence_valid;  /**< Must be set to true if horConfidence is being passed */
+  uint8_t horConfidence;
+  /**<   Horizontal uncertainty confidence.\n
+    - Units: Percent \n
+    - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Vertical Confidence */
+  uint8_t vertConfidence_valid;  /**< Must be set to true if vertConfidence is being passed */
+  uint8_t vertConfidence;
+  /**<   Vertical uncertainty confidence.\n
+    - Units: Percent \n
+    - Range: 0 to 99 */
+
+  /* Optional */
+  /*  Dilution of Precision */
+  uint8_t DOP_valid;  /**< Must be set to true if DOP is being passed */
+  qmiLocDOPStructT_v02 DOP;
+  /**<   \vspace{0.06in} \n Dilution of precision associated with this position. */
+
+  /* Optional */
+  /*  SVs Used to Calculate the Fix */
+  uint8_t gnssSvUsedList_valid;  /**< Must be set to true if gnssSvUsedList is being passed */
+  uint32_t gnssSvUsedList_len;  /**< Must be set to # of elements in gnssSvUsedList */
+  uint16_t gnssSvUsedList[QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02];
+  /**<   Each entry in the list contains the SV ID of a satellite
+   used for calculating this position report. The following
+   information is associated with each SV ID: \n
+   Range:    \n
+   - For GPS:     1 to 32 \n
+   - For SBAS:    33 to 64 \n
+   - For GLONASS: 65 to 96 \n
+   - For QZSS:    193 to 197 \n
+   - For BDS:     201 to 237
+  */
+}qmiLocEventDbtPositionReportIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_enums
+    @{
+  */
+typedef enum {
+  QMILOCDBTSESSIONSTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum.  Do not change or use*/
+  eQMI_LOC_DBT_UNABLE_TO_TRACK_V02 = 1, /**<  Distance based tracking  is unavailable and DBT fixes
+       cannot currently be obtained  */
+  eQMI_LOC_DBT_ABLE_TO_TRACK_V02 = 2, /**<  Distance based tracking  is available and DBT fixes
+       can currently be obtained  */
+  QMILOCDBTSESSIONSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum.  Do not change or use*/
+}qmiLocDbtSessionStatusEnumT_v02;
+/**
+    @}
+  */
+
+/** @addtogroup loc_qmi_messages
+    @{
+  */
+/** Indication Message; Notifies the control point of the
+                    DBT session status. */
+typedef struct {
+
+  /* Mandatory */
+  /*  DBT Session Status */
+  qmiLocDbtSessionStatusEnumT_v02 dbtSessionStatus;
+  /**<   Specifies the DBT session status type.
+
+ Valid values: \n
+      - eQMI_LOC_DBT_UNABLE_TO_TRACK (1) --  Distance based tracking  is unavailable and DBT fixes
+       cannot currently be obtained
+      - eQMI_LOC_DBT_ABLE_TO_TRACK (2) --  Distance based tracking  is available and DBT fixes
+       can currently be obtained
+ */
+
+  /* Optional */
+  /*  Request ID */
+  uint8_t reqId_valid;  /**< Must be set to true if reqId is being passed */
+  uint8_t reqId;
+  /**<   ID of the DBT request for which this
+       status was generated. */
+}qmiLocEventDbtSessionStatusIndMsgT_v02;  /* Message */
+/**
+    @}
+  */
+
+/* Conditional compilation tags for message removal */
+//#define REMOVE_QMI_LOC_ADD_CIRCULAR_GEOFENCE_V02
+//#define REMOVE_QMI_LOC_ADD_GEOFENCE_CONTEXT_V02
+//#define REMOVE_QMI_LOC_DELETE_ASSIST_DATA_V02
+//#define REMOVE_QMI_LOC_DELETE_GEOFENCE_V02
+//#define REMOVE_QMI_LOC_DELETE_GEOFENCE_CONTEXT_V02
+//#define REMOVE_QMI_LOC_DELETE_SUPL_CERTIFICATE_V02
+//#define REMOVE_QMI_LOC_EDIT_GEOFENCE_V02
+//#define REMOVE_QMI_LOC_EVENT_BATCH_FULL_NOTIFICATION_V02
+//#define REMOVE_QMI_LOC_EVENT_DBT_POSITION_REPORT_V02
+//#define REMOVE_QMI_LOC_EVENT_DBT_SESSION_STATUS_V02
+//#define REMOVE_QMI_LOC_EVENT_ENGINE_STATE_V02
+//#define REMOVE_QMI_LOC_EVENT_FIX_SESSION_STATE_V02
+//#define REMOVE_QMI_LOC_EVENT_GDT_UPLOAD_BEGIN_STATUS_REQ_V02
+//#define REMOVE_QMI_LOC_EVENT_GDT_UPLOAD_END_REQ_V02
+//#define REMOVE_QMI_LOC_EVENT_GEOFENCE_BATCHED_BREACH_NOTIFICATION_V02
+//#define REMOVE_QMI_LOC_EVENT_GEOFENCE_BATCHED_DWELL_NOTIFICATION_V02
+//#define REMOVE_QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_V02
+//#define REMOVE_QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_V02
+//#define REMOVE_QMI_LOC_EVENT_GEOFENCE_PROXIMITY_NOTIFICATION_V02
+//#define REMOVE_QMI_LOC_EVENT_GET_TIME_ZONE_INFO_V02
+//#define REMOVE_QMI_LOC_EVENT_GNSS_MEASUREMENT_REPORT_IND_V02
+//#define REMOVE_QMI_LOC_EVENT_GNSS_SV_INFO_V02
+//#define REMOVE_QMI_LOC_EVENT_INJECT_POSITION_REQ_V02
+//#define REMOVE_QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_V02
+//#define REMOVE_QMI_LOC_EVENT_INJECT_TIME_REQ_V02
+//#define REMOVE_QMI_LOC_EVENT_INJECT_WIFI_AP_DATA_REQ_V02
+//#define REMOVE_QMI_LOC_EVENT_LIVE_BATCHED_POSITION_REPORT_V02
+//#define REMOVE_QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_V02
+//#define REMOVE_QMI_LOC_EVENT_MOTION_DATA_CONTROL_V02
+//#define REMOVE_QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_V02
+//#define REMOVE_QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_V02
+//#define REMOVE_QMI_LOC_EVENT_NMEA_V02
+//#define REMOVE_QMI_LOC_EVENT_PEDOMETER_CONTROL_V02
+//#define REMOVE_QMI_LOC_EVENT_POSITION_REPORT_V02
+//#define REMOVE_QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_V02
+//#define REMOVE_QMI_LOC_EVENT_SET_SPI_STREAMING_REPORT_V02
+//#define REMOVE_QMI_LOC_EVENT_SV_POLYNOMIAL_REPORT_IND_V02
+//#define REMOVE_QMI_LOC_EVENT_TIME_SYNC_REQ_V02
+//#define REMOVE_QMI_LOC_EVENT_VEHICLE_DATA_READY_STATUS_V02
+//#define REMOVE_QMI_LOC_EVENT_WIFI_REQ_V02
+//#define REMOVE_QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_V02
+//#define REMOVE_QMI_LOC_GDT_UPLOAD_END_V02
+//#define REMOVE_QMI_LOC_GET_AVAILABLE_WWAN_POSITION_V02
+//#define REMOVE_QMI_LOC_GET_BATCH_SIZE_V02
+//#define REMOVE_QMI_LOC_GET_BEST_AVAILABLE_POSITION_V02
+//#define REMOVE_QMI_LOC_GET_CRADLE_MOUNT_CONFIG_V02
+//#define REMOVE_QMI_LOC_GET_ENGINE_LOCK_V02
+//#define REMOVE_QMI_LOC_GET_EXTERNAL_POWER_CONFIG_V02
+//#define REMOVE_QMI_LOC_GET_FIX_CRITERIA_V02
+//#define REMOVE_QMI_LOC_GET_GEOFENCE_ENGINE_CONFIG_V02
+//#define REMOVE_QMI_LOC_GET_LOW_POWER_MODE_V02
+//#define REMOVE_QMI_LOC_GET_NI_GEOFENCE_ID_LIST_V02
+//#define REMOVE_QMI_LOC_GET_NMEA_TYPES_V02
+//#define REMOVE_QMI_LOC_GET_OPERATION_MODE_V02
+//#define REMOVE_QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_V02
+//#define REMOVE_QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_V02
+//#define REMOVE_QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_V02
+//#define REMOVE_QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_V02
+//#define REMOVE_QMI_LOC_GET_REGISTERED_EVENTS_V02
+//#define REMOVE_QMI_LOC_GET_SBAS_CONFIG_V02
+//#define REMOVE_QMI_LOC_GET_SENSOR_CONTROL_CONFIG_V02
+//#define REMOVE_QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_V02
+//#define REMOVE_QMI_LOC_GET_SENSOR_PROPERTIES_V02
+//#define REMOVE_QMI_LOC_GET_SERVER_V02
+//#define REMOVE_QMI_LOC_GET_SERVICE_REVISION_V02
+//#define REMOVE_QMI_LOC_GET_SUPPORTED_FIELDS_V02
+//#define REMOVE_QMI_LOC_GET_SUPPORTED_MSGS_V02
+//#define REMOVE_QMI_LOC_GET_XTRA_T_SESSION_CONTROL_V02
+//#define REMOVE_QMI_LOC_INFORM_CLIENT_REVISION_V02
+//#define REMOVE_QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_V02
+//#define REMOVE_QMI_LOC_INFORM_NI_USER_RESPONSE_V02
+//#define REMOVE_QMI_LOC_INJECT_GSM_CELL_INFO_V02
+//#define REMOVE_QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_V02
+//#define REMOVE_QMI_LOC_INJECT_MOTION_DATA_V02
+//#define REMOVE_QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_V02
+//#define REMOVE_QMI_LOC_INJECT_POSITION_V02
+//#define REMOVE_QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_V02
+//#define REMOVE_QMI_LOC_INJECT_SENSOR_DATA_V02
+//#define REMOVE_QMI_LOC_INJECT_SUBSCRIBER_ID_V02
+//#define REMOVE_QMI_LOC_INJECT_SUPL_CERTIFICATE_V02
+//#define REMOVE_QMI_LOC_INJECT_TDSCDMA_CELL_INFO_V02
+//#define REMOVE_QMI_LOC_INJECT_TIME_SYNC_DATA_V02
+//#define REMOVE_QMI_LOC_INJECT_TIME_ZONE_INFO_V02
+//#define REMOVE_QMI_LOC_INJECT_UTC_TIME_V02
+//#define REMOVE_QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_V02
+//#define REMOVE_QMI_LOC_INJECT_WCDMA_CELL_INFO_V02
+//#define REMOVE_QMI_LOC_INJECT_WIFI_AP_DATA_V02
+//#define REMOVE_QMI_LOC_INJECT_WIFI_POSITION_V02
+//#define REMOVE_QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_V02
+//#define REMOVE_QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_V02
+//#define REMOVE_QMI_LOC_NOTIFY_WIFI_STATUS_V02
+//#define REMOVE_QMI_LOC_PEDOMETER_REPORT_V02
+//#define REMOVE_QMI_LOC_QUERY_GEOFENCE_V02
+//#define REMOVE_QMI_LOC_READ_FROM_BATCH_V02
+//#define REMOVE_QMI_LOC_REG_EVENTS_V02
+//#define REMOVE_QMI_LOC_RELEASE_BATCH_V02
+//#define REMOVE_QMI_LOC_SET_CRADLE_MOUNT_CONFIG_V02
+//#define REMOVE_QMI_LOC_SET_ENGINE_LOCK_V02
+//#define REMOVE_QMI_LOC_SET_EXTERNAL_POWER_CONFIG_V02
+//#define REMOVE_QMI_LOC_SET_GEOFENCE_ENGINE_CONFIG_V02
+//#define REMOVE_QMI_LOC_SET_GEOFENCE_ENGINE_CONTEXT_V02
+//#define REMOVE_QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_V02
+//#define REMOVE_QMI_LOC_SET_LOW_POWER_MODE_V02
+//#define REMOVE_QMI_LOC_SET_NMEA_TYPES_V02
+//#define REMOVE_QMI_LOC_SET_OPERATION_MODE_V02
+//#define REMOVE_QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_V02
+//#define REMOVE_QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_V02
+//#define REMOVE_QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_V02
+//#define REMOVE_QMI_LOC_SET_SBAS_CONFIG_V02
+//#define REMOVE_QMI_LOC_SET_SENSOR_CONTROL_CONFIG_V02
+//#define REMOVE_QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_V02
+//#define REMOVE_QMI_LOC_SET_SENSOR_PROPERTIES_V02
+//#define REMOVE_QMI_LOC_SET_SERVER_V02
+//#define REMOVE_QMI_LOC_SET_SPI_STATUS_V02
+//#define REMOVE_QMI_LOC_SET_XTRA_T_SESSION_CONTROL_V02
+//#define REMOVE_QMI_LOC_SET_XTRA_VERSION_CHECK_V02
+//#define REMOVE_QMI_LOC_START_V02
+//#define REMOVE_QMI_LOC_START_BATCHING_V02
+//#define REMOVE_QMI_LOC_START_DBT_V02
+//#define REMOVE_QMI_LOC_STOP_V02
+//#define REMOVE_QMI_LOC_STOP_BATCHING_V02
+//#define REMOVE_QMI_LOC_STOP_DBT_V02
+//#define REMOVE_QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_V02
+
+/*Service Message Definition*/
+/** @addtogroup loc_qmi_msg_ids
+    @{
+  */
+#define QMI_LOC_GET_SUPPORTED_MSGS_REQ_V02 0x001E
+#define QMI_LOC_GET_SUPPORTED_MSGS_RESP_V02 0x001E
+#define QMI_LOC_GET_SUPPORTED_FIELDS_REQ_V02 0x001F
+#define QMI_LOC_GET_SUPPORTED_FIELDS_RESP_V02 0x001F
+#define QMI_LOC_INFORM_CLIENT_REVISION_REQ_V02 0x0020
+#define QMI_LOC_INFORM_CLIENT_REVISION_RESP_V02 0x0020
+#define QMI_LOC_REG_EVENTS_REQ_V02 0x0021
+#define QMI_LOC_REG_EVENTS_RESP_V02 0x0021
+#define QMI_LOC_START_REQ_V02 0x0022
+#define QMI_LOC_START_RESP_V02 0x0022
+#define QMI_LOC_STOP_REQ_V02 0x0023
+#define QMI_LOC_STOP_RESP_V02 0x0023
+#define QMI_LOC_EVENT_POSITION_REPORT_IND_V02 0x0024
+#define QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02 0x0025
+#define QMI_LOC_EVENT_NMEA_IND_V02 0x0026
+#define QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02 0x0027
+#define QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02 0x0028
+#define QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02 0x0029
+#define QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02 0x002A
+#define QMI_LOC_EVENT_ENGINE_STATE_IND_V02 0x002B
+#define QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02 0x002C
+#define QMI_LOC_EVENT_WIFI_REQ_IND_V02 0x002D
+#define QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_IND_V02 0x002E
+#define QMI_LOC_EVENT_TIME_SYNC_REQ_IND_V02 0x002F
+#define QMI_LOC_EVENT_SET_SPI_STREAMING_REPORT_IND_V02 0x0030
+#define QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02 0x0031
+#define QMI_LOC_GET_SERVICE_REVISION_REQ_V02 0x0032
+#define QMI_LOC_GET_SERVICE_REVISION_RESP_V02 0x0032
+#define QMI_LOC_GET_SERVICE_REVISION_IND_V02 0x0032
+#define QMI_LOC_GET_FIX_CRITERIA_REQ_V02 0x0033
+#define QMI_LOC_GET_FIX_CRITERIA_RESP_V02 0x0033
+#define QMI_LOC_GET_FIX_CRITERIA_IND_V02 0x0033
+#define QMI_LOC_NI_USER_RESPONSE_REQ_V02 0x0034
+#define QMI_LOC_NI_USER_RESPONSE_RESP_V02 0x0034
+#define QMI_LOC_NI_USER_RESPONSE_IND_V02 0x0034
+#define QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02 0x0035
+#define QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_RESP_V02 0x0035
+#define QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02 0x0035
+#define QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_REQ_V02 0x0036
+#define QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_RESP_V02 0x0036
+#define QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_IND_V02 0x0036
+#define QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_REQ_V02 0x0037
+#define QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_RESP_V02 0x0037
+#define QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_IND_V02 0x0037
+#define QMI_LOC_INJECT_UTC_TIME_REQ_V02 0x0038
+#define QMI_LOC_INJECT_UTC_TIME_RESP_V02 0x0038
+#define QMI_LOC_INJECT_UTC_TIME_IND_V02 0x0038
+#define QMI_LOC_INJECT_POSITION_REQ_V02 0x0039
+#define QMI_LOC_INJECT_POSITION_RESP_V02 0x0039
+#define QMI_LOC_INJECT_POSITION_IND_V02 0x0039
+#define QMI_LOC_SET_ENGINE_LOCK_REQ_V02 0x003A
+#define QMI_LOC_SET_ENGINE_LOCK_RESP_V02 0x003A
+#define QMI_LOC_SET_ENGINE_LOCK_IND_V02 0x003A
+#define QMI_LOC_GET_ENGINE_LOCK_REQ_V02 0x003B
+#define QMI_LOC_GET_ENGINE_LOCK_RESP_V02 0x003B
+#define QMI_LOC_GET_ENGINE_LOCK_IND_V02 0x003B
+#define QMI_LOC_SET_SBAS_CONFIG_REQ_V02 0x003C
+#define QMI_LOC_SET_SBAS_CONFIG_RESP_V02 0x003C
+#define QMI_LOC_SET_SBAS_CONFIG_IND_V02 0x003C
+#define QMI_LOC_GET_SBAS_CONFIG_REQ_V02 0x003D
+#define QMI_LOC_GET_SBAS_CONFIG_RESP_V02 0x003D
+#define QMI_LOC_GET_SBAS_CONFIG_IND_V02 0x003D
+#define QMI_LOC_SET_NMEA_TYPES_REQ_V02 0x003E
+#define QMI_LOC_SET_NMEA_TYPES_RESP_V02 0x003E
+#define QMI_LOC_SET_NMEA_TYPES_IND_V02 0x003E
+#define QMI_LOC_GET_NMEA_TYPES_REQ_V02 0x003F
+#define QMI_LOC_GET_NMEA_TYPES_RESP_V02 0x003F
+#define QMI_LOC_GET_NMEA_TYPES_IND_V02 0x003F
+#define QMI_LOC_SET_LOW_POWER_MODE_REQ_V02 0x0040
+#define QMI_LOC_SET_LOW_POWER_MODE_RESP_V02 0x0040
+#define QMI_LOC_SET_LOW_POWER_MODE_IND_V02 0x0040
+#define QMI_LOC_GET_LOW_POWER_MODE_REQ_V02 0x0041
+#define QMI_LOC_GET_LOW_POWER_MODE_RESP_V02 0x0041
+#define QMI_LOC_GET_LOW_POWER_MODE_IND_V02 0x0041
+#define QMI_LOC_SET_SERVER_REQ_V02 0x0042
+#define QMI_LOC_SET_SERVER_RESP_V02 0x0042
+#define QMI_LOC_SET_SERVER_IND_V02 0x0042
+#define QMI_LOC_GET_SERVER_REQ_V02 0x0043
+#define QMI_LOC_GET_SERVER_RESP_V02 0x0043
+#define QMI_LOC_GET_SERVER_IND_V02 0x0043
+#define QMI_LOC_DELETE_ASSIST_DATA_REQ_V02 0x0044
+#define QMI_LOC_DELETE_ASSIST_DATA_RESP_V02 0x0044
+#define QMI_LOC_DELETE_ASSIST_DATA_IND_V02 0x0044
+#define QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02 0x0045
+#define QMI_LOC_SET_XTRA_T_SESSION_CONTROL_RESP_V02 0x0045
+#define QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02 0x0045
+#define QMI_LOC_GET_XTRA_T_SESSION_CONTROL_REQ_V02 0x0046
+#define QMI_LOC_GET_XTRA_T_SESSION_CONTROL_RESP_V02 0x0046
+#define QMI_LOC_GET_XTRA_T_SESSION_CONTROL_IND_V02 0x0046
+#define QMI_LOC_INJECT_WIFI_POSITION_REQ_V02 0x0047
+#define QMI_LOC_INJECT_WIFI_POSITION_RESP_V02 0x0047
+#define QMI_LOC_INJECT_WIFI_POSITION_IND_V02 0x0047
+#define QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02 0x0048
+#define QMI_LOC_NOTIFY_WIFI_STATUS_RESP_V02 0x0048
+#define QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02 0x0048
+#define QMI_LOC_GET_REGISTERED_EVENTS_REQ_V02 0x0049
+#define QMI_LOC_GET_REGISTERED_EVENTS_RESP_V02 0x0049
+#define QMI_LOC_GET_REGISTERED_EVENTS_IND_V02 0x0049
+#define QMI_LOC_SET_OPERATION_MODE_REQ_V02 0x004A
+#define QMI_LOC_SET_OPERATION_MODE_RESP_V02 0x004A
+#define QMI_LOC_SET_OPERATION_MODE_IND_V02 0x004A
+#define QMI_LOC_GET_OPERATION_MODE_REQ_V02 0x004B
+#define QMI_LOC_GET_OPERATION_MODE_RESP_V02 0x004B
+#define QMI_LOC_GET_OPERATION_MODE_IND_V02 0x004B
+#define QMI_LOC_SET_SPI_STATUS_REQ_V02 0x004C
+#define QMI_LOC_SET_SPI_STATUS_RESP_V02 0x004C
+#define QMI_LOC_SET_SPI_STATUS_IND_V02 0x004C
+#define QMI_LOC_INJECT_SENSOR_DATA_REQ_V02 0x004D
+#define QMI_LOC_INJECT_SENSOR_DATA_RESP_V02 0x004D
+#define QMI_LOC_INJECT_SENSOR_DATA_IND_V02 0x004D
+#define QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02 0x004E
+#define QMI_LOC_INJECT_TIME_SYNC_DATA_RESP_V02 0x004E
+#define QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02 0x004E
+#define QMI_LOC_SET_CRADLE_MOUNT_CONFIG_REQ_V02 0x004F
+#define QMI_LOC_SET_CRADLE_MOUNT_CONFIG_RESP_V02 0x004F
+#define QMI_LOC_SET_CRADLE_MOUNT_CONFIG_IND_V02 0x004F
+#define QMI_LOC_GET_CRADLE_MOUNT_CONFIG_REQ_V02 0x0050
+#define QMI_LOC_GET_CRADLE_MOUNT_CONFIG_RESP_V02 0x0050
+#define QMI_LOC_GET_CRADLE_MOUNT_CONFIG_IND_V02 0x0050
+#define QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02 0x0051
+#define QMI_LOC_SET_EXTERNAL_POWER_CONFIG_RESP_V02 0x0051
+#define QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02 0x0051
+#define QMI_LOC_GET_EXTERNAL_POWER_CONFIG_REQ_V02 0x0052
+#define QMI_LOC_GET_EXTERNAL_POWER_CONFIG_RESP_V02 0x0052
+#define QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02 0x0052
+#define QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02 0x0053
+#define QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_RESP_V02 0x0053
+#define QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02 0x0053
+#define QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02 0x0054
+#define QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_RESP_V02 0x0054
+#define QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02 0x0054
+#define QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02 0x0055
+#define QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_RESP_V02 0x0055
+#define QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02 0x0055
+#define QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02 0x0056
+#define QMI_LOC_SET_SENSOR_CONTROL_CONFIG_RESP_V02 0x0056
+#define QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02 0x0056
+#define QMI_LOC_GET_SENSOR_CONTROL_CONFIG_REQ_V02 0x0057
+#define QMI_LOC_GET_SENSOR_CONTROL_CONFIG_RESP_V02 0x0057
+#define QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02 0x0057
+#define QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02 0x0058
+#define QMI_LOC_SET_SENSOR_PROPERTIES_RESP_V02 0x0058
+#define QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02 0x0058
+#define QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02 0x0059
+#define QMI_LOC_GET_SENSOR_PROPERTIES_RESP_V02 0x0059
+#define QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02 0x0059
+#define QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02 0x005A
+#define QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_RESP_V02 0x005A
+#define QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02 0x005A
+#define QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02 0x005B
+#define QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_RESP_V02 0x005B
+#define QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02 0x005B
+#define QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02 0x005C
+#define QMI_LOC_INJECT_SUPL_CERTIFICATE_RESP_V02 0x005C
+#define QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02 0x005C
+#define QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02 0x005D
+#define QMI_LOC_DELETE_SUPL_CERTIFICATE_RESP_V02 0x005D
+#define QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02 0x005D
+#define QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02 0x005E
+#define QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_RESP_V02 0x005E
+#define QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02 0x005E
+#define QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02 0x005F
+#define QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_RESP_V02 0x005F
+#define QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02 0x005F
+#define QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_IND_V02 0x0060
+#define QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_IND_V02 0x0061
+#define QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_IND_V02 0x0062
+#define QMI_LOC_ADD_CIRCULAR_GEOFENCE_REQ_V02 0x0063
+#define QMI_LOC_ADD_CIRCULAR_GEOFENCE_RESP_V02 0x0063
+#define QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02 0x0063
+#define QMI_LOC_DELETE_GEOFENCE_REQ_V02 0x0064
+#define QMI_LOC_DELETE_GEOFENCE_RESP_V02 0x0064
+#define QMI_LOC_DELETE_GEOFENCE_IND_V02 0x0064
+#define QMI_LOC_QUERY_GEOFENCE_REQ_V02 0x0065
+#define QMI_LOC_QUERY_GEOFENCE_RESP_V02 0x0065
+#define QMI_LOC_QUERY_GEOFENCE_IND_V02 0x0065
+#define QMI_LOC_EDIT_GEOFENCE_REQ_V02 0x0066
+#define QMI_LOC_EDIT_GEOFENCE_RESP_V02 0x0066
+#define QMI_LOC_EDIT_GEOFENCE_IND_V02 0x0066
+#define QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02 0x0067
+#define QMI_LOC_GET_BEST_AVAILABLE_POSITION_RESP_V02 0x0067
+#define QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02 0x0067
+#define QMI_LOC_INJECT_MOTION_DATA_REQ_V02 0x0068
+#define QMI_LOC_INJECT_MOTION_DATA_RESP_V02 0x0068
+#define QMI_LOC_INJECT_MOTION_DATA_IND_V02 0x0068
+#define QMI_LOC_GET_NI_GEOFENCE_ID_LIST_REQ_V02 0x0069
+#define QMI_LOC_GET_NI_GEOFENCE_ID_LIST_RESP_V02 0x0069
+#define QMI_LOC_GET_NI_GEOFENCE_ID_LIST_IND_V02 0x0069
+#define QMI_LOC_INJECT_GSM_CELL_INFO_REQ_V02 0x006A
+#define QMI_LOC_INJECT_GSM_CELL_INFO_RESP_V02 0x006A
+#define QMI_LOC_INJECT_GSM_CELL_INFO_IND_V02 0x006A
+#define QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_REQ_V02 0x006B
+#define QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_RESP_V02 0x006B
+#define QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_IND_V02 0x006B
+#define QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_REQ_V02 0x006C
+#define QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_RESP_V02 0x006C
+#define QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_IND_V02 0x006C
+#define QMI_LOC_EVENT_PEDOMETER_CONTROL_IND_V02 0x006D
+#define QMI_LOC_EVENT_MOTION_DATA_CONTROL_IND_V02 0x006E
+#define QMI_LOC_PEDOMETER_REPORT_REQ_V02 0x006F
+#define QMI_LOC_PEDOMETER_REPORT_RESP_V02 0x006F
+#define QMI_LOC_PEDOMETER_REPORT_IND_V02 0x006F
+#define QMI_LOC_INJECT_WCDMA_CELL_INFO_REQ_V02 0x0070
+#define QMI_LOC_INJECT_WCDMA_CELL_INFO_RESP_V02 0x0070
+#define QMI_LOC_INJECT_WCDMA_CELL_INFO_IND_V02 0x0070
+#define QMI_LOC_INJECT_TDSCDMA_CELL_INFO_REQ_V02 0x0071
+#define QMI_LOC_INJECT_TDSCDMA_CELL_INFO_RESP_V02 0x0071
+#define QMI_LOC_INJECT_TDSCDMA_CELL_INFO_IND_V02 0x0071
+#define QMI_LOC_INJECT_SUBSCRIBER_ID_REQ_V02 0x0072
+#define QMI_LOC_INJECT_SUBSCRIBER_ID_RESP_V02 0x0072
+#define QMI_LOC_INJECT_SUBSCRIBER_ID_IND_V02 0x0072
+#define QMI_LOC_SET_GEOFENCE_ENGINE_CONFIG_REQ_V02 0x0073
+#define QMI_LOC_SET_GEOFENCE_ENGINE_CONFIG_RESP_V02 0x0073
+#define QMI_LOC_SET_GEOFENCE_ENGINE_CONFIG_IND_V02 0x0073
+#define QMI_LOC_GET_GEOFENCE_ENGINE_CONFIG_REQ_V02 0x0074
+#define QMI_LOC_GET_GEOFENCE_ENGINE_CONFIG_RESP_V02 0x0074
+#define QMI_LOC_GET_GEOFENCE_ENGINE_CONFIG_IND_V02 0x0074
+#define QMI_LOC_GET_BATCH_SIZE_REQ_V02 0x0075
+#define QMI_LOC_GET_BATCH_SIZE_RESP_V02 0x0075
+#define QMI_LOC_GET_BATCH_SIZE_IND_V02 0x0075
+#define QMI_LOC_START_BATCHING_REQ_V02 0x0076
+#define QMI_LOC_START_BATCHING_RESP_V02 0x0076
+#define QMI_LOC_START_BATCHING_IND_V02 0x0076
+#define QMI_LOC_EVENT_BATCH_FULL_NOTIFICATION_IND_V02 0x0077
+#define QMI_LOC_EVENT_LIVE_BATCHED_POSITION_REPORT_IND_V02 0x0078
+#define QMI_LOC_READ_FROM_BATCH_REQ_V02 0x0079
+#define QMI_LOC_READ_FROM_BATCH_RESP_V02 0x0079
+#define QMI_LOC_READ_FROM_BATCH_IND_V02 0x0079
+#define QMI_LOC_STOP_BATCHING_REQ_V02 0x007A
+#define QMI_LOC_STOP_BATCHING_RESP_V02 0x007A
+#define QMI_LOC_STOP_BATCHING_IND_V02 0x007A
+#define QMI_LOC_RELEASE_BATCH_REQ_V02 0x007B
+#define QMI_LOC_RELEASE_BATCH_RESP_V02 0x007B
+#define QMI_LOC_RELEASE_BATCH_IND_V02 0x007B
+#define QMI_LOC_EVENT_INJECT_WIFI_AP_DATA_REQ_IND_V02 0x007C
+#define QMI_LOC_INJECT_WIFI_AP_DATA_REQ_V02 0x007D
+#define QMI_LOC_INJECT_WIFI_AP_DATA_RESP_V02 0x007D
+#define QMI_LOC_INJECT_WIFI_AP_DATA_IND_V02 0x007D
+#define QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_REQ_V02 0x007E
+#define QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_RESP_V02 0x007E
+#define QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_IND_V02 0x007E
+#define QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_REQ_V02 0x007F
+#define QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_RESP_V02 0x007F
+#define QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_IND_V02 0x007F
+#define QMI_LOC_EVENT_GEOFENCE_BATCHED_BREACH_NOTIFICATION_IND_V02 0x0080
+#define QMI_LOC_EVENT_VEHICLE_DATA_READY_STATUS_IND_V02 0x0081
+#define QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_REQ_V02 0x0082
+#define QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_RESP_V02 0x0082
+#define QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_IND_V02 0x0082
+#define QMI_LOC_GET_AVAILABLE_WWAN_POSITION_REQ_V02 0x0083
+#define QMI_LOC_GET_AVAILABLE_WWAN_POSITION_RESP_V02 0x0083
+#define QMI_LOC_GET_AVAILABLE_WWAN_POSITION_IND_V02 0x0083
+#define QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_REQ_V02 0x0084
+#define QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_RESP_V02 0x0084
+#define QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_IND_V02 0x0084
+#define QMI_LOC_SET_XTRA_VERSION_CHECK_REQ_V02 0x0085
+#define QMI_LOC_SET_XTRA_VERSION_CHECK_RESP_V02 0x0085
+#define QMI_LOC_SET_XTRA_VERSION_CHECK_IND_V02 0x0085
+#define QMI_LOC_EVENT_GNSS_MEASUREMENT_REPORT_IND_V02 0x0086
+#define QMI_LOC_EVENT_SV_POLYNOMIAL_REPORT_IND_V02 0x0087
+#define QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_V02 0x0088
+#define QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_RESP_V02 0x0088
+#define QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_IND_V02 0x0088
+#define QMI_LOC_ADD_GEOFENCE_CONTEXT_REQ_V02 0x0089
+#define QMI_LOC_ADD_GEOFENCE_CONTEXT_RESP_V02 0x0089
+#define QMI_LOC_ADD_GEOFENCE_CONTEXT_IND_V02 0x0089
+#define QMI_LOC_SET_GEOFENCE_ENGINE_CONTEXT_REQ_V02 0x008A
+#define QMI_LOC_SET_GEOFENCE_ENGINE_CONTEXT_RESP_V02 0x008A
+#define QMI_LOC_SET_GEOFENCE_ENGINE_CONTEXT_IND_V02 0x008A
+#define QMI_LOC_DELETE_GEOFENCE_CONTEXT_REQ_V02 0x008B
+#define QMI_LOC_DELETE_GEOFENCE_CONTEXT_RESP_V02 0x008B
+#define QMI_LOC_DELETE_GEOFENCE_CONTEXT_IND_V02 0x008B
+#define QMI_LOC_EVENT_GEOFENCE_PROXIMITY_NOTIFICATION_IND_V02 0x008C
+#define QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_REQ_V02 0x008D
+#define QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_RESP_V02 0x008D
+#define QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_IND_V02 0x008D
+#define QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_REQ_V02 0x008E
+#define QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_RESP_V02 0x008E
+#define QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_IND_V02 0x008E
+#define QMI_LOC_GDT_UPLOAD_END_REQ_V02 0x008F
+#define QMI_LOC_GDT_UPLOAD_END_RESP_V02 0x008F
+#define QMI_LOC_GDT_UPLOAD_END_IND_V02 0x008F
+#define QMI_LOC_EVENT_GDT_UPLOAD_BEGIN_STATUS_REQ_IND_V02 0x0090
+#define QMI_LOC_EVENT_GDT_UPLOAD_END_REQ_IND_V02 0x0091
+#define QMI_LOC_START_DBT_REQ_V02 0x0092
+#define QMI_LOC_START_DBT_RESP_V02 0x0092
+#define QMI_LOC_START_DBT_IND_V02 0x0092
+#define QMI_LOC_EVENT_DBT_POSITION_REPORT_IND_V02 0x0093
+#define QMI_LOC_EVENT_DBT_SESSION_STATUS_IND_V02 0x0094
+#define QMI_LOC_STOP_DBT_REQ_V02 0x0095
+#define QMI_LOC_STOP_DBT_RESP_V02 0x0095
+#define QMI_LOC_STOP_DBT_IND_V02 0x0095
+#define QMI_LOC_EVENT_GEOFENCE_BATCHED_DWELL_NOTIFICATION_IND_V02 0x0096
+#define QMI_LOC_EVENT_GET_TIME_ZONE_INFO_IND_V02 0x0097
+#define QMI_LOC_INJECT_TIME_ZONE_INFO_REQ_V02 0x0098
+#define QMI_LOC_INJECT_TIME_ZONE_INFO_RESP_V02 0x0098
+#define QMI_LOC_INJECT_TIME_ZONE_INFO_IND_V02 0x0098
+/**
+    @}
+  */
+
+/* Service Object Accessor */
+/** @addtogroup wms_qmi_accessor
+    @{
+  */
+/** This function is used internally by the autogenerated code.  Clients should use the
+   macro loc_get_service_object_v02( ) that takes in no arguments. */
+qmi_idl_service_object_type loc_get_service_object_internal_v02
+ ( int32_t idl_maj_version, int32_t idl_min_version, int32_t library_version );
+
+/** This macro should be used to get the service object */
+#define loc_get_service_object_v02( ) \
+          loc_get_service_object_internal_v02( \
+            LOC_V02_IDL_MAJOR_VERS, LOC_V02_IDL_MINOR_VERS, \
+            LOC_V02_IDL_TOOL_VERS )
+/**
+    @}
+  */
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
diff --git a/gps/platform_lib_abstractions/elapsed_millis_since_boot.cpp b/gps/platform_lib_abstractions/elapsed_millis_since_boot.cpp
new file mode 100644
index 0000000..e8cb93a
--- /dev/null
+++ b/gps/platform_lib_abstractions/elapsed_millis_since_boot.cpp
@@ -0,0 +1,46 @@
+/* Copyright (c) 2013, 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.
+ */
+
+#include <stdlib.h>
+#include <sys/time.h>
+#include "platform_lib_time.h"
+
+int64_t systemTime(int clock)
+{
+    struct timeval t;
+    t.tv_sec = t.tv_usec = 0;
+    gettimeofday(&t, NULL);
+    return t.tv_sec*1000000LL + t.tv_usec;
+}
+
+
+int64_t elapsedMillisSinceBoot()
+{
+    int64_t t_us = systemTime(0);
+    return (int64_t) t_us / 1000LL;
+}
diff --git a/gps/platform_lib_abstractions/platform_lib_includes.h b/gps/platform_lib_abstractions/platform_lib_includes.h
new file mode 100644
index 0000000..5858674
--- /dev/null
+++ b/gps/platform_lib_abstractions/platform_lib_includes.h
@@ -0,0 +1,35 @@
+/* Copyright (c) 2013, 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 _PLATFORM_LIB_INCLUDES_H_
+#define _PLATFORM_LIB_INCLUDES_H_
+
+#include "platform_lib_time.h"
+#include "platform_lib_macros.h"
+
+#endif
diff --git a/gps/platform_lib_abstractions/platform_lib_macros.h b/gps/platform_lib_abstractions/platform_lib_macros.h
new file mode 100644
index 0000000..bc48dd9
--- /dev/null
+++ b/gps/platform_lib_abstractions/platform_lib_macros.h
@@ -0,0 +1,81 @@
+/* Copyright (c) 2013, 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 __PLATFORM_LIB_MACROS_H__
+#define __PLATFORM_LIB_MACROS_H__
+
+#include <sys/time.h>
+
+#define TS_PRINTF(format, x...)                                \
+{                                                              \
+  struct timeval tv;                                           \
+  struct timezone tz;                                          \
+  int hh, mm, ss;                                              \
+  gettimeofday(&tv, &tz);                                      \
+  hh = tv.tv_sec/3600%24;                                      \
+  mm = (tv.tv_sec%3600)/60;                                    \
+  ss = tv.tv_sec%60;                                           \
+  fprintf(stdout,"%02d:%02d:%02d.%06ld]" format "\n", hh, mm, ss, tv.tv_usec,##x);    \
+}
+
+
+#ifdef USE_GLIB
+
+#define strlcat g_strlcat
+#define strlcpy g_strlcpy
+
+#define ALOGE(format, x...) TS_PRINTF("E/%s (%d): " format , LOG_TAG, getpid(), ##x)
+#define ALOGW(format, x...) TS_PRINTF("W/%s (%d): " format , LOG_TAG, getpid(), ##x)
+#define ALOGI(format, x...) TS_PRINTF("I/%s (%d): " format , LOG_TAG, getpid(), ##x)
+#define ALOGD(format, x...) TS_PRINTF("D/%s (%d): " format , LOG_TAG, getpid(), ##x)
+#define ALOGV(format, x...) TS_PRINTF("V/%s (%d): " format , LOG_TAG, getpid(), ##x)
+
+#define GETTID_PLATFORM_LIB_ABSTRACTION (syscall(SYS_gettid))
+
+#define LOC_EXT_CREATE_THREAD_CB_PLATFORM_LIB_ABSTRACTION createPthread
+#define ELAPSED_MILLIS_SINCE_BOOT_PLATFORM_LIB_ABSTRACTION (elapsedMillisSinceBoot())
+
+
+#else
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+pid_t gettid(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#define GETTID_PLATFORM_LIB_ABSTRACTION (gettid())
+#define LOC_EXT_CREATE_THREAD_CB_PLATFORM_LIB_ABSTRACTION android::AndroidRuntime::createJavaThread
+#define ELAPSED_MILLIS_SINCE_BOOT_PLATFORM_LIB_ABSTRACTION  (android::elapsedRealtime())
+
+#endif
+
+#endif
diff --git a/gps/platform_lib_abstractions/platform_lib_time.h b/gps/platform_lib_abstractions/platform_lib_time.h
new file mode 100644
index 0000000..ce013af
--- /dev/null
+++ b/gps/platform_lib_abstractions/platform_lib_time.h
@@ -0,0 +1,35 @@
+/* Copyright (c) 2013, 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 _PLATFORM_LIB_TIME_H_
+#define _PLATFORM_LIB_TIME_H_
+
+int64_t systemTime(int clock);
+int64_t elapsedMillisSinceBoot();
+
+#endif
diff --git a/gps/sap.conf b/gps/sap.conf
new file mode 100644
index 0000000..8f5e396
--- /dev/null
+++ b/gps/sap.conf
@@ -0,0 +1,42 @@
+################################
+# Sensor Settings
+################################
+
+# Needs to be set explicitly based on sensor
+# There is no default value.
+# used in loc_eng_reinit
+#GYRO_BIAS_RANDOM_WALK=
+#ACCEL_RANDOM_WALK_SPECTRAL_DENSITY=
+#ANGLE_RANDOM_WALK_SPECTRAL_DENSITY=
+#RATE_RANDOM_WALK_SPECTRAL_DENSITY=
+#VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY=
+
+# Sensor Sampling Rate Parameters for Low-Data Rate Filter (should be greater than 0)
+# used in loc_eng_reinit
+SENSOR_ACCEL_BATCHES_PER_SEC=3
+SENSOR_ACCEL_SAMPLES_PER_BATCH=5
+SENSOR_GYRO_BATCHES_PER_SEC=3
+SENSOR_GYRO_SAMPLES_PER_BATCH=5
+# Sensor Sampling Rate Parameters for High-Data Rate Filter (should be greater than 0)
+SENSOR_ACCEL_BATCHES_PER_SEC_HIGH=4
+SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH=25
+SENSOR_GYRO_BATCHES_PER_SEC_HIGH=4
+SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH=25
+
+# Sensor Control Mode (0=AUTO, 1=FORCE_ON)
+# used in loc_eng_reinit
+SENSOR_CONTROL_MODE=0
+
+# Enable or Disable Sensors for GPS use (0=Enable, 1=Disable)
+# used in loc_eng_reinit
+SENSOR_USAGE=1
+
+# Choose GSIFF sensor provider (1=Snapdragon Sensors Core, 2=Android NDK)
+SENSOR_PROVIDER=2
+
+# Bit mask used to define which sensor algorithms are used.
+# Setting each bit has the following definition:
+#  0x1 - DISABLE_INS_POSITIONING_FILTER
+#  0x0 - ENABLE_INS_POSITIONING_FILTER
+SENSOR_ALGORITHM_CONFIG_MASK=0x1
+
diff --git a/gps/utils/Android.mk b/gps/utils/Android.mk
new file mode 100644
index 0000000..0f99907
--- /dev/null
+++ b/gps/utils/Android.mk
@@ -0,0 +1,59 @@
+ifneq ($(BUILD_TINY_ANDROID),true)
+#Compile this library only for builds with the latest modem image
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+## Libs
+LOCAL_SHARED_LIBRARIES := \
+    libutils \
+    libcutils \
+    liblog
+
+LOCAL_SRC_FILES += \
+    loc_log.cpp \
+    loc_cfg.cpp \
+    msg_q.c \
+    linked_list.c \
+    loc_target.cpp \
+    loc_timer.c \
+    ../platform_lib_abstractions/elapsed_millis_since_boot.cpp \
+    loc_misc_utils.cpp
+
+LOCAL_CFLAGS += \
+     -fno-short-enums \
+     -D_ANDROID_
+
+ifeq ($(TARGET_BUILD_VARIANT),user)
+   LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER
+endif
+
+LOCAL_LDFLAGS += -Wl,--export-dynamic
+
+## Includes
+LOCAL_C_INCLUDES:= \
+    $(LOCAL_PATH)/../platform_lib_abstractions
+
+LOCAL_COPY_HEADERS_TO:= gps.utils/
+LOCAL_COPY_HEADERS:= \
+   loc_log.h \
+   loc_cfg.h \
+   log_util.h \
+   linked_list.h \
+   msg_q.h \
+   loc_target.h \
+   loc_timer.h \
+   ../platform_lib_abstractions/platform_lib_includes.h \
+   ../platform_lib_abstractions/platform_lib_time.h \
+   ../platform_lib_abstractions/platform_lib_macros.h \
+   loc_misc_utils.h
+
+LOCAL_MODULE := libgps.utils
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_PRELINK_MODULE := false
+
+include $(BUILD_SHARED_LIBRARY)
+endif # not BUILD_TINY_ANDROID
diff --git a/gps/utils/Makefile.am b/gps/utils/Makefile.am
new file mode 100644
index 0000000..e5935f0
--- /dev/null
+++ b/gps/utils/Makefile.am
@@ -0,0 +1,44 @@
+AM_CFLAGS = -Wundef \
+         -MD \
+         -Wno-trigraphs \
+         -g -O0 \
+         -fno-inline \
+         -fno-short-enums \
+         -fpic \
+         -I../platform_lib_abstractions
+
+libgps_utils_so_la_h_sources = log_util.h \
+            msg_q.h \
+            linked_list.h \
+            loc_cfg.h \
+            loc_log.h \
+            ../platform_lib_abstractions/platform_lib_includes.h \
+            ../platform_lib_abstractions/platform_lib_time.h \
+            ../platform_lib_abstractions/platform_lib_macros.h
+
+libgps_utils_so_la_c_sources = linked_list.c \
+            msg_q.c \
+            loc_cfg.cpp \
+            loc_log.cpp \
+            ../platform_lib_abstractions/elapsed_millis_since_boot.cpp
+
+library_includedir = $(pkgincludedir)/utils
+
+library_include_HEADERS = $(libgps_utils_so_la_h_sources)
+
+libgps_utils_so_la_SOURCES = $(libgps_utils_so_la_c_sources)
+
+if USE_GLIB
+libgps_utils_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
+libgps_utils_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
+libgps_utils_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
+else
+libgps_utils_so_la_CFLAGS = $(AM_CFLAGS)
+libgps_utils_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
+libgps_utils_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
+endif
+
+libgps_utils_so_la_LIBADD = -lstdc++ -lcutils
+
+#Create and Install libraries
+lib_LTLIBRARIES = libgps_utils_so.la
diff --git a/gps/utils/linked_list.c b/gps/utils/linked_list.c
new file mode 100644
index 0000000..92617fe
--- /dev/null
+++ b/gps/utils/linked_list.c
@@ -0,0 +1,328 @@
+/* Copyright (c) 2011, 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.
+ */
+
+#include "linked_list.h"
+#include <stdio.h>
+#include <string.h>
+
+#define LOG_TAG "LocSvc_utils_ll"
+#include "log_util.h"
+#include "platform_lib_includes.h"
+#include <stdlib.h>
+#include <stdint.h>
+
+typedef struct list_element {
+   struct list_element* next;
+   struct list_element* prev;
+   void* data_ptr;
+   void (*dealloc_func)(void*);
+}list_element;
+
+typedef struct list_state {
+   list_element* p_head;
+   list_element* p_tail;
+} list_state;
+
+/* ----------------------- END INTERNAL FUNCTIONS ---------------------------------------- */
+
+/*===========================================================================
+
+  FUNCTION:   linked_list_init
+
+  ===========================================================================*/
+linked_list_err_type linked_list_init(void** list_data)
+{
+   if( list_data == NULL )
+   {
+      LOC_LOGE("%s: Invalid list parameter!\n", __FUNCTION__);
+      return eLINKED_LIST_INVALID_PARAMETER;
+   }
+
+   list_state* tmp_list;
+   tmp_list = (list_state*)calloc(1, sizeof(list_state));
+   if( tmp_list == NULL )
+   {
+      LOC_LOGE("%s: Unable to allocate space for list!\n", __FUNCTION__);
+      return eLINKED_LIST_FAILURE_GENERAL;
+   }
+
+   tmp_list->p_head = NULL;
+   tmp_list->p_tail = NULL;
+
+   *list_data = tmp_list;
+
+   return eLINKED_LIST_SUCCESS;
+}
+
+/*===========================================================================
+
+  FUNCTION:   linked_list_destroy
+
+  ===========================================================================*/
+linked_list_err_type linked_list_destroy(void** list_data)
+{
+   if( list_data == NULL )
+   {
+      LOC_LOGE("%s: Invalid list parameter!\n", __FUNCTION__);
+      return eLINKED_LIST_INVALID_HANDLE;
+   }
+
+   list_state* p_list = (list_state*)*list_data;
+
+   linked_list_flush(p_list);
+
+   free(*list_data);
+   *list_data = NULL;
+
+   return eLINKED_LIST_SUCCESS;
+}
+
+/*===========================================================================
+
+  FUNCTION:   linked_list_add
+
+  ===========================================================================*/
+linked_list_err_type linked_list_add(void* list_data, void *data_obj, void (*dealloc)(void*))
+{
+   LOC_LOGD("%s: Adding to list data_obj = 0x%08X\n", __FUNCTION__, data_obj);
+   if( list_data == NULL )
+   {
+      LOC_LOGE("%s: Invalid list parameter!\n", __FUNCTION__);
+      return eLINKED_LIST_INVALID_HANDLE;
+   }
+
+   if( data_obj == NULL )
+   {
+      LOC_LOGE("%s: Invalid input parameter!\n", __FUNCTION__);
+      return eLINKED_LIST_INVALID_PARAMETER;
+   }
+
+   list_state* p_list = (list_state*)list_data;
+   list_element* elem = (list_element*)malloc(sizeof(list_element));
+   if( elem == NULL )
+   {
+      LOC_LOGE("%s: Memory allocation failed\n", __FUNCTION__);
+      return eLINKED_LIST_FAILURE_GENERAL;
+   }
+
+   /* Copy data to newly created element */
+   elem->data_ptr = data_obj;
+   elem->next = NULL;
+   elem->prev = NULL;
+   elem->dealloc_func = dealloc;
+
+   /* Replace head element */
+   list_element* tmp = p_list->p_head;
+   p_list->p_head = elem;
+   /* Point next to the previous head element */
+   p_list->p_head->next = tmp;
+
+   if( tmp != NULL )
+   {
+      tmp->prev = p_list->p_head;
+   }
+   else
+   {
+      p_list->p_tail = p_list->p_head;
+   }
+
+   return eLINKED_LIST_SUCCESS;
+}
+
+/*===========================================================================
+
+  FUNCTION:   linked_list_remove
+
+  ===========================================================================*/
+linked_list_err_type linked_list_remove(void* list_data, void **data_obj)
+{
+   LOC_LOGD("%s: Removing from list\n", __FUNCTION__);
+   if( list_data == NULL )
+   {
+      LOC_LOGE("%s: Invalid list parameter!\n", __FUNCTION__);
+      return eLINKED_LIST_INVALID_HANDLE;
+   }
+
+   if( data_obj == NULL )
+   {
+      LOC_LOGE("%s: Invalid input parameter!\n", __FUNCTION__);
+      return eLINKED_LIST_INVALID_PARAMETER;
+   }
+
+   list_state* p_list = (list_state*)list_data;
+   if( p_list->p_tail == NULL )
+   {
+      return eLINKED_LIST_UNAVAILABLE_RESOURCE;
+   }
+
+   list_element* tmp = p_list->p_tail;
+
+   /* Replace tail element */
+   p_list->p_tail = tmp->prev;
+
+   if( p_list->p_tail != NULL )
+   {
+      p_list->p_tail->next = NULL;
+   }
+   else
+   {
+      p_list->p_head = p_list->p_tail;
+   }
+
+   /* Copy data to output param */
+   *data_obj = tmp->data_ptr;
+
+   /* Free allocated list element */
+   free(tmp);
+
+   return eLINKED_LIST_SUCCESS;
+}
+
+/*===========================================================================
+
+  FUNCTION:   linked_list_empty
+
+  ===========================================================================*/
+int linked_list_empty(void* list_data)
+{
+   if( list_data == NULL )
+   {
+      LOC_LOGE("%s: Invalid list parameter!\n", __FUNCTION__);
+      return (int)eLINKED_LIST_INVALID_HANDLE;
+   }
+   else
+   {
+      list_state* p_list = (list_state*)list_data;
+      return p_list->p_head == NULL ? 1 : 0;
+   }
+}
+
+/*===========================================================================
+
+  FUNCTION:   linked_list_flush
+
+  ===========================================================================*/
+linked_list_err_type linked_list_flush(void* list_data)
+{
+   if( list_data == NULL )
+   {
+      LOC_LOGE("%s: Invalid list parameter!\n", __FUNCTION__);
+      return eLINKED_LIST_INVALID_HANDLE;
+   }
+
+   list_state* p_list = (list_state*)list_data;
+
+   /* Remove all dynamically allocated elements */
+   while( p_list->p_head != NULL )
+   {
+      list_element* tmp = p_list->p_head->next;
+
+      /* Free data pointer if told to do so. */
+      if( p_list->p_head->dealloc_func != NULL )
+      {
+         p_list->p_head->dealloc_func(p_list->p_head->data_ptr);
+      }
+
+      /* Free list element */
+      free(p_list->p_head);
+
+      p_list->p_head = tmp;
+   }
+
+   p_list->p_tail = NULL;
+
+   return eLINKED_LIST_SUCCESS;
+}
+
+/*===========================================================================
+
+  FUNCTION:   linked_list_search
+
+  ===========================================================================*/
+linked_list_err_type linked_list_search(void* list_data, void **data_p,
+                                        bool (*equal)(void* data_0, void* data),
+                                        void* data_0, bool rm_if_found)
+{
+   LOC_LOGD("%s: Search the list\n", __FUNCTION__);
+   if( list_data == NULL || NULL == equal )
+   {
+      LOC_LOGE("%s: Invalid list parameter! list_data %p equal %p\n",
+               __FUNCTION__, list_data, equal);
+      return eLINKED_LIST_INVALID_HANDLE;
+   }
+
+   list_state* p_list = (list_state*)list_data;
+   if( p_list->p_tail == NULL )
+   {
+      return eLINKED_LIST_UNAVAILABLE_RESOURCE;
+   }
+
+   list_element* tmp = p_list->p_head;
+
+   if (NULL != data_p) {
+     *data_p = NULL;
+   }
+
+   while (NULL != tmp) {
+     if ((*equal)(data_0, tmp->data_ptr)) {
+       if (NULL != data_p) {
+         *data_p = tmp->data_ptr;
+       }
+
+       if (rm_if_found) {
+         if (NULL == tmp->prev) {
+           p_list->p_head = tmp->next;
+         } else {
+           tmp->prev->next = tmp->next;
+         }
+
+         if (NULL == tmp->next) {
+           p_list->p_tail = tmp->prev;
+         } else {
+           tmp->next->prev = tmp->prev;
+         }
+
+         tmp->prev = tmp->next = NULL;
+
+         // dealloc data if it is not copied out && caller
+         // has given us a dealloc function pointer.
+         if (NULL == data_p && NULL != tmp->dealloc_func) {
+             tmp->dealloc_func(tmp->data_ptr);
+         }
+         free(tmp);
+       }
+
+       tmp = NULL;
+     } else {
+       tmp = tmp->next;
+     }
+   }
+
+   return eLINKED_LIST_SUCCESS;
+}
+
diff --git a/gps/utils/linked_list.h b/gps/utils/linked_list.h
new file mode 100644
index 0000000..a85f09a
--- /dev/null
+++ b/gps/utils/linked_list.h
@@ -0,0 +1,217 @@
+/* Copyright (c) 2011, 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 __LINKED_LIST_H__
+#define __LINKED_LIST_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <stdbool.h>
+#include <stdlib.h>
+
+/** Linked List Return Codes */
+typedef enum
+{
+  eLINKED_LIST_SUCCESS                             = 0,
+     /**< Request was successful. */
+  eLINKED_LIST_FAILURE_GENERAL                     = -1,
+     /**< Failed because of a general failure. */
+  eLINKED_LIST_INVALID_PARAMETER                   = -2,
+     /**< Failed because the request contained invalid parameters. */
+  eLINKED_LIST_INVALID_HANDLE                      = -3,
+     /**< Failed because an invalid handle was specified. */
+  eLINKED_LIST_UNAVAILABLE_RESOURCE                = -4,
+     /**< Failed because an there were not enough resources. */
+  eLINKED_LIST_INSUFFICIENT_BUFFER                 = -5,
+     /**< Failed because an the supplied buffer was too small. */
+}linked_list_err_type;
+
+/*===========================================================================
+FUNCTION    linked_list_init
+
+DESCRIPTION
+   Initializes internal structures for linked list.
+
+   list_data: State of list to be initialized.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Look at error codes above.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+linked_list_err_type linked_list_init(void** list_data);
+
+/*===========================================================================
+FUNCTION    linked_list_destroy
+
+DESCRIPTION
+   Destroys internal structures for linked list.
+
+   p_list_data: State of list to be destroyed.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Look at error codes above.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+linked_list_err_type linked_list_destroy(void** list_data);
+
+/*===========================================================================
+FUNCTION    linked_list_add
+
+DESCRIPTION
+   Adds an element to the head of the linked list. The passed in data pointer
+   is not modified or freed. Passed in data_obj is expected to live throughout
+   the use of the linked_list (i.e. data is not allocated internally)
+
+   p_list_data:  List to add data to the head of.
+   data_obj:     Pointer to data to add into list
+   dealloc:      Function used to deallocate memory for this element. Pass NULL
+                 if you do not want data deallocated during a flush operation
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Look at error codes above.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+linked_list_err_type linked_list_add(void* list_data, void *data_obj, void (*dealloc)(void*));
+
+/*===========================================================================
+FUNCTION    linked_list_remove
+
+DESCRIPTION
+   Retrieves data from the list tail. data_obj is the tail element from the list
+   passed in by linked_list_add.
+
+   p_list_data:  List to remove the tail from.
+   data_obj:     Pointer to data removed from list
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Look at error codes above.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+linked_list_err_type linked_list_remove(void* list_data, void **data_obj);
+
+/*===========================================================================
+FUNCTION    linked_list_empty
+
+DESCRIPTION
+   Tells whether the list currently contains any elements
+
+   p_list_data:  List to check if empty.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   0/FALSE : List contains elements
+   1/TRUE  : List is Empty
+   Otherwise look at error codes above.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+int linked_list_empty(void* list_data);
+
+/*===========================================================================
+FUNCTION    linked_list_flush
+
+DESCRIPTION
+   Removes all elements from the list and deallocates them using the provided
+   dealloc function while adding elements.
+
+   p_list_data:  List to remove all elements from.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Look at error codes above.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+linked_list_err_type linked_list_flush(void* list_data);
+
+/*===========================================================================
+FUNCTION    linked_list_search
+
+DESCRIPTION
+   Searches for an element in the linked list.
+
+   p_list_data:  List handle.
+   data_p:       to be stored with the data found; NUll if no match.
+                 if data_p passed in as NULL, then no write to it.
+   equal:        Function ptr takes in a list element, and returns
+                 indication if this the one looking for.
+   data_0:       The data being compared against.
+   rm_if_found:  Should data be removed if found?
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Look at error codes above.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+linked_list_err_type linked_list_search(void* list_data, void **data_p,
+                                        bool (*equal)(void* data_0, void* data),
+                                        void* data_0, bool rm_if_found);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LINKED_LIST_H__ */
diff --git a/gps/utils/loc_cfg.cpp b/gps/utils/loc_cfg.cpp
new file mode 100644
index 0000000..7ffe6a4
--- /dev/null
+++ b/gps/utils/loc_cfg.cpp
@@ -0,0 +1,399 @@
+/* Copyright (c) 2011-2014, 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.
+ *
+ */
+
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_utils_cfg"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <pthread.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <time.h>
+#include <loc_cfg.h>
+#include <log_util.h>
+#include <loc_misc_utils.h>
+#ifdef USE_GLIB
+#include <glib.h>
+#endif
+#include "platform_lib_includes.h"
+
+/*=============================================================================
+ *
+ *                          GLOBAL DATA DECLARATION
+ *
+ *============================================================================*/
+
+/* Parameter data */
+static uint8_t DEBUG_LEVEL = 0xff;
+static uint8_t TIMESTAMP = 0;
+
+/* Parameter spec table */
+static loc_param_s_type loc_param_table[] =
+{
+    {"DEBUG_LEVEL",    &DEBUG_LEVEL, NULL,    'n'},
+    {"TIMESTAMP",      &TIMESTAMP,   NULL,    'n'},
+};
+int loc_param_num = sizeof(loc_param_table) / sizeof(loc_param_s_type);
+
+typedef struct loc_param_v_type
+{
+    char* param_name;
+    char* param_str_value;
+    int param_int_value;
+    double param_double_value;
+}loc_param_v_type;
+
+/*===========================================================================
+FUNCTION loc_set_config_entry
+
+DESCRIPTION
+   Potentially sets a given configuration table entry based on the passed in
+   configuration value. This is done by using a string comparison of the
+   parameter names and those found in the configuration file.
+
+PARAMETERS:
+   config_entry: configuration entry in the table to possibly set
+   config_value: value to store in the entry if the parameter names match
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+===========================================================================*/
+int loc_set_config_entry(loc_param_s_type* config_entry, loc_param_v_type* config_value)
+{
+    int ret=-1;
+    if(NULL == config_entry || NULL == config_value)
+    {
+        LOC_LOGE("%s: INVALID config entry or parameter", __FUNCTION__);
+        return ret;
+    }
+
+    if (strcmp(config_entry->param_name, config_value->param_name) == 0 &&
+        config_entry->param_ptr)
+    {
+        switch (config_entry->param_type)
+        {
+        case 's':
+            if (strcmp(config_value->param_str_value, "NULL") == 0)
+            {
+                *((char*)config_entry->param_ptr) = '\0';
+            }
+            else {
+                strlcpy((char*) config_entry->param_ptr,
+                        config_value->param_str_value,
+                        LOC_MAX_PARAM_STRING + 1);
+            }
+            /* Log INI values */
+            LOC_LOGD("%s: PARAM %s = %s", __FUNCTION__,
+                     config_entry->param_name, (char*)config_entry->param_ptr);
+
+            if(NULL != config_entry->param_set)
+            {
+                *(config_entry->param_set) = 1;
+            }
+            ret = 0;
+            break;
+        case 'n':
+            *((int *)config_entry->param_ptr) = config_value->param_int_value;
+            /* Log INI values */
+            LOC_LOGD("%s: PARAM %s = %d", __FUNCTION__,
+                     config_entry->param_name, config_value->param_int_value);
+
+            if(NULL != config_entry->param_set)
+            {
+                *(config_entry->param_set) = 1;
+            }
+            ret = 0;
+            break;
+        case 'f':
+            *((double *)config_entry->param_ptr) = config_value->param_double_value;
+            /* Log INI values */
+            LOC_LOGD("%s: PARAM %s = %f", __FUNCTION__,
+                     config_entry->param_name, config_value->param_double_value);
+
+            if(NULL != config_entry->param_set)
+            {
+                *(config_entry->param_set) = 1;
+            }
+            ret = 0;
+            break;
+        default:
+            LOC_LOGE("%s: PARAM %s parameter type must be n, f, or s",
+                     __FUNCTION__, config_entry->param_name);
+        }
+    }
+    return ret;
+}
+
+/*===========================================================================
+FUNCTION loc_fill_conf_item
+
+DESCRIPTION
+   Takes a line of configuration item and sets defined values based on
+   the passed in configuration table. This table maps strings to values to
+   set along with the type of each of these values.
+
+PARAMETERS:
+   input_buf : buffer contanis config item
+   config_table: table definition of strings to places to store information
+   table_length: length of the configuration table
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   0: Number of records in the config_table filled with input_buf
+
+SIDE EFFECTS
+   N/A
+===========================================================================*/
+int loc_fill_conf_item(char* input_buf,
+                       loc_param_s_type* config_table, uint32_t table_length)
+{
+    int ret = 0;
+
+    if (input_buf && config_table) {
+        char *lasts;
+        loc_param_v_type config_value;
+        memset(&config_value, 0, sizeof(config_value));
+
+        /* Separate variable and value */
+        config_value.param_name = strtok_r(input_buf, "=", &lasts);
+        /* skip lines that do not contain "=" */
+        if (config_value.param_name) {
+            config_value.param_str_value = strtok_r(NULL, "=", &lasts);
+
+            /* skip lines that do not contain two operands */
+            if (config_value.param_str_value) {
+                /* Trim leading and trailing spaces */
+                loc_util_trim_space(config_value.param_name);
+                loc_util_trim_space(config_value.param_str_value);
+
+                /* Parse numerical value */
+                if ((strlen(config_value.param_str_value) >=3) &&
+                    (config_value.param_str_value[0] == '0') &&
+                    (tolower(config_value.param_str_value[1]) == 'x'))
+                {
+                    /* hex */
+                    config_value.param_int_value = (int) strtol(&config_value.param_str_value[2],
+                                                                (char**) NULL, 16);
+                }
+                else {
+                    config_value.param_double_value = (double) atof(config_value.param_str_value); /* float */
+                    config_value.param_int_value = atoi(config_value.param_str_value); /* dec */
+                }
+
+                for(uint32_t i = 0; NULL != config_table && i < table_length; i++)
+                {
+                    if(!loc_set_config_entry(&config_table[i], &config_value)) {
+                        ret += 1;
+                    }
+                }
+            }
+        }
+    }
+
+    return ret;
+}
+
+/*===========================================================================
+FUNCTION loc_read_conf_r (repetitive)
+
+DESCRIPTION
+   Reads the specified configuration file and sets defined values based on
+   the passed in configuration table. This table maps strings to values to
+   set along with the type of each of these values.
+   The difference between this and loc_read_conf is that this function returns
+   the file pointer position at the end of filling a config table. Also, it
+   reads a fixed number of parameters at a time which is equal to the length
+   of the configuration table. This functionality enables the caller to
+   repeatedly call the function to read data from the same file.
+
+PARAMETERS:
+   conf_fp : file pointer
+   config_table: table definition of strings to places to store information
+   table_length: length of the configuration table
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   0: Table filled successfully
+   1: No more parameters to read
+  -1: Error filling table
+
+SIDE EFFECTS
+   N/A
+===========================================================================*/
+int loc_read_conf_r(FILE *conf_fp, loc_param_s_type* config_table, uint32_t table_length)
+{
+    int ret=0;
+
+    unsigned int num_params=table_length;
+    if(conf_fp == NULL) {
+        LOC_LOGE("%s:%d]: ERROR: File pointer is NULL\n", __func__, __LINE__);
+        ret = -1;
+        goto err;
+    }
+
+    /* Clear all validity bits */
+    for(uint32_t i = 0; NULL != config_table && i < table_length; i++)
+    {
+        if(NULL != config_table[i].param_set)
+        {
+            *(config_table[i].param_set) = 0;
+        }
+    }
+
+    char input_buf[LOC_MAX_PARAM_LINE];  /* declare a char array */
+
+    LOC_LOGD("%s:%d]: num_params: %d\n", __func__, __LINE__, num_params);
+    while(num_params)
+    {
+        if(!fgets(input_buf, LOC_MAX_PARAM_LINE, conf_fp)) {
+            LOC_LOGD("%s:%d]: fgets returned NULL\n", __func__, __LINE__);
+            break;
+        }
+
+        num_params -= loc_fill_conf_item(input_buf, config_table, table_length);
+    }
+
+err:
+    return ret;
+}
+
+/*===========================================================================
+FUNCTION loc_udpate_conf
+
+DESCRIPTION
+   Parses the passed in buffer for configuration items, and update the table
+   that is also passed in.
+
+Reads the specified configuration file and sets defined values based on
+   the passed in configuration table. This table maps strings to values to
+   set along with the type of each of these values.
+
+PARAMETERS:
+   conf_data: configuration items in bufferas a string
+   length: strlen(conf_data)
+   config_table: table definition of strings to places to store information
+   table_length: length of the configuration table
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   number of the records in the table that is updated at time of return.
+
+SIDE EFFECTS
+   N/A
+===========================================================================*/
+int loc_update_conf(const char* conf_data, int32_t length,
+                    loc_param_s_type* config_table, uint32_t table_length)
+{
+    int ret = -1;
+
+    if (conf_data && length && config_table && table_length) {
+        // make a copy, so we do not tokenize the original data
+        char* conf_copy = (char*)malloc(length+1);
+
+        if(conf_copy !=NULL)
+        {
+          memcpy(conf_copy, conf_data, length);
+          // we hard NULL the end of string to be safe
+          conf_copy[length] = 0;
+        }
+
+        // start with one record off
+        uint32_t num_params = table_length - 1;
+        char* saveptr = NULL;
+        char* input_buf = strtok_r(conf_copy, "\n", &saveptr);
+        ret = 0;
+
+        LOC_LOGD("%s:%d]: num_params: %d\n", __func__, __LINE__, num_params);
+        while(num_params && input_buf) {
+            ret++;
+            num_params -= loc_fill_conf_item(input_buf, config_table, table_length);
+            input_buf = strtok_r(NULL, "\n", &saveptr);
+        }
+    }
+
+    return ret;
+}
+
+/*===========================================================================
+FUNCTION loc_read_conf
+
+DESCRIPTION
+   Reads the specified configuration file and sets defined values based on
+   the passed in configuration table. This table maps strings to values to
+   set along with the type of each of these values.
+
+PARAMETERS:
+   conf_file_name: configuration file to read
+   config_table: table definition of strings to places to store information
+   table_length: length of the configuration table
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+===========================================================================*/
+void loc_read_conf(const char* conf_file_name, loc_param_s_type* config_table,
+                   uint32_t table_length)
+{
+    FILE *conf_fp = NULL;
+    char *lasts;
+    loc_param_v_type config_value;
+    uint32_t i;
+
+    if((conf_fp = fopen(conf_file_name, "r")) != NULL)
+    {
+        LOC_LOGD("%s: using %s", __FUNCTION__, conf_file_name);
+        if(table_length && config_table) {
+            loc_read_conf_r(conf_fp, config_table, table_length);
+            rewind(conf_fp);
+        }
+        loc_read_conf_r(conf_fp, loc_param_table, loc_param_num);
+        fclose(conf_fp);
+    }
+    /* Initialize logging mechanism with parsed data */
+    loc_logger_init(DEBUG_LEVEL, TIMESTAMP);
+}
diff --git a/gps/utils/loc_cfg.h b/gps/utils/loc_cfg.h
new file mode 100644
index 0000000..ea4865b
--- /dev/null
+++ b/gps/utils/loc_cfg.h
@@ -0,0 +1,91 @@
+/* Copyright (c) 2011-2014, 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 LOC_CFG_H
+#define LOC_CFG_H
+
+#include <stdio.h>
+#include <stdint.h>
+
+#define LOC_MAX_PARAM_NAME                 80
+#define LOC_MAX_PARAM_STRING               80
+#define LOC_MAX_PARAM_LINE    (LOC_MAX_PARAM_NAME + LOC_MAX_PARAM_STRING)
+
+#define UTIL_UPDATE_CONF(conf_data, len, config_table) \
+    loc_update_conf((conf_data), (len), (config_table), \
+                    sizeof(config_table) / sizeof(config_table[0]))
+
+#define UTIL_READ_CONF_DEFAULT(filename) \
+    loc_read_conf((filename), NULL, 0);
+
+#define UTIL_READ_CONF(filename, config_table) \
+    loc_read_conf((filename), (config_table), sizeof(config_table) / sizeof(config_table[0]))
+
+/*=============================================================================
+ *
+ *                        MODULE TYPE DECLARATION
+ *
+ *============================================================================*/
+typedef struct
+{
+  char                           param_name[LOC_MAX_PARAM_NAME];
+  void                          *param_ptr;
+  uint8_t                       *param_set;   /* was this value set by config file? */
+  char                           param_type;  /* 'n' for number,
+                                                 's' for string,
+                                                 'f' for float */
+} loc_param_s_type;
+
+/*=============================================================================
+ *
+ *                          MODULE EXTERNAL DATA
+ *
+ *============================================================================*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*=============================================================================
+ *
+ *                       MODULE EXPORTED FUNCTIONS
+ *
+ *============================================================================*/
+void loc_read_conf(const char* conf_file_name,
+                   loc_param_s_type* config_table,
+                   uint32_t table_length);
+int loc_read_conf_r(FILE *conf_fp, loc_param_s_type* config_table,
+                    uint32_t table_length);
+int loc_update_conf(const char* conf_data, int32_t length,
+                    loc_param_s_type* config_table, uint32_t table_length);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LOC_CFG_H */
diff --git a/gps/utils/loc_log.cpp b/gps/utils/loc_log.cpp
new file mode 100644
index 0000000..18182b7
--- /dev/null
+++ b/gps/utils/loc_log.cpp
@@ -0,0 +1,241 @@
+/* Copyright (c) 2011-2012, 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.
+ *
+ */
+
+#define LOG_NDDEBUG 0
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include "loc_log.h"
+#include "msg_q.h"
+#ifdef USE_GLIB
+#include <time.h>
+#endif /* USE_GLIB  */
+#include "log_util.h"
+#include "platform_lib_includes.h"
+
+#define  BUFFER_SIZE  120
+
+// Logging Improvements
+const char *loc_logger_boolStr[]={"False","True"};
+const char VOID_RET[]   = "None";
+const char FROM_AFW[]   = "===>";
+const char TO_MODEM[]   = "--->";
+const char FROM_MODEM[] = "<---";
+const char TO_AFW[]     = "<===";
+const char EXIT_TAG[]   = "Exiting";
+const char ENTRY_TAG[]  = "Entering";
+
+/* Logging Mechanism */
+loc_logger_s_type loc_logger;
+
+/* Get names from value */
+const char* loc_get_name_from_mask(loc_name_val_s_type table[], int table_size, long mask)
+{
+   int i;
+   for (i = 0; i < table_size; i++)
+   {
+      if (table[i].val & (long) mask)
+      {
+         return table[i].name;
+      }
+   }
+   return UNKNOWN_STR;
+}
+
+/* Get names from value */
+const char* loc_get_name_from_val(loc_name_val_s_type table[], int table_size, long value)
+{
+   int i;
+   for (i = 0; i < table_size; i++)
+   {
+      if (table[i].val == (long) value)
+      {
+         return table[i].name;
+      }
+   }
+   return UNKNOWN_STR;
+}
+
+static loc_name_val_s_type loc_msg_q_status[] =
+{
+    NAME_VAL( eMSG_Q_SUCCESS ),
+    NAME_VAL( eMSG_Q_FAILURE_GENERAL ),
+    NAME_VAL( eMSG_Q_INVALID_PARAMETER ),
+    NAME_VAL( eMSG_Q_INVALID_HANDLE ),
+    NAME_VAL( eMSG_Q_UNAVAILABLE_RESOURCE ),
+    NAME_VAL( eMSG_Q_INSUFFICIENT_BUFFER )
+};
+static int loc_msg_q_status_num = sizeof(loc_msg_q_status) / sizeof(loc_name_val_s_type);
+
+/* Find msg_q status name */
+const char* loc_get_msg_q_status(int status)
+{
+   return loc_get_name_from_val(loc_msg_q_status, loc_msg_q_status_num, (long) status);
+}
+
+const char* log_succ_fail_string(int is_succ)
+{
+   return is_succ? "successful" : "failed";
+}
+
+//Target names
+loc_name_val_s_type target_name[] =
+{
+    NAME_VAL(GNSS_NONE),
+    NAME_VAL(GNSS_MSM),
+    NAME_VAL(GNSS_GSS),
+    NAME_VAL(GNSS_MDM),
+    NAME_VAL(GNSS_QCA1530),
+    NAME_VAL(GNSS_AUTO),
+    NAME_VAL(GNSS_UNKNOWN)
+};
+
+static int target_name_num = sizeof(target_name)/sizeof(loc_name_val_s_type);
+
+/*===========================================================================
+
+FUNCTION loc_get_target_name
+
+DESCRIPTION
+   Returns pointer to a string that contains name of the target
+
+   XX:XX:XX.000\0
+
+RETURN VALUE
+   The target name string
+
+===========================================================================*/
+const char *loc_get_target_name(unsigned int target)
+{
+    int index = 0;
+    static char ret[BUFFER_SIZE];
+
+    index =  getTargetGnssType(target);
+    if( index >= target_name_num || index < 0)
+        index = target_name_num - 1;
+
+    if( (target & HAS_SSC) == HAS_SSC ) {
+        snprintf(ret, sizeof(ret), " %s with SSC",
+           loc_get_name_from_val(target_name, target_name_num, (long)index) );
+    }
+    else {
+       snprintf(ret, sizeof(ret), " %s  without SSC",
+           loc_get_name_from_val(target_name, target_name_num, (long)index) );
+    }
+    return ret;
+}
+
+
+/*===========================================================================
+
+FUNCTION loc_get_time
+
+DESCRIPTION
+   Logs a callback event header.
+   The pointer time_string should point to a buffer of at least 13 bytes:
+
+   XX:XX:XX.000\0
+
+RETURN VALUE
+   The time string
+
+===========================================================================*/
+char *loc_get_time(char *time_string, unsigned long buf_size)
+{
+   struct timeval now;     /* sec and usec     */
+   struct tm now_tm;       /* broken-down time */
+   char hms_string[80];    /* HH:MM:SS         */
+
+   gettimeofday(&now, NULL);
+   localtime_r(&now.tv_sec, &now_tm);
+
+   strftime(hms_string, sizeof hms_string, "%H:%M:%S", &now_tm);
+   snprintf(time_string, buf_size, "%s.%03d", hms_string, (int) (now.tv_usec / 1000));
+
+   return time_string;
+}
+
+
+/*===========================================================================
+FUNCTION loc_logger_init
+
+DESCRIPTION
+   Initializes the state of DEBUG_LEVEL and TIMESTAMP
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+===========================================================================*/
+void loc_logger_init(unsigned long debug, unsigned long timestamp)
+{
+   loc_logger.DEBUG_LEVEL = debug;
+#ifdef TARGET_BUILD_VARIANT_USER
+   // force user builds to 2 or less
+   if (loc_logger.DEBUG_LEVEL > 2) {
+       loc_logger.DEBUG_LEVEL = 2;
+   }
+#endif
+   loc_logger.TIMESTAMP   = timestamp;
+}
+
+
+/*===========================================================================
+FUNCTION get_timestamp
+
+DESCRIPTION
+   Generates a timestamp using the current system time
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Char pointer to the parameter str
+
+SIDE EFFECTS
+   N/A
+===========================================================================*/
+char * get_timestamp(char *str, unsigned long buf_size)
+{
+  struct timeval tv;
+  struct timezone tz;
+  int hh, mm, ss;
+  gettimeofday(&tv, &tz);
+  hh = tv.tv_sec/3600%24;
+  mm = (tv.tv_sec%3600)/60;
+  ss = tv.tv_sec%60;
+  snprintf(str, buf_size, "%02d:%02d:%02d.%06ld", hh, mm, ss, tv.tv_usec);
+  return str;
+}
+
diff --git a/gps/utils/loc_log.h b/gps/utils/loc_log.h
new file mode 100644
index 0000000..82dc636
--- /dev/null
+++ b/gps/utils/loc_log.h
@@ -0,0 +1,68 @@
+/* Copyright (c) 2011-2012, 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 LOC_LOG_H
+#define LOC_LOG_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <ctype.h>
+#include "loc_target.h"
+
+typedef struct
+{
+   char                 name[128];
+   long                 val;
+} loc_name_val_s_type;
+
+#define NAME_VAL(x) {"" #x "", x }
+
+#define UNKNOWN_STR "UNKNOWN"
+
+#define CHECK_MASK(type, value, mask_var, mask) \
+   ((mask_var & mask) ? (type) value : (type) (-1))
+
+/* Get names from value */
+const char* loc_get_name_from_mask(loc_name_val_s_type table[], int table_size, long mask);
+const char* loc_get_name_from_val(loc_name_val_s_type table[], int table_size, long value);
+const char* loc_get_msg_q_status(int status);
+const char* loc_get_target_name(unsigned int target);
+
+extern const char* log_succ_fail_string(int is_succ);
+
+extern char *loc_get_time(char *time_string, unsigned long buf_size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LOC_LOG_H */
diff --git a/gps/utils/loc_misc_utils.cpp b/gps/utils/loc_misc_utils.cpp
new file mode 100644
index 0000000..7e96313
--- /dev/null
+++ b/gps/utils/loc_misc_utils.cpp
@@ -0,0 +1,114 @@
+/* Copyright (c) 2014, 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.
+ *
+ */
+#include <stdio.h>
+#include <string.h>
+#include <log_util.h>
+#include <loc_misc_utils.h>
+#include <ctype.h>
+
+#define LOG_NDDEBUG 0
+#define LOG_TAG "LocSvc_misc_utils"
+
+int loc_util_split_string(char *raw_string, char **split_strings_ptr,
+                          int max_num_substrings, char delimiter)
+{
+    int raw_string_index=0;
+    int num_split_strings=0;
+    unsigned char end_string=0;
+    int raw_string_length=0;
+
+    if(!raw_string || !split_strings_ptr) {
+        LOC_LOGE("%s:%d]: NULL parameters", __func__, __LINE__);
+        num_split_strings = -1;
+        goto err;
+    }
+    LOC_LOGD("%s:%d]: raw string: %s\n", __func__, __LINE__, raw_string);
+    raw_string_length = strlen(raw_string) + 1;
+    split_strings_ptr[num_split_strings] = &raw_string[raw_string_index];
+    for(raw_string_index=0; raw_string_index < raw_string_length; raw_string_index++) {
+        if(raw_string[raw_string_index] == '\0')
+            end_string=1;
+        if((raw_string[raw_string_index] == delimiter) || end_string) {
+            raw_string[raw_string_index] = '\0';
+            LOC_LOGD("%s:%d]: split string: %s\n",
+                     __func__, __LINE__, split_strings_ptr[num_split_strings]);
+            num_split_strings++;
+            if(((raw_string_index + 1) < raw_string_length) &&
+               (num_split_strings < max_num_substrings)) {
+                split_strings_ptr[num_split_strings] = &raw_string[raw_string_index+1];
+            }
+            else {
+                break;
+            }
+        }
+        if(end_string)
+            break;
+    }
+err:
+    LOC_LOGD("%s:%d]: num_split_strings: %d\n", __func__, __LINE__, num_split_strings);
+    return num_split_strings;
+}
+
+void loc_util_trim_space(char *org_string)
+{
+    char *scan_ptr, *write_ptr;
+    char *first_nonspace = NULL, *last_nonspace = NULL;
+
+    if(org_string == NULL) {
+        LOC_LOGE("%s:%d]: NULL parameter", __func__, __LINE__);
+        goto err;
+    }
+
+    scan_ptr = write_ptr = org_string;
+
+    while (*scan_ptr) {
+        //Find the first non-space character
+        if ( !isspace(*scan_ptr) && first_nonspace == NULL) {
+            first_nonspace = scan_ptr;
+        }
+        //Once the first non-space character is found in the
+        //above check, keep shifting the characters to the left
+        //to replace the spaces
+        if (first_nonspace != NULL) {
+            *(write_ptr++) = *scan_ptr;
+            //Keep track of which was the last non-space character
+            //encountered
+            //last_nonspace will not be updated in the case where
+            //the string ends with spaces
+            if ( !isspace(*scan_ptr)) {
+                last_nonspace = write_ptr;
+            }
+        }
+        scan_ptr++;
+    }
+    //Add NULL terminator after the last non-space character
+    if (last_nonspace) { *last_nonspace = '\0'; }
+err:
+    return;
+}
diff --git a/gps/utils/loc_misc_utils.h b/gps/utils/loc_misc_utils.h
new file mode 100644
index 0000000..7d66d84
--- /dev/null
+++ b/gps/utils/loc_misc_utils.h
@@ -0,0 +1,99 @@
+/* Copyright (c) 2014, 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 _LOC_MISC_UTILS_H_
+#define _LOC_MISC_UTILS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*===========================================================================
+FUNCTION loc_split_string
+
+DESCRIPTION:
+    This function is used to split a delimiter separated string into
+    sub-strings. This function does not allocate new memory to store the split
+    strings. Instead, it places '\0' in places of delimiters and assings the
+    starting address of the substring within the raw string as the string address
+    The input raw_string no longer remains to be a collection of sub-strings
+    after this function is executed.
+    Please make a copy of the input string before calling this function if
+    necessary
+
+PARAMETERS:
+    char *raw_string: is the original string with delimiter separated substrings
+    char **split_strings_ptr: is the arraw of pointers which will hold the addresses
+                              of individual substrings
+    int max_num_substrings: is the maximum number of substrings that are expected
+                            by the caller. The array of pointers in the above parameter
+                            is usually this long
+    char delimiter: is the delimiter that separates the substrings. Examples: ' ', ';'
+
+DEPENDENCIES
+    N/A
+
+RETURN VALUE
+    int Number of split strings
+
+SIDE EFFECTS
+    The input raw_string no longer remains a delimiter separated single string.
+
+EXAMPLE
+    delimiter = ' ' //space
+    raw_string = "hello new user" //delimiter is space ' '
+    addresses  =  0123456789abcd
+    split_strings_ptr[0] = &raw_string[0]; //split_strings_ptr[0] contains "hello"
+    split_strings_ptr[1] = &raw_string[6]; //split_strings_ptr[1] contains "new"
+    split_strings_ptr[2] = &raw_string[a]; //split_strings_ptr[2] contains "user"
+
+===========================================================================*/
+int loc_util_split_string(char *raw_string, char **split_strings_ptr, int max_num_substrings,
+                     char delimiter);
+
+/*===========================================================================
+FUNCTION trim_space
+
+DESCRIPTION
+   Removes leading and trailing spaces of the string
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   None
+
+SIDE EFFECTS
+   N/A
+===========================================================================*/
+void loc_util_trim_space(char *org_string);
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_LOC_MISC_UTILS_H_
diff --git a/gps/utils/loc_target.cpp b/gps/utils/loc_target.cpp
new file mode 100644
index 0000000..08f5584
--- /dev/null
+++ b/gps/utils/loc_target.cpp
@@ -0,0 +1,260 @@
+/* Copyright (c) 2012-2014, 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.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <hardware/gps.h>
+#include <cutils/properties.h>
+#include "loc_target.h"
+#include "loc_log.h"
+#include "log_util.h"
+
+#define APQ8064_ID_1 "109"
+#define APQ8064_ID_2 "153"
+#define MPQ8064_ID_1 "130"
+#define MSM8930_ID_1 "142"
+#define MSM8930_ID_2 "116"
+#define APQ8030_ID_1 "157"
+#define APQ8074_ID_1 "184"
+
+#define LINE_LEN 100
+#define STR_LIQUID    "Liquid"
+#define STR_SURF      "Surf"
+#define STR_MTP       "MTP"
+#define STR_APQ       "apq"
+#define STR_AUTO      "auto"
+#define IS_STR_END(c) ((c) == '\0' || (c) == '\n' || (c) == '\r')
+#define LENGTH(s) (sizeof(s) - 1)
+#define GPS_CHECK_NO_ERROR 0
+#define GPS_CHECK_NO_GPS_HW 1
+/* When system server is started, it uses 20 seconds as ActivityManager
+ * timeout. After that it sends SIGSTOP signal to process.
+ */
+#define QCA1530_DETECT_TIMEOUT 15
+#define QCA1530_DETECT_PRESENT "yes"
+#define QCA1530_DETECT_PROGRESS "detect"
+
+static unsigned int gTarget = (unsigned int)-1;
+
+static int read_a_line(const char * file_path, char * line, int line_size)
+{
+    FILE *fp;
+    int result = 0;
+
+    * line = '\0';
+    fp = fopen(file_path, "r" );
+    if( fp == NULL ) {
+        LOC_LOGE("open failed: %s: %s\n", file_path, strerror(errno));
+        result = -1;
+    } else {
+        int len;
+        fgets(line, line_size, fp);
+        len = strlen(line);
+        len = len < line_size - 1? len : line_size - 1;
+        line[len] = '\0';
+        LOC_LOGD("cat %s: %s", file_path, line);
+        fclose(fp);
+    }
+    return result;
+}
+
+/*!
+ * \brief Checks if QCA1530 is avalable.
+ *
+ * Function verifies if qca1530 SoC is configured on the device. The test is
+ * based on property value. For 1530 scenario, the value shall be one of the
+ * following: "yes", "no", "detect". All other values are treated equally to
+ * "no". When the value is "detect" the system waits for SoC detection to
+ * finish before returning result.
+ *
+ * \retval true - QCA1530 is available.
+ * \retval false - QCA1530 is not available.
+ */
+static bool is_qca1530(void)
+{
+    static const char qca1530_property_name[] = "sys.qca1530";
+    bool res = false;
+    int ret, i;
+    char buf[PROPERTY_VALUE_MAX];
+
+    memset(buf, 0, sizeof(buf));
+
+    for (i = 0; i < QCA1530_DETECT_TIMEOUT; ++i)
+    {
+        ret = property_get(qca1530_property_name, buf, NULL);
+        if (ret < 0)
+        {
+            LOC_LOGV( "qca1530: property %s is not accessible, ret=%d",
+                  qca1530_property_name,
+                  ret);
+
+            break;
+        }
+
+        LOC_LOGV( "qca1530: property %s is set to %s",
+                  qca1530_property_name,
+                  buf);
+
+        if (!memcmp(buf, QCA1530_DETECT_PRESENT,
+                    sizeof(QCA1530_DETECT_PRESENT)))
+        {
+            res = true;
+            break;
+        }
+        if (!memcmp(buf, QCA1530_DETECT_PROGRESS,
+                    sizeof(QCA1530_DETECT_PROGRESS)))
+        {
+            LOC_LOGV("qca1530: SoC detection is in progress.");
+            sleep(1);
+            continue;
+        }
+        break;
+    }
+
+    LOC_LOGD("qca1530: detected=%s", res ? "true" : "false");
+    return res;
+}
+
+/*The character array passed to this function should have length
+  of atleast PROPERTY_VALUE_MAX*/
+void loc_get_target_baseband(char *baseband, int array_length)
+{
+    if(baseband && (array_length >= PROPERTY_VALUE_MAX)) {
+        property_get("ro.baseband", baseband, "");
+        LOC_LOGD("%s:%d]: Baseband: %s\n", __func__, __LINE__, baseband);
+    }
+    else {
+        LOC_LOGE("%s:%d]: NULL parameter or array length less than PROPERTY_VALUE_MAX\n",
+                 __func__, __LINE__);
+    }
+}
+
+/*The character array passed to this function should have length
+  of atleast PROPERTY_VALUE_MAX*/
+void loc_get_platform_name(char *platform_name, int array_length)
+{
+    if(platform_name && (array_length >= PROPERTY_VALUE_MAX)) {
+        property_get("ro.board.platform", platform_name, "");
+        LOC_LOGD("%s:%d]: Target name: %s\n", __func__, __LINE__, platform_name);
+    }
+    else {
+        LOC_LOGE("%s:%d]: Null parameter or array length less than PROPERTY_VALUE_MAX\n",
+                 __func__, __LINE__);
+    }
+}
+
+unsigned int loc_get_target(void)
+{
+    if (gTarget != (unsigned int)-1)
+        return gTarget;
+
+    static const char hw_platform[]      = "/sys/devices/soc0/hw_platform";
+    static const char id[]               = "/sys/devices/soc0/soc_id";
+    static const char hw_platform_dep[]  =
+        "/sys/devices/system/soc/soc0/hw_platform";
+    static const char id_dep[]           = "/sys/devices/system/soc/soc0/id";
+    static const char mdm[]              = "/dev/mdm"; // No such file or directory
+
+    char rd_hw_platform[LINE_LEN];
+    char rd_id[LINE_LEN];
+    char rd_mdm[LINE_LEN];
+    char baseband[LINE_LEN];
+
+    if (is_qca1530()) {
+        gTarget = TARGET_QCA1530;
+        goto detected;
+    }
+
+    loc_get_target_baseband(baseband, sizeof(baseband));
+
+    if (!access(hw_platform, F_OK)) {
+        read_a_line(hw_platform, rd_hw_platform, LINE_LEN);
+    } else {
+        read_a_line(hw_platform_dep, rd_hw_platform, LINE_LEN);
+    }
+    if (!access(id, F_OK)) {
+        read_a_line(id, rd_id, LINE_LEN);
+    } else {
+        read_a_line(id_dep, rd_id, LINE_LEN);
+    }
+    if( !memcmp(baseband, STR_AUTO, LENGTH(STR_AUTO)) )
+    {
+          gTarget = TARGET_AUTO;
+          goto detected;
+    }
+    if( !memcmp(baseband, STR_APQ, LENGTH(STR_APQ)) ){
+
+        if( !memcmp(rd_id, MPQ8064_ID_1, LENGTH(MPQ8064_ID_1))
+            && IS_STR_END(rd_id[LENGTH(MPQ8064_ID_1)]) )
+            gTarget = TARGET_MPQ;
+        else
+            gTarget = TARGET_APQ_SA;
+    }
+    else {
+        if( (!memcmp(rd_hw_platform, STR_LIQUID, LENGTH(STR_LIQUID))
+             && IS_STR_END(rd_hw_platform[LENGTH(STR_LIQUID)])) ||
+            (!memcmp(rd_hw_platform, STR_SURF,   LENGTH(STR_SURF))
+             && IS_STR_END(rd_hw_platform[LENGTH(STR_SURF)])) ||
+            (!memcmp(rd_hw_platform, STR_MTP,   LENGTH(STR_MTP))
+             && IS_STR_END(rd_hw_platform[LENGTH(STR_MTP)]))) {
+
+            if (!read_a_line( mdm, rd_mdm, LINE_LEN))
+                gTarget = TARGET_MDM;
+        }
+        else if( (!memcmp(rd_id, MSM8930_ID_1, LENGTH(MSM8930_ID_1))
+                   && IS_STR_END(rd_id[LENGTH(MSM8930_ID_1)])) ||
+                  (!memcmp(rd_id, MSM8930_ID_2, LENGTH(MSM8930_ID_2))
+                   && IS_STR_END(rd_id[LENGTH(MSM8930_ID_2)])) )
+             gTarget = TARGET_MSM_NO_SSC;
+        else
+             gTarget = TARGET_UNKNOWN;
+    }
+
+detected:
+    LOC_LOGD("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()
+{
+    int ret = 0;
+    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/gps/utils/loc_target.h b/gps/utils/loc_target.h
new file mode 100644
index 0000000..3bb3b5e
--- /dev/null
+++ b/gps/utils/loc_target.h
@@ -0,0 +1,82 @@
+/* Copyright (c) 2012-2014, 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 LOC_TARGET_H
+#define LOC_TARGET_H
+#define TARGET_SET(gnss,ssc) ( (gnss<<1)|ssc )
+#define TARGET_DEFAULT       TARGET_SET(GNSS_MSM, HAS_SSC)
+#define TARGET_MDM           TARGET_SET(GNSS_MDM, HAS_SSC)
+#define TARGET_APQ_SA        TARGET_SET(GNSS_GSS, NO_SSC)
+#define TARGET_MPQ           TARGET_SET(GNSS_NONE,NO_SSC)
+#define TARGET_MSM_NO_SSC    TARGET_SET(GNSS_MSM, NO_SSC)
+#define TARGET_QCA1530       TARGET_SET(GNSS_QCA1530, NO_SSC)
+#define TARGET_AUTO          TARGET_SET(GNSS_AUTO, NO_SSC)
+#define TARGET_UNKNOWN       TARGET_SET(GNSS_UNKNOWN, NO_SSC)
+#define getTargetGnssType(target)  (target>>1)
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+unsigned int loc_get_target(void);
+
+/*The character array passed to this function should have length
+  of atleast PROPERTY_VALUE_MAX*/
+void loc_get_target_baseband(char *baseband, int array_length);
+/*The character array passed to this function should have length
+  of atleast PROPERTY_VALUE_MAX*/
+void loc_get_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 {
+    GNSS_NONE = 0,
+    GNSS_MSM,
+    GNSS_GSS,
+    GNSS_MDM,
+    GNSS_QCA1530,
+    GNSS_AUTO,
+    GNSS_UNKNOWN
+}GNSS_TARGET;
+
+typedef enum {
+    NO_SSC = 0,
+    HAS_SSC
+}SSC_TYPE;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*LOC_TARGET_H*/
diff --git a/gps/utils/loc_timer.c b/gps/utils/loc_timer.c
new file mode 100644
index 0000000..2beca5f
--- /dev/null
+++ b/gps/utils/loc_timer.c
@@ -0,0 +1,202 @@
+/* Copyright (c) 2013, 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.
+ *
+ */
+
+#include<stdio.h>
+#include<stdlib.h>
+#include<sys/time.h>
+#include "loc_timer.h"
+#include<time.h>
+#include<errno.h>
+
+enum timer_state {
+    READY = 100,
+    WAITING,
+    DONE,
+    ABORT
+};
+
+typedef struct {
+    loc_timer_callback callback_func;
+    void *user_data;
+    unsigned int time_msec;
+    pthread_cond_t timer_cond;
+    pthread_mutex_t timer_mutex;
+    enum timer_state state;
+}timer_data;
+
+static void *timer_thread(void *thread_data)
+{
+    int ret = -ETIMEDOUT;
+    struct timespec ts;
+    struct timeval tv;
+    timer_data* t = (timer_data*)thread_data;
+
+    LOC_LOGD("%s:%d]: Enter. Delay = %d\n", __func__, __LINE__, t->time_msec);
+
+    gettimeofday(&tv, NULL);
+    clock_gettime(CLOCK_REALTIME, &ts);
+    if(t->time_msec >= 1000) {
+        ts.tv_sec += t->time_msec/1000;
+        t->time_msec = t->time_msec % 1000;
+    }
+    if(t->time_msec)
+        ts.tv_nsec += t->time_msec * 1000000;
+    if(ts.tv_nsec > 999999999) {
+        LOC_LOGD("%s:%d]: Large nanosecs\n", __func__, __LINE__);
+        ts.tv_sec += 1;
+        ts.tv_nsec -= 1000000000;
+    }
+    LOC_LOGD("%s:%d]: ts.tv_sec:%d; ts.tv_nsec:%d\n"
+             "\t Current time: %d sec; %d nsec",
+             __func__, __LINE__, (int)ts.tv_sec, (int)ts.tv_nsec,
+             (int)tv.tv_sec, (int)tv.tv_usec*1000);
+
+    pthread_mutex_lock(&(t->timer_mutex));
+    if (READY == t->state) {
+        t->state = WAITING;
+        ret = pthread_cond_timedwait(&t->timer_cond, &t->timer_mutex, &ts);
+        t->state = DONE;
+    }
+    pthread_mutex_unlock(&(t->timer_mutex));
+
+    switch (ret) {
+    case ETIMEDOUT:
+        LOC_LOGV("%s:%d]: loc_timer timed out",  __func__, __LINE__);
+        break;
+    case 0:
+        LOC_LOGV("%s:%d]: loc_timer stopped",  __func__, __LINE__);
+        break;
+    case -ETIMEDOUT:
+        LOC_LOGV("%s:%d]: loc_timer cancelled",  __func__, __LINE__);
+        break;
+    default:
+        LOC_LOGE("%s:%d]: Call to pthread timedwait failed; ret=%d\n",
+                 __func__, __LINE__, ret);
+        break;
+    }
+
+    if(ETIMEDOUT == ret)
+        t->callback_func(t->user_data, ret);
+
+    // A (should be rare) race condition is that, when the loc_time_stop is called
+    // and acquired mutex, we reach here.  pthread_mutex_destroy will fail with
+    // error code EBUSY.  We give it 6 tries in 5 seconds.  Should be eanough time
+    // for loc_timer_stop to complete.  With the 7th try, we also perform unlock
+    // prior to destroy.
+    {
+        int i;
+        for (i = 0; EBUSY == pthread_mutex_destroy(&t->timer_mutex) && i <= 5; i++) {
+            if (i < 5) {
+                sleep(1);
+            } else {
+                // nah, forget it, something is seriously wrong.  Mutex has been
+                // held too long.  Unlock the mutext here.
+                pthread_mutex_unlock(&t->timer_mutex);
+            }
+        }
+    }
+    pthread_cond_destroy(&t->timer_cond);
+
+    free(t);
+    LOC_LOGD("%s:%d]: Exit\n", __func__, __LINE__);
+    return NULL;
+}
+
+void* loc_timer_start(unsigned int msec, loc_timer_callback cb_func,
+                      void* caller_data)
+{
+    timer_data *t=NULL;
+    pthread_attr_t tattr;
+    pthread_t id;
+    LOC_LOGD("%s:%d]: Enter\n", __func__, __LINE__);
+    if(cb_func == NULL || msec == 0) {
+        LOC_LOGE("%s:%d]: Error: Wrong parameters\n", __func__, __LINE__);
+        goto _err;
+    }
+    t = (timer_data *)calloc(1, sizeof(timer_data));
+    if(t == NULL) {
+        LOC_LOGE("%s:%d]: Could not allocate memory. Failing.\n",
+                 __func__, __LINE__);
+        goto _err;
+    }
+
+    if(pthread_cond_init(&(t->timer_cond), NULL)) {
+        LOC_LOGE("%s:%d]: Pthread cond init failed\n", __func__, __LINE__);
+        goto t_err;
+    }
+    if(pthread_mutex_init(&(t->timer_mutex), NULL)) {
+        LOC_LOGE("%s:%d]: Pthread mutex init failed\n", __func__, __LINE__);
+        goto cond_err;
+    }
+
+    t->callback_func = cb_func;
+    t->user_data = caller_data;
+    t->time_msec = msec;
+    t->state = READY;
+
+    if (pthread_attr_init(&tattr)) {
+        LOC_LOGE("%s:%d]: Pthread mutex init failed\n", __func__, __LINE__);
+        goto mutex_err;
+    }
+    pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED);
+
+    if(pthread_create(&(id), &tattr, timer_thread, (void *)t)) {
+        LOC_LOGE("%s:%d]: Could not create thread\n", __func__, __LINE__);
+        goto attr_err;
+    }
+
+    LOC_LOGD("%s:%d]: Created thread with id: %d\n",
+             __func__, __LINE__, (int)id);
+    goto _err;
+
+attr_err:
+    pthread_attr_destroy(&tattr);
+mutex_err:
+    pthread_mutex_destroy(&t->timer_mutex);
+cond_err:
+    pthread_cond_destroy(&t->timer_cond);
+t_err:
+    free(t);
+_err:
+    LOC_LOGD("%s:%d]: Exit\n", __func__, __LINE__);
+    return t;
+}
+
+void loc_timer_stop(void* handle) {
+    timer_data* t = (timer_data*)handle;
+
+    if (NULL != t && (READY == t->state || WAITING == t->state) &&
+        pthread_mutex_lock(&(t->timer_mutex)) == 0) {
+        if (READY == t->state || WAITING == t->state) {
+            pthread_cond_signal(&t->timer_cond);
+            t->state = ABORT;
+        }
+        pthread_mutex_unlock(&(t->timer_mutex));
+    }
+}
diff --git a/gps/utils/loc_timer.h b/gps/utils/loc_timer.h
new file mode 100644
index 0000000..0034d27
--- /dev/null
+++ b/gps/utils/loc_timer.h
@@ -0,0 +1,63 @@
+/* Copyright (c) 2013, 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 __LOC_DELAY_H__
+#define __LOC_DELAY_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+#include<pthread.h>
+#include "log_util.h"
+
+/*
+  Return values:
+  Success = 0
+  Failure = Non zero
+*/
+typedef void(*loc_timer_callback)(void *user_data, int result);
+
+
+/*
+  Returns the handle, which can be used to stop the timer
+*/
+void* loc_timer_start(unsigned int delay_msec,
+                      loc_timer_callback,
+                      void* user_data);
+
+/*
+  handle becomes invalid upon the return of the callback
+*/
+void loc_timer_stop(void* handle);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif //__LOC_DELAY_H__
diff --git a/gps/utils/log_util.h b/gps/utils/log_util.h
new file mode 100644
index 0000000..8ff6b5a
--- /dev/null
+++ b/gps/utils/log_util.h
@@ -0,0 +1,181 @@
+/* Copyright (c) 2011-2014 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 __LOG_UTIL_H__
+#define __LOG_UTIL_H__
+
+#ifndef USE_GLIB
+#include <utils/Log.h>
+#endif /* USE_GLIB */
+
+#ifdef USE_GLIB
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#ifndef LOG_TAG
+#define LOG_TAG "GPS_UTILS"
+
+#endif  // LOG_TAG
+
+#endif /* USE_GLIB */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/*=============================================================================
+ *
+ *                         LOC LOGGER TYPE DECLARATION
+ *
+ *============================================================================*/
+/* LOC LOGGER */
+typedef struct loc_logger_s
+{
+  unsigned long  DEBUG_LEVEL;
+  unsigned long  TIMESTAMP;
+} loc_logger_s_type;
+
+/*=============================================================================
+ *
+ *                               EXTERNAL DATA
+ *
+ *============================================================================*/
+extern loc_logger_s_type loc_logger;
+
+// Logging Improvements
+extern const char *loc_logger_boolStr[];
+
+extern const char *boolStr[];
+extern const char VOID_RET[];
+extern const char FROM_AFW[];
+extern const char TO_MODEM[];
+extern const char FROM_MODEM[];
+extern const char TO_AFW[];
+extern const char EXIT_TAG[];
+extern const char ENTRY_TAG[];
+/*=============================================================================
+ *
+ *                        MODULE EXPORTED FUNCTIONS
+ *
+ *============================================================================*/
+extern void loc_logger_init(unsigned long debug, unsigned long timestamp);
+extern char* get_timestamp(char* str, unsigned long buf_size);
+
+#ifndef DEBUG_DMN_LOC_API
+
+/* LOGGING MACROS */
+/*loc_logger.DEBUG_LEVEL is initialized to 0xff in loc_cfg.cpp
+  if that value remains unchanged, it means gps.conf did not
+  provide a value and we default to the initial value to use
+  Android's logging levels*/
+#define IF_LOC_LOGE if((loc_logger.DEBUG_LEVEL >= 1) && (loc_logger.DEBUG_LEVEL <= 5))
+
+#define IF_LOC_LOGW if((loc_logger.DEBUG_LEVEL >= 2) && (loc_logger.DEBUG_LEVEL <= 5))
+
+#define IF_LOC_LOGI if((loc_logger.DEBUG_LEVEL >= 3) && (loc_logger.DEBUG_LEVEL <= 5))
+
+#define IF_LOC_LOGD if((loc_logger.DEBUG_LEVEL >= 4) && (loc_logger.DEBUG_LEVEL <= 5))
+
+#define IF_LOC_LOGV if((loc_logger.DEBUG_LEVEL >= 5) && (loc_logger.DEBUG_LEVEL <= 5))
+
+#define LOC_LOGE(...) \
+IF_LOC_LOGE { ALOGE("E/" __VA_ARGS__); } \
+else if (loc_logger.DEBUG_LEVEL == 0xff) { ALOGE("E/" __VA_ARGS__); }
+
+#define LOC_LOGW(...) \
+IF_LOC_LOGW { ALOGE("W/" __VA_ARGS__); }  \
+else if (loc_logger.DEBUG_LEVEL == 0xff) { ALOGW("W/" __VA_ARGS__); }
+
+#define LOC_LOGI(...) \
+IF_LOC_LOGI { ALOGE("I/" __VA_ARGS__); }   \
+else if (loc_logger.DEBUG_LEVEL == 0xff) { ALOGI("I/" __VA_ARGS__); }
+
+#define LOC_LOGD(...) \
+IF_LOC_LOGD { ALOGE("D/" __VA_ARGS__); }   \
+else if (loc_logger.DEBUG_LEVEL == 0xff) { ALOGD("D/" __VA_ARGS__); }
+
+#define LOC_LOGV(...) \
+IF_LOC_LOGV { ALOGE("V/" __VA_ARGS__); }   \
+else if (loc_logger.DEBUG_LEVEL == 0xff) { ALOGV("V/" __VA_ARGS__); }
+
+#else /* DEBUG_DMN_LOC_API */
+
+#define LOC_LOGE(...) ALOGE("E/" __VA_ARGS__)
+
+#define LOC_LOGW(...) ALOGW("W/" __VA_ARGS__)
+
+#define LOC_LOGI(...) ALOGI("I/" __VA_ARGS__)
+
+#define LOC_LOGD(...) ALOGD("D/" __VA_ARGS__)
+
+#define LOC_LOGV(...) ALOGV("V/" __VA_ARGS__)
+
+#endif /* DEBUG_DMN_LOC_API */
+
+/*=============================================================================
+ *
+ *                          LOGGING IMPROVEMENT MACROS
+ *
+ *============================================================================*/
+#define LOG_(LOC_LOG, ID, WHAT, SPEC, VAL)                                    \
+    do {                                                                      \
+        if (loc_logger.TIMESTAMP) {                                           \
+            char ts[32];                                                      \
+            LOC_LOG("[%s] %s %s line %d " #SPEC,                              \
+                     get_timestamp(ts, sizeof(ts)), ID, WHAT, __LINE__, VAL); \
+        } else {                                                              \
+            LOC_LOG("%s %s line %d " #SPEC,                                   \
+                     ID, WHAT, __LINE__, VAL);                                \
+        }                                                                     \
+    } while(0)
+
+
+#define LOG_I(ID, WHAT, SPEC, VAL) LOG_(LOC_LOGI, ID, WHAT, SPEC, VAL)
+#define LOG_V(ID, WHAT, SPEC, VAL) LOG_(LOC_LOGV, ID, WHAT, SPEC, VAL)
+
+#define ENTRY_LOG() LOG_V(ENTRY_TAG, __func__, %s, "")
+#define EXIT_LOG(SPEC, VAL) LOG_V(EXIT_TAG, __func__, SPEC, VAL)
+
+
+// Used for logging callflow from Android Framework
+#define ENTRY_LOG_CALLFLOW() LOG_I(FROM_AFW, __func__, %s, "")
+// Used for logging callflow to Modem
+#define EXIT_LOG_CALLFLOW(SPEC, VAL) LOG_I(TO_MODEM, __func__, SPEC, VAL)
+// Used for logging callflow from Modem(TO_MODEM, __func__, %s, "")
+#define MODEM_LOG_CALLFLOW(SPEC, VAL) LOG_I(FROM_MODEM, __func__, SPEC, VAL)
+// Used for logging callflow to Android Framework
+#define CALLBACK_LOG_CALLFLOW(CB, SPEC, VAL) LOG_I(TO_AFW, CB, SPEC, VAL)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __LOG_UTIL_H__
diff --git a/gps/utils/msg_q.c b/gps/utils/msg_q.c
new file mode 100644
index 0000000..f82d4c0
--- /dev/null
+++ b/gps/utils/msg_q.c
@@ -0,0 +1,336 @@
+/* Copyright (c) 2011-2012, 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.
+ */
+
+#include "msg_q.h"
+
+#define LOG_TAG "LocSvc_utils_q"
+#include "log_util.h"
+#include "platform_lib_includes.h"
+#include "linked_list.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <pthread.h>
+
+typedef struct msg_q {
+   void* msg_list;                  /* Linked list to store information */
+   pthread_cond_t  list_cond;       /* Condition variable for waiting on msg queue */
+   pthread_mutex_t list_mutex;      /* Mutex for exclusive access to message queue */
+   int unblocked;                   /* Has this message queue been unblocked? */
+} msg_q;
+
+/*===========================================================================
+FUNCTION    convert_linked_list_err_type
+
+DESCRIPTION
+   Converts from one set of enum values to another.
+
+   linked_list_val: Value to convert to msg_q_enum_type
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Corresponding linked_list_enum_type in msg_q_enum_type
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+static msq_q_err_type convert_linked_list_err_type(linked_list_err_type linked_list_val)
+{
+   switch( linked_list_val )
+   {
+   case eLINKED_LIST_SUCCESS:
+      return eMSG_Q_SUCCESS;
+   case eLINKED_LIST_INVALID_PARAMETER:
+      return eMSG_Q_INVALID_PARAMETER;
+   case eLINKED_LIST_INVALID_HANDLE:
+      return eMSG_Q_INVALID_HANDLE;
+   case eLINKED_LIST_UNAVAILABLE_RESOURCE:
+      return eMSG_Q_UNAVAILABLE_RESOURCE;
+   case eLINKED_LIST_INSUFFICIENT_BUFFER:
+      return eMSG_Q_INSUFFICIENT_BUFFER;
+
+   case eLINKED_LIST_FAILURE_GENERAL:
+   default:
+      return eMSG_Q_FAILURE_GENERAL;
+   }
+}
+
+/* ----------------------- END INTERNAL FUNCTIONS ---------------------------------------- */
+
+/*===========================================================================
+
+  FUNCTION:   msg_q_init
+
+  ===========================================================================*/
+msq_q_err_type msg_q_init(void** msg_q_data)
+{
+   if( msg_q_data == NULL )
+   {
+      LOC_LOGE("%s: Invalid msg_q_data parameter!\n", __FUNCTION__);
+      return eMSG_Q_INVALID_PARAMETER;
+   }
+
+   msg_q* tmp_msg_q;
+   tmp_msg_q = (msg_q*)calloc(1, sizeof(msg_q));
+   if( tmp_msg_q == NULL )
+   {
+      LOC_LOGE("%s: Unable to allocate space for message queue!\n", __FUNCTION__);
+      return eMSG_Q_FAILURE_GENERAL;
+   }
+
+   if( linked_list_init(&tmp_msg_q->msg_list) != 0 )
+   {
+      LOC_LOGE("%s: Unable to initialize storage list!\n", __FUNCTION__);
+      free(tmp_msg_q);
+      return eMSG_Q_FAILURE_GENERAL;
+   }
+
+   if( pthread_mutex_init(&tmp_msg_q->list_mutex, NULL) != 0 )
+   {
+      LOC_LOGE("%s: Unable to initialize list mutex!\n", __FUNCTION__);
+      linked_list_destroy(&tmp_msg_q->msg_list);
+      free(tmp_msg_q);
+      return eMSG_Q_FAILURE_GENERAL;
+   }
+
+   if( pthread_cond_init(&tmp_msg_q->list_cond, NULL) != 0 )
+   {
+      LOC_LOGE("%s: Unable to initialize msg q cond var!\n", __FUNCTION__);
+      linked_list_destroy(&tmp_msg_q->msg_list);
+      pthread_mutex_destroy(&tmp_msg_q->list_mutex);
+      free(tmp_msg_q);
+      return eMSG_Q_FAILURE_GENERAL;
+   }
+
+   tmp_msg_q->unblocked = 0;
+
+   *msg_q_data = tmp_msg_q;
+
+   return eMSG_Q_SUCCESS;
+}
+
+/*===========================================================================
+
+  FUNCTION:   msg_q_init2
+
+  ===========================================================================*/
+const void* msg_q_init2()
+{
+  void* q = NULL;
+  if (eMSG_Q_SUCCESS != msg_q_init(&q)) {
+    q = NULL;
+  }
+  return q;
+}
+
+/*===========================================================================
+
+  FUNCTION:   msg_q_destroy
+
+  ===========================================================================*/
+msq_q_err_type msg_q_destroy(void** msg_q_data)
+{
+   if( msg_q_data == NULL )
+   {
+      LOC_LOGE("%s: Invalid msg_q_data parameter!\n", __FUNCTION__);
+      return eMSG_Q_INVALID_HANDLE;
+   }
+
+   msg_q* p_msg_q = (msg_q*)*msg_q_data;
+
+   linked_list_destroy(&p_msg_q->msg_list);
+   pthread_mutex_destroy(&p_msg_q->list_mutex);
+   pthread_cond_destroy(&p_msg_q->list_cond);
+
+   p_msg_q->unblocked = 0;
+
+   free(*msg_q_data);
+   *msg_q_data = NULL;
+
+   return eMSG_Q_SUCCESS;
+}
+
+/*===========================================================================
+
+  FUNCTION:   msg_q_snd
+
+  ===========================================================================*/
+msq_q_err_type msg_q_snd(void* msg_q_data, void* msg_obj, void (*dealloc)(void*))
+{
+   msq_q_err_type rv;
+   if( msg_q_data == NULL )
+   {
+      LOC_LOGE("%s: Invalid msg_q_data parameter!\n", __FUNCTION__);
+      return eMSG_Q_INVALID_HANDLE;
+   }
+   if( msg_obj == NULL )
+   {
+      LOC_LOGE("%s: Invalid msg_obj parameter!\n", __FUNCTION__);
+      return eMSG_Q_INVALID_PARAMETER;
+   }
+
+   msg_q* p_msg_q = (msg_q*)msg_q_data;
+
+   pthread_mutex_lock(&p_msg_q->list_mutex);
+   LOC_LOGD("%s: Sending message with handle = 0x%08X\n", __FUNCTION__, msg_obj);
+
+   if( p_msg_q->unblocked )
+   {
+      LOC_LOGE("%s: Message queue has been unblocked.\n", __FUNCTION__);
+      pthread_mutex_unlock(&p_msg_q->list_mutex);
+      return eMSG_Q_UNAVAILABLE_RESOURCE;
+   }
+
+   rv = convert_linked_list_err_type(linked_list_add(p_msg_q->msg_list, msg_obj, dealloc));
+
+   /* Show data is in the message queue. */
+   pthread_cond_signal(&p_msg_q->list_cond);
+
+   pthread_mutex_unlock(&p_msg_q->list_mutex);
+
+   LOC_LOGD("%s: Finished Sending message with handle = 0x%08X\n", __FUNCTION__, msg_obj);
+
+   return rv;
+}
+
+/*===========================================================================
+
+  FUNCTION:   msg_q_rcv
+
+  ===========================================================================*/
+msq_q_err_type msg_q_rcv(void* msg_q_data, void** msg_obj)
+{
+   msq_q_err_type rv;
+   if( msg_q_data == NULL )
+   {
+      LOC_LOGE("%s: Invalid msg_q_data parameter!\n", __FUNCTION__);
+      return eMSG_Q_INVALID_HANDLE;
+   }
+
+   if( msg_obj == NULL )
+   {
+      LOC_LOGE("%s: Invalid msg_obj parameter!\n", __FUNCTION__);
+      return eMSG_Q_INVALID_PARAMETER;
+   }
+
+   msg_q* p_msg_q = (msg_q*)msg_q_data;
+
+   LOC_LOGD("%s: Waiting on message\n", __FUNCTION__);
+
+   pthread_mutex_lock(&p_msg_q->list_mutex);
+
+   if( p_msg_q->unblocked )
+   {
+      LOC_LOGE("%s: Message queue has been unblocked.\n", __FUNCTION__);
+      pthread_mutex_unlock(&p_msg_q->list_mutex);
+      return eMSG_Q_UNAVAILABLE_RESOURCE;
+   }
+
+   /* Wait for data in the message queue */
+   while( linked_list_empty(p_msg_q->msg_list) && !p_msg_q->unblocked )
+   {
+      pthread_cond_wait(&p_msg_q->list_cond, &p_msg_q->list_mutex);
+   }
+
+   rv = convert_linked_list_err_type(linked_list_remove(p_msg_q->msg_list, msg_obj));
+
+   pthread_mutex_unlock(&p_msg_q->list_mutex);
+
+   LOC_LOGD("%s: Received message 0x%08X rv = %d\n", __FUNCTION__, *msg_obj, rv);
+
+   return rv;
+}
+
+/*===========================================================================
+
+  FUNCTION:   msg_q_flush
+
+  ===========================================================================*/
+msq_q_err_type msg_q_flush(void* msg_q_data)
+{
+   msq_q_err_type rv;
+   if ( msg_q_data == NULL )
+   {
+      LOC_LOGE("%s: Invalid msg_q_data parameter!\n", __FUNCTION__);
+      return eMSG_Q_INVALID_HANDLE;
+   }
+
+   msg_q* p_msg_q = (msg_q*)msg_q_data;
+
+   LOC_LOGD("%s: Flushing Message Queue\n", __FUNCTION__);
+
+   pthread_mutex_lock(&p_msg_q->list_mutex);
+
+   /* Remove all elements from the list */
+   rv = convert_linked_list_err_type(linked_list_flush(p_msg_q->msg_list));
+
+   pthread_mutex_unlock(&p_msg_q->list_mutex);
+
+   LOC_LOGD("%s: Message Queue flushed\n", __FUNCTION__);
+
+   return rv;
+}
+
+/*===========================================================================
+
+  FUNCTION:   msg_q_unblock
+
+  ===========================================================================*/
+msq_q_err_type msg_q_unblock(void* msg_q_data)
+{
+   if ( msg_q_data == NULL )
+   {
+      LOC_LOGE("%s: Invalid msg_q_data parameter!\n", __FUNCTION__);
+      return eMSG_Q_INVALID_HANDLE;
+   }
+
+   msg_q* p_msg_q = (msg_q*)msg_q_data;
+   pthread_mutex_lock(&p_msg_q->list_mutex);
+
+   if( p_msg_q->unblocked )
+   {
+      LOC_LOGE("%s: Message queue has been unblocked.\n", __FUNCTION__);
+      pthread_mutex_unlock(&p_msg_q->list_mutex);
+      return eMSG_Q_UNAVAILABLE_RESOURCE;
+   }
+
+   LOC_LOGD("%s: Unblocking Message Queue\n", __FUNCTION__);
+   /* Unblocking message queue */
+   p_msg_q->unblocked = 1;
+
+   /* Allow all the waiters to wake up */
+   pthread_cond_broadcast(&p_msg_q->list_cond);
+
+   pthread_mutex_unlock(&p_msg_q->list_mutex);
+
+   LOC_LOGD("%s: Message Queue unblocked\n", __FUNCTION__);
+
+   return eMSG_Q_SUCCESS;
+}
diff --git a/gps/utils/msg_q.h b/gps/utils/msg_q.h
new file mode 100644
index 0000000..453b8ce
--- /dev/null
+++ b/gps/utils/msg_q.h
@@ -0,0 +1,207 @@
+/* Copyright (c) 2011, 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 __MSG_Q_H__
+#define __MSG_Q_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <stdlib.h>
+
+/** Linked List Return Codes */
+typedef enum
+{
+  eMSG_Q_SUCCESS                             = 0,
+     /**< Request was successful. */
+  eMSG_Q_FAILURE_GENERAL                     = -1,
+     /**< Failed because of a general failure. */
+  eMSG_Q_INVALID_PARAMETER                   = -2,
+     /**< Failed because the request contained invalid parameters. */
+  eMSG_Q_INVALID_HANDLE                      = -3,
+     /**< Failed because an invalid handle was specified. */
+  eMSG_Q_UNAVAILABLE_RESOURCE                = -4,
+     /**< Failed because an there were not enough resources. */
+  eMSG_Q_INSUFFICIENT_BUFFER                 = -5,
+     /**< Failed because an the supplied buffer was too small. */
+}msq_q_err_type;
+
+/*===========================================================================
+FUNCTION    msg_q_init
+
+DESCRIPTION
+   Initializes internal structures for message queue.
+
+   msg_q_data: pointer to an opaque Q handle to be returned; NULL if fails
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Look at error codes above.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+msq_q_err_type msg_q_init(void** msg_q_data);
+
+/*===========================================================================
+FUNCTION    msg_q_init2
+
+DESCRIPTION
+   Initializes internal structures for message queue.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   opaque handle to the Q created; NULL if create fails
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+const void* msg_q_init2();
+
+/*===========================================================================
+FUNCTION    msg_q_destroy
+
+DESCRIPTION
+   Releases internal structures for message queue.
+
+   msg_q_data: State of message queue to be released.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Look at error codes above.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+msq_q_err_type msg_q_destroy(void** msg_q_data);
+
+/*===========================================================================
+FUNCTION    msg_q_snd
+
+DESCRIPTION
+   Sends data to the message queue. The passed in data pointer
+   is not modified or freed. Passed in msg_obj is expected to live throughout
+   the use of the msg_q (i.e. data is not allocated internally)
+
+   msg_q_data: Message Queue to add the element to.
+   msgp:       Pointer to data to add into message queue.
+   dealloc:    Function used to deallocate memory for this element. Pass NULL
+               if you do not want data deallocated during a flush operation
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Look at error codes above.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+msq_q_err_type msg_q_snd(void* msg_q_data, void* msg_obj, void (*dealloc)(void*));
+
+/*===========================================================================
+FUNCTION    msg_q_rcv
+
+DESCRIPTION
+   Retrieves data from the message queue. msg_obj is the oldest message received
+   and pointer is simply removed from message queue.
+
+   msg_q_data: Message Queue to copy data from into msgp.
+   msg_obj:    Pointer to space to copy msg_q contents to.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Look at error codes above.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+msq_q_err_type msg_q_rcv(void* msg_q_data, void** msg_obj);
+
+/*===========================================================================
+FUNCTION    msg_q_flush
+
+DESCRIPTION
+   Function removes all elements from the message queue.
+
+   msg_q_data: Message Queue to remove elements from.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Look at error codes above.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+msq_q_err_type msg_q_flush(void* msg_q_data);
+
+/*===========================================================================
+FUNCTION    msg_q_unblock
+
+DESCRIPTION
+   This function will stop use of the message queue. All waiters will wake up
+   and likely receive nothing from the queue resulting in a negative return
+   value. The message queue can no longer be used until it is destroyed
+   and initialized again after calling this function.
+
+   msg_q_data: Message queue to unblock.
+
+DEPENDENCIES
+   N/A
+
+RETURN VALUE
+   Look at error codes above.
+
+SIDE EFFECTS
+   N/A
+
+===========================================================================*/
+msq_q_err_type msg_q_unblock(void* msg_q_data);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __MSG_Q_H__ */
