loc-hal:porting from ANDROID_LNX.LA.3.5.1_RB1.04.04.02.048.040
It contains the following changes: - porting from AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.02.048.040 - updated package loc-api files according to the merge - rename loc-api to loc-hal - dynamically load liblbs_core.so.1 file for LE platforms - print a warning message when loading the lbs_core library fails CRs-fixed: 605821 Change-Id: I54e1a9c742d1734ffa29e6864901119e0ee600c8
This commit is contained in:
parent
70b94ae2c1
commit
91ece00117
23 changed files with 234 additions and 117 deletions
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
SUBDIRS = utils loc_api
|
SUBDIRS = utils core loc_api
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = loc-api.pc
|
pkgconfig_DATA = loc-hal.pc
|
||||||
EXTRA_DIST = $(pkgconfig_DATA)
|
EXTRA_DIST = $(pkgconfig_DATA)
|
||||||
|
|
17
configure.ac
17
configure.ac
|
@ -1,11 +1,11 @@
|
||||||
# configure.ac -- Autoconf script for gps loc_api
|
# configure.ac -- Autoconf script for gps loc_hal
|
||||||
#
|
#
|
||||||
# Process this file with autoconf to produce a configure script
|
# Process this file with autoconf to produce a configure script
|
||||||
|
|
||||||
# Requires autoconf tool later than 2.61
|
# Requires autoconf tool later than 2.61
|
||||||
AC_PREREQ(2.61)
|
AC_PREREQ(2.61)
|
||||||
# Initialize the gps loc_api package version 1.0.0
|
# Initialize the gps loc-hal package version 1.0.0
|
||||||
AC_INIT([loc-api],1.0.0)
|
AC_INIT([loc-hal],1.0.0)
|
||||||
# Does not strictly follow GNU Coding standards
|
# Does not strictly follow GNU Coding standards
|
||||||
AM_INIT_AUTOMAKE([foreign])
|
AM_INIT_AUTOMAKE([foreign])
|
||||||
# Disables auto rebuilding of configure, Makefile.ins
|
# Disables auto rebuilding of configure, Makefile.ins
|
||||||
|
@ -29,10 +29,18 @@ AC_PROG_MAKE_SET
|
||||||
PKG_PROG_PKG_CONFIG
|
PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
# Checks for libraries.
|
# Checks for libraries.
|
||||||
|
PKG_CHECK_MODULES([QMI], [qmi])
|
||||||
|
AC_SUBST([QMI_CFLAGS])
|
||||||
|
AC_SUBST([QMI_LIBS])
|
||||||
|
|
||||||
PKG_CHECK_MODULES([QMIF], [qmi-framework])
|
PKG_CHECK_MODULES([QMIF], [qmi-framework])
|
||||||
AC_SUBST([QMIF_CFLAGS])
|
AC_SUBST([QMIF_CFLAGS])
|
||||||
AC_SUBST([QMIF_LIBS])
|
AC_SUBST([QMIF_LIBS])
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES([DATA], [data])
|
||||||
|
AC_SUBST([DATA_CFLAGS])
|
||||||
|
AC_SUBST([DATA_LIBS])
|
||||||
|
|
||||||
AC_ARG_WITH([libhardware_includes],
|
AC_ARG_WITH([libhardware_includes],
|
||||||
AC_HELP_STRING([--with-libhardware-includes=@<:@dir@:>@],
|
AC_HELP_STRING([--with-libhardware-includes=@<:@dir@:>@],
|
||||||
[Specify the location of the libhardware headers]),
|
[Specify the location of the libhardware headers]),
|
||||||
|
@ -77,8 +85,9 @@ AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
|
||||||
AC_CONFIG_FILES([ \
|
AC_CONFIG_FILES([ \
|
||||||
Makefile \
|
Makefile \
|
||||||
utils/Makefile \
|
utils/Makefile \
|
||||||
|
core/Makefile \
|
||||||
loc_api/Makefile \
|
loc_api/Makefile \
|
||||||
loc-api.pc \
|
loc-hal.pc \
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
|
@ -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
|
||||||
|
@ -36,6 +36,7 @@
|
||||||
#include <msg_q.h>
|
#include <msg_q.h>
|
||||||
#include <loc_target.h>
|
#include <loc_target.h>
|
||||||
#include <log_util.h>
|
#include <log_util.h>
|
||||||
|
#include <platform_lib_includes.h>
|
||||||
#include <loc_log.h>
|
#include <loc_log.h>
|
||||||
|
|
||||||
namespace loc_core {
|
namespace loc_core {
|
||||||
|
@ -52,6 +53,10 @@ LBSProxyBase* ContextBase::getLBSProxy(const char* libName)
|
||||||
proxy = (*getter)();
|
proxy = (*getter)();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOC_LOGW("%s:%d]: FAILED TO LOAD libname: %s\n", __func__, __LINE__, libName);
|
||||||
|
}
|
||||||
if (NULL == proxy) {
|
if (NULL == proxy) {
|
||||||
proxy = new LBSProxyBase();
|
proxy = new LBSProxyBase();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
@ -33,6 +33,7 @@
|
||||||
#include <LocAdapterBase.h>
|
#include <LocAdapterBase.h>
|
||||||
#include <loc_target.h>
|
#include <loc_target.h>
|
||||||
#include <log_util.h>
|
#include <log_util.h>
|
||||||
|
#include <platform_lib_includes.h>
|
||||||
|
|
||||||
namespace loc_core {
|
namespace loc_core {
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -33,6 +33,7 @@
|
||||||
#include <LocApiBase.h>
|
#include <LocApiBase.h>
|
||||||
#include <LocAdapterBase.h>
|
#include <LocAdapterBase.h>
|
||||||
#include <log_util.h>
|
#include <log_util.h>
|
||||||
|
#include <platform_lib_includes.h>
|
||||||
|
|
||||||
namespace loc_core {
|
namespace loc_core {
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -58,7 +58,11 @@ ContextBase* LocDualContext::mBgContext = NULL;
|
||||||
|
|
||||||
// the name must be shorter than 15 chars
|
// the name must be shorter than 15 chars
|
||||||
const char* LocDualContext::mLocationHalName = "Loc_hal_worker";
|
const char* LocDualContext::mLocationHalName = "Loc_hal_worker";
|
||||||
|
#ifndef USE_GLIB
|
||||||
const char* LocDualContext::mIzatLibName = "liblbs_core.so";
|
const char* LocDualContext::mIzatLibName = "liblbs_core.so";
|
||||||
|
#else
|
||||||
|
const char* LocDualContext::mIzatLibName = "liblbs_core.so.1";
|
||||||
|
#endif
|
||||||
|
|
||||||
const MsgTask* LocDualContext::getMsgTask(MsgTask::tCreate tCreator,
|
const MsgTask* LocDualContext::getMsgTask(MsgTask::tCreate tCreator,
|
||||||
const char* name)
|
const char* name)
|
||||||
|
|
47
core/Makefile.am
Normal file
47
core/Makefile.am
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
AM_CFLAGS = -I./ \
|
||||||
|
-I../utils \
|
||||||
|
-I../platform_lib_abstractions \
|
||||||
|
-fno-short-enums
|
||||||
|
|
||||||
|
libloc_core_la_h_sources = \
|
||||||
|
MsgTask.h \
|
||||||
|
LocApiBase.h \
|
||||||
|
LocAdapterBase.h \
|
||||||
|
ContextBase.h \
|
||||||
|
LocDualContext.h \
|
||||||
|
LBSProxyBase.h \
|
||||||
|
UlpProxyBase.h \
|
||||||
|
gps_extended_c.h \
|
||||||
|
gps_extended.h \
|
||||||
|
loc_core_log.h \
|
||||||
|
fake_sched_policy.h
|
||||||
|
|
||||||
|
libloc_core_la_c_sources = \
|
||||||
|
MsgTask.cpp \
|
||||||
|
LocApiBase.cpp \
|
||||||
|
LocAdapterBase.cpp \
|
||||||
|
ContextBase.cpp \
|
||||||
|
LocDualContext.cpp \
|
||||||
|
loc_core_log.cpp \
|
||||||
|
fake_sched_policy.c
|
||||||
|
|
||||||
|
library_includedir = $(pkgincludedir)/core
|
||||||
|
|
||||||
|
library_include_HEADERS = $(libloc_core_la_h_sources)
|
||||||
|
|
||||||
|
libloc_core_la_SOURCES = $(libloc_core_la_c_sources)
|
||||||
|
|
||||||
|
if USE_GLIB
|
||||||
|
libloc_core_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
||||||
|
libloc_core_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
||||||
|
libloc_core_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
||||||
|
else
|
||||||
|
libloc_core_la_CFLAGS = $(AM_CFLAGS)
|
||||||
|
libloc_core_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
|
||||||
|
libloc_core_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
libloc_core_la_LIBADD = -lstdc++ -ldl ../utils/libgps_utils_so.la
|
||||||
|
|
||||||
|
#Create and Install libraries
|
||||||
|
lib_LTLIBRARIES = libloc_core.la
|
|
@ -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
|
||||||
|
@ -29,13 +29,18 @@
|
||||||
#define LOG_NDDEBUG 0
|
#define LOG_NDDEBUG 0
|
||||||
#define LOG_TAG "LocSvc_MsgTask"
|
#define LOG_TAG "LocSvc_MsgTask"
|
||||||
|
|
||||||
|
#ifdef _ANDROID
|
||||||
#include <cutils/sched_policy.h>
|
#include <cutils/sched_policy.h>
|
||||||
|
#include <android_runtime/AndroidRuntime.h>
|
||||||
|
#else
|
||||||
|
#include "fake_sched_policy.h"
|
||||||
|
#endif
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <MsgTask.h>
|
#include <MsgTask.h>
|
||||||
#include <msg_q.h>
|
#include <msg_q.h>
|
||||||
#include <log_util.h>
|
#include <log_util.h>
|
||||||
#include <loc_log.h>
|
#include <loc_log.h>
|
||||||
#include <android_runtime/AndroidRuntime.h>
|
#include <platform_lib_includes.h>
|
||||||
|
|
||||||
namespace loc_core {
|
namespace loc_core {
|
||||||
|
|
||||||
|
@ -95,7 +100,7 @@ void* MsgTask::loopMain(void* arg) {
|
||||||
MsgTask* copy = (MsgTask*)arg;
|
MsgTask* copy = (MsgTask*)arg;
|
||||||
|
|
||||||
// make sure we do not run in background scheduling group
|
// make sure we do not run in background scheduling group
|
||||||
set_sched_policy(gettid(), SP_FOREGROUND);
|
set_sched_policy(GETTID_PLATFORM_LIB_ABSTRACTION, SP_FOREGROUND);
|
||||||
|
|
||||||
if (NULL != copy->mAssociator) {
|
if (NULL != copy->mAssociator) {
|
||||||
copy->mAssociator();
|
copy->mAssociator();
|
||||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
||||||
|
@ -34,6 +34,9 @@ extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#include <gps_extended_c.h>
|
#include <gps_extended_c.h>
|
||||||
|
#ifdef USE_GLIB
|
||||||
|
#include <string.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
struct LocPosMode
|
struct LocPosMode
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include <loc_log.h>
|
#include <loc_log.h>
|
||||||
#include <log_util.h>
|
#include <log_util.h>
|
||||||
#include <loc_core_log.h>
|
#include <loc_core_log.h>
|
||||||
|
#include <platform_lib_includes.h>
|
||||||
|
|
||||||
void LocPosMode::logv() const
|
void LocPosMode::logv() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
prefix=@prefix@
|
|
||||||
exec_prefix=@exec_prefix@
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@
|
|
||||||
|
|
||||||
Name: loc-api
|
|
||||||
Description: Qualcomm GPS Location API
|
|
||||||
Version: @VERSION@
|
|
||||||
Libs: -L${libdir} -lgps_utils_so -lloc_adapter_so -lloc_api -lloc_eng_so -lgps_default_so
|
|
||||||
Cflags: -I${includedir}/loc-api/utils -I${includedir}/ -I${includedir}/loc-api
|
|
10
loc-hal.pc.in
Normal file
10
loc-hal.pc.in
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
libdir=@libdir@
|
||||||
|
includedir=@includedir@
|
||||||
|
|
||||||
|
Name: loc-hal
|
||||||
|
Description: QTI GPS Loc HAL
|
||||||
|
Version: @VERSION
|
||||||
|
Libs: -L${libdir} -lgps_utils_so -lloc_core -lloc_eng_so -lgps_default_so -lloc_ds_api -lloc_api_v02
|
||||||
|
Cflags: -I${includedir} -I${includedir}/loc-hal/utils -I${includedir}/loc-hal/core -I${includedir}/loc-hal
|
|
@ -1,56 +1,18 @@
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = \
|
||||||
$(QMIF_CFLAGS) \
|
|
||||||
-I../utils \
|
|
||||||
-I../platform_lib_abstractions \
|
|
||||||
-I./ulp/inc \
|
|
||||||
-I./libloc_api_50001 \
|
|
||||||
-I./loc_api_v02 \
|
|
||||||
-I./ \
|
-I./ \
|
||||||
|
-I../core \
|
||||||
|
-I./libloc_api_50001 \
|
||||||
|
-I../platform_lib_abstractions \
|
||||||
|
-I../utils \
|
||||||
-fno-short-enums \
|
-fno-short-enums \
|
||||||
-DFEATURE_GNSS_BIT_API
|
-DTARGET_USES_QCOM_BSP
|
||||||
|
|
||||||
libloc_adapter_so_la_SOURCES = \
|
libloc_eng_so_la_h_sources = \
|
||||||
libloc_api_50001/loc_eng_log.cpp \
|
loc_eng_dmn_conn_glue_msg.h \
|
||||||
libloc_api_50001/LocApiAdapter.cpp \
|
loc_eng_dmn_conn_glue_pipe.h \
|
||||||
fake_property_service.c \
|
loc_eng_dmn_conn.h \
|
||||||
fake_sched_policy.c
|
loc_eng_dmn_conn_handler.h \
|
||||||
|
loc_eng_dmn_conn_thread_helper.h
|
||||||
if USE_GLIB
|
|
||||||
libloc_adapter_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
|
||||||
libloc_adapter_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
|
||||||
libloc_adapter_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
|
||||||
else
|
|
||||||
libloc_adapter_so_la_CFLAGS = $(AM_CFLAGS)
|
|
||||||
libloc_adapter_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
|
|
||||||
libloc_adapter_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
|
||||||
endif
|
|
||||||
libloc_adapter_so_la_LIBADD = -lstdc++ ../utils/libgps_utils_so.la
|
|
||||||
|
|
||||||
|
|
||||||
libloc_api_la_SOURCES = \
|
|
||||||
loc_api_v02/LocApiV02Adapter.cpp \
|
|
||||||
loc_api_v02/loc_api_v02_log.c \
|
|
||||||
loc_api_v02/loc_api_v02_client.c \
|
|
||||||
loc_api_v02/loc_api_sync_req.c \
|
|
||||||
loc_api_v02/location_service_v02.c \
|
|
||||||
loc_api_v02/LocApiV02Adapter.h \
|
|
||||||
loc_api_v02/loc_util_log.h \
|
|
||||||
loc_api_v02/location_service_v02.h \
|
|
||||||
loc_api_v02/loc_api_sync_req.h \
|
|
||||||
loc_api_v02/loc_api_v02_client.h \
|
|
||||||
loc_api_v02/loc_api_v02_log.h
|
|
||||||
|
|
||||||
if USE_GLIB
|
|
||||||
libloc_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
|
||||||
libloc_api_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
|
||||||
libloc_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
|
||||||
else
|
|
||||||
libloc_api_la_CFLAGS = $(AM_CFLAGS)
|
|
||||||
libloc_api_la_LDFLAGS = -shared -version-info 1:0:0
|
|
||||||
libloc_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
libloc_api_la_LIBADD = -lstdc++ $(QMIF_LIBS) ../utils/libgps_utils_so.la libloc_adapter_so.la
|
|
||||||
|
|
||||||
libloc_eng_so_la_SOURCES = \
|
libloc_eng_so_la_SOURCES = \
|
||||||
libloc_api_50001/loc_eng.cpp \
|
libloc_api_50001/loc_eng.cpp \
|
||||||
|
@ -58,6 +20,8 @@ libloc_eng_so_la_SOURCES = \
|
||||||
libloc_api_50001/loc_eng_xtra.cpp \
|
libloc_api_50001/loc_eng_xtra.cpp \
|
||||||
libloc_api_50001/loc_eng_ni.cpp \
|
libloc_api_50001/loc_eng_ni.cpp \
|
||||||
libloc_api_50001/loc_eng_log.cpp \
|
libloc_api_50001/loc_eng_log.cpp \
|
||||||
|
libloc_api_50001/loc_eng_nmea.cpp \
|
||||||
|
libloc_api_50001/LocEngAdapter.cpp \
|
||||||
libloc_api_50001/loc_eng_dmn_conn.cpp \
|
libloc_api_50001/loc_eng_dmn_conn.cpp \
|
||||||
libloc_api_50001/loc_eng_dmn_conn_handler.cpp \
|
libloc_api_50001/loc_eng_dmn_conn_handler.cpp \
|
||||||
libloc_api_50001/loc_eng_dmn_conn_thread_helper.c \
|
libloc_api_50001/loc_eng_dmn_conn_thread_helper.c \
|
||||||
|
@ -65,6 +29,7 @@ libloc_eng_so_la_SOURCES = \
|
||||||
libloc_api_50001/loc_eng_dmn_conn_glue_pipe.c \
|
libloc_api_50001/loc_eng_dmn_conn_glue_pipe.c \
|
||||||
fake_property_service.c
|
fake_property_service.c
|
||||||
|
|
||||||
|
libloc_eng_so_la_SOURCES += libloc_eng_so_la_h_sources
|
||||||
|
|
||||||
if USE_GLIB
|
if USE_GLIB
|
||||||
libloc_eng_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
libloc_eng_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
||||||
|
@ -76,7 +41,7 @@ libloc_eng_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
|
||||||
libloc_eng_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
libloc_eng_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libloc_eng_so_la_LIBADD = -lstdc++ -ldl ../utils/libgps_utils_so.la libloc_adapter_so.la libloc_api.la
|
libloc_eng_so_la_LIBADD = -lstdc++ -ldl -llog ../utils/libgps_utils_so.la ../core/libloc_core.la
|
||||||
|
|
||||||
|
|
||||||
libgps_default_so_la_SOURCES = \
|
libgps_default_so_la_SOURCES = \
|
||||||
|
@ -94,28 +59,76 @@ libgps_default_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
|
||||||
libgps_default_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
libgps_default_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libgps_default_so_la_LIBADD = -lstdc++ ../utils/libgps_utils_so.la -ldl libloc_eng_so.la
|
libgps_default_so_la_LIBADD = -lstdc++ -llog ../utils/libgps_utils_so.la ../core/libloc_core.la -ldl libloc_eng_so.la
|
||||||
|
|
||||||
|
|
||||||
|
libloc_ds_api_CFLAGS = \
|
||||||
|
$(QMIF_CFLAGS) \
|
||||||
|
$(QMI_CFLAGS) \
|
||||||
|
$(DATA_CFLAGS) \
|
||||||
|
-I$(WORKSPACE)/qcom-opensource/location/loc_api/ds_api
|
||||||
|
|
||||||
|
libloc_ds_api_la_SOURCES = \
|
||||||
|
$(WORKSPACE)/qcom-opensource/location/loc_api/ds_api/ds_client.c
|
||||||
|
|
||||||
|
if USE_GLIB
|
||||||
|
libloc_ds_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(libloc_ds_api_CFLAGS) @GLIB_CFLAGS@
|
||||||
|
libloc_ds_api_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
||||||
|
libloc_ds_api_la_LDFLAGS += -Wl,--export-dynamic
|
||||||
|
libloc_ds_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(libloc_ds_api_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
||||||
|
else
|
||||||
|
libloc_ds_api_la_CFLAGS = $(AM_CFLAGS) $(libloc_ds_api_CFLAGS)
|
||||||
|
libloc_ds_api_la_LDFLAGS = -lstdc++ -lpthread -Wl,--export-dynamic -shared -version-info 1:0:0
|
||||||
|
libloc_ds_api_la_LDFLAGS += -Wl,--export-dynamic
|
||||||
|
libloc_ds_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) $(libloc_ds_api_CFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
libloc_ds_api_la_LIBADD = -lstdc++ $(QMIF_LIBS) -lqmiservices -ldsi_netctrl ../utils/libgps_utils_so.la
|
||||||
|
|
||||||
|
libloc_api_v02_CFLAGS = \
|
||||||
|
$(QMIF_CFLAGS) \
|
||||||
|
-I$(WORKSPACE)/qcom-opensource/location/loc_api/ds_api \
|
||||||
|
-I$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02
|
||||||
|
|
||||||
|
libloc_api_v02_la_SOURCES = \
|
||||||
|
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/LocApiV02.cpp \
|
||||||
|
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_api_v02_log.c \
|
||||||
|
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_api_v02_client.c \
|
||||||
|
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_api_sync_req.c \
|
||||||
|
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/location_service_v02.c
|
||||||
|
|
||||||
|
if USE_GLIB
|
||||||
|
libloc_api_v02_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(libloc_api_v02_CFLAGS) @GLIB_CFLAGS@
|
||||||
|
libloc_api_v02_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
||||||
|
libloc_api_v02_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(libloc_api_v02_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
||||||
|
else
|
||||||
|
libloc_api_v02_la_CFLAGS = $(AM_CFLAGS) $(libloc_api_v02_CFLAGS)
|
||||||
|
libloc_api_v02_la_LDFLAGS = -lstdc++ -lpthread -shared -version-info 1:0:0
|
||||||
|
libloc_api_v02_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) $(libloc_api_v02_CFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
libloc_api_v02_la_CXXFLAGS = -std=c++0x
|
||||||
|
libloc_api_v02_la_LIBADD = -lstdc++ -lqmi_cci -lqmi_common_so ../core/libloc_core.la ../utils/libgps_utils_so.la libloc_ds_api.la
|
||||||
|
|
||||||
library_include_HEADERS = \
|
library_include_HEADERS = \
|
||||||
libloc_api_50001/LocApiAdapter.h \
|
libloc_api_50001/LocEngAdapter.h \
|
||||||
libloc_api_50001/loc.h \
|
libloc_api_50001/loc.h \
|
||||||
libloc_api_50001/loc_eng.h \
|
libloc_api_50001/loc_eng.h \
|
||||||
libloc_api_50001/loc_eng_xtra.h \
|
libloc_api_50001/loc_eng_xtra.h \
|
||||||
libloc_api_50001/loc_eng_ni.h \
|
libloc_api_50001/loc_eng_ni.h \
|
||||||
libloc_api_50001/loc_eng_agps.h \
|
libloc_api_50001/loc_eng_agps.h \
|
||||||
libloc_api_50001/loc_eng_msg.h \
|
libloc_api_50001/loc_eng_msg.h \
|
||||||
libloc_api_50001/loc_eng_msg_id.h \
|
|
||||||
libloc_api_50001/loc_eng_log.h \
|
libloc_api_50001/loc_eng_log.h \
|
||||||
loc_api_v02/LocApiV02Adapter.h \
|
fake_property_service.h \
|
||||||
loc_api_v02/loc_util_log.h \
|
$(WORKSPACE)/qcom-opensource/location/loc_api/ds_api/ds_client.h \
|
||||||
loc_api_v02/location_service_v02.h \
|
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/location_service_v02.h \
|
||||||
loc_api_v02/loc_api_sync_req.h \
|
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_api_v02_log.h \
|
||||||
loc_api_v02/loc_api_v02_client.h \
|
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_api_v02_client.h \
|
||||||
loc_api_v02/loc_api_v02_log.h \
|
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_api_sync_req.h \
|
||||||
ulp/inc/ulp.h \
|
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/LocApiV02.h \
|
||||||
fake_property_service.h
|
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_util_log.h
|
||||||
|
|
||||||
library_includedir = $(pkgincludedir)
|
library_includedir = $(pkgincludedir)
|
||||||
|
|
||||||
#Create and Install libraries
|
#Create and Install libraries
|
||||||
lib_LTLIBRARIES = libloc_adapter_so.la libloc_api.la libloc_eng_so.la libgps_default_so.la
|
lib_LTLIBRARIES = libloc_eng_so.la libgps_default_so.la libloc_ds_api.la libloc_api_v02.la
|
||||||
|
|
|
@ -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
|
||||||
|
@ -28,6 +28,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#ifdef USE_GLIB
|
||||||
|
#include <string.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
int property_get(const char *key, char * value, const char *default_value)
|
int property_get(const char *key, char * value, const char *default_value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
||||||
|
@ -48,7 +48,6 @@
|
||||||
#else
|
#else
|
||||||
#include "fake_property_service.h"
|
#include "fake_property_service.h"
|
||||||
#endif
|
#endif
|
||||||
#include <hardware/gps.h>
|
|
||||||
|
|
||||||
using namespace loc_core;
|
using namespace loc_core;
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -41,6 +41,10 @@
|
||||||
#include <loc_timer.h>
|
#include <loc_timer.h>
|
||||||
#include <LocEngAdapter.h>
|
#include <LocEngAdapter.h>
|
||||||
|
|
||||||
|
#ifdef USE_GLIB
|
||||||
|
#include <glib.h>
|
||||||
|
#endif /* USE_GLIB */
|
||||||
|
|
||||||
// forward declaration
|
// forward declaration
|
||||||
class AgpsStateMachine;
|
class AgpsStateMachine;
|
||||||
class Subscriber;
|
class Subscriber;
|
||||||
|
|
|
@ -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
|
||||||
|
@ -30,6 +30,12 @@
|
||||||
#define __PLATFORM_LIB_MACROS_H__
|
#define __PLATFORM_LIB_MACROS_H__
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TS_PRINTF(format, x...) \
|
#define TS_PRINTF(format, x...) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -63,19 +69,16 @@
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
pid_t gettid(void);
|
pid_t gettid(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define GETTID_PLATFORM_LIB_ABSTRACTION (gettid())
|
#define GETTID_PLATFORM_LIB_ABSTRACTION (gettid())
|
||||||
#define LOC_EXT_CREATE_THREAD_CB_PLATFORM_LIB_ABSTRACTION android::AndroidRuntime::createJavaThread
|
#define LOC_EXT_CREATE_THREAD_CB_PLATFORM_LIB_ABSTRACTION android::AndroidRuntime::createJavaThread
|
||||||
#define ELAPSED_MILLIS_SINCE_BOOT_PLATFORM_LIB_ABSTRACTION (android::elapsedRealtime())
|
#define ELAPSED_MILLIS_SINCE_BOOT_PLATFORM_LIB_ABSTRACTION (android::elapsedRealtime())
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /*__cplusplus */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -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
|
||||||
|
@ -28,9 +28,18 @@
|
||||||
|
|
||||||
#ifndef _PLATFORM_LIB_TIME_H_
|
#ifndef _PLATFORM_LIB_TIME_H_
|
||||||
#define _PLATFORM_LIB_TIME_H_
|
#define _PLATFORM_LIB_TIME_H_
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
int64_t systemTime(int clock);
|
int64_t systemTime(int clock);
|
||||||
int64_t elapsedMillisSinceBoot();
|
int64_t elapsedMillisSinceBoot();
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -5,22 +5,29 @@ AM_CFLAGS = -Wundef \
|
||||||
-fno-inline \
|
-fno-inline \
|
||||||
-fno-short-enums \
|
-fno-short-enums \
|
||||||
-fpic \
|
-fpic \
|
||||||
|
-I./ \
|
||||||
-I../platform_lib_abstractions
|
-I../platform_lib_abstractions
|
||||||
|
|
||||||
libgps_utils_so_la_h_sources = log_util.h \
|
libgps_utils_so_la_h_sources = \
|
||||||
msg_q.h \
|
log_util.h \
|
||||||
linked_list.h \
|
msg_q.h \
|
||||||
loc_cfg.h \
|
linked_list.h \
|
||||||
loc_log.h \
|
loc_cfg.h \
|
||||||
../platform_lib_abstractions/platform_lib_includes.h \
|
loc_log.h \
|
||||||
../platform_lib_abstractions/platform_lib_time.h \
|
loc_target.h \
|
||||||
../platform_lib_abstractions/platform_lib_macros.h
|
loc_timer.h \
|
||||||
|
../platform_lib_abstractions/platform_lib_includes.h \
|
||||||
|
../platform_lib_abstractions/platform_lib_time.h \
|
||||||
|
../platform_lib_abstractions/platform_lib_macros.h
|
||||||
|
|
||||||
libgps_utils_so_la_c_sources = linked_list.c \
|
libgps_utils_so_la_c_sources = \
|
||||||
msg_q.c \
|
linked_list.c \
|
||||||
loc_cfg.cpp \
|
msg_q.c \
|
||||||
loc_log.cpp \
|
loc_cfg.cpp \
|
||||||
../platform_lib_abstractions/platform_lib_time.cpp
|
loc_log.cpp \
|
||||||
|
loc_timer.c \
|
||||||
|
loc_target.cpp \
|
||||||
|
../platform_lib_abstractions/platform_lib_time.cpp
|
||||||
|
|
||||||
library_includedir = $(pkgincludedir)/utils
|
library_includedir = $(pkgincludedir)/utils
|
||||||
|
|
||||||
|
@ -38,7 +45,7 @@ libgps_utils_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
|
||||||
libgps_utils_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
libgps_utils_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libgps_utils_so_la_LIBADD = -lstdc++
|
libgps_utils_so_la_LIBADD = -lstdc++ -llog
|
||||||
|
|
||||||
#Create and Install libraries
|
#Create and Install libraries
|
||||||
lib_LTLIBRARIES = libgps_utils_so.la
|
lib_LTLIBRARIES = libgps_utils_so.la
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2012,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
|
||||||
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -38,6 +39,7 @@
|
||||||
#include "loc_target.h"
|
#include "loc_target.h"
|
||||||
#include "loc_log.h"
|
#include "loc_log.h"
|
||||||
#include "log_util.h"
|
#include "log_util.h"
|
||||||
|
#include <platform_lib_includes.h>
|
||||||
|
|
||||||
#define APQ8064_ID_1 "109"
|
#define APQ8064_ID_1 "109"
|
||||||
#define APQ8064_ID_2 "153"
|
#define APQ8064_ID_2 "153"
|
||||||
|
|
|
@ -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
|
||||||
|
@ -33,6 +33,7 @@
|
||||||
#include "loc_timer.h"
|
#include "loc_timer.h"
|
||||||
#include<time.h>
|
#include<time.h>
|
||||||
#include<errno.h>
|
#include<errno.h>
|
||||||
|
#include"platform_lib_includes.h"
|
||||||
|
|
||||||
enum timer_state {
|
enum timer_state {
|
||||||
READY = 100,
|
READY = 100,
|
||||||
|
|
Loading…
Reference in a new issue