summaryrefslogtreecommitdiff
path: root/location/LocationDataTypes.h
diff options
context:
space:
mode:
authorHarikrishnan Hariharan <hahariha@codeaurora.org>2018-07-01 00:43:09 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2018-06-30 20:32:10 -0700
commit59269e171eb1b1b2dbfa01ae2b3d1d40f11e31f7 (patch)
tree1adac40bb95374fc7f9b05625a4cf836120c3175 /location/LocationDataTypes.h
parent4819ca816fdbec3d857864f7607efb62df0ff175 (diff)
downloadgps-59269e171eb1b1b2dbfa01ae2b3d1d40f11e31f7.tar.gz
Add a getLocationOptions() function in TrackingOptions
Add a getLocationOptions() function in TrackingOptions to return the LocationOptions object data associated with this class. This is for use in client_api and location-hal-daemon. Change-Id: Id725e1961dc390b8dac908575bb1686b16756057 CRs-Fixed: 2270936
Diffstat (limited to 'location/LocationDataTypes.h')
-rw-r--r--location/LocationDataTypes.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/location/LocationDataTypes.h b/location/LocationDataTypes.h
index a9778e2..1b82e47 100644
--- a/location/LocationDataTypes.h
+++ b/location/LocationDataTypes.h
@@ -33,6 +33,7 @@
#include <stdint.h>
#include <functional>
#include <list>
+#include <string.h>
#define GNSS_NI_REQUESTOR_MAX (256)
#define GNSS_NI_MESSAGE_ID_MAX (2048)
@@ -631,6 +632,14 @@ struct TrackingOptions : LocationOptions {
minDistance = options.minDistance;
mode = options.mode;
}
+ inline LocationOptions getLocationOptions() {
+ LocationOptions locOption;
+ locOption.size = sizeof(locOption);
+ locOption.minDistance = minDistance;
+ locOption.minInterval = minInterval;
+ locOption.mode = mode;
+ return locOption;
+ }
};
struct BatchingOptions : LocationOptions {