From e6a851c191f269d551730afc9b195a318b1852cd Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Thu, 28 Aug 2014 12:34:45 -0700 Subject: adding update config post power up Some of the parameters configured in gps.conf may be carrier dependent. This provides a mechanism so that GpsLocationProvider can determine current operator resolve of the carrier specific configurations and update HAL with those configurations post init. Bug: 17110478 CRs-fixed: 736966 Change-Id: I80aa4404da7666824335fee074dae2ffcba40548 --- utils/loc_cfg.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'utils/loc_cfg.h') diff --git a/utils/loc_cfg.h b/utils/loc_cfg.h index f575f71..ea4865b 100644 --- a/utils/loc_cfg.h +++ b/utils/loc_cfg.h @@ -37,11 +37,15 @@ #define LOC_MAX_PARAM_STRING 80 #define LOC_MAX_PARAM_LINE (LOC_MAX_PARAM_NAME + LOC_MAX_PARAM_STRING) +#define UTIL_UPDATE_CONF(conf_data, len, config_table) \ + loc_update_conf((conf_data), (len), (config_table), \ + sizeof(config_table) / sizeof(config_table[0])) + #define UTIL_READ_CONF_DEFAULT(filename) \ loc_read_conf((filename), NULL, 0); #define UTIL_READ_CONF(filename, config_table) \ - loc_read_conf((filename), (config_table), sizeof(config_table) / sizeof(config_table[0])) + loc_read_conf((filename), (config_table), sizeof(config_table) / sizeof(config_table[0])) /*============================================================================= * @@ -73,10 +77,13 @@ extern "C" { * MODULE EXPORTED FUNCTIONS * *============================================================================*/ -extern void loc_read_conf(const char* conf_file_name, - loc_param_s_type* config_table, - uint32_t table_length); -extern int loc_read_conf_r(FILE *conf_fp, loc_param_s_type* config_table, uint32_t table_length); +void loc_read_conf(const char* conf_file_name, + loc_param_s_type* config_table, + uint32_t table_length); +int loc_read_conf_r(FILE *conf_fp, loc_param_s_type* config_table, + uint32_t table_length); +int loc_update_conf(const char* conf_data, int32_t length, + loc_param_s_type* config_table, uint32_t table_length); #ifdef __cplusplus } #endif -- cgit v1.2.3