Add WEA 3.0 CB message info and chipset info 08/234808/3 accepted/tizen/unified/20200629.143509 submit/tizen/20200626.014929
authorsinikang <sinikang@samsung.com>
Fri, 29 May 2020 02:46:47 +0000 (11:46 +0900)
committersinikang <sinikang@samsung.com>
Fri, 29 May 2020 06:23:54 +0000 (15:23 +0900)
Change-Id: I8974492595242019aead0469a0684acff0c87899
Signed-off-by: sinikang <sinikang@samsung.com>
include/TelCall.h
include/TelMisc.h
include/TelSms.h
include/tapi_event.h
packaging/libtapi.spec
src/tapi_common.c
src/tapi_modem.c

index 0e92682..b145222 100644 (file)
@@ -281,9 +281,17 @@ typedef enum {
        TAPI_CC_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,       /**< Protocol error unspecified */
        TAPI_CC_CAUSE_INTERWORKING_UNSPECIFIED, /**< Interworking unspecified */
        TAPI_CC_CAUSE_REORDER,                          /**< Reorder */
+
        TAPI_CC_CAUSE_ACCEPTED_EXTERNALLY = 54, /**< Call accepted other device */
        TAPI_CC_CAUSE_REJECTED_EXTERNALLY,      /**< Call rejected other device */
+
        TAPI_CC_CAUSE_ALREADY_IN_USE, /**< Call rejected - secondary device already in use */
+       TAPI_CC_CAUSE_PULLED_BY_PD, /**<call pulled by primary device*/
+       TAPI_CC_CAUSE_PULLED_BY_SD, /**<call pulled by secondary device*/
+       TAPI_CC_CAUSE_ECC_NOT_SUPPORTED, /**<ECC call not supported - CMC only */
+       TAPI_CC_CAUSE_PD_UNREACHABLE = 60, /**<PD is out of reach, so unable to use PD's call - CMC only*/
+
+       TAPI_CC_CAUSE_PD_NOT_REGISTERED, /**<PD is not registered, so unable for SD to use call - CMC only*/
 
        TAPI_CC_CAUSE_END = 128,        /**< End unspecified */
 
@@ -358,6 +366,9 @@ typedef enum {
        TAPI_REJECT_CAUSE_CNM_REJ_NO_RESOURCES,         /**< Rejected due to unavailibilty of resources */
        TAPI_REJECT_CAUSE_CNM_MM_REL_PENDING,           /**< MM release pending */
        TAPI_REJECT_CAUSE_CNM_INVALID_USER_DATA,        /**< Invalid user data */
+
+       TAPI_REJECT_CAUSE_RTP_TIMEOUT,                                  /**< RTP timeout */
+
        TAPI_CALL_END_CAUSE_MAX = 255,                  /**< Maximum End Cause limit for GSM/WCDMA */
 
        /* CDMA CALL END CAUSE */
index 3b4c2a8..8b44ff4 100644 (file)
@@ -65,6 +65,12 @@ extern "C" {
 #define TAPI_MISC_PRL_ERI_VER_LEN_MAX 17
 
 /**
+ * @brief Definition for the maximum length of CP chipset.
+ * @since_tizen 2.3
+ */
+#define TAPI_MISC_CP_CHIPSET_LEN_MAX 16
+
+/**
  * @brief Definition for the maximum length of device name.
  * @since_tizen 2.3
  */
@@ -87,6 +93,7 @@ typedef struct {
        unsigned char szPrlVersion[TAPI_MISC_PRL_ERI_VER_LEN_MAX * 3];/**< PRL version (only for CDMA), null termination */
        unsigned char eri_nam_num; /**< Number of PRL NAM fields */
        unsigned char szEriVersion[TAPI_MISC_PRL_ERI_VER_LEN_MAX * 3];/**< ERI version (only for CDMA), null termination */
+       unsigned char szCpChipset[TAPI_MISC_CP_CHIPSET_LEN_MAX];/**< CP chipset, null termination */
 } TelMiscVersionInformation;
 
 /**
index 13996a4..4d074f1 100644 (file)
@@ -62,6 +62,12 @@ extern "C"
 #define TAPI_NETTEXT_CB_SIZE_MAX                       1252
 
 /**
+ * @brief Definition for the maximum Warning Area Co-ordinate Size
+ * @since_tizen 5.5
+ */
+#define TAPI_NETTEXT_CB_WAC_SIZE_MAX   1024
+
+/**
  * @brief Definition for the maximum ETWS message size.
  * @since_tizen 2.3
  */
@@ -390,10 +396,11 @@ typedef struct {
  * @since_tizen 2.3
  */
 typedef struct {
-
        TelSmsCbMsgType_t CbMsgType; /**< Cell Broadcast message type */
        unsigned short Length; /**< Size of array @a szMsgData (which is the actual TPDU message) */
        char szMsgData[TAPI_NETTEXT_CB_SIZE_MAX + 1]; /**< Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1] */
+       int wacLen; /** Size of actual wac Data */
+       char wacData[TAPI_NETTEXT_CB_WAC_SIZE_MAX + 1]; /**< Warning Area Coordiantes [Refer 3GPP TS 36.413 version 15.3.0 Release 15]  */
 } TelSmsCbMsg_t;
 
 /**
@@ -427,6 +434,8 @@ struct tel_noti_sms_incomming_cb_msg {
        TelSmsCbMsgType_t CbMsgType; /**< Cell Broadcast message type */
        short Length; /**< Size of array @a szMsgData (which is the actual TPDU message) */
        char szMsgData[TAPI_NETTEXT_CB_SIZE_MAX + 1]; /**< Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1] */
+       int wacLen; /** Size of actual wac Data */
+       char wacData[TAPI_NETTEXT_CB_WAC_SIZE_MAX + 1]; /**< Warning Area Coordiantes [Refer 3GPP TS 36.413 version 15.3.0 Release 15]  */
 };
 
 /**
index b3ba9c4..39051d2 100644 (file)
@@ -236,11 +236,11 @@ __BEGIN_DECLS
 #define TAPI_NOTI_CALL_INFO_REC        DBUS_TELEPHONY_CALL_INTERFACE":CallInfoRec"
 
 /**
- * @brief Definition for call info fallback notification
+ * @brief Definition for call info fallback notification (eg VoLTE voice to CS voice)
  * @since_tizen TBD
  * @remarks TBD
  */
-#define TAPI_NOTI_CALL_INFO_FALLBACK   DBUS_TELEPHONY_CALL_INTERFACE:":CallFallback"
+#define TAPI_NOTI_CALL_INFO_FALLBACK   DBUS_TELEPHONY_CALL_INTERFACE":CallFallback"
 
 /**
  * @brief Definition for voice privacy mode change notification (CDMA only)
@@ -328,7 +328,7 @@ __BEGIN_DECLS
 /**
  * @brief Definition for VoLTE call for which downgrade call request is initiated from MT
  * @since_tizen 2.4
- * @remarks  '#TelCallDowngradeRequestNoti_t' will be stored
+ * @remarks  '#TelCallDowngradedNoti_t' will be stored
  */
 #define TAPI_NOTI_CALL_DOWNGRADED      DBUS_TELEPHONY_CALL_INTERFACE":CallDowngraded"
 
index 25f519a..485a094 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 8
-%define patchlevel 39
+%define patchlevel 40
 
 Name:           libtapi
 Version:        %{major}.%{minor}.%{patchlevel}
index b26581b..50d136d 100644 (file)
@@ -118,11 +118,20 @@ static void _process_sms_event(const gchar *sig, GVariant *param,
                gsize decoded_cbmsg_len = 0;
                int cb_msg_len = 0;
 
-               g_variant_get(param, "(iis)", &noti.CbMsgType, &cb_msg_len, &cb_msg);
+               gchar *wac_msg = NULL;
 
+               guchar *decoded_wac_msg = NULL;
+               gsize decoded_wac_msg_len = 0;
+               int wac_msg_len = 0;
+
+               g_variant_get(param, "(iisis)", &noti.CbMsgType, &cb_msg_len, &cb_msg, &wac_msg_len, &wac_msg);
+
+               // CB Message
                decoded_cbmsg = g_base64_decode(cb_msg, &decoded_cbmsg_len);
                if (NULL == decoded_cbmsg) {
                        err("g_base64_decode: Failed to decode cbmsg");
+                       g_free(cb_msg);
+                       g_free(wac_msg);
                        return;
                }
 
@@ -135,9 +144,32 @@ static void _process_sms_event(const gchar *sig, GVariant *param,
 
                noti.Length = cb_msg_len;
 
+               // WAC Data
+               if (wac_msg_len != 0){
+                       decoded_wac_msg = g_base64_decode(wac_msg, &decoded_wac_msg_len);
+                       if (NULL == decoded_wac_msg) {
+                               err("g_base64_decode: Failed to decode wacmsg");
+                               g_free(cb_msg);
+                               g_free(decoded_cbmsg);
+                               g_free(wac_msg);
+                               return;
+                       }
+
+                       dbg("dt : %" G_GSIZE_FORMAT ", ml :%d", decoded_wac_msg_len, wac_msg_len);
+
+                       if (TAPI_NETTEXT_CB_WAC_SIZE_MAX+1 < decoded_wac_msg_len)
+                               decoded_wac_msg_len = TAPI_NETTEXT_CB_WAC_SIZE_MAX+1;
+
+                       memcpy(&(noti.wacData[0]), decoded_wac_msg, decoded_wac_msg_len);
+               }
+               noti.wacLen = wac_msg_len;
+
                g_free(cb_msg);
                g_free(decoded_cbmsg);
 
+               g_free(wac_msg);
+               g_free(decoded_wac_msg);
+
                TAPI_INVOKE_NOTI_CALLBACK(&noti);
        } else if (!g_strcmp0(sig, "IncommingEtwsMsg")) {
                struct tel_noti_sms_incomming_etws_msg noti;
index ba7091a..347ec6c 100644 (file)
@@ -61,7 +61,7 @@ static void on_response_get_version(GObject *source_object, GAsyncResult *res, g
        struct tapi_resp_data *evt_cb_data = user_data;
        int result = -1;
        TelMiscVersionInformation data;
-       char *sw = NULL, *hw = NULL, *rf = NULL, *product = NULL, *prl = NULL, *eri = NULL;
+       char *sw = NULL, *hw = NULL, *rf = NULL, *product = NULL, *prl = NULL, *eri = NULL, *cp_chip = NULL;
 
        GVariant *dbus_result;
 
@@ -72,8 +72,8 @@ static void on_response_get_version(GObject *source_object, GAsyncResult *res, g
        TAPI_RESP_CHECK_ERROR(error, evt_cb_data);
 
 
-       g_variant_get(dbus_result, "(issssss)", &result,
-                       &sw, &hw, &rf, &product, &prl, &eri);
+       g_variant_get(dbus_result, "(isssssss)", &result,
+                       &sw, &hw, &rf, &product, &prl, &eri, &cp_chip);
 
        dbg("product code [%s]", product);
 
@@ -83,6 +83,7 @@ static void on_response_get_version(GObject *source_object, GAsyncResult *res, g
        g_strlcpy((gchar *)data.szProductCode, product, TAPI_MISC_PRODUCT_CODE_LEN_MAX);
        g_strlcpy((gchar *)data.szPrlVersion, prl, TAPI_MISC_PRL_ERI_VER_LEN_MAX);
        g_strlcpy((gchar *)data.szEriVersion, eri, TAPI_MISC_PRL_ERI_VER_LEN_MAX);
+       g_strlcpy((gchar *)data.szCpChipset, cp_chip, TAPI_MISC_CP_CHIPSET_LEN_MAX);
 
        g_free(sw);
        g_free(hw);
@@ -90,6 +91,7 @@ static void on_response_get_version(GObject *source_object, GAsyncResult *res, g
        g_free(product);
        g_free(prl);
        g_free(eri);
+       g_free(cp_chip);
 
        TAPI_INVOKE_RESP_CALLBACK(evt_cb_data, result, &data);
 
@@ -339,7 +341,7 @@ EXPORT_API TelMiscVersionInformation *tel_get_misc_me_version_sync(TapiHandle *h
        GError *error = NULL;
        int result = -1;
        TelMiscVersionInformation *data = NULL;
-       char *sw = NULL, *hw = NULL, *rf = NULL, *product = NULL, *prl = NULL, *eri = NULL;
+       char *sw = NULL, *hw = NULL, *rf = NULL, *product = NULL, *prl = NULL, *eri = NULL, *cp_chip = NULL;
 
        dbg("Func Entrance");
 
@@ -362,8 +364,8 @@ EXPORT_API TelMiscVersionInformation *tel_get_misc_me_version_sync(TapiHandle *h
        if (!dbus_result)
                return NULL;
 
-       g_variant_get(dbus_result, "(issssss)", &result,
-                       &sw, &hw, &rf, &product, &prl, &eri);
+       g_variant_get(dbus_result, "(isssssss)", &result,
+                       &sw, &hw, &rf, &product, &prl, &eri, &cp_chip);
        g_variant_unref(dbus_result);
 
        if (result != 0)
@@ -381,6 +383,7 @@ EXPORT_API TelMiscVersionInformation *tel_get_misc_me_version_sync(TapiHandle *h
        g_strlcpy((gchar *)data->szProductCode, product, TAPI_MISC_PRODUCT_CODE_LEN_MAX);
        g_strlcpy((gchar *)data->szPrlVersion, prl, TAPI_MISC_PRL_ERI_VER_LEN_MAX);
        g_strlcpy((gchar *)data->szEriVersion, eri, TAPI_MISC_PRL_ERI_VER_LEN_MAX);
+       g_strlcpy((gchar *)data->szCpChipset, cp_chip, TAPI_MISC_CP_CHIPSET_LEN_MAX);
 
 OUT:
        g_free(sw);
@@ -389,6 +392,7 @@ OUT:
        g_free(product);
        g_free(prl);
        g_free(eri);
+       g_free(cp_chip);
 
        return data;
 }