Defining volte state variables 34/53834/1 accepted/tizen/mobile/20151210.025604 accepted/tizen/tv/20151210.025214 accepted/tizen/wearable/20151210.025500 submit/tizen/20151210.004458
authorSuresh Kumar N <suresh.n@samsung.com>
Wed, 9 Dec 2015 14:56:46 +0000 (20:26 +0530)
committerSuresh Kumar N <suresh.n@samsung.com>
Wed, 9 Dec 2015 14:56:46 +0000 (20:26 +0530)
Change-Id: I0b2592334605f7cd3d2361f6f94bc2b358d7f4fc

introspection/call.xml
introspection/network.xml
src/dtapi_call.c
src/dtapi_network.c

index a5d8c1f..06d219a 100644 (file)
@@ -98,6 +98,7 @@
                        <arg direction="out" type="b" name="call_direction"/>
                        <arg direction="out" type="i" name="call_state"/>
                        <arg direction="out" type="b" name="call_multiparty_state"/>
+                       <arg direction="out" type="b" name="is_volte_call"/>
                </method>
 
                <method name="GetStatusAll">
index c52d687..2704e06 100644 (file)
                -->
                <property name="ims_voice_status" type="i" access="read"/>
 
+               <!--
+                       volte_enable
+                       0=Not available, 1=Available
+               -->
+               <property name="volte_enable" type="i" access="read"/>
+
        </interface>
 
 </node>
index 1c76dc2..a9f6109 100644 (file)
@@ -422,6 +422,7 @@ static gboolean on_call_get_status(TelephonyCall *call,
        gboolean call_direction;
        gint call_status;
        gboolean call_multiparty_state;
+       gboolean is_volte_call;
 
        if (!check_access_control(p_cynara, invocation, AC_CALL, "r"))
                return TRUE;
@@ -451,10 +452,12 @@ static gboolean on_call_get_status(TelephonyCall *call,
 
        call_status = tcore_call_object_get_status(call_obj);
        call_multiparty_state = tcore_call_object_get_multiparty_state(call_obj);
+       is_volte_call = tcore_call_object_get_is_volte_call(call_obj);
 
        telephony_call_complete_get_status(call, invocation,
                call_handle, call_number, call_type,
-               call_direction, call_status, call_multiparty_state);
+               call_direction, call_status, call_multiparty_state,
+               is_volte_call);
 
        return TRUE;
 }
@@ -479,6 +482,7 @@ static gboolean on_call_get_status_all(TelephonyCall *call,
        gboolean call_direction;
        gint call_status;
        gboolean call_multiparty_state;
+       gboolean is_volte_call;
 
        int len, i;
 
@@ -529,6 +533,7 @@ static gboolean on_call_get_status_all(TelephonyCall *call,
                        }
 
                        call_multiparty_state = tcore_call_object_get_multiparty_state(call_obj);
+                       is_volte_call = tcore_call_object_get_is_volte_call(call_obj);
 
                        dbg("Call handle: [%d] Call ID: [%d] Call number: [%s] Call number len: [%d]",
                                handle, call_id, call_number, len);
@@ -563,6 +568,8 @@ static gboolean on_call_get_status_all(TelephonyCall *call,
                                g_variant_new_int32(call_status));
                        g_variant_builder_add(&b, "{sv}", "call_multiparty_state",
                                g_variant_new_boolean(call_multiparty_state));
+                       g_variant_builder_add(&b, "{sv}", "is_volte_call",
+                               g_variant_new_boolean(is_volte_call));
                        g_variant_builder_close(&b);
 
                        /* Next Call object */
index f23ac56..e9e53bc 100644 (file)
@@ -964,6 +964,7 @@ gboolean dbus_plugin_setup_network_interface(TelephonyObjectSkeleton *object,
        telephony_network_set_access_technology(network, NETWORK_ACT_UNKNOWN);
        telephony_network_set_cell_id(network, 0);
        telephony_network_set_ims_voice_status(network, NETWORK_IMS_VOICE_UNKNOWN);
+       telephony_network_set_volte_enable(network, FALSE);
        telephony_network_set_circuit_status(network, NETWORK_SERVICE_DOMAIN_STATUS_NO);
        telephony_network_set_lac(network, 0);
        telephony_network_set_tac(network, 0);
@@ -1661,6 +1662,20 @@ gboolean dbus_plugin_network_notification(struct custom_data *ctx,
        }
        break;
 
+       case TNOTI_NETWORK_IMS_REGISTRATION_STATUS: {
+               const struct tnoti_network_ims_registration_info *ims_reg_info = data;
+
+               dbg("TNOTI_NETWORK_IMS_REGISTRATION_STATUS");
+
+               if (ims_reg_info->is_registered
+                               && (ims_reg_info->feature_mask & NETWORK_IMS_REG_FEATURE_TYPE_VOLTE)) {
+                       telephony_network_set_volte_enable(network, TRUE);
+               } else {
+                       telephony_network_set_volte_enable(network, FALSE);
+               }
+       }
+       break;
+
        default:
                err("Unhandled/Unknown Notification: [0x%x]", command);
        break;