merge wrt-plugins-tizen_0.2.0-8
authorSangtai Kim <sangtai.kim@samsung.com>
Wed, 22 Feb 2012 04:58:22 +0000 (13:58 +0900)
committerSangtai Kim <sangtai.kim@samsung.com>
Wed, 22 Feb 2012 04:58:22 +0000 (13:58 +0900)
 - fix calendar build error

debian/changelog
src/platform/Tizen/Application/Application.cpp
src/platform/Tizen/Calendar/EventWrapper.cpp
src/standards/Tizen/Calendar/CalendarResponseDispatcher.cpp
src/standards/Tizen/Calendar/JSCalendar.cpp
src/standards/Tizen/Calendar/JSCalendarEvent.cpp
src/standards/Tizen/Calendar/JSCalendarItemProperties.cpp
src/standards/Tizen/Calendar/JSCalendarManager.cpp

index 4c3a49d..e5722e5 100644 (file)
@@ -1,3 +1,12 @@
+wrt-plugins-tizen (0.2.0-8) unstable; urgency=low
+
+  * Fix calendar build error
+  * Git : slp/pkgs/w/wrt-plugins-tizen
+  * Tag : wrt-plugins-tizen_0.2.0-8
+
+
+ -- Sangtai Kim <sangtai.kim@samsung.com>  Wed, 22 Feb 2012 13:55:22 +0900
+
 wrt-plugins-tizen (0.2.0-6) unstable; urgency=low
 
   * Application bug fix
index 62705f4..ae13b88 100755 (executable)
@@ -78,7 +78,7 @@ namespace {
                        return NULL;
                }
 
