Fix: smart-navi is able to run on TV image.
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Tue, 10 Mar 2015 14:22:27 +0000 (15:22 +0100)
committerŁukasz Stanisławski <l.stanislaws@samsung.com>
Wed, 11 Mar 2015 08:37:20 +0000 (09:37 +0100)
* smack rules removed according to Tizen 3.0
* remove app_efl_main
* remoeve tone_player dependency
* installation path changed

Change-Id: I5807736d893e30be49bdff98e69ed82ae91f77c3

CMakeLists.txt
org.tizen.smart-navigator.manifest
packaging/org.tizen.smart-navigator.spec
src/main.c
src/screen_reader_vconf.c
src/smart_notification.c

index 1e61afb..b79df0c 100755 (executable)
@@ -9,8 +9,8 @@ SET(RESOURCE_DIR "${CMAKE_SOURCE_DIR}/res")
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(pkgs REQUIRED
+       capi-appfw-application
        bundle
-       appcore-efl
        eldbus
        elementary
        ecore
@@ -20,7 +20,6 @@ pkg_check_modules(pkgs REQUIRED
        dlog
        vconf
        tts
-       capi-media-tone-player
        capi-system-device
 )
 
@@ -43,5 +42,5 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ${SLP_LD_PATH_FLAGS} ${SLP
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
 INSTALL(DIRECTORY ${RESOURCE_DIR}/icons DESTINATION res) 
 # Install Manifest File
-INSTALL(FILES org.tizen.smart-navigator.xml DESTINATION /opt/share/packages)
+INSTALL(FILES org.tizen.smart-navigator.xml DESTINATION /usr/share/packages)
 # End of a file
index 3bc75b5..9c82c66 100644 (file)
@@ -1,48 +1,5 @@
 <manifest>
- <define>
-    <domain name="smart-navigator" />
-    <permit>
-       <smack permit="dbus" type="rwx" />
-       <smack permit="atspi" type="rwx" />
-       <smack permit="e17" type="rwx" />
-       <smack permit="tts-server" type="rwx" />
-       <smack permit="media-controller-client" type="rwx" />
-       <smack permit="deviced" type="rwx" />
-       <smack permit="sensord" type="rwx" />
-       <smack permit="media-server" type="rwx" />
-    </permit>
-    <request>
-       <smack request="sdbd" type="rwx" />
-       <smack request="atspi" type="rwx" />
-       <smack request="dbus" type="rwx" />
-       <smack request="xorg" type="rwx" />
-       <smack request="pulseaudio" type="rwxat" />
-       <smack request="pkgmgr::db" type="rwx" />
-       <smack request="device::app_logging" type="rwx" />
-       <smack request="ail::db" type="rwx" />
-       <smack request="system::vconf" type="rwx" />
-       <smack request="system::vconf_setting" type="rwx" />
-       <smack request="system::vconf_system" type="rwx" />
-       <smack request="system::vconf_inhouse" type="rwx" />
-       <smack request="system::vconf_multimedia" type="rwx" />
-       <smack request="system::vconf_misc" type="rwx" />
-       <smack request="isf" type="rwx" />
-       <smack request="system::homedir" type="rwx" />
-       <smack request="system::tmpdir" type="rwx" />
-       <smack request="sys-assert::core" type="rwxat" />
-       <smack request="device::sys_logging" type="rwx" />
-       <smack request="svi-data" type="rwx" />
-       <smack request="e17" type="rwx" />
-       <smack request="tts-server" type="rwx" />
-       <smack request="media-controller-client" type="rwx" />
-       <smack request="sound_server" type="rwx" />
-       <smack request="deviced" type="rwx" />
-       <smack request="sensord" type="rwx" />
-       <smack request="media-server" type="rwx" />
-    </request>
- </define>
-
-<request>
-<domain name="smart-navigator"/>
-</request>
+   <request>
+      <domain name="_"/>
+   </request>
 </manifest>
index 819b7bb..c53616f 100755 (executable)
@@ -1,29 +1,32 @@
-%define AppInstallPath /usr/apps/%{name}
-%define Exec smart-navigator
-
-
 Name:       org.tizen.smart-navigator
 Summary:    Empty app
 Version:    0.0.1
 Release:    1
+Group:      Applications/Core Applications
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 
 BuildRequires:  at-spi2-core
 BuildRequires:  at-spi2-core-devel
 BuildRequires:  cmake
-BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  pkgconfig(ecore)
 BuildRequires:  pkgconfig(ecore-x)
 BuildRequires:  pkgconfig(eina)
 BuildRequires:  pkgconfig(eldbus)
 BuildRequires:  pkgconfig(elementary)
-BuildRequires:  pkgconfig(capi-media-tone-player)
 BuildRequires:  pkgconfig(capi-system-device)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(vconf)
+BuildRequires:  pkgconfig(bundle)
 BuildRequires:  tts
 BuildRequires:  tts-devel
 BuildRequires:  vconf
 
+%define AppInstallPath /usr/apps/%{name}
+%define Exec smart-navigator
+
+
 %description
 An utility library for developers of the menu screen.
 
@@ -43,10 +46,10 @@ rm -rf %{buildroot}
 
 %post 
 /sbin/ldconfig
-vconftool set -t string db/setting/accessibility/language "en_US" -u 5000 -s smart-navigator -f
-vconftool set -t int db/setting/accessibility/information_level 2 -u 5000 -s smart-navigator -f
-vconftool set -t int db/setting/accessibility/voice 1 -u 5000 -s smart-navigator -f
-vconftool set -t string db/setting/accessibility/tracking_signal "focused" -u 5000 -s smart-navigator -f
+vconftool set -t string db/setting/accessibility/language "en_US"
+vconftool set -t int db/setting/accessibility/information_level 2
+vconftool set -t int db/setting/accessibility/voice 1
+vconftool set -t string db/setting/accessibility/tracking_signal "focused"
 
 %postun -p /sbin/ldconfig
 
@@ -54,4 +57,4 @@ vconftool set -t string db/setting/accessibility/tracking_signal "focused" -u 50
 %manifest org.tizen.smart-navigator.manifest
 %{AppInstallPath}/bin/smart-navigator
 %{AppInstallPath}/res/icons/smart-navigator.png
-/opt/share/packages/%{name}.xml
+/usr/share/packages/%{name}.xml
index a28ae26..2001f28 100755 (executable)
@@ -1,5 +1,6 @@
-#include <appcore-efl.h>
+#include <app.h>
 #include <eldbus-1/Eldbus.h>
+#include <Elementary.h>
 #include "navigator.h"
 #include "window_tracker.h"
 #include "logger.h"
 #define A11Y_PATH "/org/a11y/bus"
 #define A11Y_GET_ADDRESS "GetAddress"
 
-Eldbus_Connection *a11y_conn;
 
-static void _init_modules(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
+static bool app_create(void *data)
 {
-   const char *a11y_bus_address = NULL;
-
-   logger_init();
-   if(!eldbus_message_arguments_get(msg, "s", &a11y_bus_address))
-      ERROR("error geting arguments _init_modules");
-   a11y_conn = eldbus_address_connection_get(a11y_bus_address);
-   
-   navigator_init();
-}
-
-static int app_create(void *data)
-{
-    eldbus_init();
-
-    Eldbus_Connection *session_conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION);
-    Eldbus_Object *a11y_obj = eldbus_object_get(session_conn, A11Y_BUS, A11Y_PATH);
-    Eldbus_Proxy *manager = eldbus_proxy_get(a11y_obj, A11Y_INTERFACE);
-    eldbus_proxy_call(manager, A11Y_GET_ADDRESS, _init_modules, data, -1, "");
-
+    atspi_init();
+    elm_init(0, NULL);
+    logger_init();
+    navigator_init();
     screen_reader_create_service(data);
 
-    return 0;
+    return true;
 }
 
-static int app_terminate(void *data)
+static void app_terminate(void *data)
 {
-
     screen_reader_terminate_service(data);
-
-    eldbus_connection_unref(a11y_conn);
     navigator_shutdown();
-    eldbus_shutdown();
     logger_shutdown();
-    return 0;
 }
 
 int main(int argc, char **argv)
 {
     printf("Application Main Function \n");
-    
-    struct appcore_ops ops =
-    {
-        .create = app_create,
-        .terminate = app_terminate,
-        .pause = NULL,
-        .resume = NULL,
-        .reset = NULL
-    };
+    app_create(get_pointer_to_service_data_struct());
+
+    elm_run();
 
-    ops.data = get_pointer_to_service_data_struct();
+    app_terminate(get_pointer_to_service_data_struct());
 
-    return appcore_efl_main("Smart Navigation", &argc, &argv, &ops);
+    return 0;
 }
index 2ec6ea8..574d8b2 100644 (file)
@@ -74,7 +74,7 @@ char *fold_tracker_signal(const char *signal_name)
 
 bool set_tracking_listener(Service_Data *sd, const char *signal_name)
 {
-       DEBUG("START");
+       DEBUG("START: %s", sd->tracking_signal_name);
 
        char *new_tracking_signal;
 
@@ -254,7 +254,7 @@ bool vconf_init(Service_Data *service_data)
        vconf_keylist_add_int(keys, "db/setting/accessibility/information_level", 2);
        vconf_keylist_add_str(keys, "db/setting/accessibility/language", "en_US");
        vconf_keylist_add_int(keys, "db/setting/accessibility/voice", 1);
-       vconf_keylist_add_str(keys, "db/setting/accessibility/tracking_signal", FOCUS_CHANGED_SIG);
+       vconf_keylist_add_str(keys, "db/setting/accessibility/tracking_signal", FOCUS_SIG);
     //-----------------------------------------------------------------------------------
        //vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, EINA_TRUE);
 
index c9e1e8f..dcbc751 100644 (file)
@@ -2,7 +2,6 @@
 #include <Ecore_Evas.h>
 #include <Evas.h>
 #include <atspi/atspi.h>
-#include <tone_player.h>
 #include "logger.h"
 #include "screen_reader_tts.h"
 #include "screen_reader_haptic.h"
@@ -154,9 +153,6 @@ static void _smart_notification_focus_chain_end(void)
        return;
 
     DEBUG(RED"Smart notification - FOCUS CHAIN END"RESET);
-
-    tone_player_stop(0);
-    tone_player_start(TONE_TYPE_SUP_CONFIRM, SOUND_TYPE_MEDIA, 200, NULL);
 }
 
 /**