tizen 2.3 release tizen_2.3 submit/tizen_2.3/20150202.064922 tizen_2.3_release
authorjk7744.park <jk7744.park@samsung.com>
Sun, 1 Feb 2015 05:00:39 +0000 (14:00 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Sun, 1 Feb 2015 05:00:39 +0000 (14:00 +0900)
20 files changed:
COPYING
access_output_tts/Makefile.am [moved from wearable/access_output_tts/Makefile.am with 100% similarity]
access_output_tts/autogen.sh [moved from wearable/access_output_tts/autogen.sh with 100% similarity]
access_output_tts/configure.ac [moved from wearable/access_output_tts/configure.ac with 94% similarity, mode: 0644]
access_output_tts/sounds/End_of_List.ogg [new file with mode: 0644]
access_output_tts/sounds/Focus.ogg [new file with mode: 0644]
access_output_tts/sounds/List_scroll.ogg [new file with mode: 0755]
access_output_tts/sounds/file.list [new file with mode: 0644]
access_output_tts/src/Makefile.am [moved from wearable/access_output_tts/src/Makefile.am with 56% similarity]
access_output_tts/src/mod.c [moved from wearable/access_output_tts/src/mod.c with 81% similarity]
edje_feedback/Makefile.am [new file with mode: 0755]
edje_feedback/autogen.sh [moved from mobile/access_output_tts/autogen.sh with 99% similarity]
edje_feedback/configure.ac [new file with mode: 0644]
edje_feedback/edje_feedback.manifest [new file with mode: 0644]
edje_feedback/feedback.c [new file with mode: 0644]
mobile/access_output_tts/Makefile.am [deleted file]
mobile/access_output_tts/configure.ac [deleted file]
mobile/access_output_tts/src/Makefile.am [deleted file]
mobile/access_output_tts/src/mod.c [deleted file]
packaging/elm-modules.spec

diff --git a/COPYING b/COPYING
index 39688ee..e83c962 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -1,6 +1,6 @@
 Copyright notice for Elementary:
 
-Copyright (C) 2008-2011 Carsten Haitzler and various contributors (see AUTHORS)
+Copyright (C) 2008-2014 Carsten Haitzler and various contributors (see AUTHORS)
 
 This library is free software; you can redistribute it and/or modify it
 under the terms of the GNU Lesser General Public License as published by the
old mode 100755 (executable)
new mode 100644 (file)
similarity index 94%
rename from wearable/access_output_tts/configure.ac
rename to access_output_tts/configure.ac
index 637ea54..d52a62f
@@ -20,7 +20,7 @@ AC_C_CONST
 # checks for pkg-config
 PKG_PROG_PKG_CONFIG
 
-requirements="elementary, dlog"
+requirements="elementary, dlog, mm-keysound, vconf"
 
 PKG_CHECK_MODULES(ACCESS_OUTPUT, [${requirements}])
 
diff --git a/access_output_tts/sounds/End_of_List.ogg b/access_output_tts/sounds/End_of_List.ogg
new file mode 100644 (file)
index 0000000..3777683
Binary files /dev/null and b/access_output_tts/sounds/End_of_List.ogg differ
diff --git a/access_output_tts/sounds/Focus.ogg b/access_output_tts/sounds/Focus.ogg
new file mode 100644 (file)
index 0000000..aec6d44
Binary files /dev/null and b/access_output_tts/sounds/Focus.ogg differ
diff --git a/access_output_tts/sounds/List_scroll.ogg b/access_output_tts/sounds/List_scroll.ogg
new file mode 100755 (executable)
index 0000000..c40fd6a
Binary files /dev/null and b/access_output_tts/sounds/List_scroll.ogg differ
diff --git a/access_output_tts/sounds/file.list b/access_output_tts/sounds/file.list
new file mode 100644 (file)
index 0000000..d2bf935
--- /dev/null
@@ -0,0 +1,4 @@
+# File to install here
+
+access_output_tts_sound_files =\
+       $(access_output_tts_sounds_dir)/*.ogg
similarity index 56%
rename from wearable/access_output_tts/src/Makefile.am
rename to access_output_tts/src/Makefile.am
index 201736f..807d629 100644 (file)
@@ -3,12 +3,21 @@ MAINTAINERCLEANFILES = Makefile.in
 pkgdir = $(libdir)/elementary/modules/access_output_tts/$(MODULE_ARCH)
 pkg_LTLIBRARIES = module.la
 
+access_output_tts_sounds_dir = ../sounds
+include ../sounds/file.list
+
+sounddir = $(pkgdir)/sounds/
+sound_DATA = ${access_output_tts_sound_files}
+
 module_la_SOURCES = mod.c
 
 module_la_CPPFLAGS = \
 -I. \
+-DACCESS_OUTPUT_TTS_SOUND_DIR="\"$(sounddir)\"" \
 @ACCESS_OUTPUT_CFLAGS@
 
-module_la_LIBADD = -ltts
+module_la_LIBADD = -ltts \
+@ACCESS_OUTPUT_LIBS@
+
 module_la_LDFLAGS = -no-undefined -module -avoid-version
 module_la_LIBTOOLFLAGS = --tag=disable-static
similarity index 81%
rename from wearable/access_output_tts/src/mod.c
rename to access_output_tts/src/mod.c
index 7c12cc8..ce9eace 100644 (file)
@@ -1,11 +1,13 @@
 #include <Elementary.h>
 #include <tts.h>
 #include <dlog.h>
+#include <mm_sound_private.h>
+#include <vconf.h>
 
 #undef LOG_TAG
 #define LOG_TAG "access-output-tts"
 
-#define TEXT_CUT_SIZE 1000
+#define TEXT_CUT_SIZE 300
 
 /* to enable this module
 export ELM_MODULES="access_output_tts>access/api"
@@ -17,6 +19,10 @@ static void *cb_data;
 static tts_h tts;
 static Eina_Strbuf *buf = NULL;
 
+const char* FOCUS_SOUND_FILE = ACCESS_OUTPUT_TTS_SOUND_DIR "Focus.ogg";
+const char* END_OF_LIST_SOUND_FILE = ACCESS_OUTPUT_TTS_SOUND_DIR "End_of_List.ogg";
+const char* LIST_SCROLL_SOUND_FILE = ACCESS_OUTPUT_TTS_SOUND_DIR "List_scroll.ogg";
+
 static void _text_keep(const char *txt)
 {
    if (!buf) return;
@@ -28,6 +34,14 @@ static Eina_Bool _text_add(const char *txt)
 {
    int ret = 0;
    int u_id = 0;
+   int lcd_val = 0;
+
+   vconf_get_int(VCONFKEY_PM_STATE, &lcd_val);
+   if (lcd_val == VCONFKEY_PM_STATE_LCDOFF)
+   {
+      fprintf(stderr, "lcd state off (%d)\n", lcd_val);
+      return EINA_TRUE;
+   }
 
    if (strlen(txt) < TEXT_CUT_SIZE)
      {
@@ -36,14 +50,14 @@ static Eina_Bool _text_add(const char *txt)
      }
    else
      {
-        char tmp[TEXT_CUT_SIZE];
+        char tmp[TEXT_CUT_SIZE + 2];
         int i, p = 0;
 
         while (strlen(&txt[p]) > TEXT_CUT_SIZE)
           {
              strncpy(tmp, &txt[p], TEXT_CUT_SIZE);
 
-             for (i = TEXT_CUT_SIZE; i > 0 ; i--)
+             for (i = 1; i < TEXT_CUT_SIZE ; i++)
                {
                   if (tmp[i] == ' ' &&
                       (tmp[i - 1] == '?' ||
@@ -84,11 +98,11 @@ void _tts_state_changed_cb(tts_h tts, tts_state_e previous, tts_state_e current,
      {
         char *txt;
 
-        if (!buf) return EINA_FALSE;
+        if (!buf) return;
         if (!eina_strbuf_length_get(buf)) return;
 
         txt = eina_strbuf_string_steal(buf);
-        if (txt && strlen(txt) == 0) return;
+        if (!txt || strlen(txt) == 0) return;
 
         if (_text_add(txt) == EINA_FALSE) return;
 
@@ -253,10 +267,39 @@ out_cancel(void)
 EAPI void
 out_done_callback_set(void (*func) (void *data), const void *data)
 {
-   if (data && cb_data && (data != cb_data)) return;
+   /* data and cb_data could be NULL */
+   if (!func && (data != cb_data)) return;
    cb_func = func;
    cb_data = (void *)data;
 }
