Update change log and spec for wrt-plugins-tizen_0.4.19
authorDongjin Choi <milkelf.choi@samsung.com>
Tue, 16 Apr 2013 09:18:05 +0000 (18:18 +0900)
committerDongjin Choi <milkelf.choi@samsung.com>
Tue, 16 Apr 2013 09:18:05 +0000 (18:18 +0900)
12 files changed:
packaging/wrt-plugins-tizen.spec
src/CMakeLists.txt
src/Calendar/CMakeLists.txt
src/Calendar/JSCalendar.cpp
src/Calendar/JSCalendarEvent.cpp
src/Calendar/JSCalendarItemProperties.cpp
src/Calendar/JSCalendarManager.cpp
src/Calendar/plugin_initializer.cpp
src/Common/TimeTracer/TimeTracer.c
src/Content/JSContentManager.cpp
src/Notification/JSStatusNotification.cpp
src/Notification/StatusNotification.cpp

index 6509631..a826d2e 100755 (executable)
@@ -1,7 +1,7 @@
 Name:       wrt-plugins-tizen
 Summary:    JavaScript plugins for WebRuntime
-Version:    0.4.17
-Release:    2
+Version:    0.4.19
+Release:    0
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
 Source0:    %{name}-%{version}.tar.gz
index 9ff73f7..983e7bb 100755 (executable)
@@ -33,20 +33,6 @@ SET(LIBS_TEST
   "standaloneconsole"
 )
 
-#set(LIBS_COMMON
-#  ${LIBS_COMMON}
-#  ${COMMON_TARGET_NAME}
-#)
-#
-#add_subdir(Common/StandaloneConsole)
-#add_subdir(Common/TimeTracer)
-#
-#set(LIBS_TEST
-#  ${LIBS_COMMON}
-#  "standaloneconsole"
-#  "timetracer"
-#)
-
 # -----------------------------------------------------------------------------
 # Plugin Modules
 # -----------------------------------------------------------------------------
index 9084841..205d9d7 100755 (executable)
@@ -8,7 +8,7 @@ INCLUDE_DIRECTORIES(
        ${TOP}/Tizen
        ${TOP}/TimeUtil
        ${TOP}/Contact
-       ${TOP}/Common
+       ${INCLUDE_COMMON}
        ${platform_pkgs_calendar_INCLUDE_DIRS}
 )
 
index 2026920..61646cb 100755 (executable)
@@ -31,6 +31,7 @@
 #include <JSTizenExceptionFactory.h>
 #include <SecurityExceptions.h>
 #include <TimeUtilConverter.h>
+#include <TimeTracer.h>
 
 #include "JSCalendarManager.h"
 #include "CalendarConverter.h"
