Change enum and struct names according to convention 67/322267/1
authorAbhimanyu Swami <abhimanyu1.s@samsung.com>
Wed, 22 Jan 2025 14:08:25 +0000 (19:38 +0530)
committerAbhimanyu Swami <abhimanyu1.s@samsung.com>
Mon, 7 Apr 2025 06:01:03 +0000 (06:01 +0000)
Change-Id: I0572ff0329daeeed537eda3ba6660d1faaef1328
(cherry picked from commit 6ac8d5de7080b22f5d0ef8acd6c1317917205073)

lbs-server/src/last_position.c
lbs-server/src/last_position.h
lbs-server/src/lbs_server.c
lbs-server/src/lbs_server.h
lbs-server/src/server.c

index 1424d6a6a59b42ea1bd7860c558cc3ff95c4fba3..2dee38f6a49b7c43cdcd1a89976d67fc3b2f1934 100644 (file)
@@ -28,7 +28,7 @@
 #define MAX_GPS_LOC_ITEM       7
 #define UPDATE_INTERVAL                60
 
-void gps_set_last_position(const pos_data_t *pos)
+void gps_set_last_position(const hal_location_pos_data_s *pos)
 {
        if (pos == NULL) return;
 
@@ -41,7 +41,7 @@ void gps_set_last_position(const pos_data_t *pos)
        setting_set_string(VCONFKEY_LOCATION_NV_LAST_GPS_LOCATION, location);
 }
 
-void gps_set_position(const pos_data_t *pos)
+void gps_set_position(const hal_location_pos_data_s *pos)
 {
        if (pos == NULL)
                return;
@@ -72,7 +72,7 @@ void gps_set_position(const pos_data_t *pos)
                gps_set_last_position(pos);
 }
 
