merge wrt-plugins-tizen_0.2.0-9
authorSangtai Kim <sangtai.kim@samsung.com>
Wed, 22 Feb 2012 06:38:31 +0000 (15:38 +0900)
committerSangtai Kim <sangtai.kim@samsung.com>
Wed, 22 Feb 2012 06:38:31 +0000 (15:38 +0900)
debian/changelog
src/platform/API/Mediacontent/MediacontentAudio.cpp
src/standards/Tizen/Mediacontent/JSAudio.cpp
src/standards/Tizen/Mediacontent/JSMedia.cpp
src/standards/Tizen/Tizen/JSAttributeRangeFilter.cpp

index e5722e5..6659470 100644 (file)
@@ -1,3 +1,12 @@
+wrt-plugins-tizen (0.2.0-9) unstable; urgency=low
+
+  * Rangefilter bug fix
+  * Git : slp/pkgs/w/wrt-plugins-tizen
+  * Tag : wrt-plugins-tizen_0.2.0-9
+
+
+ -- Sangtai Kim <sangtai.kim@samsung.com>  Wed, 22 Feb 2012 15:20:31 +0900
+
 wrt-plugins-tizen (0.2.0-8) unstable; urgency=low
 
   * Fix calendar build error
index 8c4169e..b9af7a9 100644 (file)
@@ -112,7 +112,7 @@ void MediacontentAudio::setAudioAlbum(const string &value)
 
 void MediacontentAudio::setAudioArtist(const string &value)
 {
-       m_audioAlbum = value;
+       m_audioArtist = value;
 }
 
 void MediacontentAudio::setAudioGenre(const string &value)
