Add features to download images over http protocol.
[platform/core/uifw/dali-adaptor.git] / platform-abstractions / slp / resource-loader / resource-thread-base.cpp
index 5071916..7a8e4e4 100644 (file)
@@ -23,7 +23,6 @@
 using namespace Dali::Integration;
 using boost::mutex;
 using boost::unique_lock;
-using boost::scoped_ptr;
 
 namespace Dali
 {
@@ -221,7 +220,7 @@ void ResourceThreadBase::ThreadLoop()
     catch( Dali::DaliException& ex )
     {
       // Probably a failed assert-always:
-      DALI_LOG_ERROR( "DaliException caught in resource thread. Aborting request with id %u. Location: \"%s\". Condition: \"%s\".\n", unsigned(mCurrentRequestId), ex.mLocation.c_str(), ex.mCondition.c_str() );
+      DALI_LOG_ERROR( "DaliException caught in resource thread. Aborting request with id %u. Location: \"%s\". Condition: \"%s\".\n", unsigned(mCurrentRequestId), ex.location, ex.condition );
     }
     catch( ... )
     {
@@ -273,6 +272,12 @@ void ResourceThreadBase::ProcessNextRequest()
       }
       break;
 
+      case RequestDownload:
+      {
+        Download(*request);
+      }
+      break;
+
       case RequestDecode:
       {
         Decode(*request);
@@ -300,6 +305,13 @@ void ResourceThreadBase::UninstallLogging()
   Dali::Integration::Log::UninstallLogFunction();
 }
 
+void ResourceThreadBase::Download(const Integration::ResourceRequest& request)
+{
+  DALI_LOG_TRACE_METHOD(mLogFilter);
+  DALI_LOG_WARNING("Resource Downloading from a remote server not supported for this type.");
+  ///! If you need this for a subclassed thread, look to ResourceThreadImage::Download() for an example implementation.
+}
+
 void ResourceThreadBase::Decode(const Integration::ResourceRequest& request)
 {
   DALI_LOG_TRACE_METHOD(mLogFilter);