Update change log and spec for wrt-plugins-tizen_0.4.58
[platform/framework/web/wrt-plugins-tizen.git] / src / Notification / StatusNotification.cpp
index 8a9d3eb..6e57f94 100755 (executable)
 // limitations under the License.
 //
 
-#include <cassert>
-#include <Commons/Exception.h>
+#include <PlatformException.h>
+#include <Logger.h>
 #include <sstream>
-#include <notification.h>
 #include <appsvc/appsvc.h>
-#include "StatusNotification.h"
-#include <FilesystemUtils.h>
+#include <sstream>
 
+#include <boost/algorithm/string.hpp>
+#include "StatusNotification.h"
 
 namespace DeviceAPI {
-namespace Notification{
+namespace Notification {
 
 #define DEFAULT_ICON_PATH "/opt/share/icons/default/"
-#define MAX_NOTIFICATION_LINE_LENGTH 2
+#define MAX_NOTIFICATION_DETAIL_INFO_LENGTH 2
 #define MAX_THUMBNAIL_LENGTH 4
 
 extern "C" int service_create_event(bundle *data, struct service_s **service);
-extern "C" int service_to_bundle(service_h service, bundle **data);
+//tern "C" int service_to_bundle(service_h service, bundle **data);
 
-#if 0
-static void service_bundle_iterator(const char *key, const int type, const bundle_keyval_t *kv, void *user_data)
+//callback functions.
+static bool service_extra_data_cb(service_h service, const char *key, void *user_data)
 {
-       service_h service = (service_h)user_data;
-       LogDebug("key = " << key);
-       LogDebug(" type = " << type);
-       void *basic_val = NULL;
-       size_t basic_size = 0;
-       
-       if (bundle_keyval_type_is_array((bundle_keyval_t*)kv))
-       {
-               LogDebug("Array");
-       }
-       else
-       {
-               bundle_keyval_get_basic_val((bundle_keyval_t*)kv, &basic_val, &basic_size);
-               
-               service_add_extra_data(service, key, );
+       LoggerI("OK");
+       char **value = NULL;
+       int length = 0;
+
+       if (user_data != NULL && key != NULL)
+       {       
+               LoggerI("user data & key is existed");
+
+               DeviceAPI::Application::ApplicationControlPtr* appControl = 
+                       (DeviceAPI::Application::ApplicationControlPtr*)(user_data);
+
+               DeviceAPI::Application::ApplicationControlDataPtr data(new DeviceAPI::Application::ApplicationControlData());
+               LoggerI("key = " << key);
+               std::string keyStr = key;
+               std::vector<std::string> keyValue;
+               int index = 0;
+
+               if (service_get_extra_data_array((*appControl)->getService_h(), key, &value, &length) == SERVICE_ERROR_NONE)
+               {
+                       LoggerI("extra_data_array length = " << length);
+                       
+                       if (value != NULL && length != 0)
+                       {
+                               LoggerI("extra_data_length = " << length);
+                               data->setKey(key);
+                               for (index = 0; index < length; index++)
+                               {
+                                       LoggerI("Value=" << value[index]);
+                                       keyValue.push_back(value[index]);
+                               }
+                               
+                               data->setValue(keyValue);
+                               (*appControl)->addAppControlData(data);
+                       }
+                       
+                       if(value)
+                               free(value);
+               }
        }
+       return true;
 }
-#endif
 
 StatusNotification::StatusNotification(NotificationType statusType) :
+       m_notiType(NOTI_TYPE_NONE),
        m_service(NULL),
        m_notiHandle(NULL),
-       m_lines(NULL)
-{      
-       notification_type_e type = NOTIFICATION_TYPE_NONE;
+       m_progressType(NOTI_PROGRESS_TYPE_PERCENTAGE),
+       m_notiUpdated(false),
+       m_launchFlag(false)
+{
+       LoggerI("statusType =" << statusType);
 
-       LogDebug("statusType =" << statusType);
+       notification_type_e type = NOTIFICATION_TYPE_NONE;
        setNotiType(statusType);
-       
+
        if (statusType == NOTI_TYPE_SIMPLE || statusType == NOTI_TYPE_MUTIPLE || statusType == NOTI_TYPE_THUMBNAIL)
        {
                type = NOTIFICATION_TYPE_NOTI;
@@ -76,48 +102,62 @@ StatusNotification::StatusNotification(NotificationType statusType) :
        }
        else
        {
-               LogDebug(" invalide noti type");
-               ThrowMsg(WrtDeviceApis::Commons::PlatformException, "Error : noti type");
+               LoggerI(" invalide noti type");
+               throw TypeMismatchException("value is not notification type");
        }
 
-       setProgressType(NOTI_PROGRESS_TYPE_PERCENTAGE); //default
-       
-       LogDebug("Notification Type : " << type);
-       
-       notification_h noti = NULL;
-       noti = notification_create(type);       //create notificatin.
+       //setProgressType(NOTI_PROGRESS_TYPE_PERCENTAGE);       //default
+
+       LoggerI("Notification Type : " << type);
+
+       notification_h noti = notification_create(type);        //create notificatin.
        if ( noti )
        {
-               LogDebug("noti =" << noti);
+               LoggerI("noti =" << noti);
                setNotificationHandle((void*)noti);
-               setNotificationState(NOTI_STATE_CREATED);
-               if ( statusType == NOTI_TYPE_PROGRESS)
-               {
-                       notification_update_progress(noti, NOTIFICATION_PRIV_ID_NONE, getProgressValue());
+
+               if (NOTIFICATION_TYPE_ONGOING ==  type)
+               {       //ongoing no ticker.
+                       LoggerI("ongoing type");
+                       if ( NOTIFICATION_ERROR_NONE != notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY |NOTIFICATION_DISPLAY_APP_INDICATOR ))
+                       {
+                               throw UnknownException("can't set notification display applist");
+                       }
                }
-       }
-       m_lines = NotificationLineArrayPtr(new NotificationLineArray());
-       m_thumbs = StringArrayPtr(new StringArray());
                
+       }
+       else
+       {
+               throw UnknownException("can't make new notification object");
+       }
+       
+       //m_detailInfos = new std::vector<NotificationDetailInfo*>();   
+       //m_thumbs = new std::vector<std::string>();
+       
 }
 
 StatusNotification::StatusNotification(void* noti) :
+       m_notiType(NOTI_TYPE_NONE),
        m_service(NULL),
        m_notiHandle(NULL),
-       m_lines(NULL)
+       m_progressType(NOTI_PROGRESS_TYPE_PERCENTAGE),
+       m_notiUpdated(false),
+       m_launchFlag(false)
 {
-       LogDebug("noti : " << noti);
-       notification_h notification = (notification_h)noti;
+       LoggerI("noti : " << noti);
        
+       notification_h notification = (notification_h)noti;
+
        if ( notification )
        {
-               NotificationType type = NOTI_TYPE_NONE; 
+               NotificationType type = NOTI_TYPE_NONE;
                notification_type_e noti_type = NOTIFICATION_TYPE_NONE;
                notification_ly_type_e noti_layout = NOTIFICATION_LY_NONE;
-               
+
                notification_get_type(notification, &noti_type);
                notification_get_layout(notification, &noti_layout);
-               
+
+               //get type.
                if ( noti_type == NOTIFICATION_TYPE_NOTI )
                {
                        if ( noti_layout == NOTIFICATION_LY_NOTI_EVENT_SINGLE || 
@@ -142,57 +182,77 @@ StatusNotification::StatusNotification(void* noti) :
                        }
                }
 
-               LogDebug(" notification type  =" << type);
+               LoggerI(" notification type  =" << type);
                setNotiType(type);
-               setProgressType(NOTI_PROGRESS_TYPE_PERCENTAGE); //default.      
+               //setProgressType(NOTI_PROGRESS_TYPE_PERCENTAGE); //default.
+               //read Progress type value.
+               char *strProgressType = NULL;
+               if (NOTIFICATION_ERROR_NONE == notification_get_image(notification, NOTIFICATION_IMAGE_TYPE_LIST_5,  &strProgressType))
+               {
+                       if ( strProgressType )
+                       {
+                               std::string notiProgressType(strProgressType);
+                               if( notiProgressType.compare(TIZEN_NOTIFICATION_PROGRESS_TYPE_BYTE) == 0)
+                                       m_progressType = NOTI_PROGRESS_TYPE_SIZE;
+                       }
+               }
+               
                setNotificationHandle((void*)notification);
+               loadThumbnails();
+               loadDetailInfos();
 
-               m_lines = NotificationLineArrayPtr(new NotificationLineArray());
-               m_thumbs = StringArrayPtr(new StringArray());
-
-               setNotificationLines();
-               setNotificationState(NOTI_STATE_CREATED);
-
-                if ( type  == NOTI_TYPE_PROGRESS)
+#if 0
+                if ( type  == NOTI_TYPE_PROGRESS)
                 {
                         notification_update_progress(notification, NOTIFICATION_PRIV_ID_NONE, getProgressValue());
                 }
-
+#endif
                //service
                bundle *bSvc = NULL;
 
                int ret =  notification_get_execute_option(notification, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, &bSvc);
-               LogDebug("ret = " << ret); 
+               LoggerI("ret = " << ret); 
                if (ret == NOTIFICATION_ERROR_NONE)
-               //if ( notification_get_execute_option(notification, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, &bSvc) == NOTIFICATION_ERROR_NONE)
                {
-                       LogDebug(" bundle = " << bSvc);
+                       LoggerI(" bundle = " << bSvc);
                        if (bSvc)
                        {
-                               LogDebug("bundle is valid");    
+                               LoggerI("bundle is valid");     
                                int ret = service_create_event(bSvc, &m_service);
                                if (ret != SERVICE_ERROR_NONE)
                                {
-                                       LogDebug("Service Create Event Error");
-                                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service creation error");
+                                       LoggerI("Service Create Event Error");
+                                       throw UnknownException("can't make service object");
                                }
-
-                               bundle_free(bSvc); //bundle free
                        }
                }
+               else
+               {
+                       notification_free(notification);
+                       throw UnknownException("can't get service data");
+               }
+               
+       }
+       else
+       {
+               throw InvalidValuesException("It is not notification object.");
        }
+       
 }
 
 StatusNotification::StatusNotification(int privID) :
-               m_service(NULL),
-               m_notiHandle(NULL),
-               m_lines(NULL)
+       m_notiType(NOTI_TYPE_NONE),
+       m_service(NULL),
+       m_notiHandle(NULL),
+       m_progressType(NOTI_PROGRESS_TYPE_PERCENTAGE),
+       m_notiUpdated(false),
+       m_launchFlag(false)
 {
-       LogDebug("priv ID : " << privID);
-       
-       notification_h notification = notification_load( NULL, privID);
-       LogDebug(" notification " << notification);
-       
+       LoggerI("priv ID : " << privID);
+
+       notification_h notification = notification_load( NULL, privID); //load notification.
+       LoggerI(" notification " << notification);
+
        if ( notification )
        {
                NotificationType type = NOTI_TYPE_NONE; 
@@ -226,155 +286,150 @@ StatusNotification::StatusNotification(int privID) :
                        }
                }
 
-               LogDebug(" notification type  =" << type);
+               LoggerI(" notification type  =" << type);
                setNotiType(type);
-               setProgressType(NOTI_PROGRESS_TYPE_PERCENTAGE); //default.      
+               //setProgressType(NOTI_PROGRESS_TYPE_PERCENTAGE); //default.
+               //read Progress type value.
+               char *strProgressType = NULL;
+               if (NOTIFICATION_ERROR_NONE == notification_get_image(notification, NOTIFICATION_IMAGE_TYPE_LIST_5,  &strProgressType))
+               {
+                       if ( strProgressType )
+                       {
+                               std::string notiProgressType(strProgressType);
+                               if( notiProgressType.compare(TIZEN_NOTIFICATION_PROGRESS_TYPE_BYTE) == 0)
+                                       m_progressType = NOTI_PROGRESS_TYPE_SIZE;
+                       }
+               }
+               
                setNotificationHandle((void*)notification);
-
-               m_lines = NotificationLineArrayPtr(new NotificationLineArray());
-               m_thumbs = StringArrayPtr(new StringArray());
-
-               setNotificationLines();
-               setNotificationState(NOTI_STATE_CREATED);
-
+               loadThumbnails();
+               loadDetailInfos();
+#if 0
+                if ( type  == NOTI_TYPE_PROGRESS)
+                {
+                        notification_update_progress(notification, NOTIFICATION_PRIV_ID_NONE, getProgressValue());
+                }
+#endif
                //service
                bundle *bSvc = NULL;
 
                int ret =  notification_get_execute_option(notification, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, &bSvc);
-               LogDebug("ret = " << ret); 
+               LoggerI("ret = " << ret); 
                if (ret == NOTIFICATION_ERROR_NONE)
-               //if ( notification_get_execute_option(notification, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, &bSvc) == NOTIFICATION_ERROR_NONE)
                {
-                       LogDebug(" bundle = " << bSvc);
+                       LoggerI(" bundle = " << bSvc);
                        if (bSvc)
                        {
-                               LogDebug("bundle is valid");    
+                               LoggerI("bundle is valid");     
                                int ret = service_create_event(bSvc, &m_service);
                                if (ret != SERVICE_ERROR_NONE)
                                {
-                                       LogDebug("Service Create Event Error");
-                                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service creation error");
+                                       LoggerI("Service Create Event Error");
+                                       throw UnknownException("can't make service object");
                                }
-                               
-                               //bundle_free(bSvc); //bundle free
                        }
                }
+               else
+               {
+                       notification_free(notification);
+                       throw UnknownException("can't get service data");
+               }
+               
        }
        else
        {
-               LogDebug(" can't find notification");
-               ThrowMsg(WrtDeviceApis::Commons::NotFoundException, "Can't find noti");
+               throw NotFoundException("It is not notification ID or removed notification");
        }
        
 }
 
-
 StatusNotification::~StatusNotification() 
 {
-       LogDebug(" notification = " << m_notiHandle);
+       LoggerI(" notification = " << m_notiHandle);
 
+       //clear thumbnail.
+       //clearDetailInfos();
+       
        if (m_notiHandle)
        {
-               if (notification_free(m_notiHandle) != NOTIFICATION_ERROR_NONE)
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification title error");
-               }
-
-#if 0
-               LogDebug(" service = " << m_service);
+               LoggerI(" service = " << m_service);
                if (m_service != NULL)
                {
                        service_destroy(m_service);
                        m_service = NULL;
                }
-#endif
+
+               if (notification_free(m_notiHandle) != NOTIFICATION_ERROR_NONE)
+               {
+                       throw UnknownException("notification free failed...");
+               }
+               
                m_notiHandle = NULL;
        }
 }
 
-namespace {
-       
-static bool service_extra_data_cb(service_h service, const char *key, void *user_data)
+int StatusNotification::getID()
 {
-       LogDebug("OK");
-       char **value = NULL;
-       int length = 0;
-
-       if (user_data != NULL && key != NULL)
-       {       
-               LogDebug("user data & key is existed");
-
-               DeviceAPI::Application::ApplicationControlPtr* appControl = 
-                       (DeviceAPI::Application::ApplicationControlPtr*)(user_data);
-
-               DeviceAPI::Application::ApplicationControlDataPtr data(new DeviceAPI::Application::ApplicationControlData());
-               LogDebug("key = " << key);
-               std::string keyStr = key;
-               std::vector<std::string> keyValue;
-               int index = 0;
-
-               if (service_get_extra_data_array((*appControl)->getService_h(), key, &value, &length) == SERVICE_ERROR_NONE)
-               {
-                       LogDebug("extra_data_array length = " << length);
-                       
-                       if (value != NULL && length != 0)
-                       {
-                               LogDebug("extra_data_length = " << length);
-                               data->setKey(key);
-                               for (index = 0; index < length; index++)
-                               {
-                                       LogDebug("Value=" << value[index]);
-                                       keyValue.push_back(value[index]);
-                               }
-                               
-                               data->setValue(keyValue);
-                               (*appControl)->addAppControlData(data);
-                       }
-                       
-                       if(value)
-                               free(value);
-               }
+       int id = -1;    // notification not inserted yet.
+       if (m_notiHandle)
+       {
+               notification_get_id(m_notiHandle, NULL, &id);
        }
-       return true;
+
+       return id;
 }
 
-static bool service_extra_data_delete_cb(service_h service, const char *key, void *user_data)
+std::string StatusNotification::getStatusType()
 {
-       LogDebug("OK");
-       if (key != NULL)
-       {       
-               LogDebug("del key = " << key);
-               
-               if (service_remove_extra_data(service, key) != SERVICE_ERROR_NONE)
-               {
-                       LogDebug("remove extra data failed");
-                       return false;
-               }
+       std::string type;
+       
+       if ( NOTI_TYPE_SIMPLE ==  getNotiType())
+       {
+               type = "SIMPLE";
+       }
+       else if ( NOTI_TYPE_ONGOING ==  getNotiType())
+       {
+               type = "ONGOING";
+       }
+       else if ( NOTI_TYPE_PROGRESS ==  getNotiType())
+       {
+               type = "PROGRESS"; 
+       }
+       else if ( NOTI_TYPE_THUMBNAIL ==  getNotiType())
+       {
+               type = "THUMBNAIL"; 
        }
-       return true;
-}
 
+       return type;
+               
+}
 
 
-}//namespace
 
-int StatusNotification::getID()
+void StatusNotification::setStatusType(std::string type)
 {
-       if (m_notiHandle)
-       {
-               int id = 0;
-               notification_get_id(m_notiHandle, NULL, &id);
-               return id;
-       }
+       LoggerI("type = " << type);
+       
+       NotificationType notiType = NOTI_TYPE_NONE; 
+       
+       if( type.compare(TIZEN_STATUS_NOTIFICATION_TYPE_SIMPLE) == 0)
+               notiType = NOTI_TYPE_SIMPLE;
+       else if( type.compare(TIZEN_STATUS_NOTIFICATION_TYPE_THUMBNAIL) == 0)
+               notiType = NOTI_TYPE_THUMBNAIL;
+       else if( type.compare(TIZEN_STATUS_NOTIFICATION_TYPE_ONGOING) == 0)
+               notiType = NOTI_TYPE_ONGOING;    
+       else if( type.compare(TIZEN_STATUS_NOTIFICATION_TYPE_PROGRESS) == 0)
+               notiType = NOTI_TYPE_PROGRESS;
        else
-       {
-               return -1;      // notification not inserted yet.
-       }
+       throw InvalidValuesException("Invalid Status Type.");
+
+       LoggerI("Notification type = " << notiType);
+       setNotiType(notiType);
 }
 
 time_t StatusNotification::getPostedTime()
 {
-       LogDebug("get m_notiHandle = " << m_notiHandle);
+       LoggerI("get m_notiHandle = " << m_notiHandle);
        
        time_t postedTime = 0;
        
@@ -382,11 +437,11 @@ time_t StatusNotification::getPostedTime()
        {                       
                if (notification_get_insert_time(m_notiHandle, &postedTime) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification posted time error");
+                       throw UnknownException("get notification posted time error");
                }
        }
        
-       LogDebug("posted Time =" << ctime(&postedTime));
+       LoggerI("posted Time =" << ctime(&postedTime));
        return postedTime;
 }
 
@@ -398,81 +453,105 @@ std::string StatusNotification::getTitle()
        
                if (notification_get_text(m_notiHandle,NOTIFICATION_TEXT_TYPE_TITLE, &title) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification title error");
+                       throw UnknownException("get notification title error");
+               }
+
+               std::string notiTitle;
+               if (title)
+               {               
+                       notiTitle = title;
+                       LoggerI(" get title : " << title);
                }
 
-               std::string notiTitle(title);
-               return notiTitle;               
+               return notiTitle;       
        }
        else
        {
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               throw UnknownException("notification handle is null");
        }
 }
 
 void StatusNotification::setTitle(std::string title)
 {
-       LogDebug("Title : " << title);
+       LoggerI("Title : " << title);
        if (m_notiHandle)
        {
-               LogDebug("get Title : " << getTitle());
+               LoggerI("get Title : " << getTitle());
                if((getTitle()).compare(title)) //different value.
                {
                        if (notification_set_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_TITLE, title.c_str(), 
                                NULL, NOTIFICATION_VARIABLE_TYPE_NONE ) != NOTIFICATION_ERROR_NONE)
                        {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification title error");
+                               throw UnknownException("set notification title error");
                        }
                        
                        setUpdatedFlag(true);
                }
                else
                {
-                       LogDebug(" title = " << title << " getTitle = " << getTitle());
+                       LoggerI(" title = " << title << " getTitle = " << getTitle());
                }
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException("notification handle is null");
        }
 }
 
 std::string StatusNotification::getContent()
 {
-       LogDebug("get Content : " << m_notiHandle);
+       LoggerI("get Content handle: " << m_notiHandle);
        if (m_notiHandle)
        {
                char *content = NULL;
 
                if (notification_get_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_CONTENT, &content) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification Content error");
+                       throw UnknownException("get notification Content error");
                }
                
-               LogDebug(" get Content : " << content);
+               std::string notiContent;
                
                if(content)
                {
-                       std::string notiContent(content);
-                       return notiContent;             
+                       notiContent = content;
+                       LoggerI(" get Content : " << content);
                }
-               else
+
+               return notiContent;
+               
+       }
+       else
+       {
+               throw UnknownException("notification handle is null");
+       }
+       
+}
+
+char* StatusNotification::getStrContent()
+{
+       LoggerI("get Content handle: " << m_notiHandle);
+       if (m_notiHandle)
+       {
+               char *content = NULL;
+
+               if (notification_get_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_CONTENT, &content) != NOTIFICATION_ERROR_NONE)
                {
-                       return std::string("");
+                       throw UnknownException("get notification Content error");
                }
+               
+               return content;
        }
        else
        {
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               throw UnknownException("notification handle is null");
        }
