Merge "Sending HW FLP request to ULP"

This commit is contained in:
Linux Build Service Account 2014-05-09 01:05:25 -07:00 committed by Gerrit - the friendly Code Review server
commit 8244c7075a
2 changed files with 34 additions and 0 deletions

View file

@ -50,6 +50,7 @@ public:
mPosMode = params;
return false;
}
inline virtual bool reportPosition(UlpLocation &location,
GpsLocationExtended &locationExtended,
void* locationExt,
@ -67,6 +68,16 @@ public:
}
inline virtual void setAdapter(LocAdapterBase* adapter) {}
inline virtual void setCapabilities(unsigned long capabilities) {}
inline virtual bool reportBatchingSession(GpsExtBatchOptions &options,
bool active) {
return false;
}
inline virtual bool reportPositions(GpsExtLocation * locations,
int32_t number_of_locations,
enum loc_sess_status status,
LocPosTechMask techMask) {
return false;
}
};
} // namespace loc_core

View file

@ -60,6 +60,8 @@ 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 */
#define ULP_LOCATION_IS_FROM_HW_FLP 0x0010
#define ULP_MIN_INTERVAL_INVALID 0xffffffff
@ -111,6 +113,14 @@ 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
@ -234,6 +244,19 @@ 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;
enum loc_sess_status {
LOC_SESS_SUCCESS,
LOC_SESS_INTERMEDIATE,