backends: change default animation names following default naming rule 78/220678/1
authorjeon <jhyuni.kang@samsung.com>
Mon, 2 Sep 2019 11:00:59 +0000 (20:00 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Fri, 20 Dec 2019 07:22:27 +0000 (16:22 +0900)
Change-Id: I1f6e8a1f72341cc4f7897551d84f05b352dfb577

36 files changed:
backends/Makefile.am
backends/bt/default_ani_connected.c [moved from backends/default_ani_connected.c with 99% similarity]
backends/bt/default_ani_pairing.c [moved from backends/default_ani_pairing.c with 99% similarity]
backends/default_backend.c
backends/notification/default_ani_alarm.c [moved from backends/default_ani_alarm.c with 99% similarity]
backends/notification/default_ani_emergency.c [moved from backends/default_ani_emergency.c with 99% similarity]
backends/notification/default_ani_error.c [moved from backends/default_ani_error.c with 99% similarity]
backends/notification/default_ani_networkerror.c [moved from backends/default_ani_networkerror.c with 99% similarity]
backends/notification/default_ani_normal.c [moved from backends/default_ani_normal.c with 99% similarity]
backends/res/bt/connected.json [moved from backends/res/connected.json with 95% similarity]
backends/res/bt/pairing.json [moved from backends/res/pairing.json with 98% similarity]
backends/res/notification/alarm.json [moved from backends/res/alarm.json with 98% similarity]
backends/res/notification/emergency.json [moved from backends/res/emergency.json with 96% similarity]
backends/res/notification/error.json [moved from backends/res/error.json with 94% similarity]
backends/res/notification/network_error.json [moved from backends/res/network_error.json with 92% similarity]
backends/res/notification/normal.json [moved from backends/res/normal.json with 97% similarity]
backends/res/system/easy_setup.json [moved from backends/res/easy_setup.json with 96% similarity]
backends/res/system/mic_off.json [moved from backends/res/mic_off.json with 94% similarity]
backends/res/system/processing.json [moved from backends/res/system_processing.json with 94% similarity]
backends/res/system/sw_update_done.json [moved from backends/res/sw_update_done.json with 97% similarity]
backends/res/voice/listening.json [moved from backends/res/listening.json with 97% similarity]
backends/res/voice/processing.json [moved from backends/res/processing.json with 94% similarity]
backends/res/voice/speaking.json [moved from backends/res/speaking.json with 97% similarity]
backends/res/voice/streaming.json [moved from backends/res/streaming.json with 97% similarity]
backends/res/voice/timeout.json [moved from backends/res/timeout.json with 98% similarity]
backends/system/default_ani_easysetup.c [moved from backends/default_ani_easysetup.c with 99% similarity]
backends/system/default_ani_micoff.c [moved from backends/default_ani_micoff.c with 99% similarity]
backends/system/default_ani_swupdatedone.c [moved from backends/default_ani_swupdatedone.c with 99% similarity]
backends/system/default_ani_system_processing.c [moved from backends/default_ani_system_processing.c with 99% similarity]
backends/voice/default_ani_listening.c [moved from backends/default_ani_listening.c with 99% similarity]
backends/voice/default_ani_processing.c [moved from backends/default_ani_processing.c with 99% similarity]
backends/voice/default_ani_speaking.c [moved from backends/default_ani_speaking.c with 99% similarity]
backends/voice/default_ani_streaming.c [moved from backends/default_ani_streaming.c with 99% similarity]
backends/voice/default_ani_timeout.c [moved from backends/default_ani_timeout.c with 99% similarity]
packaging/libpui.spec
samples/PUI_sample.c

index 90e0484..9f93b49 100644 (file)
@@ -14,19 +14,19 @@ libpui_default_backend_la_LIBADD = $(DEFAULT_BACKEND_LIBS)
 
 libpui_default_backend_la_SOURCES = \
         default_backend.c \
-        default_ani_listening.c \
-        default_ani_speaking.c \
-        default_ani_processing.c \
-        default_ani_streaming.c \
-        default_ani_timeout.c \
-        default_ani_emergency.c \
-        default_ani_system_processing.c \
-        default_ani_normal.c \
-        default_ani_easysetup.c \
-        default_ani_swupdatedone.c \
-        default_ani_micoff.c \
-        default_ani_networkerror.c \
-        default_ani_error.c \
-        default_ani_alarm.c \
-        default_ani_pairing.c \
-        default_ani_connected.c
+        system/default_ani_easysetup.c \
+        system/default_ani_system_processing.c \
+        system/default_ani_swupdatedone.c \
+        system/default_ani_micoff.c \
+        voice/default_ani_listening.c \
+        voice/default_ani_streaming.c \
+        voice/default_ani_processing.c \
+        voice/default_ani_speaking.c \
+        voice/default_ani_timeout.c \
+        notification/default_ani_normal.c \
+        notification/default_ani_emergency.c \
+        notification/default_ani_networkerror.c \
+        notification/default_ani_error.c \
+        notification/default_ani_alarm.c \
+        bt/default_ani_pairing.c \
+        bt/default_ani_connected.c
similarity index 99%
rename from backends/default_ani_connected.c
rename to backends/bt/default_ani_connected.c
index fcba3ad..ccc9bd1 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_connected_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 99%
rename from backends/default_ani_pairing.c
rename to backends/bt/default_ani_pairing.c
index 5f4f626..3e59bc7 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_pairing_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
index afba9fc..d4015ff 100644 (file)
@@ -303,16 +303,46 @@ error:
        return NULL;
 }
 
