Profile Configuration.
authorJunho Jung <ho85.jung@samsung.com>
Mon, 10 Aug 2015 12:41:16 +0000 (21:41 +0900)
committerJunho Jung <ho85.jung@samsung.com>
Thu, 13 Aug 2015 05:53:51 +0000 (14:53 +0900)
  - disable TAPI in TV profile.

Change-Id: If988400fcf49fe1b14e283044c762ba38a01fafa

CMakeLists.txt
include/screen_reader_system.h
packaging/org.tizen.screen-reader.spec
src/main.c
src/navigator.c
src/screen_reader.c
src/screen_reader_system.c
src/screen_reader_tts.c

index 13155e7..c40c93b 100755 (executable)
@@ -9,6 +9,12 @@ INCLUDE(CMakeLists.sub)
 SET(RESOURCE_DIR "${CMAKE_SOURCE_DIR}/res")
 SET(LOCALEDIR "/usr/apps/org.tizen.screen-reader/res/locale")
 
+IF("${SEC_FEATURE_TAPI_ENABLE}" STREQUAL "1")
+       MESSAGE("STATUS_SEC:/-${SEC_FEATURE_TAPI_ENABLE}-/")
+       SET(TAPI_REQUIRED_PKG "tapi")
+       ADD_DEFINITIONS("-DSCREEN_READER_MOBILE")
+ENDIF ()
+
 INCLUDE(FindPkgConfig)
 pkg_check_modules(pkgs REQUIRED
        bundle
@@ -25,9 +31,9 @@ pkg_check_modules(pkgs REQUIRED
        capi-media-tone-player
        capi-system-device
        capi-network-bluetooth
-       tapi
        notification
        capi-network-wifi
+       ${TAPI_REQUIRED_PKG}
 )
 
 FOREACH(flag ${pkgs_CFLAGS})
index c1eced4..e77c3c1 100644 (file)
@@ -1,3 +1,4 @@
+#ifdef SCREEN_READER_MOBILE
 void system_notifications_init(void);
 void system_notifications_shutdown(void);
 
@@ -6,4 +7,5 @@ void device_battery_get(void);
 void device_signal_strenght_get(void);
 void device_missed_events_get(void);
 void device_date_get(void);
-void device_bluetooth_get(void);
\ No newline at end of file
+void device_bluetooth_get(void);
+#endif
index 9fe46ba..a220f7c 100755 (executable)
@@ -26,9 +26,11 @@ BuildRequires:  vconf
 BuildRequires:  gettext-tools
 BuildRequires:  pkgconfig(check)
 BuildRequires:  pkgconfig(capi-network-bluetooth)
-BuildRequires:  pkgconfig(tapi)
 BuildRequires:  pkgconfig(notification)
 BuildRequires:  pkgconfig(capi-network-wifi)
+#%if "%{?tizen_profile_name}" != "tv"
+BuildRequires:  pkgconfig(tapi)
+#%endif
 
 %description
 An utility library for developers of the menu screen.
@@ -37,11 +39,19 @@ An utility library for developers of the menu screen.
 %setup -q
 
 %build
-%if "%{?tizen_profile_name}" == "tv"
-    export CFLAGS+=" -DSCREEN_READER_TV"
+rm -rf CMakeFiles CMakeCache.txt
+
+%if "%{?tizen_profile_name}" != "tv"
+        export SEC_FEATURE_TAPI_ENABLE="1"
+%else
+        export SEC_FEATURE_TAPI_ENABLE="0"
 %endif
 
-rm -rf CMakeFiles CMakeCache.txt && cmake . -DCMAKE_INSTALL_PREFIX="%{AppInstallPath}" -DCMAKE_TARGET="%{Exec}" -DCMAKE_PACKAGE="%{name}"
+cmake . -DCMAKE_INSTALL_PREFIX="%{AppInstallPath}" \
+        -DCMAKE_TARGET="%{Exec}" \
+        -DCMAKE_PACKAGE="%{name}" \
+        -DSEC_FEATURE_TAPI_ENABLE=${SEC_FEATURE_TAPI_ENABLE}
+
 make %{?jobs:-j%jobs} \
 2>&1 | sed \
 -e 's%^.*: error: .*$%\x1b[37;41m&\x1b[m%' \
index ae73454..ab10a4b 100644 (file)
@@ -199,7 +199,7 @@ static int app_create(void *data)
    logger_init();
    screen_reader_switch_enabled_set(EINA_TRUE);
    screen_reader_create_service(data);
-#ifndef SCREEN_READER_TV
+#ifdef SCREEN_READER_MOBILE
    screen_reader_gestures_init();
    navigator_init();
 #endif
@@ -211,7 +211,7 @@ static int app_terminate(void *data)
 {
    DEBUG("screen reader terminating");
 
-#ifndef SCREEN_READER_TV
+#ifdef SCREEN_READER_MOBILE
    DEBUG("terminate navigator");
    navigator_shutdown();
    DEBUG("terminate gestures");
index 75b0a79..99f5b6f 100644 (file)
@@ -1912,7 +1912,9 @@ static void on_gesture_detected(void *data, Gesture_Info *info)
          _start_stop_signal_send();
          break;
       case TWO_FINGERS_TRIPLE_TAP:
+#ifdef SCREEN_READER_MOBILE
          _read_quickpanel();
+#endif
          break;
       case THREE_FINGERS_SINGLE_TAP:
          _review_from_top();
@@ -2060,7 +2062,9 @@ void navigator_init(void)
    window_tracker_register(on_window_activate, NULL);
    window_tracker_active_window_request();
    smart_notification_init();
+#ifdef SCREEN_READER_MOBILE
    system_notifications_init();
+#endif
    keyboard_tracker_init();
    keyboard_tracker_register(kb_tracker, NULL);
 }
@@ -2086,6 +2090,8 @@ void navigator_shutdown(void)
    app_tracker_shutdown();
    window_tracker_shutdown();
    smart_notification_shutdown();
+#ifdef SCREEN_READER_MOBILE
    system_notifications_shutdown();
+#endif
    keyboard_tracker_shutdown();
 }
