X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-url.h;h=b2618135fa17c0ba0a5f42a13ac50cbe63d26c48;hb=4d305b893731daafafc293b92dc4fa25a896e929;hp=d9ed48a8a2a10b833b139069d30a8afbaa92c994;hpb=ddef399f249128bef52cbb79eb321b0bfdaa0ced;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/visual-url.h b/dali-toolkit/internal/visuals/visual-url.h index d9ed48a..b261813 100644 --- a/dali-toolkit/internal/visuals/visual-url.h +++ b/dali-toolkit/internal/visuals/visual-url.h @@ -43,10 +43,11 @@ public: GIF }; - enum Location + enum ProtocolType { - LOCAL, - REMOTE + LOCAL, ///< file in local file system + TEXTURE, ///< texture uploaded to texture manager + REMOTE ///< remote image }; /** @@ -90,7 +91,7 @@ public: * Is the URL is local to the device, or remote? * @return the location of the resource */ - Location GetLocation() const; + ProtocolType GetProtocolType() const; /** * Is the URL valid? @@ -99,14 +100,26 @@ public: bool IsValid() const; /** - * @return true if the location is LOCAL + * @return true if the location is LOCAL, i.e. is loadable from local file system */ - bool IsLocal() const; + bool IsLocalResource() const; + + /** + * @return the location part of the url + */ + std::string GetLocation(); + + /** + * Helper to create a URL of type TEXTURE + * @param location the location of the texture + * @return the Url + */ + static std::string CreateTextureUrl( const std::string& location ); private: std::string mUrl; Type mType; - Location mLocation; + ProtocolType mLocation; };