live-thumbnail is changed GPU un-depending AND Fix for TIVI-2290 75/15775/1 accepted/tizen/ivi accepted/tizen/ivi/20140129.180846 submit/tizen/20140129.085111
authorMasayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
Fri, 24 Jan 2014 08:01:22 +0000 (17:01 +0900)
committerMasayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
Tue, 28 Jan 2014 04:32:52 +0000 (13:32 +0900)
Change-Id: I18251ca61102602d2784f8986c8b8d836ad25b44
Signed-off-by: Masayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
84 files changed:
configure.ac
data/lib/systemd/user/ico-uxf-wait-launchpad-ready.path
data/share/packages/org.tizen.ico.homescreen.xml
data/share/packages/org.tizen.ico.onscreen.xml [new file with mode: 0644]
data/share/packages/org.tizen.ico.statusbar.xml
data/share/packages/org.tizen.ico.system-controller.xml
include/ico_syc_msg_cmd_def.h
include/ico_syc_type.h
include/ico_syc_winctl.h
lib/Makefile.am
lib/apps-framework/ico_syc_winctl.c
lib/common/CicoAilItems.cpp
lib/notification/CicoNotification.cpp [new file with mode: 0644]
lib/notification/CicoNotification.h [new file with mode: 0644]
lib/notification/CicoNotificationApp.cpp [new file with mode: 0644]
lib/notification/CicoNotificationApp.h [new file with mode: 0644]
lib/notification/CicoNotificationInterface.h [new file with mode: 0644]
lib/notification/CicoNotificationService.cpp [new file with mode: 0644]
lib/notification/CicoNotificationService.h [new file with mode: 0644]
lib/notification/Makefile.am [new file with mode: 0644]
lib/system-controller/CicoSCResourceManager.cpp
lib/system-controller/CicoSCWindowController.cpp
lib/system-controller/CicoSCWindowController.h
lib/system-controller/CicoSCWlWinMgrIF.cpp
lib/system-controller/CicoSCWlWinMgrIF.h
packaging/ico-uxf-homescreen.changes
packaging/ico-uxf-homescreen.spec
res/org.tizen.ico.statusbar/res/config/statusbar.conf
src/Makefile.am
src/homescreen/CicoHSAppControl.cpp
src/homescreen/CicoHSCommand.cpp
src/homescreen/CicoHSCommandArg.cpp
src/homescreen/CicoHSCommandArg.h
src/homescreen/CicoHSMenuTile.cpp
src/homescreen/CicoHSMenuTile.h
src/homescreen/CicoHSMenuTouch.cpp
src/homescreen/CicoHSMenuWindow.cpp
src/homescreen/CicoHomeScreen.cpp
src/onscreen/CicoOSEFLApp.cpp [new file with mode: 0644]
src/onscreen/CicoOSEFLApp.h [new file with mode: 0644]
src/onscreen/CicoOnScreen.cpp [new file with mode: 0644]
src/onscreen/CicoOnScreen.h [new file with mode: 0644]
src/onscreen/CicoOnScreenAction.cpp [deleted file]
src/onscreen/CicoOnScreenAction.h [deleted file]
src/onscreen/CicoOnScreenAppList.cpp [deleted file]
src/onscreen/CicoOnScreenAppList.h [deleted file]
src/onscreen/CicoOnScreenContext.cpp [deleted file]
src/onscreen/CicoOnScreenContext.h [deleted file]
src/onscreen/CicoOnScreenControlWindow.cpp [deleted file]
src/onscreen/CicoOnScreenControlWindow.h [deleted file]
src/onscreen/Makefile.am
src/onscreen/on_screen.cpp [deleted file]
src/onscreen/on_screen.h [deleted file]
src/onscreen/on_screen_main.cpp [new file with mode: 0644]
src/statusbar/CicoCommonComponent.cpp [new file with mode: 0644]
src/statusbar/CicoCommonComponent.h [new file with mode: 0644]
src/statusbar/CicoCommonModule.cpp [new file with mode: 0644]
src/statusbar/CicoCommonWindow.cpp [new file with mode: 0644]
src/statusbar/CicoCommonWindow.h [new file with mode: 0644]
src/statusbar/CicoComponentImplementation.cpp [new file with mode: 0644]
src/statusbar/CicoComponentImplementation.h [new file with mode: 0644]
src/statusbar/CicoComponentInterface.h [new file with mode: 0644]
src/statusbar/CicoModuleImplementation.cpp [new file with mode: 0644]
src/statusbar/CicoModuleImplementation.h [new file with mode: 0644]
src/statusbar/CicoModuleInterface.h [new file with mode: 0644]
src/statusbar/CicoSBConfigDef.h [deleted file]
src/statusbar/CicoSBEFLApp.cpp [new file with mode: 0644]
src/statusbar/CicoSBEFLApp.h [new file with mode: 0644]
src/statusbar/CicoSBResourceDef.h [deleted file]
src/statusbar/CicoStatusBar.cpp [new file with mode: 0644]
src/statusbar/CicoStatusBar.h [new file with mode: 0644]
src/statusbar/CicoStatusBarControlWindow.cpp [deleted file]
src/statusbar/CicoStatusBarControlWindow.h [deleted file]
src/statusbar/CicoStatusBarTime.cpp [deleted file]
src/statusbar/CicoStatusBarTime.h [deleted file]
src/statusbar/CicoWindowInterface.h [new file with mode: 0644]
src/statusbar/Makefile.am
src/statusbar/main.cpp [new file with mode: 0644]
src/statusbar/status_bar.cpp [deleted file]
src/statusbar/status_bar.h [deleted file]
tests/Makefile.am
tests/statusbar/Makefile.am [new file with mode: 0644]
tests/statusbar/send_notification.cpp [new file with mode: 0644]
tool/rm_autogen-file.sh

index f885798..4b2ab46 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.68])
-AC_INIT([org.tizen.ico.homescreen], [0.9.10], [])
+AC_INIT([org.tizen.ico.homescreen], [0.9.12], [])
 AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
 AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_HEADERS([config.h])
@@ -38,6 +38,7 @@ PKG_CHECK_MODULES([BUNDLE], [bundle])
 PKG_CHECK_MODULES([AUL], [aul])
 PKG_CHECK_MODULES([PKGMGR], [pkgmgr])
 PKG_CHECK_MODULES([WAYLANDCLIENT], [wayland-client])
+PKG_CHECK_MODULES([NOTIFICATION], [notification])
 
 # libraries for homescreen.
 PKG_CHECK_MODULES([EDJE], [edje])
