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
This commit is contained in:
Harikrishnan Hariharan 2018-07-01 00:43:09 +05:30 committed by Gerrit - the friendly Code Review server
parent 4819ca816f
commit 59269e171e

View file

@ -33,6 +33,7 @@
#include <stdint.h> #include <stdint.h>
#include <functional> #include <functional>
#include <list> #include <list>
#include <string.h>
#define GNSS_NI_REQUESTOR_MAX (256) #define GNSS_NI_REQUESTOR_MAX (256)
#define GNSS_NI_MESSAGE_ID_MAX (2048) #define GNSS_NI_MESSAGE_ID_MAX (2048)
@ -631,6 +632,14 @@ struct TrackingOptions : LocationOptions {
minDistance = options.minDistance; minDistance = options.minDistance;
mode = options.mode; 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 { struct BatchingOptions : LocationOptions {