Changes for liblbs_core

Added new module liblbs_core to make
LocApiV02 independent of pre-built binaries.
This patch provies the necessary changes to
support the new module
CRs-fixed: 538124

Change-Id: I716cf169de9dae164a141651af971793099a927d
diff --git a/core/Android.mk b/core/Android.mk
index 298c413..11cecc6 100644
--- a/core/Android.mk
+++ b/core/Android.mk
@@ -38,7 +38,7 @@
     LocAdapterBase.h \
     ContextBase.h \
     LocDualContext.h \
-    IzatProxyBase.h \
+    LBSProxyBase.h \
     UlpProxyBase.h \
     gps_extended_c.h \
     gps_extended.h \
diff --git a/core/ContextBase.cpp b/core/ContextBase.cpp
index 1826ec7..7879015 100644
--- a/core/ContextBase.cpp
+++ b/core/ContextBase.cpp
@@ -40,21 +40,22 @@
 
 namespace loc_core {
 
-
-IzatProxyBase* ContextBase::getIzatProxy(const char* libName)
+LBSProxyBase* ContextBase::getLBSProxy(const char* libName)
 {
-    IzatProxyBase* proxy = NULL;
+    LBSProxyBase* proxy = NULL;
+    LOC_LOGD("%s:%d]: getLBSProxy libname: %s\n", __func__, __LINE__, libName);
     void* lib = dlopen(libName, RTLD_NOW);
 
     if ((void*)NULL != lib) {
-        getIzatProxy_t* getter = (getIzatProxy_t*)dlsym(lib, "getIzatProxy");
+        getLBSProxy_t* getter = (getLBSProxy_t*)dlsym(lib, "getLBSProxy");
         if (NULL != getter) {
             proxy = (*getter)();
         }
     }
     if (NULL == proxy) {
-        proxy = new IzatProxyBase();
+        proxy = new LBSProxyBase();
     }
+    LOC_LOGD("%s:%d]: Exiting\n", __func__, __LINE__);
     return proxy;
 }
 
@@ -64,7 +65,7 @@
 
     // first if can not be MPQ
     if (TARGET_MPQ != get_target()) {
-        if (NULL == (locApi = mIzatProxy->getLocApi(mMsgTask, exMask))) {
+        if (NULL == (locApi = mLBSProxy->getLocApi(mMsgTask, exMask))) {
             // only RPC is the option now
             void* handle = dlopen("libloc_api-rpc-qc.so", RTLD_NOW);
             if (NULL != handle) {
@@ -88,7 +89,7 @@
 ContextBase::ContextBase(const MsgTask* msgTask,
                          LOC_API_ADAPTER_EVENT_MASK_T exMask,
                          const char* libName) :
-    mIzatProxy(getIzatProxy(libName)),
+    mLBSProxy(getLBSProxy(libName)),
     mMsgTask(msgTask),
     mLocApi(createLocApi(exMask))
 {
diff --git a/core/ContextBase.h b/core/ContextBase.h
index fc60db4..93cb31f 100644
--- a/core/ContextBase.h
+++ b/core/ContextBase.h
@@ -33,17 +33,17 @@
 #include <ctype.h>
 #include <MsgTask.h>
 #include <LocApiBase.h>
-#include <IzatProxyBase.h>
+#include <LBSProxyBase.h>
 
 namespace loc_core {
 
 class LocAdapterBase;
 
 class ContextBase {
-    static IzatProxyBase* getIzatProxy(const char* libName);
+    static LBSProxyBase* getLBSProxy(const char* libName);
     LocApiBase* createLocApi(LOC_API_ADAPTER_EVENT_MASK_T excludedMask);
 protected:
-    const IzatProxyBase* mIzatProxy;
+    const LBSProxyBase* mLBSProxy;
     const MsgTask* mMsgTask;
     LocApiBase* mLocApi;
 
@@ -51,14 +51,14 @@
     ContextBase(const MsgTask* msgTask,
                 LOC_API_ADAPTER_EVENT_MASK_T exMask,
                 const char* libName);
-    inline virtual ~ContextBase() { delete mLocApi; delete mIzatProxy; }
+    inline virtual ~ContextBase() { delete mLocApi; delete mLBSProxy; }
 
     inline const MsgTask* getMsgTask() { return mMsgTask; }
     inline LocApiBase* getLocApi() { return mLocApi; }
-    inline bool hasAgpsExt() { return mIzatProxy->hasAgpsExt(); }
+    inline bool hasAgpsExt() { return mLBSProxy->hasAgpsExt(); }
     inline void requestUlp(LocAdapterBase* adapter,
                            unsigned long capabilities) {
-        mIzatProxy->requestUlp(adapter, capabilities);
+        mLBSProxy->requestUlp(adapter, capabilities);
     }
 };
 
diff --git a/core/IzatProxyBase.h b/core/LBSProxyBase.h
similarity index 94%
rename from core/IzatProxyBase.h
rename to core/LBSProxyBase.h
index e7e3d3f..e643d12 100644
--- a/core/IzatProxyBase.h
+++ b/core/LBSProxyBase.h
@@ -28,7 +28,6 @@
  */
 #ifndef IZAT_PROXY_BASE_H
 #define IZAT_PROXY_BASE_H
-
 #include <gps_extended.h>
 #include <MsgTask.h>
 
@@ -37,7 +36,7 @@
 class LocApiBase;
 class LocAdapterBase;
 
-class IzatProxyBase {
+class LBSProxyBase {
     friend class ContextBase;
     inline virtual LocApiBase*
         getLocApi(const MsgTask* msgTask,
@@ -45,15 +44,15 @@
         return NULL;
     }
 protected:
-    inline IzatProxyBase() {}
+    inline LBSProxyBase() {}
 public:
-    inline virtual ~IzatProxyBase() {}
+    inline virtual ~LBSProxyBase() {}
     inline virtual void requestUlp(LocAdapterBase* adapter,
                                    unsigned long capabilities) const {}
     inline virtual bool hasAgpsExt() const { return false; }
 };
 
-typedef IzatProxyBase* (getIzatProxy_t)();
+typedef LBSProxyBase* (getLBSProxy_t)();
 
 } // namespace loc_core
 
diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp
index 6ba72f9..025bce0 100644
--- a/core/LocApiBase.cpp
+++ b/core/LocApiBase.cpp
@@ -296,6 +296,11 @@
     TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestNiNotify(notify, data));
 }
 
+void* LocApiBase :: getSibling()
+    DEFAULT_IMPL(NULL)
+void* LocApiBase :: getSibling2()
+    DEFAULT_IMPL(NULL)
+
 enum loc_api_adapter_err LocApiBase::
    open(LOC_API_ADAPTER_EVENT_MASK_T mask)
 DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
diff --git a/core/LocApiBase.h b/core/LocApiBase.h
index 861b36f..5542d4c 100644
--- a/core/LocApiBase.h
+++ b/core/LocApiBase.h
@@ -33,7 +33,7 @@
 #include <ctype.h>
 #include <gps_extended.h>
 #include <MsgTask.h>
-
+#include <log_util.h>
 namespace loc_core {
 
 int hexcode(char *hexstring, int string_size,
@@ -77,8 +77,6 @@
     bool isInSession();
 
 public:
-    inline virtual void* getSibling() { return NULL; }
-
     void addAdapter(LocAdapterBase* adapter);
     void removeAdapter(LocAdapterBase* adapter);
 
@@ -111,6 +109,9 @@
     // 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 void* getSibling2();
     virtual enum loc_api_adapter_err
         startFix(const LocPosMode& posMode);
     virtual enum loc_api_adapter_err
diff --git a/core/LocDualContext.cpp b/core/LocDualContext.cpp
index 5c0c9a7..86c3613 100644
--- a/core/LocDualContext.cpp
+++ b/core/LocDualContext.cpp
@@ -58,7 +58,7 @@
 
 // the name must be shorter than 15 chars
 const char* LocDualContext::mLocationHalName = "Loc_hal_worker";
-const char* LocDualContext::mIzatLibName = "libizat_core.so";
+const char* LocDualContext::mIzatLibName = "liblbs_core.so";
 
 const MsgTask* LocDualContext::getMsgTask(MsgTask::tCreate tCreator,
                                           const char* name)