upload tizen1.0 source
[platform/framework/web/wrt-plugins-common.git] / src / modules / tizen / MMPlayer / Manager.cpp
index 543a932..4a39576 100644 (file)
@@ -18,6 +18,7 @@
 #include <mm_sound.h>
 #include <mm_player.h>
 #include <WidgetDB/WidgetDBMgr.h>
+#include <Commons/WrtAccess/WrtAccess.h>
 #include <MMPlayer/EventOnStateChange.h>
 #include "MMPlayer.h"
 
@@ -107,17 +108,12 @@ void Manager::OnRequestReceived(const EventOpenPtr& event)
     //Check if current installation path should be added
     if ((fullName[0] != '/') && (fullName.find("://") == string::npos)) {
         try {
+            using namespace WrtDeviceApis::Commons;
             std::string installationPath;
-            Commons::IWrtWrapperPtr wrapper = event->getWrtWrapper();
-            if (!wrapper) {
-                LogError("Wrt API not accessible. Can't get installation path.");
-                event->setExceptionCode(
-                    Commons::ExceptionCodes::PlatformException);
-                return;
-            }
-
-            WidgetDB::Api::IWidgetDBPtr widgetDB = WidgetDB::Api::getWidgetDB(
-                wrapper->getWidgetId());
+            int widgetId = WrtAccessSingleton::Instance().getWidgetId();
+
+            WidgetDB::Api::IWidgetDBPtr widgetDB = 
+                WidgetDB::Api::getWidgetDB(widgetId);
             installationPath = widgetDB->getConfigValue(
                     WidgetDB::Api::ConfigAttribute::INSTALL_PATH);