-       
 }
 
 void StatusNotification::setContent(std::string content)
 {
-       LogDebug("Content : " << content);
+       LoggerI("Content : " << content);
        if (m_notiHandle)
        {
                if((getContent()).compare(content))     //different value.
@@ -480,43 +559,48 @@ void StatusNotification::setContent(std::string content)
                        if (notification_set_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_CONTENT, content.c_str(),
                                NULL, NOTIFICATION_VARIABLE_TYPE_NONE ) != NOTIFICATION_ERROR_NONE)
                        {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification content error");
+                               throw UnknownException("set notification content error");
                        }
                        setUpdatedFlag(true);
                }
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException("notification handle is null");
        }
 }
-       
+
 std::string StatusNotification::getIconPath()
 {
+
+       LoggerI("m_notiHandle = " << m_notiHandle);
        if (m_notiHandle)
        {
                char *iconPath = NULL;
-       
                if (notification_get_image(m_notiHandle, NOTIFICATION_IMAGE_TYPE_ICON,  &iconPath) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification icon path error");
+                       throw UnknownException("get notification icon path error");
                }
 
-               std::string notiIconPath(iconPath);
-               LogDebug("icon Path = " << iconPath);
+               std::string notiIconPath;
+               if (iconPath)
+               {
+                       notiIconPath = iconPath;
+                       LoggerI("icon Path = " << iconPath);
+               }
                
                //if icon path invalid, return empty string.
                if ( notiIconPath.find(DEFAULT_ICON_PATH,0) == std::string::npos)
                        return notiIconPath;    
                else
                {
-                       return std::string("");         
+                       return std::string(""); //return empty string.
                }
        }
        else
        {
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               throw UnknownException("notification handle is null");
        }
 }
 
