summaryrefslogtreecommitdiff
path: root/core/LocAdapterBase.h
diff options
context:
space:
mode:
authorMike Cailean <mcailean@codeaurora.org>2018-05-15 10:21:09 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-06-12 09:46:49 -0700
commitb150a53ee3f02c8441754fcc6834802da7d96f40 (patch)
tree76aab803f16c7a350f020a3f7422cdd9c1535668 /core/LocAdapterBase.h
parentf7981a3c11485795568f0205d0cb4c549f135064 (diff)
downloadgps-b150a53ee3f02c8441754fcc6834802da7d96f40.tar.gz
Handle updating the carrier configuration
Set GPS_LOCK for cases where the modem has two SIMs Change-Id: I2745b9469b2f755b0a24be2a7f4ae514c35a37cb CRs-fixed: 2018029
Diffstat (limited to 'core/LocAdapterBase.h')
-rw-r--r--core/LocAdapterBase.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/core/LocAdapterBase.h b/core/LocAdapterBase.h
index a187a8d..e3502b2 100644
--- a/core/LocAdapterBase.h
+++ b/core/LocAdapterBase.h
@@ -59,6 +59,7 @@ class LocAdapterProxyBase;
class LocAdapterBase {
private:
static uint32_t mSessionIdCounter;
+ const bool mIsMaster;
protected:
LOC_API_ADAPTER_EVENT_MASK_T mEvtMask;
ContextBase* mContext;
@@ -66,12 +67,18 @@ protected:
LocAdapterProxyBase* mLocAdapterProxyBase;
const MsgTask* mMsgTask;
inline LocAdapterBase(const MsgTask* msgTask) :
- mEvtMask(0), mContext(NULL), mLocApi(NULL),
+ mIsMaster(false), mEvtMask(0), mContext(NULL), mLocApi(NULL),
mLocAdapterProxyBase(NULL), mMsgTask(msgTask) {}
+ LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
+ ContextBase* context, bool isMaster,
+ LocAdapterProxyBase *adapterProxyBase = NULL);
public:
inline virtual ~LocAdapterBase() { mLocApi->removeAdapter(this); }
- LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
- ContextBase* context, LocAdapterProxyBase *adapterProxyBase = NULL);
+ inline LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
+ ContextBase* context,
+ LocAdapterProxyBase *adapterProxyBase = NULL) :
+ LocAdapterBase(mask, context, false, adapterProxyBase) {}
+
inline LOC_API_ADAPTER_EVENT_MASK_T
checkMask(LOC_API_ADAPTER_EVENT_MASK_T mask) const {
return mEvtMask & mask;
@@ -111,6 +118,11 @@ public:
}
uint32_t generateSessionId();
+
+ inline bool isAdapterMaster() {
+ return mIsMaster;
+ }
+
virtual void handleEngineUpEvent();
virtual void handleEngineDownEvent();
inline virtual void setPositionModeCommand(LocPosMode& posMode) {