modules/processing: remove Tapi dependency 36/59036/3
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Mon, 8 Feb 2016 15:04:54 +0000 (16:04 +0100)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Thu, 11 Feb 2016 12:33:22 +0000 (13:33 +0100)
Remove tapi dependencies in call_divert. Using telephony related functions instead.

Change-Id: I75ce10b29c1b9a94c3d4a513c1b301e8f31da5e5
Signed-off-by: Lukasz Stanislawski <l.stanislaws@samsung.com>
inc/modules/processing/call_divert.h [deleted file]
src/modules/processing/call_divert.c

diff --git a/inc/modules/processing/call_divert.h b/inc/modules/processing/call_divert.h
deleted file mode 100644 (file)
index 9d70f17..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *  Indicator
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-#ifndef __INDICATOR_CALL_DIVERT_H__
-#define __INDICATOR_CALL_DIVERT_H__
-
-extern void call_forward_on_noti(TapiHandle *handle_obj, const char *noti_id, void *data, void *user_data);
-
-#endif
index 506f081..e0dedc7 100644 (file)
  *
  */
 
-#include <tapi_common.h>
-#include <TelNetwork.h>
-#include <TelSim.h>
-#include <ITapiSim.h>
-#include <TelCall.h>
-#include <ITapiCall.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <vconf.h>
 #define ICON_PRIORITY  INDICATOR_PRIORITY_SYSTEM_2
 #define MODULE_NAME            "call_divert"
 
-#define TAPI_HANDLE_MAX  2
-
 static int register_call_divert_module(void *data);
 static int unregister_call_divert_module(void);
-static void _on_noti(TapiHandle *handle_obj, const char *noti_id, void *data, void *user_data);
+static void _on_noti(void *user_data);
 #ifdef _SUPPORT_SCREEN_READER
 static char *access_info_cb(void *data, Evas_Object *obj);
 #endif
@@ -70,7 +62,7 @@ static void set_app_state(void* data)
        call_divert.ad = data;
 }
 
-static void _show_image_icon(void *data)
+static void _show_image_icon()
 {
        call_divert.img_obj.data = icon_path;
        icon_show(&call_divert);
@@ -103,7 +95,7 @@ static char *access_info_cb(void *data, Evas_Object *obj)
 }
 #endif
 
-static void _on_noti(TapiHandle *handle_obj, const char *noti_id, void *data, void *user_data)
+static void _on_noti(void *user_data)
 {
        int status = 0;
        int ret = 0;
@@ -112,7 +104,7 @@ static void _on_noti(TapiHandle *handle_obj, const char *noti_id, void *data, vo
        ret_if(!user_data);
 
        ret = vconf_get_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &status);
-       if (ret == OK && status == TRUE) {
+       if (ret == OK && status == true) {
                _D("Flight Mode");
                _hide_image_icon();
                return;
@@ -125,7 +117,7 @@ static void _on_noti(TapiHandle *handle_obj, const char *noti_id, void *data, vo
        /* FIXME */
        if (call_divert_state == VCONFKEY_TELEPHONY_CALL_FORWARD_ON) {
                _D("Show call divert icon");
-               _show_image_icon(data);
+               _show_image_icon();
        } else { /* VCONFKEY_TELEPHONY_CALL_FORWARD_OFF */
                _D("Hide call divert icon");
                _hide_image_icon();
@@ -134,17 +126,10 @@ static void _on_noti(TapiHandle *handle_obj, const char *noti_id, void *data, vo
        return;
 }
 
-void call_forward_on_noti(TapiHandle *handle_obj, const char *noti_id, void *data, void *user_data)
-{
-       _D("");
-       _on_noti(NULL, NULL, NULL, user_data);
-
-}
-
 /* Initialize TAPI */
 static void _init_tel(void *data)
 {
-       _on_noti(NULL, NULL, NULL, data);
+       _on_noti(data);
 }
 
 /* De-initialize TAPI */
@@ -155,10 +140,10 @@ static void _deinit_tel()
 
 static void _tel_ready_cb(keynode_t *key, void *data)
 {
-       gboolean status = FALSE;
+       bool status = false;
 
        status = vconf_keynode_get_bool(key);
-       if (status == TRUE) { /* Telephony State - READY */
+       if (status == true) { /* Telephony State - READY */
                _init_tel(data);
        } else { /* Telephony State – NOT READY */
                /*
@@ -171,12 +156,12 @@ static void _tel_ready_cb(keynode_t *key, void *data)
 
 static void _flight_mode(keynode_t *key, void *data)
 {
-       _on_noti(NULL, NULL, NULL, data);
+       _on_noti(data);
 }
 
 static int register_call_divert_module(void *data)
 {
-       gboolean state = FALSE;
+       int state = false;
        int ret;
 
        retv_if(!data, 0);