Support to TW2 - telephony daemon, wearable enums 21/134921/1 submit/tizen/20170622.095709
authorkj7.sung <kj7.sung@samsung.com>
Tue, 20 Jun 2017 08:51:04 +0000 (17:51 +0900)
committerkj7.sung <kj7.sung@samsung.com>
Tue, 20 Jun 2017 08:51:04 +0000 (17:51 +0900)
Change-Id: If7f641095fde2b618fe977d5765b2da2917fcc2c
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
lbs-server/include/gps_plugin_data_types.h
lbs-server/include/gps_plugin_intf.h
lbs-server/src/server.c
packaging/lbs-server.changes
packaging/lbs-server.service
packaging/lbs-server.spec

index 9fbdac3..a155b64 100644 (file)
@@ -67,6 +67,14 @@ typedef enum {
 } geofence_error_t;
 
 /**
+ * This enumeration has XTRA request error type (wearable profile use only).
+ */
+typedef enum {
+       XTRA_REQUEST_ERR_NONE   = 0,
+       XTRA_REQUEST_ERR_UNKNOWN  = -100,
+} xtra_request_error_t;
+
+/**
  * This structure defines the GPS position data.
  */
 typedef struct {
@@ -127,6 +135,14 @@ typedef struct {
        int     radius;                 /**< Radius data (in meters) */
 } geofence_data_t;
 
+typedef struct {
+       char imsi[16];  /**< IMSI */
+       int mcc;                /**< MCC */
+       int mnc;                /**< MNC */
+       int lac;                /**< Location area code */
+       int psc;                /**< Primary Srambling code */
+       int cid;                /**< Cell id */
+} mobile_info_t;
 
 #ifdef __cplusplus
 }
index 221bcc4..ed11f2b 100644 (file)
@@ -48,6 +48,7 @@ typedef enum {
        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 */
@@ -59,6 +60,7 @@ typedef enum {
        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;
 
@@ -264,6 +266,28 @@ typedef struct {
 } 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 {
@@ -287,6 +311,10 @@ 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;
 
 /**
@@ -327,6 +355,7 @@ typedef enum {
        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,
@@ -334,6 +363,15 @@ typedef enum {
        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;
@@ -383,6 +421,21 @@ typedef struct {
 } 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 {
@@ -403,6 +456,30 @@ 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
  */
index ad06721..96a3887 100644 (file)
@@ -68,6 +68,7 @@
 #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"
@@ -1091,7 +1092,7 @@ void check_plugin_module(char *module_name)
        } 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);
index 17b0ab6..cba7dc6 100644 (file)
@@ -1,3 +1,9 @@
+[Version]      lbs-server_1.1.7
+[Date]         21 Jun 2017
+[Changes]      Support to TW2 - telephony daemon, wearable enums
+[Developer]    Kyoungjun Sung <kj7.sung@samsung.com>
+
+================================================================================
 [Version]      lbs-server_1.1.6
 [Date]         28 Mar 2017
 [Changes]      Fix dynamic interval to support multi handle
index 4947b2f..bee8e20 100644 (file)
@@ -1,9 +1,13 @@
 [Unit]
 Description=lbs server daemon
+After=callmgr.service
+Requires=callmgr.service
 
 [Service]
 #Type=forking
 #ExecStart=/etc/rc.d/rc5.d/S90lbs-server
+Type=dbus
+BusName=org.tizen.lbs.Providers.LbsServer
 SmackProcessLabel=System
 ExecStart=/usr/bin/lbs-server
 MemoryLimit=10M
index 7465586..3590168 100644 (file)
@@ -1,6 +1,6 @@
 Name:    lbs-server
 Summary: LBS Server for Tizen
-Version: 1.1.6
+Version: 1.1.7
 Release: 1
 Group:   Location/Service
 License: Apache-2.0