Refactoring for TDD 65/124865/2
authorjunkyu han <junkyu.han@samsung.com>
Thu, 13 Apr 2017 00:31:01 +0000 (09:31 +0900)
committerjunkyu han <junkyu.han@samsung.com>
Thu, 13 Apr 2017 00:33:07 +0000 (09:33 +0900)
Change-Id: If26a9a162df8cd003c9f4d4138bb61fe4fcaf679

.cproject
src/animation.c
src/boot.c
tizen-manifest.xml

index cddc9ba..4330f5c 100644 (file)
--- a/.cproject
+++ b/.cproject
                                                        <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.312569187" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
                                                        <builder autoBuildTarget="all" buildPath="${workspace_loc:/boot-animation}/Debug" enableAutoBuild="true" id="org.tizen.nativecore.target.sbi.gnu.builder.769322744" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecore.target.sbi.gnu.builder"/>
                                                        <tool id="org.tizen.nativecore.tool.sbi.gnu.archiver.754761356" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/>
-                                                       <tool command="arm-linux-gnueabi-g++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.2134660911" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler">
+                                                       <tool command="i386-linux-gnueabi-g++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.2134660911" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler">
                                                                <option id="gnu.cpp.compiler.option.optimization.level.1543397994" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
                                                                <option defaultValue="gnu.cpp.compiler.debugging.level.max" id="sbi.gnu.cpp.compiler.option.debugging.level.core.84106387" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level.core" valueType="enumerated"/>
                                                                <option defaultValue="false" id="sbi.gnu.cpp.compiler.option.misc.pic.core.1089996176" name="-fPIC option" superClass="sbi.gnu.cpp.compiler.option.misc.pic.core" valueType="boolean"/>
                                                                <option id="sbi.gnu.cpp.compiler.option.1099250852" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="mobile-3.0-device.core.private.20170314_1_gcc49.armel.core.app"/>
+                                                                       <listOptionValue builtIn="false" value="mobile-3.0-emulator.core.private_gcc49.i386.core.app"/>
                                                                </option>
                                                                <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.271908538" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/EGL&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES3&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/KHR&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
@@ -72,7 +78,6 @@
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/EGL&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES3&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotcon&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/KHR&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/pkgmgr&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rua/&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/service-adaptor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
                                                                        <listOptionValue builtIn="false" value="${RS_COMPILER_MISC}"/>
                                                                        <listOptionValue builtIn="false" value=" -fPIE"/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="-mthumb"/>
                                                                </option>
                                                                <option id="gnu.cpp.compiler.option.include.paths.1648048905" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
                                                                </option>
                                                                <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.897670759" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
                                                        </tool>
-                                                       <tool command="arm-linux-gnueabi-gcc" id="org.tizen.nativecore.tool.sbi.gnu.c.compiler.1920650382" name="C Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.c.compiler">
+                                                       <tool command="i386-linux-gnueabi-gcc" id="org.tizen.nativecore.tool.sbi.gnu.c.compiler.1920650382" name="C Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.c.compiler">
                                                                <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.315879439" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
                                                                <option defaultValue="gnu.c.debugging.level.max" id="sbi.gnu.c.compiler.option.debugging.level.core.1289022341" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level.core" valueType="enumerated"/>
                                                                <option defaultValue="false" id="sbi.gnu.c.compiler.option.misc.pic.core.1882683681" name="-fPIC option" superClass="sbi.gnu.c.compiler.option.misc.pic.core" valueType="boolean"/>
                                                                <option id="sbi.gnu.c.compiler.option.1824562871" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="mobile-3.0-device.core.private.20170314_1_gcc49.armel.core.app"/>
+                                                                       <listOptionValue builtIn="false" value="mobile-3.0-emulator.core.private_gcc49.i386.core.app"/>
                                                                </option>
                                                                <option id="sbi.gnu.c.compiler.option.frameworks_inc.core.477996193" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/EGL&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES3&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/KHR&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/EGL&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES3&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotcon&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/KHR&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/pkgmgr&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rua/&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/service-adaptor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
                                                                        <listOptionValue builtIn="false" value="${RS_COMPILER_MISC}"/>
                                                                        <listOptionValue builtIn="false" value=" -fPIE"/>
                                                                        <listOptionValue builtIn="false" value="--sysroot=&quot;${SBI_SYSROOT}&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="-mthumb"/>
                                                                </option>
                                                                <option id="gnu.c.compiler.option.include.paths.315003438" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
                                                                <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.895233976" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
                                                        </tool>
                                                        <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.1112846929" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