-void gps_get_last_position(pos_data_t *last_pos)
+void gps_get_last_position(hal_location_pos_data_s *last_pos)
 {
        if (last_pos == NULL)
                return;
index 38cde856d552e4761c00b92c2bf6216169f17ca4..30bdb84e0458b6e6ac8987e5f23b3a565220ab29 100644 (file)
 
 #include <hal/hal-location.h>
 
-void gps_set_last_position(const pos_data_t *pos);
+void gps_set_last_position(const hal_location_pos_data_s *pos);
 
-void gps_set_position(const pos_data_t *pos);
+void gps_set_position(const hal_location_pos_data_s *pos);
 
-void gps_get_last_position(pos_data_t *last_pos);
+void gps_get_last_position(hal_location_pos_data_s *last_pos);
 
 void gps_set_last_mock(int timestamp, double lat, double lon, double alt, double spd, double dir, double h_acc);
 
index 157c161f47b12998e15678ae2975a375d52420af..e2c5eadc16cc7c87cb105b94b49e03019ae4fd39 100755 (executable)
 
 typedef struct {
        /* gps variables */
-       pos_data_t position;
-       batch_data_t batch;
-       sv_data_t satellite;
-       nmea_data_t nmea;
+       hal_location_pos_data_s position;
+       hal_location_batch_data_s batch;
+       hal_location_sv_data_s satellite;
+       hal_location_nmea_data_s nmea;
        gboolean sv_used;
        gboolean nmea_used;
 
@@ -1443,7 +1443,7 @@ static void fused_update_position_cb(gint timestamp, gdouble latitude, gdouble l
                                fields, timestamp, latitude, longitude, altitude, speed, direction, climb, accuracy);
 }
 
-static void gps_update_position_cb(pos_data_t *pos, gps_error_t error, void *user_data)
+static void gps_update_position_cb(hal_location_pos_data_s *pos, hal_location_gps_error_e error, void *user_data)
 {
        GVariant *accuracy = NULL;
        LbsPositionExtFields fields;
@@ -1453,7 +1453,7 @@ static void gps_update_position_cb(pos_data_t *pos, gps_error_t error, void *use
        if (lbs_server->is_mock_running != MOCK_RUNNING_OFF)
                return ;
 
-       memcpy(&lbs_server->position, pos, sizeof(pos_data_t));
+       memcpy(&lbs_server->position, pos, sizeof(hal_location_pos_data_s));
 
        if (lbs_server->status != LBS_STATUS_AVAILABLE) {
                lbs_server_emit_status_changed(lbs_server->lbs_dbus_server, LBS_SERVER_METHOD_GPS, LBS_STATUS_AVAILABLE);
@@ -1482,14 +1482,14 @@ static void gps_update_position_cb(pos_data_t *pos, gps_error_t error, void *use
                                        pos->latitude, pos->longitude, pos->altitude, pos->speed, pos->bearing, 0.0, accuracy);
 }
 
-static void gps_update_batch_cb(batch_data_t *bat, void *user_data)
+static void gps_update_batch_cb(hal_location_batch_data_s *bat, void *user_data)
 {
        lbs_server_s *lbs_server = (lbs_server_s *)(user_data);
 
        int idx;
        GVariant *batch_info = NULL;
        GVariantBuilder *batch_builder = NULL;
-       memcpy(&lbs_server->batch, bat, sizeof(batch_data_t));
+       memcpy(&lbs_server->batch, bat, sizeof(hal_location_batch_data_s));
 
        if (lbs_server->status != LBS_STATUS_AVAILABLE) {
                lbs_server_emit_status_changed(lbs_server->lbs_dbus_server, LBS_SERVER_METHOD_GPS, LBS_STATUS_AVAILABLE);
@@ -1509,7 +1509,7 @@ static void gps_update_batch_cb(batch_data_t *bat, void *user_data)
        lbs_server_emit_batch_changed(lbs_server->lbs_dbus_server, bat->num_of_location, batch_info);
 }
 
-static void gps_update_satellite_cb(sv_data_t *sv, void *user_data)
+static void gps_update_satellite_cb(hal_location_sv_data_s *sv, void *user_data)
 {
        lbs_server_s *lbs_server = (lbs_server_s *)(user_data);
        if (lbs_server->sv_used == FALSE)
@@ -1523,7 +1523,7 @@ static void gps_update_satellite_cb(sv_data_t *sv, void *user_data)
        GVariantBuilder *used_prn_builder = NULL;
        GVariantBuilder *satellite_info_builder = NULL;
 
-       memcpy(&lbs_server->satellite, sv, sizeof(sv_data_t));
+       memcpy(&lbs_server->satellite, sv, sizeof(hal_location_sv_data_s));
        timestamp = sv->timestamp;
 
        used_prn_builder = g_variant_builder_new(G_VARIANT_TYPE("ai"));
@@ -1546,7 +1546,7 @@ static void gps_update_satellite_cb(sv_data_t *sv, void *user_data)
                                        sv->num_of_sat, used_prn, satellite_info);
 }
 
-static void gps_update_nmea_cb(nmea_data_t *nmea, void *user_data)
+static void gps_update_nmea_cb(hal_location_nmea_data_s *nmea, void *user_data)
 {
        lbs_server_s *lbs_server = (lbs_server_s *)(user_data);
 
@@ -1570,7 +1570,7 @@ static void gps_update_nmea_cb(nmea_data_t *nmea, void *user_data)
        lbs_server_emit_nmea_changed(lbs_server->lbs_dbus_server, lbs_server->nmea.timestamp, lbs_server->nmea.data);
 }
 
-int gps_update_geofence_transition(int geofence_id, geofence_zone_state_t transition, double latitude, double longitude, double altitude, double speed, double bearing, double hor_accuracy, void *data)
+int gps_update_geofence_transition(int geofence_id, hal_location_geofence_zone_state_e transition, double latitude, double longitude, double altitude, double speed, double bearing, double hor_accuracy, void *data)
 {
        lbs_server_s *lbs_server = (lbs_server_s *)data;
        lbs_server_emit_gps_geofence_changed(lbs_server->lbs_dbus_server, geofence_id, transition, latitude, longitude, altitude, speed, bearing, hor_accuracy);
@@ -1613,9 +1613,9 @@ static void lbs_server_init(lbs_server_s *lbs_server)
        lbs_server->status = LBS_STATUS_UNAVAILABLE;
        g_mutex_init(&lbs_server->mutex);
 
-       memset(&lbs_server->position, 0x00, sizeof(pos_data_t));
-       memset(&lbs_server->satellite, 0x00, sizeof(sv_data_t));
-       memset(&lbs_server->nmea, 0x00, sizeof(nmea_data_t));
+       memset(&lbs_server->position, 0x00, sizeof(hal_location_pos_data_s));
+       memset(&lbs_server->satellite, 0x00, sizeof(hal_location_sv_data_s));
+       memset(&lbs_server->nmea, 0x00, sizeof(hal_location_nmea_data_s));
 
        lbs_server->is_gps_running = FALSE;
        lbs_server->is_fused_running = FALSE;
index d2d9ea44b02ae00c7396a8dbf25dbb22169a95b4..750e04730b5ca6d33a4390cfa6b1a6fefeb28f07 100644 (file)
@@ -37,7 +37,7 @@
  * @param[in]  error           Error report
  * @param[in]  user_data       User defined data
  */
-typedef void (*gps_pos_cb)(pos_data_t *pos, gps_error_t error, void *user_data);
+typedef void (*gps_pos_cb)(hal_location_pos_data_s *pos, hal_location_gps_error_e error, void *user_data);
 
 /**
  * This callback is called with batch data.
@@ -45,7 +45,7 @@ typedef void (*gps_pos_cb)(pos_data_t *pos, gps_error_t error, void *user_data);
  * @param[in]  batch           Batch data
  * @param[in]  user_data       User defined data
  */
-typedef void (*gps_batch_cb)(batch_data_t *batch, void *user_data);
+typedef void (*gps_batch_cb)(hal_location_batch_data_s *batch, void *user_data);
 
 /**
  * This callback is called with satellite data.
@@ -53,7 +53,7 @@ typedef void (*gps_batch_cb)(batch_data_t *batch, void *user_data);
  * @param[in]  sv              Satellite data
  * @param[in]  user_data       User defined data
  */
-typedef void (*gps_sv_cb)(sv_data_t *sv, void *user_data);
+typedef void (*gps_sv_cb)(hal_location_sv_data_s *sv, void *user_data);
 
 /**
  * This callback is called with nmea.
@@ -61,7 +61,7 @@ typedef void (*gps_sv_cb)(sv_data_t *sv, void *user_data);
  * @param[in]  nmea            NMEA data
  * @param[in]  user_data       User defined data
  */
-typedef void (*gps_nmea_cb)(nmea_data_t *nmea, void *user_data);
+typedef void (*gps_nmea_cb)(hal_location_nmea_data_s *nmea, void *user_data);
 
 /**
  * GPS callback structure.
@@ -127,7 +127,7 @@ typedef enum {
        GEOFENCE_RESUME_FENCE
 } geofence_event_e;
 
-int gps_update_geofence_transition(int geofence_id, geofence_zone_state_t transition, double latitude, double longitude, double altitude, double speed, double bearing, double hor_accuracy, void *data);
+int gps_update_geofence_transition(int geofence_id, hal_location_geofence_zone_state_e transition, double latitude, double longitude, double altitude, double speed, double bearing, double hor_accuracy, void *data);
 int gps_update_geofence_service_status(int status, void *data);
 
 /* NPS */
index 801f7950ac85a83b7dc8b17ffe55470a1ce2a947..d0ed014946aaecf522edae215f94129044b865f2 100755 (executable)
@@ -88,10 +88,10 @@ typedef struct {
 
        gps_plugin_handler_t gps_plugin;
 
-       pos_data_t *pos_data;
-       batch_data_t *batch_data;
-       sv_data_t *sv_data;
-       nmea_data_t *nmea_data;
+       hal_location_pos_data_s *pos_data;
+       hal_location_batch_data_s *batch_data;
+       hal_location_sv_data_s *sv_data;
+       hal_location_nmea_data_s *nmea_data;
 } gps_server_t;
 
 gps_server_t *g_gps_server = NULL;
@@ -104,7 +104,7 @@ static void __nps_plugin_handler_deinit(void)
                g_nps_plugin.handle = NULL;
 }
 
-static int _gps_server_gps_event_cb(gps_event_info_t *gps_event_info, void *user_data);
+static int _gps_server_gps_event_cb(gps_event_info_s *gps_event_info, void *user_data);
 
 static void _gps_nmea_changed_cb(keynode_t *key, void *data)
 {
@@ -135,7 +135,7 @@ static gboolean get_replay_enabled()
 
 static void reload_plugin_module(gps_server_t *server)
 {
-       gps_failure_reason_t ReasonCode = GPS_FAILURE_CAUSE_NORMAL;
+       gps_failure_reason_e ReasonCode = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
 
        LOG_GPS(DBG_LOW, "reload_plugin_module : replay enabled: %d", server->replay_enabled);
        int ret = hal_location_get_backend();
@@ -174,46 +174,46 @@ static void _gps_replay_changed_cb(keynode_t *key, void *data)
 
 static void display_mode_changed_cb(keynode_t *key, void *data)
 {
-       gps_failure_reason_t reason_code = GPS_FAILURE_CAUSE_NORMAL;
+       gps_failure_reason_e reason_code = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
 
        int lcd_mode = 0;
        setting_get_int(VCONFKEY_PM_STATE, &lcd_mode);
 
-       gboolean status = hal_location_request(GPS_ACTION_SEND_PARAMS, &lcd_mode, &reason_code);
+       gboolean status = hal_location_request(HAL_LOCATION_GPS_ACTION_SEND_PARAMS, &lcd_mode, &reason_code);
 
        if (status == FALSE) {
-               LOG_GPS(DBG_ERR, "Main: sending GPS_ACTION_START_FACTTEST Fail !");
+               LOG_GPS(DBG_ERR, "Main: sending HAL_LOCATION_GPS_ACTION_START_FACTTEST Fail !");
                return;
        }
 
-       status = hal_location_request(GPS_INDI_SUPL_VERIFICATION, NULL, &reason_code);
+       status = hal_location_request(HAL_LOCATION_GPS_INDI_SUPL_VERIFICATION, NULL, &reason_code);
 
        if (status == FALSE)
        {
-               LOG_GPS(DBG_ERR, "Main: sending GPS_INDI_SUPL_VERIFICATION Fail !");
+               LOG_GPS(DBG_ERR, "Main: sending HAL_LOCATION_GPS_INDI_SUPL_VERIFICATION Fail !");
                return;
        }
 }
 
 static void replay_mode_changed_cb(keynode_t *key, void *data)
 {
-       gps_failure_reason_t reason_code = GPS_FAILURE_CAUSE_NORMAL;
+       gps_failure_reason_e reason_code = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
 
        int replay_mode = 0;
        setting_get_int(VCONFKEY_LOCATION_REPLAY_MODE, &replay_mode);
 
-       gboolean status = hal_location_request(GPS_ACTION_START_FACTTEST, &replay_mode, &reason_code);
+       gboolean status = hal_location_request(HAL_LOCATION_GPS_ACTION_START_FACTTEST, &replay_mode, &reason_code);
 
        if (status == FALSE) {
-               LOG_GPS(DBG_ERR, "Main: sending GPS_ACTION_START_FACTTEST Fail !");
+               LOG_GPS(DBG_ERR, "Main: sending HAL_LOCATION_GPS_ACTION_START_FACTTEST Fail !");
                return;
        }
 
-       status = hal_location_request(GPS_ACTION_STOP_FACTTEST, NULL, &reason_code);
+       status = hal_location_request(HAL_LOCATION_GPS_ACTION_STOP_FACTTEST, NULL, &reason_code);
 
        if (status == FALSE)
        {
-               LOG_GPS(DBG_ERR, "Main: sending GPS_ACTION_STOP_FACTTEST Fail !");
+               LOG_GPS(DBG_ERR, "Main: sending HAL_LOCATION_GPS_ACTION_STOP_FACTTEST Fail !");
                return;
        }
 }
@@ -262,27 +262,27 @@ static void _gps_server_set_gps_state(int gps_state)
 
 int request_change_pos_update_interval_standalone_gps(unsigned int interval)
 {
-       LOG_GPS(DBG_INFO, "-->> request to plugin GPS_ACTION_CHANGE_INTERVAL [%u]", interval);
+       LOG_GPS(DBG_INFO, "-->> request to plugin HAL_LOCATION_GPS_ACTION_CHANGE_INTERVAL [%u]", interval);
        gboolean status = TRUE;
-       gps_failure_reason_t reason_code = GPS_FAILURE_CAUSE_NORMAL;
+       gps_failure_reason_e reason_code = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
        gps_server_t *server = g_gps_server;
 
        if (server->session_state == GPS_SESSION_STARTING || server->session_state == GPS_SESSION_STARTED) {
-               gps_action_change_interval_data_t gps_change_interval_data;
+               hal_location_gps_action_change_interval_data_s gps_change_interval_data;
                gps_change_interval_data.interval = (int)interval;
                int ret = hal_location_get_backend();
                if( ret < 0){
                        LOG_GPS(DBG_LOW, "plugin_module_load failed %d", ret);
                        return FALSE;
                }
-               status = hal_location_request(GPS_ACTION_CHANGE_INTERVAL, &gps_change_interval_data, &reason_code);
+               status = hal_location_request(HAL_LOCATION_GPS_ACTION_CHANGE_INTERVAL, &gps_change_interval_data, &reason_code);
                LOG_GPS(DBG_INFO, "requested go GPS module done. gps_change_interval_data.interval [%d]", gps_change_interval_data.interval);
 
                if (status == FALSE) {
-                       LOG_GPS(DBG_ERR, "Main: sending GPS_ACTION_CHANGE_INTERVAL Fail !");
+                       LOG_GPS(DBG_ERR, "Main: sending HAL_LOCATION_GPS_ACTION_CHANGE_INTERVAL Fail !");
                        return FALSE;
                }
-               LOG_GPS(DBG_INFO, "Main: sending GPS_ACTION_CHANGE_INTERVAL OK !");
+               LOG_GPS(DBG_INFO, "Main: sending HAL_LOCATION_GPS_ACTION_CHANGE_INTERVAL OK !");
                return TRUE;
        }
        return FALSE;
@@ -293,9 +293,9 @@ int request_start_session(int interval)
        LOG_GPS(DBG_INFO, "GPS start with interval [%d]", interval);
 
        gboolean status = TRUE;
-       gps_failure_reason_t reason_code = GPS_FAILURE_CAUSE_NORMAL;
+       gps_failure_reason_e reason_code = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
        gps_server_t *server = g_gps_server;
-       gps_action_start_data_t gps_start_data;
+       hal_location_gps_action_start_data_s gps_start_data;
 
        if (server->session_state != GPS_SESSION_STOPPED && server->session_state != GPS_SESSION_STOPPING) {
                LOG_GPS(DBG_WARN, "Main: GPS Session Already Started!");
@@ -323,7 +323,7 @@ int request_start_session(int interval)
                return FALSE;
        }
 
-       status = hal_location_request(GPS_INDI_SUPL_DNSQUERY, &str, &reason_code);
+       status = hal_location_request(HAL_LOCATION_GPS_INDI_SUPL_DNSQUERY, &str, &reason_code);
 
        if(str)
        {
@@ -332,27 +332,27 @@ int request_start_session(int interval)
        }
 
        if (status == FALSE) {
-               LOG_GPS(DBG_ERR, "Main: sending GPS_INDI_SUPL_DNSQUERY Fail !");
+               LOG_GPS(DBG_ERR, "Main: sending HAL_LOCATION_GPS_INDI_SUPL_DNSQUERY Fail !");
                return FALSE;
        }
 
        int replay_mode = 0;
        setting_get_int(VCONFKEY_LOCATION_REPLAY_MODE, &replay_mode);
 
-       status = hal_location_request(GPS_ACTION_START_FACTTEST, &replay_mode, &reason_code);
+       status = hal_location_request(HAL_LOCATION_GPS_ACTION_START_FACTTEST, &replay_mode, &reason_code);
 
        if (status == FALSE) {
-               LOG_GPS(DBG_ERR, "Main: sending GPS_ACTION_START_FACTTEST Fail !");
+               LOG_GPS(DBG_ERR, "Main: sending HAL_LOCATION_GPS_ACTION_START_FACTTEST Fail !");
                return FALSE;
        }
 
        int lcd_mode = 0;
        setting_get_int(VCONFKEY_PM_STATE, &lcd_mode);
 
-       status = hal_location_request(GPS_ACTION_SEND_PARAMS, &lcd_mode, &reason_code);
+       status = hal_location_request(HAL_LOCATION_GPS_ACTION_SEND_PARAMS, &lcd_mode, &reason_code);
 
        if (status == FALSE) {
-               LOG_GPS(DBG_ERR, "Main: sending GPS_ACTION_START_FACTTEST Fail !");
+               LOG_GPS(DBG_ERR, "Main: sending HAL_LOCATION_GPS_ACTION_START_FACTTEST Fail !");
                return FALSE;
        }
 
@@ -360,14 +360,14 @@ int request_start_session(int interval)
        display_lock_state(LCD_OFF, STAY_CUR_STATE, 0);
        LOG_GPS(LOG_DEBUG, "display_lock_state(LCD_OFF, STAY_CUR_STATE, 0);");
 
-       status = hal_location_request(GPS_ACTION_START_SESSION, &gps_start_data, &reason_code);
+       status = hal_location_request(HAL_LOCATION_GPS_ACTION_START_SESSION, &gps_start_data, &reason_code);
 
        if (status == FALSE) {
-               LOG_GPS(DBG_ERR, "Main: sending GPS_ACTION_START_SESSION Fail !");
+               LOG_GPS(DBG_ERR, "Main: sending HAL_LOCATION_GPS_ACTION_START_SESSION Fail !");
                return FALSE;
        }
 
-       LOG_GPS(DBG_INFO, "Main: sending GPS_ACTION_START_SESSION OK !");
+       LOG_GPS(DBG_INFO, "Main: sending HAL_LOCATION_GPS_ACTION_START_SESSION OK !");
 
        setting_ignore_key_changed(VCONFKEY_LOCATION_REPLAY_ENABLED, _gps_replay_changed_cb);
 
@@ -378,7 +378,7 @@ int request_stop_session()
 {
        gboolean status = TRUE;
        gboolean is_replay_enabled = FALSE;
-       gps_failure_reason_t reason_code = GPS_FAILURE_CAUSE_NORMAL;
+       gps_failure_reason_e reason_code = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
        gps_server_t *server = g_gps_server;
 
        LOG_GPS(DBG_LOW, "Main: Stop GPS Session, ==GPSSessionState[%d]", server->session_state);
@@ -395,7 +395,7 @@ int request_stop_session()
                display_unlock_state(LCD_OFF, PM_RESET_TIMER);
                LOG_GPS(DBG_LOW, "display_unlock_state(LCD_OFF, PM_RESET_TIMER);");
 
-               status = hal_location_request(GPS_ACTION_STOP_SESSION, NULL, &reason_code);
+               status = hal_location_request(HAL_LOCATION_GPS_ACTION_STOP_SESSION, NULL, &reason_code);
 
                if (status) {
                        server->session_state = GPS_SESSION_STOPPING;
@@ -422,9 +422,9 @@ int request_start_batch_session(int batch_interval, int batch_period)
        LOG_GPS(DBG_INFO, "Batch: GPS start with interval[%d]", batch_interval);
 
        gboolean status = TRUE;
-       gps_failure_reason_t reason_code = GPS_FAILURE_CAUSE_NORMAL;
+       gps_failure_reason_e reason_code = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
        gps_server_t *server = g_gps_server;
-       gps_action_start_data_t gps_start_data;
+       hal_location_gps_action_start_data_s gps_start_data;
 
        if (server->session_state == GPS_SESSION_STARTING || server->session_state == GPS_SESSION_STARTED)
                gps_start_data.session_status = 1;      /* 1:Already running, 0:need to start*/
@@ -448,11 +448,11 @@ int request_start_batch_session(int batch_interval, int batch_period)
        status = hal_location_request(GPS_ACTION_START_BATCH, &gps_start_data, &reason_code);
 
        if (status == FALSE) {
-               LOG_GPS(DBG_ERR, "Batch: sending GPS_ACTION_START_SESSION Fail !");
+               LOG_GPS(DBG_ERR, "Batch: sending HAL_LOCATION_GPS_ACTION_START_SESSION Fail !");
                return FALSE;
        }
 
-       LOG_GPS(DBG_INFO, "Batch: sending GPS_ACTION_START_SESSION OK !");
+       LOG_GPS(DBG_INFO, "Batch: sending HAL_LOCATION_GPS_ACTION_START_SESSION OK !");
 
        setting_ignore_key_changed(VCONFKEY_LOCATION_REPLAY_ENABLED, _gps_replay_changed_cb);
 
@@ -463,9 +463,9 @@ int request_stop_batch_session(int batch_interval, int batch_period, int session
 {
        gboolean status = TRUE;
        gboolean is_replay_enabled = FALSE;
-       gps_failure_reason_t reason_code = GPS_FAILURE_CAUSE_NORMAL;
+       gps_failure_reason_e reason_code = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
        gps_server_t *server = g_gps_server;
-       gps_action_start_data_t gps_start_data;
+       hal_location_gps_action_start_data_s gps_start_data;
        gps_start_data.interval = batch_interval;
        gps_start_data.period = batch_period;
        gps_start_data.session_status = session_status;         /* 0:need to stop, 1:keep status */
@@ -507,8 +507,8 @@ int request_stop_batch_session(int batch_interval, int batch_period, int session
 int request_add_geofence(int fence_id, double latitude, double longitude, int radius, int last_state, int monitor_states, int notification_responsiveness, int unknown_timer)
 {
        gboolean status = FALSE;
-       gps_failure_reason_t reason_code = GPS_FAILURE_CAUSE_NORMAL;
-       geofence_action_data_t action_data;
+       gps_failure_reason_e reason_code = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
+       hal_location_geofence_action_data_s action_data;
 
        action_data.geofence.geofence_id = fence_id;
        action_data.geofence.latitude = latitude;
@@ -528,7 +528,7 @@ int request_add_geofence(int fence_id, double latitude, double longitude, int ra
                        LOG_GPS(DBG_LOW, "plugin_module_load failed %d", ret);
                        return 0;
                }
-       status = hal_location_request(GPS_ACTION_ADD_GEOFENCE, &action_data, &reason_code);
+       status = hal_location_request(HAL_LOCATION_GPS_ACTION_ADD_GEOFENCE, &action_data, &reason_code);
 
        return status;
 }
@@ -536,7 +536,7 @@ int request_add_geofence(int fence_id, double latitude, double longitude, int ra
 int request_delete_geofence(int fence_id)
 {
        gboolean status = FALSE;
-       gps_failure_reason_t reason_code = GPS_FAILURE_CAUSE_NORMAL;
+       gps_failure_reason_e reason_code = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
 
        LOG_GPS(DBG_LOW, "request_delete_geofence with geofence_id [%d]", fence_id);
        int ret = hal_location_get_backend();
@@ -544,7 +544,7 @@ int request_delete_geofence(int fence_id)
                        LOG_GPS(DBG_LOW, "plugin_module_load failed %d", ret);
                        return 0;
                }
-       status = hal_location_request(GPS_ACTION_DELETE_GEOFENCE, &fence_id, &reason_code);
+       status = hal_location_request(HAL_LOCATION_GPS_ACTION_DELETE_GEOFENCE, &fence_id, &reason_code);
 
        return status;
 }
@@ -552,7 +552,7 @@ int request_delete_geofence(int fence_id)
 int request_pause_geofence(int fence_id)
 {
        gboolean status = FALSE;
-       gps_failure_reason_t reason_code = GPS_FAILURE_CAUSE_NORMAL;
+       gps_failure_reason_e reason_code = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
 
        LOG_GPS(DBG_LOW, "request_pause_geofence with geofence_id [%d]", fence_id);
        int ret = hal_location_get_backend();
@@ -560,7 +560,7 @@ int request_pause_geofence(int fence_id)
                        LOG_GPS(DBG_LOW, "plugin_module_load failed %d", ret);
                        return 0;
                }
-       status = hal_location_request(GPS_ACTION_PAUSE_GEOFENCE, &fence_id, &reason_code);
+       status = hal_location_request(HAL_LOCATION_GPS_ACTION_PAUSE_GEOFENCE, &fence_id, &reason_code);
 
        return status;
 }
@@ -568,8 +568,8 @@ int request_pause_geofence(int fence_id)
 int request_resume_geofence(int fence_id, int monitor_states)
 {
        gboolean status = FALSE;
-       gps_failure_reason_t reason_code = GPS_FAILURE_CAUSE_NORMAL;
-       geofence_action_data_t action_data;
+       gps_failure_reason_e reason_code = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
+       hal_location_geofence_action_data_s action_data;
 
        action_data.geofence.geofence_id = fence_id;
        action_data.monitor_states = monitor_states;
@@ -580,7 +580,7 @@ int request_resume_geofence(int fence_id, int monitor_states)
                        LOG_GPS(DBG_LOW, "plugin_module_load failed %d", ret);
                        return 0;
                }
-       status = hal_location_request(GPS_ACTION_RESUME_GEOFENCE, &action_data, &reason_code);
+       status = hal_location_request(HAL_LOCATION_GPS_ACTION_RESUME_GEOFENCE, &action_data, &reason_code);
 
        return status;
 }
@@ -588,21 +588,21 @@ int request_resume_geofence(int fence_id, int monitor_states)
 int request_delete_gps_data()
 {
        gboolean status = TRUE;
-       gps_failure_reason_t reason_code = GPS_FAILURE_CAUSE_NORMAL;
+       gps_failure_reason_e reason_code = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
        
        int ret = hal_location_get_backend();
                if( ret < 0){
                        LOG_GPS(DBG_LOW, "plugin_module_load failed %d", ret);
                        return FALSE;
                }
-       status = hal_location_request(GPS_ACTION_DELETE_GPS_DATA, NULL, &reason_code);
+       status = hal_location_request(HAL_LOCATION_GPS_ACTION_DELETE_GPS_DATA, NULL, &reason_code);
 
        if (status == FALSE) {
-               LOG_GPS(DBG_ERR, "Fail : GPS_ACTION_DELETE_GPS_DATA [%d]", reason_code);
+               LOG_GPS(DBG_ERR, "Fail : HAL_LOCATION_GPS_ACTION_DELETE_GPS_DATA [%d]", reason_code);
                return FALSE;
        }
 
-       LOG_GPS(DBG_LOW, "Success to GPS_ACTION_DELETE_GPS_DATA");
+       LOG_GPS(DBG_LOW, "Success to HAL_LOCATION_GPS_ACTION_DELETE_GPS_DATA");
        return TRUE;
 }
 
@@ -666,32 +666,32 @@ static void _gps_server_start_event(gps_server_t *server)
        }
 
        if (server->pos_data == NULL) {
-               server->pos_data = (pos_data_t *) malloc(sizeof(pos_data_t));
+               server->pos_data = (hal_location_pos_data_s *) malloc(sizeof(hal_location_pos_data_s));
                if (server->pos_data == NULL)
                        LOG_GPS(DBG_WARN, "//callback: server->pos_data re-malloc Failed!!");
                else
-                       memset(server->pos_data, 0x00, sizeof(pos_data_t));
+                       memset(server->pos_data, 0x00, sizeof(hal_location_pos_data_s));
        }
        if (server->batch_data == NULL) {
-               server->batch_data = (batch_data_t *) malloc(sizeof(batch_data_t));
+               server->batch_data = (hal_location_batch_data_s *) malloc(sizeof(hal_location_batch_data_s));
                if (server->batch_data == NULL)
                        LOG_GPS(DBG_WARN, "//callback: server->batch_data re-malloc Failed!!");
                else
-                       memset(server->batch_data, 0x00, sizeof(batch_data_t));
+                       memset(server->batch_data, 0x00, sizeof(hal_location_batch_data_s));
        }
        if (server->sv_data == NULL) {
-               server->sv_data = (sv_data_t *) malloc(sizeof(sv_data_t));
+               server->sv_data = (hal_location_sv_data_s *) malloc(sizeof(hal_location_sv_data_s));
                if (server->sv_data == NULL)
                        LOG_GPS(DBG_WARN, "//callback: server->sv_data re-malloc Failed!!");
                else
-                       memset(server->sv_data, 0x00, sizeof(sv_data_t));
+                       memset(server->sv_data, 0x00, sizeof(hal_location_sv_data_s));
        }
        if (server->nmea_data == NULL) {
-               server->nmea_data = (nmea_data_t *) malloc(sizeof(nmea_data_t));
+               server->nmea_data = (hal_location_nmea_data_s *) malloc(sizeof(hal_location_nmea_data_s));
                if (server->nmea_data == NULL)
                        LOG_GPS(DBG_WARN, "//callback: server->nmea_data re-malloc Failed!!");
                else
-                       memset(server->nmea_data, 0x00, sizeof(nmea_data_t));
+                       memset(server->nmea_data, 0x00, sizeof(hal_location_nmea_data_s));
        }
 
        _gps_server_set_gps_state(POSITION_SEARCHING);
@@ -716,11 +716,11 @@ static void _gps_server_stop_event(gps_server_t *server)
        }
 }
 
-static void _report_pos_event(gps_server_t *server, gps_event_info_t *gps_event)
+static void _report_pos_event(gps_server_t *server, gps_event_info_s *gps_event)
 {
        if (server->pos_data != NULL) {
-               memset(server->pos_data, 0x00, sizeof(pos_data_t)); /* Moved: the address of server->pos_data sometimes returns 0 when stopping GPS */
-               memcpy(server->pos_data, &(gps_event->event_data.pos_ind.pos), sizeof(pos_data_t));
+               memset(server->pos_data, 0x00, sizeof(hal_location_pos_data_s)); /* Moved: the address of server->pos_data sometimes returns 0 when stopping GPS */
+               memcpy(server->pos_data, &(gps_event->event_data.pos_ind.pos), sizeof(hal_location_pos_data_s));
                /* change m/s to km/h */
                server->pos_data->speed = server->pos_data->speed * MPS_TO_KMPH;
                g_update_cb.pos_cb(server->pos_data, gps_event->event_data.pos_ind.error, g_user_data);
@@ -729,29 +729,29 @@ static void _report_pos_event(gps_server_t *server, gps_event_info_t *gps_event)
        }
 }
 
-static void _report_batch_event(gps_server_t *server, gps_event_info_t *gps_event)
+static void _report_batch_event(gps_server_t *server, gps_event_info_s *gps_event)
 {
        if (server->batch_data != NULL) {
-               memset(server->batch_data, 0x00, sizeof(batch_data_t));
-               memcpy(server->batch_data, &(gps_event->event_data.batch_ind.batch), sizeof(batch_data_t));
+               memset(server->batch_data, 0x00, sizeof(hal_location_batch_data_s));
+               memcpy(server->batch_data, &(gps_event->event_data.batch_ind.batch), sizeof(hal_location_batch_data_s));
                g_update_cb.batch_cb(server->batch_data, g_user_data);
        } else {
                LOG_GPS(DBG_ERR, "server->batch_data is NULL");
        }
 }
 
-static void _report_sv_event(gps_server_t *server, gps_event_info_t *gps_event)
+static void _report_sv_event(gps_server_t *server, gps_event_info_s *gps_event)
 {
        if (server->sv_data != NULL) {
-               memset(server->sv_data, 0x00, sizeof(sv_data_t));
-               memcpy(server->sv_data, &(gps_event->event_data.sv_ind.sv), sizeof(sv_data_t));
+               memset(server->sv_data, 0x00, sizeof(hal_location_sv_data_s));
+               memcpy(server->sv_data, &(gps_event->event_data.sv_ind.sv), sizeof(hal_location_sv_data_s));
                g_update_cb.sv_cb(server->sv_data, g_user_data);
        } else {
                LOG_GPS(DBG_ERR, "server->sv_data is NULL");
        }
 }
 
-static void _report_nmea_event(gps_server_t *server, gps_event_info_t *gps_event)
+static void _report_nmea_event(gps_server_t *server, gps_event_info_s *gps_event)
 {
        if (server->nmea_data == NULL) {
                LOG_GPS(DBG_ERR, "server->nmea_data is NULL");
@@ -841,7 +841,7 @@ static int _gps_server_resolve_dns(char *domain)
        LOG_GPS(DBG_LOW, "Enter _gps_server_resolve_dns");
 
        unsigned char result;
-       gps_failure_reason_t reason_code = GPS_FAILURE_CAUSE_NORMAL;
+       gps_failure_reason_e reason_code = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
        unsigned int ipaddr;
        int port;
 
@@ -854,7 +854,7 @@ static int _gps_server_resolve_dns(char *domain)
                        LOG_GPS(DBG_LOW, "plugin_module_load failed %d", ret);
                        return FALSE;
                }
-               hal_location_request(GPS_INDI_SUPL_DNSQUERY, (void *)(&ipaddr), &reason_code);
+               hal_location_request(HAL_LOCATION_GPS_INDI_SUPL_DNSQUERY, (void *)(&ipaddr), &reason_code);
                
        } else {
                ipaddr = 0;
@@ -864,7 +864,7 @@ static int _gps_server_resolve_dns(char *domain)
                        LOG_GPS(DBG_LOW, "plugin_module_load failed %d", retrn);
                        return FALSE;
                }
-               hal_location_request(GPS_INDI_SUPL_DNSQUERY, (void *)(&ipaddr), &reason_code);
+               hal_location_request(HAL_LOCATION_GPS_INDI_SUPL_DNSQUERY, (void *)(&ipaddr), &reason_code);
                return FALSE;
        }
 
@@ -875,7 +875,7 @@ static void _gps_server_send_facttest_result(double snr_data, int prn, unsigned
 {
 }
 
-static void _report_geofence_transition(int geofence_id, geofence_zone_state_t transition, double latitude, double longitude, double altitude, double speed, double bearing, double hor_accuracy)
+static void _report_geofence_transition(int geofence_id, hal_location_geofence_zone_state_e transition, double latitude, double longitude, double altitude, double speed, double bearing, double hor_accuracy)
 {
        gps_update_geofence_transition(geofence_id, transition, latitude, longitude, altitude, speed, bearing, hor_accuracy, (void *)g_user_data);
 }
@@ -910,7 +910,7 @@ static void _gps_server_send_geofence_result(geofence_event_e event, int geofenc
        }
 }
 
-static int _gps_server_gps_event_cb(gps_event_info_t *gps_event_info, void *user_data)
+static int _gps_server_gps_event_cb(gps_event_info_s *gps_event_info, void *user_data)
 {
        /*LOG_FUNC; */
        gps_server_t *server = (gps_server_t *)user_data;
@@ -921,23 +921,23 @@ static int _gps_server_gps_event_cb(gps_event_info_t *gps_event_info, void *user
        }
 
        switch (gps_event_info->event_id) {
-       case GPS_EVENT_START_SESSION:
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_START_SESSION :::::::::::::::");
-               if (gps_event_info->event_data.start_session_rsp.error == GPS_ERR_NONE)
+       case HAL_LOCATION_GPS_EVENT_START_SESSION:
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_START_SESSION :::::::::::::::");
+               if (gps_event_info->event_data.start_session_rsp.error == HAL_LOCATION_GPS_ERR_NONE)
                        _gps_server_start_event(server);
                else
                        LOG_GPS(DBG_ERR, "//Start Session Failed, error : %d", gps_event_info->event_data.start_session_rsp.error);
 
                break;
-       case GPS_EVENT_SET_OPTION:
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_SET_OPTION :::::::::::::::");
-               if (gps_event_info->event_data.set_option_rsp.error != GPS_ERR_NONE)
+       case HAL_LOCATION_GPS_EVENT_SET_OPTION:
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_SET_OPTION :::::::::::::::");
+               if (gps_event_info->event_data.set_option_rsp.error != HAL_LOCATION_GPS_ERR_NONE)
                        LOG_GPS(DBG_ERR, "//Set Option Failed, error : %d", gps_event_info->event_data.set_option_rsp.error);
 
                break;
-       case GPS_EVENT_STOP_SESSION:
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_STOP_SESSION :::::::::::::::");
-               if (gps_event_info->event_data.stop_session_rsp.error == GPS_ERR_NONE) {
+       case HAL_LOCATION_GPS_EVENT_STOP_SESSION:
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_STOP_SESSION :::::::::::::::");
+               if (gps_event_info->event_data.stop_session_rsp.error == HAL_LOCATION_GPS_ERR_NONE) {
                        _gps_server_close_data_connection(server);
                        _gps_server_stop_event(server);
                } else {
@@ -945,32 +945,32 @@ static int _gps_server_gps_event_cb(gps_event_info_t *gps_event_info, void *user
                }
 
                break;
-       case GPS_EVENT_CHANGE_INTERVAL:
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_CHANGE_INTERVAL :::::::::::::::");
-               if (gps_event_info->event_data.change_interval_rsp.error == GPS_ERR_NONE)
+       case HAL_LOCATION_GPS_EVENT_CHANGE_INTERVAL:
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_CHANGE_INTERVAL :::::::::::::::");
+               if (gps_event_info->event_data.change_interval_rsp.error == HAL_LOCATION_GPS_ERR_NONE)
                        LOG_GPS(DBG_LOW, "Change interval success.");
                else
                        LOG_GPS(DBG_ERR, "//Change interval Failed, error : %d", gps_event_info->event_data.change_interval_rsp.error);
 
                break;
-       case GPS_EVENT_REPORT_POSITION:
+       case HAL_LOCATION_GPS_EVENT_REPORT_POSITION:
                LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_POSITION :::::::::::::::");
-               if (gps_event_info->event_data.pos_ind.error == GPS_ERR_NONE)
+               if (gps_event_info->event_data.pos_ind.error == HAL_LOCATION_GPS_ERR_NONE)
                        _report_pos_event(server, gps_event_info);
                else
                        LOG_GPS(DBG_ERR, "GPS_EVENT_POSITION Failed, error : %d", gps_event_info->event_data.pos_ind.error);
 
                break;
-       case GPS_EVENT_REPORT_BATCH:
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_BATCH :::::::::::::::");
-               if (gps_event_info->event_data.batch_ind.error == GPS_ERR_NONE)
+       case HAL_LOCATION_GPS_EVENT_REPORT_BATCH:
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_REPORT_BATCH :::::::::::::::");
+               if (gps_event_info->event_data.batch_ind.error == HAL_LOCATION_GPS_ERR_NONE)
                        _report_batch_event(server, gps_event_info);
                else
                        LOG_GPS(DBG_ERR, "GPS_EVENT_BATCH Failed, error : %d", gps_event_info->event_data.batch_ind.error);
 
                break;
-       case GPS_EVENT_REPORT_SATELLITE:
-               if (gps_event_info->event_data.sv_ind.error == GPS_ERR_NONE) {
+       case HAL_LOCATION_GPS_EVENT_REPORT_SATELLITE:
+               if (gps_event_info->event_data.sv_ind.error == HAL_LOCATION_GPS_ERR_NONE) {
                        if (gps_event_info->event_data.sv_ind.sv.pos_valid) {
                                if (_gps_server_get_gps_state() != POSITION_CONNECTED)
                                        _gps_server_set_gps_state(POSITION_CONNECTED);
@@ -984,37 +984,37 @@ static int _gps_server_gps_event_cb(gps_event_info_t *gps_event_info, void *user
                        LOG_GPS(DBG_ERR, "GPS_EVENT_SATELLITE Failed, error : %d", gps_event_info->event_data.sv_ind.error);
                }
                break;
-       case GPS_EVENT_REPORT_NMEA:
+       case HAL_LOCATION_GPS_EVENT_REPORT_NMEA:
                /* if (_gps_server_get_gps_state() != POSITION_CONNECTED) */
                        /*LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_NMEA :::::::::::::::"); */
 
-               if (gps_event_info->event_data.nmea_ind.error == GPS_ERR_NONE)
+               if (gps_event_info->event_data.nmea_ind.error == HAL_LOCATION_GPS_ERR_NONE)
                        _report_nmea_event(server, gps_event_info);
                else
                        LOG_GPS(DBG_ERR, "GPS_EVENT_NMEA Failed, error : %d", gps_event_info->event_data.nmea_ind.error);
 
                break;
-       case GPS_EVENT_ERR_CAUSE:
+       case HAL_LOCATION_GPS_EVENT_ERR_CAUSE:
                break;
-       case GPS_EVENT_AGPS_VERIFICATION_INDI:
+       case HAL_LOCATION_GPS_EVENT_AGPS_VERIFICATION_INDI:
                break;
-       case GPS_EVENT_GET_IMSI:
+       case HAL_LOCATION_GPS_EVENT_GET_IMSI:
                break;
-       case GPS_EVENT_GET_REF_LOCATION:
+       case HAL_LOCATION_GPS_EVENT_GET_REF_LOCATION:
                break;
-       case GPS_EVENT_OPEN_DATA_CONNECTION: {
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_OPEN_DATA_CONNECTION :::::::::::::::");
+       case HAL_LOCATION_GPS_EVENT_OPEN_DATA_CONNECTION: {
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_OPEN_DATA_CONNECTION :::::::::::::::");
                        result = _gps_server_open_data_connection(server);
                }
                break;
-       case GPS_EVENT_CLOSE_DATA_CONNECTION: {
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_CLOSE_DATA_CONNECTION :::::::::::::::");
+       case HAL_LOCATION_GPS_EVENT_CLOSE_DATA_CONNECTION: {
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_CLOSE_DATA_CONNECTION :::::::::::::::");
                result = _gps_server_close_data_connection(server);
                }
                break;
-       case GPS_EVENT_DNS_LOOKUP_IND:
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_DNS_LOOKUP_IND :::::::::::::::");
-               if (gps_event_info->event_data.dns_query_ind.error == GPS_ERR_NONE)
+       case HAL_LOCATION_GPS_EVENT_DNS_LOOKUP_IND:
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_DNS_LOOKUP_IND :::::::::::::::");
+               if (gps_event_info->event_data.dns_query_ind.error == HAL_LOCATION_GPS_ERR_NONE)
                        result = _gps_server_resolve_dns(gps_event_info->event_data.dns_query_ind.domain_name);
                else
                        result = FALSE;
@@ -1023,9 +1023,9 @@ static int _gps_server_gps_event_cb(gps_event_info_t *gps_event_info, void *user
                        LOG_GPS(DBG_LOW, "Success to get the DNS Query about [ %s ]", gps_event_info->event_data.dns_query_ind.domain_name);
 
                break;
-       case GPS_EVENT_FACTORY_TEST:
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_FACTORY_TEST :::::::::::::::");
-               if (gps_event_info->event_data.factory_test_rsp.error == GPS_ERR_NONE) {
+       case HAL_LOCATION_GPS_EVENT_FACTORY_TEST:
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_FACTORY_TEST :::::::::::::::");
+               if (gps_event_info->event_data.factory_test_rsp.error == HAL_LOCATION_GPS_ERR_NONE) {
                        LOG_GPS(DBG_LOW, "[LBS server] Response Factory test result success");
                        _gps_server_send_facttest_result(gps_event_info->event_data.factory_test_rsp.snr,
                                                                                                 gps_event_info->event_data.factory_test_rsp.prn, TRUE);
@@ -1035,8 +1035,8 @@ static int _gps_server_gps_event_cb(gps_event_info_t *gps_event_info, void *user
                                                                                                 gps_event_info->event_data.factory_test_rsp.prn, FALSE);
                }
                break;
-       case GPS_EVENT_GEOFENCE_TRANSITION:
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_GEOFENCE_TRANSITION :::::::::::::::");
+       case HAL_LOCATION_GPS_EVENT_GEOFENCE_TRANSITION:
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_GEOFENCE_TRANSITION :::::::::::::::");
                _report_geofence_transition(gps_event_info->event_data.geofence_transition_ind.geofence_id,
                                                                        gps_event_info->event_data.geofence_transition_ind.state,
                                                                        gps_event_info->event_data.geofence_transition_ind.pos.latitude,
@@ -1046,30 +1046,30 @@ static int _gps_server_gps_event_cb(gps_event_info_t *gps_event_info, void *user
                                                                        gps_event_info->event_data.geofence_transition_ind.pos.bearing,
                                                                        gps_event_info->event_data.geofence_transition_ind.pos.hor_accuracy);
                break;
-       case GPS_EVENT_GEOFENCE_STATUS:
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_GEOFENCE_STATUS :::::::::::::::");
+       case HAL_LOCATION_GPS_EVENT_GEOFENCE_STATUS:
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_GEOFENCE_STATUS :::::::::::::::");
                _report_geofence_service_status(gps_event_info->event_data.geofence_status_ind.status);
                break;
-       case GPS_EVENT_ADD_GEOFENCE:
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_ADD_GEOFENCE :::::::::::::::");
+       case HAL_LOCATION_GPS_EVENT_ADD_GEOFENCE:
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_ADD_GEOFENCE :::::::::::::::");
                _gps_server_send_geofence_result(GEOFENCE_ADD_FENCE,
                                                                                 gps_event_info->event_data.geofence_event_rsp.geofence_id,
                                                                                 gps_event_info->event_data.geofence_event_rsp.error);
                break;
-       case GPS_EVENT_DELETE_GEOFENCE:
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_DELETE_GEOFENCE :::::::::::::::");
+       case HAL_LOCATION_GPS_EVENT_DELETE_GEOFENCE:
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_DELETE_GEOFENCE :::::::::::::::");
                _gps_server_send_geofence_result(GEOFENCE_DELETE_FENCE,
                                                                                 gps_event_info->event_data.geofence_event_rsp.geofence_id,
                                                                                 gps_event_info->event_data.geofence_event_rsp.error);
                break;
-       case GPS_EVENT_PAUSE_GEOFENCE:
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_PAUSE_GEOFENCE :::::::::::::::");
+       case HAL_LOCATION_GPS_EVENT_PAUSE_GEOFENCE:
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_PAUSE_GEOFENCE :::::::::::::::");
                _gps_server_send_geofence_result(GEOFENCE_PAUSE_FENCE,
                                                                                 gps_event_info->event_data.geofence_event_rsp.geofence_id,
                                                                                 gps_event_info->event_data.geofence_event_rsp.error);
                break;
-       case GPS_EVENT_RESUME_GEOFENCE:
-               LOG_GPS(DBG_LOW, "<<::::::::::: GPS_EVENT_RESUME_GEOFENCE :::::::::::::::");
+       case HAL_LOCATION_GPS_EVENT_RESUME_GEOFENCE:
+               LOG_GPS(DBG_LOW, "<<::::::::::: HAL_LOCATION_GPS_EVENT_RESUME_GEOFENCE :::::::::::::::");
                _gps_server_send_geofence_result(GEOFENCE_RESUME_FENCE,
                                                                                 gps_event_info->event_data.geofence_event_rsp.geofence_id,
                                                                                 gps_event_info->event_data.geofence_event_rsp.error);
@@ -1084,8 +1084,8 @@ static int _gps_server_gps_event_cb(gps_event_info_t *gps_event_info, void *user
 #ifndef _TIZEN_PUBLIC_
 int request_supl_ni_session(const char *header, const char *body, int size)
 {
-       agps_supl_ni_info_t info;
-       gps_failure_reason_t reason_code;
+       hal_location_agps_supl_ni_info_s info;
+       gps_failure_reason_e reason_code;
 
        info.msg_body = (char *)body;
        info.msg_size = size;
@@ -1097,7 +1097,7 @@ int request_supl_ni_session(const char *header, const char *body, int size)
                        return FALSE;
                }
 
-       if (!hal_location_request(GPS_ACTION_REQUEST_SUPL_NI, &info, &reason_code)) {
+       if (!hal_location_request(HAL_LOCATION_GPS_ACTION_REQUEST_SUPL_NI, &info, &reason_code)) {
                LOG_GPS(DBG_ERR, "Failed to request SUPL NI (code:%d)", reason_code);
                return FALSE;
        }
@@ -1108,8 +1108,8 @@ int request_supl_ni_session(const char *header, const char *body, int size)
 static void *request_supl_ni_session(void *data)
 {
        gps_ni_data_t *ni_data = (gps_ni_data_t *) data;
-       agps_supl_ni_info_t info;
-       gps_failure_reason_t reason_code;
+       hal_location_agps_supl_ni_info_s info;
+       gps_failure_reason_e reason_code;
 
        info.msg_body = (char *)ni_data->msg_body;
        info.msg_size = ni_data->msg_size;
@@ -1121,7 +1121,7 @@ static void *request_supl_ni_session(void *data)
                        return;
                }
 
-       if (!hal_location_request(GPS_ACTION_REQUEST_SUPL_NI, &info, &reason_code))
+       if (!hal_location_request(HAL_LOCATION_GPS_ACTION_REQUEST_SUPL_NI, &info, &reason_code))
                LOG_GPS(DBG_ERR, "Failed to request SUPL NI (code:%d)", reason_code);
 
        free(ni_data);
@@ -1260,42 +1260,42 @@ static gps_server_t *_initialize_gps_data(void)
        memset(&g_gps_server->gps_plugin, 0x00, sizeof(gps_plugin_handler_t));
 
        if (g_gps_server->pos_data == NULL) {
-               g_gps_server->pos_data = (pos_data_t *) malloc(sizeof(pos_data_t));
+               g_gps_server->pos_data = (hal_location_pos_data_s *) malloc(sizeof(hal_location_pos_data_s));
                if (g_gps_server->pos_data == NULL) {
                        LOG_GPS(DBG_ERR, "Failed to alloc g_gps_server->pos_data");
                        return NULL;
                } else {
-                       memset(g_gps_server->pos_data, 0x00, sizeof(pos_data_t));
+                       memset(g_gps_server->pos_data, 0x00, sizeof(hal_location_pos_data_s));
                }
        }
 
        if (g_gps_server->batch_data == NULL) {
-               g_gps_server->batch_data = (batch_data_t *) malloc(sizeof(batch_data_t));
+               g_gps_server->batch_data = (hal_location_batch_data_s *) malloc(sizeof(hal_location_batch_data_s));
                if (g_gps_server->batch_data == NULL) {
                        LOG_GPS(DBG_ERR, "Failed to alloc g_gps_server->batch_data");
                        return NULL;
                } else {
-                       memset(g_gps_server->batch_data, 0x00, sizeof(batch_data_t));
+                       memset(g_gps_server->batch_data, 0x00, sizeof(hal_location_batch_data_s));
                }
        }
 
        if (g_gps_server->sv_data == NULL) {
-               g_gps_server->sv_data = (sv_data_t *) malloc(sizeof(sv_data_t));
+               g_gps_server->sv_data = (hal_location_sv_data_s *) malloc(sizeof(hal_location_sv_data_s));
                if (g_gps_server->sv_data == NULL) {
                        LOG_GPS(DBG_ERR, "Failed to alloc g_gps_server->sv_data");
                        return NULL;
                } else {
-                       memset(g_gps_server->sv_data, 0x00, sizeof(sv_data_t));
+                       memset(g_gps_server->sv_data, 0x00, sizeof(hal_location_sv_data_s));
                }
        }
 
        if (g_gps_server->nmea_data == NULL) {
-               g_gps_server->nmea_data = (nmea_data_t *) malloc(sizeof(nmea_data_t));
+               g_gps_server->nmea_data = (hal_location_nmea_data_s *) malloc(sizeof(hal_location_nmea_data_s));
                if (g_gps_server->nmea_data == NULL) {
                        LOG_GPS(DBG_ERR, "Failed to alloc g_gps_server->nmea_data");
                        return NULL;
                } else {
-                       memset(g_gps_server->nmea_data, 0x00, sizeof(nmea_data_t));
+                       memset(g_gps_server->nmea_data, 0x00, sizeof(hal_location_nmea_data_s));
                }
        }
 
@@ -1382,7 +1382,7 @@ int initialize_server(int argc, char **argv)
 
 int deinitialize_server()
 {
-       gps_failure_reason_t ReasonCode = GPS_FAILURE_CAUSE_NORMAL;
+       gps_failure_reason_e ReasonCode = HAL_LOCATION_GPS_FAILURE_CAUSE_NORMAL;
 
 #ifdef _TIZEN_PUBLIC_
        pthread_join(g_gps_server->msg_thread, (void *)&g_gps_server->msg_thread_status);