@@ -524,25 +608,27 @@ void StatusNotification::setIconPath(const std::string& iconPath)
 {
        if (m_notiHandle)
        {
-               LogDebug("icon path = " << iconPath << " origin icon path = " << getIconPath());
+               LoggerI("icon path = " << iconPath << " origin icon path = " << getIconPath());
                if( getIconPath().compare(iconPath))
                {
                        if (notification_set_image(m_notiHandle,NOTIFICATION_IMAGE_TYPE_ICON, iconPath.c_str()) != NOTIFICATION_ERROR_NONE)
                        {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification icon error");
+                               throw UnknownException("set notification icon error");
                        }
                        setUpdatedFlag(true);
                }
        }
        else
-       {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+       {
+               LoggerD("noti Handle is NULL");
+               throw UnknownException("notification handle is null");
        }
 }
 
 std::string StatusNotification::getSoundPath()
 {
+       LoggerI("Handle = " << m_notiHandle);
+
        if (m_notiHandle)
        {
                const char *soundPath = NULL;
@@ -550,25 +636,28 @@ std::string StatusNotification::getSoundPath()
                
                if (notification_get_sound(m_notiHandle, &type,  &soundPath) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sound error");
+                       throw UnknownException("get notification sound error");
                }
-
-               LogDebug(" sound type = " << type << " path = " << soundPath);
                
-               if ( type == NOTIFICATION_SOUND_TYPE_USER_DATA )
-               {
-                       LogDebug("soundPath = " << soundPath);
-                       return std::string(soundPath); 
-               }
-               else
+               std::string strSoundPath;
+               if (soundPath)
                {
-                       return std::string("");
+                       LoggerI(" soudn type=" << type);
+                       if ( type == NOTIFICATION_SOUND_TYPE_USER_DATA)
+                       {
+                               LoggerI("soundPath = " << soundPath);
+                               strSoundPath = soundPath;
+                       }
                }
+               
+               LoggerI("soundPath :" << strSoundPath);
+               return strSoundPath;
+
        }
        else
        {
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException("notification handle is null");
        }
 }
 
@@ -576,35 +665,57 @@ void StatusNotification::setSoundPath(const std::string& sound)
 {
        if (m_notiHandle)
        {
-               LogDebug("sound path = " << sound << " origin sound path = " << getSoundPath());
+               LoggerI("sound path = " << sound << " origin sound path = " << getSoundPath());
                
                if( getSoundPath().compare(sound))
                {
                        if (notification_set_sound(m_notiHandle,NOTIFICATION_SOUND_TYPE_USER_DATA, sound.c_str()) != NOTIFICATION_ERROR_NONE)
                        {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification sound error");
+                               throw UnknownException("set notification sound error");
                        }
                        setUpdatedFlag(true);
                }
+
+               if (sound.empty()) 
+               {
+                   LoggerI("sound path is NULL");
+                   if ( NOTI_TYPE_ONGOING == getNotiType() || NOTI_TYPE_PROGRESS == getNotiType())
+                   {
+                               LoggerI("Ongoing Type" );
+                               if (notification_set_sound(m_notiHandle,NOTIFICATION_SOUND_TYPE_NONE, NULL) != NOTIFICATION_ERROR_NONE)
+                               {
+                                       throw UnknownException("set notification sound error");
+                               }
+                   }
+                   else
+                   {
+                               if (notification_set_sound(m_notiHandle,NOTIFICATION_SOUND_TYPE_DEFAULT, sound.c_str()) != NOTIFICATION_ERROR_NONE)
+                               {
+                                       throw UnknownException("set notification sound error");
+                               }
+                   }           
+                    
+               }
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException("notification handle is null");
        }
 }
 
 bool StatusNotification::getDefaultVibration()
 {
+       LoggerI("getDefaultVibration");
        if (m_notiHandle)
        {
                notification_vibration_type_e vib_type;
                if (notification_get_vibration(m_notiHandle, &vib_type,  NULL) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification sound error");
+                       throw UnknownException("set notification sound error");
                }
 
-               if (vib_type == NOTIFICATION_VIBRATION_TYPE_DEFAULT)
+               if (NOTIFICATION_VIBRATION_TYPE_DEFAULT == vib_type  || NOTIFICATION_VIBRATION_TYPE_USER_DATA == vib_type)
                {
                        return true;
                }
@@ -615,7 +726,8 @@ bool StatusNotification::getDefaultVibration()
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException("notification handle is null");
        }
 
        return false;
@@ -623,115 +735,447 @@ bool StatusNotification::getDefaultVibration()
 
 void StatusNotification::setDefaultVibration(const bool& vibration) 
 {
+    LoggerI("vibration = " << vibration);
        if (m_notiHandle)
        {
                notification_vibration_type_e vib_type = NOTIFICATION_VIBRATION_TYPE_NONE;
-               
+               LoggerI("old vibration = " << getDefaultVibration());
                if (getDefaultVibration() != vibration)
                {
                        if (vibration)
                        {
                                vib_type = NOTIFICATION_VIBRATION_TYPE_DEFAULT;
                        }
-                       
+                       else
+                       {
+                               vib_type = NOTIFICATION_VIBRATION_TYPE_NONE;
+                       }
+                       LoggerI("type vibration type= " << vib_type);
+
                        if (notification_set_vibration(m_notiHandle, vib_type , NULL) != NOTIFICATION_ERROR_NONE)
                        {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification sound error");
+                               throw UnknownException("set notification sound error");
                        }
                        setUpdatedFlag(true);
                }
        }
        else
        {
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException("notification handle is null");
        }
 
 }
 
-double StatusNotification::getProgressValue() 
+DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplicationControl()
 {
-       double value = 0.0;
-       
-       if (m_notiHandle)
-       {
-               NotificationProgressType progressType = getProgressType();
-       
-               if (progressType == NOTI_PROGRESS_TYPE_SIZE)
-               {
-                       if (notification_get_size(m_notiHandle, &value) != NOTIFICATION_ERROR_NONE)
+
+    service_h service = NULL;
+    char *tempStr = NULL;
+
+    DeviceAPI::Application::ApplicationControlPtr appControl(new DeviceAPI::Application::ApplicationControl());
+
+    try {
+               if (m_service)
+               {
+                       appControl->setService_h(m_service);
+                       // mandatory
+                       if(service_get_operation(m_service, &tempStr) == SERVICE_ERROR_NONE)
+                       {
+                               LoggerD("Operation Str = " << tempStr);
+                               if (tempStr) 
+                               {
+                                       appControl->setOperation(tempStr);
+                                       free(tempStr);
+                                       tempStr = NULL;
+                               }
+                       }
+
+                       // optional
+                       if (service_get_mime(m_service, &tempStr) == SERVICE_ERROR_NONE)
+                       {
+                               LoggerD("Mime Str = " << tempStr);
+                               if (tempStr) 
+                               {
+                                       appControl->setMime(tempStr);
+                                       free(tempStr);
+                                       tempStr = NULL;
+                               }
+                       }
+
+                       // optional
+                       if (service_get_uri(m_service, &tempStr) == SERVICE_ERROR_NONE)
+                       {
+                               LoggerD("Uri Str = " << tempStr);
+                               if (tempStr)
+                               {
+                                       appControl->setUri(tempStr);
+                                       free(tempStr);
+                                       tempStr = NULL;
+                               }
+                       }
+
+                       if (service_get_category(m_service, &tempStr) == SERVICE_ERROR_NONE)
+                       {
+                               LoggerD("Category Str = " << tempStr);
+                               if (tempStr)
+                               {
+                                       appControl->setCategory(tempStr);
+                                       free(tempStr);
+                                       tempStr = NULL;
+                               }
+                       }
+                       
+                       // optional
+                       if ( service_foreach_extra_data(m_service, service_extra_data_cb,(void*)&appControl) != SERVICE_ERROR_NONE)
                        {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification size error");
+                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification service uri error");
                        }
+
+                       return appControl;
+               }
+
+       }
+       Catch (WrtDeviceApis::Commons::Exception) 
+       {
+               if (tempStr) 
+               {
+                       free(tempStr);
+                       tempStr = NULL;
+               }
+
+               if (service)
+               {
+                       free(service);
+                       service = NULL;
+               }
+
+               LoggerW(_rethrown_exception.GetMessage());
+       }
+       
+    return appControl;
+}
+
+void StatusNotification::setApplicationControl(DeviceAPI::Application::ApplicationControlPtr control)
+{
+       LoggerI("Entered m_service : " << m_service << " control : " << control);
+
+       //delete old service.
+       if (m_service)
+       {
+               service_destroy(m_service);
+               m_service = NULL;
+       }
+       
+       if(service_create(&m_service) != SERVICE_ERROR_NONE)
+       {
+               throw UnknownException("service creation error");
+       }
+       else
+       {
+               LoggerI("getOperation : " << control->getOperation().c_str());
+               if (control->getOperation().size() != 0)
+               {
+                       m_launchFlag = true;            //default attribute
+                       if (service_set_operation(m_service, control->getOperation().c_str()) != SERVICE_ERROR_NONE)
+                       {
+                               throw UnknownException("service set operation error");
+                       }
+               }
+                       
+               // optional
+               LoggerI("getUri : " << control->getUri().c_str());
+               if (control->getUri().size() != 0)
+               {
+                       if (service_set_uri(m_service, control->getUri().c_str() ) != SERVICE_ERROR_NONE)
+                       {
+                               throw UnknownException("service set uri error");
+                       }
+               }
+       
+               // optional
+               LoggerI("getMime : " << control->getMime().c_str());
+               if (control->getMime().size() != 0)
+               {
+                       if (service_set_mime(m_service, control->getMime().c_str() ) != SERVICE_ERROR_NONE)
+                       {
+                               throw UnknownException("service set mime error");
+                       }
+               }
+       
+               LoggerI("Category : " << control->getCategory().c_str());
+               if (control->getCategory().size() != 0)
+               {
+                       if (service_set_category(m_service, control->getCategory().c_str() ) != SERVICE_ERROR_NONE)
+                       {
+                               throw UnknownException("service set mime error");
+                       }
+               }
+#if 0
+               //remove key
+               if ( service_foreach_extra_data(m_service, service_extra_data_delete_cb, NULL) != SERVICE_ERROR_NONE)
+               {
+                       throw UnknownException("get notification service uri error");
+               }
+#endif         
+               std::vector<DeviceAPI::Application::ApplicationControlDataPtr> appControlDataArray = control->getAppControlDataArray();
+               size_t index = 0;
+       
+               LoggerI (" App Control Datas Count : " << appControlDataArray.size());
+       
+               DeviceAPI::Application::ApplicationControlDataArray::iterator iter;
+       
+               for(iter = appControlDataArray.begin(); iter != appControlDataArray.end(); iter++)
+               {
+                       DeviceAPI::Application::ApplicationControlDataPtr appControlData = *iter;
+                       std::string key = appControlData->getKey();
+                       LoggerI(" key : " << key);
+               
+                       if (key.empty())
+                               continue;
+               
+                       std::vector<std::string> value = appControlDataArray[index]->getValue();
+                       const char **arrayValue = (const char**)calloc(sizeof(char*), value.size());
+       
+                       for (size_t indexArray = 0; indexArray < value.size(); indexArray++)
+                       {
+                               arrayValue[indexArray] = (char*)value[indexArray].c_str();
+                               LoggerI( " value : " << arrayValue[indexArray]);
+                       }
+       
+                       const char* strKey = key.c_str();
+                       LoggerI( " value size: " << value.size());
+                       if (service_add_extra_data_array(m_service, strKey, arrayValue, value.size()) != SERVICE_ERROR_NONE)
+                       {
+                               throw UnknownException("service set extra data error");                 
+                       }
+                        
+                       if (arrayValue)
+                               free(arrayValue);
+               }                                       
+
+#if 0
+               bundle *bundle_data=NULL;
+               
+               if(service_to_bundle(m_service, &bundle_data) != SERVICE_ERROR_NONE)
+               {
+                       throw UnknownException("service get bundle");                   
+               }
+
+               LoggerD("bundle_data : " << bundle_data);
+               
+               if (bundle_data)
+               {
+                       notification_set_execute_option(m_notiHandle, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,
+                               NULL,NULL, bundle_data);
+               }
+#endif
+                               
+       }
+       
+}
+
+void StatusNotification::setApplicationId(const std::string& appId)
+{
+       LoggerI("m_service = "  << m_service << " appId = " << appId);
+       if (!m_service)
+       {       
+               if (service_create(&m_service) != SERVICE_ERROR_NONE)
+               {
+                       LoggerW("Create Service Failed..");
+                       throw UnknownException("service creation error");
+               }
+       }
+
+       if (m_service)
+       {
+               m_launchFlag = true;
+               if (service_set_app_id(m_service, appId.c_str())!= SERVICE_ERROR_NONE)
+               {
+                       throw UnknownException("service set appId error");      
+               }
+       }
+
+}
+
+std::string StatusNotification::getApplicationId()
+{
+       std::string retString;
+       char* appIdStr = NULL;
+#if 0  
+       service_h service = NULL;
+
+       if (m_service != NULL)
+       {
+               int retcode;
+               retcode = service_clone(&service, m_service);   
+               
+               if (retcode != SERVICE_ERROR_NONE)
+               {
+                       if (retcode == SERVICE_ERROR_OUT_OF_MEMORY)
+                       {
+                               LoggerW("SERVICE_ERROR_OUT_OF_MEMORY");
+                       }
+                       else
+                       {
+                               LoggerW("UI_NOTIFICATION_ERROR_INVALID_PARAMETER");
+                       }
+                       throw UnknownException ("get notification service error ");
+               }
+               else
+               {
+                       if (service == NULL)
+                       {
+                               throw UnknownException ("get notification service ok, but service null");                       
+                       }
+               }
+       }
+#endif
+       if (m_service != NULL) 
+       {
+               if (service_get_app_id(m_service, &appIdStr) != SERVICE_ERROR_NONE)
+               {
+                       throw UnknownException ("get a appId error");
+               }
+
+               if (appIdStr != NULL)
+               {
+                       retString = appIdStr;
+                       free(appIdStr);
+               }
+       }
+       LoggerI(retString);
+       
+       return retString;
+
+}
+
+double StatusNotification::getProgressValue() 
+{
+       double value = 0.0;
+       
+       if (m_notiHandle)
+       {
+               NotificationProgressType progressType = getProgressType();
+       
+               if (progressType == NOTI_PROGRESS_TYPE_SIZE)
+               {
+                       if (notification_get_size(m_notiHandle, &value) != NOTIFICATION_ERROR_NONE)
+                       {
+                               throw UnknownException("get notification size error");
+                       }
+                       LoggerI("Size Val = " << value);
                }
                else if ( progressType == NOTI_PROGRESS_TYPE_PERCENTAGE )
                {
                        if (notification_get_progress(m_notiHandle, &value) != NOTIFICATION_ERROR_NONE)
                        {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification progress error");
+                               throw UnknownException("get notification percentage error");
                        }
+                       LoggerI("Percentage Val = " << value);
                }
                else
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification progress error");
+                       throw UnknownException("get notification progress type error");
                }
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
        }
-
+       LoggerI("value = " << value);
        return value;
        
 }
 
 void StatusNotification::setProgressValue(const double &progressValue)
 {
-       LogDebug(" ");
        if (m_notiHandle)
        {       
                NotificationProgressType progressType = getProgressType();
-               LogDebug("Progress Type : " << progressType);
-
+               LoggerI("Progress Type : " << progressType);
+               
                double val = getProgressValue();
-               LogDebug("Progress value = " << progressValue << " origin Progress Value =" << val);
+               LoggerI("Progress value = " << progressValue << " origin Progress Value =" << val);
                
                if (progressType == NOTI_PROGRESS_TYPE_SIZE)
                {
                        if (notification_set_size(m_notiHandle, progressValue) != NOTIFICATION_ERROR_NONE)
                        {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification size error");
+                               throw UnknownException("set notification progress size error");
                        }
                }
                else if ( progressType == NOTI_PROGRESS_TYPE_PERCENTAGE )
                {       
-               
                        if (notification_set_progress(m_notiHandle, progressValue) != NOTIFICATION_ERROR_NONE)
                        {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification progress error");
+                               throw UnknownException("set notification percentage error");
                        }
                }
                else
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification progress error");
+                       throw UnknownException("get notification progress type error");
                }
        }
        else
        {
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException( "notification handle is null");
        }
 }
+
+NotificationProgressType StatusNotification::getProgressType()
+{
+       return m_progressType;
+}
+
+void StatusNotification::setProgressType(NotificationProgressType type)
+{
        
+       if (m_notiHandle)
+       {
+               LoggerI(" NotificationProgressType = " << type);
+
+               std::string progressType;
+
+               if ( type == NOTI_PROGRESS_TYPE_PERCENTAGE)
+               {
+                       progressType = TIZEN_NOTIFICATION_PROGRESS_TYPE_PERCENTAGE;
+               }
+               else if ( type == NOTI_PROGRESS_TYPE_SIZE)
+               {
+                       progressType = TIZEN_NOTIFICATION_PROGRESS_TYPE_BYTE;
+               }
+               else
+               {
+                       throw TypeMismatchException("Invalid Progress Type.");
+               }
+               
+               if (notification_set_image(m_notiHandle,NOTIFICATION_IMAGE_TYPE_LIST_5, progressType.c_str()) != NOTIFICATION_ERROR_NONE)
+               {
+                       throw UnknownException("set notification sound error");
+               }
+
+               m_progressType = type;
+       }
+       else
+       {       
+               LoggerD("noti Handle is NULL");
+               throw UnknownException("notification handle is null");
+       }
+       
+}
+
 std::string StatusNotification::getSubIconPath()
 {
+        LoggerI("Handle = " << m_notiHandle);
        if (m_notiHandle)
        {
                char *subIconPath = NULL;
        
                if (notification_get_image(m_notiHandle, NOTIFICATION_IMAGE_TYPE_ICON_SUB,  &subIconPath) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sub icon error");
+                       throw UnknownException("get notification sub icon error");
                }
 
                std::string notiSubIconPath;
@@ -741,86 +1185,34 @@ std::string StatusNotification::getSubIconPath()
        }
        else
        {
-               return std::string("");
+               throw UnknownException("notification handle is null");
        }
 
 }
 
-void StatusNotification::setSubIconPath(const std::string& subIconPath)
-{
-       if (m_notiHandle)
-       {
-               LogDebug(" subIconPath = " << subIconPath << " origin SubIconPath = " << getSubIconPath());     
-
-               if( getSubIconPath().compare(subIconPath))
-               {
-                       if (notification_set_image(m_notiHandle,NOTIFICATION_IMAGE_TYPE_ICON_SUB, subIconPath.c_str()) != NOTIFICATION_ERROR_NONE)
-                       {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification sound error");
-                       }
-                       setUpdatedFlag(true);
-               }
-       }
-       else
-       {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
-       }
-}
-
-std::vector<std::string> StatusNotification::getInformations()
-{
-
-       std::vector<std::string> infos;
-
-       if (m_notiHandle)
-       {
-               
-               char *info = NULL;
-               if (notification_get_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_INFO_1, &info) != NOTIFICATION_ERROR_NONE)
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification information error");
-               }
-               
-               if (info)
-                       infos.push_back(info);                  //info 1 
-               else
-                       infos.push_back(std::string(""));               // insert empty String
-               info = NULL;
-               
-               if (notification_get_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_INFO_2, &info) != NOTIFICATION_ERROR_NONE)
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification information error");
-               }       
-       
-               if (info)
-                       infos.push_back(info);                  //info 2 
-               else
-                       infos.push_back(std::string(""));               // insert empty String
-               info = NULL;
-#if 0
-               if (notification_get_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_INFO_3, &info) != NOTIFICATION_ERROR_NONE)
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification information error");
-               }       
-
-               if (info)
-                       infos.push_back(info);                  //info 3 
-               else
-                       infos.push_back(std::string(""));               // insert empty String
-#endif
-               info = NULL;
+void StatusNotification::setSubIconPath(const std::string& subIconPath)
+{
+       if (m_notiHandle)
+       {
+               LoggerI(" subIconPath = " << subIconPath << " origin SubIconPath = " << getSubIconPath());      
 
+               if( getSubIconPath().compare(subIconPath))
+               {
+                       if (notification_set_image(m_notiHandle,NOTIFICATION_IMAGE_TYPE_ICON_SUB, subIconPath.c_str()) != NOTIFICATION_ERROR_NONE)
+                       {
+                               throw UnknownException("set notification sound error");
+                       }
+                       setUpdatedFlag(true);
+               }
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException("notification handle is null");
        }
-
-       return infos;
 }
 
