Merge "Move the flp definitions to gps-noship"

This commit is contained in:
Linux Build Service Account 2015-08-21 08:44:22 -07:00 committed by Gerrit - the friendly Code Review server
commit 082ad3c25d
4 changed files with 15 additions and 69 deletions

View file

@ -34,7 +34,8 @@ LOCAL_CFLAGS += \
-D_ANDROID_
LOCAL_C_INCLUDES:= \
$(TARGET_OUT_HEADERS)/gps.utils
$(TARGET_OUT_HEADERS)/gps.utils \
$(TARGET_OUT_HEADERS)/libflp
LOCAL_COPY_HEADERS_TO:= libloc_core/
LOCAL_COPY_HEADERS:= \

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2015, 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
@ -30,6 +30,7 @@
#define ULP_PROXY_BASE_H
#include <gps_extended.h>
#include "fused_location_extended.h"
namespace loc_core {
@ -68,11 +69,11 @@ public:
}
inline virtual void setAdapter(LocAdapterBase* adapter) {}
inline virtual void setCapabilities(unsigned long capabilities) {}
inline virtual bool reportBatchingSession(GpsExtBatchOptions &options,
inline virtual bool reportBatchingSession(FlpExtBatchOptions &options,
bool active) {
return false;
}
inline virtual bool reportPositions(GpsExtLocation * locations,
inline virtual bool reportPositions(FlpExtLocation * locations,
int32_t number_of_locations,
enum loc_sess_status status,
LocPosTechMask techMask) {

View file

@ -62,7 +62,7 @@ extern "C" {
#define ULP_LOCATION_IS_FROM_ZPP 0x0004
/** Position is from a Geofence Breach Event */
#define ULP_LOCATION_IS_FROM_GEOFENCE 0X0008
/** Positioin is from Hardware FLP */
/** Position is from Hardware FLP */
#define ULP_LOCATION_IS_FROM_HW_FLP 0x0010
/** Position is from NLP */
#define ULP_LOCATION_IS_FROM_NLP 0x0020
@ -77,30 +77,6 @@ extern "C" {
#define AGPS_CERTIFICATE_MAX_LENGTH 2000
#define AGPS_CERTIFICATE_MAX_SLOTS 10
/** Batching default ID for dummy batching session*/
#define GPS_BATCHING_DEFAULT_ID 1
/** This cap is used to decide the FLP session cache
size on AP. If the BATCH_SIZE in flp.conf is less than
GPS_AP_BATCHING_SIZE_CAP, FLP session cache size will
be twice the BATCH_SIZE defined in flp.conf. Otherwise,
FLP session cache size will be equal to the BATCH_SIZE.*/
#define GPS_AP_BATCHING_SIZE_CAP 40
#define GPS_BATCHING_OPERATION_SUCCEESS 1
#define GPS_BATCHING_OPERATION_FAILURE 0
/** GPS extended batching flags*/
#define GPS_EXT_BATCHING_ON_FULL 0x0000001
#define GPS_EXT_BATCHING_ON_FIX 0x0000002
/** Reasons of GPS reports batched locations*/
typedef enum loc_batching_reported_type {
LOC_BATCHING_ON_FULL_IND_REPORT,
LOC_BATCHING_ON_FIX_IND_REPORT,
LOC_BATCHING_ON_QUERY_REPORT
}LocBatchingReportedType;
enum loc_registration_mask_status {
LOC_REGISTRATION_MASK_ENABLED,
LOC_REGISTRATION_MASK_DISABLED
@ -151,14 +127,6 @@ typedef struct {
gps_request_utc_time request_utc_time_cb;
} GpsExtCallbacks;
/** GPS extended batch options */
typedef struct {
double max_power_allocation_mW;
uint32_t sources_to_use;
uint32_t flags;
int64_t period_ns;
} GpsExtBatchOptions;
/** Callback to report the xtra server url to the client.
* The client should use this url when downloading xtra unless overwritten
* in the gps.conf file
@ -229,22 +197,6 @@ typedef enum loc_position_mode_type {
#define MIN_POSSIBLE_FIX_INTERVAL 1000 /* msec */
/** GpsLocationExtended has valid latitude and longitude. */
#define GPS_LOCATION_EXTENDED_HAS_LAT_LONG (1U<<0)
/** GpsLocationExtended has valid altitude. */
#define GPS_LOCATION_EXTENDED_HAS_ALTITUDE (1U<<1)
/** GpsLocationExtended has valid speed. */
#define GPS_LOCATION_EXTENDED_HAS_SPEED (1U<<2)
/** GpsLocationExtended has valid bearing. */
#define GPS_LOCATION_EXTENDED_HAS_BEARING (1U<<4)
/** GpsLocationExtended has valid accuracy. */
#define GPS_LOCATION_EXTENDED_HAS_ACCURACY (1U<<8)
/** GPS extended supports geofencing */
#define GPS_EXTENDED_CAPABILITY_GEOFENCE 0x0000001
/** GPS extended supports batching */
#define GPS_EXTENDED_CAPABILITY_BATCHING 0x0000002
/** Flags to indicate which values are valid in a GpsLocationExtended. */
typedef uint16_t GpsLocationExtendedFlags;
/** GpsLocationExtended has valid pdop, hdop, vdop. */
@ -282,19 +234,6 @@ typedef struct {
float speed_unc;
} GpsLocationExtended;
typedef struct GpsExtLocation_s {
size_t size;
uint16_t flags;
double latitude;
double longitude;
double altitude;
float speed;
float bearing;
float accuracy;
int64_t timestamp;
uint32_t sources_used;
} GpsExtLocation;
/** Represents SV status. */
typedef struct {
/** set to sizeof(GnssSvStatus) */
@ -452,8 +391,11 @@ enum loc_api_adapter_event_index {
typedef unsigned int LOC_API_ADAPTER_EVENT_MASK_T;
typedef enum loc_api_adapter_msg_to_check_supported {
LOC_API_ADAPTER_MESSAGE_LOCATION_BATCHING, // Batching
LOC_API_ADAPTER_MESSAGE_LOCATION_BATCHING, // Batching 1.0
LOC_API_ADAPTER_MESSAGE_BATCHED_GENFENCE_BREACH, // Geofence Batched Breach
LOC_API_ADAPTER_MESSAGE_DISTANCE_BASE_TRACKING, // DBT 2.0
LOC_API_ADAPTER_MESSAGE_ADAPTIVE_LOCATION_BATCHING, // Batching 1.5
LOC_API_ADAPTER_MESSAGE_DISTANCE_BASE_LOCATION_BATCHING, // Batching 2.0
LOC_API_ADAPTER_MESSAGE_MAX
} LocCheckingMessagesID;

View file

@ -41,7 +41,8 @@ LOCAL_CFLAGS += \
LOCAL_C_INCLUDES:= \
$(TARGET_OUT_HEADERS)/gps.utils \
$(TARGET_OUT_HEADERS)/libloc_core \
hardware/qcom/gps/loc_api/libloc_api_50001
hardware/qcom/gps/loc_api/libloc_api_50001 \
$(TARGET_OUT_HEADERS)/libflp
LOCAL_COPY_HEADERS_TO:= libloc_eng/
LOCAL_COPY_HEADERS:= \
@ -94,7 +95,8 @@ endif
## Includes
LOCAL_C_INCLUDES:= \
$(TARGET_OUT_HEADERS)/gps.utils \
$(TARGET_OUT_HEADERS)/libloc_core
$(TARGET_OUT_HEADERS)/libloc_core \
$(TARGET_OUT_HEADERS)/libflp
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_RELATIVE_PATH := hw