@@ -123,6 +124,7 @@ AC_CHECK_FUNCS([gethostname gettimeofday memset setenv strcasecmp strdup strerro
 AC_CONFIG_FILES([Makefile
                  lib/Makefile
                  lib/common/Makefile
+                 lib/notification/Makefile
                  lib/apps-framework/Makefile
                  lib/misc/Makefile
                  lib/misc/state-machine/Makefile
@@ -131,8 +133,10 @@ AC_CONFIG_FILES([Makefile
                  src/syscond/Makefile
                  src/homescreen/Makefile
                  src/statusbar/Makefile
+                 src/onscreen/Makefile
                  tool/Makefile
                  tests/Makefile
+                 tests/statusbar/Makefile
                  tests/system-controller/Makefile
                  tests/system-controller/apps-framework/Makefile])
 AC_PROG_RANLIB([ranlib])
index 7e80cbe..15619cf 100644 (file)
@@ -1,7 +1,7 @@
 # Description=Path activation for ico-system-controller
 
 [Path]
-PathExists=/tmp/amd_ready
+PathExists=/run/user/5000/wayland-0
 Unit=ico-system-controller.service
 
 [Install]
index e2d4a6a..7a43b82 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.homescreen" version="0.9.10" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.homescreen" version="0.9.12" install-location="internal-only">
        <label>HomeScreen</label>
        <description>IVI HomeScreen Application</description>
        <ui-application appid="org.tizen.ico.homescreen" exec="/usr/apps/org.tizen.ico.homescreen/bin/HomeScreen" nodisplay="true" multiple="false" type="capp" taskmanage="true">
diff --git a/data/share/packages/org.tizen.ico.onscreen.xml b/data/share/packages/org.tizen.ico.onscreen.xml
new file mode 100644 (file)
index 0000000..a5109e9
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.onscreen" version="0.9.12" install-location="internal-only">
+       <label>OnScreen</label>
+       <description>IVI OnScreen Application</description>
+       <ui-application appid="org.tizen.ico.onscreen" exec="/usr/apps/org.tizen.ico.onscreen/bin/OnScreen" nodisplay="true" multiple="false" type="capp" taskmanage="true">
+               <icon>org.tizen.ico.onscreen.png</icon>
+               <label>OnScreen</label>
+               <label xml:lang="en-gb">OnScreen</label>
+               <label xml:lang="en-us">OnScreen</label>
+       </ui-application>
+</manifest>
index 01fcd29..4820f48 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.statusbar" version="0.9.10" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.statusbar" version="0.9.12" install-location="internal-only">
        <label>StatusBar</label>
        <description>IVI StatusBar Application</description>
        <ui-application appid="org.tizen.ico.statusbar" exec="/usr/apps/org.tizen.ico.statusbar/bin/StatusBar" nodisplay="true" multiple="false" type="capp" taskmanage="true">
index d0443cf..80fd2f2 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.system-controller" version="0.9.10" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.system-controller" version="0.9.12" install-location="internal-only">
        <label>system-controller</label>
        <author email="" href=""> </author>
        <description>ico system-controller</description>
index c7ea8c3..3bc5437 100644 (file)
@@ -132,6 +132,7 @@ extern "C" {
 #define MSG_CMD_NAME                0x00010009
 #define MSG_CMD_MAP_THUMB           0x00010011
 #define MSG_CMD_UNMAP_THUMB         0x00010012
+#define MSG_CMD_MAP_BUFFER          0x00010013
 #define MSG_CMD_SHOW_LAYER          0x00010020
 #define MSG_CMD_HIDE_LAYER          0x00010021
 #define MSG_CMD_CHANGE_LAYER_ATTR   0x00010022
index b343a6b..184e0ee 100644 (file)
@@ -193,7 +193,8 @@ typedef struct _win_attr {
 typedef struct _thumb_info {
     char *appid;    /* application id */
     int  surface;   /* window's surface id */
-    int  name;      /* EGL buffer name */
+    int  type;      /* buffer type(ICO_WINDOW_MGR_MAP_TYPE_EGL/SHM/PIXEL)*/
+    int  name;      /* EGL buffer name/shared memory buffer index(+1) */
     int  width;     /* window width */
     int  height;    /* window height */
     int  stride;    /* byte par line of frame buffer */
index c147051..4e7e05a 100644 (file)
@@ -137,6 +137,21 @@ int ico_syc_change_layer(const char *appid, int surface, int layer);
 
 /*--------------------------------------------------------------------------*/
 /**
+ * @brief   ico_syc_map_buffer
+ *          Set map buffer for surface image mapping to the memory.
+ *
+ * @param[in]   shmname                 shared memory name
+ * @param[in]   bufsize                 buffer size [byte]
+ * @param[in]   bufnum                  number of buffer
+ * @return      result
+ * @retval      0                       success
+ * @retval      not 0                   error
+ */
+/*--------------------------------------------------------------------------*/
+int ico_syc_map_buffer(const char *shmname, int bufsize, int bufnum);
+
+/*--------------------------------------------------------------------------*/
+/**
  * @brief   ico_syc_map_thumb
  *          Map the thumbnail data for mapping to the memory.
  *
index 8e30ebf..f15c2c2 100644 (file)
@@ -1,5 +1,6 @@
 SUBDIRS=\
        common \
-    apps-framework  \
-    misc \
-    system-controller 
+       notification \
+       apps-framework  \
+       misc \
+       system-controller 
index 3d97b10..0311711 100644 (file)
@@ -41,6 +41,8 @@ static msg_t _create_win_move_msg(const char *appid, int surface,
 static msg_t _create_active_win_msg(const char *appid, int surface);
 static msg_t _create_change_layer_msg(const char *appid, int surface,
                                       int layer);
+static msg_t _create_map_buffer_msg(const char *appid, const char *shmname,
+                                    int bufsize, int bufnum);
 static msg_t _create_map_thumb_msg(const char *appid, int surface, int framerate);
 static msg_t _create_unmap_thumb_msg(const char *appid, int surface);
 static msg_t _create_layer_msg(const char *appid, int layer, int attr,
@@ -283,6 +285,57 @@ _create_change_layer_msg(const char *appid, int surface, int layer)
 
 /*--------------------------------------------------------------------------*/
 /**
+ * @brief   _create_map_buffer_msg
+ *          Create the message to map buffer.
+ *
+ * @param[in]   appid                   application id
+ * @param[in]   shmname                 shared memory name
+ * @param[in]   bufsize                 buffer size
+ * @param[in]   bufnum                  number of buffer
+ * @return      json generator
+ * @retval      json generator          success
+ * @retval      NULL                    error
+ */
+/*--------------------------------------------------------------------------*/
+static msg_t
+_create_map_buffer_msg(const char *appid, const char *shmname, int bufsize, int bufnum)
+{
+    JsonObject *obj     = NULL;
+    JsonObject *argobj  = NULL;
+    JsonGenerator *gen  = NULL;
+    JsonNode *root      = NULL;
+
+    /* create json object */
+    obj = json_object_new();
+    argobj = json_object_new();
+    if (obj == NULL || argobj == NULL) {
+        _ERR("json_object_new failed");
+        return NULL;
+    }
+
+    /* set message */
+    json_object_set_int_member(obj, MSG_PRMKEY_CMD, MSG_CMD_MAP_BUFFER);
+    json_object_set_string_member(obj, MSG_PRMKEY_APPID, appid);
+    json_object_set_int_member(obj, MSG_PRMKEY_PID, getpid());
+
+    json_object_set_string_member(argobj, MSG_PRMKEY_ANIM_NAME, shmname);
+    json_object_set_int_member(argobj, MSG_PRMKEY_WIDTH, bufsize);
+    json_object_set_int_member(argobj, MSG_PRMKEY_HEIGHT, bufnum);
+    json_object_set_object_member(obj, MSG_PRMKEY_ARG, argobj);
+
+    /* create root object */
+    root = json_node_new(JSON_NODE_OBJECT);
+    json_node_take_object(root, obj);
+
+    /* create generator object */
+    gen = json_generator_new();
+    json_generator_set_root(gen, root);
+
+    return gen;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
  * @brief   _create_map_thumb_msg
  *          Create the message to map thumbnail.
  *
@@ -688,6 +741,7 @@ ico_syc_cb_thumb(ico_syc_callback_t callback, void *user_data,
     thumb_info->surface = ico_syc_get_int_member(argobj,
                                                  MSG_PRMKEY_SURFACE);
     thumb_info->name = ico_syc_get_int_member(argobj, MSG_PRMKEY_NAME);
+    thumb_info->type = ico_syc_get_int_member(argobj, MSG_PRMKEY_ATTR);
     thumb_info->width = ico_syc_get_int_member(argobj, MSG_PRMKEY_WIDTH);
     thumb_info->height = ico_syc_get_int_member(argobj, MSG_PRMKEY_HEIGHT);
     thumb_info->stride = ico_syc_get_int_member(argobj, MSG_PRMKEY_STRIDE);
@@ -970,6 +1024,39 @@ ico_syc_change_layer(const char *appid, int surface, int layer)
 
 /*--------------------------------------------------------------------------*/
 /**
+ * @brief   ico_syc_map_buffer
+ *          Prepare the thumbnail set map buffer for mapping to the memory.
+ *
+ * @param[in]   shmname                 shared memory name
+ * @param[in]   bufsize                 buffer size [byte]
+ * @param[in]   bufnum                  number of buffer
+ * @return      result
+ * @retval      0                       success
+ * @retval      not 0                   error
+ */
+/*--------------------------------------------------------------------------*/
+ICO_API int
+ico_syc_map_buffer(const char *shmname, int bufsize, int bufnum)
+{
+    int ret = ICO_SYC_ERR_NONE;
+    msg_t msg;
+    char *appid;
+
+    /* get appid */
+    appid = ico_syc_get_appid();
+
+    /* make message */
+    msg = _create_map_buffer_msg(appid, shmname, bufsize, bufnum);
+    /* send message */
+    ret = ico_syc_send_msg(msg);
+    /* free send message */
+    ico_syc_free_msg(msg);
+
+    return ret;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
  * @brief   ico_syc_map_thumb
  *          Prepare the thumbnail data for mapping to the memory.
  *
index 4350a84..9a46239 100644 (file)
@@ -94,11 +94,10 @@ CicoAilItems::~CicoAilItems()
     ICO_TRA("end");
 }
 /**
- * @brief init member 
+ * @brief init member
  */
 void CicoAilItems::init()
 {
-    
     m_appid.clear();      // PACKAGE NAME
     m_icon.clear();       // ICON
     m_name.clear();       // NAME
@@ -400,7 +399,7 @@ void CicoAilItems::categoryParse(const std::string categorys)
             continue;
         }
 
-        ICO_DBG("Parse UNKOWN %s", it->c_str());
+        ICO_DBG("Parse UNKNOWN %s", it->c_str());
     }
     categoryGetDisplay(displayName, layerName, dispZoneName);
     categoryGetSound(soundName, soundZoneName);
@@ -535,7 +534,7 @@ bool CicoAilItems::categoryParseGetValue(const std::string& s,
     ICO_TRA("end %s", val.c_str());
     return true;
 }
-    
+
 /**
  * @brief get
  * @param disp display key name
diff --git a/lib/notification/CicoNotification.cpp b/lib/notification/CicoNotification.cpp
new file mode 100644 (file)
index 0000000..4516a99
--- /dev/null
@@ -0,0 +1,401 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoNotification.cpp
+ *
+ *  @brief  This file is implemetation of CicoNotification class
+ */
+//==========================================================================
+
+#include <ico_log.h>
+
+#include "CicoNotification.h"
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  default constructor
+ */
+//--------------------------------------------------------------------------
+CicoNotification::CicoNotification()
+    : m_notification(NULL), 
+      m_type(NOTIFICATION_TYPE_NONE)
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  constructor
+ *
+ *  @return notification handle
+ */
+//--------------------------------------------------------------------------
+CicoNotification::CicoNotification(notification_h noti) 
+    : m_notification(noti),
+      m_type(NOTIFICATION_TYPE_NONE)
+{
+    notification_type_e type;
+    notification_get_type(m_notification, &type);
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  destructor
+ */
+//--------------------------------------------------------------------------
+CicoNotification::~CicoNotification()
+{
+#if 0
+    if (NULL != m_notification) {
+        notification_free(m_notification);
+        m_notification = NULL;
+    }
+#endif
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  initialize notification
+ *
+ *  @return type of notification
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotification::Initialize(notification_type_e type)
+{
+    if (NULL != m_notification) {
+        return true;
+    }
+
+    m_notification = notification_create(type);
+    if (NULL == m_notification) {
+        ICO_ERR("notification_create() failed.");
+        return false;
+    }
+
+    m_type = type;
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  terminate notification
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotification::Terminate(void)
+{
+/*
+    if (NULL != m_notification) {
+        notification_error_e err;
+        err = notification_free(m_notification);
+        if (NOTIFICATION_ERROR_NONE != err) {
+            ICO_ERR("notification_free() failed.");
+            return false;
+        }
+        m_notification = NULL;
+    }
+*/
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  unpack notification stracture
+ *
+ *  @return notification handle
+ */
+//--------------------------------------------------------------------------
+notification_h
+CicoNotification::Unpack(void) const
+{
+    return m_notification;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  clone notification stracture
+ *
+ *  @return notification handle
+ */
+//--------------------------------------------------------------------------
+notification_h
+CicoNotification::Clone(void)
+{
+    notification_h ret_noti;
+    notification_error_e err = NOTIFICATION_ERROR_NONE;
+    err = notification_clone(m_notification, &ret_noti);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_clone() failed(%d).", err);
+        return NULL;
+    }
+    return ret_noti;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  check empty notification handle
+ *
+ *  @return empty   state of notification handle
+ *  @retval true    notification handle is null
+ *  @retval false   notification handle not is null
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotification::Empty(void) const
+{
+    return (m_notification == NULL) ? true : false;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  get type of notification
+ *
+ *  @return type of notification
+ */
+//--------------------------------------------------------------------------
+notification_type_e
+CicoNotification::GetType(void) const
+{
+    return m_type;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set package name
+ *
+ *  @param [in] pkgname package name
+ *
+ *  @return result
+ *  @retval true        success
+ *  @retval false       notification handle is null or
+ *                      notification_set_pkgname() failed
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotification::SetPkgname(const char *pkgname)
+{
+    if (NULL == m_notification) {
+        ICO_ERR("notification handle is null.");
+        return false;
+    }
+
+    notification_error_e err = NOTIFICATION_ERROR_NONE;
+    err = notification_set_pkgname(m_notification, pkgname);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_get_pkgname() failed(%d).", err);
+        return false;
+    }
+
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  get package name of notification
+ *
+ *  @return name package
+ */
+//--------------------------------------------------------------------------
+const char *
+CicoNotification::GetPkgname(void)
+{
+    if (NULL == m_notification) {
+        ICO_ERR("notification handle is null.");
+        return NULL;
+    }
+
+    char *caller_pkgname = NULL;
+    notification_error_e err = NOTIFICATION_ERROR_NONE;
+    err = notification_get_pkgname(m_notification, &caller_pkgname);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_get_pkgname() failed(%d).", err);
+        return NULL;
+    }
+
+    return caller_pkgname;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set title of notification
+ *
+ *  @param [in] title   path of icon image
+ *  @return result
+ *  @retval true        success
+ *  @retval false       notification handle is null or
+ *                      notification_set_text() failed
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotification::SetTitle(const char *title)
+{
+    if (NULL == m_notification) {
+        ICO_ERR("notification handle is null.");
+        return false;
+    }
+
+    notification_error_e err = NOTIFICATION_ERROR_NONE;
+    err = notification_set_text(m_notification,
+                                NOTIFICATION_TEXT_TYPE_TITLE,
+                                title,
+                                NULL,
+                                NOTIFICATION_VARIABLE_TYPE_NONE);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_set_text() failed(%d).", err);
+        return false;
+    }
+
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  get title of notification
+ *
+ *  @return text of title
+ */
+//--------------------------------------------------------------------------
+const char *
+CicoNotification::GetTitle(void)
+{
+    if (NULL == m_notification) {
+        ICO_ERR("notification handle is null.");
+        return NULL;
+    }
+
+    notification_error_e err = NOTIFICATION_ERROR_NONE;
+    char *title = NULL;
+    err = notification_get_text(m_notification,
+                                NOTIFICATION_TEXT_TYPE_TITLE,
+                                &title);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_get_text() failed(%d).", err);
+        return NULL;
+    }
+
+    return title;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set content of notification
+ *
+ *  @param [in] content path of icon image
+ *  @return result
+ *  @retval true        success
+ *  @retval false       notification handle is null or
+ *                      notification_set_text() failed
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotification::SetContent(const char *content)
+{
+    if (NULL == m_notification) {
+        ICO_ERR("notification handle is null.");
+        return false;
+    }
+
+    notification_error_e err = NOTIFICATION_ERROR_NONE;
+    err = notification_set_text(m_notification,
+                                NOTIFICATION_TEXT_TYPE_CONTENT,
+                                content,
+                                NULL,
+                                NOTIFICATION_VARIABLE_TYPE_NONE);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_set_text() failed(%d).", err);
+        return false;
+    }
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  get content of notification
+ *
+ *  @return text of content
+ */
+//--------------------------------------------------------------------------
+const char *
+CicoNotification::GetContent(void)
+{
+    if (NULL == m_notification) {
+        ICO_ERR("notification handle is null.");
+        return NULL;
+    }
+
+    notification_error_e err = NOTIFICATION_ERROR_NONE;
+    char *content = NULL;
+    err = notification_get_text(m_notification,
+                                NOTIFICATION_TEXT_TYPE_CONTENT,
+                                &content);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_get_text() failed(%d).", err);
+        return NULL;
+    }
+
+    return content;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set icon path of notification
+ *
+ *  @param [in] path    path of icon image
+ *  @return result
+ *  @retval true        success
+ *  @retval false       notification handle is null or
+ *                      notification_set_icon() failed
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotification::SetIconPath(const char *path)
+{
+    if (NULL == m_notification) {
+        ICO_ERR("notification handle is null.");
+        return false;
+    }
+
+    notification_error_e err = NOTIFICATION_ERROR_NONE;
+    err = notification_set_icon(m_notification, path);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_set_icon() failed(%d).", err);
+        return false;
+    }
+
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  get icon path of notification
+ *
+ *  @return path of icon image
+ */
+//--------------------------------------------------------------------------
+const char *
+CicoNotification::GetIconPath(void)
+{
+    if (NULL == m_notification) {
+        ICO_ERR("notification handle is null.");
+        return NULL;
+    }
+
+    notification_error_e err = NOTIFICATION_ERROR_NONE;
+    char *iconpath = NULL;
+    err = notification_get_icon(m_notification, &iconpath);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_get_icon() failed(%d).", err);
+        return NULL;
+    }
+
+    return iconpath;
+}
+// vim:set expandtab ts=4 sw=4:
diff --git a/lib/notification/CicoNotification.h b/lib/notification/CicoNotification.h
new file mode 100644 (file)
index 0000000..6d0f618
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoNotification.h
+ *
+ *  @brief  This file is definition of CicoNotification class
+ */
+//==========================================================================
+#ifndef __CICO_NOTIFICATION_H__
+#define __CICO_NOTIFICATION_H__
+
+#include <notification.h>
+
+//--------------------------------------------------------------------------
+/**
+ *  @class  CicoNotification
+ *
+ *  @brief  This class provide notification functions
+ */
+//--------------------------------------------------------------------------
+class CicoNotification {
+public:
+    // default constructor
+    CicoNotification();
+
+    // constructor
+    CicoNotification(notification_h noti);
+
+    // destructor
+    ~CicoNotification();
+
+    bool Initialize(notification_type_e type);
+    bool Terminate();
+    notification_h Unpack(void) const;
+    notification_h Clone(void);
+    bool Empty(void) const;
+    notification_type_e GetType(void) const;
+    bool SetPkgname(const char *pkgname);
+    const char *GetPkgname(void);
+    bool SetTitle(const char *title);
+    const char *GetTitle(void);
+    bool SetContent(const char *content);
+    const char *GetContent(void);
+    bool SetIconPath(const char *path);
+    const char *GetIconPath(void);
+
+protected:
+    // assignment operator
+    CicoNotification& operator=(const CicoNotification & object);
+
+    // copy constructor
+    CicoNotification(const CicoNotification & object);
+
+private:
+    notification_h m_notification;
+    notification_type_e m_type;
+};
+#endif // __CICO_NOTIFICATION_H__
+// vim:set expandtab ts=4 sw=4:
diff --git a/lib/notification/CicoNotificationApp.cpp b/lib/notification/CicoNotificationApp.cpp
new file mode 100644 (file)
index 0000000..5765db3
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoNotificationApp.cpp
+ *
+ *  @brief  This file is implemetation of CicoNotificationApp class
+ */
+//==========================================================================
+
+#include <ico_log.h>
+
+#include "CicoNotificationApp.h"
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  default constructor
+ */
+//--------------------------------------------------------------------------
+CicoNotificationApp::CicoNotificationApp()
+    : m_privateid(0)
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  destructor
+ */
+//--------------------------------------------------------------------------
+CicoNotificationApp::~CicoNotificationApp()
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  add notification
+ *
+ *  @param [in] ico notification handle
+ *
+ *  @return result
+ *  @retval true        success
+ *  @retval false       notification handle is null or
+ *                      notification_insert() failed
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotificationApp::Add(CicoNotification noti)
+{
+    if (true == noti.Empty()) {
+        ICO_WRN("notification handle is null.");
+        return false;
+    }
+
+    int retid = 0;
+    notification_error_e err = notification_insert(noti.Unpack(), &retid);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_insert() failed(%d).", err);
+        return false;
+    }
+    m_privateid = retid;
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  update notification
+ *
+ *  @param [in] ico notification handle
+ *
+ *  @return result
+ *  @retval true        success
+ *  @retval false       notification handle is null or
+ *                      notification is not add yet or
+ *                      notification_update() failed
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotificationApp::Update(CicoNotification noti)
+{
+    if ((true == noti.Empty()) || (0 == m_privateid)) {
+        ICO_WRN("notification handle is null. or not add notification.");
+        return false;
+    }
+
+    notification_error_e err = notification_update(noti.Unpack());
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_update() failed(%d).", err);
+        return false;
+    }
+
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  delete notification
+ *
+ *  @param [in] ico notification handle
+ *
+ *  @return result
+ *  @retval true        success
+ *  @retval false       notification handle is null or
+ *                      notification is not add yet or
+ *                      notification_update() failed
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotificationApp::Delete(CicoNotification noti)
+{
+    if ((true == noti.Empty()) || (0 == m_privateid)) {
+        ICO_WRN("notification handle is null. or not add notification.");
+        return false;
+    }
+
+    const char *pkgname = noti.GetPkgname();
+    if (NULL == pkgname) {
+        return false;
+    }
+
+    notification_error_e err = notification_delete_by_priv_id(pkgname,
+                                                              noti.GetType(), 
+                                                              m_privateid);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_delete_by_priv_id() failed(%d).", err);
+        return false;
+    }
+
+    return true;
+}
+// vim:set expandtab ts=4 sw=4:
diff --git a/lib/notification/CicoNotificationApp.h b/lib/notification/CicoNotificationApp.h
new file mode 100644 (file)
index 0000000..adac9e4
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoNotificationApp.h
+ *
+ *  @brief  This file is definition of CicoNotificationApp class
+ */
+//==========================================================================
+#ifndef __CICO_NOTIFICATION_APP_H__
+#define __CICO_NOTIFICATION_APP_H__
+
+#include "CicoNotificationInterface.h"
+
+//--------------------------------------------------------------------------
+/**
+ *  @class  CicoNotificationApp
+ *
+ *  @brief  This class provide interface of notification for application
+ */
+//--------------------------------------------------------------------------
+class CicoNotificationApp : public CicoNotificationAppInterface
+{
+public:
+    // default constructor
+    CicoNotificationApp();
+
+    // constructor
+    ~CicoNotificationApp();
+
+    // add notification
+    bool Add(CicoNotification noti);
+
+    // update notification
+    bool Update(CicoNotification noti);
+
+    // delete notification
+    bool Delete(CicoNotification noti);
+
+private:
+    // private id of notification
+    int m_privateid;
+};
+#endif // __CICO_NOTIFICATION_APP_H__
+// vim:set expandtab ts=4 sw=4:
diff --git a/lib/notification/CicoNotificationInterface.h b/lib/notification/CicoNotificationInterface.h
new file mode 100644 (file)
index 0000000..8b2096b
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoNotificationInterface.h
+ *
+ *  @brief  This file is definition of CicoNotificationInterface class
+ */
+//==========================================================================
+#ifndef __CICO_NOTIFICATION_INTERFACE_H__
+#define __CICO_NOTIFICATION_INTERFACE_H__
+
+#include "CicoNotification.h"
+
+//--------------------------------------------------------------------------
+/**
+ *  @class  CicoNotificationAppInterface
+ *
+ *  @brief  This class provide notification interface for application
+ */
+//--------------------------------------------------------------------------
+class CicoNotificationAppInterface
+{
+public:
+    // add notification
+    virtual bool Add(CicoNotification noti) = 0;
+
+    // update notification
+    virtual bool Update(CicoNotification noti) = 0;
+
+    // delete notification
+    virtual bool Delete(CicoNotification noti) = 0;
+};
+
+//--------------------------------------------------------------------------
+/**
+ *  @class  CicoNotificationServiceInterface
+ *
+ *  @brief  This class provide notification interface for service
+ */
+//--------------------------------------------------------------------------
+class CicoNotificationServiceInterface
+{
+public:
+    // set callback fucntion
+    virtual bool SetCallback(void (*detailed_changed_cb)
+                             (void *data, 
+                              notification_type_e type, 
+                              notification_op *op_list, 
+                              int num_op),
+                             void *user_data) = 0;
+
+    // unset callback fucntion
+    virtual bool UnsetCallback(void (*detailed_changed_cb)
+                               (void *data, 
+                                notification_type_e type, 
+                                notification_op *op_list, 
+                                int num_op)) = 0;
+};
+#endif // __CICO_NOTIFICATION_INTERFACE_H__
+// vim:set expandtab ts=4 sw=4:
diff --git a/lib/notification/CicoNotificationService.cpp b/lib/notification/CicoNotificationService.cpp
new file mode 100644 (file)
index 0000000..8afd007
--- /dev/null
@@ -0,0 +1,208 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoNotificationService.cpp
+ *
+ *  @brief  This file is implemetation of CicoNotificationService class
+ */
+//==========================================================================
+
+#include <ico_log.h>
+
+#include "CicoNotificationService.h"
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  default constructor
+ */
+//--------------------------------------------------------------------------
+CicoNotificationService::CicoNotificationService()
+    : m_privateid(0), 
+      m_user_data(NULL)
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  destructor
+ */
+//--------------------------------------------------------------------------
+CicoNotificationService::~CicoNotificationService()
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  add notification
+ *
+ *  @param [in] ico notification handle
+ *
+ *  @return result
+ *  @retval true        success
+ *  @retval false       notification handle is null or
+ *                      notification_insert() failed
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotificationService::Add(CicoNotification noti)
+{
+    if (true == noti.Empty()) {
+        ICO_WRN("notification handle is null.");
+        return false;
+    }
+
+    int retid = 0;
+    notification_error_e err = notification_insert(noti.Unpack(), &retid);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_insert() failed(%d).", err);
+        return false;
+    }
+    m_privateid = retid;
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  update notification
+ *
+ *  @param [in] ico notification handle
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotificationService::Update(CicoNotification noti)
+{
+    if ((true == noti.Empty()) || (0 == m_privateid)) {
+        ICO_WRN("notification handle is null. or not add notification.");
+        return false;
+    }
+
+    notification_error_e err = notification_update(noti.Unpack());
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_update() failed(%d).", err);
+        return false;
+    }
+
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  delete notification
+ *
+ *  @param [in] ico notification handle
+ *
+ *  @return result
+ *  @retval true        success
+ *  @retval false       notification handle is null or
+ *                      notification is not add yet or
+ *                      notification_update() failed
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotificationService::Delete(CicoNotification noti)
+{
+    if ((true == noti.Empty()) || (0 == m_privateid)) {
+        ICO_WRN("notification handle is null. or not add notification.");
+        return false;
+    }
+
+    const char *pkgname = noti.GetPkgname();
+    if (pkgname == NULL) {
+        return false;
+    }
+
+    notification_error_e err = notification_delete_by_priv_id(pkgname,
+                                                              noti.GetType(),
+                                                              m_privateid);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_delete_by_priv_id() failed(%d).", err);
+        return false;
+    }
+
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set callback function of notification 
+ *
+ *  @param [in] detailed_changed_cb callback function
+ *  @param [in] user_data           user data
+ *
+ *  @return result
+ *  @retval true    success
+ *  @retval false   callback function is already register or
+ *                  notification_register_detailed_changed_cb failed
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotificationService::SetCallback(void (*detailed_changed_cb)
+                                     (void *data,
+                                      notification_type_e type,
+                                      notification_op *op_list,
+                                      int num_op),
+                                     void *user_data)
+{
+    if (NULL != m_user_data) {
+        ICO_WRN("callback function is already register.");
+        return false;
+    }
+
+    notification_error_e err = NOTIFICATION_ERROR_NONE;
+    err = notification_register_detailed_changed_cb(detailed_changed_cb,
+                                                    user_data);
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_register_detailed_changed_cb() failed(%d).", err);
+        return false;
+    }
+
+    m_user_data = user_data;
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  unset callback function of notification 
+ *
+ *  @param [in] detailed_changed_cb callback function
+ *  @param [in] user_data           user data
+ *
+ *  @return result
+ *  @retval true    success
+ *  @retval false   callback function is not register or
+ *                  notification_unregister_detailed_changed_cb failed
+ */
+//--------------------------------------------------------------------------
+bool
+CicoNotificationService::UnsetCallback(void (*detailed_changed_cb)
+                                       (void *data,
+                                        notification_type_e type,
+                                        notification_op *op_list,
+                                        int num_op))
+{
+    if (NULL != m_user_data) {
+        ICO_WRN("callback function is not register.");
+        return false;
+    }
+
+    notification_error_e err = NOTIFICATION_ERROR_NONE;
+    err = notification_unregister_detailed_changed_cb(detailed_changed_cb,
+                                                      m_user_data);
+    m_user_data = NULL;
+    if (NOTIFICATION_ERROR_NONE != err) {
+        ICO_ERR("notification_unregister_detailed_changed_cb() failed(%d).",
+                err);
+        return false;
+    }
+
+    return true;
+}
+// vim:set expandtab ts=4 sw=4:
diff --git a/lib/notification/CicoNotificationService.h b/lib/notification/CicoNotificationService.h
new file mode 100644 (file)
index 0000000..f115209
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoNotificationService.h
+ *
+ *  @brief  This file is definition of CicoNotificationService class
+ */
+//==========================================================================
+#ifndef __CICO_NOTIFICATION_SERVICE_H__
+#define __CICO_NOTIFICATION_SERVICE_H__
+
+#include "CicoNotificationInterface.h"
+
+//--------------------------------------------------------------------------
+/**
+ *  @class  CicoNotificationService
+ *
+ *  @brief  This class provide interface of notification for service
+ */
+//--------------------------------------------------------------------------
+class CicoNotificationService : public CicoNotificationAppInterface,
+                                       CicoNotificationServiceInterface
+{
+public:
+    // default constructor
+    CicoNotificationService();
+
+    // constructor
+    ~CicoNotificationService();
+
+    // add notification
+    bool Add(CicoNotification noti);
+
+    // update notification
+    bool Update(CicoNotification noti);
+
+    // delete notification
+    bool Delete(CicoNotification noti);
+
+    // set callback function
+    bool SetCallback(void (*detailed_changed_cb)
+                     (void *data, 
+                      notification_type_e type, 
+                      notification_op *op_list, 
+                      int num_op), 
+                     void *user_data);
+
+    // unset callback function
+    bool UnsetCallback(void (*detailed_changed_cb)
+                       (void *data, 
+                        notification_type_e type, 
+                        notification_op *op_list, 
+                        int num_op));
+
+private:
+    // private id of notification
+    int m_privateid;
+
+    // user date for callback function
+    void *m_user_data;
+};
+#endif // __CICO_NOTIFICATION_SERVICE_H__
+// vim:set expandtab ts=4 sw=4:
diff --git a/lib/notification/Makefile.am b/lib/notification/Makefile.am
new file mode 100644 (file)
index 0000000..b022d14
--- /dev/null
@@ -0,0 +1,45 @@
+AM_CPPFLAGS = $(GCC_CXXFLAGS)
+
+noinst_LTLIBRARIES =\
+       libico-notification.la
+
+#lib_LTLIBRARIES =\
+#      libico-system-controller.la
+
+libico_notification_la_LDFLAGS = -version-info 0:9:0 
+libico_notification_la_SOURCES =       \
+       CicoNotification.cpp                    \
+       CicoNotificationApp.cpp                 \
+       CicoNotificationService.cpp
+
+libico_notification_la_CPPFLAGS =      \
+       $(GCC_CXXFLAGS)                                 \
+       $(NOTIFICATION_CFLAGS)                  \
+       @ECORE_CFLAGS@                                  \
+       @EINA_CFLAGS@                                   \
+       @GLIB_CFLAGS@                                   \
+       @AIL_CFLAGS@                                    \
+       @BUNDLE_CFLAGS@                                 \
+       @AUL_CFLAGS@                                    \
+       @PKGMGR_CFLAGS@                                 \
+       @CAPIAPPFWAPPLICATION_CFLAGS@   \
+       $(UWS_CFLAGS)                                   \
+       -I../../include
+
+libico_notification_la_LIBADD =                \
+       $(NOTIFICATION_LIBS)                    \
+       @ECORE_LIBS@                                    \
+       @EINA_LIBS@                                             \
+       @GLIB_LIBS@                                             \
+       @AIL_LIBS@                                              \
+       @BUNDLE_LIBS@                                   \
+       @AUL_LIBS@                                              \
+       @PKGMGR_LIBS@                                   \
+       @CAPIAPPFWAPPLICATION_LIBS@             \
+       $(UWS_LIBS)
+
+AM_LDFLAGS = -module -avoid-version -rpath $(libdir)
+
+.FORCE :
+
+# vim:set ts=4 sw=4:
index 0ac98e3..1f3a0d8 100644 (file)
@@ -445,8 +445,38 @@ CicoSCResourceManager::acquireDisplayResource(resource_request_t *newreq,
         }
     }
 
+    bool displayMatch = false;
     // 
     if (req != newreq) {
+        char zoneO[128],zoneN[128];
+        zoneO[0] = zoneN[0] = '\0';
+        if ((NULL != req) && (NULL != req->dispzone)) {
+            char* d = zoneO;
+            const char* s = req->dispzone;
+            while ('\0' != *s) {  // is stop code
+                if ('.' == *s) {  // DISPLAY.ZONE found a period
+                    break;  // break of while
+                }
+                *d++ = *s++; // char copy
+            }
+            *d='\0';  // set stop code
+        }
+        if ((NULL != newreq) && (NULL != newreq->dispzone)) {
+            char* d = zoneO;
+            const char* s = newreq->dispzone;
+            while ('\0' != *s) {  // is stop code
+                if ('.' == *s) {  // DISPLAY.ZONE found a period
+                    break;  // break of while
+                }
+                *d++ = *s++;  // char copy
+            }
+            *d='\0';  // set stop code
+        }
+        if ((0 != strlen(zoneO)) || (0 != strlen(zoneN))) {
+            if (0 == strcmp(zoneO, zoneN)) {
+                displayMatch = true;
+            }
+        }
         // update request data
         req->dispzoneid = newreq->dispzoneid;
         if (NULL != req->dispzone) free(req->dispzone);
@@ -474,15 +504,17 @@ CicoSCResourceManager::acquireDisplayResource(resource_request_t *newreq,
     bool state = m_policyMgr->acquireDisplayResource(type,
                                                      req->dispzoneid,
                                                      req->prio);
-    if (true == state) {
+    if ((true == state) && (false == displayMatch)){
         updateDisplayResource(req, chgzone);
     }
     else {
-        if (-1 != chgzone) {
-            // move request window
-            m_winCtrl->setGeometry(req->surfaceid, req->dispzone, req->layerid,
-                                   req->animation, req->animationTime,
-                                   req->animation, req->animationTime);
+        if ((-1 != chgzone) || (true == displayMatch)) {
+            if (NULL != m_winCtrl) {
+                // move request window
+                m_winCtrl->setGeometry(req->surfaceid, req->dispzone, req->layerid,
+                                       req->animation, req->animationTime,
+                                       req->animation, req->animationTime);
+            }
         }
         else {
             // just in case, hide window
@@ -935,7 +967,9 @@ CicoSCResourceManager::updateDisplayResource(resource_request_t *req,
                     req->appid, req->pid, req->surfaceid);
             // show request window
             m_winCtrl->show(req->surfaceid, req->animation, req->animationTime);
+#if 0 // MKMK
             m_winCtrl->activeCB(NULL, NULL, req->surfaceid, -1);
+#endif
             ICO_TRA("CicoSCResourceManager::updateDisplayResource Leave");
             return;
         }
@@ -1838,7 +1872,7 @@ CicoSCResourceManager::updateSoundResRegulationPreProc(resource_request_t *req)
                         waitreq, waitreq->soundzoneid,
                         waitreq->soundzone, waitreq->appid);
                 ICO_PRF("CHG_GUI_RES sound   acquired zone=%02d:%s appid=%s",
-                        waitreq->soundzoneid, waitreq->soundzoneid,
+                        waitreq->soundzoneid, waitreq->soundzone,
                         waitreq->appid);
                 m_curSoundResReq[curreq->soundzoneid] = waitreq;
             }
index 7c9d944..09198c3 100644 (file)
@@ -967,6 +967,30 @@ CicoSCWindowController::active(int surfaceid, int target)
 
 //--------------------------------------------------------------------------
 /**
+ *  @brief   set surface map buffer
+ *
+ *  @param [in] shmname     shared memory name (POSIX I/F)
+ *  @param [in] bufsize     shared memory buffer size
+ *  @param [in] bufnum      number of shared memory buffer
+ *
+ *  @return ICO_SYC_EOK on success, other on error(currently EOK only)
+ *  @retval ICO_SYC_EOK     success
+ */
+//--------------------------------------------------------------------------
+int
+CicoSCWindowController::setmapBuffer(const char *shmname, int bufsize, int bufnum)
+{
+    ICO_TRA("CicoSCWindowController::setmapBuffer Enter");
+
+    CicoSCWlWinMgrIF::setmapBuffer(shmname, bufsize, bufnum);
+    CicoSCWayland::getInstance()->flushDisplay();
+
+    ICO_TRA("CicoSCWindowController::setmapBuffer Leave(EOK)");
+    return ICO_SYC_EOK;
+}
+
+//--------------------------------------------------------------------------
+/**
  *  @brief   map surface
  *
  *  @param [in] surfaceid   wayland surface id
@@ -1215,7 +1239,6 @@ CicoSCWindowController::createdCB(void                  *data,
     message->addArgObject("winname", window->name);
     CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
 
-#if 1
     if (NULL != m_resMgr) {
         CicoSCCommand cmd;
         CicoSCCmdResCtrlOpt *opt = new CicoSCCmdResCtrlOpt();
@@ -1255,7 +1278,6 @@ CicoSCWindowController::createdCB(void                  *data,
     else {
         show(window->surfaceid, NULL, 0);
     }
-#endif
 
     ICO_TRA("CicoSCWindowController::createdCB Leave");
 }
@@ -1719,6 +1741,7 @@ CicoSCWindowController::mapSurfaceCB(void                  *data,
     message->addRootObject("command", command);
     message->addRootObject("appid", window->appid);
     message->addArgObject("surface", window->surfaceid);
+    message->addArgObject("attr", type);
     message->addArgObject("name", target);
     message->addArgObject("width", width);
     message->addArgObject("height", height);
@@ -1988,6 +2011,10 @@ CicoSCWindowController::handleCommand(const CicoSCCommand * cmd)
         ICO_DBG("command: MSG_CMD_CHANGE_LAYER");
         (void)setWindowLayer(opt->surfaceid, opt->layerid);
         break;
+    case MSG_CMD_MAP_BUFFER:
+        ICO_DBG("command: MSG_CMD_MAP_BUFFER");
+        (void)setmapBuffer(opt->animation.c_str(), opt->width, opt->height);
+        break;
     case MSG_CMD_MAP_THUMB:
         ICO_DBG("command: MSG_CMD_MAP_THUMB");
         (void)mapSurface(opt->surfaceid, opt->framerate);
index b3f9d87..cf0f81f 100644 (file)
@@ -110,6 +110,8 @@ public:
 
     int active(int surfaceid, int target);
 
+    int setmapBuffer(const char *shmname, int bufsize, int bufnum);
+
     int mapSurface(int surfaceid, int framerate);
 
     int unmapSurface(int surfaceid);
index b69c23f..15695d6 100644 (file)
@@ -334,6 +334,23 @@ CicoSCWlWinMgrIF::getSurfaces(const char *appid, int pid)
 
 //--------------------------------------------------------------------------
 /** 
+ *  @brief   wrapper function of ico_window_mgr_set_map_buffer
+ *  
+ *  @param[in]  shmname     shared memory name(POSIX I/F)
+ *  @param[in]  bufsize     buffer size in byte
+ *  @param[in]  bufnum      number of buffers
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCWlWinMgrIF::setmapBuffer(const char *shmname, int bufsize, int bufnum)
+{
+    ICO_DBG("called: ico_window_mgr_set_map_buffer(shmname=%s, bufsize=%d, bufnum=%d)",
+            shmname ? shmname : "(null)", bufsize, bufnum);
+    ico_window_mgr_set_map_buffer(m_winmgr, shmname, bufsize, bufnum);
+}
+
+//--------------------------------------------------------------------------
+/** 
  *  @brief   wrapper function of ico_window_mgr_map_surface
  *  
  *  @param [in] surface     id of wayland surface
index c8bcf1f..dab9d30 100644 (file)
@@ -166,6 +166,9 @@ protected:
     // wrapper function of ico_window_mgr_get_surfaces
     void getSurfaces(const char *appid, int32_t pid);
 
+    // wrapper function of ico_window_mgr_set_map_buffer
+    void setmapBuffer(const char *shmname, int bufsize, int bufnum);
+
     // wrapper function of ico_window_mgr_map_surface
     void mapSurface(uint32_t surfaceid, int32_t framerate);
 
index d2a9c68..69c3f0b 100644 (file)
@@ -1,3 +1,8 @@
+* Fri Jan 24 2014 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/ivi/release/20140109.181708@cae10ac
+- 0.9.12 release
+-- revise: live thumbnail display processing is changed into GPU un-depending
+-- bugfix: TIVI-2290 Reinstalling ico-uxf-homescreen causes black screen
+
 * Thu Dec 26 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen_ivi_stable/20131119.040218@878f49e
 - 0.9.10 release
 -- bug fix: An action is inaccurate when the menu of HomeScreen is multi-touched
@@ -37,7 +42,7 @@
 -- bugfix : display history order is not reproduced.
 -- bugfix: when show app in second display, crash homescreen
 -- bugfix: the prev swipe operation, failure occurs to the next swipe
--- updated homescreen service file.(delete Type=oneshot) 
+-- updated homescreen service file.(delete Type=oneshot)
 
 * Thu Sep 19 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/20130911.211140@65dbd1c
 - 0.9.03 release.
 
 * Wed Jun 12 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/2.0alpha-wayland/20130606.173158@c36bbb6
 - 0.3.06 release
-- Fix for TIVI-840 - [WLD] Nothing rendered when launching Contacts app 
+- Fix for TIVI-840 - [WLD] Nothing rendered when launching Contacts app
   Change the way of setting argument.
 - Fix for TIVI-987 - [WLD]App priority does not work
   A priority judgment error of the interrupt image right.
 - fixed reduced some memory leaks.
 
 * Fri Apr 26 19:15:52 UTC 2013 - tracy.graydon@intel.com
-- Setting up 2.0alpha-wayland branch (master not used for IVI) 
+- Setting up 2.0alpha-wayland branch (master not used for IVI)
 
 * Fri Apr 26 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> d21d2c0
 - Import initial.
index 58cf25d..429ce8c 100644 (file)
@@ -1,14 +1,14 @@
 Name:       ico-uxf-homescreen
 Summary:    Sample homescreen and system controller
-Version:    0.9.10
-Release:    1.1
+Version:    0.9.12
+Release:    1.2
 Group:         Graphics & UI Framework/Automotive UI
 License:    Apache-2.0
 URL:        ""
 Source0:    %{name}-%{version}.tar.bz2
 
 BuildRequires: pkgconfig(wayland-client) >= 1.2
-BuildRequires: ico-uxf-weston-plugin-devel >= 0.9.08
+BuildRequires: ico-uxf-weston-plugin-devel >= 0.9.09
 BuildRequires: pkgconfig(glib-2.0)
 BuildRequires: pkgconfig(ecore)
 BuildRequires: pkgconfig(ecore-wayland)
@@ -30,11 +30,12 @@ BuildRequires: pkgconfig(murphy-common)
 BuildRequires: pkgconfig(murphy-domain-controller)
 BuildRequires: pkgconfig(murphy-ecore)
 BuildRequires: pkgconfig(murphy-resource)
+BuildRequires: pkgconfig(notification)
 BuildRequires: boost-devel
 BuildRequires: mesa-devel
-BuildRequires: ico-uxf-utilities-devel
+BuildRequires: ico-uxf-utilities-devel >= 0.9.06
 Requires: weston >= 1.2
-Requires: ico-uxf-weston-plugin >= 0.9.08
+Requires: ico-uxf-weston-plugin >= 0.9.09
 Requires: ico-uxf-utilities >= 0.9.06
 
 %description
@@ -76,27 +77,34 @@ cp tool/ico_change_loginuser %{buildroot}%{_bindir}
 /sbin/ldconfig
 
 # Update the app database.
-%{_bindir}/pkg_initdb
-%{_bindir}/ail_initdb
+%{_bindir}/pkginfo --imd /usr/share/packages/org.tizen.ico.homescreen.xml
+%{_bindir}/pkginfo --imd /usr/share/packages/org.tizen.ico.statusbar.xml
+%{_bindir}/pkginfo --imd /usr/share/packages/org.tizen.ico.system-controller.xml
+%{_bindir}/pkginfo --imd /usr/share/packages/org.tizen.ico.onscreen.xml
+
+%preun
+# Update the app database.
+%{_bindir}/pkginfo --rmd /usr/share/packages/org.tizen.ico.homescreen.xml
+%{_bindir}/pkginfo --rmd /usr/share/packages/org.tizen.ico.statusbar.xml
+%{_bindir}/pkginfo --rmd /usr/share/packages/org.tizen.ico.system-controller.xml
+%{_bindir}/pkginfo --rmd /usr/share/packages/org.tizen.ico.onscreen.xml
 
 %postun
 /sbin/ldconfig
 rm -f /usr/share/applications/org.tizen.ico.homescreen.desktop
 rm -f /usr/share/applications/org.tizen.ico.statusbar.desktop
+rm -f /usr/share/applications/org.tizen.ico.onscreen.desktop
 rm -f /usr/share/applications/org.tizen.ico.system-controller.desktop
-rm -f /home/app/layout.txt
-
-# Update the app database.
-%{_bindir}/pkg_initdb
-%{_bindir}/ail_initdb
 
 %files
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
 /usr/apps/org.tizen.ico.homescreen
 /usr/apps/org.tizen.ico.statusbar
+/usr/apps/org.tizen.ico.onscreen
 /usr/share/packages/org.tizen.ico.homescreen.xml
 /usr/share/packages/org.tizen.ico.statusbar.xml
+/usr/share/packages/org.tizen.ico.onscreen.xml
 %{_libdir}/libico-appfw.*
 %{_libdir}/libico-state-machine.*
 /usr/apps/org.tizen.ico.system-controller
index 79bb42b..3132695 100644 (file)
@@ -1,12 +1,51 @@
-## statusbar private configration
+##===========================================================================
+#
+#   StatusBar application configuration file
+#
+#===========================================================================
+
+#---------------------------------------------------------------------------
+#   statusbar private configration
+#---------------------------------------------------------------------------
 [statusbar]
 wsport=10001
+
 ##orientation(1:VERTICAL, 2:HORIZONTAL)
 #orientation=2
 
 shortcut_app0=org.tizen.ico.app-samplenavi
 shortcut_app1=org.tizen.music-player
 
+#---------------------------------------------------------------------------
+#   StatusBar application log setting
+#
+#   -- filename
+#       log file name
+#   -- loglevel
+#       none        : all level log print off
+#       all         : all level log print on
+#       performance : perfromance log print on
+#       trace       : trace log print on
+#       debug       : debug log print on
+#       info        : info log print on
+#       warning     : warning log print on
+#       critical    : critical print on
+#       error       : error print on
+#   -- logflush
+#       on  : log output with log flush
+#       off : log output without log flush
+#   -- ecorelog
+#       on  : ecore log print enabled
+#       off : ecore log print disabled
+#---------------------------------------------------------------------------
+[log]
+filename=StatusBar
+loglevel=all
+logflush=on
+ecorelog=on
+
+##---------------------------------------------------------------------------
+#   configuration for sounds
+#----------------------------------------------------------------------------
 [sound]
-#configuration for sounds
 sound_default=/usr/share/sounds/mm-camcorder/af_succeed.wav
index 8500249..959d54b 100644 (file)
@@ -1,4 +1,5 @@
 SUBDIRS= \
        syscond         \
        homescreen      \
-       statusbar
+       statusbar       \
+       onscreen
index 4d05a4c..d8caf55 100644 (file)
@@ -12,7 +12,7 @@
  * @date    Dec-18-2013
  */
 
-using namespace std;
+#include <string>
 #include "CicoHSAppControl.h"
 #include "CicoHomeScreen.h"
 #include "CicoHSCommand.h"
@@ -20,6 +20,7 @@ using namespace std;
 
 #include <ico_log.h>
 #include "ico_syc_msg_cmd_def.h"
+using namespace std;
 
 /*============================================================================*/
 /* static members                                                             */
@@ -91,8 +92,12 @@ CicoHSAppControl::handleCommand(const CicoHSCommand * cmd)
 {
     ICO_TRA("CicoHSAppControl::handleCommand Enter(%d)", cmd->cmdid);
 
-    CicoHSCmdAppCtlOpt *opt = static_cast<CicoHSCmdAppCtlOpt*>(cmd->opt);
     int ret = -1;
+    CicoHSCmdAppCtlOpt *opt = static_cast<CicoHSCmdAppCtlOpt*>(cmd->opt);
+    if((opt->arg).empty() == true) {
+        ICO_WRN("arg parameter is not set up");
+        return;
+    }
     vector<CicoHSCommandArg>::iterator it = opt->arg.begin();
 
     switch (cmd->cmdid) {
@@ -151,7 +156,7 @@ CicoHSAppControl::GetAppId(int pid, string& appid)
     ICO_TRA("CicoHSAppControl::GetAppId Enter");
 
     if (pid == -1 ) {
-        ICO_ERR("No pid");
+        ICO_WRN("No pid");
         return -1;
     }
 
@@ -212,6 +217,16 @@ CicoHSAppControl::MoveApp(const string& appid, const string& zone)
 {
     ICO_TRA("CicoHSAppControl::MoveApp Enter");
 
+    if(appid.empty() == true) {
+        ICO_WRN("No appid");
+        return;
+    }
+
+    if(zone.empty() == true) {
+        ICO_WRN("No zone");
+        return;
+    }
+
     CicoHomeScreen::MoveApp(appid, zone);
 
     ICO_TRA("CicoHSAppControl::MoveApp Leave");
@@ -231,6 +246,11 @@ CicoHSAppControl::ShowApp(const string& appid)
 {
     ICO_TRA("CicoHSAppControl::ShowApp Enter");
 
+    if(appid.empty() == true) {
+        ICO_WRN("No appid");
+        return;
+    }
+
     CicoHomeScreen::ShowApp(appid);
 
     ICO_TRA("CicoHSAppControl::ShowApp Leave");
@@ -250,6 +270,11 @@ CicoHSAppControl::HideApp(const string& appid)
 {
     ICO_TRA("CicoHSAppControl::HideApp Enter");
 
+    if(appid.empty() == true) {
+        ICO_WRN("No appid");
+        return;
+    }
+
     CicoHomeScreen::HideApp(appid);
 
     ICO_TRA("CicoHSAppControl::HideApp Leave");
@@ -269,6 +294,11 @@ CicoHSAppControl::ExecuteApp(const string& appid)
 {
     ICO_TRA("CicoHSAppControl::ExecuteApp Enter");
 
+    if(appid.empty() == true) {
+        ICO_WRN("No appid");
+        return;
+    }
+
     CicoHomeScreen::ExecuteApp(appid.c_str());
 
     ICO_TRA("CicoHSAppControl::ExecuteApp Leave");
@@ -288,6 +318,11 @@ CicoHSAppControl::TerminateApp(const string& appid)
 {
     ICO_TRA("CicoHSAppControl::TerminateApp Enter");
 
+    if(appid.empty() == true) {
+        ICO_WRN("No appid");
+        return;
+    }
+
     CicoHomeScreen::TerminateApp(appid.c_str());
 
     ICO_TRA("CicoHSAppControl::TerminateApp Leave");
@@ -311,7 +346,7 @@ CicoHSAppControl::WinChgControl(vector<CicoHSCommandArg>& arg)
     // Check show control and appid get
     bool bShow = false;
     vector<CicoHSCommandArg>::iterator it = arg.begin();
-    while ( it != arg.end() ) {
+    while (it != arg.end()) {
         if (true == (it->m_appid).empty()) {
             if (0 != GetAppId(it->m_pid, it->m_appid)) {
                 ++it;
@@ -337,13 +372,18 @@ CicoHSAppControl::WinChgControl(vector<CicoHSCommandArg>& arg)
         ++it;
     }
     // Show set
+    string lastShowApp;
     it = arg.begin();
     while ( it != arg.end() ) {
         if ((1 == it->m_visible) && (false == (it->m_appid).empty())) {
             WinChangeApp(it->m_appid, it->m_zone, it->m_visible);
+            lastShowApp = it->m_appid;
         }
         ++it;
     }
+    if (false == lastShowApp.empty()) {
+        CicoHomeScreen::ActivationUpdate();
+    }
     ICO_TRA("end");
     return true;
 }
index f16b52b..688d520 100644 (file)
@@ -216,8 +216,8 @@ CicoHSCommand::getArgArray(const ptree& pt, std::vector<CicoHSCommandArg>& vArg)
         string Pzone;
         const char* sAppid = NULL;
         const char* sZone = NULL;
-        int iPid = 0;
-        int iVisible = 0;
+        int iPid = -1;
+        int iVisible = -1;
         try {
             // arg.appid
             if (boost::optional<std::string> appid = info.get_optional<std::string>("appid")) {
@@ -269,7 +269,7 @@ CicoHSCommand::getArg(const ptree& pt, std::vector<CicoHSCommandArg>& vArg)
     string Pzone;
     const char* sAppid = NULL;
     const char* sZone = NULL;
-    int iPid = 0;
+    int iPid = -1;
     int iVisible = -1;
 
     try {
@@ -301,7 +301,7 @@ CicoHSCommand::getArg(const ptree& pt, std::vector<CicoHSCommandArg>& vArg)
     }
 
 //    if (((NULL != sAppid) || (0 != iPid)) && ((NULL != sZone) || (-1 != iVisible))) {
-    if (((NULL != sAppid) || (0 != iPid))) {
+    if (((NULL != sAppid) || (-1 != iPid))) {
         vArg.push_back(CicoHSCommandArg(sAppid, sZone, iVisible, iPid));
         return true;
     }
index 3039471..cf6ef76 100644 (file)
@@ -42,8 +42,8 @@ CicoHSCommandArg::CicoHSCommandArg()
 {
     m_appid = "";
     m_zone = "";
-    m_visible = 0;
-    m_pid = 0;
+    m_visible = -1;
+    m_pid = -1;
 }
 
 //--------------------------------------------------------------------------
index 34439bb..8d68caf 100644 (file)
@@ -38,7 +38,7 @@ public:
     CicoHSCommandArg(const char* appid,
                 const char* zone,
                 int visible,
-                int pid=0);
+                int pid);
     // destructor
      ~CicoHSCommandArg();
 
index 2437295..21572d6 100644 (file)
  */
 #include "CicoHSMenuTile.h"
 #include "CicoHSMenuTouch.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <ico_window_mgr.h>
 
 /*============================================================================*/
 /* static members                                                             */
 /*============================================================================*/
 static int _CicoHSMenuTile_initialized = 0;
 struct _CicoHSMenuTile_glfunc CicoHSMenuTile::glfunc;
+char *CicoHSMenuTile::thumbmapbuffer = NULL;
 
 static void SetYinvert(Evas_Object *obj);
 
@@ -44,6 +51,8 @@ CicoHSMenuTile::CicoHSMenuTile(const char *appid,
                                int page, int subpage,
                                int position, int width, int height)
 {
+    int     shmfd;
+
     ICO_TRA("CicoHSMenuTile::CicoHSMenuTile Enter");
     if (_CicoHSMenuTile_initialized == 0)  {
         // Initialize and setting OpenGL/EGL functions
@@ -63,13 +72,46 @@ CicoHSMenuTile::CicoHSMenuTile(const char *appid,
             if ((! CicoHSMenuTile::glfunc.create_image) ||
                 (! CicoHSMenuTile::glfunc.image_target_texture_2d) ||
                 (! CicoHSMenuTile::glfunc.destroy_image))   {
-                ICO_ERR("CicoHSMenuTile::CicoHSMenuTile: can not get EGL functions");
-                _CicoHSMenuTile_initialized = -1;
+                ICO_WRN("CicoHSMenuTile::CicoHSMenuTile: can not get EGL functions");
+                _CicoHSMenuTile_initialized = 2;
             }
         }
         else    {
-            _CicoHSMenuTile_initialized = -1;
-            ICO_ERR("CicoHSMenuTile::CicoHSMenuTile: can not initialize OpenGL/EGL");
+            _CicoHSMenuTile_initialized = 2;
+            ICO_WRN("CicoHSMenuTile::CicoHSMenuTile: can not initialize OpenGL/EGL");
+        }
+
+        // create shared memory buffer for non EGL surface
+        CicoHSMenuTile::thumbmapbuffer = NULL;
+        shmfd = shm_open(ICO_HS_SHMBUFFER_NAME, O_RDWR|O_CREAT, 0600);
+        if (shmfd == -1)    {
+            ICO_ERR("CicoHSMenuTile::CicoHSMenuTile: can not open shared memory buffer");
+            _CicoHSMenuTile_initialized = -2;
+        }
+        else    {
+            if (ftruncate(shmfd, ICO_HS_SHMBUFFER_SIZE * ICO_HS_SHMBUFFER_NUM) == -1)   {
+                ICO_ERR("CicoHSMenuTile::CicoHSMenuTile: can not truncate shared memory buffer");
+                _CicoHSMenuTile_initialized = -2;
+            }
+            else    {
+                CicoHSMenuTile::thumbmapbuffer = (char *)
+                                mmap(NULL, ICO_HS_SHMBUFFER_SIZE * ICO_HS_SHMBUFFER_NUM,
+                                     PROT_READ|PROT_WRITE, MAP_SHARED, shmfd, 0);
+                if (CicoHSMenuTile::thumbmapbuffer == NULL) {
+                    ICO_ERR("CicoHSMenuTile::CicoHSMenuTile: can not map shared memory buffer");
+                    _CicoHSMenuTile_initialized = -2;
+                }
+                else    {
+                    memset(CicoHSMenuTile::thumbmapbuffer, 0,
+                           ICO_HS_SHMBUFFER_SIZE * ICO_HS_SHMBUFFER_NUM);
+                    ico_syc_map_buffer(ICO_HS_SHMBUFFER_NAME,
+                                       ICO_HS_SHMBUFFER_SIZE, ICO_HS_SHMBUFFER_NUM);
+                }
+            }
+            close(shmfd);
+            if (CicoHSMenuTile::thumbmapbuffer == NULL) {
+                shm_unlink(ICO_HS_SHMBUFFER_NAME);
+            }
         }
     }
 
@@ -83,9 +125,14 @@ CicoHSMenuTile::CicoHSMenuTile(const char *appid,
         strncpy(this->icon_image_path,ICO_HS_MENUTILE_DEFAULT_ICON_PATH,
                 ICO_HS_MAX_PATH_BUFF_LEN);
     }
-    ICO_DBG("CicoHSMenuTile::CicoHSMenuTile:image_path %s:%s",appid,this->icon_image_path);
+    ICO_DBG("CicoHSMenuTile::CicoHSMenuTile:image_path %s:%s",
+            appid, this->icon_image_path);
     thumb.surface = 0;
     thumb.fbcount = 0;
+    thumb.name = 0;
+    thumb.image = NULL;
+    thumb.texture = 0;
+    thumb.pixel_data = NULL;
     this->page = page;
     this->subpage = subpage;
     this->position = position;
@@ -121,7 +168,8 @@ CicoHSMenuTile::~CicoHSMenuTile(void)
 void
 CicoHSMenuTile::CreateObject(Evas *evas)
 {
-    ICO_TRA("CicoHSMenuTile::CreateObject Enter");
+    ICO_DBG("CicoHSMenuTile::CreateObject Enter(appid=%08x<%s>)", (int)this->appid, appid);
+
     /*initial vaule*/
     menu_evas = evas;
     menu_show = false;
@@ -140,7 +188,6 @@ CicoHSMenuTile::CreateObject(Evas *evas)
                                    CicoHSMenuTouch::TouchDownMenu, appid);
     evas_object_event_callback_add(tile, EVAS_CALLBACK_MOUSE_UP,
                                    CicoHSMenuTouch::TouchUpMenu, appid);
-
     icon = tile;
     evas_object_show(icon);
 
@@ -154,7 +201,8 @@ CicoHSMenuTile::CreateObject(Evas *evas)
                                    CicoHSMenuTouch::TouchDownTerm, appid);
     evas_object_event_callback_add(term_icon, EVAS_CALLBACK_MOUSE_UP,
                                    CicoHSMenuTouch::TouchUpTerm, appid);
-    ICO_TRA("CicoHSMenuTile::CreateObject Leave");
+    ICO_DBG("CicoHSMenuTile::CreateObject Leave(%s Tile=(%d,%d) w/h=%d/%d",
+            appid, pos_x, pos_y, width, height);
 }
 
 /*--------------------------------------------------------------------------*/
@@ -200,6 +248,8 @@ CicoHSMenuTile::HideTermIcon(void)
 void
 CicoHSMenuTile::FreeObject(void)
 {
+    ICO_DBG("CicoHSMenuTile::FreeObject(appid=%08x<%s>)", (int)this->appid, appid);
+
     if (thumb.surface)  {
         ico_syc_unmap_thumb(thumb.surface);
         thumb.surface = 0;
@@ -266,7 +316,10 @@ CicoHSMenuTile::MovePosition(int page, int position)
     pos_x = GetPositionX();
     pos_y = GetPositionY();
 
-     evas_object_move(tile, pos_x, pos_y);
+    ICO_DBG("CicoHSMenuTile::MovePosition(appid=%08x<%s> tile=(%d,%d))",
+            (int)this->appid, appid, pos_x, pos_y);
+
+    evas_object_move(tile, pos_x, pos_y);
     if (thumb_tile) {
         evas_object_move(thumb_tile, pos_x + thumb_reduce_x, pos_y + thumb_reduce_y);
     }
@@ -296,6 +349,10 @@ CicoHSMenuTile::OffsetMove(int offset_x, int offset_y)
     pos_x = GetPositionX() + offset_x;
     pos_y = GetPositionY() + offset_y;
 
+    ICO_DBG("CicoHSMenuTile::OffsetMove(appid=%08x<%s> offset=%d,%d tile=(%d,%d) obj=%08x %08x %08x)",
+            (int)this->appid, appid, offset_x, offset_y, pos_x, pos_y,
+            (int)this->icon, (int)this->tile, (int)this->thumb_tile);
+
     evas_object_move(tile, pos_x, pos_y);
     if (thumb_tile) {
         evas_object_move(thumb_tile, pos_x + thumb_reduce_x, pos_y + thumb_reduce_y);
@@ -507,10 +564,18 @@ CicoHSMenuTile::ValidMenuIcon(void)
     if (app_running)    {
         ICO_DBG("CicoHSMenuTile::ValidMenuIcon: %s show icon", appid);
         app_running = false;
+        if (thumb.pixel_data)   {
+            free(thumb.pixel_data);
+            thumb.pixel_data = NULL;
+        }
         if (icon == thumb_tile) {
             icon = tile;
-            evas_object_hide(thumb_tile);
-            evas_object_show(tile);
+            if (thumb_tile) {
+                evas_object_hide(thumb_tile);
+            }
+            if (tile)   {
+                evas_object_show(tile);
+            }
         }
         if (small_icon) {
             evas_object_hide(small_icon);
@@ -530,10 +595,17 @@ CicoHSMenuTile::ValidMenuIcon(void)
 void
 CicoHSMenuTile::ValidThumbnail(int surface)
 {
+    ICO_DBG("CicoHSMenuTile::ValidThumbnail(appid=%08x<%s>) run=%d surf=%08x",
+            (int)this->appid, appid, app_running, surface);
+
     if ((! app_running) || (surface == 0))  {
         if (thumb.surface != 0) {
             ico_syc_unmap_thumb(thumb.surface);
             // delete image and texture
+            if ((surface == 0) && (thumb.pixel_data))   {
+                free(thumb.pixel_data);
+                thumb.pixel_data = NULL;
+            }
             if (thumb.image)    {
                 CicoHSMenuTile::glfunc.destroy_image(
                                     CicoHSMenuTile::glfunc.egl_display, thumb.image);
@@ -568,20 +640,23 @@ CicoHSMenuTile::ValidThumbnail(int surface)
                 evas_object_raise(term_icon);
             }
             evas_object_show(small_icon);
-            ICO_DBG("CicoHSMenuTile::ValidThumbnail: %s show thumbnail %08x",
+            ICO_DBG("CicoHSMenuTile::ValidThumbnail: %s(%08x) show small icon",
                     appid, surface);
         }
         else    {
             app_running = false;
             if (icon == thumb_tile) {
+                ICO_DBG("CicoHSMenuTile::ValidThumbnail: %s change thumb->icon", appid);
                 icon = tile;
-                evas_object_hide(thumb_tile);
+                if (thumb_tile) {
+                    evas_object_hide(thumb_tile);
+                }
                 evas_object_show(tile);
             }
             if (small_icon) {
                 evas_object_hide(small_icon);
             }
-            ICO_DBG("CicoHSMenuTile::ValidThumbnail: %s hide thumbnail %08x",
+            ICO_DBG("CicoHSMenuTile::ValidThumbnail: %s(%08x) hide small icon",
                     appid, surface);
         }
     }
@@ -601,43 +676,40 @@ CicoHSMenuTile::SetThumbnail(ico_syc_thumb_info_t *info)
 {
     EGLint              attribs[9];
     Evas_Object         *old_icon = icon;
+    struct ico_uifw_image_buffer *pixelbuf = NULL;
     Evas_Native_Surface nsurf;
     int                 svx, svy;
+    int                 unmap;
 
-    if ((info == NULL) ||
-        (thumb.surface != info->surface)) {
-        ICO_DBG("CicoHSMenuTile::SetThumbnail: unmap thumbnail %x", thumb.surface);
-        if (thumb.surface)  {
-            ico_syc_unmap_thumb(thumb.surface);
-            // delete image and texture
-            if (thumb.image)    {
-                CicoHSMenuTile::glfunc.destroy_image(
-                                CicoHSMenuTile::glfunc.egl_display, thumb.image);
-                thumb.image = NULL;
-            }
-            if (thumb.texture)  {
-                glDeleteTextures(1, &thumb.texture);
-                thumb.texture = 0;
+    ICO_DBG("CicoHSMenuTile::SetThumbnail(appid=%08x<%s>) info=%08x surf=%08x",
+            (int)this->appid, appid, (int)info, info ? info->surface : 0);
+
+    if ((info == NULL) || (info->surface == 0) || (info->name == 0))    {
+        unmap = 1;
+    }
+    else    {
+        unmap = 0;
+        if (thumb.surface != info->surface) {
+            if (thumb.surface != 0) {
+                ICO_DBG("CicoHSMenuTile::SetThumbnail: surface change(%08x->%08x)",
+                        thumb.surface, info->surface);
+                ico_syc_unmap_thumb(thumb.surface);
             }
-        }
-        if (info != NULL)   {
             thumb.surface = info->surface;
             ico_syc_map_thumb(thumb.surface,
                               menu_show ? ICO_HS_MENUTILE_THUMBNAIL_FPS_SHOW :
                                           ICO_HS_MENUTILE_THUMBNAIL_FPS_HIDE);
         }
-    }
-    if ((info != NULL) && (info->name != 0) && (info->width > 1) && (info->height > 1)) {
-        thumb.surface = info->surface;
+        thumb.type = info->type;
         thumb.name = info->name;
         thumb.width = info->width;
         thumb.height = info->height;
         thumb.stride = info->stride;
         thumb.format = info->format;
 #if 0       /* too many log */
-        ICO_DBG("CicoHSMenuTile::SetThumbnail: create %s(%08x) "
-                "name=%d w/h/s=%d/%d/%d tile w/h=%d/%d",
-                appid, thumb.surface, thumb.name,
+        ICO_DBG("CicoHSMenuTile::SetThumbnail: make thumbnail %s(%08x) "
+                "type=%d name=%d w/h/s=%d/%d/%d tile w/h=%d/%d",
+                appid, thumb.surface, thumb.type, thumb.name,
                 thumb.width, thumb.height, thumb.stride, width, height);
 #endif
         // delete image and texture
@@ -651,134 +723,211 @@ CicoHSMenuTile::SetThumbnail(ico_syc_thumb_info_t *info)
             thumb.texture = 0;
         }
 
-        // create image and texture
-        if (_CicoHSMenuTile_initialized > 0)  {
-            svx = thumb_reduce_x;
-            svy = thumb_reduce_y;
-            if (thumb.width > (thumb.height + 64))  {
-                thumb_reduce_x = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
-                thumb_reduce_y = height / ICO_HS_MENUTILE_THUMBNAIL_REDUCE_RATE;
-            }
-            else if (thumb.width < (thumb.height - 64)) {
-                thumb_reduce_y = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
-                thumb_reduce_x = width / ICO_HS_MENUTILE_THUMBNAIL_REDUCE_RATE;
-            }
-            else    {
-                thumb_reduce_x = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
-                thumb_reduce_y = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
-            }
-            if (! thumb_tile)   {
-                thumb_tile = evas_object_image_filled_add(menu_evas);
-                evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
-                                               height - thumb_reduce_y * 2);
-                evas_object_move(thumb_tile, pos_x + thumb_reduce_x,
-                                 pos_y + thumb_reduce_y);
-                evas_object_event_callback_add(thumb_tile, EVAS_CALLBACK_MOUSE_DOWN,
-                                               CicoHSMenuTouch::TouchDownMenu, appid);
-                evas_object_event_callback_add(thumb_tile, EVAS_CALLBACK_MOUSE_UP,
-                                               CicoHSMenuTouch::TouchUpMenu, appid);
-                if (small_icon) {
-                    evas_object_move(small_icon,
-                                     pos_x + thumb_reduce_x
-                                         - ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2,
-                                     pos_y + height - thumb_reduce_y - height
-                                         / ICO_HS_MENUTILE_THUMBNAIL_REDUCTION
-                                         + ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2);
-                    evas_object_raise(small_icon);
+        if ((info->width <= 1) || (info->height <= 1))  {
+            ICO_DBG("CicoHSMenuTile::SetThumbnail: small surface(%d,%d) skip",
+                    info->width, info->height);
+        }
+        else    {
+            // create image and texture
+            if (_CicoHSMenuTile_initialized > 0)  {
+                svx = thumb_reduce_x;
+                svy = thumb_reduce_y;
+                if (thumb.width > (thumb.height + 64))  {
+                    thumb_reduce_x = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
+                    thumb_reduce_y = height / ICO_HS_MENUTILE_THUMBNAIL_REDUCE_RATE;
                 }
-                evas_object_raise(term_icon);
-            }
-            else if ((svx != thumb_reduce_x) || (svy != thumb_reduce_y))    {
-                evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
-                                               height - thumb_reduce_y * 2);
-                evas_object_move(thumb_tile, pos_x + thumb_reduce_x,
-                                 pos_y + thumb_reduce_y);
-                if (small_icon) {
-                    evas_object_move(small_icon,
-                                     pos_x + thumb_reduce_x
-                                         - ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2,
-                                     pos_y + height - thumb_reduce_y - height
-                                         / ICO_HS_MENUTILE_THUMBNAIL_REDUCTION
-                                         + ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2);
+                else if (thumb.width < (thumb.height - 64)) {
+                    thumb_reduce_y = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
+                    thumb_reduce_x = width / ICO_HS_MENUTILE_THUMBNAIL_REDUCE_RATE;
                 }
-            }
-            attribs[0] = EGL_WIDTH;
-            attribs[1] = thumb.width;
-            attribs[2] = EGL_HEIGHT;
-            attribs[3] = thumb.height;
-            attribs[4] = EGL_DRM_BUFFER_FORMAT_MESA;
-            attribs[5] = EGL_DRM_BUFFER_FORMAT_ARGB32_MESA;     /* support only ARGB    */
-            attribs[6] = EGL_DRM_BUFFER_STRIDE_MESA;
-            attribs[7] = thumb.stride / 4;
-            attribs[8] = EGL_NONE;
-
-            thumb.image = CicoHSMenuTile::glfunc.create_image(
-                              CicoHSMenuTile::glfunc.egl_display, EGL_NO_CONTEXT,
-                              EGL_DRM_BUFFER_MESA, (EGLClientBuffer)thumb.name, attribs);
-            if (thumb.image)    {
-#if 0           /* too many logs    */
-                ICO_DBG("CicoHSMenuTile::SetThumbnail: create image = %08x",
-                        (int)thumb.image);
+                else    {
+                    thumb_reduce_x = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
+                    thumb_reduce_y = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
+                }
+                if (! thumb_tile)   {
+                    thumb_tile = evas_object_image_filled_add(menu_evas);
+                    evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
+                                                   height - thumb_reduce_y * 2);
+                    evas_object_move(thumb_tile, pos_x + thumb_reduce_x,
+                                     pos_y + thumb_reduce_y);
+                    evas_object_event_callback_add(thumb_tile, EVAS_CALLBACK_MOUSE_DOWN,
+                                                   CicoHSMenuTouch::TouchDownMenu, appid);
+                    evas_object_event_callback_add(thumb_tile, EVAS_CALLBACK_MOUSE_UP,
+                                                   CicoHSMenuTouch::TouchUpMenu, appid);
+                    ICO_DBG("CicoHSMenuTile::SetThumbnail: create thumb_tile %s "
+                            "tile=(%d+%d,%d+%d)", appid,
+                            pos_x, thumb_reduce_x, pos_y, thumb_reduce_y);
+                    if (small_icon) {
+                        evas_object_move(small_icon,
+                                         pos_x + thumb_reduce_x
+                                             - ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2,
+                                         pos_y + height - thumb_reduce_y - height
+                                             / ICO_HS_MENUTILE_THUMBNAIL_REDUCTION
+                                             + ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2);
+                        evas_object_raise(small_icon);
+                    }
+                    evas_object_raise(term_icon);
+                }
+                else if ((svx != thumb_reduce_x) || (svy != thumb_reduce_y))    {
+                    evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
+                                                   height - thumb_reduce_y * 2);
+                    evas_object_move(thumb_tile, pos_x + thumb_reduce_x,
+                                     pos_y + thumb_reduce_y);
+                    if (small_icon) {
+                        evas_object_move(small_icon,
+                                         pos_x + thumb_reduce_x
+                                             - ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2,
+                                         pos_y + height - thumb_reduce_y - height
+                                             / ICO_HS_MENUTILE_THUMBNAIL_REDUCTION
+                                             + ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2);
+                    }
+                }
+                if (thumb.type == ICO_WINDOW_MGR_MAP_TYPE_EGL)  {
+                    /* Intel GPU depend     */
+                    attribs[0] = EGL_WIDTH;
+                    attribs[1] = thumb.width;
+                    attribs[2] = EGL_HEIGHT;
+                    attribs[3] = thumb.height;
+                    attribs[4] = EGL_DRM_BUFFER_FORMAT_MESA;
+                    attribs[5] = EGL_DRM_BUFFER_FORMAT_ARGB32_MESA; /* support only ARGB */
+                    attribs[6] = EGL_DRM_BUFFER_STRIDE_MESA;
+                    attribs[7] = thumb.stride / 4;
+                    attribs[8] = EGL_NONE;
+
+                    thumb.image = CicoHSMenuTile::glfunc.create_image(
+                                        CicoHSMenuTile::glfunc.egl_display, EGL_NO_CONTEXT,
+                                        EGL_DRM_BUFFER_MESA,
+                                        (EGLClientBuffer)thumb.name, attribs);
+                    if (thumb.image)    {
+                        icon = thumb_tile;
+#if 0                   /* too many logs    */
+                        ICO_DBG("CicoHSMenuTile::SetThumbnail: create image = %08x",
+                                (int)thumb.image);
 #endif
-                /* create texture from image    */
-                thumb.texture = 0;
-                glGenTextures(1, &thumb.texture);
-                glBindTexture(GL_TEXTURE_2D, thumb.texture);
-                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-                CicoHSMenuTile::glfunc.image_target_texture_2d(GL_TEXTURE_2D, thumb.image);
-#if 0           /* too many logs    */
-                ICO_DBG("CicoHSMenuTile::SetThumbnail: create texture = %08x",
-                        (int)thumb.texture);
+                        /* create texture from image    */
+                        thumb.texture = 0;
+                        glGenTextures(1, &thumb.texture);
+                        glBindTexture(GL_TEXTURE_2D, thumb.texture);
+                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+                        CicoHSMenuTile::glfunc.image_target_texture_2d(
+                                                                GL_TEXTURE_2D, thumb.image);
+#if 0                   /* too many logs    */
+                        ICO_DBG("CicoHSMenuTile::SetThumbnail: create texture = %08x",
+                                (int)thumb.texture);
 #endif
-                /* draw texture to screen       */
-                memset(&nsurf, 0, sizeof(nsurf));
-                nsurf.version = EVAS_NATIVE_SURFACE_VERSION;
-                nsurf.type = EVAS_NATIVE_SURFACE_OPENGL;
-                nsurf.data.opengl.texture_id = thumb.texture;
-
-                thumb.fbcount ++;
-                if (thumb.fbcount <= 0) thumb.fbcount = 1;
-                nsurf.data.opengl.framebuffer_id = thumb.fbcount;
-
-                nsurf.data.opengl.internal_format = GL_BGRA_EXT;
-                nsurf.data.opengl.format = GL_BGRA_EXT;
-                nsurf.data.opengl.x = 0;
-                nsurf.data.opengl.y = 0;
-                nsurf.data.opengl.w = thumb.width;
-                nsurf.data.opengl.h = thumb.height / 4;
-
-                evas_object_image_native_surface_set(thumb_tile, &nsurf);
-
-                // set Y invert to native OpenGL object (Evas bug fix)
-                SetYinvert(thumb_tile);
-
-                evas_object_image_data_update_add(thumb_tile,
-                                                  0, 0, thumb.width, thumb.height);
-                icon = thumb_tile;
-
-                evas_object_image_size_set(thumb_tile, thumb.width, thumb.height);
-                evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
+                        /* draw texture to screen       */
+                        memset(&nsurf, 0, sizeof(nsurf));
+                        nsurf.version = EVAS_NATIVE_SURFACE_VERSION;
+                        nsurf.type = EVAS_NATIVE_SURFACE_OPENGL;
+                        nsurf.data.opengl.texture_id = thumb.texture;
+
+                        thumb.fbcount ++;
+                        if (thumb.fbcount <= 0) thumb.fbcount = 1;
+                        nsurf.data.opengl.framebuffer_id = thumb.fbcount;
+
+                        nsurf.data.opengl.internal_format = GL_BGRA_EXT;
+                        nsurf.data.opengl.format = GL_BGRA_EXT;
+                        nsurf.data.opengl.x = 0;
+                        nsurf.data.opengl.y = 0;
+                        nsurf.data.opengl.w = thumb.width;
+                        nsurf.data.opengl.h = thumb.height / 4;
+
+                        evas_object_image_native_surface_set(thumb_tile, &nsurf);
+
+                        // set Y invert to native OpenGL object (Evas bug fix)
+                        SetYinvert(thumb_tile);
+
+                        evas_object_image_data_update_add(thumb_tile,
+                                                          0, 0, thumb.width, thumb.height);
+                        evas_object_image_size_set(thumb_tile, thumb.width, thumb.height);
+                        evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
+                                                       height - thumb_reduce_y * 2);
+                        evas_object_move(thumb_tile,
+                                         pos_x + thumb_reduce_x, pos_y + thumb_reduce_y);
+                    }
+                    else    {
+                        ICO_ERR("CicoHSMenuTile::SetThumbnail: can not create image");
+                        unmap = 1;
+                    }
+                }
+                else    {
+                    if ((CicoHSMenuTile::thumbmapbuffer != NULL) &&
+                        (thumb.name <= ICO_HS_SHMBUFFER_NUM))   {
+                        /* glReadPixels image   */
+#if 0                   /* too many logs    */
+                        ICO_DBG("CicoHSMenuTile::SetThumbnail: %s pixel(idx=%d) "
+                                "tile=(%d+%d,%d+%d)", appid, thumb.name,
+                                pos_x, thumb_reduce_x, pos_y, thumb_reduce_y);
+#endif
+                        pixelbuf = (struct ico_uifw_image_buffer *)
+                                       ((char *)(CicoHSMenuTile::thumbmapbuffer) +
+                                           ICO_HS_SHMBUFFER_SIZE * (thumb.name-1));
+                        if (! thumb.pixel_data) {
+                            thumb.pixel_data = (char *)
+                                malloc(ICO_HS_SHMBUFFER_SIZE - ICO_UIFW_IMAGE_HEADER_SIZE);
+                        }
+                        if (thumb.pixel_data)   {
+                            int bufsize = thumb.width * thumb.height * 4;
+                            if (bufsize >
+                                (ICO_HS_SHMBUFFER_SIZE - ICO_UIFW_IMAGE_HEADER_SIZE))   {
+                                bufsize = ICO_HS_SHMBUFFER_SIZE - ICO_UIFW_IMAGE_HEADER_SIZE;
+                            }
+                            memcpy(thumb.pixel_data, pixelbuf->image, bufsize);
+                            evas_object_image_data_update_add(
+                                    thumb_tile, 0, 0, thumb.width, thumb.height);
+                            icon = thumb_tile;
+                            evas_object_image_size_set(thumb_tile, thumb.width, thumb.height);
+                            evas_object_image_data_set(thumb_tile, thumb.pixel_data);
+                            evas_object_image_filled_set(thumb_tile, EINA_TRUE);
+                            evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
                                                height - thumb_reduce_y * 2);
-                evas_object_move(thumb_tile, pos_x + thumb_reduce_x, pos_y + thumb_reduce_y);
+                            evas_object_move(thumb_tile,
+                                             pos_x + thumb_reduce_x, pos_y + thumb_reduce_y);
+                        }
+                        else    {
+                            ICO_ERR("CicoHSMenuTile::SetThumbnail: can not malloc pixel buffer");
+                            unmap = 1;
+                        }
+                    }
+                    else    {
+                        ICO_ERR("CicoHSMenuTile::SetThumbnail: not pixel buffer");
+                        unmap = 1;
+                    }
+                }
             }
             else    {
-                ICO_ERR("CicoHSMenuTile::SetThumbnail: can not create image");
-                icon = tile;
+                ICO_DBG("CicoHSMenuTile::SetThumbnail: OpenGL/EGL initialize error");
+                unmap = 1;
             }
         }
-        else    {
-            ICO_DBG("CicoHSMenuTile::SetThumbnail: OpenGL/EGL initialize error");
-            icon = tile;
-        }
     }
-    else    {
-        ICO_DBG("CicoHSMenuTile::SetThumbnail: no info(%08x) or name(%08x)",
-                (int)info, info ? (int)info->name : 0);
+
+    if (unmap > 0)  {
+        ICO_DBG("CicoHSMenuTile::SetThumbnail: unmap thumbnail %08x", thumb.surface);
+        if (thumb.pixel_data)   {
+            free(thumb.pixel_data);
+            thumb.pixel_data = NULL;
+        }
+        if (thumb.surface)  {
+            ico_syc_unmap_thumb(thumb.surface);
+            // delete image and texture
+            if (thumb.image)    {
+                CicoHSMenuTile::glfunc.destroy_image(
+                                CicoHSMenuTile::glfunc.egl_display, thumb.image);
+                thumb.image = NULL;
+            }
+            if (thumb.texture)  {
+                glDeleteTextures(1, &thumb.texture);
+                thumb.texture = 0;
+            }
+            thumb.surface = 0;
+        }
         icon = tile;
     }
+
     if (icon != old_icon)   {
         if (old_icon)   {
             evas_object_hide(old_icon);
@@ -790,8 +939,15 @@ CicoHSMenuTile::SetThumbnail(ico_syc_thumb_info_t *info)
                 // remake thumbnail for first build image
                 CicoHSMenuTile::SetThumbnail(info);
             }
+            else    {
+                evas_object_hide(small_icon);
+            }
         }
     }
+    if (pixelbuf != NULL)   {
+        // free shared memory pixel buffer
+        pixelbuf->reftime = pixelbuf->settime;
+    }
 }
 
 /*--------------------------------------------------------------------------*/
index b607e21..ac3cabb 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "ico_syc_common.h"
 #include "ico_syc_winctl.h"
+#include "ico_window_mgr.h"
 
 #include "CicoHomeScreenCommon.h"
 
 #define ICO_HS_MENUTILE_THUMBNAIL_REDUCE_RATE  10
 #define ICO_HS_MENUTILE_THUMBNAIL_REDUCTION     4
 
+/*shared memory buffer*/
+#define ICO_HS_SHMBUFFER_NAME       "/HomeScreen_ShmBuffer"
+#define ICO_HS_SHMBUFFER_SIZE       (1920*1080*4+ICO_UIFW_IMAGE_HEADER_SIZE)
+#define ICO_HS_SHMBUFFER_NUM        (3)
+
 struct _CicoHSMenuTile_glfunc {
     EGLDisplay  egl_display;            // EGL display
     PFNEGLCREATEIMAGEKHRPROC            create_image;               // create image
@@ -95,6 +101,7 @@ struct _CicoHSMenuTile_glfunc {
 };
 struct _CicoHSMenuTile_thumb {
     int         surface;                // surface id
+    int         type;                   // frame buffer type
     int         name;                   // EGL buffer name
     int         width;                  // frame buffer width
     int         height;                 // frame buff height
@@ -103,6 +110,7 @@ struct _CicoHSMenuTile_thumb {
     int         fbcount;                // frame buffer change counter
     EGLImageKHR image;                  // frame buffer image
     GLuint      texture;                // texture id
+    char        *pixel_data;            // glReadPixels data buffer
 };
 
 class CicoHSMenuTile
@@ -135,6 +143,7 @@ class CicoHSMenuTile
 
   private:
     static struct _CicoHSMenuTile_glfunc glfunc;
+    static char *thumbmapbuffer;
 
     char appid[ICO_HS_MAX_PROCESS_NAME];
     char icon_image_path[ICO_HS_MAX_PATH_BUFF_LEN];
index aeaab05..67a66cc 100644 (file)
@@ -71,10 +71,10 @@ CicoHSMenuTouch::Finalize(void)
  * @brief   CicoHSMenuTouch::TouchDownMenu
  *          touch down action at menu
  *
- * @param[in]   data    data
- * @param[in]   evas    evas
- * @param[in]   obj     object
- * @param[in]   event_info    event information
+ * @param[in]   data        data
+ * @param[in]   evas        evas
+ * @param[in]   obj         object
+ * @param[in]   event_info  event information
  * @return      none
  */
 /*--------------------------------------------------------------------------*/
@@ -106,8 +106,8 @@ CicoHSMenuTouch::TouchDownMenu(void *data, Evas *evas, Evas_Object *obj, void *e
     char *appid = reinterpret_cast<char*>(data);
 
     if (appid == NULL) {
-        ICO_DBG("CicoHSMenuTouch::TouchDownMenu: (%d,%d) No App",
-            touch_state_b_x, touch_state_b_y);
+        ICO_DBG("CicoHSMenuTouch::TouchDownMenu: %08x (%d,%d) No App",
+            (int)data, touch_state_b_x, touch_state_b_y);
         return;
     }
     ICO_PRF("TOUCH_EVENT Menu Down (%d,%d) app=%s",
@@ -191,7 +191,7 @@ CicoHSMenuTouch::TouchUpMenu(void *data, Evas *evas, Evas_Object *obj, void *eve
 
     ICO_PRF("TOUCH_EVENT Menu Up   (%d,%d)->(%d,%d) app=%s",
             touch_state_b_x, touch_state_b_y,
-            touch_state_a_x, touch_state_a_y, appid? appid: "(NULL)");
+            touch_state_a_x, touch_state_a_y, appid ? appid: "(NULL)");
 
     if (abs(sub_x) > abs(sub_y)) {
 
@@ -279,7 +279,7 @@ CicoHSMenuTouch::TouchUpTerm(void *data, Evas *evas, Evas_Object *obj, void *eve
     CicoSound::GetInstance()->PlayOperationSound();
 
     char *appid = reinterpret_cast<char*>(data);
-    ICO_PRF("TOUCH_EVENT Term Down->Up app=%s", appid? appid:"(NIL)");
+    ICO_PRF("TOUCH_EVENT Term Down->Up app=%s", appid ? appid : "(NIL)");
 
     strncpy(terminate_appid, appid, ICO_HS_MAX_PROCESS_NAME);
 
index 3920f4a..1d4e109 100644 (file)
@@ -128,7 +128,7 @@ CicoHSMenuWindow::SetMenuBack(void)
     evas_object_resize(canvas, width, height);
     evas_object_show(canvas);
 
-    ICO_ERR("CicoHSMenuWindow::SetMenuBack Leave(EOK)");
+    ICO_TRA("CicoHSMenuWindow::SetMenuBack Leave(EOK)");
     return ICO_OK;
 }
 
index e5f3641..422a0cd 100644 (file)
@@ -1174,7 +1174,7 @@ CicoHomeScreen::StartRelations(void)
                                              ICO_HS_APPID_DEFAULT_ONS),
             ICO_HS_MAX_PROCESS_NAME);
 // TODO
-#if 0
+#if 1
     /* start onscreen & statusbar apps */
     os_app_info = GetAppInfo(os_package_name);
     ret = os_app_info->Execute();
diff --git a/src/onscreen/CicoOSEFLApp.cpp b/src/onscreen/CicoOSEFLApp.cpp
new file mode 100644 (file)
index 0000000..2f0ed13
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2014, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoOSEFLApp.cpp
+ *
+ *  @brief  This file is implimention of CicoOSEFLApp class
+ */
+//==========================================================================
+
+#include <exception>
+#include <iostream>
+#include <string>
+
+#include "CicoOSEFLApp.h"
+#include "CicoOnScreen.h"
+#include "ico_log.h"
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  default constructor
+ */
+//--------------------------------------------------------------------------
+CicoOSEFLApp::CicoOSEFLApp()
+{
+//    ICO_TRA("CicoOSEFLApp::CicoOSEFLApp Enter");
+//    ICO_TRA("CicoOSEFLApp::CicoOSEFLApp Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  destructor
+ */
+//--------------------------------------------------------------------------
+CicoOSEFLApp::~CicoOSEFLApp()
+{
+//    ICO_TRA("CicoOSEFLApp::~CicoOSEFLApp Enter");
+//    ICO_TRA("CicoOSEFLApp::~CicoOSEFLApp Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  callback function on create
+ *
+ *  @param [in] user_data   The user data passed from the callback
+ *                          registration function
+ *
+ *  @return true on success, false on error
+ */
+//--------------------------------------------------------------------------
+bool
+CicoOSEFLApp::onCreate(void *user_data)
+{
+    ICO_TRA("CicoOSEFLApp::onCreate Enter");
+
+    try {
+#if 0
+        // load system config
+        CicoSystemConfig::getInstance()->load(
+                ICO_OS_LIFECYCLE_CONTROLLER_SETTING_PATH);
+#endif
+        // start onscreen
+        m_onscreen = new CicoOnScreen();
+        bool ret = m_onscreen->StartOnScreen(ICO_ORIENTATION_VERTICAL);
+        if(ret != true){
+            ICO_TRA("CicoOSEFLApp::onCreate Leave(false)");
+            return false;
+        }
+    }
+    catch (const std::exception& e) {
+        std::cerr << e.what() << std::endl;
+        ICO_ERR("catch exception %s", e.what());
+        ICO_TRA("CicoOSEFLApp::onCreate Leave(false)");
+        return false;
+    }
+    catch (const std::string& str) {
+        std::cerr << str << std::endl;
+        ICO_ERR("catch exception %s", str.c_str());
+        ICO_TRA("CicoOSEFLApp::onCreate Leave(false)");
+        return false;
+    }
+    catch (...) {
+        ICO_ERR("catch exception unknown");
+        ICO_TRA("CicoOSEFLApp::onCreate Leave(false)");
+        return false;
+    }
+
+    ICO_TRA("CicoOSEFLApp::onCreate Leave(true)");
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  callback function on terminate
+ *
+ *  @param [in] user_data   The user data passed from the callback
+ *                          registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoOSEFLApp::onTerminate(void *user_data)
+{
+    ICO_TRA("CicoOSEFLApp::onTerminate Enter");
+
+    m_onscreen->Finalize();
+    delete m_onscreen;
+
+    ICO_TRA("CicoOSEFLApp::onTerminate Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  callback function on pause
+ *
+ *  @param [in] user_data   The user data passed from the callback
+ *                          registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoOSEFLApp::onPause(void *user_data)
+{
+    ICO_TRA("CicoOSEFLApp::onPause Enter");
+    ICO_TRA("CicoOSEFLApp::onPause Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  callback function on resume
+ *
+ *  @param [in] user_data   The user data passed from the callback
+ *                          registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoOSEFLApp::onResume(void *user_data)
+{
+    ICO_TRA("CicoOSEFLApp::onResume Enter");
+    ICO_TRA("CicoOSEFLApp::onResume Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  callback function on service
+ *
+ *  @param [in] service     The handle to the service
+ *  @param [in] user_data   The user data passed from the callback
+ *                          registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoOSEFLApp::onService(service_h service, void *user_data)
+{
+    ICO_TRA("CicoOSEFLApp::onService Enter");
+    ICO_TRA("CicoOSEFLApp::onService Leave");
+}
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/onscreen/CicoOSEFLApp.h b/src/onscreen/CicoOSEFLApp.h
new file mode 100644 (file)
index 0000000..a1f5191
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2014, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoOSEFLApp.h
+ *
+ *  @brief  This file is definition of CicoOSEFLApp class
+ */
+//==========================================================================
+#ifndef __CICO_OS_EFL_APP_H__
+#define __CICO_OS_EFL_APP_H__
+
+#include "CicoEFLApp.h"
+
+//==========================================================================
+//  Forward declaration
+//==========================================================================
+class CicoOnScreen;
+
+//==========================================================================
+/**
+ *  @brief  ELF Application functions for OnScreen
+ */
+//==========================================================================
+class CicoOSEFLApp : public CicoEFLApp {
+public:
+    // default constructor
+    CicoOSEFLApp();
+    
+    // destructor
+    virtual ~CicoOSEFLApp();
+
+    // callback function on create
+    virtual bool onCreate(void *user_data);
+
+    // callback function on terminate
+    virtual void onTerminate(void *user_data);
+
+    // callback function on pause
+    virtual void onPause(void *user_data);
+
+    // callback function on resume
+    virtual void onResume(void *user_data);
+
+    // callback function on service
+    virtual void onService(service_h service, void *user_data);
+
+protected:
+    // assignment operator
+    CicoOSEFLApp& operator=(const CicoOSEFLApp &object);
+
+    // copy constructor
+    CicoOSEFLApp(const CicoOSEFLApp &object);
+
+private:
+    // CicoOnScreen instance
+    CicoOnScreen* m_onscreen;
+};
+#endif  // __CICO_OS_EFL_APP_H__
+// vim:set expandtab ts=4 sw=4:
diff --git a/src/onscreen/CicoOnScreen.cpp b/src/onscreen/CicoOnScreen.cpp
new file mode 100644 (file)
index 0000000..26712b1
--- /dev/null
@@ -0,0 +1,460 @@
+/*
+ * Copyright (c) 2014, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+/**
+ * @brief   On Screen
+ *
+ * @date    Jan-07-2014
+ */
+#include "CicoOnScreen.h"
+
+using namespace std;
+
+/*============================================================================*/
+/* static members                                                             */
+/*============================================================================*/
+CicoOnScreen * CicoOnScreen::os_instance=NULL;
+struct popup_data CicoOnScreen::ico_appdata;
+struct lemolo_noti_data CicoOnScreen::ico_notidata;
+
+/*============================================================================*/
+/* functions                                                                  */
+/*============================================================================*/
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   CicoOnScreen::CicoOnScreen
+ *          Constractor
+ *
+ * @param[in]   none
+ * @return      none
+
+ */
+/*--------------------------------------------------------------------------*/
+CicoOnScreen::CicoOnScreen(void)
+{
+    ICO_TRA("CicoOnScreen::CicoOnScreen Enter");
+
+    InitializePopupData();
+    InitializeNotificationData();
+
+    ICO_TRA("CicoOnScreen::CicoOnScreen Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   CicoOnScreen::~CicoOnScreen
+ *          Destractor
+ *
+ * @param[in]   none
+ * @return      none
+ */
+/*--------------------------------------------------------------------------*/
+CicoOnScreen::~CicoOnScreen(void)
+{
+//    ICO_TRA("CicoOnScreen::~CicoOnScreen Enter");
+//    ICO_TRA("CicoOnScreen::~CicoOnScreen Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   CicoOnScreen::InitializePopupData
+ *          Initialize popup struct data
+ *
+ * @param[in]   none
+ * @return      none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoOnScreen::InitializePopupData(void)
+{
+    ICO_TRA("CicoOnScreen::InitializePopupData Enter");
+
+    ico_appdata.window = NULL;
+    ico_appdata.evas = NULL;
+    ico_appdata.background = NULL;
+    ico_appdata.icon = NULL;
+    ico_appdata.title = NULL;
+    ico_appdata.content = NULL;
+    ico_appdata.icon_bg = NULL;
+    ico_appdata.title_bg = NULL;
+    ico_appdata.content_bg = NULL;
+    ico_appdata.show_flag = FALSE;
+
+    ICO_TRA("CicoOnScreen::InitializePopupData Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   CicoOnScreen::InitializePopupData
+ *          Initialize notification struct data
+ *
+ * @param[in]   none
+ * @return      none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoOnScreen::InitializeNotificationData(void)
+{
+    ICO_TRA("CicoOnScreen::InitializeNotificationData Enter");
+
+    ico_notidata.title = NULL;
+    ico_notidata.content = NULL;
+    ico_notidata.icon = NULL;
+    ico_notidata.text = NULL;
+    ico_notidata.service_handle = NULL;
+
+    ICO_TRA("CicoOnScreen::InitializeNotificationData Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   CicoOnScreen::StartOnScreen
+ *          Start on screen
+ *
+ * @param[in]   none
+ * @return      none
+ * @return true on success, false on error
+ */
+/*--------------------------------------------------------------------------*/
+bool
+CicoOnScreen::StartOnScreen(int orientation)
+{
+    ICO_TRA("CicoOnScreen::StartOnScreen Enter");
+
+    /* save instance pointer */
+    os_instance = this;
+
+#if 0
+    /* config copy*/
+    this->config = new CicoGKeyFileConfig();
+    this->config->Initialize(ICO_ONSCREEN_CONFIG_FILE);
+
+    /* Get screen size */
+    CicoOSWindowController::GetFullScreenSize(orientation,
+                                              &full_width,&full_height);
+
+    ICO_DBG("full screen size x=%d y=%d",full_width,full_height);
+#endif
+
+    /* Initialize */
+    ecore_evas_init();
+    InitializePopup();
+
+    /* set notification callback function */
+    notiservice_.SetCallback(NotificationCallback, this);
+
+    ICO_TRA("CicoOnScreen::StartOnScreen Leave(true)");
+    return true;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   CicoOnScreen::Finalize
+ *          Finalize
+ *
+ * @param[in]   none
+ * @return      none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoOnScreen::Finalize(void)
+{
+    ICO_TRA("CicoOnScreen::Finalize Enter");
+
+    /* Free window handle */
+    if (ico_appdata.window != NULL) {
+        ecore_evas_free(ico_appdata.window);
+    }
+
+    ICO_TRA("CicoOnScreen::Finalize Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   CicoOnScreen::ShowPopup
+ *          Show popup window
+ *
+ * @param[in]   none
+ * @return      none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoOnScreen::ShowPopup(void)
+{
+    ICO_TRA("CicoOnScreen::ShowPopup Enter");
+
+    evas_object_show(ico_appdata.background);
+
+    /* Icon show */
+    evas_object_show(ico_appdata.icon_bg);
+    if (ico_notidata.icon != NULL) {
+        evas_object_image_file_set(ico_appdata.icon, ico_notidata.icon, NULL);
+        evas_object_image_fill_set(ico_appdata.icon, 0, 0, 50, 50);
+        evas_object_show(ico_appdata.icon);
+    }
+
+    /* Title show */
+    evas_object_show(ico_appdata.title_bg);
+    evas_object_textblock_text_markup_set(ico_appdata.title, ico_notidata.title);
+    evas_object_show(ico_appdata.title);
+
+    /* Content show */
+    evas_object_show(ico_appdata.content_bg);
+    evas_object_textblock_text_markup_set(ico_appdata.content, ico_notidata.content);
+    evas_object_show(ico_appdata.content);
+
+    ICO_TRA("CicoOnScreen::ShowPopup Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   CicoOnScreen::HidePopup
+ *          Hide popup window
+ *
+ * @param[in]   data        The user data passed from the callback
+ *                          registration function
+ * @param[in]   e           The handle to the popup window
+ * @param[in]   obj         The handle to the Evas object
+ * @param[in]   event_info  Event information
+ * @return      none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoOnScreen::HidePopup(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+    ICO_TRA("CicoOnScreen::HidePopup Enter");
+
+    /* Background(popup frame) hide */
+    evas_object_hide(ico_appdata.background);
+
+    /* Icon hide */
+    evas_object_hide(ico_appdata.icon_bg);
+    evas_object_hide(ico_appdata.icon);
+
+    /* Title hide */
+    evas_object_hide(ico_appdata.title_bg);
+    evas_object_hide(ico_appdata.title);
+
+    /* Content hide */
+    evas_object_hide(ico_appdata.content_bg);
+    evas_object_hide(ico_appdata.content);
+
+    ico_appdata.show_flag = FALSE;
+
+    ICO_TRA("CicoOnScreen::HidePopup Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   CicoOnScreen::InitializePopup
+ *          Initialize popup window
+ *
+ * @param[in]   none
+ * @return      none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoOnScreen::InitializePopup(void)
+{
+    Evas_Textblock_Style* ts;
+    static const char *style_buf =
+        "DEFAULT='font=Sans font_size=30 color=#000 align=center text_class=entry'"
+        "newline='br'"
+        "b='+ font=Sans:style=bold'";
+
+    ICO_TRA("CicoOnScreen::InitializePopup Enter");
+
+    /* Window setup */
+    ico_appdata.window = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, "frame=0");
+    if (ico_appdata.window == NULL) {
+        ICO_ERR("ecore_evas_new() error");
+        Finalize();
+        ICO_TRA("CicoOnScreen::InitializePopup Leave(ERR)");
+        return;
+    }
+    ecore_evas_show(ico_appdata.window);
+
+    /* Background setup */
+    ico_appdata.evas = ecore_evas_get(ico_appdata.window);
+    ico_appdata.background = evas_object_rectangle_add(ico_appdata.evas);
+    evas_object_color_set(ico_appdata.background, 255, 255, 255, 255);
+    evas_object_move(ico_appdata.background, POPUP_FRAME_ST_X, POPUP_FRAME_ST_Y);
+    evas_object_resize(ico_appdata.background, POPUP_FRAME_WIDTH, POPUP_FRAME_HEIGHT);
+
+    /* Icon Background setup */
+    ico_appdata.icon_bg = evas_object_rectangle_add(ico_appdata.evas);
+    evas_object_color_set(ico_appdata.icon_bg, 192, 192, 192, 255);
+    evas_object_move(ico_appdata.icon_bg, POPUP_ICON_ST_X, POPUP_ICON_ST_Y);
+    evas_object_resize(ico_appdata.icon_bg, POPUP_ICON_WIDTH, POPUP_ICON_HEIGHT);
+
+    /* Icon setup */
+    ico_appdata.icon = evas_object_image_add(ico_appdata.evas);
+    evas_object_move(ico_appdata.icon, POPUP_ICON_ST_X, POPUP_ICON_ST_Y);
+    evas_object_resize(ico_appdata.icon, POPUP_ICON_WIDTH, POPUP_ICON_HEIGHT);
+
+    /* Title Background setup */
+    ico_appdata.title_bg = evas_object_rectangle_add(ico_appdata.evas);
+    evas_object_color_set(ico_appdata.title_bg, 192, 192, 192, 255);
+    evas_object_move(ico_appdata.title_bg, POPUP_TITLE_ST_X, POPUP_TITLE_ST_Y);
+    evas_object_resize(ico_appdata.title_bg, POPUP_TITLE_WIDTH, POPUP_TITLE_HEIGHT);
+
+    /* text style set */
+    ts = evas_textblock_style_new();
+    evas_textblock_style_set(ts, style_buf);
+
+    /* Title setup */
+    ico_appdata.title = evas_object_textblock_add(ico_appdata.evas);
+    evas_object_textblock_style_set(ico_appdata.title, ts);
+    evas_object_textblock_valign_set(ico_appdata.title, 0.5);
+    evas_object_textblock_text_markup_set(ico_appdata.title, "default");
+    evas_object_move(ico_appdata.title, POPUP_TITLE_ST_X, POPUP_TITLE_ST_Y);
+    evas_object_resize(ico_appdata.title, POPUP_TITLE_WIDTH, POPUP_TITLE_HEIGHT);
+
+    /* Content Background setup */
+    ico_appdata.content_bg = evas_object_rectangle_add(ico_appdata.evas);
+    evas_object_color_set(ico_appdata.content_bg, 224, 224, 224, 255);
+    evas_object_move(ico_appdata.content_bg, POPUP_CONTENT_BG_ST_X, POPUP_CONTENT_BG_ST_Y);
+    evas_object_resize(ico_appdata.content_bg, POPUP_CONTENT_BG_WIDTH, POPUP_CONTENT_BG_HEIGHT);
+
+    /* Content setup */
+    ico_appdata.content = evas_object_textblock_add(ico_appdata.evas);
+    evas_object_textblock_style_set(ico_appdata.content, ts);
+    evas_object_textblock_valign_set(ico_appdata.content, 0.5);
+    evas_object_textblock_text_markup_set(ico_appdata.content, "default");
+    evas_object_move(ico_appdata.content, POPUP_CONTENT_BG_ST_X, POPUP_CONTENT_BG_ST_Y);
+    evas_object_resize(ico_appdata.content, POPUP_CONTENT_BG_WIDTH, POPUP_CONTENT_BG_HEIGHT);
+
+    /* set callback event */
+    evas_object_event_callback_add(ico_appdata.icon_bg, EVAS_CALLBACK_MOUSE_UP,
+        HidePopup, NULL);
+    evas_object_event_callback_add(ico_appdata.icon, EVAS_CALLBACK_MOUSE_UP,
+        HidePopup, NULL);
+    evas_object_event_callback_add(ico_appdata.title_bg, EVAS_CALLBACK_MOUSE_UP,
+        HidePopup, NULL);
+    evas_object_event_callback_add(ico_appdata.title, EVAS_CALLBACK_MOUSE_UP,
+        HidePopup, NULL);
+    evas_object_event_callback_add(ico_appdata.content_bg, EVAS_CALLBACK_MOUSE_UP,
+        HidePopup, NULL);
+    evas_object_event_callback_add(ico_appdata.content, EVAS_CALLBACK_MOUSE_UP,
+        HidePopup, NULL);
+
+    ICO_TRA("CicoOnScreen::InitializePopup Leave(OK)");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   CicoOnScreen::NotificationCallback
+ *          Notification callback function
+ *
+ * @param[in]  data        The user data passed from the callback
+ *                         registration function
+ * @param[in]  type        The type of notification
+ * @return     none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoOnScreen::NotificationCallback(void *data, notification_type_e type,
+        notification_op *op_list, int num_op)
+{
+    notification_h noti_h = NULL;
+    notification_list_h notification_list = NULL;
+    notification_list_h get_list = NULL;
+//    notification_op_type_e op_type;
+    int op_type;
+    int group_id = 0;
+    int length1 = 0;
+    int length2 = 0;
+    int ret_err = NOTIFICATION_ERROR_NONE;
+    int priv_id = NOTIFICATION_PRIV_ID_NONE;
+    char *pkgname = NULL;
+
+    ICO_TRA("CicoOnScreen::NotificationCallback Enter");
+
+    os_instance->InitializeNotificationData();
+
+    for (int i = 0; i < num_op; i++) {
+        op_type = (int)op_list[i].type;
+
+        switch (op_type) {
+        case NOTIFICATION_OP_INSERT :
+        case NOTIFICATION_OP_UPDATE :
+            notification_get_list(NOTIFICATION_TYPE_NOTI, -1, &notification_list);
+            if (notification_list) {
+                get_list = notification_list_get_head(notification_list);
+
+                while(get_list != NULL) {
+                    noti_h = notification_list_get_data(get_list);
+                    CicoNotification noti(noti_h);
+                    if (noti.Empty()) {
+                        break;
+                    }
+
+                    pkgname = (char *)noti.GetPkgname();
+                    if(pkgname == NULL){
+                        notification_get_application(noti_h, &pkgname);
+                    }
+
+                    length1 = strlen(pkgname);
+                    length2 = strlen(LEMOLO_PKGNAME);
+                    length1 = (length1<=length2) ? length1 : length2;
+
+                    if (pkgname != NULL && 
+                        strncmp(pkgname, LEMOLO_PKGNAME, length1) == 0) {
+
+                        /* Get priv_id */
+                        notification_get_id(noti_h, &group_id, &priv_id);
+                        /* Get title */
+                        ico_notidata.title = (char *)noti.GetTitle();
+                        /* Get content */
+                        ico_notidata.content = (char *)noti.GetContent();
+                        /* Get execute option */
+                        notification_get_execute_option(noti_h,
+                            NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,
+                            (const char **)(&ico_notidata.text),
+                            &ico_notidata.service_handle);
+                        /* Get icon path */
+                        ico_notidata.icon = (char *)noti.GetIconPath();
+#if 0
+                        ico_notidata.icon = ICON_PATH;  // test
+#endif
+                        ICO_DBG("Received: %s : %i : %s : %s : %s : %x",
+                            pkgname, priv_id, ico_notidata.title,
+                            ico_notidata.content,
+                            ico_notidata.text,
+                            (int)ico_notidata.service_handle);
+
+                        /* Show popup window */
+                        if (ico_appdata.show_flag == FALSE) {
+                            ico_appdata.show_flag = TRUE;
+                            os_instance->ShowPopup();
+                        }
+
+                        /* Delete received notification from DB */
+                        ret_err = notification_delete_by_priv_id(pkgname,
+                            NOTIFICATION_TYPE_NOTI, priv_id);
+                        if (ret_err != NOTIFICATION_ERROR_NONE) {
+                            ICO_ERR("notification_delete_by_priv_id:error(%d)", ret_err);
+                            break;
+                        }
+                    }
+
+                    get_list = notification_list_get_next(get_list);
+                }
+            }
+        }
+    }
+
+    if (notification_list != NULL) {
+        notification_free_list(notification_list);
+        notification_list = NULL;
+    }
+
+    ICO_TRA("CicoOnScreen::NotificationCallback Leave");
+}
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/onscreen/CicoOnScreen.h b/src/onscreen/CicoOnScreen.h
new file mode 100644 (file)
index 0000000..1e574b6
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * Copyright (c) 2014, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+/**
+ * @brief   On Screen
+ *
+ * @date    Jan-07-2014
+ */
+#ifndef __CICO_ON_SCREEN_H__
+#define __CICO_ON_SCREEN_H__
+
+#ifdef HAVE_CONFIG_H
+    #include "config.h"
+    #define __UNUSED__
+#else
+    #define __UNUSED__
+#endif
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <app.h>
+#include <aul.h>
+#include <Ecore_Evas.h>
+#include <Evas.h>
+
+#include <stdbool.h>
+#include <CicoNotification.h>
+#include <CicoNotificationService.h>
+
+#include "ico_log.h"
+
+/*============================================================================*/
+/* Define fixed parameters                                                    */
+/*============================================================================*/
+/* Window Size */
+#define STATUS_BAR_HEIGHT    64
+#define CTRL_BAR_HEIGHT      128
+#define WIDTH                1080
+#define HEIGHT               (1920 - STATUS_BAR_HEIGHT - CTRL_BAR_HEIGHT)
+
+/* Popup Size */
+#define POPUP_WIDTH         640
+#define POPUP_HEIGHT        300
+#define POPUP_ST_X          ((WIDTH-POPUP_WIDTH)/2)
+#define POPUP_ST_Y          ((HEIGHT-POPUP_HEIGHT)/2)
+
+/* Popup Frame Size */
+#define POPUP_FRAME_THICK   10
+#define POPUP_FRAME_WIDTH   (POPUP_WIDTH+POPUP_FRAME_THICK)
+#define POPUP_FRAME_HEIGHT  (POPUP_HEIGHT+POPUP_FRAME_THICK)
+#define POPUP_FRAME_ST_X    (POPUP_ST_X-POPUP_FRAME_THICK/2)
+#define POPUP_FRAME_ST_Y    (POPUP_ST_Y-POPUP_FRAME_THICK/2)
+
+/* Popup Icon Size */
+#define POPUP_ICON_WIDTH    50
+#define POPUP_ICON_HEIGHT   50
+#define POPUP_ICON_ST_X     POPUP_ST_X
+#define POPUP_ICON_ST_Y     POPUP_ST_Y
+
+/* Popup Title Size */
+#define POPUP_TITLE_WIDTH   (POPUP_WIDTH-POPUP_ICON_WIDTH)
+#define POPUP_TITLE_HEIGHT  POPUP_ICON_HEIGHT
+#define POPUP_TITLE_ST_X    (POPUP_ST_X+POPUP_ICON_WIDTH)
+#define POPUP_TITLE_ST_Y    POPUP_ST_Y
+
+/* Popup Content BG Size */
+#define POPUP_CONTENT_BG_WIDTH  POPUP_WIDTH
+#define POPUP_CONTENT_BG_HEIGHT (POPUP_HEIGHT-POPUP_TITLE_HEIGHT)
+#define POPUP_CONTENT_BG_ST_X   POPUP_ST_X
+#define POPUP_CONTENT_BG_ST_Y   (POPUP_ST_Y+POPUP_TITLE_HEIGHT)
+
+/* Popup Content Size */
+#define POPUP_CONTENT_WIDTH  POPUP_WIDTH
+#define POPUP_CONTENT_HEIGHT POPUP_TITLE_HEIGHT
+#define POPUP_CONTENT_ST_X   POPUP_ST_X
+#define POPUP_CONTENT_ST_Y   (POPUP_ST_Y+POPUP_TITLE_HEIGHT+(POPUP_HEIGHT-POPUP_CONTENT_HEIGHT)/2)
+
+#define ICO_ORIENTATION_VERTICAL (1) 
+#define ICO_ORIENTATION_HORIZONTAL (2)
+
+#define LEMOLO_PKGNAME       "org.tizen.dialer"
+
+#define FALSE                0
+#define TRUE                 1
+
+#define ICON_PATH      (char *)"/usr/share/icons/default/small/org.tizen.dialer.png"
+
+/*============================================================================*/
+/* Define data types                                                          */
+/*============================================================================*/
+struct popup_data
+{
+    Ecore_Evas  *window;
+    Evas        *evas;
+    Evas_Object *background;
+    Evas_Object *icon;
+    Evas_Object *title;
+    Evas_Object *content;
+    Evas_Object *icon_bg;
+    Evas_Object *title_bg;
+    Evas_Object *content_bg;
+    int         show_flag;
+};
+
+struct lemolo_noti_data
+{
+    char *title;             /* if exist then box-type else band-type */
+    char *content;           /* Mandatory */
+    char *icon;              /* Mandatory(box-type), Optional(band-type) */
+    char *text;
+    bundle *service_handle;
+};
+
+/*============================================================================*/
+/* Define class                                                               */
+/*============================================================================*/
+class CicoOnScreen
+{
+  public:
+    CicoOnScreen(void);
+    ~CicoOnScreen(void);
+    bool StartOnScreen(int orientation);
+    void Finalize(void);
+    static void NotificationCallback(void *data, notification_type_e type,
+        notification_op *op_list, int num_op);
+
+  private:
+    void ShowPopup(void);
+    static void HidePopup(void *data, Evas *e, Evas_Object *obj, void *event_info);
+    void InitializePopup(void);
+    void InitializeNotificationData(void);
+    void InitializePopupData(void);
+
+    static CicoOnScreen *os_instance;
+    static struct popup_data ico_appdata;
+    static struct lemolo_noti_data ico_notidata;
+
+  protected:
+    CicoNotificationService notiservice_;
+};
+#endif  // __CICO_ON_SCREEN_H__
+// vim:set expandtab ts=4 sw=4:
diff --git a/src/onscreen/CicoOnScreenAction.cpp b/src/onscreen/CicoOnScreenAction.cpp
deleted file mode 100644 (file)
index f060cfb..0000000
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   touch action for onscreen application
- *
- * @date    Feb-15-2013
- */
-#include "CicoOnScreenAction.h"
-
-/*============================================================================*/
-/* Declare static values                                                      */
-/*============================================================================*/
-char CicoOnScreenAction::edje_str[ICO_ONS_BUF_SIZE];
-int CicoOnScreenAction::wait_reply = ICO_ONS_NO_WAIT;
-int CicoOnScreenAction::ws_port;
-CicoOnScreenContext* CicoOnScreenAction::context;
-CicoHomeScreenSound* CicoOnScreenAction::sound;
-
-/*============================================================================*/
-/* Functions Declaration (CicoOnScreenAction)                                 */
-/*============================================================================*/
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAction::CreateContext
- *          create context
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void CicoOnScreenAction::CreateContext(void)
-{
-    context = new CicoOnScreenContext(ws_port);
-
-    /* set callback */
-    if(context == NULL){
-        return;
-    }
-    context->SetCallBack(UwsCallBack);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAction::DeleteContext
- *          delete context
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void CicoOnScreenAction::DeleteContext(void)
-{
-    if(context == NULL){
-        return;
-    }
-    delete context;
-}
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAction::Initialize
- *          initialize
- *
- * @param[in]   ws_port    port of websocket
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void CicoOnScreenAction::Initialize(CicoHomeScreenConfig *homescreen_config,CicoHomeScreenSound *sound_tmp)
-{
-    
-    wait_reply = ICO_ONS_NO_WAIT;
-
-    ws_port = ICO_HS_WS_PORT;
-  
-    sound = sound_tmp;
-
-    /* copy ws_port */
-    if (homescreen_config != NULL) {
-        ws_port = homescreen_config->ConfigGetInteger(ICO_HS_CONFIG_ONSCREEN,
-                                         ICO_HS_CONFIG_WS_PORT,
-                                         ICO_HS_WS_PORT);
-    }
-
-    /* create context*/
-    CreateContext(); 
-
-    /* ecore timer add*/
-    ecore_timer_add(ICO_ONS_WS_TIMEOUT,EcoreEvent, NULL);
-}
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAction::Finalize
- *          finalize
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void CicoOnScreenAction::Finalize(void)
-{
-    /* create context*/
-    DeleteContext(); 
-
-}
-
-/*--------------------------------------------------------------------------*/
-/*
- * @brief   CicoOnScreenAction::EdjeParseStr
- *          parse string by " "
- *
- * @param[in]   in         text    
- * @param[in]   arg_num    arg_num
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-char *
-CicoOnScreenAction::EdjeParseStr(void *in, int arg_num)
-{
-    int i;
-    char *data;
-
-    ICO_DBG("CicoOnScreenAction::EdjeParseStr: %s, arg = %d", in, arg_num);
-    data = strtok(reinterpret_cast<char*>(in), " ");
-    /* arg_num : 0 to n */
-    for (i = 0; i < arg_num; i++) {
-        data = strtok(NULL, " ");
-    }
-    ICO_DBG("CicoOnScreenAction::EdjeParseStr: data: %s", data);
-    return data;
-}
-/*--------------------------------------------------------------------------*/
-/*
- * @brief   CicoOnScreenAction::UwsCallBack
- *          callback function from UWS
- *
- * @param[in]   context             context
- * @param[in]   event               event kinds
- * @param[in]   id                  client id
- * @param[in]   detail              event detail
- * @param[in]   data                user data
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoOnScreenAction::UwsCallBack(const struct ico_uws_context *uws_context,
-                const ico_uws_evt_e event, const void *id,
-                const ico_uws_detail *detail, void *data)
-{
-    ICO_DBG("CicoOnScreenAction::UwsCallBack: %p", uws_context);
-    char *in;
-
-    switch (event) {
-    case ICO_UWS_EVT_OPEN:
-        ICO_DBG("CicoOnScreenAction::UwsCallBack: ICO_UWS_EVT_OPEN(id=%d)", 
-                   reinterpret_cast<int>(id));
-        context->SetUwsId(const_cast<void *>(id));
-        context->EventMessage(const_cast<char*>("%s ANS HELLO"), ICO_HS_MSG_HEAD_OS);
-        break;
-
-    case ICO_UWS_EVT_CLOSE:
-        ICO_DBG("CicoOnScreenAction::UwsCallBack: ICO_UWS_EVT_CLOSE(id=%d)",
-                   reinterpret_cast<int>(id));
-        context->CloseUwsContext();
-        context->SetWsConnected(0);
-        context->SetUwsId(NULL);
-        break;
-
-    case ICO_UWS_EVT_RECEIVE:
-        ICO_DBG("CicoOnScreenAction::UwsCallBack: ICO_UWS_EVT_RECEIVE(id=%d, msg=%s, len=%d)",
-                   reinterpret_cast<int>(id), static_cast<char *>(detail->_ico_uws_message.recv_data),
-                   detail->_ico_uws_message.recv_len);
-        in = static_cast<char *>(detail->_ico_uws_message.recv_data);
-
-        if (strlen(in) == 0)
-            break;
-        wait_reply = ICO_ONS_NO_WAIT;
-        /* onscreen activate request */
-        if (strncmp("OPEN", in, 4) == 0) {
-            ICO_DBG("%s", in);
-            strncpy(edje_str, EdjeParseStr(in, 1), sizeof(edje_str));
-            ICO_DBG("CicoOnScreenAction::UwsCallBack: %s", &edje_str[0]);
-            if (CicoOnScreenAppList::LoadIconsEdjeFile(&edje_str[0]) == 0) {
-                context->EventMessage(const_cast<char*>("%s RESULT SUCCESS"), ICO_HS_MSG_HEAD_OS);
-            }
-            else {
-                context->EventMessage(const_cast<char*>("%s RESULT FAILED"), ICO_HS_MSG_HEAD_OS);
-            }
-        }
-        break;
-
-    case ICO_UWS_EVT_ERROR:
-        ICO_DBG("CicoOnScreenAction::UwsCallBack: ICO_UWS_EVT_ERROR(id=%d, err=%d)",
-                   reinterpret_cast<int>(id), detail->_ico_uws_error.code);
-        break;
-
-    case ICO_UWS_EVT_ADD_FD:
-        ICO_DBG("CicoOnScreenAction::UwsCallBack: ICO_UWS_EVT_ADD_FD(id=%d, fd=%d)",
-                   reinterpret_cast<int>(id), detail->_ico_uws_fd.fd);
-        break;
-
-    case ICO_UWS_EVT_DEL_FD:
-        ICO_DBG("CicoOnScreenAction::UwsCallBack: ICO_UWS_EVT_DEL_FD(id=%d, fd=%d)",
-                   reinterpret_cast<int>(id), detail->_ico_uws_fd.fd);
-        break;
-
-    default:
-        break;
-    }
-
-    return;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   OnScreenAction::EcoreEvent
- *          timer handler, it is called by Ecore.
- *
- * @param[in]   data                user data
- * @return      call back setting
- * @retval      ECORE_CALLBACK_RENEW    set callback
- */
-/*--------------------------------------------------------------------------*/
-Eina_Bool 
-CicoOnScreenAction::EcoreEvent(void *data)
-{
-    if (context->GetWsConnected()) {
-        ico_uws_service(context->GetUwsContext());
-    }
-    else {
-        if (context != NULL || context->GetUwsContext() != NULL) {
-            DeleteContext();
-        }
-        CreateContext(); 
-    }
-
-    return ECORE_CALLBACK_RENEW;
-}
-
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAction::TouchUpEdje
- *          processing when edje button touch up.
- *
- * @param[in]   data                user data
- * @param[in]   obj                 evas object of the button
- * @param[in]   event_info          evas event information
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoOnScreenAction::TouchUpEdje(void *data, Evas *evas, Evas_Object *obj, void *event_info)
-{
-    if (wait_reply == ICO_ONS_CMD_WAIT){
-        return;
-    } 
-    wait_reply = ICO_ONS_CMD_WAIT;
-
-    /* get name from userdata */
-    if (data != NULL) {
-        ICO_PRF("TOUCH_EVENT Edje Up date=%s",
-                static_cast<const char *>(data));
-    }
-    else {
-        ICO_PRF("TOUCH_EVENT Edje Up date=(NIL)");
-    }
-    context->EventMessage(const_cast<char*>("%s TOUCH %s %s"), ICO_HS_MSG_HEAD_OS, edje_str, data);
-
-    /* operation sound */
-    sound->PlaySound(sound->GetSoundFileName(ICO_HS_SND_TYPE_DEFAULT));
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAction::TouchUpNext
- *          processing when next button touch up.
- *
- * @param[in]   data                user data
- * @param[in]   obj                 evas object of the button
- * @param[in]   event_info          evas event information
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoOnScreenAction::TouchUpNext(void *data, Evas *evas, Evas_Object *obj, void *event_info)
-{
-   
-    if (wait_reply == ICO_ONS_CMD_WAIT){
-        return;
-    }
-    wait_reply = ICO_ONS_CMD_WAIT;
-
-    CicoOnScreenAppList::NextList();
-
-    /* get name from userdata */
-    if (data != NULL) {
-        ICO_PRF("TOUCH_EVENT Next Up date=%s",
-                   static_cast<const char *>(data));
-    }
-    else {
-        ICO_PRF("TOUCH_EVENT Next Up date=(NIL)");
-    }
-    context->EventMessage(static_cast<char*>("%s TOUCH %s %s"), ICO_HS_MSG_HEAD_OS, edje_str, data);
-
-    /* operation sound */
-    sound->PlaySound(sound->GetSoundFileName(ICO_HS_SND_TYPE_DEFAULT));
-    
-}
-
-
diff --git a/src/onscreen/CicoOnScreenAction.h b/src/onscreen/CicoOnScreenAction.h
deleted file mode 100644 (file)
index 9c8e859..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-#ifndef __CICOONSCREENACTION_H__
-#define __CICOONSCREENACTION_H__
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   touch action for onscreen application
- *
- * @date    Feb-15-2013
- */
-#include <unistd.h>
-#include <Eina.h>
-#include <Evas.h>
-#include <Ecore.h>
-#include <Ecore_Wayland.h>
-#include <Ecore_Evas.h>
-#include <Edje.h>
-
-#include "home_screen.h"
-#include "home_screen_res.h"
-#include "CicoHomeScreenConfig.h"
-#include "CicoHomeScreenSound.h"
-#include "CicoOnScreenAppList.h"
-#include "CicoOnScreenContext.h"
-
-#include <ico_uws.h>
-
-/*============================================================================*/
-/* Define data types                                                          */
-/*============================================================================*/
-#define ICO_ONS_WS_TIMEOUT 0.1
-#define ICO_ONS_BUF_SIZE    (1024)
-
-#define ICO_ONS_CMD_WAIT    (1)
-#define ICO_ONS_NO_WAIT     (2)
-
-/*============================================================================*/
-/* Class Declaration (CicoOnscreenControlContext)                                    */
-/*============================================================================*/
-class CicoOnScreenAction                                                     
-{
-  public:
-    static void Initialize(CicoHomeScreenConfig *homescreen_config,
-                           CicoHomeScreenSound *sound_tmp);
-    static void Finalize(void);
-    static Eina_Bool EcoreEvent(void *data);
-    static void UwsCallBack(const struct ico_uws_context *context,
-                const ico_uws_evt_e event, const void *id,
-                const ico_uws_detail *detail, void *data);
-    static void TouchUpEdje(void *data,
-                            Evas *evas, 
-                            Evas_Object *obj,
-                            void *event_info);
-    static void TouchUpNext(void *data,
-                            Evas *evas,
-                            Evas_Object *obj,
-                            void *event_info);
-  private:
-    static void CreateContext(void);
-    static void DeleteContext(void);
-    static char *EdjeParseStr(void *in, int arg_num);
-   
-    static char edje_str[ICO_ONS_BUF_SIZE];
-    static int wait_reply;
-    static int ws_port;
-    static CicoOnScreenContext* context;
-    static CicoHomeScreenSound* sound;
-  protected:
-    CicoOnScreenAction operator = (const CicoOnScreenAction&);
-    CicoOnScreenAction(const CicoOnScreenAction&);
-};
-
-#endif
-
diff --git a/src/onscreen/CicoOnScreenAppList.cpp b/src/onscreen/CicoOnScreenAppList.cpp
deleted file mode 100644 (file)
index 185a2b4..0000000
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   onscreen application
- *
- * @date    Feb-15-2013
- */
-#include "CicoOnScreenAppList.h"
-
-/*============================================================================*/
-/* Declare static values                                                      */
-/*============================================================================*/
-CicoOnScreenControlWindow *CicoOnScreenAppList::control_window;
-int CicoOnScreenAppList::applist_idx; 
-int CicoOnScreenAppList::app_cnt; 
-
-/*============================================================================*/
-/* Functions Declaration (CicoOnScreenAppList)                          */
-/*============================================================================*/
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAppList::Initialize
- *          initialize applist
- *
- * @param[in]   controlWindow    instance of CicoOnScreenControlWindow
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void 
-CicoOnScreenAppList::Initialize(CicoOnScreenControlWindow *control_window_tmp)
-{
-    control_window = NULL;
-    applist_idx = 0;
-    app_cnt = 0;
-
-    control_window = control_window_tmp;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAppList::SetConfigCallback
- *          set callback for config
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void 
-CicoOnScreenAppList::SetConfigCallback(void)
-{
-    ico_uxf_econf_setAppUpdateCb(ConfigEvent);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAppList::GetAppIndex
- *          return a application index that to be set indicated index.
- *
- * @param[in]   filepath            file path
- * @return      index or ERROR
- */
-/*--------------------------------------------------------------------------*/
-int 
-CicoOnScreenAppList::GetAppIndex(int idx)
-{
-    int ii;
-    int appidx = idx + applist_idx * ICO_ONS_APPLI_NUM + 1;
-    int cnt = 0;
-    Ico_Uxf_App_Config *appconf = const_cast<Ico_Uxf_App_Config *>(ico_uxf_getAppConfig());
-
-    ICO_DBG("CicoOnScreenAppList::GetAppIndex: idx=%d appidx=%d appcnt=%d",
-               idx, appidx, app_cnt);
-
-    for (ii = 0; ii < appconf->applicationNum; ii++) {
-        if ((! appconf->application[ii].noicon) &&
-            (strcmp(appconf->application[ii].type, ICO_HS_GROUP_SPECIAL) != 0)) {
-            ++cnt;
-        }
-        if (cnt == appidx) {
-            return ii;
-        }
-    }
-
-    return -1;
-}
-                                                                              
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAppList::LoadConfig
- *          load/reload configuration of Application.
- *          and except special group applications and no icon applications from showing.
- *
- * @param       none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void 
-CicoOnScreenAppList::LoadConfig(void)  
-{
-    Ico_Uxf_App_Config *appconf;
-    int appcnt;
-    int appidx, idx, cnt;
-
-    ICO_TRA("CicoOnScreenAppList::LoadConfig: Enter");
-
-    appconf = const_cast<Ico_Uxf_App_Config *>(ico_uxf_getAppConfig());
-    appcnt = appconf->applicationNum;
-    for (appidx = 0; appidx < appconf->applicationNum; appidx++) {
-        if ((appconf->application[appidx].noicon) ||
-            (strcmp(appconf->application[appidx].type, ICO_HS_GROUP_SPECIAL) == 0)) {
-            appcnt--;
-            ICO_DBG("CicoOnScreenAppList::LoadConfig: No Need appid=%s noicon=%d type=%s",
-                       appconf->application[appidx].appid,
-                       appconf->application[appidx].noicon,
-                       appconf->application[appidx].type);
-        }
-    }
-    cnt = 0;
-    for (idx = 0; idx < appcnt; idx++) {
-        appidx = GetAppIndex(idx);
-        if (appidx > 0) {
-            ICO_DBG("CicoOnScreenAppList::LoadConfig: appid=%s seat=%d idx=%d seatcnt=%d",
-                       appconf->application[appidx].appid, cnt
-                               / ICO_ONS_APPLI_NUM, idx - ICO_ONS_APPLI_NUM
-                               * (cnt / ICO_ONS_APPLI_NUM), ((appcnt - 1)
-                               / ICO_ONS_APPLI_NUM) + 1);
-            ++cnt;
-        }
-    }
-
-    app_cnt = appcnt;
-    applist_idx = 0;
-    ICO_TRA("CicoOnScreenAppList::LoadConfig: Leave(appcnt=%d)", appcnt);
-
-    return;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAppList::ConfigEvent
- *          This is a callback function called when configurations
- *          were updated.
- *
- * @param[in]   appid               application id
- * @param[in]   type                event type(install/uninstall)
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void 
-CicoOnScreenAppList::ConfigEvent(const char *appid, int type)
-{
-    ICO_TRA("CicoOnScreenAppList::LoadConfig: Enter(appid=%s, type=%d)", 
-               appid, type);
-
-    LoadConfig();
-
-    ICO_TRA("CicoOnScreenAppList::LoadConfig: Leave");
-
-    return;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAppList::SetAppIcons
- *          set App Icon on rect
- *
- * @param[in]   part               part
- * @param[in]   partname           part name
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void 
-CicoOnScreenAppList::SetAppIcons(Evas_Object* part,const char *partname)
-{
-    int idx; /* rect index */
-    int appidx; /* appli index */
-    char imgfile[ICO_ONS_BUF_SIZE];
-    Ico_Uxf_App_Config *appconf;
-    Evas_Object *img = NULL;
-
-    memset(imgfile, 0, sizeof(imgfile));
-    /* check name, if part is rect/next_bt/cancel_bt */
-    if (strncmp(partname, ICO_HS_ONS_PART_RECT_NAME,
-                sizeof(ICO_HS_ONS_PART_RECT_NAME) - 1) == 0) {
-        img = control_window->EvasObjectImageFilledAdd();
-        /* get rect index from partname(rect_01, rect_02, ...) */
-        sscanf(partname, ICO_HS_ONS_PART_RECT_NAME"%d", &idx);
-        idx -= 1;
-
-        appconf = const_cast<Ico_Uxf_App_Config *>(ico_uxf_getAppConfig());
-
-        appidx = GetAppIndex(idx);
-        ICO_DBG("CicoOnScreenAppList::SetAppIcons: idx=%d appidx=%d",
-                   idx, appidx);
-        if ((appidx < 0) || (appidx > appconf->applicationNum)) {
-        control_window->EvasObjectDel(img);
-            return;
-        }
-
-        /* set icon file name */
-        snprintf(imgfile, ICO_ONS_BUF_SIZE, "%s",
-                 appconf->application[appidx].icon_key_name);
-        ICO_DBG("CicoOnScreenAppList::SetAppIcons: set image = %s(%d/%d), app=%s, group=%s",
-                   imgfile, appidx, app_cnt, appconf->application[appidx].appid,
-                   appconf->application[appidx].group);
-        /* set mouse call back function */
-        control_window->EvasObjectEventCallBack(img, EVAS_CALLBACK_MOUSE_UP,
-                                       CicoOnScreenAction::TouchUpEdje,
-                                       appconf->application[appidx].appid);
-    }
-    else if (strcmp(partname, ICO_HS_ONS_PART_NEXT_NAME) == 0) {
-        control_window->EvasObjectEventCallBack(part, EVAS_CALLBACK_MOUSE_UP,
-                                       CicoOnScreenAction::TouchUpNext, 
-                                       static_cast<void*>(const_cast<char*>(partname)));
-    }
-    else if (strcmp(partname, ICO_HS_ONS_PART_CANCEL_NAME) == 0) {
-        control_window->EvasObjectEventCallBack(part, EVAS_CALLBACK_MOUSE_UP,
-                                       CicoOnScreenAction::TouchUpEdje, 
-                                       static_cast<void*>(const_cast<char*>(partname)));
-    }
-    else {
-        return;
-    }
-
-    control_window->UpdateEvasObject(img,imgfile,partname);
-    
-    
-    control_window->EinaListAppend(img);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAppList::GetFname(
- *          get filename from the full path
- *
- * @param[in]   filepath            file path
- * @return      filename
- */
-/*--------------------------------------------------------------------------*/
-const char *
-CicoOnScreenAppList::GetFname(const char *filepath)
-{
-    int ii;
-    const char *name = filepath;
-
-    for (ii = 0; ii < ICO_ONS_BUF_SIZE - 1; ii++) {
-        if (filepath[ii] == 0)
-            break;
-        if (filepath[ii] == '/')
-            name = &filepath[ii + 1];
-    }
-
-    return name;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAppList::LoadIconsEdjeFile
- *          loadIcons
- *
- * @param[in]   evas               evas
- * @param[in]   edje               edje
- * @param[in]   part               part
- * @param[in]   partname           part name
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-int
-CicoOnScreenAppList::LoadIconsEdjeFile(const char *edje_file)
-{
-    int ret;
-    Evas_Object *part; /* part handle */
-    Eina_List *group; /* edje group list */
-    Eina_List *list; /* part list in edje */
-    int group_count = 0; /* group counter */
-    int name_count = 0; /* name counter */
-  
-    /* init evas (if it doesn't yet) */
-    ret = control_window->InitEvas();
-    if(ret < 0){
-        return -1;
-    }
-
-    /* delete pre image */
-    control_window->DeletePreImage();
-    /* create and show edje*/
-    control_window->CreateAndShowEdje();
-
-    /* get group list */
-    group = control_window->GetEdjeFileCollectionList(edje_file);
-    while (group != NULL) {
-        ret = control_window->SetEdjeFile(group,edje_file);
-        ICO_DBG("CicoOnScreenAppList::LoadIconsEdjeFile: group[%d] data : %s",
-                   group_count,static_cast<const char *>(group->data));
-        /* get list */
-        list = control_window->GetEdjeObjectAccessPartList();
-        while (list != NULL) {
-            ICO_DBG("CicoOnScreenAppList::LoadIconsEdjeFile: list[%d] data : %s",
-                       name_count,static_cast<const char *>(list->data));
-
-            /* set callback for part name */
-            part = control_window->GetEdjeObjectPartObject((const char *)list->data);
-            if (part != NULL) {
-                ICO_DBG("CicoOnScreenAppList::LoadIconsEdjeFile: list[%d] name : %s",
-                           name_count,static_cast<const char *>(list->data));
-
-                /* if not applist */
-                if (strncmp(GetFname(edje_file), ICO_HS_ONS_APPLI_LIST_NAME,
-                            sizeof(ICO_HS_ONS_APPLI_LIST_NAME) - 1) != 0) {
-                    control_window->EvasObjectEventCallBack(part,
-                                                   EVAS_CALLBACK_MOUSE_UP,
-                                                   CicoOnScreenAction::TouchUpEdje,
-                                                   list->data);
-                }
-                /* if applist */
-                else {
-                    SetAppIcons(part, static_cast<const char *>(list->data));
-                }
-            }
-            else {
-                ICO_DBG("CicoOnScreenAppList::LoadIconsEdjeFile: list[%d] is NULL",
-                           name_count);
-            }
-            /* to next list */
-            list = list->next;
-            ++name_count;
-        }
-        /* to next group */
-        group = group->next;
-        ++group_count;
-    }
-    ICO_DBG("CicoOnScreenAppList::LoadIconsEdjeFile: group num is %d", group_count);
-    ICO_DBG("CicoOnScreenAppList::LoadIconsEdjeFile: name num is %d", name_count);
-
-    return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenAppList::NextList
- *          change to NextList
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void CicoOnScreenAppList::NextList(void){
-    int listcnt;
-    if (app_cnt > 0) {
-        listcnt = ((app_cnt - 1) / ICO_ONS_APPLI_NUM) + 1;
-    }
-    else {
-        listcnt = 1;
-    }
-    applist_idx += 1;
-    if (applist_idx >= listcnt) {
-        applist_idx = 0;
-    }
-}
-
-
diff --git a/src/onscreen/CicoOnScreenAppList.h b/src/onscreen/CicoOnScreenAppList.h
deleted file mode 100644 (file)
index 8f56c0f..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef __CICOONSCREENAPPLIST_H__
-#define __CICOONSCREENAPPLIST_H__
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   onscreen application
- *
- * @date    Feb-15-2013
- */
-#include <unistd.h>
-#include <Eina.h>
-#include <Evas.h>
-#include <Ecore.h>
-#include <Ecore_Wayland.h>
-#include <Ecore_Evas.h>
-#include <Edje.h>
-
-#include "ico_uxf.h"
-#include "ico_uxf_conf.h"
-#include "ico_uxf_conf_ecore.h"
-
-#include "home_screen.h"
-#include "home_screen_res.h"
-#include "CicoOnScreenControlWindow.h"
-#include "CicoOnScreenAction.h"
-
-/*============================================================================*/
-/* Define data types                                                          */
-/*============================================================================*/
-#define ICO_ONS_BUF_SIZE    (1024)
-#define ICO_ONS_APPLI_NUM    (15)        /* only for applist */
-
-/*============================================================================*/
-/* Class Declaration (CicoOnScreenAppList)                                        */
-/*============================================================================*/
-class CicoOnScreenAppList                                                      
-{
- public:
-    static void Initialize(CicoOnScreenControlWindow *control_window_tmp);
-    static void LoadConfig(void);
-    static void ConfigEvent(const char *appid, int type);                                             
-    static void SetConfigCallback(void);
-    static int LoadIconsEdjeFile(const char *edje_file);
-    static void NextList(void);                                                                               
-  private:
-    static int GetAppIndex(int idx);                                                                         
-    static void SetAppIcons(Evas_Object *part,const char *partname); 
-    static const char *GetFname(const char *filepath);
-         
-    static CicoOnScreenControlWindow *control_window; 
-    static int applist_idx; /* only for applist, it's index */
-    static int app_cnt; /* only for applist. a number of app to listed */
-  protected:
-    CicoOnScreenAppList operator = (const CicoOnScreenAppList&);
-    CicoOnScreenAppList(const CicoOnScreenAppList&);
-};
-
-#endif
-
diff --git a/src/onscreen/CicoOnScreenContext.cpp b/src/onscreen/CicoOnScreenContext.cpp
deleted file mode 100644 (file)
index 2b02327..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   onscreen application
- *
- * @date    Feb-15-2013
- */
-#include "CicoOnScreenContext.h"
-
-/*============================================================================*/
-/* Functions Declaration (CicoOnScreenContext)                                */
-/*============================================================================*/
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenContext::CloseUwsContext()
- *          close context
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void CicoOnScreenContext::CloseUwsContext(void)
-{
-    ico_uws_close(uws_context);
-    uws_context = NULL;
-}
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenContext::setUwsId()
- *          setting id value
- *
- * @param[in]   id       setting value
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void CicoOnScreenContext::SetUwsId(void *id)
-{
-    uws_id = id;
-}
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenContext::CicoOnScreenContext
- *          constractor
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-CicoOnScreenContext::CicoOnScreenContext(int ws_port_tmp)
-{
-   
-    char uri[ICO_HS_TEMP_BUF_SIZE];
-
-    uws_id = NULL;
-    ws_connected = 0;
-    uws_context = NULL;
-
-    /* set up URI "ws://HOST:PORT" */
-    ws_port = ws_port_tmp;
-    sprintf(uri, "ws://%s:%d", ICO_HS_WS_HOST, ws_port);
-
-    /* create context */
-    uws_context = ico_uws_create_context(uri, ICO_HS_PROTOCOL);
-    ICO_DBG("CicoOnScreenContext::CicoOnScreenContext: ctx = %p",
-               uws_context);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenContext::~CicoOnScreenContext
- *          constractor
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-CicoOnScreenContext::~CicoOnScreenContext()
-{
-    ico_uws_close(uws_context);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenContext::SetCallBack
- *          set callback function
- *
- * @param[in]   callback    callback function
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoOnScreenContext::SetCallBack(void (*callback)(const ico_uws_context*,
-                                                  ico_uws_evt_e, 
-                                                  const void*, 
-                                                  const ico_uws_detail*, 
-                                                  void*))
-{
-    int ret;
-    /* set callback */
-    ws_connected = 0;
-    
-    if (uws_context == NULL) {
-        ICO_DBG("CicoOnScreenContext::SetCallBack: libwebsocket_create_context failed.");
-    }
-    else {
-        /* set callback */
-        ret = ico_uws_set_event_cb(uws_context,callback, NULL);
-        if (ret != ICO_UWS_ERR_NONE) {
-             ICO_DBG("CicoOnScreenContext::SetCallBack: cannnot set callback");
-        }
-        ws_connected = 1;
-    }
-}
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenContext::EventMessage
- *          send message
- *
- * @param[in]   wsi                 libwebsockets management table to send
- * @param[in]   format              message to send
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void 
-CicoOnScreenContext::EventMessage(char *format, ...)
-{
-    va_list list;
-    unsigned char message[ICO_HS_TEMP_BUF_SIZE];
-
-    va_start(list, format);
-    vsnprintf(reinterpret_cast<char*>(message), sizeof(message), format, list);
-    va_end(list);
-
-    ICO_DBG("CicoOnScreenContext::EventMessage: ons_event_message %s", message);
-
-    ico_uws_send(uws_context,uws_id, message, strlen(reinterpret_cast<char*>(message)));
-
-    return;
-}
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenContext::GetWsConnected
- *          get current value of ws_connected
- *
- * @param[in]   none
- * @return      ws_connected
- */
-/*--------------------------------------------------------------------------*/
-int
-CicoOnScreenContext::GetWsConnected(void)
-{
-    return ws_connected;
-}
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenContext::GetUwsContext
- *          get current value of uws_context
- *
- * @param[in]   none
- * @return      uws_context
- */
-/*--------------------------------------------------------------------------*/
-struct ico_uws_context *
-CicoOnScreenContext::GetUwsContext(void)
-{
-    return uws_context;
-}
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenContext::SetWsConnected
- *          set value to ws_connected
- *
- * @param[in]   value  value to ws_connected
- * @return      void
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoOnScreenContext::SetWsConnected(int value)
-{
-   ws_connected = value;
-}
-
diff --git a/src/onscreen/CicoOnScreenContext.h b/src/onscreen/CicoOnScreenContext.h
deleted file mode 100644 (file)
index 1978ddb..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef __CICOONSCREENCONTEXT_H__
-#define __CICOONSCREENCONTEXT_H__
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   onscreen application
- *
- * @date    Feb-15-2013
- */
-#include <unistd.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "ico_uxf.h"
-#include "ico_uxf_conf.h"
-#include "ico_uxf_conf_ecore.h"
-
-#include "home_screen.h"
-#include "home_screen_res.h"
-
-
-#include <ico_uws.h>
-
-                                                                        
-/*============================================================================*/
-/* Class Declaration (CicoOnscreenContext)                               */
-/*============================================================================*/
-class CicoOnScreenContext                                                     
-{
-  public:
-    CicoOnScreenContext(int ws_port);
-    ~CicoOnScreenContext(void);
-    void SetUwsId(void *id);
-    int GetWsConnected(void); 
-    struct ico_uws_context *GetUwsContext(void);
-    void CloseUwsContext();
-    void SetWsConnected(int value);
-    void SetCallBack(void (*callback)(const ico_uws_context*,
-                                      ico_uws_evt_e,
-                                      const void*, 
-                                      const ico_uws_detail*,
-                                      void*));
-    void EventMessage(char *format, ...);
-  private:
-    void *uws_id;
-    int ws_port;
-    int ws_connected;
-    struct ico_uws_context *uws_context;
-  protected:
-    CicoOnScreenContext operator = (const CicoOnScreenContext&); 
-    CicoOnScreenContext(const CicoOnScreenContext&); 
-};
-#endif
-
diff --git a/src/onscreen/CicoOnScreenControlWindow.cpp b/src/onscreen/CicoOnScreenControlWindow.cpp
deleted file mode 100644 (file)
index b9197ad..0000000
+++ /dev/null
@@ -1,484 +0,0 @@
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   window control for onscreen application
- *
- * @date    Feb-15-2013
- */
-#include "CicoOnScreenControlWindow.h"
-
-/*============================================================================*/
-/* Functions Declaration (CicoOnscreenControlWindow)                          */
-/*============================================================================*/
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::CicoOnScreenControlWindow
- *          constractor 
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-CicoOnScreenControlWindow::CicoOnScreenControlWindow()
-{
-    window = NULL;
-    evas = NULL;
-    edje = NULL;
-    img_list = NULL;
-
-    /* Reset a ecore_evas */
-    ecore_evas_init();
-
-    /* Initialize a edje */
-    edje_init();
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::~CicoOnScreenControlWindow
- *          destructor
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-CicoOnScreenControlWindow::~CicoOnScreenControlWindow()
-{
-    /* edje shutdown*/
-    edje_shutdown();
-
-    if(window != NULL){
-        ecore_evas_free(window);
-    }
-    /* end the ecore_evas */
-    ecore_evas_shutdown();
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::CreateEcoreEvas
- *          make new ecore_evas 
- *
- * @param[in]   none
- * @return      0:success -1:failed
- */
-/*--------------------------------------------------------------------------*/
-int
-CicoOnScreenControlWindow::CreateEcoreEvas(void)
-{
-    /* Make a new ecore_evas */
-    window = ecore_evas_new(NULL, 0, 0, 1, 1, "frame=0");
-
-    /* if not for a window, return NULL */
-    if (!window) {
-        EINA_LOG_CRIT("OnScreen: could not create ons_window.");
-        return -1;
-    }
-    ecore_evas_callback_delete_request_set(window, QuitEcoreLoop);
-
-    return 0; 
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::ResizeWindow
- *          resize window 
- *
- * @param[in]   configExist     if config is existing this parameter is ICO_HS_OK
- * @param[in]   orientation     setting ICO_ONS_HORIZONTAL or ICO_ONS_VERTICAL
- *                              (if config is existing,this value is ignored)
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoOnScreenControlWindow::ResizeWindow(CicoHomeScreenConfig *homescreen_config,int orientation)
-{
-    int width_tmp, height_tmp;
-  
-    /* load configuration */
-    if (homescreen_config != NULL) {
-       orientation = homescreen_config->ConfigGetInteger(ICO_HS_CONFIG_ONSCREEN,
-                                          ICO_HS_CONFIG_ORIENTAION,
-                                          orientation);
-    }
-
-    /* resize window */
-    ecore_main_loop_iterate();
-    ecore_wl_screen_size_get(&width_tmp, &height_tmp); /*getting size of screen*/
-    if (orientation == ICO_ONS_VERTICAL) {
-        width = width_tmp > height_tmp ? height_tmp : width_tmp;
-        height = width_tmp > height_tmp ? width_tmp : height_tmp;
-    }
-    else {
-        width = width_tmp < height_tmp ? height_tmp : width_tmp;
-        height = width_tmp < height_tmp ? width_tmp : height_tmp;
-    }
-    ecore_evas_resize(window, width, height); /*resize*/
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::ShowWindow
- *          show Window
- *
- * @param[in]   void
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoOnScreenControlWindow::ShowWindow(void)
-{
-    ecore_evas_alpha_set(window, EINA_TRUE); 
-    ecore_evas_show(window);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::StartEcoreLoop
- *          start ecore loop
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoOnScreenControlWindow::StartEcoreLoop(void)
-{
-    /* Start main loop */
-    ecore_main_loop_begin();
-}
-
-/*--------------------------------------------------------------------------*/
-/*
- * @brief   CicoOnScreenControlWindow::QuitEcoreLoop
- *          callback function called by EFL when ecore destroyed.
- *          exit ecore main loop.
- *
- * @param[in]   ee                  ecore evas object
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoOnScreenControlWindow::QuitEcoreLoop(Ecore_Evas *ee)
-{
-    uifw_trace("CicoOnScreenControlWindow::QuitEcoreLoop: Enter");
-    ecore_main_loop_quit();
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::GetWidth
- *          width of window
- *
- * @param[in]   none
- * @return      width
- */
-/*--------------------------------------------------------------------------*/
-int
-CicoOnScreenControlWindow::GetWidth(void)
-{
-    return width;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::GetHeight
- *          height of window
- *
- * @param[in]   none
- * @return      height
- */
-/*--------------------------------------------------------------------------*/
-int
-CicoOnScreenControlWindow::GetHeight(void)
-{
-    return height;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::InitEvas
- *          initialize evas 
- *
- * @param[in]   none
- * @return      0:OK -1:NG
- */
-/*--------------------------------------------------------------------------*/
-int 
-CicoOnScreenControlWindow::InitEvas(void)
-{
-    Evas_Object *canvas;
-
-    if (evas) {
-        return 0;
-    }
-
-    evas = ecore_evas_get(window);
-    if (!evas) {
-        uifw_trace("CicoOnScreenControlWindow::InitEvas: could not create evas.");
-        return -1;
-    }
-
-    /* set color */
-    canvas = evas_object_rectangle_add(evas);
-    evas_object_color_set(canvas, 0, 0, 0, 191);
-    evas_object_move(canvas, 0, 0);
-    evas_object_resize(canvas, width, height);
-    evas_object_show(canvas);
-    
-    return 0;
-
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::DeletePreImage
- *          delete PreImage 
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoOnScreenControlWindow::DeletePreImage(void)
-{
-   Eina_List *l, *l_next;
-   Evas_Object *data;
-   void* vpdata;
-
-   uifw_trace("CicoOnScreenControlWindow::DeletePreImage: img list is %08x",
-              img_list);   
-
-   EINA_LIST_FOREACH_SAFE(img_list, l, l_next,vpdata) {
-        data=static_cast<Evas_Object *>(vpdata);
-        uifw_trace("CicoOnScreenControlWindow::DeletePreImage: del data is %08x",
-                   data);
-        evas_object_del(data);
-        img_list = eina_list_remove_list(img_list, l);
-    }
-
-    /* delete edje */
-    if (edje) {
-        evas_object_del(edje);
-    }
-
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::CreateAndShowEdje
- *          delete PreImage 
- *
- * @param[in]   none
- * @return      0:OK -1:NG
- */
-/*--------------------------------------------------------------------------*/
-int
-CicoOnScreenControlWindow::CreateAndShowEdje(void)
-{
-    int moveX, moveY; /* move list to center */
-    /* create and add object in canvas from edje */
-    edje = edje_object_add(evas);
-    if (!edje) {
-        uifw_trace("CicoOnScreenControlWindow::CreateAndShowEdje: could not create edje object!");
-        return -1;
-    }
-
-    uifw_trace("CicoOnScreenControlWindow::CreateAndShowEdje: w=%d h=%d",
-               width, height);
-
-    /* calc move */
-    moveX = (width - ICO_HS_SIZE_LAYOUT_WIDTH) / 2;
-    moveY = (height - ICO_HS_SIZE_LAYOUT_HEIGHT) / 2;
-
-    /* Put in the image */
-    evas_object_move(edje, moveX, moveY);
-    /* Resize the image */
-    evas_object_resize(edje, width, height);
-    /* Show the image */
-    evas_object_show(edje);
-
-    return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::GetEdjeFileCollectionList
- *          get edje file collection list
- *
- * @param[in]   edje_file   edje file
- * @return      EinaList
- */
-/*--------------------------------------------------------------------------*/
-Eina_List *
-CicoOnScreenControlWindow::GetEdjeFileCollectionList(const char *edje_file)
-{
-    return edje_file_collection_list(edje_file);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::SetEdjeFile
- *          set edje file
- *
- * @param[in]   group     eina listons_wait_reply
- * @param[in]   edje_file     edje file 
- * @return      EinaList
- */
-/*--------------------------------------------------------------------------*/
-int 
-CicoOnScreenControlWindow::SetEdjeFile(Eina_List* group,const char *edje_file)
-{
-    /* Set the edj file */
-    if (!edje_object_file_set(edje, edje_file, static_cast<const char *>(group->data))) {
-        Edje_Load_Error err = edje_object_load_error_get(edje);
-        const char *errmsg = edje_load_error_str(err);
-        uifw_trace("CicoOnScreenControlWindow::SetEdjeFile: could not load %s: %s",
-                   edje_file, errmsg);
-
-        edje_file_collection_list_free(group);
-        evas_object_del(edje);
-        return -1;
-    }
-  
-    return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::GetEdjeObjectAccessPartList
- *          get edje object access part list
- *
- * @param[in]   none
- * @return      EinaList
- */
-/*--------------------------------------------------------------------------*/
-Eina_List *
-CicoOnScreenControlWindow::GetEdjeObjectAccessPartList(void)
-{
-    return edje_object_access_part_list_get(edje);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::GetEdjeObjectPartObject
- *          get edje object part object
- *
- * @param[in]   data     data
- * @return      Evas_Object
- */
-/*--------------------------------------------------------------------------*/
-Evas_Object *
-CicoOnScreenControlWindow::GetEdjeObjectPartObject(const char * data)
-{
-    return  const_cast<Evas_Object *>(edje_object_part_object_get(edje,data));
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::EvasObjectEventCallBack
- *          set evas object event callback
- *
- * @param[in]   obj         Evas_Ojbect
- * @param[in]   type        Evas_CallBack_Type
- * @param[in]   func        callback function 
- * @param[in]   data        data
- * @return      Evas_Object
- */
-/*--------------------------------------------------------------------------*/
-void 
-CicoOnScreenControlWindow::EvasObjectEventCallBack(Evas_Object *obj,
-                                                   Evas_Callback_Type type,
-                                                   void (*func)(void*,
-                                                       Evas*,
-                                                       Evas_Object*,
-                                                       void*),
-                                                   void *data)
-{
-    evas_object_event_callback_add(obj,type,func,data);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::EvasObjectImageFilledAdd
- *          evas object image filled add
- *
- * @param[in]   none
- * @return      Evas_Object
- */
-/*--------------------------------------------------------------------------*/
-Evas_Object * 
-CicoOnScreenControlWindow::EvasObjectImageFilledAdd(void)
-{
-    return evas_object_image_filled_add(evas);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::EvasObjectDel
- *          delete evas object 
- *
- * @param[in]   object    Evas_Object
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoOnScreenControlWindow::EvasObjectDel(Evas_Object * object)
-{
-    evas_object_del(object);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::UpdateEvasObject
- *          update evas object
- *
- * @param[in]   img        Evas_Object
- * @param[in]   imgfile    img file
- * @param[in]   partname   part name
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void 
-CicoOnScreenControlWindow::UpdateEvasObject(Evas_Object *img,
-                                            const char *imgfile,
-                                            const char *partname)
-{
-    int x, y, w, h;
-    if (strlen(imgfile) > 0) {
-        /* calculation icon pos */
-        edje_object_part_geometry_get(edje, partname, &x, &y, &w, &h);
-        x += (width - ICO_HS_SIZE_LAYOUT_WIDTH) / 2;
-        y += (height - ICO_HS_SIZE_LAYOUT_HEIGHT) / 2;
-
-        evas_object_image_file_set(img, imgfile, NULL);
-        evas_object_move(img, x, y);
-        evas_object_resize(img, w, h);
-        evas_object_show(img);
-    }
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoOnScreenControlWindow::EinaListAppend
- *          eina list append
- *
- * @param[in]   img          Evas_Object
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoOnScreenControlWindow::EinaListAppend(Evas_Object *img)
-{
-    img_list = eina_list_append(img_list, img);
-}
-
-
diff --git a/src/onscreen/CicoOnScreenControlWindow.h b/src/onscreen/CicoOnScreenControlWindow.h
deleted file mode 100644 (file)
index 10e58c3..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#ifndef __CICOONSCREENCONTROLWINDOW_H_
-#define __CICOONSCREENCONTROLWINDOW_H_
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   window control for onscreen application
- *
- * @date    Feb-15-2013
- */
-#include <unistd.h>
-#include <Eina.h>
-#include <Evas.h>
-#include <Ecore.h>
-#include <Ecore_Wayland.h>
-#include <Ecore_Evas.h>
-#include <Edje.h>
-
-#include "home_screen.h"
-#include "home_screen_res.h"
-#include "CicoHomeScreenConfig.h"
-#include "CicoHomeScreenSound.h"
-
-/*============================================================================*/
-/* Define data types                                                          */
-/*============================================================================*/
-#define ICO_ONS_VERTICAL    (1)
-#define ICO_ONS_HORIZONTAL  (2)
-
-/*============================================================================*/
-/* Class Declaration (CicoOnScreenControlWindow)                              */
-/*============================================================================*/
-class CicoOnScreenControlWindow                                                     
-{
- public:
-    CicoOnScreenControlWindow(); /*constractor*/
-    ~CicoOnScreenControlWindow(); /*destractor*/
-
-    int CreateEcoreEvas(void);
-    void ResizeWindow(CicoHomeScreenConfig *homescreen_config,int orientation);
-    void ShowWindow(void);
-    static void StartEcoreLoop(void);
-    static void QuitEcoreLoop(Ecore_Evas*);
-
-    int GetWidth(void);
-    int GetHeight(void);
-    int InitEvas(void);
-    void DeletePreImage(void);
-    int CreateAndShowEdje(void);
-    Eina_List *GetEdjeFileCollectionList(const char *edje_file);
-    int SetEdjeFile(Eina_List*,const char *edje_file);
-    Eina_List *GetEdjeObjectAccessPartList(void);
-    Evas_Object * GetEdjeObjectPartObject(const char * data);
-    void EvasObjectEventCallBack(Evas_Object *obj,
-                                 Evas_Callback_Type type,
-                                 void (*func)(void*,
-                                    Evas*,
-                                    Evas_Object*,
-                                    void*),
-                                 void *data);
-    Evas_Object * EvasObjectImageFilledAdd(void);
-    void EvasObjectDel(Evas_Object * object);
-    void UpdateEvasObject(Evas_Object *img,
-                          const char *imgfile,
-                          const char *partname);
-    void EinaListAppend(Evas_Object *img);
-  private:
-    int width, height;  
-    Ecore_Evas *window; /* ecore-evas object */
-    Evas *evas;         /* evas object */
-    Evas_Object *edje;  /* loaded edje objects */
-    Eina_List *img_list;
-
-  protected:
-    CicoOnScreenControlWindow operator = (const CicoOnScreenControlWindow&); 
-    CicoOnScreenControlWindow(const CicoOnScreenControlWindow&); 
-};
-
-#endif
-
index 5e62beb..caf6234 100644 (file)
@@ -2,60 +2,45 @@ AM_CFLAGS = $(GCC_CFLAGS)
 AM_CPPFLAGS = $(GCC_CXXFLAGS)
 AM_CXXFLAGS = $(GCC_CXXFLAGS)
 
-COMMON_LIBS = -lm -lwebsockets -lico-uxf-weston-plugin -lsecurity-server-client
-
 noinst_PROGRAMS   = \
        OnScreen
 
 OnScreen_SOURCES = \
-       on_screen.cpp                                   \
-       CicoOnScreenAction.cpp                  \
-       CicoOnScreenAppList.cpp                 \
-       CicoOnScreenControlWindow.cpp   \
-       CicoOnScreenContext.cpp
+       on_screen_main.cpp \
+       CicoOSEFLApp.cpp   \
+       CicoOnScreen.cpp
 
 OnScreen_CFLAGS=                                       \
        @CAPIAPPFWAPPLICATION_CFLAGS@   \
     $(EFL_CFLAGS)                                      \
     $(OPT_CFLAGS)                                      \
-    $(WL_CFLAGS)                                       \
     $(AUL_CFLAGS)                                      \
-    $(AIL_CFLAGS)                                      \
     $(UWS_CFLAGS)                                      \
-    $(PKGMGR_CFLAGS)                           \
-       $(UWS_CFLAGS)                                   \
-       $(WESTONPLUGIN_CFLAGS)                  \
+       $(NOTIFICATION_CFLAGS)          \
     -I../../include                            \
-    -I../../lib/common
+    -I../../lib/common              \
+    -I../../lib/notification
 
 OnScreen_CXXFLAGS=                             \
        @CAPIAPPFWAPPLICATION_CFLAGS@   \
     $(EFL_CFLAGS)                                      \
     $(OPT_CFLAGS)                                      \
-    $(WL_CFLAGS)                                       \
     $(AUL_CFLAGS)                                      \
-    $(AIL_CFLAGS)                                      \
     $(UWS_CFLAGS)                                      \
-    $(PKGMGR_CFLAGS)                           \
-       $(UWS_CFLAGS)                                   \
-       $(WESTONPLUGIN_CFLAGS)                  \
+       $(NOTIFICATION_CFLAGS)          \
     -I../../include                            \
-    -I../../lib/common
+    -I../../lib/common              \
+    -I../../lib/notification
 
 OnScreen_LDADD =                                       \
        ../../lib/common/.libs/libico-common.a                  \
+       ../../lib/notification/.libs/libico-notification.a \
        @CAPIAPPFWAPPLICATION_LIBS@     \
-       @PKGMGR_LIBS@                                   \
     $(EFL_LIBS)                                        \
     $(OPT_LIBS)                                        \
-    $(WL_LIBS)                                                 \
-    $(COMMON_LIBS)                                     \
-    $(UWS_LIBS)                                        \
     $(AUL_LIBS)                                        \
-    $(AIL_LIBS)                                        \
-       $(UWS_LIBS)                                             \
-       ../../lib/apps-framework/.libs/libico-appfw.so  \
-       -lwayland-egl -lEGL -lGLESv2
+    $(UWS_LIBS)                                        \
+       $(NOTIFICATION_LIBS)
 
 CLEANFILES = $(BUILT_SOURCES)
 
diff --git a/src/onscreen/on_screen.cpp b/src/onscreen/on_screen.cpp
deleted file mode 100644 (file)
index d0ab5a5..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   onscreen application
- *
- * @date    Feb-15-2013
- */
-#include "on_screen.h"
-
-/*--------------------------------------------------------------------------*/
-/*
- * @brief   onscreen application
- *          main routine
- *
- * @param   main() finction's standard parameter (argc,argv)
- * @return  result
- * @retval  0       success
- * @retval  1       failed
- */
-/*--------------------------------------------------------------------------*/
-int
-main(int argc, char *argv[])
-{
-    int ret;
-    bundle *b;
-    const char *val;
-//    int orientation = ICO_ONS_HORIZONTAL;
-    int orientation = ICO_ONS_VERTICAL;
-
-    /* log setting */
-    if (getenv("PKG_NAME")) {
-        ico_uxf_log_open(getenv("PKG_NAME"));
-    }
-    else {
-        ico_uxf_log_open(ICO_HS_APPID_DEFAULT_ONS);
-    }
-
-    /* get argment */
-    /* setting horizontal or vartical */
-    b = bundle_import_from_argv(argc, argv);
-    val = bundle_get_val(b, "orientation");
-    if (val != NULL) {
-        if (strcmp(val, "vertical") == 0) {
-            orientation = ICO_ONS_VERTICAL;
-        }
-        else if (strcmp(val, "horizontal") == 0) {
-            orientation = ICO_ONS_HORIZONTAL;
-        }
-    }
-
-    /*HomeScreenConfig*/
-    CicoHomeScreenConfig *homescreen_config = new CicoHomeScreenConfig();
-    homescreen_config->Initialize(ICO_ONSCREEN_CONFIG_FILE);
-
-    /* init home screen soud */
-    CicoHomeScreenSound *sound = new CicoHomeScreenSound();
-    sound->Initialize(homescreen_config);
-
-    /* controlWindow instance */
-    CicoOnScreenControlWindow* control_window = new CicoOnScreenControlWindow();
-
-    /* initialize app list*/ 
-    CicoOnScreenAppList::Initialize(control_window);
-
-    /* load configuration of applications*/
-    CicoOnScreenAppList::LoadConfig();
-
-    /* create new ecore_evas */
-    ret = control_window->CreateEcoreEvas();
-    if(ret < 0){
-        return 1;
-    }
-    /* resize window */
-    control_window->ResizeWindow(homescreen_config,orientation);
-
-    /* show the window */
-    control_window->ShowWindow();
-  
-    /* initialize CicoOnScreenAction */
-    CicoOnScreenAction::Initialize(homescreen_config,sound);
-    
-    /* add callback to app configuration */
-    CicoOnScreenAppList::SetConfigCallback();
-  
-    /* start ecore loop*/
-    control_window->StartEcoreLoop();
-  
-    /* finalize CicoOnScreenAction */
-    CicoOnScreenAction::Finalize();
-    
-    /* end ecore evas*/
-    delete control_window;
-
-    /*delete homescreen sound*/
-    delete sound;
-
-    /*delete homescreen config*/
-    delete homescreen_config;
-    
-    return 0;
-}
-
diff --git a/src/onscreen/on_screen.h b/src/onscreen/on_screen.h
deleted file mode 100644 (file)
index 3640be4..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef __ON_SCREEN_H_
-#define __ON_SCREEN_H_
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   onscreen application
- *
- * @date    Feb-15-2013
- */
-#include <unistd.h>
-
-#include "ico_uxf.h"
-#include "ico_uxf_conf.h"
-#include "ico_uxf_conf_ecore.h"
-
-#include "home_screen.h"
-#include "home_screen_res.h"
-#include "CicoHomeScreenConfig.h"
-#include "CicoHomeScreenSound.h"
-#include "CicoOnScreenControlWindow.h"
-#include "CicoOnScreenAppList.h"
-#include "CicoOnScreenAction.h"
-
-#include <bundle.h>
-
-#endif
-
diff --git a/src/onscreen/on_screen_main.cpp b/src/onscreen/on_screen_main.cpp
new file mode 100644 (file)
index 0000000..448f5d7
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2014, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   on_screen_main.cpp
+ *
+ *  @brief  This file is implimantion of onscreen application main function
+ */
+//==========================================================================
+
+#include <cstring>
+#include <iostream>
+#include <Eina.h>
+#include "ico_log.h"
+#include "CicoOSEFLApp.h"
+//#include "CicoHSCmdOpts.h"
+//#include "CicoGKeyFileConfig.h"
+
+#if 0
+#define ICO_CONFIG_LOG       "log"
+#define ICO_CONFIG_LOG_NAME  "filename"
+#define ICO_CONFIG_LOG_LEVEL "loglevel"
+#define ICO_CONFIG_LOG_FLUSH "logflush"
+#define ICO_CONFIG_LOG_ECORE "ecorelog"
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  setup log
+ */
+//--------------------------------------------------------------------------
+void
+setupLog(void)
+{
+    /* init configuration */
+    CicoGKeyFileConfig hsConfig;
+    hsConfig.Initialize(ICO_HOMESCREEN_CONFIG_FILE);
+
+    // ico log open
+    std::string name;
+    name = hsConfig.ConfigGetString(ICO_CONFIG_LOG,
+                                     ICO_CONFIG_LOG_NAME,
+                                     "HomeScreen");
+    ico_log_open(name.c_str());
+
+
+    // ico log level
+    int log_level = 0;
+    std::string level = hsConfig.ConfigGetString(ICO_CONFIG_LOG,
+                                                  ICO_CONFIG_LOG_LEVEL,
+                                                  "all");
+
+    if (NULL != strstr(level.c_str(), "performance")) {
+        log_level |= ICO_LOG_LVL_PRF;
+    }
+
+    if (NULL != strstr(level.c_str(), "trace")) {
+        log_level |= ICO_LOG_LVL_TRA;
+    }
+
+    if (NULL != strstr(level.c_str(), "debug")) {
+        log_level |= ICO_LOG_LVL_DBG;
+    }
+
+    if (NULL != strstr(level.c_str(), "info")) {
+        log_level |= ICO_LOG_LVL_INF;
+    }
+
+    if (NULL != strstr(level.c_str(), "warning")) {
+        log_level |= ICO_LOG_LVL_WRN;
+    }
+
+    if (NULL != strstr(level.c_str(), "critical")) {
+        log_level |= ICO_LOG_LVL_CRI;
+    }
+
+    if (NULL != strstr(level.c_str(), "error")) {
+        log_level |= ICO_LOG_LVL_ERR;
+    }
+
+    std::string flush = hsConfig.ConfigGetString(ICO_CONFIG_LOG,
+                                                  ICO_CONFIG_LOG_FLUSH,
+                                                  "on");
+    if (NULL != strstr(flush.c_str(), "on")) {
+        log_level |= ICO_LOG_FLUSH;
+    }
+    else {
+        log_level |= ICO_LOG_NOFLUSH;
+    }
+
+    if (NULL != strstr(level.c_str(), "none")) {
+        ico_log_set_level(0);
+    }
+    else if (NULL == strstr(level.c_str(), "all")) {
+        ico_log_set_level(log_level);
+    }
+
+    // eocre log print
+    std::string ecore = hsConfig.ConfigGetString(ICO_CONFIG_LOG,
+                                                  ICO_CONFIG_LOG_ECORE,
+                                                  "on");
+    if (NULL != strstr(ecore.c_str(), "on")) {
+        eina_init();
+        eina_log_level_set(EINA_LOG_LEVEL_DBG);
+    }
+}
+#endif
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief   onscreen main 
+ *           homescreen main. initialize UXF, app manager, and ecore.
+ *
+ *  @param [in] argc    counts of argment
+ *  @param [in] argv    argment
+ *  @return     result
+ *  @retval     0       success
+ *  @retval     -1      error
+ */
+//--------------------------------------------------------------------------
+int
+main(int argc, char *argv[])
+{
+    try {
+        printf("=== start OnScreen main entry\n");
+        // setupLog
+#if 0
+        setupLog();
+#else
+        ico_log_open("org.tizen.ico.app-onscreen"); // temporary
+#endif
+        ICO_INF( "START_MODULE OnScreen" );
+
+#if 0
+        // perse command options
+        CicoHSCmdOpts::getInstance()->parse(argc, argv);
+#endif
+        // start onscreen
+        CicoOSEFLApp osEFLApp;
+        int ret = osEFLApp.start(argc, argv);
+
+        ICO_DBG("ret = %d error=%s", ret, osEFLApp.appfwErrorToString(ret));
+    }
+    catch (const std::exception& e) {
+        std::cerr << e.what() << std::endl;
+        ICO_ERR("main: catch exception [%s]", e.what());
+        return -1;
+    }
+    catch (const std::string& str) {
+        std::cerr << str << std::endl;
+        ICO_ERR("main: catch exception [%s]", str.c_str());
+        return -1;
+    }
+    catch (...) {
+        ICO_ERR("main: catch exception unknown");
+        return -1;
+    }
+    ICO_INF( "END_MODULE OnScreen" );
+
+    return 0;
+}
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoCommonComponent.cpp b/src/statusbar/CicoCommonComponent.cpp
new file mode 100644 (file)
index 0000000..0fa161e
--- /dev/null
@@ -0,0 +1,199 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoCommonComponent.cpp
+ *
+ *  @brief  This file is definition of CicoCommonComponent class
+ */
+//==========================================================================
+
+#include <algorithm>
+#include <cassert>
+
+#include <ico_log.h>
+#include "CicoCommonComponent.h"
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  default constructor
+ *
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+CicoCommonComponent::CicoCommonComponent()
+    : posx_(0), posy_(0), width_(0), height_(0)
+{
+    ICO_TRA("CicoCommonComponent::CicoCommonComponent Enter");
+    ICO_TRA("CicoCommonComponent::CicoCommonComponent Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  destructor
+ *
+ *  param[in]   none
+ *  return      none
+ */
+//--------------------------------------------------------------------------
+CicoCommonComponent::~CicoCommonComponent()
+{
+    ICO_TRA("CicoCommonComponent::~CicoCommonComponent Enter");
+    ICO_TRA("CicoCommonComponent::~CicoCommonComponent Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief terminate component
+ *
+ *  @param[in]  none
+ *  @return     bool
+ *  @retval     true: success 
+ */
+//--------------------------------------------------------------------------
+bool
+CicoCommonComponent::Terminate(void)
+{
+    ICO_TRA("CicoCommonComponent::Terminate Enter");
+    std::list<std::shared_ptr<CicoCommonModule>>::iterator itr;
+    std::list<std::shared_ptr<CicoCommonModule>>::iterator itr_end;
+    for (itr = modulelist_.begin(); itr != itr_end; itr++) {
+        (*itr)->Terminate();
+    }
+
+    modulelist_.clear();
+    ICO_TRA("CicoCommonComponent::Terminate Leave");
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  show component
+ *
+ * @param[in]   none
+ * @return      none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonComponent::Show(void)
+{
+    ICO_TRA("CicoCommonComponent::Show Enter");
+
+    std::list<std::shared_ptr<CicoCommonModule>>::iterator itr;
+    std::list<std::shared_ptr<CicoCommonModule>>::iterator itr_end;
+    itr_end = modulelist_.end();
+    for (itr = modulelist_.begin(); itr != itr_end; itr++) {
+        (*itr)->Show();
+    }
+
+    ICO_TRA("CicoCommonComponent::Show Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  hide component
+ *  @param[in]   none
+ *  @return      none
+  */
+//--------------------------------------------------------------------------
+void
+CicoCommonComponent::Hide(void)
+{
+    ICO_TRA("CicoCommonComponent::Hide Enter");
+    std::list<std::shared_ptr<CicoCommonModule>>::iterator itr;
+    std::list<std::shared_ptr<CicoCommonModule>>::iterator itr_end;
+    itr_end = modulelist_.end();
+    for (itr = modulelist_.begin(); itr != itr_end; itr++) {
+        (*itr)->Hide();
+    }
+    ICO_TRA("CicoCommonComponent::Hide Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set position of component
+ *
+ *  @param [in] x   position of x
+ *  @param [in] y   position of y
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonComponent::SetPos(int x, int y)
+{
+    ICO_TRA("CicoCommonComponent::SetPos Enter(x/y=%d/%d)", x, y);
+    int diffx = x - posx_;
+    int diffy = y - posy_;
+    posx_ = x;
+    posy_ = y;
+    std::list<std::shared_ptr<CicoCommonModule>>::iterator itr;
+    std::list<std::shared_ptr<CicoCommonModule>>::iterator itr_end;
+    itr_end = modulelist_.end();
+    for (itr = modulelist_.begin(); itr != itr_end; itr++) {
+        (*itr)->Move(diffx, diffy);
+    }
+    ICO_TRA("CicoCommonComponent::SetPos Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set size of component
+ *
+ *  @param [in] w   width of component
+ *  @param [in] h   height of component
+ *  @return     none
+*/
+//--------------------------------------------------------------------------
+void
+CicoCommonComponent::SetSize(int w, int h)
+{
+    ICO_TRA("CicoCommonComponent::SetSize Enter(w/h=%d/%d)", w, h);
+    double rate_w = width_ / w;
+    double rate_h = height_ / h;
+    width_ = w;
+    height_ = h;
+    std::list<std::shared_ptr<CicoCommonModule>>::iterator itr;
+    std::list<std::shared_ptr<CicoCommonModule>>::iterator itr_end;
+    itr_end = modulelist_.end();
+    for (itr = modulelist_.begin(); itr != itr_end; itr++) {
+        (*itr)->Reallocate(posx_, posy_, rate_w, rate_h);
+}
+    ICO_TRA("CicoCommonComponent::SetSize Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  pack module
+ *
+ *  @param [in] module  add module object
+ *  @return     none 
+*/
+//--------------------------------------------------------------------------
+void
+CicoCommonComponent::PackModule(std::shared_ptr<CicoCommonModule> module)
+{
+    modulelist_.push_back(module);
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  unpack module
+ *
+ *  @param [in] module  remove module object
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonComponent::UnpackModule(std::shared_ptr<CicoCommonModule> module)
+{
+    modulelist_.remove(module);
+}
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoCommonComponent.h b/src/statusbar/CicoCommonComponent.h
new file mode 100644 (file)
index 0000000..79feecb
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoCommonComponent.h
+ *
+ *  @brief  This file is definition of CicoCommonComponent class
+ */
+//==========================================================================
+#ifndef __CICO_COMMON_COMPONENT_H__
+#define __CICO_COMMON_COMPONENT_H__
+
+#include <Elementary.h>
+#include <ctime>
+#include <list>
+#include <memory>
+#include <vector>
+#include "CicoComponentInterface.h"
+#include "CicoModuleImplementation.h"
+
+//==========================================================================
+/**
+ *  @brief  This class provide the common component interfaces
+ */
+//==========================================================================
+class CicoCommonComponent : public CicoComponentInterface
+{
+public:
+    // default constructor
+    CicoCommonComponent();
+
+    // destructor
+    virtual ~CicoCommonComponent();
+
+    // terminate component
+    virtual bool Terminate(void);
+
+    // show component
+    virtual void Show(void);
+
+    // hide component
+    virtual void Hide(void);
+
+    // set position of  component
+    virtual void SetPos(int x, int y);
+
+    // set size of component
+    virtual void SetSize(int w, int h);
+
+protected:
+    // pack module 
+    void PackModule(std::shared_ptr<CicoCommonModule> module);
+
+    // unpack module 
+    void UnpackModule(std::shared_ptr<CicoCommonModule> module);
+
+protected:
+    int posx_;      /// position x
+    int posy_;      /// position y
+    int width_;     /// componet width
+    int height_;    /// componet height
+    std::list<std::shared_ptr<CicoCommonModule> > modulelist_;  ///module list
+};
+#endif  // __CICO_COMMON_COMPONENT_H__
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoCommonModule.cpp b/src/statusbar/CicoCommonModule.cpp
new file mode 100644 (file)
index 0000000..d6912ea
--- /dev/null
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoCommonModule.cpp
+ *
+ *  @brief  This file is implimention of CicoCommonModule class
+ */
+//==========================================================================
+
+#include <Evas.h>
+#include <cassert>
+
+#include <ico_log.h>
+#include "CicoModuleInterface.h"
+#include "CicoModuleImplementation.h"
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  default constructor
+ *
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+CicoCommonModule::CicoCommonModule() 
+    : evasobj_(NULL), posx_(0), posy_(0), width_(0), height_(0)
+{
+    ICO_TRA("CicoCommonModule::CicoCommonModule Enter");
+    ICO_TRA("CicoCommonModule::CicoCommonModule Leave");
+
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  destructor
+ *
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+CicoCommonModule::~CicoCommonModule()
+{
+    ICO_TRA("CicoCommonModule::~CicoCommonModule Enter");
+    ICO_TRA("CicoCommonModule::~CicoCommonModule Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief terminate module
+ *
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+bool
+CicoCommonModule::Terminate(void)
+{
+    ICO_TRA("CicoCommonModule::Terminate Enter");
+    if (evas_object_ref_get(evasobj_) > 1) {
+        evas_object_unref(evasobj_);
+    }
+    else {
+        evas_object_del(evasobj_);
+    }
+    ICO_TRA("CicoCommonModule::Terminate Leave");
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief show module 
+ *
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonModule::Show(void)
+{
+    // ICO_TRA("CicoCommonModule::Show Enter");
+    assert(evasobj_!=NULL);
+    evas_object_show(evasobj_);
+    assert (evas_object_visible_get(evasobj_) == EINA_TRUE);
+    // ICO_TRA("CicoCommonModule::Show Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief hide module
+ *
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonModule::Hide(void)
+{
+    ICO_TRA("CicoCommonModule::Hide Enter");
+    assert(evasobj_!=NULL);
+    evas_object_hide(evasobj_);
+    ICO_TRA("CicoCommonModule::Hide Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief set position of module
+ *
+ *  @param[in]  x   position x
+ *  @param[in]  y   position y
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonModule::SetPos(int x, int y)
+{
+    //ICO_TRA("CicoCommonModule::SetPos Enter(x/y=%d/%d)", x, y);
+    posx_ = x;
+    posy_ = y;
+    assert(evasobj_!=NULL);
+
+    evas_object_move(evasobj_, posx_, posy_);
+    //ICO_TRA("CicoCommonModule::SetPos Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief set size of module
+ *
+ *  @param[in]  w   module width
+ *  @param[in]  h   module height
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonModule::SetSize(int w, int h)
+{
+    //ICO_TRA("CicoCommonModule::SetSize Enter(w/h=%d/%d", w, h);
+    width_ = w;
+    height_ = h;
+    assert(evasobj_!=NULL);
+    evas_object_resize(evasobj_, width_, height_);
+    //ICO_TRA("CicoCommonModule::SetSize Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief move module
+ *
+ *  @param[in]  diffx   displacement of position-x
+ *  @param[in]  diffy   displacement of position-y
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonModule::Move(int diffx, int diffy)
+{
+    ICO_TRA("CicoCommonModule::Move Enter(x/y=%d/%d", diffx, diffy);
+    posx_ += diffx;
+    posy_ += diffy;
+    SetPos(posx_, posy_);
+    ICO_TRA("CicoCommonModule::Move Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief resize module
+ *
+ *  @param[in]  ratew   resize rate of width
+ *  @param[in]  rateh   resize rate of height
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonModule::Resize(double ratew, double rateh)
+{
+    width_ *= ratew;
+    height_ *= rateh;
+    SetSize(width_, height_);
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief reset position and size of module
+ *
+ *  @param[in]  standardx   standard position x
+ *  @param[in]  standardy   standard position y
+ *  @param[in]  ratew       resize rate of width
+ *  @param[in]  rateh       resize rate of height
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonModule::Reallocate(int standardx, int standardy,
+                             double ratew, double rateh)
+{
+    posx_ += (posx_ - standardx) * ratew;
+    posy_ += (posy_ - standardy) * rateh;
+    SetPos(posx_, posy_);
+    Resize(ratew, rateh);
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief get raw data
+ *
+ *  @param[in]  none
+ *  @return     evasobj_
+ */
+//--------------------------------------------------------------------------
+Evas_Object *
+CicoCommonModule::GetRawData(void) const
+{
+    return evasobj_;
+}
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoCommonWindow.cpp b/src/statusbar/CicoCommonWindow.cpp
new file mode 100644 (file)
index 0000000..82ce6c5
--- /dev/null
@@ -0,0 +1,188 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+#include <algorithm>
+
+#include <ico_log.h>
+#include "CicoCommonWindow.h"
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  default constructor
+ *
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+CicoCommonWindow::CicoCommonWindow()
+    : window_(NULL), windowobj_(NULL),
+      posx_(0), posy_(0), width_(0), height_(0)
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  destructor
+ *
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+CicoCommonWindow::~CicoCommonWindow()
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  terminate the window
+ *
+ *  @param[in]  none
+ *  @return true on success, false on error
+ */
+//--------------------------------------------------------------------------
+bool
+CicoCommonWindow::Terminate(void)
+{
+    ICO_TRA("CicoCommonWindow::Terminate Enter");
+    std::list<CicoCommonComponent*>::iterator itr, itr_end;
+    itr_end = componentlist_.end();
+    for (itr = componentlist_.begin(); itr != itr_end; itr++) {
+        delete (*itr);
+    }
+    componentlist_.clear();
+    ICO_TRA("CicoCommonWindow::Terminate Leave");
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  show the window
+ *
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonWindow::Show(void)
+{
+    ICO_TRA("CicoCommonWindow::Show Enter");
+    ecore_evas_show(window_);
+    if (windowobj_ != NULL) {
+        evas_object_show(windowobj_);
+        std::list<CicoCommonComponent*>::iterator itr, itr_end;
+        itr_end = componentlist_.end();
+        for (itr = componentlist_.begin(); itr != itr_end; itr++) {
+            (*itr)->Show();
+        }
+    }
+    ICO_TRA("CicoCommonWindow::Show Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  hide the window
+ *
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonWindow::Hide(void)
+{
+    ICO_TRA("CicoCommonWindow::Hide Enter");
+    ecore_evas_hide(window_);
+    if (windowobj_ != NULL) {
+        evas_object_hide(windowobj_);
+        std::list<CicoCommonComponent*>::iterator itr, itr_end;
+        itr_end = componentlist_.end();
+        for (itr = componentlist_.begin(); itr != itr_end; itr++) {
+            (*itr)->Hide();
+        }
+    }
+    ICO_TRA("CicoCommonWindow::Show Enter");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set position of the window
+ *
+ *  @param[in]  x   position x
+ *  @param[in]  y   position y
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonWindow::SetPos(int x, int y)
+{
+    posx_ = x;
+    posy_ = y;
+    ecore_evas_move(window_, posx_, posy_);
+    if (windowobj_ != NULL) {
+        evas_object_move(windowobj_, posx_, posy_);
+        std::list<CicoCommonComponent*>::iterator itr, itr_end;
+        itr_end = componentlist_.end();
+        for (itr = componentlist_.begin(); itr != itr_end; itr++) {
+            (*itr)->SetPos(posx_, posy_);
+        }
+    }
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set size of the window
+ *
+ *  @param[in]  w   window width
+ *  @param[in]  h   window height
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonWindow::SetSize(int w, int h)
+{
+    width_ = w;
+    height_ = h;
+    ecore_evas_resize(window_, width_, height_);
+    if (windowobj_ != NULL) {
+        evas_object_resize(windowobj_, width_, height_);
+        std::list<CicoCommonComponent*>::iterator itr, itr_end;
+        itr_end = componentlist_.end();
+        for (itr = componentlist_.begin(); itr != itr_end; itr++) {
+            (*itr)->SetSize(width_, height_);
+        }
+    }
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set component
+ *
+ *  @param [in] component   the object of component
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonWindow::SetComponent(CicoCommonComponent *component)
+{
+    componentlist_.push_back(component);
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  unset component
+ *
+ *  @param [in] component   the object of component
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoCommonWindow::UnsetComponent(CicoCommonComponent *component)
+{
+    componentlist_.remove(component);
+}
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoCommonWindow.h b/src/statusbar/CicoCommonWindow.h
new file mode 100644 (file)
index 0000000..a6d4b5d
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoCommonWindow.h
+ *
+ *  @brief  This file is definition of CicoCommonWindow class
+ */
+//==========================================================================
+#ifndef __CICO_COMMON_WINDOW_H__
+#define __CICO_COMMON_WINDOW_H__
+
+#include <Ecore.h>
+#include <Evas.h>
+#include <list>
+#include "CicoWindowInterface.h"
+#include "CicoCommonComponent.h"
+
+//==========================================================================
+/**
+ *  @brief  This class provide the common window interfaces
+ */
+//==========================================================================
+class CicoCommonWindow : public CicoWindowInterface
+{
+public:
+    // default constructor
+    CicoCommonWindow();
+
+    // destructor
+    ~CicoCommonWindow();
+
+    // terminate the window
+    virtual bool Terminate(void);
+
+    // show the window
+    virtual void Show(void);
+
+    // hide the window
+    virtual void Hide(void);
+
+    // set position of the window
+    virtual void SetPos(int x, int y);
+
+    // set size of the window
+    virtual void SetSize(int w, int h);
+
+protected:
+    // set component
+    void SetComponent(CicoCommonComponent *component);
+
+    // unset component
+    void UnsetComponent(CicoCommonComponent *component);
+
+    Ecore_Evas *window_;        /// main window
+    Evas_Object *windowobj_;    /// background
+    int posx_;                  /// position x
+    int posy_;                  /// position y
+    int width_;                 /// window width
+    int height_;                /// window height
+    std::list<CicoCommonComponent*> componentlist_; /// componet list
+};
+#endif  // __CICO_COMMON_WINDOW_H__
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoComponentImplementation.cpp b/src/statusbar/CicoComponentImplementation.cpp
new file mode 100644 (file)
index 0000000..3adbccc
--- /dev/null
@@ -0,0 +1,497 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoComponentimplementation.cpp
+ *
+ *  @brief  This file is implimentation of CicoStatusBarClockComponent class
+ *                                  and CicoNotificationPanelComponent class
+ */
+//==========================================================================
+
+#include <ctime>
+#include <cassert>
+#include <memory>
+
+#include <ico_log.h>
+#include "CicoComponentImplementation.h"
+
+#define IMG_DIR "/usr/apps/org.tizen.ico.statusbar/res/images/"
+
+// set image size of clock
+const int CicoStatusBarClockComponent::AMPM_WIDTH = 47;
+const int CicoStatusBarClockComponent::AMPM_HEIGHT = 30;
+const int CicoStatusBarClockComponent::HOUR10_WIDTH = 20;
+const int CicoStatusBarClockComponent::HOUR10_HEIGHT = 30;
+const int CicoStatusBarClockComponent::HOUR1_WIDTH = 20;
+const int CicoStatusBarClockComponent::HOUR1_HEIGHT = 30;
+const int CicoStatusBarClockComponent::COLON_WIDTH = 8;
+const int CicoStatusBarClockComponent::COLON_HEIGHT = 20;
+const int CicoStatusBarClockComponent::MIN10_WIDTH = 20;
+const int CicoStatusBarClockComponent::MIN10_HEIGHT = 30;
+const int CicoStatusBarClockComponent::MIN1_WIDTH = 20;
+const int CicoStatusBarClockComponent::MIN1_HEIGHT = 30;
+
+// set blank size
+const int CicoStatusBarClockComponent::COLON_BLANK = 7;
+const int CicoStatusBarClockComponent::AMPM_BLANK = 7;
+const int CicoStatusBarClockComponent::LAST_BLANK = 20;
+
+// set image position of clock
+const int CicoStatusBarClockComponent::AMPM_POSX = 0;
+const int CicoStatusBarClockComponent::AMPM_POSY = 8;
+const int CicoStatusBarClockComponent::RELATIVE_HOUR10_POSX = AMPM_WIDTH + AMPM_BLANK;
+const int CicoStatusBarClockComponent::RELATIVE_HOUR10_POSY = -8;
+const int CicoStatusBarClockComponent::RELATIVE_HOUR1_POSX = RELATIVE_HOUR10_POSX + HOUR10_WIDTH;
+const int CicoStatusBarClockComponent::RELATIVE_HOUR1_POSY = -8;
+const int CicoStatusBarClockComponent::RELATIVE_COLON_POSX = RELATIVE_HOUR1_POSX + HOUR1_WIDTH + COLON_BLANK;
+const int CicoStatusBarClockComponent::RELATIVE_COLON_POSY = -3;
+const int CicoStatusBarClockComponent::RELATIVE_MIN10_POSX = RELATIVE_COLON_POSX + COLON_WIDTH + COLON_BLANK;
+const int CicoStatusBarClockComponent::RELATIVE_MIN10_POSY = -8;
+const int CicoStatusBarClockComponent::RELATIVE_MIN1_POSX = RELATIVE_MIN10_POSX + MIN10_WIDTH;
+const int CicoStatusBarClockComponent::RELATIVE_MIN1_POSY = -8;
+
+// set image file path of clock
+const char *CicoStatusBarClockComponent::imgfilepath_am = IMG_DIR"time_am.png";
+const char *CicoStatusBarClockComponent::imgfilepath_pm = IMG_DIR"time_pm.png";
+const char *CicoStatusBarClockComponent::imgfilepath_0 = IMG_DIR"time_0.png";
+const char *CicoStatusBarClockComponent::imgfilepath_1 = IMG_DIR"time_1.png";
+const char *CicoStatusBarClockComponent::imgfilepath_2 = IMG_DIR"time_2.png";
+const char *CicoStatusBarClockComponent::imgfilepath_3 = IMG_DIR"time_3.png";
+const char *CicoStatusBarClockComponent::imgfilepath_4 = IMG_DIR"time_4.png";
+const char *CicoStatusBarClockComponent::imgfilepath_5 = IMG_DIR"time_5.png";
+const char *CicoStatusBarClockComponent::imgfilepath_6 = IMG_DIR"time_6.png";
+const char *CicoStatusBarClockComponent::imgfilepath_7 = IMG_DIR"time_7.png";
+const char *CicoStatusBarClockComponent::imgfilepath_8 = IMG_DIR"time_8.png";
+const char *CicoStatusBarClockComponent::imgfilepath_9 = IMG_DIR"time_9.png";
+const char *CicoStatusBarClockComponent::imgfilepath_colon = IMG_DIR"time_ten.png";
+
+// set clock component size
+const int CicoStatusBarClockComponent::CLOCK_COMPONENT_WIDTH = AMPM_WIDTH +
+                                                               AMPM_BLANK +
+                                                               HOUR10_WIDTH +
+                                                               HOUR1_WIDTH +
+                                                               COLON_BLANK +
+                                                               COLON_WIDTH +
+                                                               COLON_BLANK +
+                                                               MIN10_WIDTH +
+                                                               MIN1_WIDTH;
+
+const int CicoStatusBarClockComponent::CLOCK_COMPONENT_HEIGHT = HOUR10_HEIGHT;
+
+/*--------------------------------------------------------------------------*/
+/**
+ *  @brief   default constructor
+ *
+ *  @param[in]   none
+ *  @return      none
+ */
+/*--------------------------------------------------------------------------*/
+CicoStatusBarClockComponent::CicoStatusBarClockComponent()
+    : rate_(1.0) 
+{
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ *  @brief   destructor
+ *
+ *  @param[in]   none
+ *  @return      none
+ */
+/*--------------------------------------------------------------------------*/
+CicoStatusBarClockComponent::~CicoStatusBarClockComponent()
+{
+    imgfilelist_number.clear();
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   initialize of clock component
+ *
+ *  @param[in]  windowobj
+ *  @param[in]  posx
+ *  @param[in]  posy
+ *  @return     true: success   false: failed
+ */
+/*--------------------------------------------------------------------------*/
+bool
+CicoStatusBarClockComponent::Initialize(Evas_Object *windowobj, int posx, int posy)
+{
+    ICO_TRA("CicoStatusBarClockComponent::Initialize Enter");
+    if (imgfilelist_number.empty()) {
+        imgfilelist_number.push_back(imgfilepath_0);
+        imgfilelist_number.push_back(imgfilepath_1);
+        imgfilelist_number.push_back(imgfilepath_2);
+        imgfilelist_number.push_back(imgfilepath_3);
+        imgfilelist_number.push_back(imgfilepath_4);
+        imgfilelist_number.push_back(imgfilepath_5);
+        imgfilelist_number.push_back(imgfilepath_6);
+        imgfilelist_number.push_back(imgfilepath_7);
+        imgfilelist_number.push_back(imgfilepath_8);
+        imgfilelist_number.push_back(imgfilepath_9);
+    }
+
+    std::shared_ptr<CicoImageModule> ampm_module;
+    ampm_module = std::make_shared<CicoImageModule>(CicoImageModule());
+    if (!ampm_module->Initialize(windowobj)) {
+        ICO_TRA("CicoStatusBarClockComponent::Initialize Leave(false)");
+        return false;
+    }
+
+    std::shared_ptr<CicoImageModule> hour10_module;
+    hour10_module = std::make_shared<CicoImageModule>(CicoImageModule());
+    if (!hour10_module->Initialize(windowobj)) {
+        ICO_TRA("CicoStatusBarClockComponent::Initialize Leave(false)");
+        return false;
+    }
+
+    std::shared_ptr<CicoImageModule> hour1_module;
+    hour1_module = std::make_shared<CicoImageModule>(CicoImageModule());
+    if (!hour1_module->Initialize(windowobj)) {
+        ICO_TRA("CicoStatusBarClockComponent::Initialize Leave(false)");
+        return false;
+    }
+
+    std::shared_ptr<CicoImageModule> colon_module;
+    colon_module = std::make_shared<CicoImageModule>(CicoImageModule());
+    if (!colon_module->Initialize(windowobj)) {
+        ICO_TRA("CicoStatusBarClockComponent::Initialize Leave(false)");
+        return false;
+    }
+
+    std::shared_ptr<CicoImageModule> min10_module;
+    min10_module = std::make_shared<CicoImageModule>(CicoImageModule());
+    if (!min10_module->Initialize(windowobj)) {
+        ICO_TRA("CicoStatusBarClockComponent::Initialize Leave(false)");
+        return false;
+    }
+
+    std::shared_ptr<CicoImageModule> min1_module;
+    min1_module = std::make_shared<CicoImageModule>(CicoImageModule());
+    if (!min1_module->Initialize(windowobj)) {
+        ICO_TRA("CicoStatusBarClockComponent::Initialize Leave(false)");
+        return false;
+    }
+
+    PackModule(ampm_module);
+    PackModule(hour10_module);
+    PackModule(hour1_module);
+    PackModule(colon_module);
+    PackModule(min10_module);
+    PackModule(min1_module);
+
+    SetPos(posx, posy);
+    SetSize(AMPM_WIDTH + HOUR10_WIDTH + HOUR1_WIDTH + COLON_WIDTH + 
+            MIN10_WIDTH + MIN1_WIDTH,
+            AMPM_HEIGHT);
+    SetRate(1.5);
+
+    ICO_TRA("CicoStatusBarClockComponent::Initialize Leave");
+    return Update();
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   update of clock component
+ *
+ *  @param[in]  none
+ *  @return     true: success   false: failed
+ */
+/*--------------------------------------------------------------------------*/
+bool
+CicoStatusBarClockComponent::Update()
+{
+    //ICO_TRA("CicoStatusBarClockComponent::Update Enter");
+    if (modulelist_.empty()) {
+        return false;
+    }
+
+    time_t nowtime;
+    nowtime = std::time(NULL);
+    // Add 9 hour because std::time is JST.
+    nowtime += 9 * 60 * 60;
+    time_t sec = nowtime % 60;
+    nowtime -= sec;
+    time_t min = (nowtime % (60 * 60)) / 60;
+    nowtime -= min * 60;
+    time_t hour = (nowtime % (60 * 60 * 60)) / (60 * 60);
+
+    std::shared_ptr<CicoImageModule> imagemodule;
+    assert(!modulelist_.empty());
+    std::list<std::shared_ptr<CicoCommonModule>>::iterator itr;
+    itr = modulelist_.begin();
+    imagemodule = std::static_pointer_cast<CicoImageModule>((*itr));
+    assert(imagemodule != NULL);
+
+    if (hour > 11) {
+        if (!imagemodule->SetFilePath(imgfilepath_pm)) {
+            ICO_TRA("CicoStatusBarClockComponent::Update Leave(false)");
+            return false;
+        }
+    }
+    else {
+        if (!imagemodule->SetFilePath(imgfilepath_am)) {
+            ICO_TRA("CicoStatusBarClockComponent::Update Leave(false)");
+            return false;   
+        }
+    }
+    imagemodule->SetSize(rate_ * AMPM_WIDTH, rate_ * AMPM_HEIGHT);
+    imagemodule->SetPos(posx_, posy_);
+    imagemodule->Show();
+
+    time_t hour_m = hour % 12;
+    itr++;
+    imagemodule = std::static_pointer_cast<CicoImageModule>((*itr));
+    assert(imagemodule != NULL);
+    if (!imagemodule->SetFilePath(imgfilelist_number[hour_m / 10])) {
+        ICO_TRA("CicoStatusBarClockComponent::Update Leave(false)");
+        return false;
+    }
+    imagemodule->SetSize(rate_ * HOUR10_WIDTH, rate_ * HOUR10_HEIGHT);
+    imagemodule->SetPos(posx_ + rate_ * RELATIVE_HOUR10_POSX, 
+                        posy_ + rate_ * RELATIVE_HOUR10_POSY);
+    imagemodule->Show();
+
+    itr++;
+    imagemodule = std::static_pointer_cast<CicoImageModule>((*itr));
+    assert(imagemodule != NULL);
+    if (!imagemodule->SetFilePath(imgfilelist_number[hour_m % 10])) {
+        ICO_TRA("CicoStatusBarClockComponent::Update Leave(false)");
+        return false;
+    }
+    imagemodule->SetSize(rate_ * HOUR1_WIDTH, rate_ * HOUR1_HEIGHT);
+    imagemodule->SetPos(posx_ + rate_ * RELATIVE_HOUR1_POSX,
+                        posy_ + rate_ * RELATIVE_HOUR1_POSY);
+    imagemodule->Show();
+
+    itr++;
+    imagemodule = std::static_pointer_cast<CicoImageModule>((*itr));
+    assert(imagemodule != NULL);
+    if (!imagemodule->SetFilePath(imgfilepath_colon)) {
+        ICO_TRA("CicoStatusBarClockComponent::Update Leave(false)");
+        return false;
+    }
+    imagemodule->SetSize(rate_ * COLON_WIDTH, rate_ * COLON_HEIGHT);
+    imagemodule->SetPos(posx_ + rate_ * RELATIVE_COLON_POSX,
+                        posy_ + rate_ * RELATIVE_COLON_POSY);
+    imagemodule->Show();
+
+    itr++;
+    imagemodule = std::static_pointer_cast<CicoImageModule>((*itr));
+    assert(imagemodule != NULL);
+    if (!imagemodule->SetFilePath(imgfilelist_number[min / 10])) {
+        ICO_TRA("CicoStatusBarClockComponent::Update Leave(false)");
+        return false;
+    }
+    imagemodule->SetSize(rate_ * MIN10_WIDTH, rate_ * MIN10_HEIGHT);
+    imagemodule->SetPos(posx_ + rate_ * RELATIVE_MIN10_POSX,
+                        posy_ + rate_ * RELATIVE_MIN10_POSY);
+    imagemodule->Show();
+
+    itr++;
+    imagemodule = std::static_pointer_cast<CicoImageModule>((*itr));
+    assert(imagemodule != NULL);
+    if (!imagemodule->SetFilePath(imgfilelist_number[min % 10])) {
+        ICO_TRA("CicoStatusBarClockComponent::Update Leave(false)");
+        return false;
+    }
+    imagemodule->SetSize(rate_ * MIN1_WIDTH, rate_ * MIN1_HEIGHT);
+    imagemodule->SetPos(posx_ + rate_ * RELATIVE_MIN1_POSX,
+                        posy_ + rate_ * RELATIVE_MIN1_POSY);
+    imagemodule->Show();
+
+    //ICO_TRA("CicoStatusBarClockComponent::Update Leave(true)");
+    return true;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   set rate of clock component 
+ *
+ *  @param[in]  rate
+ *  @return     true: success   false: failed
+ */
+/*--------------------------------------------------------------------------*/
+bool
+CicoStatusBarClockComponent::SetRate(double rate)
+{
+    if (modulelist_.empty()) {
+        return false;
+    }
+
+    rate_ = rate;
+    width_ *= rate_;
+    height_ *= rate_;
+    SetPos(posx_, posy_);
+    SetSize(width_, height_);
+    return true;
+}
+
+// set notification(icon-image, text) position and font
+const int CicoNotificationPanelComponent::ICON_POSX = 0;
+const int CicoNotificationPanelComponent::ICON_POSY = 0;
+const int CicoNotificationPanelComponent::ICON_WIDTH = 48;
+const int CicoNotificationPanelComponent::ICON_HEIGHT = 48;
+const int CicoNotificationPanelComponent::RELATIVE_TEXT_POSX = 70;
+const int CicoNotificationPanelComponent::RELATIVE_TEXT_POSY = 10;
+const int CicoNotificationPanelComponent::TEXT_WIDTH = 450;
+const int CicoNotificationPanelComponent::TEXT_HEIGHT = 50;
+const char *CicoNotificationPanelComponent::FONT_STYLE = "Sans";
+const int CicoNotificationPanelComponent::FONT_SIZE = 50;
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   default constructor
+ *
+ *  @param[in]  none
+ *  @return     none 
+ */
+/*--------------------------------------------------------------------------*/
+CicoNotificationPanelComponent::CicoNotificationPanelComponent()
+    : CicoCommonComponent(), rate_(1.0)
+{
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   destructor
+ *
+ *  @param[in]  none
+ *  @return     none
+ */
+/*--------------------------------------------------------------------------*/
+CicoNotificationPanelComponent::~CicoNotificationPanelComponent()
+{
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   initialize of notification component
+ *
+ *  @param[in]  window
+ *  @return     true: success   false: failed
+ */
+/*--------------------------------------------------------------------------*/
+bool
+CicoNotificationPanelComponent::Initialize(Evas_Object *window)
+{
+    ICO_TRA("CicoNotificationPanelComponent::Initialize Enter");
+
+    if (!modulelist_.empty()) {
+        ICO_TRA("CicoNotificationPanelComponent::Initialize Levae(false)");
+        return false;
+    }
+
+    if (window == NULL) {
+        ICO_TRA("CicoNotificationPanelComponent::Initialize Levae(false)");
+        return false;
+    }
+
+    posx_= ICON_POSX;
+    posy_ = ICON_POSY;
+    width_ = RELATIVE_TEXT_POSX + TEXT_WIDTH;
+    height_ = ICON_HEIGHT - ICON_POSY;
+
+    imgmod_ = std::make_shared<CicoImageModule>(CicoImageModule());
+    if (imgmod_ == NULL) {
+        ICO_TRA("CicoNotificationPanelComponent::Initialize Levae(false)");
+        return false;
+    }
+
+    if (!imgmod_->Initialize(window)) {
+        ICO_TRA("CicoNotificationPanelComponent::Initialize Levae(false)");
+        return false;
+    }
+
+    imgmod_->SetPos(posx_,7);
+
+    imgmod_->SetSize(ICON_WIDTH, ICON_HEIGHT);
+    imgmod_->Show();
+
+    ICO_DBG("Create Text Module start");
+    textmod_ = std::make_shared<CicoTextModule>(CicoTextModule());
+    if (textmod_ == NULL) {
+        ICO_TRA("CicoNotificationPanelComponent::Initialize Levae(false)");
+        return false;
+    }
+    ICO_DBG("Create Text Module end");
+    if (!textmod_->Initialize(window)) {
+        ICO_TRA("CicoNotificationPanelComponent::Initialize Levae(false)");
+        return false;
+    }
+
+    textmod_->SetPos(posx_ + RELATIVE_TEXT_POSX, posy_ + RELATIVE_TEXT_POSY);
+    textmod_->SetSize(TEXT_WIDTH, TEXT_HEIGHT);
+    textmod_->SetFont(FONT_STYLE, FONT_SIZE);
+    textmod_->Show();
+
+    PackModule(imgmod_);
+    PackModule(textmod_);
+
+    ICO_TRA("CicoNotificationPanelComponent::Initialize Levae(true)");
+    return true;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   set notification panel
+ *
+ *  @param[in]  text
+ *  @param[in]  iconpaht
+ *  @param[in]  soundpath
+ *  @return     true: success   false: failed
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoNotificationPanelComponent::SetNotification(const char *text,
+                                                const char *iconpath,
+                                                const char *soundpath)
+{
+    ICO_TRA("CicoNotificationPanelComponent::SetNotification Enter"
+            "(text=%s icon=%s sound=%s)", text, iconpath, soundpath);
+
+    if (iconpath != NULL) {
+        imgmod_->SetFilePath(iconpath);
+    }
+
+    if (text != NULL) {
+        textmod_->SetText(text);
+    }
+
+    textmod_->SetFont(NULL,50);
+    textmod_->SetColor(0, 255, 255, 255);
+    Show();
+
+    ICO_TRA("CicoNotificationPanelComponent::SetNotification Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   set rate of notification component
+ *
+ *  @param[in]  rate
+ *  @return     true: success   false: failed
+ */
+/*--------------------------------------------------------------------------*/
+bool
+CicoNotificationPanelComponent::SetRate(double rate)
+{
+    if (modulelist_.empty()) {
+        return false;
+    }
+    rate_ = rate;
+    width_ *= rate;
+    height_ *= rate;
+    SetPos(posx_, posy_);
+    SetSize(width_, height_);
+    return true;
+}
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoComponentImplementation.h b/src/statusbar/CicoComponentImplementation.h
new file mode 100644 (file)
index 0000000..024b428
--- /dev/null
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoComponentImplementation.h
+ *
+ *  @brief  This file is definition of component classes
+ */
+//==========================================================================
+#ifndef __CICO_COMPONENT_IMPLEMENTATION_H__
+#define __CICO_COMPONENT_IMPLEMENTATION_H__
+
+#include <Elementary.h>
+#include <ctime>
+#include <list>
+#include <vector>
+#include "CicoComponentInterface.h"
+#include "CicoCommonComponent.h"
+#include "CicoModuleImplementation.h"
+
+//==========================================================================
+/**
+ *  @brief  This class provide the clock component
+ */
+//==========================================================================
+class CicoStatusBarClockComponent : public CicoCommonComponent
+{
+public:
+    // default constructor
+    CicoStatusBarClockComponent();
+
+    // destructor
+    ~CicoStatusBarClockComponent();
+
+    // initialize of clock component
+    bool Initialize(Evas_Object *window, int posx, int posy);
+
+    // update of clock component
+    bool Update(void);
+
+    // set rate of clock component 
+    bool SetRate(double rate);
+
+    static const int CLOCK_COMPONENT_WIDTH; /// clock component width
+    static const int CLOCK_COMPONENT_HEIGHT;/// clock component height
+
+private:
+    static const int AMPM_WIDTH;            /// ampm image width
+    static const int AMPM_HEIGHT;           /// ampm image height
+    static const int HOUR10_WIDTH;          /// hour10 image width
+    static const int HOUR10_HEIGHT;         /// hour10 image height
+    static const int HOUR1_WIDTH;           /// hour1 image width
+    static const int HOUR1_HEIGHT;          /// hour1 image height
+    static const int COLON_WIDTH;           /// colon image width
+    static const int COLON_HEIGHT;          /// colon image height
+    static const int MIN10_WIDTH;           /// min10 image width
+    static const int MIN10_HEIGHT;          /// min10 image height
+    static const int MIN1_WIDTH;            /// min1 image width
+    static const int MIN1_HEIGHT;           /// min1 image height
+
+    static const int COLON_BLANK;           /// colon blank size
+    static const int AMPM_BLANK;            /// ampm blank size
+    static const int LAST_BLANK;            /// last blank size
+
+    static const int AMPM_POSX;             /// ampm image position x
+    static const int AMPM_POSY;             /// ampm image position y
+    static const int RELATIVE_HOUR10_POSX;  /// hour10 image position x
+    static const int RELATIVE_HOUR10_POSY;  /// hour10 image position y
+    static const int RELATIVE_HOUR1_POSX;   /// hour1 image position x
+    static const int RELATIVE_HOUR1_POSY;   /// hour1 image position y
+    static const int RELATIVE_COLON_POSX;   /// colon image position x
+    static const int RELATIVE_COLON_POSY;   /// colon image position y
+    static const int RELATIVE_MIN10_POSX;   /// min10 image position x
+    static const int RELATIVE_MIN10_POSY;   /// min10 image position y
+    static const int RELATIVE_MIN1_POSX;    /// min1 image position x
+    static const int RELATIVE_MIN1_POSY;    /// min1 image position y
+
+    static const char *imgfilepath_am;      /// am image filepath
+    static const char *imgfilepath_pm;      /// pm image filepath
+    static const char *imgfilepath_0;       /// 0 image filepath
+    static const char *imgfilepath_1;       /// 1 image filepath
+    static const char *imgfilepath_2;       /// 2 image filepath
+    static const char *imgfilepath_3;       /// 3 image filepath
+    static const char *imgfilepath_4;       /// 4 image filepath
+    static const char *imgfilepath_5;       /// 5 image filepath
+    static const char *imgfilepath_6;       /// 6 image filepath
+    static const char *imgfilepath_7;       /// 7 image filepath
+    static const char *imgfilepath_8;       /// 8 image filepath
+    static const char *imgfilepath_9;       /// 9 image filepath
+    static const char *imgfilepath_colon;   /// colon image filepath
+
+    std::vector<const char*> imgfilelist_number;    /// image filepath list
+    double rate_;
+};
+
+//==========================================================================
+/**
+ *  @brief  This class provide the notification panel component
+ */
+//==========================================================================
+class CicoNotificationPanelComponent : public CicoCommonComponent
+{
+public:
+    // default constructor
+    CicoNotificationPanelComponent();
+
+    // destructor
+    ~CicoNotificationPanelComponent();
+
+    // initialize of notification component
+    bool Initialize(Evas_Object *window);
+
+    // set notification panel
+    void SetNotification(const char *text,
+                         const char *iconpath,
+                         const char *soundpath);
+
+    // set rate of notification component
+    bool SetRate(double rate);
+
+protected:
+    static const int ICON_POSX;             /// notification icon position x
+    static const int ICON_POSY;             /// notification icon position y
+    static const int ICON_WIDTH;            /// notification icon width
+    static const int ICON_HEIGHT;           /// notification icon height
+    static const int RELATIVE_TEXT_POSX;    /// notification text position x
+    static const int RELATIVE_TEXT_POSY;    /// notification text position y
+    static const int TEXT_WIDTH;            /// notification text width
+    static const int TEXT_HEIGHT;           /// notification text height
+    static const char *FONT_STYLE;          /// notification text font-style
+    static const int FONT_SIZE;             /// notification text font-size
+
+    std::shared_ptr<CicoTextModule> textmod_;   /// notification text module
+    std::shared_ptr<CicoImageModule> imgmod_;   /// notification icon module
+    double rate_;                               /// view rate of notification component 
+};
+#endif  // __CICO_COMPONENT_IMPLEMENTATION_H__
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoComponentInterface.h b/src/statusbar/CicoComponentInterface.h
new file mode 100644 (file)
index 0000000..a93410d
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoComponentInterface.h
+ *
+ *  @brief  This file is definition of CicoComponentInterface class
+ */
+//==========================================================================
+#ifndef __CICO_COMPONENT_INTERFACE_H__
+#define __CICO_COMPONENT_INTERFACE_H__
+
+//==========================================================================
+/**
+ *  @brief  This class provide the component interfaces
+ */
+//==========================================================================
+class CicoComponentInterface
+{
+public:
+    virtual bool Terminate(void) = 0;
+    virtual void Show(void) = 0;
+    virtual void Hide(void) = 0;
+    virtual void SetPos(int x, int y) = 0;
+    virtual void SetSize(int w, int h) = 0;
+
+protected:
+    CicoComponentInterface() {};
+    virtual ~CicoComponentInterface() {};
+};
+#endif  // __CICO_COMPONENT_INTERFACE_H__
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoModuleImplementation.cpp b/src/statusbar/CicoModuleImplementation.cpp
new file mode 100644 (file)
index 0000000..66035e8
--- /dev/null
@@ -0,0 +1,229 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoModuleImplementation.cpp
+ *
+ *  @brief  This file is implimention of CicoTextModule class
+ */
+//==========================================================================
+
+#include <Evas.h>
+#include <Elementary.h>
+#include <cstring>
+#include <cassert>
+
+#include <ico_log.h>
+#include "CicoModuleImplementation.h"
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  default constructor
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+CicoImageModule::CicoImageModule() 
+    : CicoCommonModule()
+{
+    memset(filepath_, 0, sizeof(filepath_));
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  destructor
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+CicoImageModule::~CicoImageModule()
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  initialize of image module
+ *  @param[in]  windowobj
+ *  @return     true: success   false: failed
+ */
+//--------------------------------------------------------------------------
+bool
+CicoImageModule::Initialize(Evas_Object *windowobj)
+{
+    ICO_TRA("CicoImageModule::Initialize Enter");
+    if (windowobj == NULL) {
+        return false;
+    }
+    evasobj_ = elm_image_add(windowobj);
+    if (evasobj_ == NULL) {
+        ICO_ERR("elm_image_add() failed.");
+        ICO_TRA("CicoImageModule::Initialize Leave(false)");
+        return false;
+    }
+    if (strcmp("elm_image", evas_object_type_get(evasobj_)) != 0) {
+        ICO_TRA("CicoImageModule::Initialize Leave(false)");
+        return false;
+    }
+    ICO_DBG("object name=%s", evas_object_name_get(evasobj_));
+    ICO_TRA("CicoImageModule::Initialize Leave(true)");
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set filepaht of image module
+ *  @param[in]  path    image file path
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+bool
+CicoImageModule::SetFilePath(const char *path)
+{
+    //ICO_TRA("CicoImageModule::SetFilePath Enter");
+    assert(evasobj_ != NULL);
+    memset(filepath_, 0, sizeof(filepath_));
+    strcpy(filepath_, path);
+    //ICO_TRA("CicoImageModule::SetFilePath Leave");
+    return (elm_image_file_set(evasobj_, filepath_, NULL) == EINA_TRUE) ? true : false;
+}
+
+const double CicoTextModule::FONT_SIZE_RATE = 0.7;
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  default constructor
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+CicoTextModule::CicoTextModule()
+    : CicoCommonModule(), fontsize_(50)
+{
+    ICO_TRA("CicoTextModule::CicoTextModule Enter");
+    memset(text_, 0, sizeof(text_));
+    memset(fontstyle_, 0, sizeof(fontstyle_));
+    strcpy(fontstyle_, "Sans");
+    ICO_TRA("CicoTextModule::CicoTextModule Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  destructor
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+CicoTextModule::~CicoTextModule()
+{
+    ICO_TRA("CicoTextModule::~CicoTextModule Enter");
+    ICO_TRA("CicoTextModule::~CicoTextModule Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief initialize of text module
+ *  @param[in]  windowobj 
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+bool
+CicoTextModule::Initialize(Evas_Object *windowobj)
+{
+    ICO_TRA("CicoTextModule::Initialize Enter");
+    evasobj_ = elm_label_add(windowobj);
+    elm_label_line_wrap_set(evasobj_, ELM_WRAP_NONE);
+    elm_object_style_set(evasobj_, "default");
+
+    strcpy(fontstyle_, "Sans");
+    SetFont(fontstyle_, fontsize_);
+
+    ICO_DBG("object name=%s", evas_object_name_get(evasobj_));
+    ICO_TRA("CicoTextModule::Initialize Leave");
+    return (evasobj_ != NULL);
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set text of text module
+ *  @param[in]  text
+ *  @return     true: success
+ */
+//--------------------------------------------------------------------------
+bool
+CicoTextModule::SetText(const char *text)
+{
+    ICO_TRA("CicoTextModule::SetText Enter(text=%s)", text);
+    memset(text_, 0, sizeof(text_));
+    strncpy(text_, text, (sizeof(text_)-1));
+    ICO_DBG("text_=%s", text_);
+
+    elm_object_part_text_set(evasobj_, NULL, text_);
+    SetFont(fontstyle_, fontsize_);
+    SetSize(FONT_SIZE_RATE * fontsize_ * strlen(text), height_);
+
+    ICO_TRA("CicoTextModule::SetText Leave");
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set font of text module
+ *  @param[in]  style   font style
+ *  @param[in]  size    font size
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+CicoTextModule::SetFont(const char *style, const int size)
+{
+    ICO_TRA("CicoTextModule::SetFont Enter"
+            "(style=%s size=%d)", style, size);
+
+    if (style != NULL) {
+        strcpy(fontstyle_, style);
+    }
+    if (size > 0) {
+        fontsize_ = size;
+    }
+
+    const char *textclassname = evas_object_type_get(evasobj_);
+    char textclassname2[strlen(textclassname) + 1];
+    if (strncmp(textclassname, "elm_", 4) == 0) {
+        memset(textclassname2, 0, sizeof(textclassname2));
+        for (int i = 0; textclassname[i + 4] != '\0'; i++) {
+            textclassname2[i] = textclassname[i + 4];
+        }
+        textclassname = textclassname2;
+    }
+    elm_config_font_overlay_set(textclassname, fontstyle_, fontsize_);
+    elm_config_font_overlay_apply();
+    ICO_TRA("CicoTextModule::SetFont Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  set color of text module
+ *  @param[in]  r   Red color
+ *  @param[in]  g   Green color
+ *  @param[in]  b   Blue color
+ *  @param[in]  a   alpha color
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void CicoTextModule::SetColor(const int r, const int g, 
+                              const int b, const int a)
+{
+    ICO_TRA("CicoTextModule::SetColor Enter"
+            "(r/g/b/a=%d/%d/%d/%d)", r, g, b, a);
+    elm_object_style_set(evasobj_, "marker");
+    evas_object_color_set(evasobj_, r, g, b, a);
+    ICO_TRA("CicoTextModule::SetColor Leave");
+}
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoModuleImplementation.h b/src/statusbar/CicoModuleImplementation.h
new file mode 100644 (file)
index 0000000..4d79c40
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoModuleInterface.h
+ *
+ *  @brief  This file is definition of CicoModuleInterface class
+ */
+//==========================================================================
+#ifndef __CICO_MODULE_IMPLEMENTATION_H__
+#define __CICO_MODULE_IMPLEMENTATION_H__
+
+#include <Evas.h>
+#include "CicoModuleInterface.h"
+
+//==========================================================================
+/**
+ *  @brief  This class provide the common module component interfaces
+ */
+//==========================================================================
+class CicoCommonModule : public CicoModuleInterface
+{
+public:
+    // default constructor
+    CicoCommonModule();
+
+    // destructor
+    virtual ~CicoCommonModule();
+
+    // terminate module 
+    virtual bool Terminate(void);
+
+    // show module
+    virtual void Show(void);
+
+    // hide module
+    virtual void Hide(void);
+
+    // set position of module
+    virtual void SetPos(int x, int y);
+
+    // set size of module
+    virtual void SetSize(int w, int h);
+
+    // move module
+    virtual void Move(int diffx, int diffy);
+
+    // resize module
+    virtual void Resize(double ratew, double rateh);
+
+    // reset position and size of module
+    virtual void Reallocate(int standardx, int standardy,
+                            double ratew, double rateh);
+
+    // get raw data
+    Evas_Object *GetRawData(void) const;
+    bool operator==(const CicoCommonModule& moduleb) {
+        return (this->evasobj_ == moduleb.evasobj_);
+    }
+
+protected:
+    Evas_Object *evasobj_;  /// module object
+    int posx_;              /// module position x
+    int posy_;              /// module position y
+    int width_;             /// module width
+    int height_;            /// module height
+};
+
+//==========================================================================
+/**
+ *  @brief  This class provide the image module
+ */
+//==========================================================================
+class CicoImageModule : public CicoCommonModule
+{
+public:
+    // default constructor
+    CicoImageModule();
+
+    // destructor
+    virtual ~CicoImageModule();
+
+    // initialize of image module
+    bool Initialize(Evas_Object *windowobj);
+
+    // set filepath of image module
+    bool SetFilePath(const char *path);
+protected:
+    char filepath_[256];    ///image file path
+};
+
+//==========================================================================
+/**
+ *  @brief  This class provide the text module
+ */
+//==========================================================================
+class CicoTextModule : public CicoCommonModule
+{
+public:
+    // default contructor
+    CicoTextModule();
+
+    // destructor
+    ~CicoTextModule();
+
+    // initialize of text module
+    bool Initialize(Evas_Object *windowobj);
+
+    // set text of text module
+    bool SetText(const char *text);
+
+    // set font of text module
+    void SetFont(const char *style, const int size);
+
+    // set color of text module
+    void SetColor(const int r, const int g, const int b, const int a);
+protected:
+    static const double FONT_SIZE_RATE; /// rate of font size
+    char text_[256];                    /// text of textmodule
+    char fontstyle_[256];               /// font style of textmodule
+    int fontsize_;                      /// font size of textmodule
+};
+#endif  //  __CICO_MODULE_IMPLEMENTATION_H__
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoModuleInterface.h b/src/statusbar/CicoModuleInterface.h
new file mode 100644 (file)
index 0000000..85a3a4e
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoModuleInterface.h
+ *
+ *  @brief  This file is definition of CicoModuleInterface class
+ */
+//==========================================================================
+#ifndef __CICO_MODULE_INTERFACE_H__
+#define __CICO_MODULE_INTERFACE_H__
+
+//==========================================================================
+/**
+ *  @brief  This class provide the module interfaces
+ */
+//==========================================================================
+class CicoModuleInterface
+{
+public:
+    virtual bool Terminate(void) = 0;
+    virtual void Show(void) = 0;
+    virtual void Hide(void) = 0;
+    virtual void SetPos(int x, int y) = 0;
+    virtual void SetSize(int w, int h) = 0;
+    virtual void Move(int diffx, int diffy) = 0;
+    virtual void Resize(double ratew, double rateh) = 0;
+    virtual void Reallocate(int standardx, int standardy,
+                            double ratew, double rateh) = 0;
+};
+#endif  // __CICO_MODULE_INTERFACE_H__
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoSBConfigDef.h b/src/statusbar/CicoSBConfigDef.h
deleted file mode 100644 (file)
index 962804f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   header file of homescreen resource
- *
- * @date    Feb-15-2013
- */
-
-#ifndef __CICO_SB_CONFIG_DEF_H__
-#define __CICO_SB_CONFIG_DEF_H__
-
-#define ICO_SB_CONFIG_STATUSBAR     "statusbar"
-#define ICO_SB_CONFIG_ORIENTATION   "orientation"
-#define ICO_SB_CONFIG_SOUND         "sound"
-
-#endif  // __CICO_SB_CONFIG_DEF_H__
-// vim:set expandtab ts=4 sw=4:
-
diff --git a/src/statusbar/CicoSBEFLApp.cpp b/src/statusbar/CicoSBEFLApp.cpp
new file mode 100644 (file)
index 0000000..b3b2edb
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoSBEFLApp.cpp
+ *
+ *  @brief  This file is implimention of CicoSBEFLApp class
+ */
+//==========================================================================
+
+#include <exception>
+#include <iostream>
+#include <string>
+
+#include <ico_log.h>
+
+#include "CicoSBEFLApp.h"
+#include "CicoStatusBar.h"
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  default constructor
+ */
+//--------------------------------------------------------------------------
+CicoSBEFLApp::CicoSBEFLApp()
+{
+    ICO_TRA("CicoSBEFLApp::CicoSBEFLApp Enter");
+    ICO_TRA("CicoSBEFLApp::CicoSBEFLApp Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  destructor
+ */
+//--------------------------------------------------------------------------
+CicoSBEFLApp::~CicoSBEFLApp()
+{
+    ICO_TRA("CicoSBEFLApp::~CicoSBEFLApp Enter");
+    ICO_TRA("CicoSBEFLApp::~CicoSBEFLApp Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  callback function on create
+ *
+ *  @param [in] user_data   The user data passed from the callback
+ *                          registration function
+ *
+ *  @return true on success, false on error
+ */
+//--------------------------------------------------------------------------
+bool
+CicoSBEFLApp::onCreate(void *user_data)
+{
+    ICO_TRA("CicoSBEFLApp::onCreate Enter");
+
+    try {
+        // start status bar
+        m_statusbar = new CicoStatusBar();
+        bool ret = m_statusbar->Initialize();
+        if (false == ret) {
+            ICO_TRA("CicoSBEFLApp::onCreate Leave(false)");
+            return false;
+        }
+    }
+    catch (const std::exception& e) {
+        std::cerr << e.what() << std::endl;
+        ICO_ERR("catch exception %s", e.what());
+        ICO_TRA("CicoSBEFLApp::onCreate Leave(false)");
+        return false;
+    }
+    catch (const std::string& str) {
+        std::cerr << str << std::endl;
+        ICO_ERR("catch exception %s", str.c_str());
+        ICO_TRA("CicoSBEFLApp::onCreate Leave(false)");
+        return false;
+    }
+    catch (...) {
+        ICO_ERR("catch exception unknown");
+        ICO_TRA("CicoSBEFLApp::onCreate Leave(false)");
+        return false;
+    }
+
+    ICO_TRA("CicoSBEFLApp::onCreate Leave(true)");
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  callback function on terminate
+ *
+ *  @param [in] user_data   The user data passed from the callback
+ *                          registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoSBEFLApp::onTerminate(void *user_data)
+{
+    ICO_TRA("CicoSBEFLApp::onTerminate Enter");
+    ICO_TRA("CicoSBEFLApp::onTerminate Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  callback function on pause
+ *
+ *  @param [in] user_data   The user data passed from the callback
+ *                          registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoSBEFLApp::onPause(void *user_data)
+{
+    ICO_TRA("CicoSBEFLApp::onPause Enter");
+    ICO_TRA("CicoSBEFLApp::onPause Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  callback function on resume
+ *
+ *  @param [in] user_data   The user data passed from the callback
+ *                          registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoSBEFLApp::onResume(void *user_data)
+{
+    ICO_TRA("CicoSBEFLApp::onResume Enter");
+    ICO_TRA("CicoSBEFLApp::onResume Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  callback function on service
+ *
+ *  @param [in] service     The handle to the service
+ *  @param [in] user_data   The user data passed from the callback
+ *                          registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoSBEFLApp::onService(service_h service, void *user_data)
+{
+    ICO_TRA("CicoSBEFLApp::onService Enter");
+    ICO_TRA("CicoSBEFLApp::onService Leave");
+}
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoSBEFLApp.h b/src/statusbar/CicoSBEFLApp.h
new file mode 100644 (file)
index 0000000..6eaa862
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoSBEFLApp.h
+ *
+ *  @brief  This file is definition of CicoSBEFLApp class
+ */
+//==========================================================================
+#ifndef __CICO_SB_EFL_APP_H__
+#define __CICO_SB_EFL_APP_H__
+
+#include "CicoEFLApp.h"
+
+//==========================================================================
+//  Forward declaration
+//==========================================================================
+class CicoStatusBar;
+
+//==========================================================================
+/**
+ *  @brief  ELF Application functions for HomeScreen
+ */
+//==========================================================================
+class CicoSBEFLApp : public CicoEFLApp {
+public:
+    // default constructor
+    CicoSBEFLApp();
+
+    // destructor
+    virtual ~CicoSBEFLApp();
+
+    // callback function on create
+    virtual bool onCreate(void *user_data);
+
+    // callback function on terminate
+    virtual void onTerminate(void *user_data);
+
+    // callback function on pause
+    virtual void onPause(void *user_data);
+
+    // callback function on resume
+    virtual void onResume(void *user_data);
+
+    // callback function on service
+    virtual void onService(service_h service, void *user_data);
+
+protected:
+    // assignment operator
+    CicoSBEFLApp& operator=(const CicoSBEFLApp &object);
+
+    // copy constructor
+    CicoSBEFLApp(const CicoSBEFLApp &object);
+
+private:
+    // CicoHomeScreen instance
+    CicoStatusBar* m_statusbar;
+};
+#endif  // __CICO_SB_EFL_APP_H__
+// vim:set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoSBResourceDef.h b/src/statusbar/CicoSBResourceDef.h
deleted file mode 100644 (file)
index ffed84a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   header file of homescreen resource
- *
- * @date    Feb-15-2013
- */
-
-#ifndef __CICO_SB_RESOURCE_DEF_H__
-#define __CICO_SB_RESOURCE_DEF_H__
-
-//  file name (status bar)
-#define fname_logo_off "st_logo_off.png"
-#define fname_logo_on  "st_logo_on.png"
-#define fname_am       "time_am.png"
-#define fname_pm       "time_pm.png"
-#define fname_num1     "time_1.png"
-#define fname_num2     "time_2.png"
-#define fname_num3     "time_3.png"
-#define fname_num4     "time_4.png"
-#define fname_num5     "time_5.png"
-#define fname_num6     "time_6.png"
-#define fname_num7     "time_7.png"
-#define fname_num8     "time_8.png"
-#define fname_num9     "time_9.png"
-#define fname_num0     "time_0.png"
-#define fname_colon    "time_ten.png"
-
-#endif  // __CICO_SB_RESOURCE_DEF_H__
-// vim:set expandtab ts=4 sw=4:
-
diff --git a/src/statusbar/CicoStatusBar.cpp b/src/statusbar/CicoStatusBar.cpp
new file mode 100644 (file)
index 0000000..5ba36f1
--- /dev/null
@@ -0,0 +1,302 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+#include <cassert>
+#include <Ecore.h>
+#include <Ecore_Wayland.h>
+#include <Evas.h>
+#include <Elementary.h>
+#include <ico_log.h>
+#include "CicoStatusBar.h"
+
+const int CicoStatusBar::STATUSBAR_POSX = 0; 
+const int CicoStatusBar::STATUSBAR_POSY = 0; 
+const int CicoStatusBar::STATUSBAR_HEIGHT = 64;
+
+const int CicoStatusBar::CLOCK_WIDTH = 
+                        CicoStatusBarClockComponent::CLOCK_COMPONENT_WIDTH;
+const int CicoStatusBar::CLOCK_HEIGHT = 
+                        CicoStatusBarClockComponent::CLOCK_COMPONENT_HEIGHT;
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  default constructor
+ *  @param[in]  none
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+CicoStatusBar::CicoStatusBar()
+    : CicoCommonWindow()
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  initialize status bar
+ *  @param[in]  void
+ *  @return     true: success   false: failed
+ */
+//--------------------------------------------------------------------------
+bool
+CicoStatusBar::Initialize(void)
+{
+    ICO_TRA("CicoStatusBar::Initialize() Enter");
+    ICO_DBG("Initialize start window_.");
+
+    window_ = ecore_evas_new(NULL, 0, 0, 1, 1, "frame=0");
+    if (window_ == NULL) {
+        return false;
+    }
+    ecore_main_loop_iterate();
+    ecore_wl_screen_size_get(&width_, &height_);
+
+    ecore_evas_size_min_set(window_, width_, STATUSBAR_HEIGHT);
+    ecore_evas_size_max_set(window_, width_, STATUSBAR_HEIGHT);
+
+    ecore_evas_move(window_, STATUSBAR_POSX, STATUSBAR_POSY);
+    ecore_evas_resize(window_, width_, STATUSBAR_HEIGHT);
+
+    // if use alpha need to ecore_evas_alpha_set(window_, 1);
+    ICO_DBG("Initialize end window_.");
+
+    ICO_DBG("Initialize start windowobj_.");
+    windowobj_ = evas_object_rectangle_add(ecore_evas_get(window_));
+
+    //statusbar RGBcolor setting
+    evas_object_color_set(windowobj_, 0, 0, 0, 255);
+    ICO_DBG("Initialize setpos windowobj_.");
+
+    SetPos(STATUSBAR_POSX, STATUSBAR_POSY);
+    ICO_DBG("Initialize setsize windowobj_.");
+    SetSize(width_, STATUSBAR_HEIGHT);
+
+    ecore_evas_object_associate(window_, windowobj_,
+                                ECORE_EVAS_OBJECT_ASSOCIATE_BASE);
+    ICO_DBG("Initialize end windowobj_.");
+
+    ICO_DBG("Initialize start Clock_Component.");
+    clockcomp_ = std::make_shared<CicoStatusBarClockComponent>(CicoStatusBarClockComponent());
+    if (!clockcomp_->Initialize(windowobj_,
+                                (width_ - CLOCK_WIDTH - 100),
+                                ((STATUSBAR_HEIGHT - CLOCK_HEIGHT) / 2))){
+        ICO_ERR("Failed to initialize Clock_Componet.");
+        return false;
+    }
+    ICO_DBG("Initialize end Clock_Component.");
+
+    ICO_DBG("Initialize start Notification_Component.");
+    noticomp_ = std::make_shared<CicoNotificationPanelComponent>(CicoNotificationPanelComponent());
+    if (!noticomp_->Initialize(windowobj_)) {
+        ICO_ERR("Failed to initialize Notification_Component.");
+        return false;
+    }
+
+    noticomp_->SetPos(STATUSBAR_POSX, STATUSBAR_POSY);
+    notiservice_.SetCallback(NotificationCallback, this);
+    ICO_DBG("Initialize end Notification_Component.");
+
+    Show();
+
+    // add timer callback function of time update
+    ecore_timer_add(3.0, ecoreUpdateTimeCB, this);
+
+    ICO_TRA("CicoStatusBar::Initialize() Leave");
+    return true;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   update clock
+ *
+ * @param[in]   none
+ * @return      clockcomp_->Update()
+                false :update failed
+ */
+/*--------------------------------------------------------------------------*/
+bool
+CicoStatusBar::UpdateTime()
+{
+    //ICO_TRA("CicoStatusBar::UpdateTime() Enter");
+    if (window_ != NULL && windowobj_ != NULL && clockcomp_ != NULL) {
+        //ICO_TRA("CicoStatusBar::UpdateTime() Leave");
+        return clockcomp_->Update();
+    }
+
+    ICO_ERR("Faied to update Clock_Componet.");
+    return false;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   update notification panel 
+ *  @param[in]  msg     message
+ *  @param[in]  iconpaht    icon image path
+ *  @param[in]  soundpath   sound data path
+ *  @return     true: success   false: failed
+ */
+/*--------------------------------------------------------------------------*/
+bool
+CicoStatusBar::UpdateNotificationPanel(const char *msg,
+                                       const char *iconpath,
+                                       const char *soundpath)
+{
+    ICO_TRA("CicoStatusBar::UpdateNotificationPanel Enter"
+            "(msg=%s icon=%s sound=%s)", msg, iconpath, soundpath);
+    if (msg == NULL && iconpath == NULL && soundpath == NULL) {
+        ICO_ERR("notification info is NULL.");
+        return false;
+    }
+    noticomp_->SetNotification(msg, iconpath, soundpath);
+    noticomp_->Show();
+    if (notitimer_ != NULL) {
+        ecore_timer_del(notitimer_);
+        notitimer_ = NULL;
+    }
+    notitimer_ = ecore_timer_add(3.0, HideNotification, this);
+    ICO_TRA("CicoStatusBar::UpdateNotificationPanel Leave");
+    return true;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   notification callback
+ *
+ * @param[in]   data    StatusBar object
+ * @param[in]   type    notification type
+ * @param[in]   op_list notification open list
+ * @param[in]   num_op  notification open number
+ * @return      none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoStatusBar::NotificationCallback(void *data,
+                                    notification_type_e type,
+                                    notification_op *op_list,
+                                    int num_op)
+{
+    ICO_TRA("CicoStatusBar::NotificationCallback Enter(type=%d num_op=%d)",
+            type, num_op);
+    CicoStatusBar *sb = reinterpret_cast<CicoStatusBar*>(data);
+    notification_op_type_e op_type;
+    notification_list_h notificationlist = NULL;
+    notification_list_h getlist = NULL;
+    for (int i = 0; i < num_op; i++) {
+        op_type = op_list[i].type;
+        switch (op_type) {
+        case NOTIFICATION_OP_INSERT :
+        case NOTIFICATION_OP_UPDATE :
+        {
+            ICO_DBG("NOTIFICATION_OP_INSERT/NOTIFICATION_OP_UPDATE");
+            notification_error_e err = NOTIFICATION_ERROR_NONE;
+            ICO_DBG("called: notification_get_list(NOTIFICATION_TYPE_NOTI)");
+            err = notification_get_list(NOTIFICATION_TYPE_NOTI,
+                                        -1, &notificationlist);
+            if (NOTIFICATION_ERROR_NONE != err) {
+                ICO_ERR("notification_get_list() failed(%d).", err);
+                break;
+            }
+
+            if (notificationlist) {
+                ICO_DBG("called: notification_list_get_head(0x%08x)",
+                        notificationlist);
+                getlist = notification_list_get_head(notificationlist);
+                do {
+                    CicoNotification noti(notification_list_get_data(getlist));
+                    if (noti.Empty()) {
+                        break;
+                    }
+                    sb->UpdateNotificationPanel(noti.GetTitle(),
+                                                noti.GetIconPath(), 
+                                                NULL);
+#if 1
+                    int grpid = 0;
+                    int privid = 0;
+                    notification_get_id(notification_list_get_data(getlist),
+                                        &grpid, &privid);
+                    notification_delete_group_by_priv_id(noti.GetPkgname(),
+                                                         noti.GetType(),
+                                                         privid);
+#endif
+
+                    ICO_DBG("called: notification_list_get_next(0x%08x)",
+                            getlist);
+                    getlist = notification_list_get_next(getlist);
+                } while (getlist != NULL);
+            }
+
+            if (notificationlist != NULL) {
+                ICO_DBG("called: notification_free_list(0x%08x)",
+                        notificationlist);
+                notification_error_e err = NOTIFICATION_ERROR_NONE;
+                err = notification_free_list(notificationlist);
+                if (NOTIFICATION_ERROR_NONE != err) {
+                    ICO_ERR("notification_free_list() failed.");
+                }
+                notificationlist = NULL;
+            }
+            break;
+        }
+        case NOTIFICATION_OP_DELETE:
+            ICO_DBG("NOTIFICATION_OP_DELETE");
+            break;
+        case NOTIFICATION_OP_DELETE_ALL:
+            ICO_DBG("NOTIFICATION_OP_DELETE_ALL");
+            break;
+        case NOTIFICATION_OP_REFRESH:
+            ICO_DBG("NOTIFICATION_OP_REFRESH");
+            break;
+        case NOTIFICATION_OP_SERVICE_READY:
+            ICO_DBG("NOTIFICATION_OP_SERVICE_READY");
+            break;
+        default :
+            break;
+        }
+    }
+    ICO_TRA("CicoStatusBar::NotificationCallback Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief   hide notification panel 
+ *
+ * @param[in]   data    StatusBar object
+ * @return      ECORE_CALLBACK_CANCEL
+ */
+/*--------------------------------------------------------------------------*/
+Eina_Bool
+CicoStatusBar::HideNotification(void *data)
+{
+    ICO_TRA("CicoStatusBar::HideNotification() Enter");
+    CicoStatusBar *sb = reinterpret_cast<CicoStatusBar*>(data);
+    sb->noticomp_->Hide();
+    ecore_timer_del(sb->notitimer_);
+    sb->notitimer_ = NULL;
+    ICO_TRA("CicoStatusBar::HideNotification Leave");
+    return ECORE_CALLBACK_CANCEL;
+}
+
+//==========================================================================
+//  public functions
+//==========================================================================
+//--------------------------------------------------------------------------
+/**
+ *  @brief  callback function of time update 
+ *
+ *  @param [in] data    user date
+ */
+//--------------------------------------------------------------------------
+Eina_Bool
+CicoStatusBar::ecoreUpdateTimeCB(void *data)
+{
+    assert(data != NULL);
+    CicoStatusBar* statusbar = reinterpret_cast<CicoStatusBar*>(data);
+    assert(statusbar->UpdateTime());
+    return ECORE_CALLBACK_RENEW;
+}
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoStatusBar.h b/src/statusbar/CicoStatusBar.h
new file mode 100644 (file)
index 0000000..fefa624
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoStatusBar.h
+ *
+ *  @brief  This file is definition of CicoStatusBar class
+ */
+//==========================================================================
+#ifndef __CICO_STATUSBAR_H__
+#define __CICO_STATUSBAR_H__
+
+#include <memory>
+#include "CicoComponentImplementation.h"
+#include "CicoCommonWindow.h"
+#include "CicoNotification.h"
+#include "CicoNotificationService.h"
+
+//==========================================================================
+/**
+ *  @brief  This class provide the status bar window
+ */
+//==========================================================================
+class CicoStatusBar : public CicoCommonWindow
+{
+public:
+
+    // default constructor
+    CicoStatusBar();
+
+    // destructor
+    ~CicoStatusBar();
+
+    // initialize status bar 
+    bool Initialize(void);
+
+    // update clock
+    bool UpdateTime(void);
+
+    // update notification panel
+    bool UpdateNotificationPanel(const char *msg, const char *icopath, 
+                                 const char *soundpath);
+
+    // notification callback
+    static void NotificationCallback(void *data, notification_type_e type,
+                                     notification_op *op_list, int num_op);
+
+    // hide notification panel
+    static Eina_Bool HideNotification(void *data);
+private:
+    // callback function of time update
+    static Eina_Bool ecoreUpdateTimeCB(void *data);
+
+protected:
+    static const int STATUSBAR_POSX;    /// statusbar position x
+    static const int STATUSBAR_POSY;    /// statusbar position y
+    static const int STATUSBAR_HEIGHT;  /// statusbar height
+    static const int CLOCK_WIDTH;       /// clock width
+    static const int CLOCK_HEIGHT;      /// clock height
+
+    Ecore_Timer *notitimer_;            /// notification timer
+    std::shared_ptr<CicoStatusBarClockComponent> clockcomp_;    /// clock component
+    std::shared_ptr<CicoNotificationPanelComponent> noticomp_;  /// notification component
+    CicoNotificationService notiservice_;   /// notification service
+};
+#endif  // __CICO_STATUSBAR_H__
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoStatusBarControlWindow.cpp b/src/statusbar/CicoStatusBarControlWindow.cpp
deleted file mode 100644 (file)
index 635ced7..0000000
+++ /dev/null
@@ -1,472 +0,0 @@
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   windows control for statusbar application
- *
- * @date    Feb-15-2013
- */
-
-#include <ico_log.h>
-#include "CicoResourceConfig.h"
-#include "CicoStatusBarControlWindow.h"
-#include "CicoSBResourceDef.h"
-#include "CicoSBConfigDef.h"
-
-/*============================================================================*/
-/* Declare static values                                                      */
-/*============================================================================*/
-CicoStatusBarControlWindow* CicoStatusBarControlWindow::instance;
-
-/*============================================================================*/
-/* Functions Declaration (CicoStatusBarControlWindow)                         */
-/*============================================================================*/
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::CicoStatusBarControlWindow
- *          constractor
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-CicoStatusBarControlWindow::CicoStatusBarControlWindow()
-{
-    width = 0;
-    moveH = 0;
-    window = NULL;
-    shtct_list = NULL;
-
-    /* Initialize a new system of Ecore_Evas */
-    ecore_evas_init();
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::~CicoStatusBarControlWindow
- *          destractor
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-CicoStatusBarControlWindow::~CicoStatusBarControlWindow()
-{
-    /* Free an Ecore_Evas */
-    if(window != NULL){
-        ecore_evas_free(window);
-    }
-    /* Shut down the Ecore_Evas system */
-    ecore_evas_shutdown();
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::Initialize
- *          Initialize
- *
- * @param[in]   homescreen_config_tmp    pointer to instance of CicoGKeyFileConfig
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoStatusBarControlWindow::Initialize(CicoGKeyFileConfig *homescreen_config_tmp)
-{
-    homescreen_config = homescreen_config_tmp;
-
-    /* get image path*/
-    CicoResourceConfig::GetImagePath(respath, sizeof(respath));
-
-    /*create instances*/
-    time_data[0] = new CicoStatusBarTime(fname_num0);
-    time_data[1] = new CicoStatusBarTime(fname_num1);
-    time_data[2] = new CicoStatusBarTime(fname_num2);
-    time_data[3] = new CicoStatusBarTime(fname_num3);
-    time_data[4] = new CicoStatusBarTime(fname_num4);
-    time_data[5] = new CicoStatusBarTime(fname_num5);
-    time_data[6] = new CicoStatusBarTime(fname_num6);
-    time_data[7] = new CicoStatusBarTime(fname_num7);
-    time_data[8] = new CicoStatusBarTime(fname_num8);
-    time_data[9] = new CicoStatusBarTime(fname_num9);
-    time_data[10] = new CicoStatusBarTime(fname_am);
-    time_data[11] = new CicoStatusBarTime(fname_pm);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::Finalize
- *          Finalize
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoStatusBarControlWindow::Finalize(void)
-{
-    /*delete instances*/
-    for(int ii = 0;ii < ICO_SB_TIME_IMG_PARTS;ii++){
-        delete time_data[ii];
-    }
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::SetInstanceForClock
- *          seting instance for static method
- *
- * @param[in]   instance_tmp    instance of this class
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoStatusBarControlWindow::SetInstanceForClock(CicoStatusBarControlWindow *instance_tmp)
-{
-    instance = instance_tmp;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::CreateEcoreEvas
- *          make new ecore_evas
- *
- * @param[in]   none
- * @return      0:success -1:failed
- */
-/*--------------------------------------------------------------------------*/
-int
-CicoStatusBarControlWindow::CreateEcoreEvas(void)
-{
-    /* Make a new ecore_evas */
-    window = ecore_evas_new(NULL, 0, 0, 1, 1, "frame=0");
-
-    /* if not for a window, return NULL */
-    if (!window) {
-        EINA_LOG_CRIT("StatusBar: could not create ons_window.");
-        return -1;
-    }
-    ecore_evas_callback_delete_request_set(window,QuitEcoreLoop);
-
-    return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::StartEcoreLoop
- *          start ecore loop
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoStatusBarControlWindow::StartEcoreLoop(void)
-{
-    /* Start main loop */
-    ecore_main_loop_begin();
-}
-
-/*--------------------------------------------------------------------------*/
-/*
- * @brief   CicoStatusBarControlWindow::QuitEcoreLoop
- *          callback function called by EFL when ecore destroyed.
- *          exit ecore main loop.
- *
- * @param[in]   ee                  ecore evas object
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoStatusBarControlWindow::QuitEcoreLoop(Ecore_Evas *ee)
-{
-    ICO_TRA("CicoStatusBarControlWindow::QuitEcoreLoop: Enter");
-    ecore_main_loop_quit();
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::ResizeWindow
- *          resize window
- *
- * @param[in]   orientation     setting ICO_ONS_HORIZONTAL or ICO_ONS_VERTICAL
- *                              (if config is existing,this value is ignored)
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoStatusBarControlWindow::ResizeWindow(int orientation)
-{
-    int width_tmp, height_tmp;
-
-    /* load configuration */
-    if (homescreen_config != NULL) {
-       orientation = homescreen_config->ConfigGetInteger(ICO_SB_CONFIG_STATUSBAR,
-                                          ICO_SB_CONFIG_ORIENTATION,
-                                          orientation);
-    }
-
-    /* resize window */
-    ecore_main_loop_iterate();
-    ecore_wl_screen_size_get(&width_tmp, &height_tmp);
-    if (orientation == ICO_SB_VERTICAL) {
-        width = width_tmp > height_tmp ? height_tmp : width_tmp;
-        moveH = width - ICO_HS_SIZE_LAYOUT_WIDTH;
-    }
-    else {
-        width = width_tmp < height_tmp ? height_tmp : width_tmp;
-        moveH = width - ICO_HS_SIZE_LAYOUT_WIDTH;
-    }
-
-    /* Set the window size of the maximum and minimum */
-    ecore_evas_size_min_set(window, width, ICO_HS_SIZE_SB_HEIGHT);
-    ecore_evas_size_max_set(window, width, ICO_HS_SIZE_SB_HEIGHT);
-
-    /* Set the title of an Ecore_Evas window */
-    /* ecore_evas_title_set(ee, "Ecore_Evas buffer (image) example"); */
-    ecore_evas_move(window, 0, ICO_SB_POS_Y);
-    ecore_evas_resize(window, width, ICO_HS_SIZE_SB_HEIGHT);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::ShowWindow
- *          show Window
- *
- * @param[in]   void
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoStatusBarControlWindow::ShowWindow(void)
-{
-    ecore_evas_show(window);
-}
-
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::InitEvas
- *          initialize evas
- *
- * @param[in]   none
- * @return      0:OK -1:NG
- */
-/*--------------------------------------------------------------------------*/
-int
-CicoStatusBarControlWindow::InitEvas(void)
-{
-    Evas_Object *canvas;
-
-    if (evas) {
-        return 0;
-    }
-
-    evas = ecore_evas_get(window);
-    if (!evas) {
-        ICO_DBG("CicoStatusBarControlWindow::InitEvas: could not create evas.");
-        return -1;
-    }
-
-    /* BG color set */
-    canvas = evas_object_rectangle_add(evas);
-    evas_object_color_set(canvas, 0, 0, 0, 255);
-    evas_object_move(canvas, 0, ICO_SB_POS_Y);
-    evas_object_resize(canvas, width, ICO_HS_SIZE_SB_HEIGHT);
-    evas_object_show(canvas);
-
-    return 0;
-
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::ShowClockHour
- *          show the clock's hour image on statubar
- *
- * @param[in]   tm                  time data
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoStatusBarControlWindow::ShowClockHour(struct tm *t_st)
-{
-    char file[ICO_SB_BUF_SIZE];
-    int ampm_index;
-
-    //AM or PM
-    if (t_st->tm_hour < ICO_SB_TIME_AMPM_THRESHOLD) {
-        ampm_index = ICO_SB_TIME_AM;
-    }
-    else {
-        ampm_index = ICO_SB_TIME_PM;
-    }
-    sprintf(file, "%s%s", respath,
-                time_data[ampm_index]->GetFileName());
-    evas_object_image_file_set(ampm, file, NULL);
-
-    //Hour
-    sprintf(file, "%s%s", respath,
-            time_data[(t_st->tm_hour % ICO_SB_TIME_AMPM_THRESHOLD) / 10]->GetFileName());
-    evas_object_image_file_set(hour1, file, NULL);
-
-    sprintf(file, "%s%s", respath,
-            time_data[(t_st->tm_hour % ICO_SB_TIME_AMPM_THRESHOLD) % 10]->GetFileName());
-    evas_object_image_file_set(hour2, file, NULL);
-
-    /*Makes the given Evas object visible*/
-    evas_object_show(ampm);
-    evas_object_show(hour1);
-    evas_object_show(hour2);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::ShowClockMinutes
- *          show the clock's minutes image on statubar
- *
- * @param[in]   tm                  time data
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoStatusBarControlWindow::ShowClockMinutes(struct tm *t_st)
-{
-    char file[ICO_SB_BUF_SIZE];
-    //Minute
-    sprintf(file, "%s%s", respath, time_data[t_st->tm_min / 10]->GetFileName());
-    evas_object_image_file_set(min1, file, NULL);
-    sprintf(file, "%s%s", respath, time_data[t_st->tm_min % 10]->GetFileName());
-    evas_object_image_file_set(min2, file, NULL);
-
-    /*Makes the given Evas object visible*/
-    evas_object_show(min1);
-    evas_object_show(min2);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::UpdateTime
- *          callback function called by Ecore.
- *          get time data, and show the clock's image on statubar.
- *
- * @param[in]   thread_data         user data
- * @return      call back setting
- * @retval      ECORE_CALLBACK_RENEW    set callback
- */
-/*--------------------------------------------------------------------------*/
-Eina_Bool
-CicoStatusBarControlWindow::UpdateTime(void *thread_data)
-{
-    time_t timer;
-    struct tm *t_st, *old_t_st;
-
-    old_t_st = &instance->latest_time;
-
-    /* get time */
-    time(&timer);
-    t_st = localtime(&timer);
-
-    if (old_t_st->tm_hour != t_st->tm_hour) {
-        /* hour file set */
-        instance->ShowClockHour(t_st);
-    }
-    if (old_t_st->tm_min != t_st->tm_min) {
-        /* min file set */
-        instance->ShowClockMinutes(t_st);
-    }
-    memcpy(old_t_st, t_st, sizeof(struct tm));
-
-    return ECORE_CALLBACK_RENEW;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::ShowClock
- *          show the clock's
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoStatusBarControlWindow::ShowClock(void)
-{
-    Evas_Object *colon;
-    time_t timer;
-    struct tm *t_st;
-    char file[ICO_SB_BUF_SIZE];
-    /* ... */
-    ampm = evas_object_image_filled_add(evas);
-    hour1 = evas_object_image_filled_add(evas);
-    hour2 = evas_object_image_filled_add(evas);
-    min1 = evas_object_image_filled_add(evas);
-    min2 = evas_object_image_filled_add(evas);
-    colon = evas_object_image_filled_add(evas);
-
-    /* This function will make layout change */
-    evas_object_move(ampm, moveH + ICO_SB_POS_AMPM_X, ICO_SB_POS_AMPM_Y);
-    evas_object_move(hour1, moveH + ICO_SB_POS_HOUR1_X, ICO_SB_POS_HOUR1_Y);
-    evas_object_move(hour2, moveH + ICO_SB_POS_HOUR2_X, ICO_SB_POS_HOUR2_Y);
-    evas_object_move(min1, moveH + ICO_SB_POS_MIN1_X, ICO_SB_POS_MIN1_Y);
-    evas_object_move(min2, moveH + ICO_SB_POS_MIN2_X, ICO_SB_POS_MIN2_Y);
-    evas_object_move(colon, moveH + ICO_SB_POS_COLON_X, ICO_SB_POS_COLON_Y);
-
-    /* This function will make size change of picture */
-    evas_object_resize(ampm, ICO_SB_SIZE_AMPM_W, ICO_SB_SIZE_AMPM_H);
-    evas_object_resize(hour1, ICO_SB_SIZE_NUM_W, ICO_SB_SIZE_NUM_H);
-    evas_object_resize(hour2, ICO_SB_SIZE_NUM_W, ICO_SB_SIZE_NUM_H);
-    evas_object_resize(min1, ICO_SB_SIZE_NUM_W, ICO_SB_SIZE_NUM_H);
-    evas_object_resize(min2, ICO_SB_SIZE_NUM_W, ICO_SB_SIZE_NUM_H);
-    evas_object_resize(colon, ICO_SB_SIZE_COLON_W, ICO_SB_SIZE_COLON_H);
-
-    /* Makes the given Evas object visible */
-    evas_object_show(ampm);
-    evas_object_show(hour1);
-    evas_object_show(hour2);
-    evas_object_show(min1);
-    evas_object_show(min2);
-    evas_object_show(colon);
-
-    /*first set*/
-    time(&timer);
-    t_st = localtime(&timer);
-    ShowClockHour(t_st);
-    ShowClockMinutes(t_st);
-
-    /* Set the image file */
-    for (int ii = 0; ii < ICO_SB_TIME_IMG_PARTS; ii++) {
-        time_data[ii]->SetTimeImg(evas_object_image_filled_add(evas));
-        sprintf(file, "%s%s", respath, time_data[ii]->GetFileName());
-        evas_object_image_file_set(time_data[ii]->GetTimeImg(), file, NULL);
-    }
-    sprintf(file, "%s%s", respath, fname_colon);
-    evas_object_image_file_set(colon, file, NULL);
-
-    ecore_timer_add(ICO_SB_TIMEOUT, UpdateTime, NULL);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarControlWindow::EvasObjectImageFileSetAndShow
- *          set the evas object image file and show it
- *
- * @param[in]   obj    evas object
- * @param[in]   img    image
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoStatusBarControlWindow::EvasObjectImageFileSetAndShow(Evas_Object *obj,char *icon)
-{
-    char img[256];
-
-    sprintf(img, icon, respath);
-    evas_object_image_file_set(obj, img, NULL);
-    evas_object_show(obj);
-}
-// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoStatusBarControlWindow.h b/src/statusbar/CicoStatusBarControlWindow.h
deleted file mode 100644 (file)
index 0f10fbd..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-#ifndef __CICOSTATUSBARCONTROLWINDOW_H__
-#define __CICOSTATUSBARCONTROLWINDOW_H__
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   window control for statusbar application
- *
- * @date    Feb-15-2013
- */
-#include <stdio.h>
-#include <time.h>
-#include <pthread.h>
-
-#include <Ecore.h>
-#include <Ecore_Wayland.h>
-#include <Ecore_Evas.h>
-
-
-//#include "CicoHomeScreenCommon.h"
-#include "CicoGKeyFileConfig.h"
-#include "CicoStatusBarTime.h"
-
-#define ICO_HS_CONFIG_ORIENTAION    "orientation"
-#define ICO_HS_SIZE_SB_HEIGHT        (64)
-#define ICO_HS_SIZE_LAYOUT_WIDTH     (768)
-#define ICO_HS_SIZE_LAYOUT_HEIGHT    (1024)
-
-/*============================================================================*/
-/* Define data types                                                          */
-/*============================================================================*/
-#define ICO_SB_TIME_AMPM_THRESHOLD (12)
-#define ICO_SB_TIME_AM        (10) /* f_name in sb_time_data */
-#define ICO_SB_TIME_PM        (11) /* f_name in sb_time_data */
-#define ICO_SB_TIME_IMG_PARTS (12) /* total counts of sb_time_data */
-#define ICO_SB_TIMEOUT        (0.2)
-
-#define ICO_SB_BUF_SIZE       (1024)
-#define ICO_SB_VERTICAL       (1)
-#define ICO_SB_HORIZONTAL     (2)
-
-#define ICO_SB_POS_Y          (0)
-#define ICO_SB_POS_COLON_X    (689)
-#define ICO_SB_POS_COLON_Y    (30 + ICO_SB_POS_Y)
-#define ICO_SB_POS_AMPM_X     (582)
-#define ICO_SB_POS_AMPM_Y     (27 + ICO_SB_POS_Y)
-#define ICO_SB_POS_HOUR1_X    (640)
-#define ICO_SB_POS_HOUR1_Y    (18 + ICO_SB_POS_Y)
-#define ICO_SB_POS_HOUR2_X    (662)
-#define ICO_SB_POS_HOUR2_Y    (18 + ICO_SB_POS_Y)
-#define ICO_SB_POS_MIN1_X     (703)
-#define ICO_SB_POS_MIN1_Y     (18 + ICO_SB_POS_Y)
-#define ICO_SB_POS_MIN2_X     (725)
-#define ICO_SB_POS_MIN2_Y     (18 + ICO_SB_POS_Y)
-
-#define ICO_SB_SIZE_SHTCT_W   (ICO_HS_SIZE_SB_HEIGHT)
-
-#define ICO_SB_POS_LIST_X     (ICO_HS_SIZE_SB_HEIGHT * 5)
-#define ICO_SB_POS_SHTCT1_X   (ICO_SB_POS_LIST_X + ICO_HS_SIZE_SB_HEIGHT + ICO_HS_SIZE_SB_HEIGHT * 2 / 2)
-#define ICO_SB_POS_SHTCT2_X   (ICO_SB_POS_SHTCT1_X + ICO_HS_SIZE_SB_HEIGHT + ICO_HS_SIZE_SB_HEIGHT * 1 / 2)
-
-#define ICO_SB_SIZE_COLON_W   (6)
-#define ICO_SB_SIZE_COLON_H   (17)
-#define ICO_SB_SIZE_NUM_W     (20)
-#define ICO_SB_SIZE_NUM_H     (30)
-#define ICO_SB_SIZE_AMPM_W    (47)
-#define ICO_SB_SIZE_AMPM_H    (27)
-
-#define ICO_SB_CHTCT_MAX      (5)
-
-#define ICO_SB_APPLIST_OFFICON "applist_off.png"
-#define ICO_SB_APPLIST_ONICON "applist_on.png"
-#define ICO_SB_HOME_OFFICON "home_off.png"
-#define ICO_SB_HOME_ONICON "home_on.png"
-
-/*============================================================================*/
-/* Class Declaration (CicoStatusBarControlWindow)                             */
-/*============================================================================*/
-class CicoStatusBarControlWindow
-{
-  public:
-    CicoStatusBarControlWindow();
-    ~CicoStatusBarControlWindow();
-
-    void Initialize(CicoGKeyFileConfig *homescreen_config_tmp);
-    void Finalize(void);
-    int CreateEcoreEvas(void);
-    static void StartEcoreLoop(void);
-    static void QuitEcoreLoop(Ecore_Evas *ee);
-    void ResizeWindow(int orientation);
-    void ShowWindow(void);
-    int InitEvas(void);
-    void ShowClock(void);
-    void ShowShortCut(void);
-    void ShowAppListIcon(void);
-    void ShowEscathion(void);
-    void EvasObjectImageFileSetAndShow(Evas_Object *obj,char *icon);
-    static void SetInstanceForClock(CicoStatusBarControlWindow *instance_tmp); 
-
-  private:
-    void ShowClockHour(struct tm *t_st);
-    void ShowClockMinutes(struct tm *t_st);
-    static Eina_Bool UpdateTime(void *thread_data);
-
-    CicoStatusBarTime *time_data[ICO_SB_TIME_IMG_PARTS];
-    static CicoStatusBarControlWindow *instance;
-    int width;
-    int moveH;
-    Ecore_Evas *window;
-    Evas *evas;
-    Eina_List *shtct_list;
-    Evas_Object *ampm;
-    Evas_Object *hour1;
-    Evas_Object *hour2;
-    Evas_Object *min1;
-    Evas_Object *min2;
-    char respath[ICO_SB_BUF_SIZE];
-    struct tm latest_time;
-    CicoGKeyFileConfig *homescreen_config;
-  protected:
-    CicoStatusBarControlWindow operator = (const CicoStatusBarControlWindow&);
-    CicoStatusBarControlWindow(const CicoStatusBarControlWindow&);
-};
-#endif
-// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoStatusBarTime.cpp b/src/statusbar/CicoStatusBarTime.cpp
deleted file mode 100644 (file)
index e56fda7..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   control time image for statusbar application
- *
- * @date    Feb-15-2013
- */
-#include "CicoStatusBarTime.h"
-
-/*============================================================================*/
-/* Functions Declaration (CicoStatusBarTime)                          */
-/*============================================================================*/
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarTime::CicoStatusBarTime
- *          constractor 
- *
- * @param[in]   none
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-CicoStatusBarTime::CicoStatusBarTime(const char *name)
-{
-    strcpy(fname,name);
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarTime::SetTimeImg
- *          set time image
- *
- * @param[in]   time_img_tmp    setting value
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoStatusBarTime::SetTimeImg(Evas_Object *time_img_tmp)
-{
-    time_img = time_img_tmp;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarTime::GetTimeImg
- *          get time image 
- *
- * @param[in]   none
- * @return      time image(Evas_Object)
- */
-/*--------------------------------------------------------------------------*/
-Evas_Object *
-CicoStatusBarTime::GetTimeImg(void)
-{
-    return time_img;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   CicoStatusBarTime::GetFileName
- *          get file name
- *
- * @param[in]   none
- * @return      filename
- */
-/*--------------------------------------------------------------------------*/
-char *
-CicoStatusBarTime::GetFileName(void)
-{
-    return fname;
-}
-// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoStatusBarTime.h b/src/statusbar/CicoStatusBarTime.h
deleted file mode 100644 (file)
index 1f8749b..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef __CICOSTATUSBARTIME_H__
-#define __CICOSTATUSBARTIME_H__
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   statusbar application
- *
- * @date    Feb-15-2013
- */
-#include <stdio.h>
-#include <time.h>
-
-#include <Ecore.h>
-#include <Ecore_Wayland.h>
-#include <Ecore_Evas.h>
-
-#include <ico_uws.h>
-
-/*============================================================================*/
-/* Define data types                                                          */
-/*============================================================================*/
-#define ICO_SB_IMAGE_FILE_PATH_LENGTH (64)
-
-/*============================================================================*/
-/* Class Declaration (CicoStatusBarTime)                                      */
-/*============================================================================*/
-class CicoStatusBarTime
-{
-  public:
-    CicoStatusBarTime(const char *name);
-    void SetTimeImg(Evas_Object *time_img_tmp);
-    Evas_Object * GetTimeImg(void);
-    char *GetFileName(void);
-  private:
-    char fname[ICO_SB_IMAGE_FILE_PATH_LENGTH];
-    Evas_Object *time_img;
-  protected:
-    CicoStatusBarTime operator = (const CicoStatusBarTime&);
-    CicoStatusBarTime(const CicoStatusBarTime&);
-};
-#endif
-// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/CicoWindowInterface.h b/src/statusbar/CicoWindowInterface.h
new file mode 100644 (file)
index 0000000..9ee3bbd
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoWindowInterface.h
+ *
+ *  @brief  This file is definition of CicoWindowInterface class
+ */
+//==========================================================================
+#ifndef CICO_WINDOW_INTERFACE_H_
+#define CICO_WINDOW_INTERFACE_H_
+
+//==========================================================================
+/**
+ *  @brief  This class provide the window interfaces
+ */
+//==========================================================================
+class CicoWindowInterface
+{
+public:
+    virtual bool Terminate(void) = 0;
+    virtual void Show(void) = 0;
+    virtual void Hide(void) = 0;
+    virtual void SetPos(int x, int y) = 0;
+    virtual void SetSize(int w, int h) = 0;
+};
+#endif  // __CICO_WINDOW_INTERFACE_H__
+// vim: set expandtab ts=4 sw=4:
index 12c9be3..51de669 100644 (file)
@@ -2,46 +2,53 @@ AM_CFLAGS = $(GCC_CFLAGS)
 AM_CPPFLAGS = $(GCC_CXXFLAGS)
 AM_CXXFLAGS = $(GCC_CXXFLAGS)
 
-COMMON_LIBS = -lm -lwebsockets -lico-uxf-weston-plugin -lsecurity-server-client
-
 noinst_PROGRAMS   = \
        StatusBar
 
 StatusBar_SOURCES = \
-       status_bar.cpp                                          \
-       CicoStatusBarControlWindow.cpp          \
-       CicoStatusBarTime.cpp
+       CicoCommonComponent.cpp                 \
+       CicoCommonModule.cpp                    \
+       CicoCommonWindow.cpp                    \
+       CicoModuleImplementation.cpp    \
+       CicoComponentImplementation.cpp \
+       CicoStatusBar.cpp                               \
+       CicoSBEFLApp.cpp                                \
+       main.cpp
 
 StatusBar_CFLAGS = \
+       @CAPIAPPFWAPPLICATION_CFLAGS@   \
        $(EFL_CFLAGS)   \
        $(OPT_CFLAGS)   \
-       $(WL_CFLAGS)    \
        $(AUL_CFLAGS)   \
        $(UWS_CFLAGS)   \
-       -I/usr/include/ico-uxf-weston-plugin \
+       $(NOTIFICATION_CFLAGS) \
        -I/usr/include/ico-util \
        -I../../include                 \
-       -I../../lib/common
+       -I../../lib/common      \
+       -I../../lib/notification
 
 StatusBar_CXXFLAGS = \
+       @CAPIAPPFWAPPLICATION_CFLAGS@   \
        $(EFL_CFLAGS)   \
        $(OPT_CFLAGS)   \
-       $(WL_CFLAGS)    \
        $(AUL_CFLAGS)   \
        $(UWS_CFLAGS)   \
-       -I/usr/include/ico-uxf-weston-plugin \
+       $(NOTIFICATION_CFLAGS) \
        -I/usr/include/ico-util \
        -I../../include                 \
-       -I../../lib/common
+       -I../../lib/common      \
+       -I../../lib/notification \
+       -std=c++11
 
 StatusBar_LDADD = \
        ../../lib/common/.libs/libico-common.a \
+       ../../lib/notification/.libs/libico-notification.a \
+       @CAPIAPPFWAPPLICATION_LIBS@     \
        $(EFL_LIBS)             \
        $(OPT_LIBS)             \
-       $(WL_LIBS)              \
-       $(COMMON_LIBS)  \
        $(AUL_LIBS)             \
-       $(UWS_LIBS)
+       $(UWS_LIBS)             \
+       $(NOTIFICATION_LIBS)
 
 CLEANFILES = $(BUILT_SOURCES)
 
diff --git a/src/statusbar/main.cpp b/src/statusbar/main.cpp
new file mode 100644 (file)
index 0000000..e18418c
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   statusbar_main.cpp
+ *
+ *  @brief  This file is implimantion of homescreen application main function
+ */
+//==========================================================================
+
+#include <unistd.h>
+#include <cstring>
+#include <iostream>
+#include <Eina.h>
+#include "ico_log.h"
+#include "CicoSBEFLApp.h"
+#include "CicoGKeyFileConfig.h"
+
+#define ICO_STATUSBAR_CONFIG_FILE   "statusbar.conf"
+#define ICO_CONFIG_LOG              "log"
+#define ICO_CONFIG_LOG_NAME         "filename"
+#define ICO_CONFIG_LOG_LEVEL        "loglevel"
+#define ICO_CONFIG_LOG_FLUSH        "logflush"
+#define ICO_CONFIG_LOG_ECORE        "ecorelog"
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  setup log
+ *  @param[in]  void 
+ *  @return     none
+ */
+//--------------------------------------------------------------------------
+void
+setupLog(void)
+{
+    /* init configuration */
+    CicoGKeyFileConfig config;
+    config.Initialize(ICO_STATUSBAR_CONFIG_FILE);
+
+    // ico log open
+    std::string name;
+    name = config.ConfigGetString(ICO_CONFIG_LOG,
+                                  ICO_CONFIG_LOG_NAME,
+                                  "StatusBar");
+    ico_log_open(name.c_str());
+
+
+    // ico log level
+    int log_level = 0;
+    std::string level = config.ConfigGetString(ICO_CONFIG_LOG,
+                                               ICO_CONFIG_LOG_LEVEL,
+                                               "all");
+
+    if (NULL != strstr(level.c_str(), "performance")) {
+        log_level |= ICO_LOG_LVL_PRF;
+    }
+
+    if (NULL != strstr(level.c_str(), "trace")) {
+        log_level |= ICO_LOG_LVL_TRA;
+    }
+
+    if (NULL != strstr(level.c_str(), "debug")) {
+        log_level |= ICO_LOG_LVL_DBG;
+    }
+
+    if (NULL != strstr(level.c_str(), "info")) {
+        log_level |= ICO_LOG_LVL_INF;
+    }
+
+    if (NULL != strstr(level.c_str(), "warning")) {
+        log_level |= ICO_LOG_LVL_WRN;
+    }
+
+    if (NULL != strstr(level.c_str(), "critical")) {
+        log_level |= ICO_LOG_LVL_CRI;
+    }
+
+    if (NULL != strstr(level.c_str(), "error")) {
+        log_level |= ICO_LOG_LVL_ERR;
+    }
+
+    std::string flush = config.ConfigGetString(ICO_CONFIG_LOG,
+                                               ICO_CONFIG_LOG_FLUSH,
+                                               "on");
+    if (NULL != strstr(flush.c_str(), "on")) {
+        log_level |= ICO_LOG_FLUSH;
+    }
+    else {
+        log_level |= ICO_LOG_NOFLUSH;
+    }
+
+    if (NULL != strstr(level.c_str(), "none")) {
+        ico_log_set_level(0);
+    }
+    else if (NULL == strstr(level.c_str(), "all")) {
+        ico_log_set_level(log_level);
+    }
+
+    // eocre log print
+    std::string ecore = config.ConfigGetString(ICO_CONFIG_LOG,
+                                               ICO_CONFIG_LOG_ECORE,
+                                               "on");
+    if (NULL != strstr(ecore.c_str(), "on")) {
+        eina_init();
+        eina_log_level_set(EINA_LOG_LEVEL_DBG);
+    }
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief   status bar main 
+ *
+ *  @param [in] argc    counts of argment
+ *  @param [in] argv    argment
+ *  @return     result
+ *  @retval     0       success
+ *  @retval     -1      error
+ */
+//--------------------------------------------------------------------------
+int
+main(int argc, char *argv[])
+{
+    try {
+        printf("=== start Status Bar main entry\n");
+        // setupLog
+        setupLog();
+        ICO_INF( "START_MODULE StatusBar");
+
+        // start homescreen
+        CicoSBEFLApp sbEFLApp;
+        int ret = sbEFLApp.start(argc, argv);
+
+        ICO_DBG("ret = %d error=%s", ret, sbEFLApp.appfwErrorToString(ret));
+    }
+    catch (const std::exception& e) {
+        std::cerr << e.what() << std::endl;
+        ICO_ERR("main: catch exception [%s]", e.what());
+        return -1;
+    }
+    catch (const std::string& str) {
+        std::cerr << str << std::endl;
+        ICO_ERR("main: catch exception [%s]", str.c_str());
+        return -1;
+    }
+    catch (...) {
+        ICO_ERR("main: catch exception unknown");
+        return -1;
+    }
+    ICO_INF( "END_MODULE StatusBar" );
+
+    return 0;
+}
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/status_bar.cpp b/src/statusbar/status_bar.cpp
deleted file mode 100644 (file)
index 7972050..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   statusbar application
- *
- * @date    Feb-15-2013
- */
-
-#include <stdio.h>
-#include <time.h>
-#include <pthread.h>
-
-#include <bundle.h>
-
-#include <ico_log.h>
-
-//#include "CicoHomeScreenCommon.h"
-#include "CicoGKeyFileConfig.h"
-#include "CicoStatusBarControlWindow.h"
-
-
-//#include "status_bar.h"
-
-#define ICO_SB_APPID_DEFAULT    "org.tizen.ico.statusbar"
-
-/*--------------------------------------------------------------------------*/
-/*
- * @brief   status bar application
- *          main routine
- *
- * @param   main() finction's standard parameter (argc,argv)
- * @return  result
- * @retval  0       success
- * @retval  1       failed
- */
-/*--------------------------------------------------------------------------*/
-int
-main(int argc, char *argv[])
-{
-    int orientation = ICO_SB_HORIZONTAL;
-    int ret;
-    bundle *b;
-    const char *val;
-
-    /* log setting */
-    if (getenv("PKG_NAME")) {
-        ico_log_open(getenv("PKG_NAME"));
-    }
-    else {
-        ico_log_open(ICO_SB_APPID_DEFAULT);
-    }
-    ICO_INF("START_MODULE Status Bar");
-
-    /* get argment */
-    b = bundle_import_from_argv(argc, argv);
-    val = bundle_get_val(b, "orientation");
-    if (val != NULL) {
-        if (strcmp(val, "vertical") == 0) {
-            orientation = ICO_SB_VERTICAL;
-        }
-        else if (strcmp(val, "horizontal") == 0) {
-            orientation = ICO_SB_HORIZONTAL;
-        }
-    }
-
-    orientation = ICO_SB_VERTICAL;
-
-    /*HomeScreenConfig*/
-    CicoGKeyFileConfig *homescreen_config = new CicoGKeyFileConfig();
-    homescreen_config->Initialize(ICO_STATUSBAR_CONFIG_FILE);
-
-    /* controlWindow instance */
-    CicoStatusBarControlWindow* control_window = 
-                                new CicoStatusBarControlWindow();
-    control_window->Initialize(homescreen_config);
-    CicoStatusBarControlWindow::SetInstanceForClock(control_window);
-
-    ret=control_window->CreateEcoreEvas();
-    if(ret < 0){
-        ICO_WRN("status_bar: error use ecore")
-        return -1;
-    }
-
-    /* resize window*/
-    control_window->ResizeWindow(orientation);  
-   
-    /* show window*/
-    control_window->ShowWindow();
-   
-    /* init evas*/
-    ret  = control_window->InitEvas();
-    if(ret < 0){
-        return -1;
-    }
-
-    /* status bar parts set*/
-    /* clock */
-    control_window->ShowClock();
-
-    /* Init websockets */
-    
-    /* Runs the application main loop */
-    control_window->StartEcoreLoop();
-  
-    /* initialize CicoStatusBarAction */
-    
-    /* delete control window*/
-    control_window->Finalize();
-    delete control_window;
-
-    /*delete homescreen config*/
-    delete homescreen_config;
-    ICO_INF("END_MODULE Status Bar");
-    
-    return 0;
-}
-// vim: set expandtab ts=4 sw=4:
diff --git a/src/statusbar/status_bar.h b/src/statusbar/status_bar.h
deleted file mode 100644 (file)
index 0805917..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef __STATUS_BAR_H__
-#define __STATUS_BAR_H__
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0.  The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief   statusbar application
- *
- * @date    Feb-15-2013
- */
-#include <stdio.h>
-#include <time.h>
-#include <pthread.h>
-
-#include <bundle.h>
-
-#include <ico_log.h>
-
-//#include "CicoHomeScreenCommon.h"
-#include "CicoGKeyFileConfig.h"
-#include "CicoStatusBarControlWindow.h"
-
-#endif
-// vim: set expandtab ts=4 sw=4:
index af6c75d..dd07f07 100644 (file)
@@ -3,4 +3,5 @@
 #   homescreen
 
 SUBDIRS=\
-   system-controller
+       system-controller \
+       statusbar
diff --git a/tests/statusbar/Makefile.am b/tests/statusbar/Makefile.am
new file mode 100644 (file)
index 0000000..19d87ac
--- /dev/null
@@ -0,0 +1,18 @@
+AM_CFLAGS = $(GCC_CFLAGS)
+AM_CPPFLAGS = $(GCC_CXXFLAGS)
+
+noinst_PROGRAMS = \
+       ico_send_notification
+
+check_PROGRAMS =       \
+       ico_send_notification
+
+ico_send_notification_SOURCES = \
+       send_notification.cpp
+
+ico_send_notification_CXXFLAGS = \
+       $(NOTIFICATION_CFLAGS)
+
+ico_send_notification_LDADD = \
+       $(NOTIFICATION_LIBS)
+       
diff --git a/tests/statusbar/send_notification.cpp b/tests/statusbar/send_notification.cpp
new file mode 100644 (file)
index 0000000..7d7d957
--- /dev/null
@@ -0,0 +1,95 @@
+#include <iostream>
+#include "notification.h"
+using namespace std;
+
+int main(){
+    cout << "Notification TestProgram Start=========" <<endl;
+
+    // notification variable declaration
+    notification_h noti = NULL;
+    notification_type_e type_ = NOTIFICATION_TYPE_NONE;
+    notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+    // Initialize
+    notification_get_type(noti, &type_);
+    noti = notification_new(NOTIFICATION_TYPE_NOTI,
+                                NOTIFICATION_GROUP_ID_NONE,
+                                NOTIFICATION_PRIV_ID_NONE);
+    if (NULL == noti) {
+        cout << "notification_new() failed" << endl;
+        return -1;
+    }
+
+#if 0
+    notification_list_h noti_list = NULL;
+    notification_get_list(NOTIFICATION_TYPE_NOTI, -1, &noti_list);
+    if (noti_err != NOTIFICATION_ERROR_NONE) {
+            cout << "Failed to get notificationList <error code>:"<< noti_err<<endl;
+            return -1;
+         }
+    if(!noti_list){ 
+        cout <<"Nothing NotificationList" <<endl;
+        return -1;  
+    }
+#endif
+
+    //set Pkgname
+    noti_err = notification_set_pkgname(noti,"org.tizen.dialer");
+    if (noti_err != NOTIFICATION_ERROR_NONE) {
+        cout << "Failed to set Pkgname <error code>:"<< noti_err<<endl;
+        return -1;
+    }
+
+    //set Title 
+    noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE,
+                                             "TESTaaaaaaaaaaaaaaa",
+                                             NULL,
+                                             NOTIFICATION_VARIABLE_TYPE_NONE);
+    if (noti_err != NOTIFICATION_ERROR_NONE) {
+            cout << "Failed to set notification title <error code>:"<< noti_err<<endl;
+            return -1;
+    }
+
+    //set Content
+    noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT,
+                                             "ContentAAAAAAAAAAAAAAA",
+                                             NULL,
+                                             NOTIFICATION_VARIABLE_TYPE_NONE);
+    if (noti_err != NOTIFICATION_ERROR_NONE) {
+        cout << "Failed to set notification content <error code>:"<< noti_err<<endl;
+        return -1;
+    }
+
+
+    //set Icon_path 
+    noti_err = notification_set_icon(noti, "/opt/usr/apps/lYjFlj49Q4/res/wgt/saythis.png");
+    if (noti_err != NOTIFICATION_ERROR_NONE) {
+        cout <<"Failed to set icon_path <error code>:"<< noti_err <<endl;
+        return -1;
+    }
+
+    //insert to DB and appear on the notification_area
+    //noti_err = notification_update(noti);
+    noti_err = notification_insert(noti,NULL);
+    if (noti_err != NOTIFICATION_ERROR_NONE) {
+        if(noti_err == NOTIFICATION_ERROR_INVALID_DATA){
+            cout << "Invalid parameter"<<endl;
+        }
+
+        cout <<"Failed to insert notification <error code>:"<< noti_err <<endl;
+        cout <<"please start notification.service" <<endl;
+        return -1;
+    }
+
+    //free to notification
+    noti_err = notification_free(noti);
+    if (noti_err != NOTIFICATION_ERROR_NONE) {
+        cout <<"Failed to free notification <error code>:"<< noti_err <<endl;
+            return -1;
+    }
+
+    cout << "Notification_TestProgram End!=========" <<endl;
+    return 0;
+
+}
+
index e1214f6..400921d 100755 (executable)
@@ -28,6 +28,9 @@ stamp-h1 \
 ./lib/system-controller/.deps \
 ./lib/system-controller/Makefile \
 ./lib/system-controller/Makefile.in \
+./lib/notification/.deps \
+./lib/notification/Makefile \
+./lib/notification/Makefile.in \
 ./lib/apps-framework/.deps \
 ./lib/apps-framework/Makefile \
 ./lib/apps-framework/Makefile.in \
@@ -48,11 +51,17 @@ stamp-h1 \
 ./src/statusbar/.deps \
 ./src/statusbar/Makefile \
 ./src/statusbar/Makefile.in \
+./src/onscreen/.deps \
+./src/onscreen/Makefile \
+./src/onscreen/Makefile.in \
 ./src/syscond/.deps \
 ./src/syscond/Makefile \
 ./src/syscond/Makefile.in \
 ./tests/Makefile \
 ./tests/Makefile.in \
+./tests/statusbar/.deps \
+./tests/statusbar/Makefile \
+./tests/statusbar/Makefile.in \
 ./tests/system-controller/Makefile \
 ./tests/system-controller/Makefile.in \
 ./tests/system-controller/apps-framework/result \