+#if 0
 std::string StatusNotification::getInformation(int index)
 {
        if (m_notiHandle)
@@ -844,74 +1236,20 @@ std::string StatusNotification::getInformation(int index)
                
                if (NOTIFICATION_TEXT_TYPE_NONE != type && notification_get_text(m_notiHandle, type, &info) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification information error");
+                       throw UnknownException("get notification information error");
                }
 
                std::string strInfo;
                if (info)
                        strInfo = info;
-               LogDebug(" info " << strInfo);
+               LoggerD(" info " << strInfo);
                return strInfo;
 
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
-       }
-       
-}
-
-void StatusNotification::setInformations( std::vector<std::string>& infos)
-{
-       
-       if (m_notiHandle)
-       {
-               std::vector<std::string>::iterator it;
-
-               int idx = 0;
-               for (it = infos.begin(); it != infos.end(); ++it) 
-               {
-                       std::string str = *it;
-                       LogDebug(" Info : " << str);
-
-                       notification_text_type_e type = NOTIFICATION_TEXT_TYPE_NONE; 
-                       switch (idx)
-                       {
-                               case 0:
-                                       type = NOTIFICATION_TEXT_TYPE_INFO_1;
-                                       break;
-                               case 1:
-                                       type = NOTIFICATION_TEXT_TYPE_INFO_2;
-                                       break;
-                               case 2:
-                                       type = NOTIFICATION_TEXT_TYPE_INFO_3;
-                                       break;
-                               default :
-                                       type = NOTIFICATION_TEXT_TYPE_NONE;
-                       }
-
-                       if ( type != NOTIFICATION_TEXT_TYPE_NONE)
-                       {
-                               if (getInformation(idx).compare(str))
-                               {
-                                       if (notification_set_text(m_notiHandle, type, str.c_str(),
-                                               NULL, NOTIFICATION_VARIABLE_TYPE_NONE) != NOTIFICATION_ERROR_NONE)
-                                       {
-                                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification information error");
-                                       }
-                                       setUpdatedFlag(true);
-                               }
-                       }
-                       idx ++;
-               }
-               
-
-       }
-       else
-       {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException("notification handle is null");
        }
        
 }
@@ -922,8 +1260,8 @@ void StatusNotification::setInformation( const std::string& info, int index)
        if (m_notiHandle)
        {
                int idx = index;
-               LogDebug(" index : " << idx);
-               LogDebug(" log : " << info);
+               LoggerD(" index : " << idx);
+               LoggerD(" log : " << info);
                notification_text_type_e type = NOTIFICATION_TEXT_TYPE_NONE; 
                
                switch (idx)
@@ -948,64 +1286,17 @@ void StatusNotification::setInformation( const std::string& info, int index)
                                if (notification_set_text(m_notiHandle, type, info.c_str(),
                                        NULL, NOTIFICATION_VARIABLE_TYPE_NONE) != NOTIFICATION_ERROR_NONE)
                                {
-                                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification sound error");
+                                       throw UnknownException("set notification sound error");
                                }
                                setUpdatedFlag(true);
                        }
                }
        }
-}
-
-std::vector<std::string> StatusNotification::getSubInformations()
-{
-       std::vector<std::string> subInfos;
-
-       if (m_notiHandle)
-       {
-               char *subInfo = NULL;
-               if (notification_get_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_INFO_SUB_1, &subInfo) != NOTIFICATION_ERROR_NONE)
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sub background error");
-               }
-
-               if (subInfo)
-                       subInfos.push_back(subInfo);    
-               else 
-                       subInfos.push_back(std::string());
-               subInfo = NULL;
-               
-               if (notification_get_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_INFO_SUB_2, &subInfo) != NOTIFICATION_ERROR_NONE)
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sub information error");
-               }
-               
-               if (subInfo)
-                       subInfos.push_back(subInfo);    
-               else 
-                       subInfos.push_back(std::string());
-
-               subInfo = NULL;
-#if 0
-               if (notification_get_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_INFO_SUB_3, &subInfo) != NOTIFICATION_ERROR_NONE)
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sub information error");
-               }
-               
-               if (subInfo)
-                       subInfos.push_back(subInfo);    
-               else 
-                       subInfos.push_back(std::string());
-
-               subInfo = NULL;
-#endif         
-       }
        else
        {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException("notification handle is null");
        }
-
-       return subInfos;
 }
 
 std::string StatusNotification::getSubInformation(int index)