-                                                       <tool command="arm-linux-gnueabi-g++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.linker.1023794811" name="C++ Linker" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.linker">
+                                                       <tool command="i386-linux-gnueabi-g++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.linker.1023794811" name="C++ Linker" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.linker">
                                                                <option defaultValue="false" id="sbi.gnu.cpp.linker.option.shared_flag.core.469661010" name="Linker.Shared" superClass="sbi.gnu.cpp.linker.option.shared_flag.core" valueType="boolean"/>
                                                                <option defaultValue="false" id="sbi.gnu.cpp.linker.option.noundefined.core.2065996281" name="Report unresolved symbol references (-Wl,--no-undefined)" superClass="sbi.gnu.cpp.linker.option.noundefined.core" valueType="boolean"/>
                                                                <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.core.895800905" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.core" valueType="stringList">
                                                                        <additionalInput kind="additionalinput" paths="$(LIBS)"/>
                                                                </inputType>
                                                        </tool>
-                                                       <tool command="arm-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.750656483" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
+                                                       <tool command="i386-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.750656483" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
                                                                <inputType id="cdt.managedbuild.tool.gnu.assembler.input.523792428" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
                                                        </tool>
                                                        <tool id="org.tizen.nativecore.tool.fnmapgen.1821056031" name="C FN-Map Generator" superClass="org.tizen.nativecore.tool.fnmapgen"/>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="shared"/>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+                                               <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="test"/>
                                        </sourceEntries>
                                </configuration>
                        </storageModule>
        </storageModule>
        <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
        <storageModule moduleId="refreshScope"/>
+       <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
 </cproject>
index eeeeb9d..0542680 100644 (file)
@@ -56,19 +56,19 @@ static void win_del(void *data, Evas_Object * obj, void *event_info)
        elm_exit();
 }
 
-static Eina_Bool _end_cb(void *data)
+static Eina_Bool __end_cb(void *data)
 {
        int type = (int) data;
-       _D("_end_cb is invoked");
 
-       if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0) {
-               _E("Failed to set finished set");
-       }
        if (type == TYPE_ON) {
                _D("EXIT on BOOTING");
+               if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0) {
+                       _E("Failed to set finished set");
+               }
                elm_exit();
        } else {
                /* Delete Previous Layout */
+               _D("EXIT on SHUTDOWN");
                if (s_animation.layout) evas_object_del(s_animation.layout);
 
                Evas_Object *disp_block = NULL;
@@ -80,45 +80,39 @@ static Eina_Bool _end_cb(void *data)
        return ECORE_CALLBACK_CANCEL;
 }
 
-static void _edje_cb(void *d, Evas_Object * obj, const char *e, const char *s)
+static void __set_poweroff_message(void)
 {
-       _D("edje callback is invoked");
+       Evas_Coord w;
+       Evas_Coord h;
+
+       evas_object_size_hint_weight_set(s_animation.txt, EVAS_HINT_EXPAND,     EVAS_HINT_EXPAND);
+       evas_object_size_hint_fill_set(s_animation.txt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_resize(s_animation.txt, s_animation.w, s_animation.h);
+       evas_object_color_set(s_animation.txt, 255, 255, 255, 255);
+       evas_object_text_font_set(s_animation.txt, "SLP:style=medium", 30);
+       evas_object_geometry_get(s_animation.txt, NULL, NULL, &w, &h);
+       evas_object_move(s_animation.txt, (s_animation.w - w) >> 1, (s_animation.h - h) >> 1);
+       evas_object_show(s_animation.txt);
+}
 
+static void __edje_cb(void *d, Evas_Object * obj, const char *e, const char *s)
+{
        if (s_animation.state == TYPE_OFF || s_animation.state == TYPE_OFF_WITH_MSG) {
                _D("TYPE OFF");
-               if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0)
+               if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0) {
                        _E("Failed to set finished set");
+               }
                if (s_animation.txt) {
-                       Evas_Coord w;
-                       Evas_Coord h;
-
-                       evas_object_size_hint_weight_set(s_animation.txt,
-                                                        EVAS_HINT_EXPAND,
-                                                        EVAS_HINT_EXPAND);
-                       evas_object_size_hint_fill_set(s_animation.txt,
-                                                      EVAS_HINT_FILL,
-                                                      EVAS_HINT_FILL);
-                       evas_object_resize(s_animation.txt, s_animation.w,
-                                          s_animation.h);
-                       evas_object_color_set(s_animation.txt, 255, 255, 255,
-                                             255);
-                       evas_object_text_font_set(s_animation.txt,
-                                                 "SLP:style=medium", 30);
-                       evas_object_geometry_get(s_animation.txt, NULL, NULL,
-                                                &w, &h);
-                       evas_object_move(s_animation.txt,
-                                        (s_animation.w - w) >> 1,
-                                        (s_animation.h - h) >> 1);
-                       evas_object_show(s_animation.txt);
+                       __set_poweroff_message();
                }
-               ecore_timer_add(1, _end_cb, (void *)TYPE_OFF);
+               ecore_timer_add(1, __end_cb, (void *)TYPE_OFF);
        } else {
                _D("TYPE_ON");
-               _end_cb((void *)TYPE_ON);
+               __end_cb((void *)TYPE_ON);
        }
 }
 
