summaryrefslogtreecommitdiff
path: root/core/LocAdapterBase.cpp
diff options
context:
space:
mode:
authorKevin Tang <zhikait@codeaurora.org>2016-02-04 10:03:40 -0800
committerKevin Tang <zhikait@codeaurora.org>2016-02-04 10:03:40 -0800
commit1aeb6bad84c0afd0e032c3d4d7e33959501e18f1 (patch)
tree3518628e958d4e939b72e1d32a1618e6056e653d /core/LocAdapterBase.cpp
parentdb367819e26af1a6b8cb013e0dcda575d242c732 (diff)
parent89f41a9b1602ce82ea6272f2a3be8595fb4b6058 (diff)
Merging m_master changes to oe_master
Merging LA m_master changes to oe_master merge head - 89f41a9b1602ce82ea6272f2a3be8595fb4b6058 Change-Id: I9010487f1d6f3d2e30a568b441bc5f9b719a0fb1
Diffstat (limited to 'core/LocAdapterBase.cpp')
-rw-r--r--core/LocAdapterBase.cpp41
1 files changed, 32 insertions, 9 deletions
diff --git a/core/LocAdapterBase.cpp b/core/LocAdapterBase.cpp
index 054a295..8fdb8cb 100644
--- a/core/LocAdapterBase.cpp
+++ b/core/LocAdapterBase.cpp
@@ -32,7 +32,8 @@
#include <dlfcn.h>
#include <LocAdapterBase.h>
#include <loc_target.h>
-#include <platform_lib_includes.h>
+#include <log_util.h>
+#include <LocAdapterProxyBase.h>
namespace loc_core {
@@ -41,27 +42,45 @@ namespace loc_core {
// 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) :
+ ContextBase* context, LocAdapterProxyBase *adapterProxyBase) :
mEvtMask(mask), mContext(context),
- mLocApi(context->getLocApi()), mMsgTask(context->getMsgTask())
+ mLocApi(context->getLocApi()), mLocAdapterProxyBase(adapterProxyBase),
+ mMsgTask(context->getMsgTask())
{
mLocApi->addAdapter(this);
}
-void LocAdapterBase::
- handleEngineDownEvent()
-DEFAULT_IMPL()
+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)
-DEFAULT_IMPL()
+ LocPosTechMask loc_technology_mask) {
+ if (mLocAdapterProxyBase == NULL ||
+ !mLocAdapterProxyBase->reportPosition(location,
+ locationExtended,
+ status,
+ loc_technology_mask)) {
+ DEFAULT_IMPL()
+ }
+}
void LocAdapterBase::
- reportSv(GpsSvStatus &svStatus,
+ reportSv(GnssSvStatus &svStatus,
GpsLocationExtended &locationExtended,
void* svExt)
DEFAULT_IMPL()
@@ -116,4 +135,8 @@ DEFAULT_IMPL(false)
bool LocAdapterBase::
requestNiNotify(GpsNiNotification &notify, const void* data)
DEFAULT_IMPL(false)
+
+void LocAdapterBase::
+ reportGpsMeasurementData(GpsData &gpsMeasurementData)
+DEFAULT_IMPL()
} // namespace loc_core