@@ -1033,84 +1324,31 @@ std::string StatusNotification::getSubInformation(int index)
                
                if (NOTIFICATION_TEXT_TYPE_NONE != type && notification_get_text(m_notiHandle, type, &subInfo) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sub information error");
+                       throw UnknownException( "get notification sub information error");
                }
 
                std::string strSubInfo;
                if (subInfo)
                        strSubInfo = subInfo;
-               LogDebug(" subInfo " << strSubInfo);
+               LoggerD(" subInfo " << strSubInfo);
                return strSubInfo;
                                
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
-       }
-       
-}
-
-void StatusNotification::setSubInformations(std::vector<std::string>& subInfos)
-{
-       if (m_notiHandle)
-       {
-               std::vector<std::string>::iterator it;
-
-               int idx = 0;
-               for (it = subInfos.begin(); it < subInfos.end(); ++it) 
-               {
-                       std::string str = *it;
-                       LogDebug(" sub Info : " << str);
-
-                       notification_text_type_e type = NOTIFICATION_TEXT_TYPE_NONE; 
-                       switch (idx)
-                       {
-                               case 0:
-                                       type = NOTIFICATION_TEXT_TYPE_INFO_SUB_1;
-                                       break;
-                               case 1:
-                                       type = NOTIFICATION_TEXT_TYPE_INFO_SUB_2;
-                                       break;
-                               case 2:
-                                       type = NOTIFICATION_TEXT_TYPE_INFO_SUB_3;
-                                       break;
-                               default :
-                                       type = NOTIFICATION_TEXT_TYPE_NONE;
-                       }
-
-                       if ( type != NOTIFICATION_TEXT_TYPE_NONE)
-                       {
-                               if (getSubInformation(idx).compare(str))
-                               {
-                                       if (notification_set_text(m_notiHandle, type, str.c_str(),
-                                               NULL, NOTIFICATION_VARIABLE_TYPE_NONE) != NOTIFICATION_ERROR_NONE)
-                                       {
-                                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification text error");
-                                       }
-                                       setUpdatedFlag(true);
-                               }
-                       }
-                       idx ++;
-               }
-
-       }
-       else
-       {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException( "notification handle is null");
        }
        
 }
 
 void StatusNotification::setSubInformation( const std::string& subInfo, int index)
 {
-
        if (m_notiHandle)
        {
                int idx = index;
-               LogDebug(" index : " << idx);
-               LogDebug(" log : " << subInfo);
+               LoggerD(" index : " << idx);
+               LoggerD(" log : " << subInfo);
                notification_text_type_e type = NOTIFICATION_TEXT_TYPE_NONE; 
                
                switch (idx)
@@ -1135,95 +1373,104 @@ void StatusNotification::setSubInformation( const std::string& subInfo, int inde
                                if (notification_set_text(m_notiHandle, type, subInfo.c_str(),
                                        NULL, NOTIFICATION_VARIABLE_TYPE_NONE) != NOTIFICATION_ERROR_NONE)
                                {
-                                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification sound error");
+                                       throw UnknownException( "set notification sound error");
                                }
                                setUpdatedFlag(true);
                        }
                }
        }
+       else
+       {       
+               LoggerD("noti Handle is NULL");
+               throw UnknownException( "notification handle is null");
+       }
+               
 }
+#endif
 
-#if 0
-std::vector<std::string> StatusNotification::getThumbnails()
+void StatusNotification::loadThumbnails()
 {
-       std::vector<std::string> thumbs;
        if (m_notiHandle)
-       {
-               //clean
-               if ( !thumbs.empty() )
-                       thumbs.clear();
-               
+       {       
+               if (!m_thumbs.empty())
+                       m_thumbs.clear();
+
                char *thumb = NULL;
                if (notification_get_image(m_notiHandle, NOTIFICATION_IMAGE_TYPE_LIST_1, &thumb) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification thumbnail error");
+                       throw UnknownException( "get notification thumbnail error");
                }
                if (thumb)
-                       thumbs.push_back(thumb);
-               else
-                       thumbs.push_back(std::string("")); //set empty
+                       m_thumbs.push_back(thumb);
+               //else
+               //      m_thumbs.push_back(std::string("")); //set empty
                thumb = NULL;
                
                if (notification_get_image(m_notiHandle, NOTIFICATION_IMAGE_TYPE_LIST_2, &thumb) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sub information error");
+                       throw UnknownException( "get notification sub information error");
                }       
                if (thumb)
-                       thumbs.push_back(thumb);
-               else
-                       thumbs.push_back(std::string("")); //set empty
+                       m_thumbs.push_back(thumb);
+               //else
+               //      m_thumbs.push_back(std::string("")); //set empty
                thumb = NULL;
                
                if (notification_get_image(m_notiHandle, NOTIFICATION_IMAGE_TYPE_LIST_3, &thumb) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sub information error");
+                       throw UnknownException( "get notification sub information error");
                }
                
                if (thumb)
-                       thumbs.push_back(thumb);
-               else
-                       thumbs.push_back(std::string("")); //set empty
+                       m_thumbs.push_back(thumb);
+               //else
+               //      m_thumbs.push_back(std::string("")); //set empty
                thumb = NULL;
 
                if (notification_get_image(m_notiHandle, NOTIFICATION_IMAGE_TYPE_LIST_4, &thumb) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sub information error");
+                       throw UnknownException( "get notification sub information error");
                }
                
                if (thumb)
-                       thumbs.push_back(thumb);
-               else
-                       thumbs.push_back(std::string("")); //set empty
+                       m_thumbs.push_back(thumb);
+               //else
+               //      m_thumbs.push_back(std::string("")); //set empty
                thumb = NULL;
-       
+#if 0  
                if (notification_get_image(m_notiHandle, NOTIFICATION_IMAGE_TYPE_LIST_5, &thumb) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sub information error");
+                       throw UnknownException( "get notification sub information error");
                }
                
                if (thumb)
-                       thumbs.push_back(thumb);
+                       m_thumbs.push_back(thumb);
                else
-                       thumbs.push_back(std::string("")); //set empty
+                       m_thumbs.push_back(std::string("")); //set empty
                thumb = NULL;
+#endif         
                
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException( "notification handle is null");
        }
+}
 
-       return thumbs;
+std::vector<std::string> StatusNotification::getThumbnails()
+{
+       LoggerI(" thumbnail Size : " << m_thumbs.size());
+       return m_thumbs;
 }
-#endif
 
 std::string StatusNotification::getThumbnail(int index)
 {
-       
        if (m_notiHandle)
        {
-               notification_image_type_e type = NOTIFICATION_IMAGE_TYPE_LIST_1;
+               LoggerI(" index : " << index);
+               
+               notification_image_type_e type = NOTIFICATION_IMAGE_TYPE_NONE; 
                
                switch (index)
                {
@@ -1242,37 +1489,46 @@ std::string StatusNotification::getThumbnail(int index)
                        case 4:
                                type = NOTIFICATION_IMAGE_TYPE_LIST_5;
                                break;
-                               
                        default :
                                type = NOTIFICATION_IMAGE_TYPE_NONE;
                }
-               
-               char* thumb=NULL;
-               
-               if (NOTIFICATION_IMAGE_TYPE_NONE != type && notification_get_image(m_notiHandle, type, &thumb) != NOTIFICATION_ERROR_NONE)
+
+               if ( type != NOTIFICATION_IMAGE_TYPE_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification thumbnail error");
-               }
+                       char *thumb = NULL;
+                       if (notification_get_image(m_notiHandle, type, &thumb) != NOTIFICATION_ERROR_NONE)
+                       {
+                               throw UnknownException( "set notification thumbnail error");
+                       }
 
-               std::string strThumb;
-               
-               if (thumb)
-                       strThumb = thumb;
+                       std::string thumbnail;
+                       if(thumb)
+                               thumbnail = thumb;
+                       return thumbnail;
+               }
+               else
+               {
+                       throw UnknownException( "notification handle is null");
+               }
                
-               LogDebug(" info " << strThumb);
-               return strThumb;
-
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException( "notification handle is null");
        }
+#if 0
+       if (m_thumbs.size() > index)
+               return m_thumbs[index];
+       else
+               return std::string("");
+#endif
 
 }
 
-void StatusNotification::setThumbnails(std::vector<std::string>& thumbs)
+void StatusNotification::setThumbnails(std::vector<std::string> thumbs)
 {
+        LoggerI("set thumbnails");
        if (m_notiHandle)
        {
                std::vector<std::string>::iterator it;
@@ -1281,74 +1537,26 @@ void StatusNotification::setThumbnails(std::vector<std::string>& thumbs)
                for (it = thumbs.begin(); it < thumbs.end(); ++it)
                {
                        std::string str = *it;
-                       LogDebug(" thumbs : " << str);
-
-                       if ( idx < MAX_THUMBNAIL_LENGTH )
-                               setThumbnail(str, idx);
-#if 0
-                       notification_image_type_e type = NOTIFICATION_IMAGE_TYPE_NONE; 
-                       switch (idx)
-                       {
-                               case 0:
-                                       type = NOTIFICATION_IMAGE_TYPE_LIST_1;
-                                       break;
-                               case 1:
-                                       type = NOTIFICATION_IMAGE_TYPE_LIST_2;
-                                       break;
-                               case 2:
-                                       type = NOTIFICATION_IMAGE_TYPE_LIST_3;
-                                       break;
-                               case 3:
-                                       type = NOTIFICATION_IMAGE_TYPE_LIST_4;
-                                       break;
-                               case 4:
-                                       type = NOTIFICATION_IMAGE_TYPE_LIST_5;
-                                       break;                                  
-                               default :
-                                       type = NOTIFICATION_IMAGE_TYPE_NONE;
-                       }
-                       
                        if ( idx < MAX_THUMBNAIL_LENGTH )
-                       { 
-
-                               if ( type != NOTIFICATION_IMAGE_TYPE_NONE)
-                               {
-                                       if (getThumbnail(idx).compare(str))
-                                       {       
-                                               if (notification_set_image(m_notiHandle, type, str.c_str()) != NOTIFICATION_ERROR_NONE)
-                                               {
-                                                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification thumbnail error");
-                                               }
-                                               setUpdatedFlag(true);
-                                       }
-                               }
-                       }
-
-#endif
+                               setThumbnail(str, idx); //set notification's thumbnail value.
                        idx ++;
                }
 
-               if ( idx < MAX_THUMBNAIL_LENGTH)
-               {
-                       setThumbnail("", idx);  //set empty value
-               }       
-               
-
+               m_thumbs = thumbs;
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException( "notification handle is null");
        }
-
 }
 
 void StatusNotification::setThumbnail( const std::string& thumb, int index)
 {
        if (m_notiHandle)
        {
-               LogDebug(" index : " << index);
-               LogDebug(" thumb : " << thumb);
+               LoggerI(" index : " << index);
+               LoggerI(" thumb : " << thumb);
                notification_image_type_e type = NOTIFICATION_IMAGE_TYPE_NONE; 
                
                switch (index)
@@ -1367,172 +1575,36 @@ void StatusNotification::setThumbnail( const std::string& thumb, int index)
                                break;
                        case 4:
                                type = NOTIFICATION_IMAGE_TYPE_LIST_5;
-                               break;                                  
+                               break;
                        default :
                                type = NOTIFICATION_IMAGE_TYPE_NONE;
                }
 
                if ( type != NOTIFICATION_IMAGE_TYPE_NONE)
                {
-                       
                        if (getThumbnail(index).compare(thumb))
                        {
                                if (notification_set_image(m_notiHandle, type, thumb.c_str()) != NOTIFICATION_ERROR_NONE)
                                {
-                                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification thumbnail error");
+                                       throw UnknownException( "set notification thumbnail error");
                                }
                                setUpdatedFlag(true);
                        }
                }
        }
