Remove C++ check warnings. 72/101572/7
authorRadoslaw Czerski <r.czerski@samsung.com>
Mon, 5 Dec 2016 10:19:45 +0000 (11:19 +0100)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Mon, 5 Dec 2016 10:47:15 +0000 (02:47 -0800)
Additionally tts module was removed as it is unused.

Change-Id: Icb5aadbd9ea3e2a78f8c1c6ce505523ed8748b24
Signed-off-by: Radoslaw Czerski <r.czerski@samsung.com>
12 files changed:
inc/box.h
inc/modules.h
inc/tts.h [deleted file]
inc/util.h
src/box.c
src/list.c
src/main.c
src/modules/information/noti.c
src/modules/information/toast_popup.c
src/modules/modules.c
src/tts.c [deleted file]
src/util.c

index 0799da9ad36326a87478f9c7ed805293b2df6840..93255e2fe91753adda79e5ceb666a6d980a8aa86 100644 (file)
--- a/inc/box.h
+++ b/inc/box.h
@@ -89,15 +89,6 @@ typedef enum Box_List {
  */
 extern int box_add_icon_to_list(icon_s *icon);
 
-/**
- * @brief Appends @a icon to list of icons to show.
- *
- * @param[in] icon the icon to append
- *
- * @return 0 on success, -1 otherwise
- */
-extern int box_append_icon_to_list(icon_s *icon);
-
 /**
  * @brief Removes @a icon from list of icons to show.
  *
@@ -144,13 +135,6 @@ Eina_List *box_list_get(indicator_icon_area_type type);
  */
 extern unsigned int box_get_list_size(indicator_icon_area_type type);
 
-/**
- * @brief Retrieves count of max allowed number of non fixed icons.
- *
- * @return count of max allowed number of non fixed icons
- */
-extern int box_get_max_count_in_non_fixed_list(void);
-
 /**
  * @brief Checks for possibility of inserting icon in non fixed area.
  *
@@ -177,28 +161,6 @@ extern Icon_AddType box_is_enable_to_insert_in_non_fixed_list(icon_s *icon);
  */
 extern int box_get_priority_in_move_area(win_info *win, Evas_Coord x, Evas_Coord y);
 
-/**
- * @brief Checks indicator area.
- *
- * @param[in] win win info
- * @param[in] curr_x x coordinate of the point
- * @param[in] curr_y y coordinate of the point
- *
- * @return 1 if specified point belongs to area, 0 otherwise
- */
-extern int box_check_indicator_area(win_info *win,Evas_Coord curr_x, Evas_Coord curr_y);
-
-/**
- * @brief Checks home icon area.
- *
- * @param[in] win win info
- * @param[in] curr_x x coordinate of the point
- * @param[in] curr_y y coordinate of the point
- *
- * @return 1 if specified point belongs to area, 0 otherwise
- */
-extern int box_check_home_icon_area(win_info *win,Evas_Coord curr_x, Evas_Coord curr_y);
-
 /**
  * @brief Checks if icon exists in related area.
  *
@@ -239,17 +201,6 @@ extern unsigned int box_get_count_in_noti_list_except_minictrl(void);
  */
 extern int box_get_enabled_noti_count(void);
 
-/**
- * @brief Checks more noti icon area
- *
- * @param[in] win win info
- * @param[in] curr_x x coordinate of the point
- * @param[in] curr_y y coordinate of the point
- *
- * @return 1 if specified point belongs to area, 0 otherwise
- */
-extern int box_check_more_icon_area(win_info *win, Evas_Coord curr_x, Evas_Coord curr_y);
-
 /**
  * @brief Updates boxes.
  *
index c1d772591bdef5bbabb523aee0e25d37280f857f..dc66bc3a26a0159c9c0292480a33d14894b644d4 100644 (file)
@@ -67,15 +67,6 @@ extern void modules_lang_changed(void *data);
  */
 extern void modules_region_changed(void *data);
 
-/**
- * @brief Propagates minicontrol action request to all initialized modules.
- *
- * @param[in] action action
- * @param[in] name name
- * @param[in] data the app data
- */
-extern void modules_minictrl_control(int action, const char* name, void *data);
-
 /**
  * @brief Propagates wake up info request to all initialized modules.
  *
diff --git a/inc/tts.h b/inc/tts.h
deleted file mode 100644 (file)
index 600c63e..0000000
--- a/inc/tts.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2016  Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifdef _SUPPORT_SCREEN_READER2
-
-#ifndef __SERVICE_TTS_H__
-#define __SERVICE_TTS_H__
-
-void indicator_service_tts_init(void *data);
-void indicator_service_tts_fini(void *data);
-void indicator_service_tts_play(char *message);
-
-#endif
-#endif
-
index d9d2098db7f7ddcb2d821ed8da417144c5be67f0..5b5d39bf26433fce7d60c5c9827db49beaaef8df 100644 (file)
@@ -60,15 +60,6 @@ struct _Indicator_Data_Animation
 };
 
 
-/**
- * @brief Sets label text color.
- *
- * @param[in] txt the text to append color info
- *
- * @return txt with color info appended, or NULL if failure
- */
-extern char *util_set_label_text_color(const char *txt);
-
 /**
  * @brief Sets indicator background color to default.
  *
@@ -145,36 +136,6 @@ extern void util_part_text_emit(void* data, const char *part, const char *text);
  */
 extern void util_signal_emit_by_win(void* data, const char *emission, const char *source);
 
-/**
- * @brief Emits text to specified part using win info structure to get layout.
- *
- * @param[in] data win info
- * @param[in] part part name
- * @param[in] text text to emit
- */
-extern void util_part_text_emit_by_win(void* data, const char *part, const char *text);
-
-/**
- * @brief Sets image to part content.
- *
- * @param[in] data the app data
- * @param[in] part part name
- * @param[in] img_path path to image to set
- */
-extern void util_part_content_img_set(void *data, const char *part, const char *img_path);
-
-/**
- * @brief Checks system status.
- *
- * @return 0 if PWLOCK is set to VCONFKEY_PWLOCK_BOOTING_UNLOCK or VCONFKEY_PWLOCK_RUNNING_UNLOCK, -1 otherwise
- *
- * @see VCONFKEY_PWLOCK_BOOTING_UNLOCK
- * @see VCONFKEY_PWLOCK_BOOTING_LOCK
- * @see        VCONFKEY_PWLOCK_RUNNING_UNLOCK
- * @see VCONFKEY_PWLOCK_RUNNING_LOCK
- */
-extern int util_check_system_status(void);
-
 /**
  * @brief Gets timezone from vconf.
  *
@@ -182,13 +143,6 @@ extern int util_check_system_status(void);
  */
 extern void util_get_timezone_str(char **timezone);
 
-/**
- * @brief Gets window angle property.
- *
- * @remarks will be removed
- */
-extern Eina_Bool util_win_prop_angle_get(Ecore_X_Window win, int *curr);
-
 /**
  * @brief Checks if path contains special string that indicates animation icon.
  *
@@ -236,50 +190,6 @@ extern void util_stop_noti_ani(icon_s *icon);
  */
 extern void util_send_status_message_start(void *data, double duration);
 
-/**
- * @brief Replaces char in string.
- *
- * @param text text to replace in
- * @param to_replace char to replace
- * @param replacer char that will replace @a to_replace char
- */
-extern void util_char_replace(char *text, char to_replace, char replacer);
-
-/**
- * @brief Gets dynamic state
- *
- * @return state
- */
-extern int util_dynamic_state_get(void);
-
-/**
- * @brief Add monitor to file.
- *
- * @param file_path path to file to monitor
- * @param callback_func callback function to be invoked when file state will change
- * @param data data that will be passed to callback function
- *
- * @return pointer to monitor handler or NULL in case of failure
- */
-extern Ecore_File_Monitor *util_file_monitor_add(const char *file_path, Ecore_File_Monitor_Cb callback_func, void *data);
-
-/**
- * @brief Removes monitor to file.
- *
- * @param file_monitor file monitor handler
- */
-extern void util_file_monitor_remove(Ecore_File_Monitor *file_monitor);
-
-/**
- * @brief Gets substring that starts with specified @a str_search string.
- *
- * @param str string to search in
- * @param  str_search string to search
- *
- * @return substring or NULL if substring not found
- */
-extern char *util_safe_str(const char *str, const char *str_search);
-
 /**
  * @brief Checks if @a str starts with @a prefix
  *
index cf22c197ff063cad38fde47949778d408986b469..95a85b9dcb7580fa677f998e649ab041d86b7892 100644 (file)
--- a/src/box.c
+++ b/src/box.c
@@ -322,23 +322,6 @@ __CATCH:
 }
 
 
-extern int box_append_icon_to_list(icon_s *icon)
-{
-       retv_if(!icon, 0);
-
-       if (box_exist_icon(icon)) return OK;
-
-       Eina_List **list;
-       list = box_list_ptr_get(icon->area);
-
-       icon->exist_in_view = EINA_TRUE;
-       *list = eina_list_append(*list, icon);
-
-
-       return OK;
-}
-
-
 int box_remove_icon_from_list(icon_s *icon)
 {
        retv_if(!icon, 0);
@@ -467,77 +450,6 @@ extern void box_fini(win_info *win)
        return;
 }
 
-int box_get_max_count_in_non_fixed_list(void)
-{
-       return PORT_NONFIXED_ICON_COUNT;
-}
-
-
-int box_get_priority_in_move_area(win_info *win, Evas_Coord curr_x, Evas_Coord curr_y)
-{
-       Evas_Coord x, y, h, w;
-
-       /* Home Area Check for launching home */
-       evas_object_geometry_get(win->_fixed_box[INDICATOR_PRIORITY_FIXED1], &x, &y, &h, &w);
-
-       if (curr_x >= x - CORRECTION && curr_x <= x+h + CORRECTION) {
-               if (curr_y == -1) {
-                       return INDICATOR_PRIORITY_FIXED1;
-               } else if (curr_y >= y - CORRECTION && curr_y <= y+h + CORRECTION) {
-                       return INDICATOR_PRIORITY_FIXED1;
-               }
-       }
-
-       /* Non Fixed Area check for show/hide quickpanel */
-       return -1;
-}
-
-
-int box_check_indicator_area(win_info *win, Evas_Coord curr_x, Evas_Coord curr_y)
-{
-       Evas_Coord x, y, w, h;
-
-       /* Home Area Check for launching home */
-       evas_object_geometry_get(win->layout, &x, &y, &w, &h);
-
-       if (curr_x >= x && curr_x < x + w && curr_y >= y && curr_y < y + h) {
-               return 1;
-       }
-
-       return 0;
-}
-
-
-int box_check_home_icon_area(win_info *win, Evas_Coord curr_x, Evas_Coord curr_y)
-{
-       Evas_Coord x, y, w, h;
-
-       /* Home Area Check for launching home */
-       evas_object_geometry_get(win->_fixed_box[INDICATOR_PRIORITY_FIXED7], &x, &y, &w, &h);
-
-       if (curr_x >= x && curr_x < x + w && curr_y >= y && curr_y < y + h) {
-               return 1;
-       }
-
-       return 0;
-}
-
-
-int box_check_more_icon_area(win_info *win, Evas_Coord curr_x, Evas_Coord curr_y)
-{
-       Evas_Coord x, y, w, h;
-
-       /* Home Area Check for launching home */
-       evas_object_geometry_get(win->_fixed_box[INDICATOR_PRIORITY_FIXED11], &x, &y, &w, &h);
-
-       if (curr_x >= x && curr_x < x + w && curr_y >= y && curr_y < y + h) {
-               return 1;
-       }
-
-       return 0;
-}
-
-
 extern Eina_Bool box_exist_icon(icon_s *obj)
 {
        retv_if(!obj, ECORE_CALLBACK_CANCEL);
index 3993f407a1a8fabc1e5f2a9f054b460b59825a88..e60f4f986c065d3507010854df8526fe3d13e8b6 100644 (file)
@@ -52,7 +52,6 @@ static void _list_free(Eina_List *list)
                list = eina_list_remove_list(list, l);
        }
        eina_list_free(list);