-static void layout_file_set(int state)
+static Eina_Bool __layout_file_set(int state)
 {
        char file_name[1024];
        char *on_off;
@@ -136,40 +130,47 @@ static void layout_file_set(int state)
        ret = access(file_name, 0);
        if (ret == 0) {
                _D("This Resolution[%d]x[%d] is supported !!", s_animation.w, s_animation.h);
-               elm_layout_file_set(s_animation.layout, file_name, on_off);
+               if (!elm_layout_file_set(s_animation.layout, file_name, on_off)) return EINA_FALSE;
        } else {
                _E("This Resolution[%d]x[%d] is STRANGE !!, Set default image '720x1280'", s_animation.w, s_animation.h);
                if (state == TYPE_ON) {
-                       elm_layout_file_set(s_animation.layout, DEFAULT_ON, on_off);
+                       if (!elm_layout_file_set(s_animation.layout, DEFAULT_ON, on_off)) return EINA_FALSE;
                } else {
-                       elm_layout_file_set(s_animation.layout, DEFAULT_OFF, on_off);
+                       if (!elm_layout_file_set(s_animation.layout, DEFAULT_OFF, on_off)) return EINA_FALSE;
                }
        }
+
+       return EINA_TRUE;
 }
 
-static int init_layout(const char *msg)
+static Evas_Object *__create_layout(const char *msg)
 {
-       s_animation.layout = elm_layout_add(s_animation.win);
-       if (!s_animation.layout) {
+       Eina_Bool ret;
+       Evas_Object *layout = elm_layout_add(s_animation.win);
+       if (!layout) {
                _E("Failed to create layout");
-               return EXIT_FAILURE;
+               return NULL;
        }
 
-       layout_file_set(s_animation.state);
+       ret = __layout_file_set(s_animation.state);
+       if (ret != EINA_TRUE) {
+               _E("Failed to set layout file");
+               evas_object_del(layout);
+               return NULL;
+       }
 
-       evas_object_size_hint_weight_set(s_animation.layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       _D("[Boot-ani] Start animation: %d mode", s_animation.state);
-       elm_win_resize_object_add(s_animation.win, s_animation.layout);
-       edje_object_signal_callback_add(elm_layout_edje_get(s_animation.layout), "end", "animation", _edje_cb, NULL);
-       evas_object_show(s_animation.layout);
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(s_animation.win, layout);
+       edje_object_signal_callback_add(elm_layout_edje_get(layout), "end", "animation", __edje_cb, NULL);
+       evas_object_show(layout);
 
        if (msg) {
                if (!s_animation.txt) {
-                       s_animation.txt = evas_object_text_add(s_animation.evas);
+                       s_animation.txt = evas_object_text_add(evas_object_evas_get(s_animation.win));
                        if (!s_animation.txt) {
                                _E("Failed to add text");
-                               evas_object_del(s_animation.layout);
-                               return EXIT_FAILURE;
+                               evas_object_del(layout);
+                               return NULL;
                        }
                }
 
@@ -177,10 +178,10 @@ static int init_layout(const char *msg)
                evas_object_hide(s_animation.txt);
        }
 
-       return EXIT_SUCCESS;
+       return layout;
 }
 
-static void fini_layout(void)
+static void __fini_layout(void)
 {
        if (s_animation.layout) {
                evas_object_del(s_animation.layout);
@@ -192,49 +193,37 @@ static void fini_layout(void)
        }
 }
 
-static int create_window(void)
+static Evas_Object *__create_window(void)
 {
        _D("Create Window");
        printf("Create Window\n");
 
        int x, y = 0;
+       Evas_Object *win;
 
-       s_animation.win = elm_win_add(NULL, "BOOT_ANIMATION", ELM_WIN_NOTIFICATION);
-       elm_win_aux_hint_add(s_animation.win, "wm.comp.win.always.selective.mode", "1");
+       win = elm_win_add(NULL, "BOOT_ANIMATION", ELM_WIN_NOTIFICATION);
+       elm_win_aux_hint_add(win, "wm.comp.win.always.selective.mode", "1");
 
-       elm_win_role_set(s_animation.win, "alert");
-       if (!s_animation.win) {
+       elm_win_role_set(win, "alert");
+       if (!win) {
                _E("Failed to create a new window");
                printf("Failed to create a new window\n");
-               return EXIT_FAILURE;
+               return NULL;
        }
        if (s_animation.state == TYPE_OFF || s_animation.state == TYPE_OFF_WITH_MSG) {
                _D("We are turning off the Tizen");
        }
-       efl_util_set_notification_window_level(s_animation.win, EFL_UTIL_NOTIFICATION_LEVEL_HIGH);
-       evas_object_smart_callback_add(s_animation.win, "delete-request", win_del, NULL);
+       efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_HIGH);
+       evas_object_smart_callback_add(win, "delete-request", win_del, NULL);
 
-       s_animation.evas = evas_object_evas_get(s_animation.win);
-       if (!s_animation.evas) {
-               evas_object_del(s_animation.win);
-               _E("Failed to get the evas object");
-               return EXIT_FAILURE;
-       }
-       elm_win_screen_size_get(s_animation.win, &x, &y, &s_animation.w, &s_animation.h);
+       elm_win_screen_size_get(win, &x, &y, &s_animation.w, &s_animation.h);
        _D("Window size is x: %d, y: %d, w: %d, h: %d", x, y, s_animation.w, s_animation.h);
-       elm_win_borderless_set(s_animation.win, 1);
-       elm_win_indicator_mode_set(s_animation.win, ELM_WIN_INDICATOR_HIDE);
-       evas_object_move(s_animation.win, 0, 0);
-       evas_object_show(s_animation.win);
+       elm_win_borderless_set(win, 1);
+       elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_HIDE);
+       evas_object_move(win, 0, 0);
+       evas_object_show(win);
 
-       s_animation.ee = ecore_evas_ecore_evas_get(s_animation.evas);
-       if (!s_animation.ee) {
-               evas_object_del(s_animation.win);
-               _E("Failed to get the ecore evas object");
-               return EXIT_FAILURE;
-       }
-
-       return EXIT_SUCCESS;
+       return win;
 }
 
 int init_animation(int state, const char *msg)
@@ -244,18 +233,21 @@ int init_animation(int state, const char *msg)
 
        s_animation.state = state;
 
-       if (create_window() == EXIT_FAILURE) {
+       s_animation.win = __create_window();
+       if (!s_animation.win) {
                _E("Failed to create a new window");
                printf("Failed to create a new window\n");
                return EXIT_FAILURE;
        }
 
-       if (init_layout(msg) == EXIT_FAILURE) {
-               _E("Failed to init the layout object");
-               if (msg) {
+       s_animation.layout = __create_layout(msg);
+       if (!s_animation.layout) {
+               _E("Failed to create layout");
+               if (s_animation.txt) {
                        evas_object_del(s_animation.txt);
                }
                evas_object_del(s_animation.win);
+               return EXIT_FAILURE;
        }
 
        return EXIT_SUCCESS;
@@ -263,7 +255,7 @@ int init_animation(int state, const char *msg)
 
 int fini_animation(void)
 {
-       fini_layout();
+       __fini_layout();
        evas_object_del(s_animation.win);
        fflush(stdout);
        close(1);
index e4e6f79..e735eaa 100644 (file)
@@ -86,7 +86,7 @@ static int get_wav_file(int state, char *wavpath)
 }
 #endif
 
-static int xready_cb(keynode_t * node, void *user_data)
+static int __prepare_animation(keynode_t * node, void *user_data)
 {
        int c;
        int argc;
@@ -248,7 +248,7 @@ int main(int argc, char *argv[])
                _D("Failed to set finished value to 0\n");
                printf("[%s/%s/%d] Failed to set finished value to 0\n", __FILE__, __func__, __LINE__);
        }
-       if (xready_cb(NULL, &args) != EXIT_SUCCESS) {
+       if (__prepare_animation(NULL, &args) != EXIT_SUCCESS) {
                vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1);
                return 1;
        }
index 3242615..a810db4 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="boot-animation" version="1.0.0">
+<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.boot-animation" version="1.0.0">
     <profile name="mobile"/>
-    <ui-application appid="boot-animation" exec="boot-animation" launch_mode="single" multiple="false" nodisplay="true" taskmanage="true" type="capp">
+    <ui-application appid="org.tizen.boot-animation" exec="boot-animation" launch_mode="single" multiple="false" nodisplay="true" taskmanage="true" type="capp">
         <label>boot-animation</label>
         <icon>boot-animation.png</icon>
     </ui-application>