-
-}
-
-void StatusNotification::setThumbnails(const StringArrayPtr &value)
-{
-       if(value == NULL)
-               m_thumbs = StringArrayPtr(new StringArray());
-       else
-               m_thumbs = value;
-#if 0
-       if (m_notiHandle)
-       {
-               //set notification.
-               if (value)
-               {
-                       //setThumbnails
-                       std::vector<std::string>::iterator it;
-
-                       int idx = 0;
-                       for (it = m_thumbs->begin(); it < m_thumbs->end(); ++it)
-                       {
-                               std::string str = *it;
-                               LogDebug(" thumbs : " << str);
-                               DeviceAPI::Filesystem::IPathPtr path = DeviceAPI::Filesystem::Utils::fromVirtualPath(context, soundPath);
-                               str = path->getFullPath();
-                       
-                               LogDebug(" thumbs : " << str);
-                               notification_image_type_e type = NOTIFICATION_IMAGE_TYPE_NONE; 
-                               switch (idx)
-                               {
-                                       case 0:
-                                               type = NOTIFICATION_IMAGE_TYPE_LIST_1;
-                                               break;
-                                       case 1:
-                                               type = NOTIFICATION_IMAGE_TYPE_LIST_2;
-                                               break;
-                                       case 2:
-                                               type = NOTIFICATION_IMAGE_TYPE_LIST_3;
-                                               break;
-                                       case 3:
-                                               type = NOTIFICATION_IMAGE_TYPE_LIST_4;
-                                               break;
-                                       case 4:
-                                               type = NOTIFICATION_IMAGE_TYPE_LIST_5;
-                                               break;                                  
-                                       default :
-                                               type = NOTIFICATION_IMAGE_TYPE_NONE;
-                               }
-
-                               if ( type != NOTIFICATION_IMAGE_TYPE_NONE)
-                               {
-                                       if (getThumbnail(idx).compare(str))
-                                       {       
-                                               if (notification_set_image(m_notiHandle, type, str.c_str()) != NOTIFICATION_ERROR_NONE)
-                                               {
-                                                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification thumbnail error");
-                                               }
-                                               setUpdatedFlag(true);
-                                       }
-                               }
-                               idx ++;
-                       }
-               
-
-       
-               }       
-       }
-#endif 
-
-}
-
-StringArrayPtr StatusNotification::getThumbnails()
-{      
-
-       if (m_notiHandle)
-       {
-               if ( !m_thumbs->empty() )
-                               m_thumbs->clear();
-
-               char *thumb = NULL;
-               if (notification_get_image(m_notiHandle, NOTIFICATION_IMAGE_TYPE_LIST_1, &thumb) != NOTIFICATION_ERROR_NONE)
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification thumbnail error");
-               }
-               if (thumb)
-                       m_thumbs->push_back(thumb);
-               else
-                       m_thumbs->push_back(std::string("")); //set empty
-               thumb = NULL;
-               
-               if (notification_get_image(m_notiHandle, NOTIFICATION_IMAGE_TYPE_LIST_2, &thumb) != NOTIFICATION_ERROR_NONE)
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sub information error");
-               }       
-               if (thumb)
-                       m_thumbs->push_back(thumb);
-               else
-                       m_thumbs->push_back(std::string("")); //set empty
-               thumb = NULL;
-               
-               if (notification_get_image(m_notiHandle, NOTIFICATION_IMAGE_TYPE_LIST_3, &thumb) != NOTIFICATION_ERROR_NONE)
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sub information error");
-               }
-               
-               if (thumb)
-                       m_thumbs->push_back(thumb);
-               else
-                       m_thumbs->push_back(std::string("")); //set empty
-               thumb = NULL;
-
-               if (notification_get_image(m_notiHandle, NOTIFICATION_IMAGE_TYPE_LIST_4, &thumb) != NOTIFICATION_ERROR_NONE)
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sub information error");
-               }
-               
-               if (thumb)
-                       m_thumbs->push_back(thumb);
-               else
-                       m_thumbs->push_back(std::string("")); //set empty
-               thumb = NULL;
-#if 0  
-               if (notification_get_image(m_notiHandle, NOTIFICATION_IMAGE_TYPE_LIST_5, &thumb) != NOTIFICATION_ERROR_NONE)
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification sub information error");
-               }
-               
-               if (thumb)
-                       m_thumbs->push_back(thumb);
-               else
-                       m_thumbs->push_back(std::string("")); //set empty
-               thumb = NULL;
-#endif         
-       }       
-       return m_thumbs;
 }
 
-
-
 std::string StatusNotification::getBackground()
 {
+       LoggerI(" Handle : " << m_notiHandle);
+
        if (m_notiHandle)
        {
                char *background = NULL;
        
                if (notification_get_image(m_notiHandle, NOTIFICATION_IMAGE_TYPE_BACKGROUND, &background) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification background error");
+                       throw UnknownException( "get notification background error");
                }
                
                std::string notiBackground;
@@ -1542,62 +1614,91 @@ std::string StatusNotification::getBackground()
        }
        else
        {
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException( "notification handle is null");
        }
 
 }
 
 void StatusNotification::setBackground(const std::string imagePath)
 {
+       LoggerI(" imagePath : " << imagePath);
        if (m_notiHandle)
        {
                if (getBackground().compare(imagePath))
                {
                        if (notification_set_image(m_notiHandle,NOTIFICATION_IMAGE_TYPE_BACKGROUND, imagePath.c_str()) != NOTIFICATION_ERROR_NONE)
                        {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification sound error");
+                               throw UnknownException( "set notification sound error");
                        }
                        setUpdatedFlag(true);
                }
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException( "notification handle is null");
+       }
+}
+
+long StatusNotification::getNumber()
+{
+       LoggerI("Handle = " << m_notiHandle);
+       if (m_notiHandle)
+       {
+               long number = 0;
+               char *strNumber = NULL;
+
+               if (notification_get_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &strNumber) != NOTIFICATION_ERROR_NONE)
+               {
+                       throw UnknownException( "get notification background error");
+               }
+
+               if (strNumber)
+                       std::istringstream(strNumber) >> number;
+               else
+                       LoggerI("Number Is NULL");
+
+               LoggerI("number = " << number);
+
+               return number;
+       }
+       else
+       {
+               LoggerD("noti Handle is NULL");
+               return 0;
        }
 }
 
-unsigned int StatusNotification::getNumber()
+const char* StatusNotification::getStrNumber()
 {
+       LoggerI("Handle = " << m_notiHandle);
        if (m_notiHandle)
        {
-               int number = 0;
                char *strNumber = NULL;
 
                if (notification_get_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &strNumber) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification background error");
+                       throw UnknownException( "get notification background error");
+               }
+
+               if (!strNumber)
+               {
+                       return NULL;
                }
 
-               if (strNumber)
-                       std::istringstream(strNumber) >> number;
-
-               LogDebug("number = " << number);
-
-               if (number < 0 )
-                       number = 0;
-               return number;
+               return strNumber;
        }
        else
        {
-               LogDebug("noti Handle is NULL");
-               return 0;
+               LoggerD("noti Handle is NULL");
+               return NULL;
        }
 }
 
-void StatusNotification::setNumber(const unsigned int number)
+void StatusNotification::setNumber(const long number)
 {
+       LoggerI("Number = " << number);
        if (m_notiHandle)
        {
                if(number!=getNumber())
@@ -1605,28 +1706,26 @@ void StatusNotification::setNumber(const unsigned int number)
                        std::stringstream stream;
                        stream << number;
                        if (stream.fail()) {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException,
-                                                "Couldn't convert e-mail account id");
+                               throw UnknownException(
+                                                "Couldn't convert notification number");
                        }
                        
                        std::string strNumber = stream.str();           
                        if (notification_set_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, strNumber.c_str(),
                                NULL, NOTIFICATION_VARIABLE_TYPE_NONE) != NOTIFICATION_ERROR_NONE)
                        {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "set notification sound error");
+                               throw UnknownException( "set notification text error");
                        }
                        setUpdatedFlag(true);
                }
        }
        else
        {               
-               LogDebug("noti Handle is NULL");
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle is null");
+               LoggerD("noti Handle is NULL");
+               throw UnknownException( "notification handle is null");
        }
 }
 
-
-
 void* StatusNotification::getNotificationHandle()
 {
        return m_notiHandle;
@@ -1636,16 +1735,16 @@ void StatusNotification::setNotificationHandle(void *handle)
 {
        if (handle == NULL)
        {
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle null error");
+               throw UnknownException( "notification handle null error");
        }
-       LogDebug("handle = " << handle << " m_notiHandle = " << m_notiHandle);
+       LoggerI("handle = " << handle << " m_notiHandle = " << m_notiHandle);
        
        if (m_notiHandle != NULL)
        {       
                //delete old noti.
                if ( notification_delete(m_notiHandle) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification delete error");
+                       throw UnknownException( "notification delete error");
                }
                m_notiHandle = NULL;
        }
@@ -1653,562 +1752,502 @@ void StatusNotification::setNotificationHandle(void *handle)
        m_notiHandle = (notification_h)handle;
 }
 
-void StatusNotification::setNotificationLines()
+service_h StatusNotification::getService()
 {
-       if (m_notiHandle == NULL)
-       {
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "notification handle null error");
-       }
-       LogDebug("handle = " << m_notiHandle);
-
-       if (getLinesNum() > 0)
-               clearLines();
-
-       //getLine
-       std::vector<std::string> infos = getInformations();
-       std::vector<std::string> subInfos = getSubInformations();
-
-       LogDebug("info size = " << infos.size());
-       LogDebug("subInfo size = " << subInfos.size());
-
-       std::vector<std::string>::iterator it;
-
-       int idx = 0;
-
-       NotificationLineArrayPtr lines = getLines();
+       return m_service;
+}
 
-       for (it = infos.begin(); it < infos.end(); ++it) 
+std::string StatusNotification::getLight()
+{
+       LoggerI("get Light handle: " << m_notiHandle);
+       if (m_notiHandle)
        {
-               std::string info = *it;
-               LogDebug(" Info : " << info);
-               LogDebug("subInfo=" << subInfos[idx]);
-       
-               if (!(info.empty() && subInfos[idx].empty()))
+               int ledColor = 0;
+               notification_led_op_e type = NOTIFICATION_LED_OP_ON;
+               if (notification_get_led(m_notiHandle, &type, &ledColor) != NOTIFICATION_ERROR_NONE)
                {
-                       NotificationLinePtr line(new NotificationLine(m_notiHandle,idx,info,subInfos[idx]));
-                       lines->push_back(line);
+                       throw UnknownException("get notification Content error");
                }
-               idx++;
-       }
-       
-}
-
-DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplicationControl()
-{      
-       service_h service = NULL;
-       char *tempStr = NULL;
-       
-       DeviceAPI::Application::ApplicationControlPtr appControl(new DeviceAPI::Application::ApplicationControl());
-
-       try {
-               if (m_service)
+               std::string light;
+               std::stringstream stream;
+               if (NOTIFICATION_LED_OP_OFF != type)
                {
-                       appControl->setService_h(m_service);
-                       // mandatory
-                       if(service_get_operation(m_service, &tempStr) == SERVICE_ERROR_NONE)
-                       {
-                               LogDebug("Operation Str = " << tempStr);
-                               if (tempStr) 
-                               {
-                                       appControl->setOperation(tempStr);
-                                       free(tempStr);
-                                       tempStr = NULL;
-                               }
-                       }
-
-                       // optional
-                       if (service_get_mime(m_service, &tempStr) == SERVICE_ERROR_NONE)
-                       {
-                               LogDebug("Mime Str = " << tempStr);
-                               if (tempStr) 
-                               {
-                                       appControl->setMime(tempStr);
-                                       free(tempStr);
-                                       tempStr = NULL;
-                               }
-                       }
-
-                       // optional
-                       if (service_get_uri(m_service, &tempStr) == SERVICE_ERROR_NONE)
-                       {
-                               LogDebug("Uri Str = " << tempStr);
-                               if (tempStr)
-                               {
-                                       appControl->setUri(tempStr);
-                                       free(tempStr);
-                                       tempStr = NULL;
-                               }
-                       }
-
-                       if (service_get_category(m_service, &tempStr) == SERVICE_ERROR_NONE)
-                       {
-                               LogDebug("Category Str = " << tempStr);
-                               if (tempStr)
-                               {
-                                       appControl->setCategory(tempStr);
-                                       free(tempStr);
-                                       tempStr = NULL;
-                               }
-                       }
-                       
-                       // optional
-                       if ( service_foreach_extra_data(m_service, service_extra_data_cb,(void*)&appControl) != SERVICE_ERROR_NONE)
-                       {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification service uri error");
-                       }
-
-                       return appControl;
+                       stream <<  std::hex  << ledColor;
+                       light = "#" + stream.str();
                }
-
+               
+               return boost::to_lower_copy(light);
        }
-       Catch (WrtDeviceApis::Commons::Exception) 
+       else
        {
-               if (tempStr) 
+               throw UnknownException("notification handle is null");
+       }
+}
+
+bool StatusNotification::isColorFormatNumberic(std::string& color)
+{
+       //first check length
+       std::string hexCode = "0123456789abcdef";
+       if (color.length() == 7 && !color.compare(0, 1, "#") )
+       {
+               for ( size_t i = 1 ; i < color.length() ; i++)
                {
-                       free(tempStr);
-                       tempStr = NULL;
+                       if (std::string::npos == hexCode.find(color[i]))
+                               return false;
                }
+               return true;
+       }
+       return false;
+}
 
