Added devel APIs to add and remove external Texture and TextureSet to texture manager
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / visual-url.cpp
index 1878e31..907b428 100644 (file)
@@ -30,7 +30,7 @@ namespace Internal
 namespace
 {
 
-VisualUrl::Location ResolveLocation( const std::string& url )
+VisualUrl::ProtocolType ResolveLocation( const std::string& url )
 {
   const char* urlCStr = url.c_str();
   const uint32_t length = url.size();
@@ -219,7 +219,7 @@ VisualUrl::Type VisualUrl::GetType() const
   return mType;
 }
 
-VisualUrl::Location VisualUrl::GetLocation() const
+VisualUrl::ProtocolType VisualUrl::GetProtocolType() const
 {
   return mLocation;
 }
@@ -234,6 +234,21 @@ bool VisualUrl::IsLocalResource() const
   return mLocation == VisualUrl::LOCAL;
 }
 
+std::string VisualUrl::GetLocation()
+{
+  const auto location = mUrl.find( "://" );
+  if( std::string::npos != location )
+  {
+    return mUrl.substr( location + 3u ); // 3 characters forwards from the start of ://
+  }
+  return mUrl;
+}
+
+std::string VisualUrl::CreateTextureUrl( const std::string& location )
+{
+  return "dali://" + location;
+}
+
 } // Internal
 
 } // Toolkit