index 7f4f6bd..19b93f2 100644 (file)
@@ -31,10 +31,10 @@ Service_Data service_data =
 {
    //Set by vconf
    .run_service = 1,
-#ifdef SCREEN_READER_TV
-   .tracking_signal_name = FOCUS_CHANGED_SIG,
-#else
+#ifdef SCREEN_READER_MOBILE
    .tracking_signal_name = HIGHLIGHT_CHANGED_SIG,
+#else
+   .tracking_signal_name = FOCUS_CHANGED_SIG,
 #endif
 
    //Set by tts
@@ -59,7 +59,7 @@ int screen_reader_create_service(void *data)
    vconf_init(service_data);
    tts_init(service_data);
 
-#ifdef SCREEN_READER_TV
+#ifdef SCREEN_READER_MOBILE
    spi_init(service_data);
 #endif
 
index 0f2ad26..f23023c 100644 (file)
 
 #define _GNU_SOURCE
 
+
+#ifdef SCREEN_READER_MOBILE
+
+
 #include <device/battery.h>
 #include <device/display.h>
 #include <device/callback.h>
@@ -757,3 +761,5 @@ void device_bluetooth_get(void)
          free(buffer);
       }
 }
+
+#endif
index 8103a4a..c192763 100644 (file)
@@ -148,7 +148,7 @@ static void __tts_test_utt_completed_cb(tts_h tts, int utt_id, void* user_data)
             flush_flag = EINA_FALSE;
       }
 
-#ifndef SCREEN_READER_TV
+#ifdef SCREEN_READER_MOBILE
    if(last_utt_id == utt_id)
       {
          DEBUG("LAST UTTERANCE");