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
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -56,8 +56,8 @@ public:
|
|||
inline const MsgTask* getMsgTask() { return mMsgTask; }
|
||||
inline LocApiBase* getLocApi() { return mLocApi; }
|
||||
inline LocApiProxyBase* getLocApiProxy() { return mLocApiProxy; }
|
||||
inline bool hasAgpsExt() { return mLBSProxy->hasAgpsExt(); }
|
||||
inline bool hasCPIExt() { return mLBSProxy->hasCPIExt(); }
|
||||
inline bool hasAgpsExtendedCapabilities() { return mLBSProxy->hasAgpsExtendedCapabilities(); }
|
||||
inline bool hasCPIExtendedCapabilities() { return mLBSProxy->hasCPIExtendedCapabilities(); }
|
||||
inline void requestUlp(LocAdapterBase* adapter,
|
||||
unsigned long 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
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -49,8 +49,8 @@ public:
|
|||
inline virtual ~LBSProxyBase() {}
|
||||
inline virtual void requestUlp(LocAdapterBase* adapter,
|
||||
unsigned long capabilities) const {}
|
||||
inline virtual bool hasAgpsExt() const { return false; }
|
||||
inline virtual bool hasCPIExt() const { return false; }
|
||||
inline virtual bool hasAgpsExtendedCapabilities() const { return false; }
|
||||
inline virtual bool hasCPIExtendedCapabilities() const { return false; }
|
||||
};
|
||||
|
||||
typedef LBSProxyBase* (getLBSProxy_t)();
|
||||
|
|
|
@ -65,7 +65,7 @@ LocEngAdapter::LocEngAdapter(LOC_API_ADAPTER_EVENT_MASK_T mask,
|
|||
:context),
|
||||
mOwner(owner), mInternalAdapter(new LocInternalAdapter(this)),
|
||||
mUlp(new UlpProxyBase()), mNavigating(false),
|
||||
mAgpsEnabled(false), mCPIEnabled(false)
|
||||
mSupportsAgpsExtendedCapabilities(false), mSupportsCPIExtendedCapabilities(false)
|
||||
{
|
||||
memset(&mFixCriteria, 0, sizeof(mFixCriteria));
|
||||
mFixCriteria.mode = LOC_POSITION_MODE_INVALID;
|
||||
|
@ -210,84 +210,84 @@ bool LocEngAdapter::reportXtraServer(const char* url1,
|
|||
const char* url3,
|
||||
const int maxlength)
|
||||
{
|
||||
if (mAgpsEnabled) {
|
||||
if (mSupportsAgpsExtendedCapabilities) {
|
||||
sendMsg(new LocEngReportXtraServer(mOwner, url1,
|
||||
url2, url3, maxlength));
|
||||
}
|
||||
return mAgpsEnabled;
|
||||
return mSupportsAgpsExtendedCapabilities;
|
||||
}
|
||||
|
||||
inline
|
||||
bool LocEngAdapter::requestATL(int connHandle, AGpsType agps_type)
|
||||
{
|
||||
if (mAgpsEnabled) {
|
||||
if (mSupportsAgpsExtendedCapabilities) {
|
||||
sendMsg(new LocEngRequestATL(mOwner,
|
||||
connHandle, agps_type));
|
||||
}
|
||||
return mAgpsEnabled;
|
||||
return mSupportsAgpsExtendedCapabilities;
|
||||
}
|
||||
|
||||
inline
|
||||
bool LocEngAdapter::releaseATL(int connHandle)
|
||||
{
|
||||
if (mAgpsEnabled) {
|
||||
if (mSupportsAgpsExtendedCapabilities) {
|
||||
sendMsg(new LocEngReleaseATL(mOwner, connHandle));
|
||||
}
|
||||
return mAgpsEnabled;
|
||||
return mSupportsAgpsExtendedCapabilities;
|
||||
}
|
||||
|
||||
inline
|
||||
bool LocEngAdapter::requestXtraData()
|
||||
{
|
||||
if (mAgpsEnabled) {
|
||||
if (mSupportsAgpsExtendedCapabilities) {
|
||||
sendMsg(new LocEngRequestXtra(mOwner));
|
||||
}
|
||||
return mAgpsEnabled;
|
||||
return mSupportsAgpsExtendedCapabilities;
|
||||
}
|
||||
|
||||
inline
|
||||
bool LocEngAdapter::requestTime()
|
||||
{
|
||||
if (mAgpsEnabled) {
|
||||
if (mSupportsAgpsExtendedCapabilities) {
|
||||
sendMsg(new LocEngRequestTime(mOwner));
|
||||
}
|
||||
return mAgpsEnabled;
|
||||
return mSupportsAgpsExtendedCapabilities;
|
||||
}
|
||||
|
||||
inline
|
||||
bool LocEngAdapter::requestNiNotify(GpsNiNotification ¬if, const void* data)
|
||||
{
|
||||
if (mAgpsEnabled) {
|
||||
if (mSupportsAgpsExtendedCapabilities) {
|
||||
notif.size = sizeof(notif);
|
||||
notif.timeout = LOC_NI_NO_RESPONSE_TIME;
|
||||
|
||||
sendMsg(new LocEngRequestNi(mOwner, notif, data));
|
||||
}
|
||||
return mAgpsEnabled;
|
||||
return mSupportsAgpsExtendedCapabilities;
|
||||
}
|
||||
|
||||
inline
|
||||
bool LocEngAdapter::requestSuplES(int connHandle)
|
||||
{
|
||||
if (mAgpsEnabled)
|
||||
if (mSupportsAgpsExtendedCapabilities)
|
||||
sendMsg(new LocEngRequestSuplEs(mOwner, connHandle));
|
||||
return mAgpsEnabled;
|
||||
return mSupportsAgpsExtendedCapabilities;
|
||||
}
|
||||
|
||||
inline
|
||||
bool LocEngAdapter::reportDataCallOpened()
|
||||
{
|
||||
if(mAgpsEnabled)
|
||||
if(mSupportsAgpsExtendedCapabilities)
|
||||
sendMsg(new LocEngSuplEsOpened(mOwner));
|
||||
return mAgpsEnabled;
|
||||
return mSupportsAgpsExtendedCapabilities;
|
||||
}
|
||||
|
||||
inline
|
||||
bool LocEngAdapter::reportDataCallClosed()
|
||||
{
|
||||
if(mAgpsEnabled)
|
||||
if(mSupportsAgpsExtendedCapabilities)
|
||||
sendMsg(new LocEngSuplEsClosed(mOwner));
|
||||
return mAgpsEnabled;
|
||||
return mSupportsAgpsExtendedCapabilities;
|
||||
}
|
||||
|
||||
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
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -76,8 +76,8 @@ class LocEngAdapter : public LocAdapterBase {
|
|||
bool mNavigating;
|
||||
|
||||
public:
|
||||
bool mAgpsEnabled;
|
||||
bool mCPIEnabled;
|
||||
bool mSupportsAgpsExtendedCapabilities;
|
||||
bool mSupportsCPIExtendedCapabilities;
|
||||
|
||||
LocEngAdapter(LOC_API_ADAPTER_EVENT_MASK_T mask,
|
||||
void* owner,ContextBase* context,
|
||||
|
@ -91,8 +91,12 @@ public:
|
|||
inline LocInternalAdapter* getInternalAdapter() { return mInternalAdapter; }
|
||||
inline UlpProxyBase* getUlpProxy() { return mUlp; }
|
||||
inline void* getOwner() { return mOwner; }
|
||||
inline bool hasAgpsExt() { return mContext->hasAgpsExt(); }
|
||||
inline bool hasCPIExt() { return mContext->hasCPIExt(); }
|
||||
inline bool hasAgpsExtendedCapabilities() {
|
||||
return mContext->hasAgpsExtendedCapabilities();
|
||||
}
|
||||
inline bool hasCPIExtendedCapabilities() {
|
||||
return mContext->hasCPIExtendedCapabilities();
|
||||
}
|
||||
inline const MsgTask* getMsgTask() { return mMsgTask; }
|
||||
|
||||
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);
|
||||
loc_afw_data.adapter->requestUlp(gps_conf.CAPABILITIES);
|
||||
loc_afw_data.adapter->mAgpsEnabled = !loc_afw_data.adapter->hasAgpsExt();
|
||||
loc_afw_data.adapter->mCPIEnabled = !loc_afw_data.adapter->hasCPIExt();
|
||||
loc_afw_data.adapter->mSupportsAgpsExtendedCapabilities = !loc_afw_data.adapter->hasAgpsExtendedCapabilities();
|
||||
loc_afw_data.adapter->mSupportsCPIExtendedCapabilities = !loc_afw_data.adapter->hasCPIExtendedCapabilities();
|
||||
|
||||
if(retVal) {
|
||||
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();
|
||||
INIT_CHECK(loc_eng_data.adapter, return -1);
|
||||
LocEngAdapter* adapter = loc_eng_data.adapter;
|
||||
if(!adapter->mCPIEnabled)
|
||||
if(!adapter->mSupportsCPIExtendedCapabilities)
|
||||
{
|
||||
adapter->sendMsg(new LocEngInjectLocation(adapter, latitude, longitude,
|
||||
accuracy));
|
||||
|
@ -2093,7 +2093,7 @@ void loc_eng_agps_init(loc_eng_data_s_type &loc_eng_data, AGpsExtCallbacks* call
|
|||
AGPS_TYPE_SUPL,
|
||||
false);
|
||||
|
||||
if (adapter->mAgpsEnabled) {
|
||||
if (adapter->mSupportsAgpsExtendedCapabilities) {
|
||||
loc_eng_data.adapter->sendMsg(new LocEngDataClientInit(&loc_eng_data));
|
||||
|
||||
loc_eng_dmn_conn_loc_api_server_launch(callbacks->create_thread_cb,
|
||||
|
|
Loading…
Reference in a new issue