-               if (service)
+void StatusNotification::setLight(std::string color)
+{
+       LoggerI("set Light handle: " << m_notiHandle);
+       LoggerI("led Color : " << color);
+       if (m_notiHandle)
+       {       
+               color = boost::to_lower_copy(color);     //convert lowercase.
+               if ( isColorFormatNumberic(color))
                {
-                       free(service);
-                       service = NULL;
-               }       
+                       std::stringstream stream;       
+                       int ledColor = 0;
+                       notification_led_op_e type = NOTIFICATION_LED_OP_ON;
+                       std::string colorCode = color.substr(1, color.length());
 
-               if (_rethrown_exception.getCode() == WrtDeviceApis::Commons::ExceptionCodes::NullPointerException)
-               {
-                       ReThrowMsg(WrtDeviceApis::Commons::NullPointerException, _rethrown_exception.GetMessage());
+                       stream << std::hex << colorCode;
+                       LoggerI("LedColor = " << stream.str());
+                       stream >> ledColor;
+                       LoggerI("LedColor = " << ledColor);
 
+                       if (ledColor != 0)
+                               type = NOTIFICATION_LED_OP_ON_CUSTOM_COLOR;
+                       else
+                               type = NOTIFICATION_LED_OP_OFF;
+                       
+                       if (notification_set_led(m_notiHandle, type, ledColor) != NOTIFICATION_ERROR_NONE)
+                       {
+                               throw UnknownException("set notification led ");
+                       }                       
+                       
                }
                else
                {
-                       ReThrowMsg(WrtDeviceApis::Commons::UnknownException, _rethrown_exception.GetMessage());
-               }
-       }
-
-#if 0
-       try {
-               
-               if (m_service != NULL)
-               {
-                       retcode = service_clone(&service, m_service);
-                       
-                       if (retcode != SERVICE_ERROR_NONE)
-                       {       
-                               
-                               if (retcode == SERVICE_ERROR_OUT_OF_MEMORY)
-                               {
-                                       LogDebug("SERVICE_ERROR_OUT_OF_MEMORY");
-                               }
-                               else
+                       LoggerI("color.length()=" << color.length());
+                       if (color.length() == 0)
+                       {
+                               if (notification_set_led(m_notiHandle, NOTIFICATION_LED_OP_OFF, 0) != NOTIFICATION_ERROR_NONE)
                                {
-                                       LogDebug("UI_NOTIFICATION_ERROR_INVALID_PARAMETER");
+                                       throw UnknownException("set notification led ");
                                }
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification service error ");
                        }
                        else
                        {
-                               if (service == NULL)
-                               {
-                                       ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "get notification service ok, but service null");                        
-                               }
+                               throw InvalidValuesException("color code error!");
                        }
                }
+       }
+       else
+       {
+               throw UnknownException("notification handle is null");
+       }
+}
 
-               appControl->setService_h(service);
-
-               // mandatory
-               int ret = service_get_operation(service, &tempStr);
-               LogDebug("ret = " << ret);
-               //if (service_get_operation(service, &tempStr) != SERVICE_ERROR_NONE)
-               if(ret != SERVICE_ERROR_NONE)
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification service operation error");                 
-               }
+unsigned long StatusNotification::getLightOnTime()
+{
+       LoggerI("get Light on Time handle: " << m_notiHandle);
+       if (m_notiHandle)
+       {
+               int onTime = 0;
+               int offTime = 0;
                
-               LogDebug("temp Str = " << tempStr);
-
-               if (tempStr) 
-               {
-                       appControl->setOperation(tempStr);
-                       free(tempStr);
-                       tempStr = NULL;
-               }
-               else 
-               {
-                       ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "get notification service operation ok, but null");                      
-               }
-
-               // optional
-               if (service_get_mime(service, &tempStr) == SERVICE_ERROR_NONE)
+               if (notification_get_led_time_period(m_notiHandle, &onTime, &offTime ) != NOTIFICATION_ERROR_NONE)
                {
-                       if (tempStr) 
-                       {
-                               appControl->setMime(tempStr);
-                               free(tempStr);
-                               tempStr = NULL;
-                       }
-               }
-
-               // optional
-               if (service_get_uri(service, &tempStr) == SERVICE_ERROR_NONE)
-               {
-                       if (tempStr)
-                       {
-                               appControl->setUri(tempStr);
-                               free(tempStr);
-                               tempStr = NULL;
-                       }
+                       throw UnknownException("set notification led ");
                }
-
-               // optional
-               if ( service_foreach_extra_data(service, service_extra_data_cb,(void*)&appControl) != SERVICE_ERROR_NONE)
-               {
-                       LogDebug(error);
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification service uri error");
-               }
-
-               return appControl;
+               LoggerI("onTime " << onTime);
                
-       }       
-       Catch (WrtDeviceApis::Commons::Exception) 
+               return (unsigned long) onTime;
+       }
+       else
        {
-               if (tempStr) 
-               {
-                       free(tempStr);
-                       tempStr = NULL;
-               }
-
-               if (service)
-               {
-                       free(service);
-                       service = NULL;
-               }       
-
-               if (_rethrown_exception.getCode() == WrtDeviceApis::Commons::ExceptionCodes::NullPointerException)
-               {
-                       ReThrowMsg(WrtDeviceApis::Commons::NullPointerException, _rethrown_exception.GetMessage());
-
-               }
-               else
-               {
-                       ReThrowMsg(WrtDeviceApis::Commons::UnknownException, _rethrown_exception.GetMessage());
-               }
-
+               throw UnknownException("notification handle is null");
        }
-#endif
-
-       return appControl;
 }
 
-void StatusNotification::setApplicationControl(DeviceAPI::Application::ApplicationControlPtr appControl)
+void StatusNotification::setLightOnTime(unsigned long time)
 {
-
-       LogDebug("Entered m_service : " << m_service);
-       
-       if(m_service == NULL && service_create(&m_service) != SERVICE_ERROR_NONE)
-       {
-               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service creation error");
-       }
-       else
+       LoggerI("set Light on Time handle: " << m_notiHandle);
+       LoggerI("itme = " << time);
+       if (m_notiHandle)
        {
-               LogDebug("getOperation : " << appControl->getOperation().c_str());
-               if (appControl->getOperation().size() != 0)
-               {
-                       if (service_set_operation(m_service, appControl->getOperation().c_str()) != SERVICE_ERROR_NONE)
-                       {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service set operation error");
-                       }
-               }
-                       
-               // optional
-               LogDebug("getUri : " << appControl->getUri().c_str());
-               if (appControl->getUri().size() != 0)
-               {
-                       if (service_set_uri(m_service, appControl->getUri().c_str() ) != SERVICE_ERROR_NONE)
-                       {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service set uri error");
-                       }
-               }
-
-               // optional
-               LogDebug("getMime : " << appControl->getMime().c_str());
-               if (appControl->getMime().size() != 0)
-               {
-                       if (service_set_mime(m_service, appControl->getMime().c_str() ) != SERVICE_ERROR_NONE)
-                       {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service set mime error");
-                       }
-               }
-
-               LogDebug("Category : " << appControl->getCategory().c_str());
-               if (appControl->getCategory().size() != 0)
-               {
-                       if (service_set_category(m_service, appControl->getCategory().c_str() ) != SERVICE_ERROR_NONE)
-                       {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service set mime error");
-                       }
-               }
-
-               //remove key
-               if ( service_foreach_extra_data(m_service, service_extra_data_delete_cb, NULL) != SERVICE_ERROR_NONE)
+               int offTime = getLightOffTime();
+               
+               if (notification_set_led_time_period(m_notiHandle, time, offTime ) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification service uri error");
+                       throw UnknownException("set notification led ");
                }
-                               
-               std::vector<DeviceAPI::Application::ApplicationControlDataPtr> appControlDataArray = appControl->getAppControlDataArray();
-               size_t index = 0;
-
-               LogDebug (" App Control Datas Count : " << appControlDataArray.size());
-
-               DeviceAPI::Application::ApplicationControlDataArray::iterator iter;
-
-               for(iter = appControlDataArray.begin(); iter != appControlDataArray.end(); iter++)
-               {
-                       DeviceAPI::Application::ApplicationControlDataPtr appControlData = *iter;
-                       std::string key = appControlData->getKey();
-                       LogDebug(" key : " << key);
-               
-                       if (key.empty())
-                               continue;
                
-                       std::vector<std::string> value = appControlDataArray[index]->getValue();
-                       const char **arrayValue = (const char**)calloc(sizeof(char*), value.size());
-   
-                       for (size_t indexArray = 0; indexArray < value.size(); indexArray++)
-                       {
-                               arrayValue[indexArray] = (char*)value[indexArray].c_str();
-                               LogDebug( " value : " << arrayValue[indexArray]);
-                       }
+       }
+       else
+       {
+               throw UnknownException("notification handle is null");
+       }
+}
 
-                       const char* strKey = key.c_str();
-                       LogDebug( " value size: " << value.size());
-                       if (service_add_extra_data_array(m_service, strKey, arrayValue, value.size()) != SERVICE_ERROR_NONE)
-                       {
-                               ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service set extra data error");                     
-                       }
-                        
-                       if (arrayValue)
-                               free(arrayValue);
-               }                                       
+unsigned long StatusNotification::getLightOffTime()
+{
 
-               bundle *bundle_data=NULL;
+       LoggerI("get Light on Time handle: " << m_notiHandle);
+       if (m_notiHandle)
+       {
+               int onTime = 0;
+               int offTime = 0;
                
-               if(service_to_bundle(m_service, &bundle_data) != SERVICE_ERROR_NONE)
+               if (notification_get_led_time_period(m_notiHandle, &onTime, &offTime ) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service get bundle");                       
+                       throw UnknownException("set notification led ");
                }
+               LoggerI("offTime " << offTime);
                
-               if (bundle_data)
-               {
-                       notification_set_execute_option(m_notiHandle, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,
-                               NULL,NULL, bundle_data);
-                       //bundle_free(bundle_data);     
-               }
-                               
-       }       
+               return offTime;
+       }
+       else
+       {
+               throw UnknownException("notification handle is null");
+       }
 
 }
 
-void StatusNotification::setApplicationId(const std::string& appId)
+void StatusNotification::setLightOffTime(unsigned long time)
 {
-       LogDebug("m_service = " << m_service << " appId = " << appId);
-       if (!m_service)
-       {       
-               LogDebug("m_service = " << m_service);
-               if (service_create(&m_service) != SERVICE_ERROR_NONE)
+       LoggerI("set Light off Time handle: " << m_notiHandle);
+       LoggerI("time = " << time);
+       if (m_notiHandle)
+       {
+               int onTime = getLightOnTime();
+               
+               if (notification_set_led_time_period(m_notiHandle, onTime, time ) != NOTIFICATION_ERROR_NONE)
                {
-                       LogDebug("Create Service Failed..");
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service creation error");
+                       throw UnknownException("set notification led ");
                }
        }
-
-       if (m_service)
+       else
        {
-               if (service_set_app_id(m_service, appId.c_str())!= SERVICE_ERROR_NONE)
+               throw UnknownException("notification handle is null");
+       }
+}
+
+//Detail Info
+void StatusNotification::loadDetailInfos()
+{
+       LoggerI("noti Handle = " << m_notiHandle);
+
+        if (m_notiHandle)
+        {
+               for ( int idx = 0; idx < MAX_NOTIFICATION_DETAIL_INFO_LENGTH; idx++)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service set appId error");  
+                   if (!isNullInformation(idx))
+                   {
+                           std::string main = getInformation(idx);
+                           std::string sub = getSubInformation(idx);
+
+                           LoggerI("Main : [" << main << "] Sub : ['" << sub <<"]");      
+                           
+                           NotificationDetailInfo *info = new NotificationDetailInfo(m_notiHandle, idx, main, sub);
+                           m_detailInfos.push_back(info);
+                   }
                }
+        }
+        else
+       {               
+               LoggerD("noti Handle is NULL");
+               throw UnknownException( "notification handle is null");
        }
+        
+}
 
