TizenRefApp-7601 [Call UI] Change usage of call-manager API 60/96560/1 submit/tizen_3.0/20161114.120421
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Wed, 9 Nov 2016 09:53:14 +0000 (11:53 +0200)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Wed, 9 Nov 2016 09:53:14 +0000 (11:53 +0200)
Change-Id: Ic666a21c58dc66066b37249ae8e0d02110e8d9ce

src/callui-manager.c
src/callui-sound-manager.c
src/callui-state-provider.c

index 80e09c2..9c7d209 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <call-manager.h>
 #include <call-manager-extension.h>
+#include <call-manager-ext.h>
 
 #include "callui-manager.h"
 #include "callui-debug.h"
@@ -58,16 +59,16 @@ static cm_call_release_type_e __convert_app_release_type(callui_call_release_typ
 {
        switch (type) {
        case CALLUI_CALL_RELEASE_BY_CALL_HANDLE:
-               return CALL_RELEASE_TYPE_BY_CALL_HANDLE;
+               return CM_CALL_RELEASE_TYPE_BY_CALL_HANDLE;
        case CALLUI_CALL_RELEASE_ALL:
-               return CALL_RELEASE_TYPE_ALL_CALLS;
+               return CM_CALL_RELEASE_TYPE_ALL_CALLS;
        case CALLUI_CALL_RELEASE_ALL_HOLD:
-               return CALL_RELEASE_TYPE_ALL_HOLD_CALLS;
+               return CM_CALL_RELEASE_TYPE_ALL_HOLD_CALLS;
        case CALLUI_CALL_RELEASE_ALL_ACTIVE:
-               return CALL_RELEASE_TYPE_ALL_ACTIVE_CALLS;
+               return CM_CALL_RELEASE_TYPE_ALL_ACTIVE_CALLS;
        default:
                err("undefined call release type [%d]", type);
-               return CALL_RELEASE_TYPE_BY_CALL_HANDLE;
+               return CM_CALL_RELEASE_TYPE_BY_CALL_HANDLE;
        }
 }
 
@@ -228,11 +229,11 @@ static cm_multi_sim_slot_type_e __convert_callui_sim_type(callui_sim_slot_type_e
 {
        switch (sim_type) {
        case CALLUI_SIM_SLOT_1:
-               return CM_SIM_SLOT_1_E;
+               return CM_MULTI_SIM_SLOT_1;
        case CALLUI_SIM_SLOT_2:
-               return CM_SIM_SLOT_2_E;
+               return CM_MULTI_SIM_SLOT_2;
        default:
-               return CM_SIM_SLOT_DEFAULT_E;
+               return CM_MULTI_SIM_SLOT_DEFAULT;
        }
 }
 
index 077434b..bc382f3 100644 (file)
@@ -17,6 +17,7 @@
 #include <Eina.h>
 #include <call-manager.h>
 #include <call-manager-extension.h>
+#include <call-manager-ext.h>
 
 #include "callui-sound-manager.h"
 #include "callui-sound-manager-priv.h"
index 3f2ccd1..099cc76 100644 (file)
@@ -17,6 +17,7 @@
 #include <Eina.h>
 #include <call-manager.h>
 #include <call-manager-extension.h>
+#include <call-manager-ext.h>
 #include <contacts.h>
 #include <sys/sysinfo.h>
 
@@ -48,18 +49,18 @@ static callui_result_e __convert_cm_call_event_type(cm_call_event_e cm_call_even
 static callui_sim_slot_type_e __convert_cm_sim_type(cm_multi_sim_slot_type_e cm_sim_type);
 static void __free_call_event_data(callui_state_provider_h stp_h);
 static callui_call_data_t *__call_data_create(callui_call_data_type_e call_type,
-               cm_call_data_t* cm_call_data);
+               cm_call_data_h cm_call_data);
 static callui_result_e __call_data_init(callui_call_data_t *callui_call_data,
                callui_call_data_type_e call_type,
-               cm_call_data_t* cm_call_data);
+               cm_call_data_h cm_call_data);
 static callui_result_e __update_stp_call_data(callui_state_provider_h stp_h,
                callui_call_data_type_e call_type,
-               cm_call_data_t* cm_call_data);
+               cm_call_data_h cm_call_data);
 static callui_result_e __update_stp_all_call_data(callui_state_provider_h stp_h,
-               cm_call_data_t *cm_incom,
-               cm_call_data_t *cm_active,
-               cm_call_data_t *cm_held);
-static void __call_event_cb(cm_call_event_e call_event, cm_call_event_data_t *call_state_data, void *user_data);
+               cm_call_data_cm_incom,
+               cm_call_data_cm_active,
+               cm_call_data_cm_held);
+static void __call_event_cb(cm_call_event_e call_event, cm_call_event_data_call_state_data, void *user_data);
 static void __call_state_event_handler_func(_callui_listener_t *listener, va_list args);
 static void __list_free_cb(gpointer data);
 static callui_result_e __conf_call_data_init(callui_conf_call_data_t *conf_call_data, cm_conf_call_data_t *cm_conf_data);
