Bug fix: Change the way of getting argument. 39/3939/1 2.0alpha-wayland accepted/2.0alpha-wayland/20130612.174822 submit/2.0alpha-wayland/20130612.051654
authorNakamura Hayato <hayato.nakamura@mail.toyota-td.jp>
Tue, 11 Jun 2013 07:25:48 +0000 (16:25 +0900)
committerNakamura Hayato <hayato.nakamura@mail.toyota-td.jp>
Tue, 11 Jun 2013 07:26:44 +0000 (16:26 +0900)
Change-Id: I2bd242061e1b757977f606bc846b3502efa43a84
Signed-off-by: Nakamura Hayato <hayato.nakamura@mail.toyota-td.jp>
ico-app-samplenavi/org.tizen.ico.app-samplenavi.desktop
ico-app-samplenavi/src/Makefile.am
ico-app-samplenavi/src/samplenavi.c
ico-app-soundsample/org.tizen.ico.app-soundsample.desktop
ico-app-soundsample/src/Makefile.am
ico-app-soundsample/src/soundsample.c
ico-app-vicsample/org.tizen.ico.app-vicsample.desktop
ico-app-vicsample/src/Makefile.am
ico-app-vicsample/src/vicsample.c
packaging/ico-uxf-HomeScreen-sample-app.changes
packaging/ico-uxf-HomeScreen-sample-app.spec

index 2722faf..408a784 100644 (file)
@@ -1,6 +1,6 @@
 Name=ico-app-samplenavi
 Type=Application
-Exec=/opt/apps/org.tizen.ico.app-samplenavi/bin/ico-app-samplenavi -basescreen
+Exec=/opt/apps/org.tizen.ico.app-samplenavi/bin/ico-app-samplenavi rightoption -basescreen
 Icon=org.tizen.ico.app-samplenavi.png
 NoDisplay=false
 Version=0.1.0
index 31a0fa2..38d5991 100644 (file)
@@ -3,7 +3,7 @@ app_samplenavi_bindir = /opt/apps/org.tizen.ico.app-samplenavi/bin
 app_samplenavi_bin_PROGRAMS = ico-app-samplenavi
  
 ico_app_samplenavi_SOURCES = samplenavi.c samplenavi.h e3d.c e3d.h define.h
-ico_app_samplenavi_LDADD = -L/usr/lib -lico-app-fw-efl -lico-uxf-weston-plugin -lico-app-fw -ldbus-1 -lpthread -lrt -lwebsockets -laul -lecore_evas -lecore -leina -levas -lecore_wayland -lelementary -lm -leet -lecore_file -ledje -lethumb_client -lecore_imf -lecore_con -lglib-2.0 -lwayland-client -lwayland-cursor -lwayland-egl -lwayland-server -lewebkit2 -lcairo -lGLESv2 -lEGL -lpangocairo-1.0 -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgdk_pixbuf-2.0 -lgthread-2.0
+ico_app_samplenavi_LDADD = -L/usr/lib -lico-app-fw-efl -lico-uxf-weston-plugin -lico-app-fw -ldbus-1 -lpthread -lrt -lwebsockets -laul -lecore_evas -lecore -leina -levas -lecore_wayland -lelementary -lm -leet -lecore_file -ledje -lethumb_client -lecore_imf -lecore_con -lglib-2.0 -lwayland-client -lwayland-cursor -lwayland-egl -lwayland-server -lewebkit2 -lcairo -lGLESv2 -lEGL -lpangocairo-1.0 -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgdk_pixbuf-2.0 -lgthread-2.0 -lbundle
 
 ico_app_samplenavi_CFLAGS = -Wall -I. -I/usr/include/ico-appfw -I/usr/include/ecore-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/eina-1 -I/usr/include/eina-1/eina -I/usr/include/evas-1 -I/usr/include/eet-1 -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/elementary-1 -I/usr/include/ethumb-1 -I/usr/include/efreet-1 -I/usr/include/e_dbus-1 -I/usr/include/emotion-1 -I/usr/include/edje-1 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/embryo-1 -I/usr/include/ewebkit2-0 -I/usr/include/ewebkit2-0/WebKit2 -I/usr/include/ewebkit2-0/NPAPI -I/usr/include/cairo -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/gdk-pixbuf-2.0
 