-       list = NULL;
 
        return;
 }
@@ -205,8 +204,6 @@ extern void list_insert_icon(icon_s *icon)
 
 extern void list_remove_icon(icon_s *icon)
 {
-       ret_if(!icon);
-
        Eina_List **list;
 
        list = _list_list_ptr_get(icon->area);
index 36904f9476d04e5308d464b4c7a99fed1f8fa594..3370a4dea1495a3f60ae3e0618c2fb180a96782f 100644 (file)
@@ -38,7 +38,6 @@
 #include "modules.h"
 #include "util.h"
 #include "toast_popup.h"
-#include "tts.h"
 #include "log.h"
 #include "indicator.h"
 #include "ticker.h"
@@ -495,7 +494,7 @@ static void _create_base_gui(void* data)
        return;
 }
 
-static void _init_win_info(void * data)
+static void _init_win_info(void *data)
 {
        struct appdata *ad = data;
 
@@ -504,7 +503,7 @@ static void _init_win_info(void * data)
        memset(&(ad->win),0x00,sizeof(win_info));
 }
 
-static void _init_tel_info(void * data)
+static void _init_tel_info(void *data)
 {
        struct appdata *ad = data;
 
@@ -550,7 +549,6 @@ static indicator_error_e _terminate_indicator(void *data)
                ad->win.win = NULL;
        }
 
