summaryrefslogtreecommitdiff
path: root/core/LocAdapterBase.h
diff options
context:
space:
mode:
authorJiafei Wen <jiafeiw@qca.qualcomm.com>2014-09-01 19:07:58 -0700
committerJiafei Wen <jiafeiw@codeaurora.org>2014-10-04 12:27:26 -0700
commit90378134eafcc137c157a40f92561d69cbf01a7a (patch)
treea1605afadb4388d745cc6494573961199b2bbb91 /core/LocAdapterBase.h
parent40931418ee675f292b571a91e08d852b79e6abb8 (diff)
downloadgps-90378134eafcc137c157a40f92561d69cbf01a7a.tar.gz
Checking messages supported or not
When device boots up, get a list of message supported by modem, based on which some adapeters will be able to update register masks. CRs-fixed: 601349 Change-Id: I6af282f8e551f1f3c6bf8795e968fdbc7b0a9fa3
Diffstat (limited to 'core/LocAdapterBase.h')
-rw-r--r--core/LocAdapterBase.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/core/LocAdapterBase.h b/core/LocAdapterBase.h
index 9348a89..2fec312 100644
--- a/core/LocAdapterBase.h
+++ b/core/LocAdapterBase.h
@@ -39,14 +39,15 @@ class LocAdapterProxyBase;
class LocAdapterBase {
protected:
- const LOC_API_ADAPTER_EVENT_MASK_T mEvtMask;
+ 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) {}
+ 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,
@@ -68,6 +69,15 @@ public:
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) {}