+
+EAPI void
+sound_play(const Elm_Access_Sound_Type type)
+{
+   const char *file_name;
+
+   file_name = NULL;
+   switch (type)
+     {
+      case ELM_ACCESS_SOUND_HIGHLIGHT:
+        file_name = FOCUS_SOUND_FILE;
+        break;
+
+      case ELM_ACCESS_SOUND_SCROLL:
+        file_name = LIST_SCROLL_SOUND_FILE;
+        break;
+
+      case ELM_ACCESS_SOUND_END:
+        file_name = END_OF_LIST_SOUND_FILE;
+        break;
+
+      default:
+        break;
+     }
+
+   if (file_name)
+     mm_sound_play_keysound(file_name, VOLUME_TYPE_SYSTEM & VOLUME_GAIN_TOUCH);
+}
 /*
  * unused api
  */
diff --git a/edje_feedback/Makefile.am b/edje_feedback/Makefile.am
new file mode 100755 (executable)
index 0000000..f1955a0
--- /dev/null
@@ -0,0 +1,16 @@
+MAINTAINERCLEANFILES = aclocal.m4 compile config.sub config.guess config.h.in \
+                      configure depcomp install-sh ltmain.sh Makefile.in missing
+
+pkgdir = $(libdir)/edje/modules/feedback/$(MODULE_ARCH)
+pkg_LTLIBRARIES = module.la
+
+module_la_SOURCES = feedback.c
+
+module_la_CPPFLAGS = \
+@EDJE_FEEDBACK_CFLAGS@
+
+module_la_LIBADD = -leina -ledje -lfeedback \
+@EDJE_FEEDBACK_LIBS@
+
+module_la_LDFLAGS = -no-undefined -module -avoid-version
+module_la_LIBTOOLFLAGS = --tag=disable-static
similarity index 99%
rename from mobile/access_output_tts/autogen.sh
rename to edje_feedback/autogen.sh
index 5a30991..ed8e623 100755 (executable)
@@ -7,4 +7,3 @@ autoconf
 libtoolize --copy --force
 autoheader
 automake --foreign --add-missing --copy
