return NULL;
}
- LogDebug("[getPackageById] appId : "<<appId);
+ //LogDebug("[getPackageById] appId : "<<appId);
ret = ail_filter_new(&filter);
if (ret != AIL_ERROR_OK) {
return NULL;
ail_filter_list_appinfo_foreach(filter, appinfoCallback, &pkg);
ail_filter_destroy(filter);
- LogDebug("[getPackageById] pkg : "<<pkg);
+ //LogDebug("[getPackageById] pkg : "<<pkg);
return pkg;
}
return NULL;
}
- LogDebug("[getIdFromPackage] pkg : "<<pkg);
+ //LogDebug("[getIdFromPackage] pkg : "<<pkg);
ret = ail_package_get_appinfo(pkg, &handle);
if (ret != AIL_ERROR_OK) {
return NULL;
return NULL;
}
- LogDebug("[getIdFromPackage] result : "<<appId);
+ //LogDebug("[getIdFromPackage] result : "<<appId);
return appId;
}
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;
}
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);
}
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);
}
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);
}
}
calendar->addEvent(dplEvent);
if (dplEvent->getResult()) {
- return NULL;
+ return JSValueMakeUndefined(context);
} else {
ThrowMsg(UnknownException, "Adding failed by unkown reason.");
}
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
- return NULL;
+ return JSValueMakeUndefined(context);
}
JSValueRef JSCalendar::addBatch(JSContextRef context,
dplEvent->setForAsynchronousCall(&CalendarResponseDispatcher::getInstance());
calendar->addEvents(dplEvent);
- return JSValueMakeNull(context);
+ return JSValueMakeUndefined(context);
}
Catch(UnsupportedException)
{
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
- return NULL;
+ return JSValueMakeUndefined(context);
}
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.");
}
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
- return JSValueMakeNull(context);
+ return JSValueMakeUndefined(context);
}
JSValueRef JSCalendar::updateBatch(JSContextRef context,
dplEvent->setForAsynchronousCall(&CalendarResponseDispatcher::getInstance());
calendar->updateEvents(dplEvent);
- return makePendingOperation(cbm->getContext(), dplEvent);
+ return JSValueMakeUndefined(context);
}
Catch(UnsupportedException)
{
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
- return JSValueMakeNull(context);
+ return JSValueMakeUndefined(context);
}
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.");
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
- return JSValueMakeNull(context);
+ return JSValueMakeUndefined(context);
}
JSValueRef JSCalendar::removeBatch(JSContextRef context,
dplEvent->setForAsynchronousCall(&CalendarResponseDispatcher::getInstance());
calendar->deleteEvents(dplEvent);
- return makePendingOperation(cbm->getContext(), dplEvent);
+ return JSValueMakeUndefined(context);
}
Catch(UnsupportedException)
{
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
- return JSValueMakeNull(context);
+ return JSValueMakeUndefined(context);
}
JSValueRef JSCalendar::findWithWACFilter(JSContextRef context,
dplEvent->setFilter(filter);
calendar->findEvents(dplEvent);
- return JSValueMakeNull(context);
+ return JSValueMakeUndefined(context);
}
Catch(UnsupportedException)
{
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
- return JSValueMakeNull(context);
+ return JSValueMakeUndefined(context);
}
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,
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
- return JSValueMakeNull(context);
+ return JSValueMakeUndefined(context);
}
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,
} else {
ThrowMsg(UnknownException, "Adding change listener failed by unkown reason.");
}
- return JSValueMakeNull(context);
}
Catch(UnsupportedException)
{
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
- return JSValueMakeNull(context);
+ return JSValueMakeUndefined(context);
}
JSValueRef JSCalendar::removeChangeListener(JSContextRef context,
dplEvent->setForSynchronousCall();
calendar->clearWatch(dplEvent);
- return JSValueMakeNull(context);
+ return JSValueMakeUndefined(context);
}
Catch(UnsupportedException)
{
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
- return JSValueMakeNull(context);
+ return JSValueMakeUndefined(context);
}
JSValueRef JSCalendar::getPropertyName(JSContextRef context,