index d150fc5..32bb344 100644 (file)
@@ -174,12 +174,27 @@ JSValueRef JSAudio::getPropertyArtist(
                                JSStringRef propertyName,
                                JSValueRef* exception)
 {
-    LogDebug("entered");
+    LogDebug("getPropertyArtist::entered");
     Try
     {
-       Converter converter(context);
+               Converter converter(context);
         MediacontentAudioPtr event = getAudioObject(object);
-        return converter.toJSValueRef(event->getAudioArtist());
+               JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
+
+               LogDebug("Artist:" << event->getAudioArtist());
+               if (NULL == jsResult) 
+               {
+                       ThrowMsg(NullPointerException, "Could not create js array object");
+               }
+//             for(unsigned int i=0; i<event->getAudioArtist()->size(); i++) 
+               {
+                       JSValueRef val = converter.toJSValueRef(event->getAudioArtist());
+                       if(!JSSetArrayElement(context, jsResult, 0, val)) 
+                       {
+                          ThrowMsg(UnknownException, "Could not insert value into js array");
+                       }
+               }
+               return jsResult;  
     }
     Catch(Exception)
     {
@@ -196,12 +211,26 @@ JSValueRef JSAudio::getPropertyGenre(
                        JSStringRef propertyName, 
                        JSValueRef* exception)
 {
-    LogDebug("entered");
+    LogDebug("getPropertyGenre::entered");
     Try
     {
         Converter converter(context);
         MediacontentAudioPtr event = getAudioObject(object);
-        return converter.toJSValueRef(event->getAudioGenre());
+               JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
+
+               if (NULL == jsResult) 
+               {
+                       ThrowMsg(NullPointerException, "Could not create js array object");
+               }
+//             for(unsigned int i=0; i<event->getAudioGenre()->size(); i++) 
+               {
+                       JSValueRef val = converter.toJSValueRef(event->getAudioGenre());
+                       if(!JSSetArrayElement(context, jsResult, 0, val)) 
+                       {
+                          ThrowMsg(UnknownException, "Could not insert value into js array");
+                       }
+               }
+               return jsResult;
     }
     Catch(Exception)
     {
@@ -217,12 +246,26 @@ JSValueRef JSAudio::getPropertyComposer(
                        JSStringRef propertyName, 
                        JSValueRef* exception)
 {
-    LogDebug("entered");
+    LogDebug("getPropertyComposer::entered");
     Try
     {
         Converter converter(context);
         MediacontentAudioPtr event = getAudioObject(object);
-        return converter.toJSValueRef(event->getAudioComposer());
+               JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
+
+               if (NULL == jsResult) 
+               {
+                       ThrowMsg(NullPointerException, "Could not create js array object");
+               }
+//             for(unsigned int i=0; i<event->getAudioComposer()->size(); i++) 
+               {
+                       JSValueRef val = converter.toJSValueRef(event->getAudioComposer());
+                       if(!JSSetArrayElement(context, jsResult, 0, val)) 
+                       {
+                          ThrowMsg(UnknownException, "Could not insert value into js array");
+                       }
+               }
+               return jsResult;
     }
     Catch(Exception)
     {
index 9b1ce32..85befab 100644 (file)
@@ -36,8 +36,8 @@ namespace Mediacontent {
 #define TIZEN_MEDIACONTENT_MEDIA_MIME_TYPE                     "mimeType"
 #define TIZEN_MEDIACONTENT_MEDIA_TITLE                         "title"
 #define TIZEN_MEDIACONTENT_MEDIA_FILE_URL                      "itemURI"
-#define TIZEN_MEDIACONTENT_MEDIA_THUMBNAILPATH         "thumbnailPath"
-#define TIZEN_MEDIACONTENT_MEDIA_RELEASEDDATE          "releasedDate"  
+#define TIZEN_MEDIACONTENT_MEDIA_THUMBNAILPATH         "thumbnailURIs"
+#define TIZEN_MEDIACONTENT_MEDIA_RELEASEDDATE          "releaseDate"   
 #define TIZEN_MEDIACONTENT_MEDIA_MODIFIEDDATE          "modifiedDate"  
 #define TIZEN_MEDIACONTENT_MEDIA_DESCRIPTION           "description"   
 #define TIZEN_MEDIACONTENT_MEDIA_RATING                                "rating"        
@@ -242,7 +242,22 @@ JSValueRef JSMedia::getPropertyThumbnailPath(
     {
         Converter converter(context);
         MediacontentMediaPtr event = getMediaObject(object);
-        return converter.toJSValueRef(event->getThumbnailPath());
+        JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
+               if (NULL == jsResult) 
+               {
+                       ThrowMsg(NullPointerException, "Could not create js array object");
+               }
+//             for(unsigned int i=0; i<event->getThumbnailPath()->size(); i++) 
+               {
+                       JSValueRef val = converter.toJSValueRef(event->getThumbnailPath());
+                       if(!JSSetArrayElement(context, jsResult, 0, val)) 
+                       {
+                          ThrowMsg(UnknownException, "Could not insert value into js array");
+                       }
+               }
+
+               return jsResult;      
+        
     }
     Catch(Exception)
     {
@@ -257,7 +272,7 @@ JSValueRef JSMedia::getPropertyDescription(
                                        JSStringRef propertyName, 
                                        JSValueRef* exception)
 {
-    LogDebug("entered");
+    LogDebug("getPropertyDescription::entered");
     Try
     {
         Converter converter(context);
index dfd8fc1..4f68995 100755 (executable)
@@ -211,6 +211,14 @@ JSObjectRef JSAttributeRangeFilter::constructor(JSContextRef context,
        AnyPtr endValue;
 
        Try {
+               attributeName = converter->toString(arguments[0]);
+       } Catch(Exception) {
+               LogError("Argument type mismatch : " << _rethrown_exception.GetMessage());
+               *exception = JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::TYPE_MISMATCH_ERROR, "Wrong arguments");
+               return NULL;
+       }
+
+       Try {
                if(argumentCount >= 2)
                        initialValue = converter->toAny(arguments[1]);
                else