-static int
-_scandir_filter(const struct dirent *dirent)
+int
+_find_directory(const char *path, Eina_List **json_list)
 {
-       if (!strncmp(dirent->d_name, ".", sizeof(".")) ||
-               !strncmp(dirent->d_name, "..", sizeof("..")))
-               return 0;
-       if (!strstr(dirent->d_name, ".json"))
-               return 0;
+       DIR *dir;
+       struct dirent *cur;
+       int count = 0, ret_cnt = 0;
+
+       dir = opendir(path);
+       if (!dir)
+       {
+               pui_err("Failed to open %s.\n", path);
+               return count;
+       }
+
+       while ((cur = readdir(dir)) != NULL)
+       {
+               char next_path[MAX_STR] = {0, };
+               if (cur->d_type == DT_DIR)
+               {
+                       if (!strncmp(cur->d_name, ".", sizeof(".")) ||
+                               !strncmp(cur->d_name, "..", sizeof("..")))
+                               continue;
+
+                       snprintf(next_path, MAX_STR, "%s/%s", path, cur->d_name);
+                       ret_cnt = _find_directory(next_path, json_list);
+                       count += ret_cnt;
+               }
+               else
+               {
+                       if (strstr(cur->d_name, ".json"))
+                       {
+                               snprintf(next_path, MAX_STR, "%s/%s", path, cur->d_name);
+                               *json_list = eina_list_append(*json_list, eina_stringshare_add(next_path));
+                               count++;
+                       }
+               }
+       }
+       closedir(dir);
 
-       return 1;
+       return count;
 }
 
 