-
        if (ad)
                free(ad);
 
@@ -622,9 +620,6 @@ static void app_terminate(void *data)
        ticker_fini(ad);
        indicator_toast_popup_fini();
        message_port_unregister();
-#ifdef _SUPPORT_SCREEN_READER2
-       indicator_service_tts_fini(data);
-#endif
 
        unregister_event_handler(ad);
 
@@ -655,18 +650,13 @@ static void app_service(app_control_h service, void *data)
 
        register_event_handler(ad);
        modules_init(data);
-#ifdef _SUPPORT_SCREEN_READER
-       modules_register_tts(data);
-#endif
+
        feedback_initialize();
        indicator_toast_popup_init(data);
        message_port_register(data);
-       if (INDICATOR_ERROR_NONE != ticker_init(ad)) {
+       if (INDICATOR_ERROR_NONE != ticker_init(ad))
                _E("Ticker cannot initialize");
-       }
-#ifdef _SUPPORT_SCREEN_READER2
-       indicator_service_tts_init(data);
-#endif
+
        _indicator_lock_status_cb(SYSTEM_SETTINGS_KEY_LOCK_STATE, data);
 }
 
index 9119dfdc2306e912cefba5310cd87536926a4b87..0c2b91b3bdd5de40ad2c814c3f6066305300a535 100644 (file)
@@ -80,7 +80,7 @@ static void set_app_state(void *data)
 
 static void show_icon_with_path(struct noti_status *data, char* icon_path)
 {
-       retm_if(data == NULL, "Invalid parameter!");
+       retm_if(!data, "Invalid parameter!");
        _D("%s", icon_path);
 
        data->icon->img_obj.data = strdup(icon_path);
@@ -90,7 +90,7 @@ static void show_icon_with_path(struct noti_status *data, char* icon_path)
 
 static void hide_image_icon(struct noti_status *data)
 {
-       retm_if(data == NULL, "Invalid parameter!");
+       retm_if(!data, "Invalid parameter!");
 
        icon_hide(data->icon);
 }
@@ -98,11 +98,12 @@ static void hide_image_icon(struct noti_status *data)
 
 static void free_image_icon(struct noti_status *data)
 {
-       retm_if(data == NULL, "Invalid parameter!");
-
-       list_remove_icon(data->icon);
+       retm_if(!data, "Invalid parameter!");
 
        if (data->icon) {
+
+               list_remove_icon(data->icon);
+
                if (data->icon->img_obj.data) {
                        free((char *)data->icon->img_obj.data);
                        data->icon->img_obj.data = NULL;
@@ -113,48 +114,26 @@ static void free_image_icon(struct noti_status *data)
                        data->icon->name = NULL;
                }
 
+               if (data->noti) {
+                       notification_free(data->noti);
+                       data->noti = NULL;
+               }
+
                free(data->icon);
                data->icon = NULL;
        }
 
-       if (data != NULL) {
-               free(data);
-               data = NULL;
-       }
+       free(data);
 }
 
 
 static void insert_icon_list(struct noti_status *data)
 {
-       retm_if(data == NULL, "Invalid parameter!");
+       retm_if(!data, "Invalid parameter!");
 
        list_insert_icon(data->icon);
 }
 
-char *__indicator_ui_get_pkginfo_icon(const char *pkgid)
-{
-       int ret;
-       char *icon_path = NULL;
-       app_info_h app_info;
-
-       retvm_if(pkgid == NULL, NULL, "invalid parameter");
-
-       ret = app_info_create(pkgid, &app_info);
-
-       retvm_if(ret != APP_MANAGER_ERROR_NONE, NULL, "app_info_create for %s failed %d", pkgid, ret);
-
-       /* Icon path */
-       ret = app_info_get_icon(app_info, &icon_path);
-       if (ret != APP_MANAGER_ERROR_NONE) {
-               app_info_destroy(app_info);
-               _E("app_info_get_icon failed %d", ret);
-               return NULL;
-       }
-
-       app_info_destroy(app_info);
-
-       return icon_path;
-}
 
 static void show_image_icon(struct noti_status *data)
 {
@@ -234,7 +213,7 @@ static void _noti_minicontrol_set(struct noti_status *noti_data)
 
 static void _icon_add(struct noti_status *noti_data, const char *name, void *data)
 {
-       retm_if(noti_data == NULL || data == NULL, "Invalid parameter!");
+       retm_if(!noti_data || !data, "Invalid parameter!");
 
        icon_s *obj = NULL;
        obj = calloc(1, sizeof(icon_s));
@@ -500,7 +479,7 @@ void update_noti_module_new(void *data, notification_type_e type)
        notification_list_h list = NULL;
        notification_error_e ret = NOTIFICATION_ERROR_NONE;
 
-       retm_if(data == NULL, "Invalid parameter!");
+       retm_if(!data, "Invalid parameter!");
 
        ret = notification_get_list(NOTIFICATION_TYPE_NONE, -1, &list);
 
@@ -556,7 +535,7 @@ static void _indicator_noti_detailed_changed_cb(void *data, notification_type_e
 
 static int register_noti_module(void *data)
 {
-       retvm_if(data == NULL, FAIL, "Invalid parameter!");
+       retvm_if(!data, FAIL, "Invalid parameter!");
        static int bRegisterd = 0;
 
        set_app_state(data);
index f4badcf22b830fbf196b1791370cb65a79336505..483f633196f86468f8b0f3a4000f6b0f1cc658ff 100644 (file)
@@ -19,7 +19,6 @@
 #include "main.h"
 #include "common.h"
 #include "util.h"
-#include "tts.h"
 #include "box.h"
 #include "log.h"
 
index 4a1562a5346fa3d33c9273daa66da0ad51f46fbf..a0b13ab570d16bfb1f3492b9a337b5abfc233d0b 100644 (file)
@@ -172,17 +172,6 @@ void modules_region_changed(void *data)
 }
 
 
-void modules_minictrl_control(int action, const char* name, void *data)
-{
-       int i;
-       /* add items to list */
-       for (i = 0; modules[i]; i++) {
-               if (modules[i]->minictrl_control && modules[i]->initialized)
-                       modules[i]->minictrl_control(action, name, data);
-       }
-}
-
-
 void modules_wake_up(void *data)
 {
        int i;
diff --git a/src/tts.c b/src/tts.c
deleted file mode 100644 (file)
index df9a829..0000000
--- a/src/tts.c
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- * Copyright 2016  Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifdef _SUPPORT_SCREEN_READER2
-
-#include <tts.h>
-#include <vconf.h>
-#include <vconf-keys.h>
-#include "main.h"
-#include "common.h"
-#include "tts.h"
-#include "log.h"
-
-static void _tts_init(void);
-static void _tts_fini(void);
-
-static struct _s_info {
-       tts_h tts_handler;
-       Eina_List *list;
-} s_info = {
-       .tts_handler = NULL,
-       .list = NULL,
-};
-
-typedef struct _QP_TTS {
-       int id;
-       int done;
-       char *message;
-} QP_TTS_T;
-
-
-
-static QP_TTS_T * _tts_entry_new(int id, char *message)
-{
-       QP_TTS_T *entry = NULL;
-       retvm_if(message == NULL, NULL, "NULL message");
-
-       entry = (QP_TTS_T *)calloc(1, sizeof(QP_TTS_T));
-       retvm_if(entry == NULL, NULL, "failed to memory allocation");
-
-       entry->id = id;
-       entry->message = strdup(message);
-
-       return entry;
-}
-
-
-
-static void  _tts_entry_del(QP_TTS_T *entry)
-{
-       retm_if(entry == NULL,"invalid parameter");
-
-       if (entry->message != NULL) {
-               free(entry->message);
-       }
-
-       free(entry);
-}
-
-
-
-static QP_TTS_T *_tts_list_get_first(void)
-{
-       return eina_list_nth(s_info.list, 0);
-}
-
-
-
-static void _tts_list_add(QP_TTS_T *entry)
-{
-       retm_if(entry == NULL, "invalid parameter");
-
-       s_info.list = eina_list_prepend(s_info.list, entry);
-}
-
-
-
-static void _tts_list_del(QP_TTS_T *entry)
-{
-       retm_if(entry == NULL, "invalid parameter");
-
-       s_info.list = eina_list_remove(s_info.list, entry);
-}
-
-
-
-static void _tts_list_clean(void)
-{
-       QP_TTS_T *entry = NULL;
-
-       while ((entry = _tts_list_get_first()) != NULL) {
-                _tts_list_del(entry);
-                _tts_entry_del(entry);
-       }
-}
-
-
-
-static int _is_screenreader_on(void)
-{
-       int ret = -1, status = 0;
-
-       ret = vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &status);
-       retvm_if(ret != 0, 0, "failed to read VCONFKEY_SETAPPL_ACCESSIBILITY_TTS %d", ret);
-
-       return status;
-}
-
-
-
-static tts_state_e _tts_state_get(void)
-{
-       int ret = TTS_ERROR_NONE;
-       tts_state_e state = TTS_STATE_READY;
-
-       if (s_info.tts_handler != NULL) {
-               ret = tts_get_state(s_info.tts_handler, &state);
-               if (TTS_ERROR_NONE != ret){
-                       _E("get state error(%d)", ret);
-                       return -1;
-               }
-
-               return state;
-       }
-
-       return -1;
-}
-
-
-
-static void _tts_play(const char *message)
-{
-       int utt = 0;
-       int ret = TTS_ERROR_NONE;
-
-       if (s_info.tts_handler == NULL) {
-               _E("critical, TTS handler isn't initialized");
-               return;
-       }
-
-       _D("adding %s", message);
-
-       ret = tts_add_text(s_info.tts_handler, message, NULL, TTS_VOICE_TYPE_AUTO, TTS_SPEED_AUTO, &utt);
-       if (TTS_ERROR_NONE != ret){
-               _E("add text error!");
-               return;
-       }
-
-       ret = tts_play(s_info.tts_handler);
-       if(ret != TTS_ERROR_NONE) {
-               _E("play error(%d) state(%d)", ret);
-       }
-}
-
-
-
-static void _tts_stop(void)
-{
-       int ret = TTS_ERROR_NONE;
-
-       if (s_info.tts_handler == NULL) {
-               _E("critical, TTS handler isn't initialized");
-               return;
-       }
-
-       ret = tts_stop(s_info.tts_handler);
-       if (TTS_ERROR_NONE != ret){
-               _E("failed to stop play:%d", ret);
-               return;
-       }
-}
-
-
-
-static void _tts_state_changed_cb(tts_h tts, tts_state_e previous, tts_state_e current, void* user_data)
-{
-       QP_TTS_T *entry = NULL;
-
-       _D("_tts_state_changed_cb(%d => %d)", previous, current);
-
-       if(previous == TTS_STATE_CREATED && current == TTS_STATE_READY) {
-               entry = _tts_list_get_first();
-               if (entry != NULL) {
-                        _tts_play(entry->message);
-                        _tts_list_del(entry);
-                        _tts_entry_del(entry);
-               }
-               _tts_list_clean();
-       }
-}
-
-
-
-static void _tts_utt_started_cb(tts_h tts, int utt_id, void *user_data)
-{
-       _D("_tts_utt_started_cb");
-}
-
-
-
-static void _tts_utt_completed_cb(tts_h tts, int utt_id, void *user_data)
-{
-       _D("_tts_utt_completed_cb");
-}
-
-
-
-static void _tts_error_cb(tts_h tts, int utt_id, tts_error_e reason, void* user_data)
-{
-       _D("_tts_error_cb");
-}
-
-
-
-static int _tts_callback_set(tts_h tts, void* data)
-{
-       int ret = 0;
-
-       if (TTS_ERROR_NONE != (ret = tts_set_state_changed_cb(tts, _tts_state_changed_cb, tts))){
-               _E("set interrupted callback error !!:%d", ret);
-               ret = -1;
-       }
-
-       if (TTS_ERROR_NONE != (ret = tts_set_utterance_started_cb(tts, _tts_utt_started_cb, data))) {
-               _E("set utterance started callback error !!:%d", ret);
-               ret = -1;
-       }
-
-       if (TTS_ERROR_NONE != (ret = tts_set_utterance_completed_cb(tts, _tts_utt_completed_cb, data))) {
-               _E("set utterance completed callback error !!:%d", ret);
-               ret = -1;
-       }
-
-       if (TTS_ERROR_NONE != (ret = tts_set_error_cb(tts, _tts_error_cb, data))) {
-               _E("set error callback error !!:%d", ret);
-               ret = -1;
-       }
-
-       return ret;
-}
-
-
-
-static void _tts_init()
-{
-       tts_h tts = NULL;
-       int ret = TTS_ERROR_NONE;
-
-       if (s_info.tts_handler == NULL) {
-               ret = tts_create(&tts);
-               if(ret != TTS_ERROR_NONE) {
-                       _E("tts_create() failed");
-                       return ;
-               }
-
-               ret = tts_set_mode(tts, TTS_MODE_NOTIFICATION);
-               if(ret != TTS_ERROR_NONE) {
-                       _E("tts_create() failed");
-                       tts_destroy(s_info.tts_handler);
-                       s_info.tts_handler = NULL;
-                       return ;
-               }
-
-               if(_tts_callback_set(tts, NULL) != 0) {
-                       _E("_tts_callback_set() failed");
-                       tts_destroy(s_info.tts_handler);
-                       s_info.tts_handler = NULL;
-                       return ;
-               }
-
-               ret = tts_prepare(tts);
-               if(ret != TTS_ERROR_NONE) {
-                       _E("tts_create() failed");
-                       tts_destroy(s_info.tts_handler);
-                       s_info.tts_handler = NULL;
-                       return ;
-               }
-
-               s_info.tts_handler = tts;
-       }
-}
-
-
-
-static void _tts_fini(void)
-{
-       int ret = TTS_ERROR_NONE;
-
-       if (s_info.tts_handler != NULL) {
-               ret = tts_destroy(s_info.tts_handler);
-               if(ret != TTS_ERROR_NONE) {
-                       _E("tts_destroy() failed");
-               }
-               s_info.tts_handler = NULL;
-       }
-}
-
-
-
-static void _tts_vconf_cb(keynode_t *key, void *data){
-       if(_is_screenreader_on() == 0) {
-               _D("TTS turned off");
-               _tts_fini();
-       }
-
-       _tts_list_clean();
-}
-
-
-
-void indicator_service_tts_init(void *data) {
-       int ret = 0;
-
-    ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS,
-               _tts_vconf_cb, data);
-}
-
-
-
-void indicator_service_tts_fini(void *data) {
-       int ret = 0;
-
-    ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS,
-               _tts_vconf_cb, data);
-
-    _tts_list_clean();
-}
-
-
-
-void indicator_service_tts_play(char *message) {
-       tts_state_e state = 0;
-       QP_TTS_T *entry = NULL;
-       retm_if(message == NULL, "invalid parameter");
-
-       if (_is_screenreader_on() == 1) {
-               _tts_init();
-
-               state = _tts_state_get();
-
-               if (state == TTS_STATE_CREATED) {
-                       _tts_list_clean();
-                       entry = _tts_entry_new(-1, message);
-                       if (entry != NULL) {
-                                _tts_list_add(entry);
-                       }
-               } else if (state == TTS_STATE_PLAYING || state == TTS_STATE_PAUSED) {
-                       _tts_stop();
-                       _tts_play(message);
-               } else if (state == TTS_STATE_READY) {
-                       _tts_play(message);
-               } else {
-                       _E("invalid status: %d", state);
-               }
-       }
-}
-#endif /* _SUPPORT_SCREEN_READER2 */
index 0a2d3427b53cbdd743dc06681dff550a68deb368..e5efdf6336433031ee1ed2e1296b83939922f6f9 100644 (file)
@@ -87,28 +87,6 @@ const reserved_t reserved_paths[] = {
        {MSG_SIM_FULL_STATUS_ICON, "SIM/b03_sim_card_full.png"}
 };
 
-
-char *util_set_label_text_color(const char *txt)
-{
-       Eina_Strbuf *temp_buf = NULL;
-       Eina_Bool buf_result = EINA_FALSE;
-       char *ret_str = NULL;
-
-       retvm_if(txt == NULL, NULL, "Invalid parameter!");
-
-       temp_buf = eina_strbuf_new();
-       buf_result = eina_strbuf_append_printf(temp_buf,
-                               LABEL_STRING, FONT_COLOR, txt);
-
-       if (buf_result == EINA_FALSE)
-               _D("Failed to make label string!");
-       else
-               ret_str = eina_strbuf_string_steal(temp_buf);
-
-       eina_strbuf_free(temp_buf);
-       return ret_str;
-}
-
 void util_bg_color_rgba_set(Evas_Object *layout, char r, char g, char b, char a)
 {
        Edje_Message_Int_Set *msg;
@@ -204,45 +182,6 @@ void util_signal_emit_by_win(void *data, const char *emission, const char *sourc
 }
 
 
-void util_part_text_emit_by_win(void *data, const char *part, const char *text)
-{
-       win_info *win = (win_info *)data;
-       retm_if(data == NULL, "Invalid parameter!");
-       Evas_Object *edje;
-
-       retm_if(win->layout == NULL, "Invalid parameter!");
-       edje = elm_layout_edje_get(win->layout);
-       edje_object_part_text_set(edje, part, text);
-}
-
-
-void util_part_content_img_set(void *data, const char *part, const char *img_path)
-{
-       struct appdata *ad = (struct appdata *)data;
-       retm_if(data == NULL, "Invalid parameter!");
-       Evas_Object *icon = NULL;
-       char path[PATH_MAX];
-
-       retm_if(ad->win.layout == NULL, "Invalid parameter!");
-
-       icon = elm_image_add(ad->win.layout);
-       retm_if(!icon, "Cannot create elm icon object!");
-
-       if (strncmp(img_path, "/", 1) != 0)
-               snprintf(path, sizeof(path), "%s/%s", util_get_icon_dir(), img_path);
-       else
-               strncpy(path, img_path, sizeof(path) - 1);
-
-       if (!ecore_file_exists(path)) {
-               _E("icon file does not exist!!: %s", path);
-               return;
-       }
-       elm_image_file_set(icon, path, NULL);
-       evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_part_content_set(ad->win.layout, part, icon);
-}
-
-
 void util_send_status_message_start(void *data, double duration)
 {
        Ecore_Evas *ee_port;
@@ -260,19 +199,6 @@ void util_send_status_message_start(void *data, double duration)
 
 }
 
-int util_check_system_status(void)
-{
-       int ret, value = -1;
-
-       ret = vconf_get_int(VCONFKEY_PWLOCK_STATE, &value);
-       if (ret == OK &&
-           (value == VCONFKEY_PWLOCK_BOOTING_LOCK ||
-            value == VCONFKEY_PWLOCK_RUNNING_LOCK))
-               return FAIL;
-
-       return OK;
-}
-
 
 #ifdef _SUPPORT_SCREEN_READER
 Evas_Object *util_access_object_register(Evas_Object *object, Evas_Object *layout)
@@ -297,28 +223,6 @@ void util_access_object_unregister(Evas_Object *object)
 }
 
 
-void util_access_object_info_set(Evas_Object *object, int info_type, char *info_text)
-{
-       if ((object == NULL) || (info_text == NULL)) {
-               _E("Access info set fails %x, %x!!!", object, info_text);
-               return;
-       }
-
-       elm_access_info_set(object, info_type, (const char *)info_text);
-}
-
-
-void util_access_object_activate_cb_set(Evas_Object *object, Elm_Access_Activate_Cb activate_cb, void *cb_data)
-{
-       if ((object == NULL) || (activate_cb == NULL)) {
-               _E("Access activated cb set fails %x %x!!!", object, activate_cb);
-               return;
-       }
-
-       elm_access_activate_cb_set(object, activate_cb, cb_data);
-}
-
-
 void util_access_object_info_cb_set(Evas_Object *object, int type, Elm_Access_Info_Cb info_cb, void *cb_data)
 {
        if ((object == NULL) || (info_cb == NULL)) {
@@ -375,38 +279,6 @@ void util_get_timezone_str(char **timezone)
 }
 
 
-Eina_Bool util_win_prop_angle_get(Ecore_X_Window win, int *req)
-{
-       Eina_Bool res = EINA_FALSE;
-#if 0
-       int ret, count;
-       int angle[2] = {-1, -1};
-       unsigned char *prop_data = NULL;
-
-       ret = ecore_x_window_prop_property_get(win, ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, ECORE_X_ATOM_CARDINAL, 32, &prop_data, &count);
-
-       if (ret <= 0) {
-               if (prop_data) free(prop_data);
-               return res;
-       }
-
-       if (ret && prop_data) {
-               memcpy(&angle, prop_data, sizeof(int) * count);
-               if (count == 2)
-                       res = EINA_TRUE;
-       }
-
-       if (prop_data) free(prop_data);
-       *req  = angle[0]; /* current angle */
-
-       if (angle[0] == -1 && angle[1] == -1)
-               res = EINA_FALSE;
-#endif
-
-       return res;
-}
-
-
 #if 0
 int util_get_block_width(void *data, const char *part)
 {
@@ -526,38 +398,6 @@ void util_stop_noti_ani(icon_s *icon)
 }
 
 
-void util_char_replace(char *text, char s, char t)
-{
-       retm_if(text == NULL, "invalid argument");
-
-       int i = 0, text_len = 0;
-
-       text_len = strlen(text);
-
-       for (i = 0; i < text_len; i++) {
-               if (*(text + i) == s)
-                       *(text + i) = t;
-       }
-}
-
-
-static bool _is_empty_str(const char *str)
-{
-       if (NULL == str || '\0' == str[0])
-               return true;
-       return false;
-}
-
-
-char *util_safe_str(const char *str, const char *str_search)
-{
-       if (_is_empty_str(str))
-               return NULL;
-
-       return strstr(str, str_search);
-}
-
-
 bool util_string_prefix_check(const char *prefix, const char *str)
 {
     size_t lenpre = strlen(prefix);
@@ -567,35 +407,6 @@ bool util_string_prefix_check(const char *prefix, const char *str)
 }
 
 
-int util_dynamic_state_get(void)
-{
-       int val = 0;
-       /*TODO vconf_get_bool(VCONFKEY_SETAPPL_DYNAMIC_STATUS_BAR, &val); */
-       return val;
-}
-
-
-Ecore_File_Monitor *util_file_monitor_add(const char *file_path, Ecore_File_Monitor_Cb callback_func, void *data)
-{
-       Ecore_File_Monitor *pFileMonitor = NULL;
-       pFileMonitor = ecore_file_monitor_add(file_path, callback_func, data);
-
-       if (pFileMonitor == NULL)
-               _D("ecore_file_monitor_add return NULL !!");
-
-       return pFileMonitor;
-}
-
-
-void util_file_monitor_remove(Ecore_File_Monitor *pFileMonitor)
-{
-       if (pFileMonitor == NULL)
-               return;
-
-       ecore_file_monitor_del(pFileMonitor);
-       pFileMonitor = NULL;
-}
-
 const char *util_get_file_path(enum app_subdir dir, const char *relative)
 {
        static char buf[PATH_MAX];