Update change log and spec for wrt-plugins-tizen_0.4.58
[platform/framework/web/wrt-plugins-tizen.git] / src / Notification / StatusNotification.cpp
index ad8e5d5..6e57f94 100755 (executable)
@@ -19,7 +19,9 @@
 #include <Logger.h>
 #include <sstream>
 #include <appsvc/appsvc.h>
+#include <sstream>
 
+#include <boost/algorithm/string.hpp>
 #include "StatusNotification.h"
 
 namespace DeviceAPI {
@@ -30,39 +32,39 @@ namespace Notification {
 #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);
 
 //callback functions.
 static bool service_extra_data_cb(service_h service, const char *key, void *user_data)
 {
-       LogInfo("OK");
+       LoggerI("OK");
        char **value = NULL;
        int length = 0;
 
        if (user_data != NULL && key != NULL)
        {       
-               LogInfo("user data & key is existed");
+               LoggerI("user data & key is existed");
 
                DeviceAPI::Application::ApplicationControlPtr* appControl = 
                        (DeviceAPI::Application::ApplicationControlPtr*)(user_data);
 
                DeviceAPI::Application::ApplicationControlDataPtr data(new DeviceAPI::Application::ApplicationControlData());
-               LogInfo("key = " << key);
+               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)
                {
-                       LogInfo("extra_data_array length = " << length);
+                       LoggerI("extra_data_array length = " << length);
                        
                        if (value != NULL && length != 0)
                        {
-                               LogInfo("extra_data_length = " << length);
+                               LoggerI("extra_data_length = " << length);
                                data->setKey(key);
                                for (index = 0; index < length; index++)
                                {
-                                       LogInfo("Value=" << value[index]);
+                                       LoggerI("Value=" << value[index]);
                                        keyValue.push_back(value[index]);
                                }
                                
@@ -77,30 +79,15 @@ static bool service_extra_data_cb(service_h service, const char *key, void *user
        return true;
 }
 
-static bool service_extra_data_delete_cb(service_h service, const char *key, void *user_data)
-{
-       LogInfo("OK");
-       if (key != NULL)
-       {       
-               LogInfo("del key = " << key);
-               
-               if (service_remove_extra_data(service, key) != SERVICE_ERROR_NONE)
-               {
-                       LogWarning("remove extra data failed");
-                       return false;
-               }
-       }
-       return true;
-}
-
 StatusNotification::StatusNotification(NotificationType statusType) :
        m_notiType(NOTI_TYPE_NONE),
        m_service(NULL),
        m_notiHandle(NULL),
        m_progressType(NOTI_PROGRESS_TYPE_PERCENTAGE),
-       m_notiUpdated(false)
+       m_notiUpdated(false),
+       m_launchFlag(false)
 {
-       LogInfo("statusType =" << statusType);
+       LoggerI("statusType =" << statusType);
 
        notification_type_e type = NOTIFICATION_TYPE_NONE;
        setNotiType(statusType);
@@ -115,25 +102,29 @@ StatusNotification::StatusNotification(NotificationType statusType) :
        }
        else
        {
-               LogInfo(" invalide noti type");
+               LoggerI(" invalide noti type");
                throw TypeMismatchException("value is not notification type");
        }
 
-       setProgressType(NOTI_PROGRESS_TYPE_PERCENTAGE); //default
+       //setProgressType(NOTI_PROGRESS_TYPE_PERCENTAGE);       //default
 
-       LogInfo("Notification Type : " << type);
+       LoggerI("Notification Type : " << type);
 
        notification_h noti = notification_create(type);        //create notificatin.
        if ( noti )
        {
-               LogInfo("noti =" << noti);
+               LoggerI("noti =" << noti);
                setNotificationHandle((void*)noti);
 
                if (NOTIFICATION_TYPE_ONGOING ==  type)
                {       //ongoing no ticker.
-                       LogInfo("ongoing type");
-                       notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY |NOTIFICATION_DISPLAY_APP_INDICATOR );
+                       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");
+                       }
                }
+               
        }
        else
        {
@@ -150,9 +141,10 @@ StatusNotification::StatusNotification(void* noti) :
        m_service(NULL),
        m_notiHandle(NULL),
        m_progressType(NOTI_PROGRESS_TYPE_PERCENTAGE),
-       m_notiUpdated(false)
+       m_notiUpdated(false),
+       m_launchFlag(false)
 {
-       LogInfo("noti : " << noti);
+       LoggerI("noti : " << noti);
        
        notification_h notification = (notification_h)noti;
 
@@ -190,34 +182,46 @@ StatusNotification::StatusNotification(void* noti) :
                        }
                }
 
-               LogInfo(" 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();
 
+#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);
-               LogInfo("ret = " << ret); 
+               LoggerI("ret = " << ret); 
                if (ret == NOTIFICATION_ERROR_NONE)
                {
-                       LogInfo(" bundle = " << bSvc);
+                       LoggerI(" bundle = " << bSvc);
                        if (bSvc)
                        {
-                               LogInfo("bundle is valid");     
+                               LoggerI("bundle is valid");     
                                int ret = service_create_event(bSvc, &m_service);
                                if (ret != SERVICE_ERROR_NONE)
                                {
-                                       LogInfo("Service Create Event Error");
+                                       LoggerI("Service Create Event Error");
                                        throw UnknownException("can't make service object");
                                }
                        }
@@ -241,12 +245,13 @@ StatusNotification::StatusNotification(int privID) :
        m_service(NULL),
        m_notiHandle(NULL),
        m_progressType(NOTI_PROGRESS_TYPE_PERCENTAGE),
-       m_notiUpdated(false)
+       m_notiUpdated(false),
+       m_launchFlag(false)
 {
-       LogInfo("priv ID : " << privID);
+       LoggerI("priv ID : " << privID);
 
        notification_h notification = notification_load( NULL, privID); //load notification.
-       LogInfo(" notification " << notification);
+       LoggerI(" notification " << notification);
 
        if ( notification )
        {
@@ -281,33 +286,45 @@ StatusNotification::StatusNotification(int privID) :
                        }
                }
 
-               LogInfo(" 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();
-
+#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);
-               LogInfo("ret = " << ret); 
+               LoggerI("ret = " << ret); 
                if (ret == NOTIFICATION_ERROR_NONE)
                {
-                       LogInfo(" bundle = " << bSvc);
+                       LoggerI(" bundle = " << bSvc);
                        if (bSvc)
                        {
-                               LogInfo("bundle is valid");     
+                               LoggerI("bundle is valid");     
                                int ret = service_create_event(bSvc, &m_service);
                                if (ret != SERVICE_ERROR_NONE)
                                {
-                                       LogInfo("Service Create Event Error");
+                                       LoggerI("Service Create Event Error");
                                        throw UnknownException("can't make service object");
                                }
                        }
@@ -328,21 +345,20 @@ StatusNotification::StatusNotification(int privID) :
 
 StatusNotification::~StatusNotification() 
 {
-       LogInfo(" notification = " << m_notiHandle);
+       LoggerI(" notification = " << m_notiHandle);
 
        //clear thumbnail.
        //clearDetailInfos();
        
        if (m_notiHandle)
        {
-#if 0
-               LogInfo(" 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...");
@@ -392,7 +408,7 @@ std::string StatusNotification::getStatusType()
 
 void StatusNotification::setStatusType(std::string type)
 {
-       LogInfo("type = " << type);
+       LoggerI("type = " << type);
        
        NotificationType notiType = NOTI_TYPE_NONE; 
        
@@ -407,13 +423,13 @@ void StatusNotification::setStatusType(std::string type)
        else
        throw InvalidValuesException("Invalid Status Type.");
 
-       LogInfo("Notification type = " << notiType);
+       LoggerI("Notification type = " << notiType);
        setNotiType(notiType);
 }
 
 time_t StatusNotification::getPostedTime()
 {
-       LogInfo("get m_notiHandle = " << m_notiHandle);
+       LoggerI("get m_notiHandle = " << m_notiHandle);
        
        time_t postedTime = 0;
        
@@ -425,7 +441,7 @@ time_t StatusNotification::getPostedTime()
                }
        }
        
-       LogInfo("posted Time =" << ctime(&postedTime));
+       LoggerI("posted Time =" << ctime(&postedTime));
        return postedTime;
 }
 
@@ -440,7 +456,13 @@ std::string StatusNotification::getTitle()
                        throw UnknownException("get notification title error");
                }
 
-               std::string notiTitle(title);
+               std::string notiTitle;
+               if (title)
+               {               
+                       notiTitle = title;
+                       LoggerI(" get title : " << title);
+               }
+
                return notiTitle;       
        }
        else
@@ -451,10 +473,10 @@ std::string StatusNotification::getTitle()
 
 void StatusNotification::setTitle(std::string title)
 {
-       LogInfo("Title : " << title);
+       LoggerI("Title : " << title);
        if (m_notiHandle)
        {
-               LogInfo("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(), 
@@ -467,20 +489,19 @@ void StatusNotification::setTitle(std::string title)
                }
                else
                {
-                       LogInfo(" title = " << title << " getTitle = " << getTitle());
+                       LoggerI(" title = " << title << " getTitle = " << getTitle());
                }
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
 
-
 std::string StatusNotification::getContent()
 {
-       LogInfo("get Content handle: " << m_notiHandle);
+       LoggerI("get Content handle: " << m_notiHandle);
        if (m_notiHandle)
        {
                char *content = NULL;
@@ -490,12 +511,13 @@ std::string StatusNotification::getContent()
                        throw UnknownException("get notification Content error");
                }
                
-               LogInfo(" get Content : " << content);
-
                std::string notiContent;
                
                if(content)
+               {
                        notiContent = content;
+                       LoggerI(" get Content : " << content);
+               }
 
                return notiContent;
                
@@ -507,9 +529,29 @@ std::string StatusNotification::getContent()
        
 }
 
+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)
+               {
+                       throw UnknownException("get notification Content error");
+               }
+               
+               return content;
+       }
+       else
+       {
+               throw UnknownException("notification handle is null");
+       }
+}
+
 void StatusNotification::setContent(std::string content)
 {
-       LogInfo("Content : " << content);
+       LoggerI("Content : " << content);
        if (m_notiHandle)
        {
                if((getContent()).compare(content))     //different value.
@@ -524,7 +566,7 @@ void StatusNotification::setContent(std::string content)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
@@ -532,7 +574,7 @@ void StatusNotification::setContent(std::string content)
 std::string StatusNotification::getIconPath()
 {
 
-       LogInfo("m_notiHandle = " << m_notiHandle);
+       LoggerI("m_notiHandle = " << m_notiHandle);
        if (m_notiHandle)
        {
                char *iconPath = NULL;
@@ -541,8 +583,12 @@ std::string StatusNotification::getIconPath()
                        throw UnknownException("get notification icon path error");
                }
 
-               std::string notiIconPath(iconPath);
-               LogInfo("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)
@@ -562,7 +608,7 @@ void StatusNotification::setIconPath(const std::string& iconPath)
 {
        if (m_notiHandle)
        {
-               LogInfo("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)
@@ -574,14 +620,14 @@ void StatusNotification::setIconPath(const std::string& iconPath)
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
 
 std::string StatusNotification::getSoundPath()
 {
-       LogInfo("Handle = " << m_notiHandle);
+       LoggerI("Handle = " << m_notiHandle);
 
        if (m_notiHandle)
        {
@@ -592,21 +638,25 @@ std::string StatusNotification::getSoundPath()
                {
                        throw UnknownException("get notification sound error");
                }
-
-               LogInfo(" sound type = " << type << " path = " << soundPath);
-               if ( type == NOTIFICATION_SOUND_TYPE_USER_DATA )
-               {
-                       LogInfo("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");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
@@ -615,7 +665,7 @@ void StatusNotification::setSoundPath(const std::string& sound)
 {
        if (m_notiHandle)
        {
-               LogInfo("sound path = " << sound << " origin sound path = " << getSoundPath());
+               LoggerI("sound path = " << sound << " origin sound path = " << getSoundPath());
                
                if( getSoundPath().compare(sound))
                {
@@ -628,10 +678,10 @@ void StatusNotification::setSoundPath(const std::string& sound)
 
                if (sound.empty()) 
                {
-                   LogInfo("sound path is NULL");
+                   LoggerI("sound path is NULL");
                    if ( NOTI_TYPE_ONGOING == getNotiType() || NOTI_TYPE_PROGRESS == getNotiType())
                    {
-                               LogInfo("Ongoing Type" );
+                               LoggerI("Ongoing Type" );
                                if (notification_set_sound(m_notiHandle,NOTIFICATION_SOUND_TYPE_NONE, NULL) != NOTIFICATION_ERROR_NONE)
                                {
                                        throw UnknownException("set notification sound error");
@@ -649,14 +699,14 @@ void StatusNotification::setSoundPath(const std::string& sound)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
 
 bool StatusNotification::getDefaultVibration()
 {
-       LogInfo("getDefaultVibration");
+       LoggerI("getDefaultVibration");
        if (m_notiHandle)
        {
                notification_vibration_type_e vib_type;
@@ -676,7 +726,7 @@ bool StatusNotification::getDefaultVibration()
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 
@@ -685,11 +735,11 @@ bool StatusNotification::getDefaultVibration()
 
 void StatusNotification::setDefaultVibration(const bool& vibration) 
 {
-    LogInfo("vibration = " << vibration);
+    LoggerI("vibration = " << vibration);
        if (m_notiHandle)
        {
                notification_vibration_type_e vib_type = NOTIFICATION_VIBRATION_TYPE_NONE;
-               LogInfo("old vibration = " << getDefaultVibration());
+               LoggerI("old vibration = " << getDefaultVibration());
                if (getDefaultVibration() != vibration)
                {
                        if (vibration)
@@ -700,7 +750,7 @@ void StatusNotification::setDefaultVibration(const bool& vibration)
                        {
                                vib_type = NOTIFICATION_VIBRATION_TYPE_NONE;
                        }
-                       LogInfo("type vibration type= " << vib_type);
+                       LoggerI("type vibration type= " << vib_type);
 
                        if (notification_set_vibration(m_notiHandle, vib_type , NULL) != NOTIFICATION_ERROR_NONE)
                        {
@@ -711,7 +761,7 @@ void StatusNotification::setDefaultVibration(const bool& vibration)
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 
@@ -732,7 +782,7 @@ DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplication
                        // mandatory
                        if(service_get_operation(m_service, &tempStr) == SERVICE_ERROR_NONE)
                        {
-                               LogDebug("Operation Str = " << tempStr);
+                               LoggerD("Operation Str = " << tempStr);
                                if (tempStr) 
                                {
                                        appControl->setOperation(tempStr);
@@ -744,7 +794,7 @@ DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplication
                        // optional
                        if (service_get_mime(m_service, &tempStr) == SERVICE_ERROR_NONE)
                        {
-                               LogDebug("Mime Str = " << tempStr);
+                               LoggerD("Mime Str = " << tempStr);
                                if (tempStr) 
                                {
                                        appControl->setMime(tempStr);
@@ -756,7 +806,7 @@ DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplication
                        // optional
                        if (service_get_uri(m_service, &tempStr) == SERVICE_ERROR_NONE)
                        {
-                               LogDebug("Uri Str = " << tempStr);
+                               LoggerD("Uri Str = " << tempStr);
                                if (tempStr)
                                {
                                        appControl->setUri(tempStr);
@@ -767,7 +817,7 @@ DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplication
 
                        if (service_get_category(m_service, &tempStr) == SERVICE_ERROR_NONE)
                        {
-                               LogDebug("Category Str = " << tempStr);
+                               LoggerD("Category Str = " << tempStr);
                                if (tempStr)
                                {
                                        appControl->setCategory(tempStr);
@@ -800,7 +850,7 @@ DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplication
                        service = NULL;
                }
 
-               LogWarning(_rethrown_exception.GetMessage());
+               LoggerW(_rethrown_exception.GetMessage());
        }
        
     return appControl;
@@ -808,7 +858,7 @@ DeviceAPI::Application::ApplicationControlPtr StatusNotification::getApplication
 
 void StatusNotification::setApplicationControl(DeviceAPI::Application::ApplicationControlPtr control)
 {
-       LogInfo("Entered m_service : " << m_service << " control : " << control);
+       LoggerI("Entered m_service : " << m_service << " control : " << control);
 
        //delete old service.
        if (m_service)
@@ -823,9 +873,10 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
        }
        else
        {
-               LogInfo("getOperation : " << control->getOperation().c_str());
+               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");
@@ -833,7 +884,7 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                }
                        
                // optional
-               LogInfo("getUri : " << control->getUri().c_str());
+               LoggerI("getUri : " << control->getUri().c_str());
                if (control->getUri().size() != 0)
                {
                        if (service_set_uri(m_service, control->getUri().c_str() ) != SERVICE_ERROR_NONE)
@@ -843,7 +894,7 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                }
        
                // optional
-               LogInfo("getMime : " << control->getMime().c_str());
+               LoggerI("getMime : " << control->getMime().c_str());
                if (control->getMime().size() != 0)
                {
                        if (service_set_mime(m_service, control->getMime().c_str() ) != SERVICE_ERROR_NONE)
@@ -852,7 +903,7 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                        }
                }
        
-               LogInfo("Category : " << control->getCategory().c_str());
+               LoggerI("Category : " << control->getCategory().c_str());
                if (control->getCategory().size() != 0)
                {
                        if (service_set_category(m_service, control->getCategory().c_str() ) != SERVICE_ERROR_NONE)
@@ -860,17 +911,17 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                                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");
-               //}
-               
+               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;
        
-               LogInfo (" App Control Datas Count : " << appControlDataArray.size());
+               LoggerI (" App Control Datas Count : " << appControlDataArray.size());
        
                DeviceAPI::Application::ApplicationControlDataArray::iterator iter;
        
@@ -878,7 +929,7 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                {
                        DeviceAPI::Application::ApplicationControlDataPtr appControlData = *iter;
                        std::string key = appControlData->getKey();
-                       LogInfo(" key : " << key);
+                       LoggerI(" key : " << key);
                
                        if (key.empty())
                                continue;
@@ -889,11 +940,11 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                        for (size_t indexArray = 0; indexArray < value.size(); indexArray++)
                        {
                                arrayValue[indexArray] = (char*)value[indexArray].c_str();
-                               LogInfo( " value : " << arrayValue[indexArray]);
+                               LoggerI( " value : " << arrayValue[indexArray]);
                        }
        
                        const char* strKey = key.c_str();
-                       LogInfo( " value size: " << value.size());
+                       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");                 
@@ -902,7 +953,8 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                        if (arrayValue)
                                free(arrayValue);
                }                                       
-       
+
+#if 0
                bundle *bundle_data=NULL;
                
                if(service_to_bundle(m_service, &bundle_data) != SERVICE_ERROR_NONE)
@@ -910,13 +962,14 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
                        throw UnknownException("service get bundle");                   
                }
 
-               LogDebug("bundle_data : " << bundle_data);
+               LoggerD("bundle_data : " << bundle_data);
                
                if (bundle_data)
                {
                        notification_set_execute_option(m_notiHandle, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,
                                NULL,NULL, bundle_data);
                }
+#endif
                                
        }
        
@@ -924,21 +977,22 @@ void StatusNotification::setApplicationControl(DeviceAPI::Application::Applicati
 
 void StatusNotification::setApplicationId(const std::string& appId)
 {
-       LogInfo("m_service = "  << m_service << " appId = " << appId);
+       LoggerI("m_service = "  << m_service << " appId = " << appId);
        if (!m_service)
        {       
                if (service_create(&m_service) != SERVICE_ERROR_NONE)
                {
-                       LogWarning("Create Service Failed..");
-                       throw DeviceAPI::Common::UnknownException ("service creation error");
+                       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 DeviceAPI::Common::UnknownException ("service set appId error");  
+                       throw UnknownException("service set appId error");      
                }
        }
 
@@ -947,9 +1001,10 @@ void StatusNotification::setApplicationId(const std::string& appId)
 std::string StatusNotification::getApplicationId()
 {
        std::string retString;
-       service_h service = NULL;
        char* appIdStr = NULL;
-       
+#if 0  
+       service_h service = NULL;
+
        if (m_service != NULL)
        {
                int retcode;
@@ -959,28 +1014,28 @@ std::string StatusNotification::getApplicationId()
                {
                        if (retcode == SERVICE_ERROR_OUT_OF_MEMORY)
                        {
-                               LogWarning("SERVICE_ERROR_OUT_OF_MEMORY");
+                               LoggerW("SERVICE_ERROR_OUT_OF_MEMORY");
                        }
                        else
                        {
-                               LogWarning("UI_NOTIFICATION_ERROR_INVALID_PARAMETER");
+                               LoggerW("UI_NOTIFICATION_ERROR_INVALID_PARAMETER");
                        }
-                       throw DeviceAPI::Common::UnknownException ("get notification service error ");
+                       throw UnknownException ("get notification service error ");
                }
                else
                {
                        if (service == NULL)
                        {
-                               throw DeviceAPI::Common::UnknownException ("get notification service ok, but service null");                    
+                               throw UnknownException ("get notification service ok, but service null");                       
                        }
                }
        }
-
-       if (service != NULL) 
+#endif
+       if (m_service != NULL) 
        {
-               if (service_get_app_id(service, &appIdStr) != SERVICE_ERROR_NONE)
+               if (service_get_app_id(m_service, &appIdStr) != SERVICE_ERROR_NONE)
                {
-                       throw DeviceAPI::Common::UnknownException ("get a appId error");
+                       throw UnknownException ("get a appId error");
                }
 
                if (appIdStr != NULL)
@@ -989,7 +1044,7 @@ std::string StatusNotification::getApplicationId()
                        free(appIdStr);
                }
        }
-       LogInfo(retString);
+       LoggerI(retString);
        
        return retString;
 
@@ -1009,7 +1064,7 @@ double StatusNotification::getProgressValue()
                        {
                                throw UnknownException("get notification size error");
                        }
-                       LogInfo("Size Val = " << value);
+                       LoggerI("Size Val = " << value);
                }
                else if ( progressType == NOTI_PROGRESS_TYPE_PERCENTAGE )
                {
@@ -1017,7 +1072,7 @@ double StatusNotification::getProgressValue()
                        {
                                throw UnknownException("get notification percentage error");
                        }
-                       LogInfo("Percentage Val = " << value);
+                       LoggerI("Percentage Val = " << value);
                }
                else
                {
@@ -1026,9 +1081,9 @@ double StatusNotification::getProgressValue()
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
        }
-       LogInfo("value = " << value);
+       LoggerI("value = " << value);
        return value;
        
 }
@@ -1038,10 +1093,10 @@ void StatusNotification::setProgressValue(const double &progressValue)
        if (m_notiHandle)
        {       
                NotificationProgressType progressType = getProgressType();
-               LogInfo("Progress Type : " << progressType);
+               LoggerI("Progress Type : " << progressType);
                
                double val = getProgressValue();
-               LogInfo("Progress value = " << progressValue << " origin Progress Value =" << val);
+               LoggerI("Progress value = " << progressValue << " origin Progress Value =" << val);
                
                if (progressType == NOTI_PROGRESS_TYPE_SIZE)
                {
@@ -1064,14 +1119,56 @@ void StatusNotification::setProgressValue(const double &progressValue)
        }
        else
        {
-               LogDebug("noti 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()
 {
-        LogInfo("Handle = " << m_notiHandle);
+        LoggerI("Handle = " << m_notiHandle);
        if (m_notiHandle)
        {
                char *subIconPath = NULL;
@@ -1097,7 +1194,7 @@ void StatusNotification::setSubIconPath(const std::string& subIconPath)
 {
        if (m_notiHandle)
        {
-               LogInfo(" subIconPath = " << subIconPath << " origin SubIconPath = " << getSubIconPath());      
+               LoggerI(" subIconPath = " << subIconPath << " origin SubIconPath = " << getSubIconPath());      
 
                if( getSubIconPath().compare(subIconPath))
                {
@@ -1110,7 +1207,7 @@ void StatusNotification::setSubIconPath(const std::string& subIconPath)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
@@ -1145,13 +1242,13 @@ std::string StatusNotification::getInformation(int index)
                std::string strInfo;
                if (info)
                        strInfo = info;
-               LogDebug(" info " << strInfo);
+               LoggerD(" info " << strInfo);
                return strInfo;
 
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
        
@@ -1163,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)
@@ -1197,7 +1294,7 @@ void StatusNotification::setInformation( const std::string& info, int index)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
@@ -1233,13 +1330,13 @@ std::string StatusNotification::getSubInformation(int index)
                std::string strSubInfo;
                if (subInfo)
                        strSubInfo = subInfo;
-               LogDebug(" subInfo " << strSubInfo);
+               LoggerD(" subInfo " << strSubInfo);
                return strSubInfo;
                                
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
        
@@ -1250,8 +1347,8 @@ void StatusNotification::setSubInformation( const std::string& subInfo, int inde
        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)
@@ -1284,7 +1381,7 @@ void StatusNotification::setSubInformation( const std::string& subInfo, int inde
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
                
@@ -1356,14 +1453,14 @@ void StatusNotification::loadThumbnails()
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
 }
 
 std::vector<std::string> StatusNotification::getThumbnails()
 {
-       LogInfo(" thumbnail Size : " << m_thumbs.size());
+       LoggerI(" thumbnail Size : " << m_thumbs.size());
        return m_thumbs;
 }
 
@@ -1371,7 +1468,7 @@ std::string StatusNotification::getThumbnail(int index)
 {
        if (m_notiHandle)
        {
-               LogInfo(" index : " << index);
+               LoggerI(" index : " << index);
                
                notification_image_type_e type = NOTIFICATION_IMAGE_TYPE_NONE; 
                
@@ -1417,7 +1514,7 @@ std::string StatusNotification::getThumbnail(int index)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
 #if 0
@@ -1431,7 +1528,7 @@ std::string StatusNotification::getThumbnail(int index)
 
 void StatusNotification::setThumbnails(std::vector<std::string> thumbs)
 {
-        LogInfo("set thumbnails");
+        LoggerI("set thumbnails");
        if (m_notiHandle)
        {
                std::vector<std::string>::iterator it;
@@ -1449,7 +1546,7 @@ void StatusNotification::setThumbnails(std::vector<std::string> thumbs)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
 }
@@ -1458,8 +1555,8 @@ void StatusNotification::setThumbnail( const std::string& thumb, int index)
 {
        if (m_notiHandle)
        {
-               LogInfo(" index : " << index);
-               LogInfo(" thumb : " << thumb);
+               LoggerI(" index : " << index);
+               LoggerI(" thumb : " << thumb);
                notification_image_type_e type = NOTIFICATION_IMAGE_TYPE_NONE; 
                
                switch (index)
@@ -1499,7 +1596,7 @@ void StatusNotification::setThumbnail( const std::string& thumb, int index)
 
 std::string StatusNotification::getBackground()
 {
-       LogInfo(" Handle : " << m_notiHandle);
+       LoggerI(" Handle : " << m_notiHandle);
 
        if (m_notiHandle)
        {
@@ -1517,7 +1614,7 @@ std::string StatusNotification::getBackground()
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
 
@@ -1525,7 +1622,7 @@ std::string StatusNotification::getBackground()
 
 void StatusNotification::setBackground(const std::string imagePath)
 {
-       LogInfo(" imagePath : " << imagePath);
+       LoggerI(" imagePath : " << imagePath);
        if (m_notiHandle)
        {
                if (getBackground().compare(imagePath))
@@ -1539,17 +1636,17 @@ void StatusNotification::setBackground(const std::string imagePath)
        }
        else
        {       
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
 }
 
-unsigned int StatusNotification::getNumber()
+long StatusNotification::getNumber()
 {
-       LogInfo("Handle = " << m_notiHandle);
+       LoggerI("Handle = " << m_notiHandle);
        if (m_notiHandle)
        {
-               int number = 0;
+               long number = 0;
                char *strNumber = NULL;
 
                if (notification_get_text(m_notiHandle, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &strNumber) != NOTIFICATION_ERROR_NONE)
@@ -1559,23 +1656,49 @@ unsigned int StatusNotification::getNumber()
 
                if (strNumber)
                        std::istringstream(strNumber) >> number;
+               else
+                       LoggerI("Number Is NULL");
 
-               LogInfo("number = " << number);
+               LoggerI("number = " << number);
 
-               if (number < 0 )
-                       number = 0;
                return number;
        }
        else
        {
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                return 0;
        }
 }
 
-void StatusNotification::setNumber(const unsigned int number)
+const char* StatusNotification::getStrNumber()
 {
-       LogInfo("Number = " << number);
+       LoggerI("Handle = " << m_notiHandle);
+       if (m_notiHandle)
+       {
+               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)
+               {
+                       return NULL;
+               }
+
+               return strNumber;
+       }
+       else
+       {
+               LoggerD("noti Handle is NULL");
+               return NULL;
+       }
+}
+
+void StatusNotification::setNumber(const long number)
+{
+       LoggerI("Number = " << number);
        if (m_notiHandle)
        {
                if(number!=getNumber())
@@ -1584,21 +1707,21 @@ void StatusNotification::setNumber(const unsigned int number)
                        stream << number;
                        if (stream.fail()) {
                                throw UnknownException(
-                                                "Couldn't convert e-mail account id");
+                                                "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)
                        {
-                               throw UnknownException( "set notification sound error");
+                               throw UnknownException( "set notification text error");
                        }
                        setUpdatedFlag(true);
                }
        }
        else
        {               
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
 }
@@ -1614,7 +1737,7 @@ void StatusNotification::setNotificationHandle(void *handle)
        {
                throw UnknownException( "notification handle null error");
        }
-       LogInfo("handle = " << handle << " m_notiHandle = " << m_notiHandle);
+       LoggerI("handle = " << handle << " m_notiHandle = " << m_notiHandle);
        
        if (m_notiHandle != NULL)
        {       
@@ -1634,26 +1757,210 @@ service_h StatusNotification::getService()
        return m_service;
 }
 
+std::string StatusNotification::getLight()
+{
+       LoggerI("get Light handle: " << m_notiHandle);
+       if (m_notiHandle)
+       {
+               int ledColor = 0;
+               notification_led_op_e type = NOTIFICATION_LED_OP_ON;
+               if (notification_get_led(m_notiHandle, &type, &ledColor) != NOTIFICATION_ERROR_NONE)
+               {
+                       throw UnknownException("get notification Content error");
+               }
+               std::string light;
+               std::stringstream stream;
+               if (NOTIFICATION_LED_OP_OFF != type)
+               {
+                       stream <<  std::hex  << ledColor;
+                       light = "#" + stream.str();
+               }
+               
+               return boost::to_lower_copy(light);
+       }
+       else
+       {
+               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++)
+               {
+                       if (std::string::npos == hexCode.find(color[i]))
+                               return false;
+               }
+               return true;
+       }
+       return false;
+}
+
+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))
+               {
+                       std::stringstream stream;       
+                       int ledColor = 0;
+                       notification_led_op_e type = NOTIFICATION_LED_OP_ON;
+                       std::string colorCode = color.substr(1, color.length());
+
+                       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
+               {
+                       LoggerI("color.length()=" << color.length());
+                       if (color.length() == 0)
+                       {
+                               if (notification_set_led(m_notiHandle, NOTIFICATION_LED_OP_OFF, 0) != NOTIFICATION_ERROR_NONE)
+                               {
+                                       throw UnknownException("set notification led ");
+                               }
+                       }
+                       else
+                       {
+                               throw InvalidValuesException("color code error!");
+                       }
+               }
+       }
+       else
+       {
+               throw UnknownException("notification handle is null");
+       }
+}
+
+unsigned long StatusNotification::getLightOnTime()
+{
+       LoggerI("get Light on Time handle: " << m_notiHandle);
+       if (m_notiHandle)
+       {
+               int onTime = 0;
+               int offTime = 0;
+               
+               if (notification_get_led_time_period(m_notiHandle, &onTime, &offTime ) != NOTIFICATION_ERROR_NONE)
+               {
+                       throw UnknownException("set notification led ");
+               }
+               LoggerI("onTime " << onTime);
+               
+               return (unsigned long) onTime;
+       }
+       else
+       {
+               throw UnknownException("notification handle is null");
+       }
+}
+
+void StatusNotification::setLightOnTime(unsigned long time)
+{
+       LoggerI("set Light on Time handle: " << m_notiHandle);
+       LoggerI("itme = " << time);
+       if (m_notiHandle)
+       {
+               int offTime = getLightOffTime();
+               
+               if (notification_set_led_time_period(m_notiHandle, time, offTime ) != NOTIFICATION_ERROR_NONE)
+               {
+                       throw UnknownException("set notification led ");
+               }
+               
+       }
+       else
+       {
+               throw UnknownException("notification handle is null");
+       }
+}
+
+unsigned long StatusNotification::getLightOffTime()
+{
+
+       LoggerI("get Light on Time handle: " << m_notiHandle);
+       if (m_notiHandle)
+       {
+               int onTime = 0;
+               int offTime = 0;
+               
+               if (notification_get_led_time_period(m_notiHandle, &onTime, &offTime ) != NOTIFICATION_ERROR_NONE)
+               {
+                       throw UnknownException("set notification led ");
+               }
+               LoggerI("offTime " << offTime);
+               
+               return offTime;
+       }
+       else
+       {
+               throw UnknownException("notification handle is null");
+       }
+
+}
+
+void StatusNotification::setLightOffTime(unsigned long time)
+{
+       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)
+               {
+                       throw UnknownException("set notification led ");
+               }
+       }
+       else
+       {
+               throw UnknownException("notification handle is null");
+       }
+}
 
 //Detail Info
 void StatusNotification::loadDetailInfos()
 {
-       LogInfo("noti Handle = " << m_notiHandle);
+       LoggerI("noti Handle = " << m_notiHandle);
 
         if (m_notiHandle)
         {
                for ( int idx = 0; idx < MAX_NOTIFICATION_DETAIL_INFO_LENGTH; idx++)
                {
-                   std::string main = getInformation(idx);
-                   std::string sub = getSubInformation(idx);
-                   LogInfo("Main : " << main << " Sub : " << sub);
-                   NotificationDetailInfo *info = new NotificationDetailInfo(m_notiHandle, idx, main, sub);
-                   m_detailInfos.push_back(info);
+                   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
        {               
-               LogDebug("noti Handle is NULL");
+               LoggerD("noti Handle is NULL");
                throw UnknownException( "notification handle is null");
        }
         
@@ -1666,7 +1973,7 @@ std::vector<NotificationDetailInfo*> StatusNotification::getDetailInfos() const
 
 void StatusNotification::setDetailInfos(const std::vector<NotificationDetailInfo*> value)
 {
-    LogInfo("DetailInfos = " << value.size());
+    LoggerI("DetailInfos = " << value.size());
 
     if (m_notiHandle)
     {
@@ -1678,7 +1985,8 @@ void StatusNotification::setDetailInfos(const std::vector<NotificationDetailInfo
             NotificationDetailInfo* info = *it;
             if ( idx < MAX_NOTIFICATION_DETAIL_INFO_LENGTH )
             {
-                LogInfo("main " << info->getMainText() << " sub " << info->getSubText() );
+            
+                LoggerI("main " << info->getMainText() << " sub " << info->getSubText() );
                setInformation(info->getMainText(), idx);
                setSubInformation(info->getSubText(), idx);
             }
@@ -1689,7 +1997,7 @@ void StatusNotification::setDetailInfos(const std::vector<NotificationDetailInfo
     }
     else
     {  
-        LogDebug("noti Handle is NULL");
+        LoggerD("noti Handle is NULL");
         throw UnknownException( "notification handle is null");
     }
        
@@ -1710,7 +2018,7 @@ void StatusNotification::clearDetailInfos()
                for (it = m_detailInfos.begin(); it < m_detailInfos.end(); ++it)
                {
                    NotificationDetailInfo* info = *it;
-                   LogInfo("Delete Detail Info : " << info);
+                   LoggerI("Delete Detail Info : " << info);
                    if (info)
                        delete info;
                    idx ++;
@@ -1748,18 +2056,63 @@ std::string StatusNotification::getInformation(int index)
                std::string strInfo;
                if (info)
                        strInfo = info;
-               LogInfo(" info " << strInfo);
+               LoggerI(" info " << strInfo);
                return strInfo;
 
        }
        else
        {       
-               LogWarning("noti Handle is NULL");
+               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)
+               {
+                       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;
+               }
+               char *info = NULL;
+               
+               if (NOTIFICATION_TEXT_TYPE_NONE != type && notification_get_text(m_notiHandle, type, &info) != NOTIFICATION_ERROR_NONE)
+               {
+                       throw UnknownException("Detail Info index value is invalid or mainText value getting is failed in Detail Info.");
+               }
+               
+               if (info)
+               {
+                       LoggerI("is not null");
+                       return false;
+               }
+               else
+               {
+                       LoggerI("is null");
+                       return true;
+               }
+
+       }
+       else
+       {       
+               LoggerW("noti Handle is NULL");
+               throw UnknownException( "notification handle is null");
+       }
+}
+
 std::string StatusNotification::getSubInformation(int index)
 {
        if (m_notiHandle)
@@ -1790,13 +2143,13 @@ std::string StatusNotification::getSubInformation(int index)
                std::string strSubInfo;
                if (subInfo)
                        strSubInfo = subInfo;
-               LogInfo(" subInfo " << strSubInfo);
+               LoggerI(" subInfo " << strSubInfo);
                return strSubInfo;
                                
        }
        else
        {       
-               LogWarning("noti Handle is NULL");
+               LoggerW("noti Handle is NULL");
                throw UnknownException ("notification handle is null");
        }
        
@@ -1807,8 +2160,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)
@@ -1828,7 +2181,7 @@ void StatusNotification::setInformation( const std::string& info, int index)
 
                if ( type != NOTIFICATION_TEXT_TYPE_NONE)
                {
-                       if (getInformation(idx).compare(info))
+                       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)
@@ -1840,13 +2193,13 @@ void StatusNotification::setInformation( const std::string& info, int index)
                }
                else
                {       
-                       LogWarning("noti Handle is NULL");
+                       LoggerW("noti Handle is NULL");
                        throw UnknownException("notification handle is null");
                }
        }
        else
        {       
-               LogWarning("noti Handle is NULL");
+               LoggerW("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
@@ -1857,8 +2210,8 @@ void StatusNotification::setSubInformation( const std::string& subInfo, int inde
        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)
@@ -1891,161 +2244,10 @@ void StatusNotification::setSubInformation( const std::string& subInfo, int inde
        }
        else
        {       
-               LogWarning("noti Handle is NULL");
+               LoggerW("noti Handle is NULL");
                throw UnknownException("notification handle is null");
        }
 }
 
-
-#if 0
-
-StatusNotification::StatusNotification():
-    m_statusType(""),
-    m_iconPath(""),
-    m_subIconPath(""),
-    m_number(0),
-    m_backgroundImagePath(""),
-    m_soundPath(""),
-    m_vibration(false),
-    m_progressType(""),
-    m_progressValue(0)
-{
-}
-
-StatusNotification::~StatusNotification()
-{
-}
-
-std::string StatusNotification::getStatusType() const
-{
-    return m_statusType;
-}
-
-void StatusNotification::setStatusType(std::string statusType)
-{
-    m_statusType = statusType;
-}
-
-std::string StatusNotification::getIconPath() const
-{
-    return m_iconPath;
-}
-
-void StatusNotification::setIconPath(std::string iconPath)
-{
-    m_iconPath = iconPath;
-}
-
-std::string StatusNotification::getSubIconPath() const
-{
-    return m_subIconPath;
-}
-
-void StatusNotification::setSubIconPath(std::string subIconPath)
-{
-    m_subIconPath = subIconPath;
-}
-
-long StatusNotification::getNumber() const
-{
-    return m_number;
-}
-
-void StatusNotification::setNumber(long number)
-{
-    m_number = number;
-}
-
-std::vector<NotificationDetailInfo*> StatusNotification::getDetailInfo() const
-{
-    return m_detailInfo;
-}
-
-void StatusNotification::setDetailInfo(std::vector<NotificationDetailInfo*> detailInfo)
-{
-    m_detailInfo = detailInfo;
-}
-
-std::string StatusNotification::getBackgroundImagePath() const
-{
-    return m_backgroundImagePath;
-}
-
-void StatusNotification::setBackgroundImagePath(std::string backgroundImagePath)
-{
-    m_backgroundImagePath = backgroundImagePath;
-}
-
-std::vector<std::string> StatusNotification::getThumbnails() const
-{
-    return m_thumbnails;
-}
-
-void StatusNotification::setThumbnails(std::vector<std::string> thumbnails)
-{
-    m_thumbnails = thumbnails;
-}
-
-std::string StatusNotification::getSoundPath() const
-{
-    return m_soundPath;
-}
-
-void StatusNotification::setSoundPath(std::string soundPath)
-{
-    m_soundPath = soundPath;
-}
-
-bool StatusNotification::getVibration() const
-{
-    return m_vibration;
-}
-
-void StatusNotification::setVibration(bool vibration)
-{
-    m_vibration = vibration;
-}
-
-ApplicationControl StatusNotification::getAppControl() const
-{
-    return m_appControl;
-}
-
-void StatusNotification::setAppControl(ApplicationControl appControl)
-{
-    m_appControl = appControl;
-}
-
-ApplicationId StatusNotification::getAppId() const
-{
-    return m_appId;
-}
-
-void StatusNotification::setAppId(ApplicationId appId)
-{
-    m_appId = appId;
-}
-
-std::string StatusNotification::getProgressType() const
-{
-    return m_progressType;
-}
-
-void StatusNotification::setProgressType(std::string progressType)
-{
-    m_progressType = progressType;
-}
-
-unsigned long StatusNotification::getProgressValue() const
-{
-    return m_progressValue;
-}
-
-void StatusNotification::setProgressValue(unsigned long progressValue)
-{
-    m_progressValue = progressValue;
-}
-#endif
-
 } // Notification
 } // DeviceAPI