Add tel_get_sim_psismsc() API 41/195941/1 accepted/tizen/unified/20181227.062107 submit/tizen/20181227.011059
authorsinikang <sinikang@samsung.com>
Thu, 20 Dec 2018 01:43:06 +0000 (10:43 +0900)
committersinikang <sinikang@samsung.com>
Thu, 20 Dec 2018 01:43:06 +0000 (10:43 +0900)
Change-Id: I8019a3acbb579aa95d65a7d9f72388a2cd864ef4

12 files changed:
include/ITapiSim.h
include/TapiUtility.h
include/TelCall.h
include/TelNetwork.h
include/TelSatObj.h
include/TelSim.h
include/TelSms.h
include/TelSs.h
packaging/libtapi.spec
src/tapi_sim.c
test_src/sim.c
test_src/sms_util.h

index a765b5620840e3ecf3e66cb5d8c929d3373196dd..70a906885a98bef75758a6705c2d5a493bd06984 100644 (file)
@@ -515,6 +515,35 @@ int tel_get_sim_msisdn(TapiHandle *handle, tapi_response_cb callback, void *user
  */
 int tel_get_sim_oplmnwact(TapiHandle *handle, tapi_response_cb callback, void *user_data);
 
+/**
+ * @brief Gets SIM PSISMSC(url) data.
+ * @details Regarding 3GPP specification, the current value is optional.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code while actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ * @post callback will be invoked and #TelSimOplmnwactList_t will be stored in data on success case.
+ */
+int tel_get_sim_psismsc(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+
 /**
  * @brief Gets SIM SPN data.
  * @details Regarding 3GPP specification, the current value is optional.\n
index d1a555b78af8abbba0f9dfac76fb869e5fc7bfc4..fe30a5458a65088a6384bd7bd2193dcd18153ba3 100644 (file)
@@ -274,6 +274,18 @@ typedef enum {
        } \
 }
 
+/**
+ * @brief Checks the 'scalar_exp' for Valid DTMF values, if failed then it returns 'err_value' from the function.
+ */
+#define TAPI_RET_ERR_NUM_IF_INVALID_DTMF(scalar_exp, err_num) {\
+       if (!((scalar_exp >= '0' && scalar_exp <= '9') || (scalar_exp >= 'a' && scalar_exp <= 'd') || \
+               (scalar_exp >= 'A' && scalar_exp <= 'D') || (scalar_exp == '*') || (scalar_exp == '#'))) \
+       { \
+               err("TAPI_RET_ERR_NUM_IF_INVALID_INPUT Failed. returning [%d]", err_num);\
+               return err_num; \
+       } \
+}
+
 __END_DECLS
 
 #endif //_TEL_UTILITY_H_
index c16a0cdcac09717d60cf5bbb59d02aed0d2602e6..0e92682b3e26bdc62ecae24e17ae16fe974ceabe 100644 (file)
@@ -280,7 +280,10 @@ typedef enum {
        TAPI_CC_CAUSE_RECOVERY_ON_TIMER_EXPIRY, /**< Recovery on timer expiry */
        TAPI_CC_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,       /**< Protocol error unspecified */
        TAPI_CC_CAUSE_INTERWORKING_UNSPECIFIED, /**< Interworking unspecified */
-       TAPI_CC_CAUSE_REORDER,  /**< Reorder */
+       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_END = 128,        /**< End unspecified */
 
index 015f4139c85a9868c0ce502ba1b21d2345f2c050..c350cc45d7d754ad30b38fa9e48cd85890478f77 100644 (file)
@@ -45,7 +45,7 @@ extern "C"
  * @brief Definition for the maximum network list.
  * @since_tizen 2.3
  */
-#define TAPI_NETWORK_LIST_MAX  20
+#define TAPI_NETWORK_LIST_MAX  48
 
 /**
  * @brief Definition for the maximum length of the network PLMN.
index 1cb3449a1bbec39db495525a33eb43d676492bea..51d9dd55b19e4b004457c85288fe4cd9b6dedc4b 100644 (file)
@@ -709,6 +709,7 @@ typedef enum {
        TAPI_EVENT_SAT_DW_TYPE_BROWSING_STATUS = 0X0F,  /**< data download type - BROWSING STATUS */
        TAPI_EVENT_SAT_DW_TYPE_FRAMES_INFORMATION_CHANGED = 0X10,       /**< data download type - FRAMES INFORMATION CHANGED */
        TAPI_EVENT_SAT_DW_TYPE_RESERVED_FOR_3GPP = 0X11,        /**< data download type - RESERVED FOR 3GPP */
+       TAPI_EVENT_SAT_DW_TYPE_USIM_DOWNLOAD = 0x12,
        TAPI_EVENT_SAT_DW_TYPE_UNKNOWN = 0xFF /**< data download type - unknown */
 } TelSatEventDownloadType_t;
 
index 101ea00ecba92c972befea4954a880d77eb87d69..0555fc9c0f7b54defc38b6942d78df3426057d8d 100644 (file)
@@ -1333,6 +1333,10 @@ typedef struct {
        TelSimOplmnwact_t list[TAPI_SIM_OPLMNWACT_LEN_MAX];     /**< List of OPLMNwACT */
 } TelSimOplmnwactList_t;
 
+typedef struct {
+       char *uridata;  /**< URI TLV data object */
+} TelSimPsismsc_t;
+
 /**
  * @brief The structure type for SPN(Service Provider Name).
  * @since_tizen 2.3
index 1f366e7bab69047a4fd70d5886ce239b3588572d..13996a4c98f103524bb7d16eb51d48ab5c209a09 100644 (file)
@@ -95,7 +95,7 @@ extern "C"
  * @brief Definition for the maximum GSM SMS CBMI list size.
  * @since_tizen 2.3
  */
-#define TAPI_NETTEXT_SMS_CBMI_LIST_SIZE_MAX    50 /**< Maximum SMS CBMI list size*/
+#define TAPI_NETTEXT_SMS_CBMI_LIST_SIZE_MAX    100 /**< Maximum SMS CBMI list size*/
 
 /**
  * @brief Definition for the maximum SMS data size that can be stored.
index 146739441be13f8f3ad96c5fe80a36ac7ef0709b..64f12a8c6c1586eff715f3d77591ae30cb4f9f6a 100644 (file)
@@ -112,7 +112,8 @@ typedef enum {
        TAPI_SS_CF_WHEN_CFNRc,      /**< 0x04 : Call Forwarding Not Reachable */
        TAPI_SS_CF_WHEN_CF_ALL,     /**< 0x05 : All Call Forwarding */
        TAPI_SS_CF_WHEN_CFC,        /**< 0x06 : All Conditional Call Forwarding */
-       TAPI_SS_CF_WHEN_MAX         /**< 0x07 : Max */
+       TAPI_SS_CF_WHEN_CFNL,        /**< 0x07 : Call Forwarding Not Logged-In*/
+       TAPI_SS_CF_WHEN_MAX         /**< 0x08 : Max */
 } TelSsForwardWhen_t;
 
 /**
index 2574efe36f524a26ec5ca560f84e3ac1a057f4b5..1ce52bbfdd6958f15bfac11c8ad748e199167006 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 8
-%define patchlevel 35
+%define patchlevel 36
 
 Name:           libtapi
 Version:        %{major}.%{minor}.%{patchlevel}
index 0c9dea518b309ae0d192f8b9ca342c79dcf5a190..3b1b42ef620aaed9d67a894fb54d6f7c8c5b3ca3 100644 (file)
@@ -875,6 +875,41 @@ static void on_response_get_sim_oplmnwact(GObject *source_object, GAsyncResult *
        g_variant_unref(dbus_result);
 }
 
+static void on_response_get_sim_psismsc(GObject *source_object, GAsyncResult *res,
+       gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result;
+       TelSimPsismsc_t uri_info = {0,};
+
+       conn = G_DBUS_CONNECTION(source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       TAPI_RESP_CHECK_ERROR(error, evt_cb_data);
+
+       if (dbus_result == NULL)
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+
+       g_variant_get(dbus_result, "(is)", &result, &uri_info.uridata);
+       if (!g_strcmp0(uri_info.uridata, "")) {
+               dbg("URIDATA is empty. Sending NULL to application");
+               uri_info.uridata=NULL;
+       }
+       else {
+               dbg("URIDATA : [0x%p], String : [%s]", uri_info.uridata, uri_info.uridata);
+       }
+
+       dbg("result[%d]", result);
+       TAPI_INVOKE_RESP_CALLBACK(evt_cb_data, result, &uri_info);
+       g_free(uri_info.uridata);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+
+}
+
+
 static void on_response_get_sim_spn(GObject *source_object, GAsyncResult *res,
        gpointer user_data)
 {
@@ -1914,6 +1949,25 @@ EXPORT_API int tel_get_sim_oplmnwact(TapiHandle *handle, tapi_response_cb callba
        return TAPI_API_SUCCESS;
 }
 
+EXPORT_API int tel_get_sim_psismsc(TapiHandle *handle, tapi_response_cb callback,
+               void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       TAPI_RET_ERR_NUM_IF_NOT_SUPPORTED(TELEPHONY_FEATURE);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       TAPI_SIM_CHECK_TAPI_STATE();
+
+       TAPI_MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetPsismsc", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_get_sim_psismsc, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
 EXPORT_API int tel_get_sim_spn(TapiHandle *handle, tapi_response_cb callback,
                void *user_data)
 {
index d2402847f9bd1f795744ec12d1a7de9f250e88ed..65e394e4736f34e2baa8926f0749ea9349f98e9d 100644 (file)
@@ -888,6 +888,31 @@ static int run_sim_get_oplmnwact(MManager *mm, struct menu_data *menu)
        return 0;
 }
 
+static void on_sim_get_psismsc(TapiHandle *handle, int result, void *data,
+               void *user_data)
+{
+       TelSimAccessResult_t access_rt = result;
+        TelSimPsismsc_t *uri_info = data;
+
+       msg("TAPI_SERVICE_SIM_GET_PSISMSC response received");
+
+       CHECK_ACCESS_RT(access_rt);
+
+       msg("access_rt[%d]", access_rt);
+        msg("uri_info[%s]", uri_info->uridata);
+}
+
+static int run_sim_get_psismsc(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int rt = 0;
+
+       msg("call [%s] tapi service !!!", menu->title);
+       rt = tel_get_sim_psismsc(handle, on_sim_get_psismsc, NULL);
+       CHECK_RT(rt);
+       return 0;
+}
+
 static void on_sim_get_spn(TapiHandle *handle, int result, void *data,
                void *user_data)
 {
@@ -1583,6 +1608,12 @@ static struct menu_data menu_sim_get_oplmnwact[] = {
        {NULL, NULL},
 };
 
+static struct menu_data menu_sim_get_psismsc[] = {
+       {"1", "run", NULL, run_sim_get_psismsc, NULL},
+       {NULL, NULL},
+};
+
+
 static struct menu_data menu_sim_get_spn[] = {
        {"1", "run", NULL, run_sim_get_spn, NULL},
        {NULL, NULL},
@@ -1698,6 +1729,7 @@ struct menu_data menu_sim_3gpp[] = {
        {"34", "Get P-CSCF", menu_sim_get_pcscf, NULL, NULL},
        {"35", "Get application list", menu_sim_get_application_list, NULL, NULL},
        {"36", "Get isim service table", menu_sim_get_isim_service_table, NULL, NULL},
+       {"52", "psismsc", menu_sim_get_psismsc, NULL, NULL},
        { NULL, NULL, },
 };
 
index 23b0b86275205178428b4596459ce533bd2f7924..8fbcbfcca295eb5395fcd2ebe52db66b475b690a 100644 (file)
@@ -40,7 +40,7 @@
 
 #define SMS_CB_PAGE_SIZE_MAX                           9               /**< CB maximum page size*/
 #define SMS_GSM_SMS_MSG_NUM_MAX                        255             /**< Maximum GSM SMS message number*/
-#define SMS_GSM_SMS_CBMI_LIST_SIZE_MAX         50              /**< Maximum GSM SMS CBMI list size*/
+#define SMS_GSM_SMS_CBMI_LIST_SIZE_MAX         100             /**< Maximum GSM SMS CBMI list size*/
 #define SMS_SMDATA_SIZE_MAX                                    255             /**< Maximum SMS data size that can be stored*/
 #define SMS_MAX_SMS_SERVICE_CENTER_ADDR                12              /**<Maximum SMS service center address*/
 #define SMS_MAX_INDEX                                          25              /**< Maximum index value for SMS */