@@ -321,33 +351,25 @@ _create_ani_collection(void)
 {
        pui_int_error e = PUI_INT_ERROR_NONE;
        default_ani_info *ani_info;
-       struct dirent **files;
-       int count, i;
-       char file_path[MAX_STR] = {0, };
+       Eina_List *json_list = NULL;
+       Eina_List *l, *l_next;
+       Eina_Stringshare *path;
 
        // load and store all of animation data
 
-       if ((count = scandir(ANI_COLLECTION_DIR, &files, _scandir_filter, alphasort)) == -1) {
-               printf("Failed to get %s directory (%s)\n", ANI_COLLECTION_DIR, strerror(errno));
-               e = PUI_INT_ERROR_INVALID_RESOURCES;
-               return e;
-       }
-
-       for (i = 0; i < count; i++) {
-               snprintf(file_path, sizeof(file_path), "%s%s", ANI_COLLECTION_DIR, files[i]->d_name);
+       _find_directory(ANI_COLLECTION_DIR, &json_list);
 
-               ani_info = _read_json(file_path);
+       EINA_LIST_FOREACH_SAFE(json_list, l, l_next, path)
+       {
+               ani_info = _read_json(path);
                if (ani_info) {
                        eina_hash_add(_animations_hash, ani_info->id, ani_info);
-                       printf("Success to load %s animation\n", files[i]->d_name);
+                       pui_info("Success to load %s animation (id: %s)\n", path, ani_info->id);
                }
+               eina_stringshare_del(path);
+               json_list = eina_list_remove_list(json_list, l);
        }
 
-       for (i = 0; i < count; i++) {
-               free(files[i]);
-       }
-       free(files);
-
        //TODO
 
        return e;
@@ -439,69 +461,69 @@ _ani_create(pui_id id)
        }
 
        /* Assign each function pointer that corresponds to the given id if needed. */
-       if (!strncmp(ani_info->id, "processing", sizeof("processing")))
+       if (!strncmp(ani_info->id, "system/easy_setup", sizeof("system/easy_setup")))
        {
-               pui_default_backend_ani_processing_func_set(ani_func);
+               pui_default_backend_ani_easysetup_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "listening", sizeof("listening")))
+       else if (!strncmp(ani_info->id, "system/processing", sizeof("system/processing")))
        {
-               pui_default_backend_ani_listening_func_set(ani_func);
+               pui_default_backend_ani_system_processing_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "speaking", sizeof("speaking")))
+       else if (!strncmp(ani_info->id, "system/sw_update_done", sizeof("system/sw_update_done")))
        {
-               pui_default_backend_ani_speaking_func_set(ani_func);
+               pui_default_backend_ani_swupdatedone_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "streaming", sizeof("streaming")))
+       else if (!strncmp(ani_info->id, "system/mic_off", sizeof("system/mic_off")))
        {
-               pui_default_backend_ani_streaming_func_set(ani_func);
+               pui_default_backend_ani_micoff_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "time_out", sizeof("time_out")))
+       else if (!strncmp(ani_info->id, "voice/listening", sizeof("voice/listening")))
        {
-               pui_default_backend_ani_timeout_func_set(ani_func);
+               pui_default_backend_ani_listening_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "system_processing", sizeof("system_processing")))
+       else if (!strncmp(ani_info->id, "voice/streaming", sizeof("voice/streaming")))
        {
-               pui_default_backend_ani_system_processing_func_set(ani_func);
+               pui_default_backend_ani_streaming_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "normal", sizeof("normal")))
+       else if (!strncmp(ani_info->id, "voice/processing", sizeof("voice/processing")))
        {
-               pui_default_backend_ani_normal_func_set(ani_func);
+               pui_default_backend_ani_processing_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "emergency", sizeof("emergency")))
+       else if (!strncmp(ani_info->id, "voice/speaking", sizeof("voice/speaking")))
        {
-               pui_default_backend_ani_emergency_func_set(ani_func);
+               pui_default_backend_ani_speaking_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "easy_setup", sizeof("easy_setup")))
+       else if (!strncmp(ani_info->id, "voice/timeout", sizeof("voice/timeout")))
        {
-               pui_default_backend_ani_easysetup_func_set(ani_func);
+               pui_default_backend_ani_timeout_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "sw_update_done", sizeof("sw_update_done")))
+       else if (!strncmp(ani_info->id, "notification/normal", sizeof("notification/normal")))
        {
-               pui_default_backend_ani_swupdatedone_func_set(ani_func);
+               pui_default_backend_ani_normal_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "mic_off", sizeof("mic_off")))
+       else if (!strncmp(ani_info->id, "notification/emergency", sizeof("notification/emergency")))
        {
-               pui_default_backend_ani_micoff_func_set(ani_func);
+               pui_default_backend_ani_emergency_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "network_error", sizeof("network_error")))
+       else if (!strncmp(ani_info->id, "notification/network_error", sizeof("notification/network_error")))
        {
                pui_default_backend_ani_networkerror_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "error", sizeof("error")))
+       else if (!strncmp(ani_info->id, "notification/error", sizeof("notification/error")))
        {
                pui_default_backend_ani_error_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "alarm", sizeof("alarm")))
+       else if (!strncmp(ani_info->id, "notification/alarm", sizeof("notification/alarm")))
        {
                pui_default_backend_ani_alarm_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "connected", sizeof("connected")))
+       else if (!strncmp(ani_info->id, "bt/pairing", sizeof("bt/pairing")))
        {
-               pui_default_backend_ani_connected_func_set(ani_func);
+               pui_default_backend_ani_pairing_func_set(ani_func);
        }
