GPS_EVENT_SET_OPTION = 0x0200, /**< The option is set */
GPS_EVENT_GET_REF_LOCATION = 0x0300, /**< Get the reference location for AGPS */
GPS_EVENT_GET_IMSI, /**< Get IMSI for identification */
+ GPS_EVENT_GET_REF_TIME, /**< Get the reference time for AGPS */
GPS_EVENT_OPEN_DATA_CONNECTION = 0x0400, /**< Request opening data network connection */
GPS_EVENT_CLOSE_DATA_CONNECTION, /**< Request closing data network connection */
GPS_EVENT_DNS_LOOKUP_IND, /**< Request resolving host name */
GPS_EVENT_DELETE_GEOFENCE, /**< Geofence is deleted(Stop geofence) */
GPS_EVENT_PAUSE_GEOFENCE, /**< Geofence is paused */
GPS_EVENT_RESUME_GEOFENCE, /**< Geofence is resumed */
+ GPS_EVENT_REQUEST_XTRA = 0x0700, /**< XTRA is requested. Used by Wearable profile only. */
GPS_EVENT_ERR_CAUSE = 0xFFFF /**< Some error is occurred */
} gps_event_id_t;
} geofence_event_t;
/**
+ * Type of XTRA request. Used by Wearable profile only.
+ */
+typedef enum {
+ XTRA_REQUEST_TYPE_NONE = 0x00,
+ XTRA_REQUEST_TYPE_QCOM = 0x01,
+ XTRA_REQUEST_TYPE_BRCM = 0x02,
+ XTRA_REQEUST_TYPE_NUM,
+} xtra_request_type_t;
+
+/**
+ * XTRA request information. Used by Wearable profile only.
+ */
+typedef struct {
+ xtra_request_type_t xtra_id;
+ xtra_request_error_t error;
+} xtra_request_info_t;
+
+typedef struct {
+ time_t timeout;
+}ref_data_request_info_t;
+
+/**
* GPS event info
*/
typedef union {
geofence_transition_ev_info_t geofence_transition_ind;
geofence_status_ev_info_t geofence_status_ind;
geofence_event_t geofence_event_rsp;
+
+ /** Callback related with XTRA. Used by Wearable profile only. */
+ xtra_request_info_t xtra_request_ind;
+ ref_data_request_info_t ref_data_req_ind;
} gps_event_data_t;
/**
GPS_ACTION_START_FACTTEST,
GPS_ACTION_STOP_FACTTEST,
GPS_ACTION_REQUEST_SUPL_NI,
+ GPS_ACTION_REQUEST_SUPL_NI_NOMODEM,
GPS_ACTION_DELETE_GPS_DATA,
GPS_ACTION_ADD_GEOFENCE,
GPS_ACTION_PAUSE_GEOFENCE,
GPS_ACTION_RESUME_GEOFENCE,
+ GPS_ACTION_DOWNLOAD_XTRA, /* Used by Wearable profile only. */
+ GPS_ACTION_CONSUMER_CONNECTED, /* Used by Wearable profile only. */
+ GPS_ACTION_CONSUMER_DISCONNECTED, /* Used by Wearable profile only. */
+
+ GPS_ACTION_CHANGE_INTERVAL_SPORTMODE,
+
+ GPS_ACTION_SET_REF_LOCATION, /* Used by Wearable profile only. */
+ GPS_ACTION_SET_REF_TIME, /* Used by Wearable profile only. */
+
GPS_ACTION_START_BATCH,
GPS_ACTION_STOP_BATCH,
} gps_action_t;
} agps_supl_ni_info_t;
/**
+ * SUPL network-initiated information in case of no-modem
+ */
+typedef struct {
+ char *msg_body; /**< SUPL NI message body */
+ int msg_size; /**< SUPL NI message size */
+ char imsi[16]; /**< IMSI */
+ int mcc; /**< MCC */
+ int mnc; /**< MNC */
+ int lac; /**< Location area code */
+ int psc; /**< Primary Srambling code */
+ int cid; /**< Cell id */
+ int status; /**< Return code of Status */
+} agps_supl_ni_nomodem_info_t;
+
+/**
* Geofence action data type
*/
typedef struct {
int interval;
} gps_action_change_interval_data_t;
+/*
+* GPS_ACTION_SET_REF_LOCATION
+*/
+typedef struct {
+ int result;
+ int reason;
+ time_t timestamp; /**< Timestamp */
+ double latitude; /**< Latitude data (in degree) */
+ double longitude; /**< Longitude data (in degree) */
+ double accuracy; /**< Horizontal position error(in meter) */
+} gps_action_set_ref_location_t; // Added 2016.06.30
+
+/*
+* GPS_ACTION_SET_REF_TIME
+*/
+typedef struct {
+ int result;
+ int reason;
+ int method;
+ int64_t ntp_timestamp; /**< Timestamp from NTP */
+ int64_t elapsed_systime; /**< Milliseconds since boot, including time spent in sleep */
+ int uncertainty; /**< Half of round trip time in milliseconds */
+} gps_action_set_ref_time_t; // Added 2016.06.30
+
/**
* gps-plugin plugin interface
*/
#define BRCM47520_PATH PLATFORM_PATH"/bcm47520"
#define BRCM47511_PATH PLATFORM_PATH"/bcm47511"
#define BRCM47522_PATH PLATFORM_PATH"/bcm47522"
+#define BRCM4774_PATH PLATFORM_PATH"/bcm4774"
#define BRCM477_PATH PLATFORM_PATH"/gps"
#define CSR_PATH PLATFORM_PATH"/gsd4t"
#define QCOM8210_PATH PLATFORM_PATH"/msm8210_gps"
} else if (access(USB_PLUGIN_PATH, F_OK) == 0) {
g_strlcpy(module_name, "usb", strlen("usb") + 1);
} else if (access(BRCM4752_PATH, F_OK) == 0 || access(BRCM47520_PATH, F_OK) == 0 ||
- access(BRCM47522_PATH, F_OK) == 0 || access(BRCM477_PATH, F_OK) == 0) {
+ access(BRCM47522_PATH, F_OK) == 0 || access(BRCM477_PATH, F_OK) == 0 || access(BRCM4774_PATH, F_OK) == 0) {
g_strlcpy(module_name, "brcm", strlen("brcm") + 1);
} else if (access(BRCM47511_PATH, F_OK) == 0) {
g_strlcpy(module_name, "brcm-legacy", strlen("brcm-legacy") + 1);