Update change log and spec for wrt-plugins-tizen_0.4.22
authorDongjin Choi <milkelf.choi@samsung.com>
Mon, 22 Apr 2013 11:48:27 +0000 (20:48 +0900)
committerDongjin Choi <milkelf.choi@samsung.com>
Mon, 22 Apr 2013 11:48:27 +0000 (20:48 +0900)
[model] REDWOOD
[binary_type] PDA
[customer] OPEN

[Issue#] N/A
[Problem] The error for over data was not distinguished.
[Cause] Error type was not defined on spec.
[Solution] Defined error on spec and impl it.

[Issue#] N/A
[Problem] added the api to get title for image in platform.
[Cause] N/A
[Solution] change the code for getting the title.

[team] WebAPI
[request] N/A
[horizontal_expansion] N/A

packaging/wrt-plugins-tizen.spec
src/Common/PlatformException.cpp
src/Common/PlatformException.h
src/Content/ContentManager.cpp
src/MessagePort/JSRemoteMessagePort.cpp
src/MessagePort/RemoteMessagePort.cpp

index c30515e..d088828 100755 (executable)
@@ -1,7 +1,7 @@
 Name:       wrt-plugins-tizen
 Summary:    JavaScript plugins for WebRuntime
 Version:    0.4.22
-Release:    0
+Release:    1
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
 Source0:    %{name}-%{version}.tar.gz
index 9541913..48aa29c 100644 (file)
@@ -130,6 +130,13 @@ InvalidAccessException::InvalidAccessException(JSContextRef ctx, JSValueRef exce
     mName = "InvalidAccessError";
 }
 
+QuotaExceededException::QuotaExceededException(const char* message):BasePlatformException(JSWebAPIException::QUOTA_EXCEEDED_ERR,"QuotaExceededError", message){
+}
+QuotaExceededException::QuotaExceededException(JSContextRef ctx, JSValueRef exception):BasePlatformException(ctx,exception){
+    mCode = JSWebAPIException::QUOTA_EXCEEDED_ERR;
+    mName = "QuotaExceededError";
+}
+
 
 
 
index 613ac13..0c8027e 100644 (file)
@@ -98,6 +98,11 @@ public:
        InvalidAccessException(JSContextRef ctx, JSValueRef exception);
 };
 
+class QuotaExceededException : public BasePlatformException{
+public:
+       QuotaExceededException(const char* message);
+       QuotaExceededException(JSContextRef ctx, JSValueRef exception);
+};
 
 
 
index 3c4a52a..dd0c30d 100755 (executable)
@@ -257,7 +257,6 @@ void MediacontentManager::readCommonDataFromMediaInfo(media_info_h info, Mediaco
                if (tmpStr)
                {
                        newMedia->setDisplayName(tmpStr);
-                       newMedia->setTitle(tmpStr);
                        LogDebug("Display Name : " << tmpStr);
                        free(tmpStr);
                        tmpStr = NULL;
@@ -291,7 +290,7 @@ void MediacontentManager::readCommonDataFromMediaInfo(media_info_h info, Mediaco
                if (tmpStr)
                {
                        newMedia->setDescription(tmpStr);
-                       LogDebug("Desc : " << tmpStr);
+                       LogDebug("Description : " << tmpStr);
                        free(tmpStr);
                        tmpStr = NULL;
                }
@@ -358,6 +357,16 @@ void MediacontentManager::readImageFromMediaInfo( media_info_h info, Mediaconten
                                        tmpStr = NULL;
                                }
                        }
+                       if ( MEDIA_CONTENT_ERROR_NONE == image_meta_get_title(img, &tmpStr) )
+                       {
+                               if( tmpStr )
+                               {
+                                       newImage->setTitle(tmpStr);
+                                       LogDebug(" Image Title: " << tmpStr);
+                                       free(tmpStr);
+                                       tmpStr = NULL;
+                               }
+                       }
 
                        if ( MEDIA_CONTENT_ERROR_NONE == image_meta_get_width(img, &tmpInt) )
                        {
@@ -674,7 +683,6 @@ void MediacontentManager::readMusicFromMediaInfo( media_info_h info, Mediaconten
                                                LogDebug("Track Number type is wrong. (track number:" << tmpStr << ")");
                                                trackNum = 0;
                                        }
-                       
                                        newAudio->setAudioTrackNum(trackNum);
                                        free(tmpStr);
                                        tmpStr = NULL;
@@ -683,21 +691,18 @@ void MediacontentManager::readMusicFromMediaInfo( media_info_h info, Mediaconten
 
                        if ( MEDIA_CONTENT_ERROR_NONE == media_info_get_size(info, &tmpLongLong) )
                        {       
-                               LogDebug("size");
                                newAudio->setAudioSize(tmpLongLong);
                                LogDebug("Audio Size: " << tmpLongLong);
                        }
 
                        if ( MEDIA_CONTENT_ERROR_NONE == audio_meta_get_bit_rate(audio, &tmpInt) )
                        {       
-                               LogDebug("bitrate");
                                newAudio->setAudioBitrate(tmpInt);
                                LogDebug("Audio Bitrate: " << tmpInt);
                        }
 
                        if ( MEDIA_CONTENT_ERROR_NONE == audio_meta_get_genre(audio, &tmpStr) )
                        {       
-                               LogDebug("gener");
                                if (tmpStr)
                                {
                                        std::vector<std::string> genres = String::split(tmpStr, TAG_DELIMETER);
@@ -822,8 +827,6 @@ void MediacontentManager::OnRequestReceived(const IEventFindFolderPtr &eFolder)
        {
                eFolder->setResult(true);
        }
-
-
        LogDebug("end");
 }
 
index aac88fb..7ecff99 100644 (file)
@@ -293,7 +293,7 @@ JSValueRef JSRemoteMessagePort::sendMessage(JSContextRef context,
                        break;
                case ExceptionCodes::OutOfRangeException:
                        return JSWebAPIException::throwException(context, exception,
-                                       UnknownException("The size of message has exceeded the maximum limit."));
+                                       QuotaExceededException("The size of message has exceeded the maximum limit."));
                        break;
                default:
                        return JSWebAPIException::throwException(context, exception,
index 87bf94c..7def345 100644 (file)
@@ -117,6 +117,12 @@ void RemoteMessagePort::OnRequestReceived(const EventRemoteMessagePortSendMessag
                event->setExceptionCode(ExceptionCodes::NotFoundException);
                event->setResult(false);
        }
+       Catch(OutOfRangeException)
+       {
+               LogError("Error [OutOfRange] : " << _rethrown_exception.GetMessage());
+               event->setExceptionCode(ExceptionCodes::OutOfRangeException);
+               event->setResult(false);
+       }
        Catch(PlatformException)
        {
                LogError("Error [PlatformException] : " << _rethrown_exception.GetMessage());