-#if 0
-       int retcode = 0;
-       service_h service = NULL;
-       char* operation = NULL;
-       LogDebug("Entered : " << appId);
+std::vector<NotificationDetailInfo*> StatusNotification::getDetailInfos() const
+{
+       return m_detailInfos;
+}
+
+void StatusNotification::setDetailInfos(const std::vector<NotificationDetailInfo*> value)
+{
+    LoggerI("DetailInfos = " << value.size());
+
+    if (m_notiHandle)
+    {
+        std::vector<NotificationDetailInfo*>::const_iterator it;
+        
+        int idx = 0;
+        for (it = value.begin(); it < value.end(); ++it)
+        {
+            NotificationDetailInfo* info = *it;
+            if ( idx < MAX_NOTIFICATION_DETAIL_INFO_LENGTH )
+            {
+            
+                LoggerI("main " << info->getMainText() << " sub " << info->getSubText() );
+               setInformation(info->getMainText(), idx);
+               setSubInformation(info->getSubText(), idx);
+            }
+            idx ++;
+        }
+    
+        m_detailInfos = value;
+    }
+    else
+    {  
+        LoggerD("noti Handle is NULL");
+        throw UnknownException( "notification handle is null");
+    }
        
-       LogDebug("m_service = " << m_service);
-       if (m_service != NULL)
-       {
-               retcode = service_clone(&service, m_service);   
-               if (retcode != SERVICE_ERROR_NONE)
-               {                       
-                       if (retcode == SERVICE_ERROR_OUT_OF_MEMORY)
-                       {
-                               LogDebug("SERVICE_ERROR_OUT_OF_MEMORY");
-                       }
-                       else
-                       {
-                               LogDebug("UI_NOTIFICATION_ERROR_INVALID_PARAMETER");
-                       }
+}
 
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification service error ");
-               }
+int StatusNotification::getDetailInfosNum() const
+{
+       return m_detailInfos.size();
+}
+
+void StatusNotification::clearDetailInfos()
+{
+       if ( !m_detailInfos.empty() )
+       {
+               std::vector<NotificationDetailInfo*>::const_iterator it;
+              
+               int idx = 0;
+               for (it = m_detailInfos.begin(); it < m_detailInfos.end(); ++it)
+               {
+                   NotificationDetailInfo* info = *it;
+                   LoggerI("Delete Detail Info : " << info);
+                   if (info)
+                       delete info;
+                   idx ++;
+               }
+               m_detailInfos.clear();          //clear
        }
+}
 
-       if(service == NULL)
+std::string StatusNotification::getInformation(int index)
+{
+       if (m_notiHandle)
        {
-               if (service_create(&service) != SERVICE_ERROR_NONE)
+               notification_text_type_e type = NOTIFICATION_TEXT_TYPE_NONE; 
+               switch (index)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service creation error");
+                       case 0:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_1;
+                               break;
+                       case 1:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_2;
+                               break;
+                       case 2:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_3;
+                               break;
+                       default :
+                               type = NOTIFICATION_TEXT_TYPE_NONE;
                }
-       }
-
-       if(service)
-       {       
-               if (service_get_operation(service,      &operation) != SERVICE_ERROR_NONE)
+               char *info = NULL;
+               
+               if (NOTIFICATION_TEXT_TYPE_NONE != type && notification_get_text(m_notiHandle, type, &info) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service get operation error");
+                       throw UnknownException("Detail Info index value is invalid or mainText value getting is failed in Detail Info.");
                }
 
-               if (operation) 
+               std::string strInfo;
+               if (info)
+                       strInfo = info;
+               LoggerI(" info " << strInfo);
+               return strInfo;
+
+       }
+       else
+       {       
+               LoggerW("noti Handle is NULL");
+               throw UnknownException( "notification handle is null");
+       }
+       
+}
+
+bool StatusNotification::isNullInformation(int index)
+{
+       if (m_notiHandle)
+       {
+               notification_text_type_e type = NOTIFICATION_TEXT_TYPE_NONE; 
+               switch (index)
                {
-                       free(operation);
-                       operation = NULL;
+                       case 0:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_1;
+                               break;
+                       case 1:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_2;
+                               break;
+                       case 2:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_3;
+                               break;
+                       default :
+                               type = NOTIFICATION_TEXT_TYPE_NONE;
                }
-               else if (service_set_operation(service, SERVICE_OPERATION_DEFAULT) != SERVICE_ERROR_NONE)
+               char *info = NULL;
+               
+               if (NOTIFICATION_TEXT_TYPE_NONE != type && notification_get_text(m_notiHandle, type, &info) != NOTIFICATION_ERROR_NONE)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service set operation error");
+                       throw UnknownException("Detail Info index value is invalid or mainText value getting is failed in Detail Info.");
                }
                
-               if (service_set_app_id(service, appId.c_str())!= SERVICE_ERROR_NONE)
+               if (info)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "service set appId error");  
+                       LoggerI("is not null");
+                       return false;
                }
-
-               if (m_service != NULL)
+               else
                {
-                       service_destroy(m_service);
-                       m_service = NULL;
+                       LoggerI("is null");
+                       return true;
                }
-               
-               m_service = service;    //set service.  
+
+       }
+       else
+       {       
+               LoggerW("noti Handle is NULL");
+               throw UnknownException( "notification handle is null");
        }
-#endif
 }
 
-std::string StatusNotification::getApplicationId()
+std::string StatusNotification::getSubInformation(int index)
 {
-       std::string retString;
-       service_h service = NULL;
-       char* appIdStr = NULL;
-       
-       if (m_service != NULL)
+       if (m_notiHandle)
        {
-               int retcode;
-               retcode = service_clone(&service, m_service);   
-               
-               if (retcode != SERVICE_ERROR_NONE)
+               notification_text_type_e type = NOTIFICATION_TEXT_TYPE_NONE; 
+               switch (index)
                {
-                       if (retcode == SERVICE_ERROR_OUT_OF_MEMORY)
-                       {
-                               LogDebug("SERVICE_ERROR_OUT_OF_MEMORY");
-                       }
-                       else
-                       {
-                               LogDebug("UI_NOTIFICATION_ERROR_INVALID_PARAMETER");
-                       }
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get notification service error ");
+                       case 0:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_SUB_1;
+                               break;
+                       case 1:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_SUB_2;
+                               break;
+                       case 2:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_SUB_3;
+                               break;
+                       default :
+                               type = NOTIFICATION_TEXT_TYPE_NONE;
                }
-               else
+                               
+               char *subInfo = NULL;
+               
+               if (NOTIFICATION_TEXT_TYPE_NONE != type && notification_get_text(m_notiHandle, type, &subInfo) != NOTIFICATION_ERROR_NONE)
                {
-                       if (service == NULL)
-                       {
-                               ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "get notification service ok, but service null");                        
-                       }
+                       throw UnknownException("Detail Info index value is invalid or subText value getting is failed in Detail Info.");
                }
+
+               std::string strSubInfo;
+               if (subInfo)
+                       strSubInfo = subInfo;
+               LoggerI(" subInfo " << strSubInfo);
+               return strSubInfo;
+                               
+       }
+       else
+       {       
+               LoggerW("noti Handle is NULL");
+               throw UnknownException ("notification handle is null");
        }
+       
+}
 
-       if (service != NULL) 
+void StatusNotification::setInformation( const std::string& info, int index)
+{
+       if (m_notiHandle)
        {
-               if (service_get_app_id(service, &appIdStr) != SERVICE_ERROR_NONE)
+               int idx = index;
+               LoggerD(" index : " << idx);
+               LoggerD(" log : " << info);
+               notification_text_type_e type = NOTIFICATION_TEXT_TYPE_NONE; 
+               
+               switch (idx)
                {
-                       ThrowMsg(WrtDeviceApis::Commons::UnknownException, "get a appId error");
+                       case 0:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_1;
+                               break;
+                       case 1:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_2;
+                               break;
+                       case 2:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_3;
+                               break;
+                       default :
+                               type = NOTIFICATION_TEXT_TYPE_NONE;
                }
 
-               if (appIdStr != NULL)
+               if ( type != NOTIFICATION_TEXT_TYPE_NONE)
                {
-                       retString = appIdStr;
-                       free(appIdStr);
+                       if (getInformation(idx).compare(info) || isNullInformation(idx))
+                       {
+                               if (notification_set_text(m_notiHandle, type, info.c_str(),
+                                       NULL, NOTIFICATION_VARIABLE_TYPE_NONE) != NOTIFICATION_ERROR_NONE)
+                               {
+                                       throw UnknownException("set notification sound error");
+                               }
+                               setUpdatedFlag(true);
+                       }
+               }
+               else
+               {       
+                       LoggerW("noti Handle is NULL");
+                       throw UnknownException("notification handle is null");
                }
        }
-       LogDebug(retString);
-       
-       return retString;
-}
-
-service_h StatusNotification::getService()
-{
-       return m_service;
-}
-
-
-NotificationLineArrayPtr StatusNotification::getLines() const
-{
-       return m_lines;
+       else
+       {       
+               LoggerW("noti Handle is NULL");
+               throw UnknownException("notification handle is null");
+       }
 }
 
-int StatusNotification::getLinesNum() const
+void StatusNotification::setSubInformation( const std::string& subInfo, int index)
 {
-       return m_lines->size();
-}
 
-void StatusNotification::setLines(const NotificationLineArrayPtr &value)
-{
-       LogDebug("setlines");
-       if (value == NULL)
-       {
-               m_lines = NotificationLineArrayPtr(new NotificationLineArray());
-       }
-       else
+       if (m_notiHandle)
        {
-               m_lines = value;
-
-               NotificationLineArray::iterator iter;
-               int index = 0;
-                for(iter = m_lines->begin(); iter != m_lines->end(); iter++) 
-                { 
-                               NotificationLinePtr line = *iter;
-                       LogDebug("info = " << line->getInformation());
-                       LogDebug("sub info = " << line->getSubInformation());
-                       
-                       if ( index < MAX_NOTIFICATION_LINE_LENGTH)
-                       {       
-                               setInformation(line->getInformation(),index);
-                               setSubInformation(line->getSubInformation(),index);
-                       }
-                       index ++;
-               }
+               int idx = index;
+               LoggerD(" index : " << idx);
+               LoggerD(" log : " << subInfo);
+               notification_text_type_e type = NOTIFICATION_TEXT_TYPE_NONE; 
                
-               //clean empty solt.`
-               for ( ;index < MAX_NOTIFICATION_LINE_LENGTH; index++)
+               switch (idx)
+               {
+                       case 0:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_SUB_1;
+                               break;
+                       case 1:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_SUB_2;
+                               break;
+                       case 2:
+                               type = NOTIFICATION_TEXT_TYPE_INFO_SUB_3;
+                               break;
+                       default :
+                               type = NOTIFICATION_TEXT_TYPE_NONE;
+               }
+
+               if ( type != NOTIFICATION_TEXT_TYPE_NONE)
                {
-                       setInformation("", index);
-                       setSubInformation("", index);
+                       if (getSubInformation(idx).compare(subInfo))
+                       {
+                               if (notification_set_text(m_notiHandle, type, subInfo.c_str(),
+                                       NULL, NOTIFICATION_VARIABLE_TYPE_NONE) != NOTIFICATION_ERROR_NONE)
+                               {
+                                       throw UnknownException("set notification sound error");
+                               }
+                               setUpdatedFlag(true);
+                       }
                }
        }
+       else
+       {       
+               LoggerW("noti Handle is NULL");
+               throw UnknownException("notification handle is null");
+       }
 }
 
-void StatusNotification::addLine(const NotificationLinePtr &value)
-{
-       m_lines->push_back(value);
-}
-       
-void StatusNotification::clearLines()
-{
-       m_lines->clear();
-}
-
-}
-}
-
+} // Notification
+} // DeviceAPI