index dc7572b..b49c008 100644 (file)
@@ -18,6 +18,7 @@
 #include <time.h>
 #include <stddef.h>
 #include <getopt.h>
+#include <bundle.h>
 #include <dbus/dbus.h>
 #include <libwebsockets.h>
 #include <EWebKit2.h>
@@ -1727,11 +1728,12 @@ res_callback(ico_apf_resource_notify_info_t *info, void *user_data)
 /*--------------------------------------------------------------------------*/
 int main(int argc, char *argv[])
 {
-    int i;
     int getscreen;
     char appid[ICO_UXF_MAX_PROCESS_NAME + 1];
     int ret = 0;
     connected = 0;
+    bundle *b;
+    const char *val;
 
     /* Setting the log output */
     if (ico_apf_get_app_id(0, appid) == ICO_APP_CTL_E_NONE) {
@@ -1751,20 +1753,23 @@ int main(int argc, char *argv[])
         return -1;
     }
 
+    /* get argment */
+    b = bundle_import_from_argv(argc, argv);
     getscreen = 0;
     sscrntype[0] = 0;
-    for (i = 1; i < argc; i++) {
-        if (argv[i][0] == '-') {
-            if (strcasecmp(argv[i], "-basescreen") == 0) {
+       if(b != NULL){
+        val = bundle_get_val(b, "rightoption");
+               if (val != NULL) {
+            if (strcasecmp(val, "-basescreen") == 0) {
                 getscreen = 1;  /* get base screen */
                 strcpy(sscrntype, "BasicScreen");
                 uim_debug("BasicScreen");
             }
-            else if (strcasecmp(argv[i], "-intscreen") == 0) {
+            else if (strcasecmp(val, "-intscreen") == 0) {
                 getscreen = 2;  /* get interrupt screen */
                 strcpy(sscrntype, "IntScreen");
             }
-            else if (strcasecmp(argv[i], "-onscreen") == 0) {
+            else if (strcasecmp(val, "-onscreen") == 0) {
                 getscreen = 3;  /* get on screen */
                 strcpy(sscrntype, "OnScreen");
             }
index 5e6bc2e..acd20f2 100644 (file)
@@ -1,6 +1,6 @@
 Name=ico-app-soundsample
 Type=Application
-Exec=/opt/apps/org.tizen.ico.app-soundsample/bin/ico-app-soundsample
+Exec=/opt/apps/org.tizen.ico.app-soundsample/bin/ico-app-soundsample rightoption -basesound
 Icon=org.tizen.ico.app-soundsample.png
 NoDisplay=false
 Version=0.1.0
index 13badc7..d9cc136 100644 (file)
@@ -3,7 +3,7 @@ app_soundsample_bindir = /opt/apps/org.tizen.ico.app-soundsample/bin
 app_soundsample_bin_PROGRAMS = ico-app-soundsample
  
 ico_app_soundsample_SOURCES = soundsample.c soundsample.h soundsample_pulse_async_test.cpp soundsample_yswavfile.cpp soundsample_yswavfile.h
-ico_app_soundsample_LDADD = -L/usr/lib -lico-app-fw-efl -lico-uxf-weston-plugin -lico-app-fw -lwebsockets -laul -lecore_evas -lecore -leina -levas -leina -lrt -lecore_wayland -lelementary -lm -leet -levas -lrt -lecore -leina -lecore_evas -lecore_file -ledje  -lethumb_client -lecore_imf -lecore_con -lpulse -lglib-2.0
+ico_app_soundsample_LDADD = -L/usr/lib -lico-app-fw-efl -lico-uxf-weston-plugin -lico-app-fw -lwebsockets -laul -lecore_evas -lecore -leina -levas -leina -lrt -lecore_wayland -lelementary -lm -leet -levas -lrt -lecore -leina -lecore_evas -lecore_file -ledje  -lethumb_client -lecore_imf -lecore_con -lpulse -lglib-2.0 -lbundle
 ico_app_soundsample_CFLAGS = -Wall -I. -I/usr/include/ico-appfw -I/usr/include/eina-1 -I/usr/include/eina-1/eina/ -I/usr/include/ecore-1 -I/usr/include/evas-1 -I/usr/include/elementary-1 -I/usr/include/ -D_REENTRANT -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
 ico_app_soundsample_CPPFLAGS = -Wall -I. -I/usr/include/ico-appfw -I/usr/include/eina-1 -I/usr/include/eina-1/eina/ -I/usr/include/ecore-1 -I/usr/include/evas-1 -I/usr/include/elementary-1 -I/usr/include/ -D_REENTRANT -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
 
index 8ac3be0..dc16f25 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <unistd.h>
 #include <glib.h>
+#include <bundle.h>
 //#include "app_log.h"
 #include "ico_apf.h"
 #include "ico_apf_ecore.h"
@@ -654,22 +655,26 @@ int main(int argc, char *argv[])
     char buf[256];
     char buf2[256];
     int i = 0;
+    bundle *b;
+    const char *val;
 
     /* get resource control option  */
+    b = bundle_import_from_argv(argc, argv);
     getsound = 0;
     ssndtype[0] = 0;
-    for (i = 1; i < argc; i++) {
-        if (argv[i][0] == '-') {
-            if (strcasecmp(argv[i], "-basesound") == 0) {
+       if(b != NULL){
+        val = bundle_get_val(b, "rightoption");
+               if (val != NULL) {
+            if (strcasecmp(val, "-basesound") == 0) {
                 getsound = 1;   /* get base sound       */
                 strcpy(ssndtype, "BasecSound");
             }
-            else if (strcasecmp(argv[i], "-intsound") == 0) {
+            else if (strcasecmp(val, "-intsound") == 0) {
                 getsound = 2;   /* get interrupt sound  */
                 strcpy(ssndtype, "IntSound");
             }
-            else if (strncasecmp(argv[i], "-int=", 5) == 0) {
-                getsound = strtol(&argv[i][5], (char **) 0, 0);
+            else if (strncasecmp(val, "-int=", 5) == 0) {
+                getsound = strtol(val + 5, (char **) 0, 0);
                 getsound += 2;  /* get interrupt sound  */
                 sprintf(ssndtype, "IntSound.%d", getsound - 2);
             }
index f2ecbc9..8fab6d7 100644 (file)
@@ -1,6 +1,6 @@
 Name=ico-app-vicsample
 Type=Application
-Exec=/opt/apps/org.tizen.ico.app-vicsample/bin/ico-app-vicsample
+Exec=/opt/apps/org.tizen.ico.app-vicsample/bin/ico-app-vicsample rightoption -basescreen
 Icon=org.tizen.ico.app-vicsample.png
 NoDisplay=false
 Version=0.1.0
index b07d9fa..1383e83 100644 (file)
@@ -3,6 +3,6 @@ app_vicsample_bindir = /opt/apps/org.tizen.ico.app-vicsample/bin
 app_vicsample_bin_PROGRAMS = ico-app-vicsample
  
 ico_app_vicsample_SOURCES = vicsample.c 
-ico_app_vicsample_LDADD = -L/usr/lib -lico-app-fw-efl -lico-uxf-weston-plugin -lico-app-fw -laul -lwebsockets -lecore_evas -lecore -leina -levas -leina -lrt -lecore_wayland -lelementary -lm -leet -levas -lrt -lecore -leina -lecore_evas -lecore_file -ledje  -lethumb_client -lecore_imf -lecore_con -ldbus-1 -lpthread -lrt
+ico_app_vicsample_LDADD = -L/usr/lib -lico-app-fw-efl -lico-uxf-weston-plugin -lico-app-fw -laul -lwebsockets -lecore_evas -lecore -leina -levas -leina -lrt -lecore_wayland -lelementary -lm -leet -levas -lrt -lecore -leina -lecore_evas -lecore_file -ledje  -lethumb_client -lecore_imf -lecore_con -ldbus-1 -lpthread -lrt -lbundle
 ico_app_vicsample_CFLAGS = -Wall -I. -I/usr/include/ico-appfw -I/usr/include/eina-1 -I/usr/include/eina-1/eina/ -I/usr/include/ecore-1 -I/usr/include/evas-1 -I/usr/include/elementary-1 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I~/HomeScreen/include
 
index 2554d3b..21bf680 100644 (file)
@@ -28,6 +28,7 @@
 #include <dbus/dbus.h>          /* dbus */
 #include <string.h>             /* test log output */
 #include <stdbool.h>            // bool type define //TEST
+#include <bundle.h>
 //#include "app_log.h"
 #include "ico_apf.h"
 #include "ico_apf_ecore.h"
@@ -927,20 +928,26 @@ int main(int argc, char *argv[])
     int getscreen;
     Evas *evas;
     char appid[ICO_UXF_MAX_PROCESS_NAME + 1];
+    bundle *b;
+    const char *val;
 
+    /* get argment */
+    b = bundle_import_from_argv(argc, argv);
     getscreen = 0;
     sscrntype[0] = 0;
-    for (i = 1; i < argc; i++) {
-        if (argv[i][0] == '-') {
-            if (strcasecmp(argv[i], "-basescreen") == 0) {
+       if(b != NULL){
+        val = bundle_get_val(b, "rightoption");
+               if (val != NULL) {
+            if (strcasecmp(val, "-basescreen") == 0) {
                 getscreen = 1;  /* get base screen */
                 strcpy(sscrntype, "BasicScreen");
+                uim_debug("BasicScreen");
             }
-            else if (strcasecmp(argv[i], "-intscreen") == 0) {
+            else if (strcasecmp(val, "-intscreen") == 0) {
                 getscreen = 2;  /* get interrupt screen */
                 strcpy(sscrntype, "IntScreen");
             }
-            else if (strcasecmp(argv[i], "-onscreen") == 0) {
+            else if (strcasecmp(val, "-onscreen") == 0) {
                 getscreen = 3;  /* get on screen */
                 strcpy(sscrntype, "OnScreen");
             }
index a53987c..158966d 100644 (file)
@@ -1,3 +1,10 @@
+* Tue Jun 11 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/2.0alpha-wayland/20130606.173127@1f825f5
+- 0.0.11 release
+-ico-app-samplenavi
+-ico-app-soundsample
+-ico-app-vicsample
+- Bug fix: Change the way of getting argument.
+
 * Tue Jun 04 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/2.0alpha-wayland/20130603.172708@41b3e77
 -ico-app-samplenavi
 -Bug fix: When there is no proxy of samplenavi.conf, it corrects so that proxy may not be set up.
index 637e090..791bc7e 100644 (file)
@@ -1,6 +1,6 @@
 Name:       ico-uxf-HomeScreen-sample-app
 Summary:    HomeScreen sample application 
-Version:    0.0.10
+Version:    0.0.11
 Release:    1
 Group:      System/GUI
 License:    Apache License, Version 2.0
@@ -25,10 +25,10 @@ BuildRequires: pkgconfig(ail)
 BuildRequires: libwebsockets-devel
 BuildRequires: pulseaudio-libs-devel
 BuildRequires: ico-uxf-weston-plugin-devel
-BuildRequires: ico-uxf-HomeScreen-devel
+BuildRequires: ico-uxf-HomeScreen-devel >= 0.3.06
 Requires: weston >= 1.0
 Requires: ico-uxf-weston-plugin
-Requires: ico-uxf-HomeScreen
+Requires: ico-uxf-HomeScreen >= 0.3.06
 Requires: ecore
 Requires: elementary
 Requires: evas
@@ -45,9 +45,9 @@ BuildRequires: pkgconfig(json-glib-1.0)
 BuildRequires: pkgconfig(aul)
 BuildRequires: libwebsockets-devel
 BuildRequires: ico-uxf-weston-plugin-devel
-BuildRequires: ico-uxf-HomeScreen-devel
+BuildRequires: ico-uxf-HomeScreen-devel >= 0.3.06
 Requires: ico-uxf-weston-plugin
-Requires: ico-uxf-HomeScreen
+Requires: ico-uxf-HomeScreen >= 0.3.06
 Requires: ecore
 Requires: elementary
 Requires: evas
@@ -82,11 +82,11 @@ BuildRequires: pkgconfig(json-glib-1.0)
 BuildRequires: pkgconfig(aul)
 BuildRequires: libwebsockets-devel
 BuildRequires: ico-uxf-weston-plugin-devel
-BuildRequires: ico-uxf-HomeScreen-devel
+BuildRequires: ico-uxf-HomeScreen-devel >= 0.3.06
 BuildRequires: edje-tools
 #BuildRequires: pkgconfig(opencv)
 Requires: ico-uxf-weston-plugin
-Requires: ico-uxf-HomeScreen
+Requires: ico-uxf-HomeScreen >= 0.3.06
 Requires: ecore
 Requires: evas
 Requires: ecore-evas