Merge "Renaming class members for improved readability"
This commit is contained in:
commit
c7516bbad1
6 changed files with 38 additions and 34 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -56,8 +56,8 @@ public:
|
||||||
inline const MsgTask* getMsgTask() { return mMsgTask; }
|
inline const MsgTask* getMsgTask() { return mMsgTask; }
|
||||||
inline LocApiBase* getLocApi() { return mLocApi; }
|
inline LocApiBase* getLocApi() { return mLocApi; }
|
||||||
inline LocApiProxyBase* getLocApiProxy() { return mLocApiProxy; }
|
inline LocApiProxyBase* getLocApiProxy() { return mLocApiProxy; }
|
||||||
inline bool hasAgpsExt() { return mLBSProxy->hasAgpsExt(); }
|
inline bool hasAgpsExtendedCapabilities() { return mLBSProxy->hasAgpsExtendedCapabilities(); }
|
||||||
inline bool hasCPIExt() { return mLBSProxy->hasCPIExt(); }
|
inline bool hasCPIExtendedCapabilities() { return mLBSProxy->hasCPIExtendedCapabilities(); }
|
||||||
inline void requestUlp(LocAdapterBase* adapter,
|
inline void requestUlp(LocAdapterBase* adapter,
|
||||||
unsigned long capabilities) {
|
unsigned long capabilities) {
|
||||||
mLBSProxy->requestUlp(adapter, capabilities);
|
mLBSProxy->requestUlp(adapter, capabilities);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -49,8 +49,8 @@ public:
|
||||||
inline virtual ~LBSProxyBase() {}
|
inline virtual ~LBSProxyBase() {}
|
||||||
inline virtual void requestUlp(LocAdapterBase* adapter,
|
inline virtual void requestUlp(LocAdapterBase* adapter,
|
||||||
unsigned long capabilities) const {}
|
unsigned long capabilities) const {}
|
||||||
inline virtual bool hasAgpsExt() const { return false; }
|
inline virtual bool hasAgpsExtendedCapabilities() const { return false; }
|
||||||
inline virtual bool hasCPIExt() const { return false; }
|
inline virtual bool hasCPIExtendedCapabilities() const { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef LBSProxyBase* (getLBSProxy_t)();
|
typedef LBSProxyBase* (getLBSProxy_t)();
|
||||||
|
|
|
@ -65,7 +65,7 @@ LocEngAdapter::LocEngAdapter(LOC_API_ADAPTER_EVENT_MASK_T mask,
|
||||||
:context),
|
:context),
|
||||||
mOwner(owner), mInternalAdapter(new LocInternalAdapter(this)),
|
mOwner(owner), mInternalAdapter(new LocInternalAdapter(this)),
|
||||||
mUlp(new UlpProxyBase()), mNavigating(false),
|
mUlp(new UlpProxyBase()), mNavigating(false),
|
||||||
mAgpsEnabled(false), mCPIEnabled(false)
|
mSupportsAgpsExtendedCapabilities(false), mSupportsCPIExtendedCapabilities(false)
|
||||||
{
|
{
|
||||||
memset(&mFixCriteria, 0, sizeof(mFixCriteria));
|
memset(&mFixCriteria, 0, sizeof(mFixCriteria));
|
||||||
mFixCriteria.mode = LOC_POSITION_MODE_INVALID;
|
mFixCriteria.mode = LOC_POSITION_MODE_INVALID;
|
||||||
|
@ -210,84 +210,84 @@ bool LocEngAdapter::reportXtraServer(const char* url1,
|
||||||
const char* url3,
|
const char* url3,
|
||||||
const int maxlength)
|
const int maxlength)
|
||||||
{
|
{
|
||||||
if (mAgpsEnabled) {
|
if (mSupportsAgpsExtendedCapabilities) {
|
||||||
sendMsg(new LocEngReportXtraServer(mOwner, url1,
|
sendMsg(new LocEngReportXtraServer(mOwner, url1,
|
||||||
url2, url3, maxlength));
|
url2, url3, maxlength));
|
||||||
}
|
}
|
||||||
return mAgpsEnabled;
|
return mSupportsAgpsExtendedCapabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
bool LocEngAdapter::requestATL(int connHandle, AGpsType agps_type)
|
bool LocEngAdapter::requestATL(int connHandle, AGpsType agps_type)
|
||||||
{
|
{
|
||||||
if (mAgpsEnabled) {
|
if (mSupportsAgpsExtendedCapabilities) {
|
||||||
sendMsg(new LocEngRequestATL(mOwner,
|
sendMsg(new LocEngRequestATL(mOwner,
|
||||||
connHandle, agps_type));
|
connHandle, agps_type));
|
||||||
}
|
}
|
||||||
return mAgpsEnabled;
|
return mSupportsAgpsExtendedCapabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
bool LocEngAdapter::releaseATL(int connHandle)
|
bool LocEngAdapter::releaseATL(int connHandle)
|
||||||
{
|
{
|
||||||
if (mAgpsEnabled) {
|
if (mSupportsAgpsExtendedCapabilities) {
|
||||||
sendMsg(new LocEngReleaseATL(mOwner, connHandle));
|
sendMsg(new LocEngReleaseATL(mOwner, connHandle));
|
||||||
}
|
}
|
||||||
return mAgpsEnabled;
|
return mSupportsAgpsExtendedCapabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
bool LocEngAdapter::requestXtraData()
|
bool LocEngAdapter::requestXtraData()
|
||||||
{
|
{
|
||||||
if (mAgpsEnabled) {
|
if (mSupportsAgpsExtendedCapabilities) {
|
||||||
sendMsg(new LocEngRequestXtra(mOwner));
|
sendMsg(new LocEngRequestXtra(mOwner));
|
||||||
}
|
}
|
||||||
return mAgpsEnabled;
|
return mSupportsAgpsExtendedCapabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
bool LocEngAdapter::requestTime()
|
bool LocEngAdapter::requestTime()
|
||||||
{
|
{
|
||||||
if (mAgpsEnabled) {
|
if (mSupportsAgpsExtendedCapabilities) {
|
||||||
sendMsg(new LocEngRequestTime(mOwner));
|
sendMsg(new LocEngRequestTime(mOwner));
|
||||||
}
|
}
|
||||||
return mAgpsEnabled;
|
return mSupportsAgpsExtendedCapabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
bool LocEngAdapter::requestNiNotify(GpsNiNotification ¬if, const void* data)
|
bool LocEngAdapter::requestNiNotify(GpsNiNotification ¬if, const void* data)
|
||||||
{
|
{
|
||||||
if (mAgpsEnabled) {
|
if (mSupportsAgpsExtendedCapabilities) {
|
||||||
notif.size = sizeof(notif);
|
notif.size = sizeof(notif);
|
||||||
notif.timeout = LOC_NI_NO_RESPONSE_TIME;
|
notif.timeout = LOC_NI_NO_RESPONSE_TIME;
|
||||||
|
|
||||||
sendMsg(new LocEngRequestNi(mOwner, notif, data));
|
sendMsg(new LocEngRequestNi(mOwner, notif, data));
|
||||||
}
|
}
|
||||||
return mAgpsEnabled;
|
return mSupportsAgpsExtendedCapabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
bool LocEngAdapter::requestSuplES(int connHandle)
|
bool LocEngAdapter::requestSuplES(int connHandle)
|
||||||
{
|
{
|
||||||
if (mAgpsEnabled)
|
if (mSupportsAgpsExtendedCapabilities)
|
||||||
sendMsg(new LocEngRequestSuplEs(mOwner, connHandle));
|
sendMsg(new LocEngRequestSuplEs(mOwner, connHandle));
|
||||||
return mAgpsEnabled;
|
return mSupportsAgpsExtendedCapabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
bool LocEngAdapter::reportDataCallOpened()
|
bool LocEngAdapter::reportDataCallOpened()
|
||||||
{
|
{
|
||||||
if(mAgpsEnabled)
|
if(mSupportsAgpsExtendedCapabilities)
|
||||||
sendMsg(new LocEngSuplEsOpened(mOwner));
|
sendMsg(new LocEngSuplEsOpened(mOwner));
|
||||||
return mAgpsEnabled;
|
return mSupportsAgpsExtendedCapabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
bool LocEngAdapter::reportDataCallClosed()
|
bool LocEngAdapter::reportDataCallClosed()
|
||||||
{
|
{
|
||||||
if(mAgpsEnabled)
|
if(mSupportsAgpsExtendedCapabilities)
|
||||||
sendMsg(new LocEngSuplEsClosed(mOwner));
|
sendMsg(new LocEngSuplEsClosed(mOwner));
|
||||||
return mAgpsEnabled;
|
return mSupportsAgpsExtendedCapabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -76,8 +76,8 @@ class LocEngAdapter : public LocAdapterBase {
|
||||||
bool mNavigating;
|
bool mNavigating;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool mAgpsEnabled;
|
bool mSupportsAgpsExtendedCapabilities;
|
||||||
bool mCPIEnabled;
|
bool mSupportsCPIExtendedCapabilities;
|
||||||
|
|
||||||
LocEngAdapter(LOC_API_ADAPTER_EVENT_MASK_T mask,
|
LocEngAdapter(LOC_API_ADAPTER_EVENT_MASK_T mask,
|
||||||
void* owner,ContextBase* context,
|
void* owner,ContextBase* context,
|
||||||
|
@ -91,8 +91,12 @@ public:
|
||||||
inline LocInternalAdapter* getInternalAdapter() { return mInternalAdapter; }
|
inline LocInternalAdapter* getInternalAdapter() { return mInternalAdapter; }
|
||||||
inline UlpProxyBase* getUlpProxy() { return mUlp; }
|
inline UlpProxyBase* getUlpProxy() { return mUlp; }
|
||||||
inline void* getOwner() { return mOwner; }
|
inline void* getOwner() { return mOwner; }
|
||||||
inline bool hasAgpsExt() { return mContext->hasAgpsExt(); }
|
inline bool hasAgpsExtendedCapabilities() {
|
||||||
inline bool hasCPIExt() { return mContext->hasCPIExt(); }
|
return mContext->hasAgpsExtendedCapabilities();
|
||||||
|
}
|
||||||
|
inline bool hasCPIExtendedCapabilities() {
|
||||||
|
return mContext->hasCPIExtendedCapabilities();
|
||||||
|
}
|
||||||
inline const MsgTask* getMsgTask() { return mMsgTask; }
|
inline const MsgTask* getMsgTask() { return mMsgTask; }
|
||||||
|
|
||||||
inline enum loc_api_adapter_err
|
inline enum loc_api_adapter_err
|
||||||
|
|
|
@ -286,8 +286,8 @@ static int loc_init(GpsCallbacks* callbacks)
|
||||||
|
|
||||||
retVal = loc_eng_init(loc_afw_data, &clientCallbacks, event, NULL);
|
retVal = loc_eng_init(loc_afw_data, &clientCallbacks, event, NULL);
|
||||||
loc_afw_data.adapter->requestUlp(gps_conf.CAPABILITIES);
|
loc_afw_data.adapter->requestUlp(gps_conf.CAPABILITIES);
|
||||||
loc_afw_data.adapter->mAgpsEnabled = !loc_afw_data.adapter->hasAgpsExt();
|
loc_afw_data.adapter->mSupportsAgpsExtendedCapabilities = !loc_afw_data.adapter->hasAgpsExtendedCapabilities();
|
||||||
loc_afw_data.adapter->mCPIEnabled = !loc_afw_data.adapter->hasCPIExt();
|
loc_afw_data.adapter->mSupportsCPIExtendedCapabilities = !loc_afw_data.adapter->hasCPIExtendedCapabilities();
|
||||||
|
|
||||||
if(retVal) {
|
if(retVal) {
|
||||||
LOC_LOGE("loc_eng_init() fail!");
|
LOC_LOGE("loc_eng_init() fail!");
|
||||||
|
|
|
@ -1877,7 +1877,7 @@ int loc_eng_inject_location(loc_eng_data_s_type &loc_eng_data, double latitude,
|
||||||
ENTRY_LOG_CALLFLOW();
|
ENTRY_LOG_CALLFLOW();
|
||||||
INIT_CHECK(loc_eng_data.adapter, return -1);
|
INIT_CHECK(loc_eng_data.adapter, return -1);
|
||||||
LocEngAdapter* adapter = loc_eng_data.adapter;
|
LocEngAdapter* adapter = loc_eng_data.adapter;
|
||||||
if(!adapter->mCPIEnabled)
|
if(!adapter->mSupportsCPIExtendedCapabilities)
|
||||||
{
|
{
|
||||||
adapter->sendMsg(new LocEngInjectLocation(adapter, latitude, longitude,
|
adapter->sendMsg(new LocEngInjectLocation(adapter, latitude, longitude,
|
||||||
accuracy));
|
accuracy));
|
||||||
|
@ -2093,7 +2093,7 @@ void loc_eng_agps_init(loc_eng_data_s_type &loc_eng_data, AGpsExtCallbacks* call
|
||||||
AGPS_TYPE_SUPL,
|
AGPS_TYPE_SUPL,
|
||||||
false);
|
false);
|
||||||
|
|
||||||
if (adapter->mAgpsEnabled) {
|
if (adapter->mSupportsAgpsExtendedCapabilities) {
|
||||||
loc_eng_data.adapter->sendMsg(new LocEngDataClientInit(&loc_eng_data));
|
loc_eng_data.adapter->sendMsg(new LocEngDataClientInit(&loc_eng_data));
|
||||||
|
|
||||||
loc_eng_dmn_conn_loc_api_server_launch(callbacks->create_thread_cb,
|
loc_eng_dmn_conn_loc_api_server_launch(callbacks->create_thread_cb,
|
||||||
|
|
Loading…
Reference in a new issue