merge wrt-plugins-tizen_0.2.0-4
[profile/ivi/wrt-plugins-tizen.git] / src / standards / Tizen / Mediacontent / JSVideo.cpp
index 9f7e55c..e95f70b 100644 (file)
@@ -22,6 +22,8 @@
 #include <CommonsJavaScript/JSUtils.h>
 #include <Tizen/Common/JSTizenException.h>
 #include <Tizen/Common/JSTizenExceptionFactory.h>
+#include <Tizen/Tizen/JSSimpleCoordinates.h>
+
 
 #include "JSMediacontent.h"
 #include "JSVideo.h"
 #define TIZEN_MEDIACONTENT_VIDEO_ATTRIBUTENAME         "Video"
 #define TIZEN_MEDIACONTENT_VIDEO_GEOLOCATION           "geolocation"
 #define TIZEN_MEDIACONTENT_VIDEO_ALBUM                         "album"
-#define TIZEN_MEDIACONTENT_VIDEO_ARTIST                        "artist"
+#define TIZEN_MEDIACONTENT_VIDEO_ARTIST                        "artists"
 #define TIZEN_MEDIACONTENT_VIDEO_PLAYEDTIME            "playedTime" 
 #define TIZEN_MEDIACONTENT_VIDEO_PLAYCOUNT                     "playCount" 
 #define TIZEN_MEDIACONTENT_VIDEO_DURATION                      "duration"      
 #define TIZEN_MEDIACONTENT_VIDEO_WIDTH                         "width"
 #define TIZEN_MEDIACONTENT_VIDEO_HEIGHT                        "height"
 
-using namespace WrtDeviceApis::Commons;
-using namespace WrtDeviceApis::CommonsJavaScript;
-using namespace TizenApis::Api::Mediacontent;
-
+using namespace TizenApis::Tizen1_0::Tizen;
 
 namespace TizenApis {
 namespace Tizen1_0 {
@@ -151,8 +150,9 @@ JSValueRef JSVideo::getPropertyGeoLocation(
     {
         Converter converter(context);
         MediacontentVideoPtr event = getVideoObject(object);
-        //Todo
-        return converter.toJSValueRef(event->getVideoLongitude());
+               SimpleCoordinatesPtr geoPtr(new SimpleCoordinates(event->getVideoLatitude(),event->getVideoLongitude()));
+        return JSSimpleCoordinates::createJSObject(context,geoPtr);
+        //return converter.toJSValueRef(event->getVideoLongitude());
     }
     Catch(Exception)
     {