-       else if (!strncmp(ani_info->id, "pairing", sizeof("pairing")))
+       else if (!strncmp(ani_info->id, "bt/connected", sizeof("bt/connected")))
        {
-               pui_default_backend_ani_pairing_func_set(ani_func);
+               pui_default_backend_ani_connected_func_set(ani_func);
        }
        else
        {
similarity index 99%
rename from backends/default_ani_alarm.c
rename to backends/notification/default_ani_alarm.c
index 52c6594..7017465 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_alarm_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 99%
rename from backends/default_ani_emergency.c
rename to backends/notification/default_ani_emergency.c
index 67c09a2..b0fad94 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_emergency_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 99%
rename from backends/default_ani_error.c
rename to backends/notification/default_ani_error.c
index 355d30e..9c4f022 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_error_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 99%
rename from backends/default_ani_networkerror.c
rename to backends/notification/default_ani_networkerror.c
index 95a08bc..6295946 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_networkerror_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 99%
rename from backends/default_ani_normal.c
rename to backends/notification/default_ani_normal.c
index bc35973..a96d09e 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_normal_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 95%
rename from backends/res/connected.json
rename to backends/res/bt/connected.json
index 9236ea6..686afa3 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "connected",
+       "type": "bt/connected",
        "interval": 100,
        "frame": [
                {
similarity index 98%
rename from backends/res/pairing.json
rename to backends/res/bt/pairing.json
index 4db2bc6..c9a75bd 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "pairing",
+       "type": "bt/pairing",
        "interval": 500,
        "frame": [
                {
similarity index 98%
rename from backends/res/alarm.json
rename to backends/res/notification/alarm.json
index 75d5ddd..46a15b1 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "alarm",
+       "type": "notification/alarm",
        "interval": 40,
        "frame": [
                {
similarity index 96%
rename from backends/res/emergency.json
rename to backends/res/notification/emergency.json
index e2c393c..8e8046f 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "emergency",
+       "type": "notification/emergency",
        "interval": 30,
        "frame": [
                {
similarity index 94%
rename from backends/res/error.json
rename to backends/res/notification/error.json
index 7170501..f147b72 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "error",
+       "type": "notification/error",
        "interval": 500,
        "frame": [
                {
similarity index 92%
rename from backends/res/network_error.json
rename to backends/res/notification/network_error.json
index 6869777..75304de 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "network_error",
+       "type": "notification/network_error",
        "interval": 100,
        "frame": [
                {
similarity index 97%
rename from backends/res/normal.json
rename to backends/res/notification/normal.json
index ee4aebf..acad93a 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "normal",
+       "type": "notification/normal",
        "interval": 50,
        "frame": [
                {
similarity index 96%
rename from backends/res/easy_setup.json
rename to backends/res/system/easy_setup.json
index f10e41c..72b92f2 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "easy_setup",
+       "type": "system/easy_setup",
        "interval": 30,
        "frame": [
                {
similarity index 94%
rename from backends/res/mic_off.json
rename to backends/res/system/mic_off.json
index 2100636..76faba5 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "mic_off",
+       "type": "system/mic_off",
        "interval": 100,
        "frame": [
                {
similarity index 94%
rename from backends/res/system_processing.json
rename to backends/res/system/processing.json
index a3a037a..540eccf 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "system_processing",
+       "type": "system/processing",
        "interval": 100,
        "frame": [
                {
similarity index 97%
rename from backends/res/sw_update_done.json
rename to backends/res/system/sw_update_done.json
index 3d89f5b..a250ce1 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "sw_update_done",
+       "type": "system/sw_update_done",
        "interval": 30,
        "frame": [
                {
similarity index 97%
rename from backends/res/listening.json
rename to backends/res/voice/listening.json
index e2343ea..f38ad5b 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "listening",
+       "type": "voice/listening",
        "interval": 70,
        "frame": [
                {
similarity index 94%
rename from backends/res/processing.json
rename to backends/res/voice/processing.json
index a402de9..a49e2ee 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "processing",
+       "type": "voice/processing",
        "interval": 100,
        "frame": [
                {
similarity index 97%
rename from backends/res/speaking.json
rename to backends/res/voice/speaking.json
index 0071822..5f514a1 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "speaking",
+       "type": "voice/speaking",
        "interval": 30,
        "frame": [
                {
similarity index 97%
rename from backends/res/streaming.json
rename to backends/res/voice/streaming.json
index c1e87f0..6328c51 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "streaming",
+       "type": "voice/streaming",
        "interval": 30,
        "frame": [
                {
similarity index 98%
rename from backends/res/timeout.json
rename to backends/res/voice/timeout.json
index 4f28a69..fffbe5b 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "type": "time_out",
+       "type": "voice/timeout",
        "interval": 30,
        "frame": [
                {
similarity index 99%
rename from backends/default_ani_easysetup.c
rename to backends/system/default_ani_easysetup.c
index c54ae49..f4b611c 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_easysetup_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 99%
rename from backends/default_ani_micoff.c
rename to backends/system/default_ani_micoff.c
index 0043b4a..8ea4583 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_micoff_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 99%
rename from backends/default_ani_swupdatedone.c
rename to backends/system/default_ani_swupdatedone.c
index 1c77871..139bf13 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_swupdatedone_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 99%
rename from backends/default_ani_system_processing.c
rename to backends/system/default_ani_system_processing.c
index b54e8c0..6778838 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_system_processing_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 99%
rename from backends/default_ani_listening.c
rename to backends/voice/default_ani_listening.c
index 8a83894..2ff9a84 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_listening_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 99%
rename from backends/default_ani_processing.c
rename to backends/voice/default_ani_processing.c
index 628f291..15f4957 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_processing_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 99%
rename from backends/default_ani_speaking.c
rename to backends/voice/default_ani_speaking.c
index b627450..af0bb47 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_speaking_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 99%
rename from backends/default_ani_streaming.c
rename to backends/voice/default_ani_streaming.c
index 46bfaf7..79b5e14 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_streaming_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
similarity index 99%
rename from backends/default_ani_timeout.c
rename to backends/voice/default_ani_timeout.c
index da2bc8d..4c0b4d4 100644 (file)
@@ -23,7 +23,7 @@
  * SOFTWARE.
  */
 
-#include "default_backend.h"
+#include "../default_backend.h"
 
 static void
 _ani_backend_timeout_get_led_rgb(default_frame_info_t *frame, int led_idx, unsigned int *r, unsigned int *g, unsigned int *b)
index 0d393ac..93fc01b 100644 (file)
@@ -66,7 +66,7 @@ make %{?_smp_mflags}
 
 ###### libpui default backend's animation data
 mkdir -p %{buildroot}/%{ANIDATA_DIR}/
-cp -f backends/res/* %{buildroot}/%{ANIDATA_DIR}/
+cp -fr backends/res/* %{buildroot}/%{ANIDATA_DIR}/
 %make_install
 
 %post -n %{name} -p /sbin/ldconfig
index 10f9f95..a6b04d5 100644 (file)
@@ -68,22 +68,22 @@ struct app_data
 
 static Eina_Array *_ecore_event_hdls = NULL;
 static animation_t ani_collection[] = {
-       { "easy_setup", PUI_ANI_CMD_START, -1 },
-       { "system_processing", PUI_ANI_CMD_START, -1 },
-       { "sw_update_done", PUI_ANI_CMD_START, -1 },
-       { "mic_off", PUI_ANI_CMD_START, -1 },
-       { "listening", PUI_ANI_CMD_START, -1 },
-       { "streaming", PUI_ANI_CMD_START, -1 },
-       { "processing", PUI_ANI_CMD_START, -1 },
-       { "speaking", PUI_ANI_CMD_START, -1 },
-       { "time_out", PUI_ANI_CMD_START, -1 },
-       { "normal", PUI_ANI_CMD_START, -1 },
-       { "emergency", PUI_ANI_CMD_START, -1 },
-       { "network_error", PUI_ANI_CMD_START, -1 },
-       { "error", PUI_ANI_CMD_START, -1 },
-       { "alarm", PUI_ANI_CMD_START, -1 },
-       { "pairing", PUI_ANI_CMD_START, -1 },
-       { "connected", PUI_ANI_CMD_START, -1 }
+       { "system/easy_setup", PUI_ANI_CMD_START, -1 },
+       { "system/processing", PUI_ANI_CMD_START, -1 },
+       { "system/sw_update_done", PUI_ANI_CMD_START, -1 },
+       { "system/mic_off", PUI_ANI_CMD_START, -1 },
+       { "voice/listening", PUI_ANI_CMD_START, -1 },
+       { "voice/streaming", PUI_ANI_CMD_START, -1 },
+       { "voice/processing", PUI_ANI_CMD_START, -1 },
+       { "voice/speaking", PUI_ANI_CMD_START, -1 },
+       { "voice/timeout", PUI_ANI_CMD_START, -1 },
+       { "notification/normal", PUI_ANI_CMD_START, -1 },
+       { "notification/emergency", PUI_ANI_CMD_START, -1 },
+       { "notification/network_error", PUI_ANI_CMD_START, -1 },
+       { "notification/error", PUI_ANI_CMD_START, -1 },
+       { "notification/alarm", PUI_ANI_CMD_START, -1 },
+       { "bt/pairing", PUI_ANI_CMD_START, -1 },
+       { "bt/connected", PUI_ANI_CMD_START, -1 }
 };
 
 pui_ani_h ani_handles[sizeof(ani_collection) / sizeof(animation_t)];