replace common qcom sources with samsung ones
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
AM_CFLAGS = \
|
||||
$(GPSUTILS_CFLAGS) \
|
||||
-D__STDC_FORMAT_MACROS \
|
||||
-Dstrlcpy=g_strlcpy \
|
||||
-Dstrlcat=g_strlcat \
|
||||
-std=c++11
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
|
||||
c_sources = \
|
||||
ntrip-client-integration-api-testlib.cpp
|
||||
|
||||
libntripclient_integration_api_test_la_SOURCES = \
|
||||
$(c_sources)
|
||||
|
||||
if USE_GLIB
|
||||
libntripclient_integration_api_test_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ -include glib.h
|
||||
libntripclient_integration_api_test_la_LDFLAGS = -lstdc++ -g -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
||||
libntripclient_integration_api_test_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ -include glib.h
|
||||
else
|
||||
libntripclient_integration_api_test_la_CFLAGS = $(AM_CFLAGS)
|
||||
libntripclient_integration_api_test_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0
|
||||
libntripclient_integration_api_test_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||
endif
|
||||
|
||||
libntripclient_integration_api_test_la_LIBADD = -ldl -lstdc++ $(GPSUTILS_LIBS)
|
||||
|
||||
#Create and Install libraries
|
||||
library_include_HEADERS = $(h_sources)
|
||||
lib_LTLIBRARIES = libntripclient_integration_api_test.la
|
||||
|
||||
library_includedir = $(pkgincludedir)
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = ntrip-client-integration-api-testlib.pc
|
||||
EXTRA_DIST = $(pkgconfig_DATA)
|
||||
@@ -0,0 +1,59 @@
|
||||
/* Copyright (c) 2020, 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
|
||||
* met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
* * Neither the name of The Linux Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef NTRIP_CLIENT_INTEGRATION_API_H
|
||||
#define NTRIP_CLIENT_INTEGRATION_API_H
|
||||
|
||||
#include <functional>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @fn
|
||||
@brief
|
||||
CorrectionDataCb is for receiving correction data from NTRIP client.
|
||||
*/
|
||||
typedef std::function<void(uint8_t *correctionData, uint32_t lengthInBytes)>
|
||||
CorrectionDataCb;
|
||||
|
||||
/** @brief API to start streaming for correction data.
|
||||
PPE service shall call this API when it is ready to start receiving correction data.
|
||||
*/
|
||||
void startCorrectionDataStreaming(CorrectionDataCb corrDataCb);
|
||||
|
||||
/** @brief API to stop streaming for correction data.
|
||||
PPE service shall call this API when it wants to stop receiving correction data.
|
||||
*/
|
||||
void stopCorrectionDataStreaming();
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif //NTRIP_CLIENT_INTEGRATION_API_H
|
||||
@@ -0,0 +1,82 @@
|
||||
# configure.ac -- Autoconf script for ntrip-client
|
||||
#
|
||||
# Process this file with autoconf to produce a configure script
|
||||
|
||||
# Requires autoconf tool later than 2.61
|
||||
AC_PREREQ(2.61)
|
||||
# Initialize the ntrip client package version 1.0.0
|
||||
AC_INIT([ntrip-client-integration-api-testlib],1.0.0)
|
||||
# Does not strictly follow GNU Coding standards
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
# Disables auto rebuilding of configure, Makefile.ins
|
||||
AM_MAINTAINER_MODE
|
||||
# Verifies the --srcdir is correct by checking for the path
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
# defines some macros variable to be included by source
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_AWK
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
# Checks for libraries.
|
||||
PKG_CHECK_MODULES([GPSUTILS], [qcom-gps-utils])
|
||||
AC_SUBST([GPSUTILS_CFLAGS])
|
||||
AC_SUBST([GPSUTILS_LIBS])
|
||||
|
||||
AC_ARG_WITH([core_includes],
|
||||
AC_HELP_STRING([--with-core-includes=@<:@dir@:>@],
|
||||
[Specify the location of the core headers]),
|
||||
[core_incdir=$withval],
|
||||
with_core_includes=no)
|
||||
|
||||
if test "x$with_core_includes" != "xno"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I${core_incdir}"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([locpla_includes],
|
||||
AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@],
|
||||
[specify the path to locpla-includes in loc-pla_git.bb]),
|
||||
[locpla_incdir=$withval],
|
||||
with_locpla_includes=no)
|
||||
|
||||
if test "x$with_locpla_includes" != "xno"; then
|
||||
AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}")
|
||||
fi
|
||||
|
||||
AC_SUBST([CPPFLAGS])
|
||||
|
||||
AC_ARG_WITH([glib],
|
||||
AC_HELP_STRING([--with-glib],
|
||||
[enable glib, building HLOS systems which use glib]))
|
||||
|
||||
if (test "x${with_glib}" = "xyes"); then
|
||||
AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib])
|
||||
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
|
||||
AC_MSG_ERROR(GThread >= 2.16 is required))
|
||||
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
|
||||
AC_MSG_ERROR(GLib >= 2.16 is required))
|
||||
GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
|
||||
GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
|
||||
|
||||
AC_CONFIG_FILES([ \
|
||||
Makefile \
|
||||
ntrip-client-integration-api-testlib.pc
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
@@ -0,0 +1,48 @@
|
||||
/* Copyright (c) 2020, 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
|
||||
* met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
* * Neither the name of The Linux Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define LOG_TAG "NtripClientTestLib"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <log_util.h>
|
||||
#include <loc_cfg.h>
|
||||
#include "NtripClientIntegrationApi.h"
|
||||
|
||||
void startCorrectionDataStreaming(CorrectionDataCb corrDataCb)
|
||||
{
|
||||
LOC_LOGi("Start correction data streaming\n");
|
||||
}
|
||||
|
||||
void stopCorrectionDataStreaming()
|
||||
{
|
||||
LOC_LOGi("Stop correction data streaming\n");
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: ntrip client integration api test app
|
||||
Description: NTRIP Client integration api test app
|
||||
Version: @VERSION
|
||||
Libs:
|
||||
Cflags:
|
||||
Reference in New Issue
Block a user