@@ -144,6 +145,7 @@ JSValueRef JSCalendar::add(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarPrivObject *privateObject =
         static_cast<CalendarPrivObject*>(JSObjectGetPrivate(thisObject));
 
@@ -188,6 +190,7 @@ JSValueRef JSCalendar::add(JSContextRef context,
 
         if (dplEvent->getResult()) {
             LogDebug("Add result successful.");
+                       TIME_TRACER_ITEM_END(__FUNCTION__, 0);
             return JSValueMakeUndefined(context);
         } else {
             ThrowMsg(UnknownException, "Adding failed by unknown reason.");
@@ -222,6 +225,7 @@ JSValueRef JSCalendar::addBatch(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarPrivObject *privateObject =
         static_cast<CalendarPrivObject*>(JSObjectGetPrivate(thisObject));
 
@@ -274,6 +278,7 @@ JSValueRef JSCalendar::addBatch(JSContextRef context,
 
                CalendarAsyncCallbackManagerSingleton::Instance().registerCallbackManager(cbm, globalContext);
 
+               TIME_TRACER_ITEM_END(__FUNCTION__, 0);
         return JSValueMakeUndefined(context);
     }
     Catch(UnsupportedException)
@@ -305,6 +310,7 @@ JSValueRef JSCalendar::update(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarPrivObject *privateObject =
         static_cast<CalendarPrivObject*>(JSObjectGetPrivate(thisObject));
 
@@ -352,6 +358,7 @@ JSValueRef JSCalendar::update(JSContextRef context,
         calendar->updateEvent(dplEvent);
 
         if (dplEvent->getResult()) {
+                               TIME_TRACER_ITEM_END(__FUNCTION__, 0);
             return JSValueMakeUndefined(context);
         } else {
             ThrowMsg(UnknownException, "Updating failed by unknown reason.");
@@ -391,6 +398,7 @@ JSValueRef JSCalendar::updateBatch(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarPrivObject *privateObject =
         static_cast<CalendarPrivObject*>(JSObjectGetPrivate(thisObject));
 
@@ -451,6 +459,7 @@ JSValueRef JSCalendar::updateBatch(JSContextRef context,
 
                CalendarAsyncCallbackManagerSingleton::Instance().registerCallbackManager(cbm, globalContext);
 
+               TIME_TRACER_ITEM_END(__FUNCTION__, 0);
         return JSValueMakeUndefined(context);
     }
     Catch(UnsupportedException)
@@ -487,6 +496,7 @@ JSValueRef JSCalendar::remove(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarPrivObject *privateObject =
         static_cast<CalendarPrivObject*>(JSObjectGetPrivate(thisObject));
 
@@ -536,6 +546,7 @@ JSValueRef JSCalendar::remove(JSContextRef context,
 
         if (dplEvent->getResult()) {
             LogInfo("Successfully deleted.");
+                               TIME_TRACER_ITEM_END(__FUNCTION__, 0);
             return JSValueMakeUndefined(context);
         } else {
             if (dplEvent->getExceptionCode() == ExceptionCodes::NotFoundException) {
@@ -579,6 +590,7 @@ JSValueRef JSCalendar::removeBatch(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarPrivObject *privateObject =
         static_cast<CalendarPrivObject*>(JSObjectGetPrivate(thisObject));
 
@@ -657,7 +669,7 @@ JSValueRef JSCalendar::removeBatch(JSContextRef context,
         calendar->deleteEvents(dplEvent);
 
                CalendarAsyncCallbackManagerSingleton::Instance().registerCallbackManager(cbm, globalContext);
-
+               TIME_TRACER_ITEM_END(__FUNCTION__, 0);
         return JSValueMakeUndefined(context);
     }
     Catch(UnsupportedException)
@@ -694,6 +706,7 @@ JSValueRef JSCalendar::find(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarPrivObject *privateObject =
         static_cast<CalendarPrivObject*>(JSObjectGetPrivate(thisObject));
 
@@ -764,7 +777,7 @@ JSValueRef JSCalendar::find(JSContextRef context,
         calendar->findEvents(dplEvent);
 
                CalendarAsyncCallbackManagerSingleton::Instance().registerCallbackManager(cbm, globalContext);
-
+               TIME_TRACER_ITEM_END(__FUNCTION__, 0);
                return JSValueMakeUndefined(context);
     }
     Catch(UnsupportedException)
@@ -801,6 +814,7 @@ JSValueRef JSCalendar::get(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarPrivObject *privateObject =
         static_cast<CalendarPrivObject*>(JSObjectGetPrivate(thisObject));
 
@@ -853,6 +867,7 @@ JSValueRef JSCalendar::get(JSContextRef context,
         if (dplEvent->getResult()) {
                        LogDebug("Successfully got an item.");
                        if (CalendarEvent::EVENT_TYPE==calendar->getType()) {
+                               TIME_TRACER_ITEM_END(__FUNCTION__, 0);
                 // Use global context for the expandRecurrence api in event.
                    return JSCalendarEvent::createJSCalendarEvent(globalContext, dplEvent->getItem());
                        } else if (CalendarEvent::TASK_TYPE==calendar->getType()) {
@@ -902,6 +917,7 @@ JSValueRef JSCalendar::addChangeListener(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarPrivObject *privateObject =
         static_cast<CalendarPrivObject*>(JSObjectGetPrivate(thisObject));
 
@@ -983,6 +999,7 @@ JSValueRef JSCalendar::addChangeListener(JSContextRef context,
                        CalendarListenerManagerSingleton::Instance().registerListener(listenerItem, globalContext);
 
             LogDebug("Returning the watchId "<<watchId);
+                       TIME_TRACER_ITEM_END(__FUNCTION__, 0);
             return converter.toJSValueRefLong(watchId);
         } else {
             ThrowMsg(UnknownException, "Adding change listener failed by unknown reason.");
@@ -1017,6 +1034,7 @@ JSValueRef JSCalendar::removeChangeListener(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarPrivObject *privateObject =
         static_cast<CalendarPrivObject*>(JSObjectGetPrivate(thisObject));
 
@@ -1053,6 +1071,7 @@ JSValueRef JSCalendar::removeChangeListener(JSContextRef context,
                DeviceAPI::Common::IListenerItemPtr listenerItem = DPL::StaticPointerCast<DeviceAPI::Common::IListenerItem>(canceller);
                CalendarListenerManagerSingleton::Instance().unregisterListener(listenerItem);
 
+               TIME_TRACER_ITEM_END(__FUNCTION__, 0);
         return JSValueMakeUndefined(context);
     }
     Catch(UnsupportedException)
index b376b6a..58ce6c0 100755 (executable)
@@ -40,6 +40,7 @@
 
 #include "CalendarAsyncCallbackManager.h"
 #include <GlobalContextManager.h>
+#include <TimeTracer.h>
 
 using namespace WrtDeviceApis::Commons;
 using namespace WrtDeviceApis::CommonsJavaScript;
@@ -257,6 +258,7 @@ JSValueRef JSCalendarEvent::expandRecurrence(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarEventPrivObject *privateObject =
         static_cast<CalendarEventPrivObject*>(JSObjectGetPrivate(thisObject));
 
@@ -322,7 +324,7 @@ JSValueRef JSCalendarEvent::expandRecurrence(JSContextRef context,
         m_calendar->expandEventRecurrence(dplEvent);
 
                CalendarAsyncCallbackManagerSingleton::Instance().registerCallbackManager(cbm, globalContext);
-
+               TIME_TRACER_ITEM_END(__FUNCTION__, 0);
         return JSValueMakeUndefined(context);
     }
     Catch(UnsupportedException)
index 42e18c0..0c49bb2 100755 (executable)
@@ -42,6 +42,7 @@
 #include "plugin_config.h"
 
 #include <GlobalContextManager.h>
+#include <TimeTracer.h>
 
 using namespace WrtDeviceApis::Commons;
 using namespace WrtDeviceApis::CommonsJavaScript;
@@ -193,6 +194,7 @@ JSValueRef JSCalendarItemProperties::convertToString(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarItemPropertiesPrivObject *privateObject =
         static_cast<CalendarItemPropertiesPrivObject*>(JSObjectGetPrivate(thisObject));
 
@@ -230,6 +232,7 @@ JSValueRef JSCalendarItemProperties::convertToString(JSContextRef context,
         calendar->exportEventToString(dplEvent);
 
         if (dplEvent->getResult()) {
+                       TIME_TRACER_ITEM_END(__FUNCTION__, 0);
             return converter.toJSValueRef(dplEvent->getEventString());
         } else {
             ThrowMsg(UnknownException, "Converting to string failed by unknown reason.");
@@ -269,6 +272,8 @@ JSValueRef JSCalendarItemProperties::clone(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN("clone(TASK)", 0);
+       TIME_TRACER_ITEM_BEGIN("clone(EVENT)", 0);
     CalendarItemPropertiesPrivObject *privateObject =
         static_cast<CalendarItemPropertiesPrivObject*>(JSObjectGetPrivate(thisObject));
 
@@ -296,8 +301,10 @@ JSValueRef JSCalendarItemProperties::clone(JSContextRef context,
         clonedItem->setRecurrenceId(UNDEFINED_ITEM_ID);
 
                if (CalendarEvent::TASK_TYPE==clonedItem->getCalendarType()) {
+                       TIME_TRACER_ITEM_END("clone(TASK)", 0);
                return JSCalendarTask::createJSCalendarTask(context, clonedItem);
                } else if (CalendarEvent::EVENT_TYPE==clonedItem->getCalendarType()) {
+                       TIME_TRACER_ITEM_END("clone(EVENT)", 0);
             // Use global context for potential async api invocation.
             return JSCalendarEvent::createJSCalendarEvent(globalContext, clonedItem);
                } else {
index 3be83ac..0defb46 100755 (executable)
@@ -27,6 +27,7 @@
 #include <JSTizenException.h>
 #include <JSTizenExceptionFactory.h>
 #include <SecurityExceptions.h>
+#include <TimeTracer.h>
 
 #include "JSCalendarManager.h"
 #include "JSCalendar.h"
@@ -109,6 +110,7 @@ JSValueRef JSCalendarManager::getCalendars(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarManagerPrivObject *privateObject = static_cast<CalendarManagerPrivObject*>(JSObjectGetPrivate(thisObject));
 
     AceSecurityStatus status = CALENDAR_CHECK_ACCESS(CALENDAR_FUNCTION_API_GET_CALENDARS);
@@ -150,7 +152,7 @@ JSValueRef JSCalendarManager::getCalendars(JSContextRef context,
         privateObject->getObject()->getCalendars(dplEvent);
 
                CalendarAsyncCallbackManagerSingleton::Instance().registerCallbackManager(cbm, globalContext);
-
+               TIME_TRACER_ITEM_END(__FUNCTION__, 0);
         return JSValueMakeUndefined(context);
     }
     Catch(UnsupportedException)
@@ -182,6 +184,7 @@ JSValueRef JSCalendarManager::getDefaultCalendar(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarManagerPrivObject *privateObject = static_cast<CalendarManagerPrivObject*>(JSObjectGetPrivate(thisObject));
 
     AceSecurityStatus status = CALENDAR_CHECK_ACCESS(CALENDAR_FUNCTION_API_GET_DEFAULT_CALENDAR);
@@ -245,6 +248,7 @@ JSValueRef JSCalendarManager::getDefaultCalendar(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
+       TIME_TRACER_ITEM_END(__FUNCTION__, 0);
     return JSValueMakeUndefined(context);
 }
 
@@ -255,6 +259,7 @@ JSValueRef JSCalendarManager::getUnifiedCalendar(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarManagerPrivObject *privateObject = static_cast<CalendarManagerPrivObject*>(JSObjectGetPrivate(thisObject));
 
     AceSecurityStatus status = CALENDAR_CHECK_ACCESS(CALENDAR_FUNCTION_API_GET_UNIFIED_CALENDAR);
@@ -319,6 +324,7 @@ JSValueRef JSCalendarManager::getUnifiedCalendar(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
+       TIME_TRACER_ITEM_END(__FUNCTION__, 0);
     return JSValueMakeUndefined(context);
 }
 
@@ -329,6 +335,7 @@ JSValueRef JSCalendarManager::getCalendar(JSContextRef context,
         const JSValueRef arguments[],
         JSValueRef* exception)
 {
+       TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
     CalendarManagerPrivObject *privateObject = static_cast<CalendarManagerPrivObject*>(JSObjectGetPrivate(thisObject));
 
     AceSecurityStatus status = CALENDAR_CHECK_ACCESS(CALENDAR_FUNCTION_API_GET_CALENDAR);
@@ -366,6 +373,7 @@ JSValueRef JSCalendarManager::getCalendar(JSContextRef context,
         // Process the result.
         if (dplEvent->getResult()) {
             if( dplEvent->getCalendar() ) {
+                                       TIME_TRACER_ITEM_END(__FUNCTION__, 0);
                 return converter.toJSValueRefCalendar(dplEvent->getCalendar());
             } else {
                 ThrowMsg(NotFoundException, "Calendar not found.");
index 0d10388..a9005ca 100755 (executable)
@@ -32,6 +32,7 @@
 #include "CalendarAsyncCallbackManager.h"
 #include "CalendarListenerManager.h"
 
+#include <TimeTracer.h>
 #include <GlobalContextManager.h>
 
 namespace DeviceAPI {
@@ -43,7 +44,7 @@ using namespace WrtDeviceApis::Commons;
 void on_widget_start_callback(int widgetId)
 {
     LogDebug("[Tizen\\Calendar] on_widget_start_callback (" << widgetId << ")");
-
+       TIME_TRACER_INIT();
        Try {
         WrtAccessSingleton::Instance().initialize(widgetId);
        } Catch (Exception) {
@@ -54,7 +55,8 @@ void on_widget_start_callback(int widgetId)
 void on_widget_stop_callback(int widgetId)
 {
     LogDebug("[Tizen\\Calendar] on_widget_stop_callback (" << widgetId << ")");
-
+       TIME_TRACER_EXPORT_REPORT_TO(TIME_TRACER_EXPORT_FILE,"Calendar");
+       TIME_TRACER_RELEASE();
        Try {
         WrtAccessSingleton::Instance().deinitialize(widgetId);
        } Catch (Exception) {
index ad0a25e..9348157 100644 (file)
@@ -96,6 +96,10 @@ static int __get_time_tracer_item_index(char* name)
 */
 int time_tracer_init(void)
 {
+    if (g_items) {
+        LOGW("[%s] Ignored. Already Initialized.", __FUNCTION__);
+        return 0;
+    }
        g_items = (time_tracer_item **) malloc(TIME_TRACER_ITEM_MAX * sizeof(time_tracer_item *));
        if(!g_items)
        {
@@ -355,7 +359,10 @@ void time_tracer_export_report(int direction, char* name)
                        g_items[i]->last_timestamp - g_first_time, //end timestamp
                        g_items[i]->mismatch_count ); // # of mismatch (begin - end mismatch)
 
-               LOG(LOG_ERROR, LOG_TAG, format,i,g_items[i]->name,  g_items[i]->total_elapsed_time, g_items[i]->invoke_count, (g_items[i]->total_elapsed_time == 0)?0:(int)(g_items[i]->total_elapsed_time / g_items[i]->invoke_count), g_items[i]->min_elapsed_time, g_items[i]->max_elapsed_time, g_items[i]->first_timestamp - g_first_time,         g_items[i]->last_timestamp - g_first_time, g_items[i]->mismatch_count );
+#if 0
+               LOGE("[%%3d] %%-%ds |\tTotal:%%ld,\tCnt:%%ld,\tAvg:%%ld,\tMin:%%ld,\tMax:%%ld,\tStart:%%lu,\tEnd:%%lu,\tMismatch:%%ld",
+                               i,g_items[i]->name,  g_items[i]->total_elapsed_time, g_items[i]->invoke_count, (g_items[i]->total_elapsed_time == 0)?0:(int)(g_items[i]->total_elapsed_time / g_items[i]->invoke_count), g_items[i]->min_elapsed_time, g_items[i]->max_elapsed_time, g_items[i]->first_timestamp - g_first_time,        g_items[i]->last_timestamp - g_first_time, g_items[i]->mismatch_count );
+#endif
        }
        fprintf(fp, "TIME TRACER REPORT [END]  ============================\n");
        LOGE("TIME TRACER REPORT [END]  ============================");
index 7f0e5ad..41140e0 100755 (executable)
@@ -251,11 +251,14 @@ JSValueRef JSMediacontentManager::findItems(
 
         folderId = argValidator.toString(2, true);
         if(!folderId.empty()){
-            if(folderId == "null" || folderId == "undefined"){
+            if(folderId != "null" ){
+                dplEvent->setFolderID(folderId);
+            }
+            else if(folderId == "undefined"){
                 throw InvalidValuesException("folderId is not valid.");
             }
-            dplEvent->setFolderID(folderId);
         }
+
         //filter
         filterObj = argValidator.toObject(3,true);
 
@@ -264,13 +267,15 @@ JSValueRef JSMediacontentManager::findItems(
 
         // count
         if(argumentCount >= 6){        
-            long count = argValidator.toLong(5, true, -1);
-            if( count >= 0L ){
-                dplEvent->setLimit(count);
-            }
-            else{
-                throw InvalidValuesException( "count should be positive.");
-            }
+//            if(!JSValueIsNull(context, arguments[5]) && !JSValueIsUndefined(context, arguments[5])){
+                long count = argValidator.toLong(5, true, 0);
+                if( count >= 0L ){
+                    dplEvent->setLimit(count);
+                }
+                else{
+                    throw InvalidValuesException( "count should be positive.");
+                }
+//            }
         }
         if(argumentCount >= 7){
             // offset
@@ -299,6 +304,7 @@ JSValueRef JSMediacontentManager::findItems(
             dplEvent->setSortMode(fConverter->toSortMode(sortModeObj));
         }
         IMediacontentManagerPtr contentMgr = privateObject->getObject();
+
         dplEvent->setPrivateData( DPL::StaticPointerCast<IEventPrivateData> (cbm));
         dplEvent->setForAsynchronousCall(&MediacontentManagerController::getInstance());
         contentMgr->browseFolder(dplEvent);
index 780def8..e3bdbfa 100755 (executable)
@@ -124,8 +124,8 @@ JSObjectRef JSStatusNotification::constructor(JSContextRef context,
         
         priv->setTitle(validator.toString(1, false, ""));    //title
         
-            JSObjectRef notiInitDict = validator.toObject(2, true);
-       
+        JSObjectRef notiInitDict = validator.toObject(2, true);
+
             if (notiInitDict)
             {
                 //content
@@ -339,7 +339,7 @@ JSObjectRef JSStatusNotification::constructor(JSContextRef context,
                 {
                     LogWarning("notification's icon path convertion is failed."  << err.getMessage().c_str());
                 }
-                        
+                
             }
                
         setPrivateObject(context, obj, priv);
@@ -403,7 +403,7 @@ StatusNotification* JSStatusNotification::getPrivateObject(JSContextRef context,
     }
     else
     {
-        priv->setIconPath("");
+        priv->setSubIconPath("");
     }
 
     // number
index e1adddd..ad8e5d5 100755 (executable)
@@ -128,13 +128,12 @@ StatusNotification::StatusNotification(NotificationType statusType) :
        {
                LogInfo("noti =" << noti);
                setNotificationHandle((void*)noti);
-#if 0          
-               if ( statusType == NOTI_TYPE_PROGRESS)
-               {
-                       notification_update_progress(noti, NOTIFICATION_PRIV_ID_NONE, getProgressValue());
+
+               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 );
                }
-#endif
-               
        }
        else
        {
@@ -630,10 +629,22 @@ void StatusNotification::setSoundPath(const std::string& sound)
                if (sound.empty()) 
                {
                    LogInfo("sound path is NULL");
-                    if (notification_set_sound(m_notiHandle,NOTIFICATION_SOUND_TYPE_DEFAULT, sound.c_str()) != NOTIFICATION_ERROR_NONE)
+                   if ( NOTI_TYPE_ONGOING == getNotiType() || NOTI_TYPE_PROGRESS == getNotiType())
                    {
-                       throw UnknownException("set notification sound error");
+                               LogInfo("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
@@ -654,7 +665,7 @@ bool StatusNotification::getDefaultVibration()
                        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;
                }
@@ -678,14 +689,19 @@ void StatusNotification::setDefaultVibration(const bool& vibration)
        if (m_notiHandle)
        {
                notification_vibration_type_e vib_type = NOTIFICATION_VIBRATION_TYPE_NONE;
-               
+               LogInfo("old vibration = " << getDefaultVibration());
                if (getDefaultVibration() != vibration)
                {
                        if (vibration)
                        {
                                vib_type = NOTIFICATION_VIBRATION_TYPE_DEFAULT;
                        }
-                       
+                       else
+                       {
+                               vib_type = NOTIFICATION_VIBRATION_TYPE_NONE;
+                       }
+                       LogInfo("type vibration type= " << vib_type);
+
                        if (notification_set_vibration(m_notiHandle, vib_type , NULL) != NOTIFICATION_ERROR_NONE)
                        {
                                throw UnknownException("set notification sound error");