@@ -207,9 +208,9 @@ static callui_result_e __convert_cm_call_event_type(cm_call_event_e cm_call_even
 static callui_sim_slot_type_e __convert_cm_sim_type(cm_multi_sim_slot_type_e cm_sim_type)
 {
        switch (cm_sim_type) {
-       case CM_SIM_SLOT_1_E:
+       case CM_MULTI_SIM_SLOT_1:
                return CALLUI_SIM_SLOT_1;
-       case CM_SIM_SLOT_2_E:
+       case CM_MULTI_SIM_SLOT_2:
                return CALLUI_SIM_SLOT_2;
        default:
                return CALLUI_SIM_SLOT_DEFAULT;
@@ -237,7 +238,7 @@ static void __free_call_event_data(callui_state_provider_h stp_h)
  *
  * @return Application call data on success or NULL otherwise
  */
-static callui_call_data_t *__call_data_create(callui_call_data_type_e call_type, cm_call_data_t* cm_call_data)
+static callui_call_data_t *__call_data_create(callui_call_data_type_e call_type, cm_call_data_h cm_call_data)
 {
        callui_call_data_t *call_data = calloc(1, sizeof(callui_call_data_t));
        CALLUI_RETURN_NULL_IF_FAIL(call_data);
@@ -259,7 +260,7 @@ static callui_call_data_t *__call_data_create(callui_call_data_type_e call_type,
  *
  * @return CALLUI_RESULT_OK on success or another result otherwise
  */
-static callui_result_e __call_data_init(callui_call_data_t *callui_call_data, callui_call_data_type_e call_type, cm_call_data_t* cm_call_data)
+static callui_result_e __call_data_init(callui_call_data_t *callui_call_data, callui_call_data_type_e call_type, cm_call_data_h cm_call_data)
 {
        callui_call_data->type = call_type;
 
@@ -323,7 +324,7 @@ static callui_result_e __call_data_init(callui_call_data_t *callui_call_data, ca
  */
 static callui_result_e __update_stp_call_data(callui_state_provider_h stp_h,
                callui_call_data_type_e call_type,
-               cm_call_data_t* cm_call_data)
+               cm_call_data_h cm_call_data)
 {
        if (!cm_call_data) {
                FREE(stp_h->st_data_list[call_type]);
@@ -349,9 +350,9 @@ static callui_result_e __update_stp_call_data(callui_state_provider_h stp_h,
  * @return CALLUI_RESULT_OK on success or another result otherwise
  */
 static callui_result_e __update_stp_all_call_data(callui_state_provider_h stp_h,
-               cm_call_data_t *cm_incom,
-               cm_call_data_t *cm_active,
-               cm_call_data_t *cm_held)
+               cm_call_data_cm_incom,
+               cm_call_data_cm_active,
+               cm_call_data_cm_held)
 {
        dbg("Update incoming call data");
        int res = __update_stp_call_data(stp_h, CALLUI_CALL_DATA_INCOMING, cm_incom);
@@ -368,7 +369,7 @@ static callui_result_e __update_stp_all_call_data(callui_state_provider_h stp_h,
        return res;
 }
 
-static void __call_event_cb(cm_call_event_e call_event, cm_call_event_data_t *call_state_data, void *user_data)
+static void __call_event_cb(cm_call_event_e call_event, cm_call_event_data_call_state_data, void *user_data)
 {
        CALLUI_RETURN_IF_FAIL(call_state_data);
        CALLUI_RETURN_IF_FAIL(user_data);
@@ -389,9 +390,9 @@ static void __call_event_cb(cm_call_event_e call_event, cm_call_event_data_t *ca
        CALLUI_RETURN_IF_FAIL(res == CM_ERROR_NONE);
        callui_sim_slot_type_e sim_slot_type = __convert_cm_sim_type(cm_sim_slot);
 
-       cm_call_data_t *cm_incom = NULL;
-       cm_call_data_t *cm_active = NULL;
-       cm_call_data_t *cm_held = NULL;
+       cm_call_data_cm_incom = NULL;
+       cm_call_data_cm_active = NULL;
+       cm_call_data_cm_held = NULL;
 
        res = cm_call_event_data_get_active_call(call_state_data, &cm_active);
        CALLUI_RETURN_IF_FAIL(res == CM_ERROR_NONE);
@@ -467,9 +468,9 @@ static callui_result_e __callui_stp_init(callui_state_provider_h stp_h, cm_clien
        res = contacts_connect();
        CALLUI_RETURN_VALUE_IF_FAIL(res == CONTACTS_ERROR_NONE, CALLUI_RESULT_FAIL);
 
-       cm_call_data_t *cm_incom = NULL;
-       cm_call_data_t *cm_active = NULL;
-       cm_call_data_t *cm_held = NULL;
+       cm_call_data_cm_incom = NULL;
+       cm_call_data_cm_active = NULL;
+       cm_call_data_cm_held = NULL;
 
        res = cm_get_all_calldata(stp_h->cm_h, &cm_incom, &cm_active, &cm_held);
        CALLUI_RETURN_VALUE_IF_FAIL(res == CM_ERROR_NONE, _callui_utils_convert_cm_res(res));