-               LogDebug("[getPackageById] appId : "<<appId);
+               //LogDebug("[getPackageById] appId : "<<appId);
                ret = ail_filter_new(&filter);
                if (ret != AIL_ERROR_OK) {
                        return NULL;
@@ -93,7 +93,7 @@ namespace {
                ail_filter_list_appinfo_foreach(filter, appinfoCallback, &pkg);
                ail_filter_destroy(filter);
 
-               LogDebug("[getPackageById] pkg : "<<pkg);
+               //LogDebug("[getPackageById] pkg : "<<pkg);
                return pkg;
        }
 
@@ -108,7 +108,7 @@ namespace {
                        return NULL;
                }
 
-               LogDebug("[getIdFromPackage] pkg : "<<pkg);
+               //LogDebug("[getIdFromPackage] pkg : "<<pkg);
                ret = ail_package_get_appinfo(pkg, &handle);
                if (ret != AIL_ERROR_OK) {
                        return NULL;
@@ -128,7 +128,7 @@ namespace {
                        return NULL;
                }
 
-               LogDebug("[getIdFromPackage] result : "<<appId);
+               //LogDebug("[getIdFromPackage] result : "<<appId);
                return appId;
        }
 
@@ -139,31 +139,27 @@ namespace {
                bool tmpStr;
                bool result;
 
-               LogDebug("[getShowFromPackage] pkg : "<<pkg);
+               //LogDebug("[getShowFromPackage] pkg : "<<pkg);
                ret = ail_package_get_appinfo(pkg, &handle);
                if (ret != AIL_ERROR_OK) {
                        LogDebug("[getShowFromPackage] fail to get appinfo ");
                        return false;
                }
 
-               LogDebug("[getShowFromPackage] call  ail_appinfo_get_str");
                ret = ail_appinfo_get_bool(handle, AIL_PROP_NODISPLAY_BOOL, &tmpStr);
                if (ret != AIL_ERROR_OK) {
-                       LogDebug("[getShowFromPackage] fail to get web id ");
                        return false;
                }
 
                // copy value to result. getVal will be removed when destroy appinfo
                result = !tmpStr;
 
-               LogDebug("[getShowFromPackage] call  ail_package_destroy_appinfo");
                ret = ail_package_destroy_appinfo(handle);
                if (ret != AIL_ERROR_OK) {
-                       LogError("[getShowFromPackage] error. return NULL");
                        return false;
                }
 
-               LogDebug("[getShowFromPackage] result : "<<result);
+               //LogDebug("[getShowFromPackage] result : "<<result);
                return result;
        }
 
@@ -232,6 +228,7 @@ namespace {
 
        static void installedAppListChangedCallback(app_manger_event_type_e event_type,const char *package, void *user_data)
        {
+               LogDebug("installedAppListChangedCallback called");
                if(user_data != NULL){
                        ((Application*)user_data)->InstalledApplicationChanged(event_type, package);
                }
@@ -239,6 +236,7 @@ namespace {
 
        static void serviceResultCallback(service_h request, service_h reply, service_result_e result, void *user_data)
        {
+               LogDebug("serviceResultCallback called");
                if(user_data != NULL) {
                        ((Application*)user_data)->launchServiceManualAnswer(request, reply, result);
                }
@@ -474,13 +472,12 @@ void Application::InstalledApplicationChanged(app_manger_event_type_e event_type
        if (appid == NULL) {
                // get appid from installed application list. if cannot found, duplicate package to appid
                const char* id = m_installedApplicationList[package].c_str();
-               if (id != NULL) {
+               if ((id == NULL) || (id[0] == '\0')) {
+                       // if id is not set, skip event.
+                       return;
+               } else {
                        appid = strdup(id);
                        LogDebug(">>> InstalledApplicationChanged : (from List)appid : " << appid);
-               } else {
-                       // set package if cannot found appid from DB and installed application list
-                       appid = strdup(package);
-                       LogDebug(">>> InstalledApplicationChanged : (copy package)appid : " << appid);
                }
        }
        
index 367f2f6..6dac29b 100755 (executable)
@@ -2098,11 +2098,6 @@ void EventWrapper::displayPlatformEvent()
                  m_platformEvent, CAL_VALUE_INT_SENSITIVITY));
     LogDebug("event availability: " << calendar_svc_struct_get_int(
                  m_platformEvent, CAL_VALUE_INT_BUSY_STATUS));
-    LogDebug("event alarmType: " << calendar_svc_struct_get_int(
-                 m_platformEvent, CAL_VALUE_INT_ALARM_TYPE));
-    LogDebug("event alarm time: " << calendar_svc_struct_get_time(
-                 m_platformEvent, CAL_VALUE_GMT_ALARM_TIME,
-                 CAL_TZ_FLAG_GMT));
 
     GList *categoryList = NULL;
     if (CAL_SUCCESS != calendar_svc_struct_get_list(m_platformEvent,
index cacc84b..2516dc6 100755 (executable)
@@ -215,6 +215,7 @@ void CalendarResponseDispatcher::onAnswerReceived(const OnUpdateEventsChangedPtr
 
 void CalendarResponseDispatcher::OnAnswerReceived(const IEventDeleteEventsPtr &event)
 {
+    LogDebug("entered");
     JSCallbackManagerPtr cbm =
         DPL::StaticPointerCast<JSCallbackManager>(event->getPrivateData());
     if (!cbm) {
index 6a6de90..5aac8ad 100755 (executable)
@@ -207,7 +207,7 @@ JSValueRef JSCalendar::add(JSContextRef context,
         calendar->addEvent(dplEvent);
 
         if (dplEvent->getResult()) {
-            return NULL;
+            return JSValueMakeUndefined(context);
         } else {
             ThrowMsg(UnknownException, "Adding failed by unkown reason.");
         }
@@ -233,7 +233,7 @@ JSValueRef JSCalendar::add(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return NULL;
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendar::addBatch(JSContextRef context,
@@ -301,7 +301,7 @@ JSValueRef JSCalendar::addBatch(JSContextRef context,
         dplEvent->setForAsynchronousCall(&CalendarResponseDispatcher::getInstance());
         calendar->addEvents(dplEvent);
 
-        return JSValueMakeNull(context);
+        return JSValueMakeUndefined(context);
     }
     Catch(UnsupportedException)
     {
@@ -324,7 +324,7 @@ JSValueRef JSCalendar::addBatch(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return NULL;
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendar::update(JSContextRef context,
@@ -386,7 +386,7 @@ JSValueRef JSCalendar::update(JSContextRef context,
         calendar->updateEvent(dplEvent);
 
         if (dplEvent->getResult()) {
-            return JSValueMakeNull(context);
+            return JSValueMakeUndefined(context);
         } else {
             ThrowMsg(UnknownException, "Updating failed by unkown reason.");
         }
@@ -417,7 +417,7 @@ JSValueRef JSCalendar::update(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendar::updateBatch(JSContextRef context,
@@ -489,7 +489,7 @@ JSValueRef JSCalendar::updateBatch(JSContextRef context,
         dplEvent->setForAsynchronousCall(&CalendarResponseDispatcher::getInstance());
         calendar->updateEvents(dplEvent);
 
-        return makePendingOperation(cbm->getContext(), dplEvent);
+        return JSValueMakeUndefined(context);
     }
     Catch(UnsupportedException)
     {
@@ -517,7 +517,7 @@ JSValueRef JSCalendar::updateBatch(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendar::remove(JSContextRef context,
@@ -575,7 +575,7 @@ JSValueRef JSCalendar::remove(JSContextRef context,
 
         if (dplEvent->getResult()) {
             LogInfo("Successfully deleted.");
-            return JSValueMakeNull(context);
+            return JSValueMakeUndefined(context);
         } else {
             if (dplEvent->getExceptionCode() == ExceptionCodes::NotFoundException) {
                 ThrowMsg(ConversionException, "Item not found.");
@@ -610,7 +610,7 @@ JSValueRef JSCalendar::remove(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendar::removeBatch(JSContextRef context,
@@ -695,7 +695,7 @@ JSValueRef JSCalendar::removeBatch(JSContextRef context,
         dplEvent->setForAsynchronousCall(&CalendarResponseDispatcher::getInstance());
         calendar->deleteEvents(dplEvent);
 
-        return makePendingOperation(cbm->getContext(), dplEvent);
+        return JSValueMakeUndefined(context);
     }
     Catch(UnsupportedException)
     {
@@ -723,7 +723,7 @@ JSValueRef JSCalendar::removeBatch(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendar::findWithWACFilter(JSContextRef context,
@@ -776,7 +776,7 @@ JSValueRef JSCalendar::findWithWACFilter(JSContextRef context,
         dplEvent->setFilter(filter);
         calendar->findEvents(dplEvent);
 
-        return JSValueMakeNull(context);
+        return JSValueMakeUndefined(context);
     }
     Catch(UnsupportedException)
     {
@@ -804,7 +804,7 @@ JSValueRef JSCalendar::findWithWACFilter(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendar::find(JSContextRef context,
@@ -902,7 +902,7 @@ JSValueRef JSCalendar::find(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendar::get(JSContextRef context,
@@ -989,7 +989,7 @@ JSValueRef JSCalendar::get(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendar::convertFromString(JSContextRef context,
@@ -1083,7 +1083,7 @@ JSValueRef JSCalendar::convertFromString(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendar::addChangeListener(JSContextRef context,
@@ -1174,7 +1174,6 @@ JSValueRef JSCalendar::addChangeListener(JSContextRef context,
         } else {
             ThrowMsg(UnknownException, "Adding change listener failed by unkown reason.");
         }
-        return JSValueMakeNull(context);
     }
     Catch(UnsupportedException)
     {
@@ -1197,7 +1196,7 @@ JSValueRef JSCalendar::addChangeListener(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendar::removeChangeListener(JSContextRef context,
@@ -1238,7 +1237,7 @@ JSValueRef JSCalendar::removeChangeListener(JSContextRef context,
         dplEvent->setForSynchronousCall();
         calendar->clearWatch(dplEvent);
 
-        return JSValueMakeNull(context);
+        return JSValueMakeUndefined(context);
     }
     Catch(UnsupportedException)
     {
@@ -1266,7 +1265,7 @@ JSValueRef JSCalendar::removeChangeListener(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendar::getPropertyName(JSContextRef context,
index e436c6f..acdc93d 100755 (executable)
@@ -326,7 +326,7 @@ JSValueRef JSCalendarEvent::expandRecurrence(JSContextRef context,
         dplEvent->setEndDate(endDate);
         m_calendar->expandEventRecurrence(dplEvent);
 
-        return JSValueMakeNull(context);
+        return JSValueMakeUndefined(context);
     }
     Catch(UnsupportedException)
     {
@@ -354,7 +354,7 @@ JSValueRef JSCalendarEvent::expandRecurrence(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendarEvent::getPropertyId(JSContextRef context,
index cc7959a..fb7304f 100755 (executable)
@@ -283,7 +283,7 @@ JSValueRef JSCalendarItemProperties::convertToString(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendarItemProperties::clone(JSContextRef context,
@@ -352,7 +352,7 @@ JSValueRef JSCalendarItemProperties::clone(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendarItemProperties::getPropertyDescription(JSContextRef context,
index 20d19cc..daf949a 100755 (executable)
@@ -174,7 +174,7 @@ JSValueRef JSCalendarManager::getCalendars(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendarManager::getDefaultCalendar(JSContextRef context,
@@ -247,7 +247,7 @@ JSValueRef JSCalendarManager::getDefaultCalendar(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 JSValueRef JSCalendarManager::getCalendar(JSContextRef context,
@@ -330,7 +330,7 @@ JSValueRef JSCalendarManager::getCalendar(JSContextRef context,
         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
     }
 
-    return JSValueMakeNull(context);
+    return JSValueMakeUndefined(context);
 }
 
 const JSClassRef JSCalendarManager::getClassRef()