-
diff --git a/edje_feedback/configure.ac b/edje_feedback/configure.ac
new file mode 100644 (file)
index 0000000..5e05822
--- /dev/null
@@ -0,0 +1,32 @@
+# initialization
+AC_INIT([edje-modules-feedback], [1.0.0], [BUG-REPORT-ADDRESS])
+AM_INIT_AUTOMAKE([-Wall foreign])
+
+# Checks for programs.
+AC_PROG_CC
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+#AC_PROG_INSTALL
+
+# checks for header files
+AC_HEADER_STDC
+
+# checks for typedefs, structures, and compiler characteristics
+AC_C_CONST
+
+# checks for pkg-config
+PKG_PROG_PKG_CONFIG
+
+requirements="eina, edje, feedback"
+
+PKG_CHECK_MODULES(EDJE_FEEDBACK, [${requirements}])
+
+# Check host system
+VERSION=1.0.0
+MODULE_ARCH="$host_os-$host_cpu-$VERSION"
+AC_SUBST(MODULE_ARCH)
+AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
+
+# Generate files
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/edje_feedback/edje_feedback.manifest b/edje_feedback/edje_feedback.manifest
new file mode 100644 (file)
index 0000000..97e8c31
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_"/>
+       </request>
+</manifest>
diff --git a/edje_feedback/feedback.c b/edje_feedback/feedback.c
new file mode 100644 (file)
index 0000000..2968e14
--- /dev/null
@@ -0,0 +1,109 @@
+#include <eina_module.h>
+#include <Edje.h>
+#include <feedback.h>
+
+static int _edje_feedback_log_dom = -1;
+static int _init_count = 0;
+static Eina_Bool _init_feedback = EINA_FALSE;
+
+#define CRITICAL(...) EINA_LOG_DOM_CRIT(_edje_feedback_log_dom, __VA_ARGS__)
+#define ERR(...)      EINA_LOG_DOM_ERR(_edje_feedback_log_dom, __VA_ARGS__)
+#define WRN(...)      EINA_LOG_DOM_WARN(_edje_feedback_log_dom, __VA_ARGS__)
+#define INF(...)      EINA_LOG_DOM_INFO(_edje_feedback_log_dom, __VA_ARGS__)
+#define DBG(...)      EINA_LOG_DOM_DBG(_edje_feedback_log_dom, __VA_ARGS__)
+
+#define ERR_GOTO(label, fmt, args...)\
+   do { \
+        ERR(fmt"\n", ##args); \
+        goto label; \
+   } while (0)
+
+#define ERR_RET_VAL(ret, fmt, args...)\
+   do { \
+        ERR(fmt"\n", ##args); \
+        return ret; \
+   } while (0)
+
+#define ERR_RET(fmt, args...)\
+   do { \
+        ERR(fmt"\n", ##args); \
+        return; \
+   } while (0)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EAPI Eina_Bool
+edje_plugin_run(Evas_Object *edje,
+                const char *name,
+                const char *param)
+{
+   if (!edje) return EINA_FALSE;
+   if (!name) return EINA_FALSE;
+
+   if (!_init_feedback)
+     {
+        feedback_initialize();
+        _init_feedback = EINA_TRUE;
+     }
+
+   unsigned int cnt;
+   char **tok;
+   tok = eina_str_split_full(param, " ", 0, &cnt);
+   if (tok && (cnt == 2) && tok[0] && tok[1])
+     {
+        feedback_error_e err;
+        err = feedback_play_type_by_name(tok[0], tok[1]);
+
+        if (tok[0]) free(tok[0]);
+        free(tok);
+
+        if (err != FEEDBACK_ERROR_NONE)
+          {
+             WRN("feedback_play_type() failed: %d", err);
+             return EINA_FALSE;
+          }
+        return EINA_TRUE;
+     }
+   return EINA_FALSE;
+}
+
+Eina_Bool
+_module_init(void)
+{
+   _init_count++;
+   if (_init_count == 1)
+     {
+        _edje_feedback_log_dom = eina_log_domain_register("elm_feedback",
+                                                          EINA_COLOR_LIGHTBLUE);
+        if (!_edje_feedback_log_dom)
+          {
+             EINA_LOG_ERR("could not register elm_feedback log domain.");
+             _edje_feedback_log_dom = EINA_LOG_DOMAIN_GLOBAL;
+          }
+     }
+   return EINA_TRUE;
+}
+
+void
+_module_shutdown(void)
+{
+   _init_count--;
+   if (_init_count == 0)
+     {
+        eina_log_domain_unregister(_edje_feedback_log_dom);
+        _edje_feedback_log_dom = -1;
+        if (_init_feedback)
+          {
+             feedback_deinitialize();
+             _init_feedback = EINA_FALSE;
+          }
+     }
+}
+
+EINA_MODULE_INIT(_module_init);
+EINA_MODULE_SHUTDOWN(_module_shutdown);
+#ifdef __cplusplus
+}
+#endif
diff --git a/mobile/access_output_tts/Makefile.am b/mobile/access_output_tts/Makefile.am
deleted file mode 100755 (executable)
index 2865a04..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-# maintainer-clean removes everything
-MAINTAINERCLEANFILES = aclocal.m4 compile config.sub config.guess config.h.in \
-                      configure depcomp install-sh ltmain.sh Makefile.in missing
-
-SUBDIRS = src
-
-uninstall:
-       rm -rf $(DESTDIR)$(datadir)
-
-
diff --git a/mobile/access_output_tts/configure.ac b/mobile/access_output_tts/configure.ac
deleted file mode 100755 (executable)
index f428461..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-# initialization
-AC_INIT([elm-modules-access-output-tts], [0.1], [cinoo.kim@samsung.com])
-AM_INIT_AUTOMAKE([-Wall foreign])
-
-# checks for programs
-AC_PROG_CC
-AC_DISABLE_STATIC
-AC_PROG_LIBTOOL
-
-# checks for libraries
-
-# checks for header files
-AC_HEADER_STDC
-
-# checks for typedefs, structures, and compiler characteristics
-AC_C_CONST
-
-# checks for library functions
-
-# checks for pkg-config
-PKG_PROG_PKG_CONFIG
-
-requirements="elementary"
-
-PKG_CHECK_MODULES(ACCESS_OUTPUT, [${requirements}])
-
-# Check host system
-ELEMENTARY_VERSION=`$PKG_CONFIG --modversion elementary | awk -F . '{printf("%s.%s.%s",$1,$2,$3);}'`
-MODULE_ARCH="$host_os-$host_cpu-$ELEMENTARY_VERSION"
-AC_SUBST(MODULE_ARCH)
-AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
-
-# Generate files
-AC_CONFIG_FILES([
-                Makefile
-                src/Makefile
-                ])
-
-AC_OUTPUT
-
diff --git a/mobile/access_output_tts/src/Makefile.am b/mobile/access_output_tts/src/Makefile.am
deleted file mode 100644 (file)
index 201736f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-pkgdir = $(libdir)/elementary/modules/access_output_tts/$(MODULE_ARCH)
-pkg_LTLIBRARIES = module.la
-
-module_la_SOURCES = mod.c
-
-module_la_CPPFLAGS = \
--I. \
-@ACCESS_OUTPUT_CFLAGS@
-
-module_la_LIBADD = -ltts
-module_la_LDFLAGS = -no-undefined -module -avoid-version
-module_la_LIBTOOLFLAGS = --tag=disable-static
diff --git a/mobile/access_output_tts/src/mod.c b/mobile/access_output_tts/src/mod.c
deleted file mode 100644 (file)
index 49abd57..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * elm-modules
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
- *
- * 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.
- */
-#include <Elementary.h>
-#include <tts.h>
-
-/* to enable this module
-export ELM_MODULES="access_output_tts>access/api"
-export ELM_ACCESS_MODE=1
- */
-
-static void (*cb_func) (void *data);
-static void *cb_data;
-static tts_h tts;
-static Eina_Strbuf *buf = NULL;
-
-static void _text_keep(const char *txt)
-{
-   if (!buf) return;
-   if (eina_strbuf_length_get(buf) > 0) eina_strbuf_append(buf, ", ");
-   eina_strbuf_append(buf, txt);
-}
-
-static void _text_add()
-{
-   int ret = 0;
-   int u_id = 0;
-   char *txt;
-
-   if (!buf) return;
-   if (!eina_strbuf_length_get(buf)) return;;
-
-   txt = eina_strbuf_string_steal(buf);
-   ret = tts_add_text(tts, txt, NULL, TTS_VOICE_TYPE_AUTO,
-                      TTS_SPEED_AUTO, &u_id);
-   if (TTS_ERROR_NONE != ret)
-     {
-        fprintf(stderr, "Fail to add kept text : ret(%d)\n", ret);
-     }
-}
-
-void _tts_state_changed_cb(tts_h tts, tts_state_e previous, tts_state_e current, void* data)
-{
-   int ret = 0;
-
-   if (TTS_STATE_CREATED == previous && TTS_STATE_READY == current)
-     {
-        _text_add();
-
-        ret = tts_play(tts);
-        if (TTS_ERROR_NONE != ret)
-          {
-             fprintf(stderr, "Fail to play TTS : ret(%d)\n", ret);
-          }
-     }
-}
-
-void utterance_completed_callback(tts_h tts, int utt_id, void* user_data)
-{
-   if (cb_func) cb_func(cb_data);
-}
-
-EAPI int
-elm_modapi_init(void *m )
-{
-   int ret = 0;
-
-   if (tts)
-     {
-        tts_state_e state;
-        tts_get_state(tts, &state);
-
-        if (state == TTS_STATE_CREATED) goto prepare;
-
-        if (state == TTS_STATE_READY ||
-            state == TTS_STATE_PLAYING ||
-            state == TTS_STATE_PAUSED)
-          return 0;
-     }
-
-   ret = tts_create(&tts);
-   if (TTS_ERROR_NONE != ret)
-     {
-        fprintf(stderr, "Fail to get handle : result(%d)", ret);
-        return ret;
-     }
-
-   ret = tts_set_state_changed_cb(tts, _tts_state_changed_cb, NULL);
-   if (TTS_ERROR_NONE != ret)
-     {
-        fprintf(stderr, "Fail to set callback : result(%d)", ret);
-        return ret;
-     }
-
-   ret = tts_set_mode(tts, TTS_MODE_SCREEN_READER);
-   if (TTS_ERROR_NONE != ret)
-     {
-        fprintf(stderr, "Fail to set mode : result(%d)", ret);
-        return ret;
-     }
-
- prepare:
-   ret = tts_set_utterance_completed_cb(tts, utterance_completed_callback, NULL);
-   if (TTS_ERROR_NONE != ret)
-     {
-        fprintf(stderr, "Fail to register utterance completed callback function : result(%d)", ret);
-        return ret;
-     }
-
-   ret = tts_prepare(tts);
-   if (TTS_ERROR_NONE != ret)
-     {
-        fprintf(stderr, "Fail to prepare handle : result(%d)", ret);
-        return ret;
-     }
-
-   buf = eina_strbuf_new();
-
-   return 1;
-}
-
-EAPI int
-elm_modapi_shutdown(void *m )
-{
-   int ret = 0;
-   if (tts)
-     {
-        /* check current state */
-        tts_state_e state;
-        tts_get_state(tts, &state);
-        if (state == TTS_STATE_PLAYING || state == TTS_STATE_PAUSED)
-          {
-             ret = tts_stop(tts);
-             if (TTS_ERROR_NONE != ret)
-               {
-                  fprintf(stderr, "Fail to stop handle : result(%d)", ret);
-                  return ret;
-               }
-          }
-
-        ret = tts_unprepare(tts);
-        if (TTS_ERROR_NONE != ret)
-          {
-             fprintf(stderr, "Fail to unprepare handle : result(%d)", ret);
-             return ret;
-          }
-
-        ret = tts_destroy(tts);
-        if (TTS_ERROR_NONE != ret)
-          {
-             fprintf(stderr, "Fail to destroy handle : result(%d)", ret);
-             return ret;
-          }
-
-        if (buf)
-          {
-             eina_strbuf_free(buf);
-             buf = NULL;
-          }
-     }
-   return 1;
-}
-
-EAPI void
-out_read(const char *txt)
-{
-   int ret = 0;
-   int u_id = 0;
-
-   tts_state_e state;
-   tts_get_state(tts, &state);
-   if (state != TTS_STATE_PLAYING &&
-       state != TTS_STATE_PAUSED &&
-       state != TTS_STATE_READY)
-     {
-        if (txt) _text_keep(txt);
-        return;
-     }
-
-   ret = tts_add_text(tts, txt, NULL, TTS_VOICE_TYPE_AUTO,
-                      TTS_SPEED_AUTO, &u_id);
-   if (TTS_ERROR_NONE != ret)
-     {
-        fprintf(stderr, "Fail to add text : %s ret(%d)\n", txt, ret);
-     }
-
-   /* check current state */
-   tts_get_state(tts, &state);
-   if (state == TTS_STATE_PLAYING) return;
-
-   ret = tts_play(tts);
-   if (TTS_ERROR_NONE != ret)
-     {
-        fprintf(stderr, "Fail to play TTS : ret(%d)\n", ret);
-     }
-   return;
-}
-
-
-EAPI void
-out_cancel(void)
-{
-   int ret = 0;
-   if (tts)
-     {
-        /* check current state */
-        tts_state_e state;
-
-        tts_get_state(tts, &state);
-        if (state != TTS_STATE_PLAYING && state != TTS_STATE_PAUSED)
-          {
-             if (buf && (eina_strbuf_length_get(buf) > 0))
-               eina_strbuf_string_free(buf);
-             return;
-          }
-
-         ret = tts_stop(tts);
-         if (TTS_ERROR_NONE != ret)
-           {
-             fprintf(stderr, "Fail to stop TTS : result(%d)", ret);
-           }
-     }
-   return;
-}
-
-EAPI void
-out_done_callback_set(void (*func) (void *data), const void *data)
-{
-   cb_func = func;
-   cb_data = (void *)data;
-}
-/*
- * unused api
- */
-
-#if 0
-EAPI void
-out_read_done(void)
-{
-}
-#endif
index 5a72acd..d40e2e7 100644 (file)
@@ -1,49 +1,56 @@
 Name:       elm-modules
 Summary:    The Elementary Modules
-Version:    0.1.11b01
+Version:    0.1.25
 Release:    1
 Group:      System/Libraries
-License:    APLv2
+License:    LGPLv2.1+
+URL:        http://www.tizen.org
 Source0:    %{name}-%{version}.tar.gz
-BuildRequires: elementary-devel
-BuildRequires: tts-devel
+BuildRequires: elementary-devel, eina-devel, edje-devel
+BuildRequires: tts-devel, libfeedback-devel
+BuildRequires: pkgconfig(mm-keysound)
+BuildRequires: pkgconfig(vconf)
 
 %description
-The Eelementary Modules
+The Elementary Modules
 
 %prep
 %setup -q
 
 %build
+export CFLAGS+=" -fvisibility=hidden -fPIC -Wall"
+export LDFLAGS+=" -fvisibility=hidden -Wl,--hash-style=both -Wl,--as-needed -Wl,-z,defs"
 
-%define DEF_SUBDIRS access_output_tts
-
-export CFLAGS+=" -Wall -g -fPIC -rdynamic"
-export LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -Wl,--rpath=/usr/lib"
-
-%ifarch %{arm}
-export CFLAGS+=" -D_ENV_ARM"
-%endif
-
+%define DEF_SUBDIRS access_output_tts edje_feedback
 for FILE in %{DEF_SUBDIRS}
 do
-        (cd %{_repository} && cd $FILE && ./autogen.sh && ./configure --prefix=/usr && make )
+    cd $FILE
+    if [ -f autogen.sh ]
+    then
+        ./autogen.sh && ./configure --prefix=/usr && make
+    else
+        make
+    fi
+    cd ..
 done
 
 %install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}/usr/share/license
-cp %{_builddir}/%{buildsubdir}/COPYING %{buildroot}/usr/share/license/%{name}
+mkdir -p %{buildroot}/%{_datadir}/license
+cp %{_builddir}/%{buildsubdir}/COPYING %{buildroot}/%{_datadir}/license/%{name}
 
 for FILE in %{DEF_SUBDIRS}
 do
-        (cd %{_repository} && cd $FILE && make install DESTDIR=%{buildroot} )
+        (cd $FILE && PREFIX=%{buildroot}/usr make install DESTDIR=%{buildroot})
 done
 
 %files
 %defattr(-,root,root,-)
-/usr/lib/elementary/modules/*/*/*.so
+%{_libdir}/elementary/modules/*/*/*.so
+%{_libdir}/elementary/modules/*/*/sounds/*
+%{_libdir}/edje/modules/*/*/*.so
+%{_datadir}/license/%{name}
 %manifest %{name}.manifest
-/usr/share/license/%{name}
-
+## Below is not needed except Machintosh
 %exclude /usr/lib/elementary/modules/*/*/*.la
+%exclude /usr/lib/edje/modules/*/*/*.la
+