Merge "GPS GNSS adapter: connectivity support for engine hub"

This commit is contained in:
Linux Build Service Account 2018-03-08 22:05:04 -08:00 committed by Gerrit - the friendly Code Review server
commit a197343e3c
4 changed files with 7 additions and 4 deletions

View file

@ -101,6 +101,7 @@ typedef std::function<void(const GnssSvNotification& svNotify, bool fromUlp)>
// potential parameters: message queue: MsgTask * msgTask;
// callback function to report back dr and ppe position and sv report
typedef EngineHubProxyBase* (getEngHubProxyFn)(const MsgTask * msgTask,
IOsObserver* osObserver,
GnssAdapterReportPositionEventCb positionEventCb,
GnssAdapterReportSvEventCb svEventCb);

View file

@ -3310,7 +3310,8 @@ GnssAdapter::initEngHubProxy() {
getEngHubProxyFn* getter = (getEngHubProxyFn*) dlsym(handle, "getEngHubProxy");
if(getter != nullptr) {
EngineHubProxyBase* hubProxy = (*getter) (mMsgTask, reportPositionEventCb,
EngineHubProxyBase* hubProxy = (*getter) (mMsgTask, mSystemStatus->getOsObserver(),
reportPositionEventCb,
reportSvEventCb);
if (hubProxy != nullptr) {
mEngHubProxy = hubProxy;

View file

@ -32,6 +32,7 @@
#include <LocAdapterBase.h>
#include <LocDualContext.h>
#include <UlpProxyBase.h>
#include <IOsObserver.h>
#include <EngineHubProxyBase.h>
#include <LocationAPI.h>
#include <Agps.h>

View file

@ -140,10 +140,10 @@ private:
std::shared_ptr<int> mSocket;
struct sockaddr_un mDestAddr;
inline LocIpcSender(
const std::shared_ptr<int>& mySocket, const char* destSocket) : mSocket(mySocket) {
inline LocIpcSender(const std::shared_ptr<int>& mySocket, const char* destSocket) :
mSocket(mySocket),
mDestAddr({.sun_family = AF_UNIX, {}}) {
if ((nullptr != mSocket) && (-1 != *mSocket) && (nullptr != destSocket)) {
mDestAddr.sun_family = AF_UNIX;
snprintf(mDestAddr.sun_path, sizeof(mDestAddr.sun_path), "%s", destSocket);
}
}