X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-url.h;h=63ad5e47e22af4f0ad406b431f9fc062b5f0c9b7;hb=74f25e93f1094929c90c1632b686e9bfa03bd017;hp=96bd6353bb2c4f85b29b095135493f34ef83ed7c;hpb=66aea017c0e66b952d8dc15e2c0a9296557e8ec4;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 96bd635..63ad5e4 100644 --- a/dali-toolkit/internal/visuals/visual-url.h +++ b/dali-toolkit/internal/visuals/visual-url.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_VISUAL_URL_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,10 +40,12 @@ public: REGULAR_IMAGE, N_PATCH, SVG, - GIF + GIF, + WEBP, + JSON }; - enum Location + enum ProtocolType { LOCAL, ///< file in local file system TEXTURE, ///< texture uploaded to texture manager @@ -91,7 +93,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? @@ -104,10 +106,22 @@ public: */ bool IsLocalResource() const; + /** + * @return the location part of the url + */ + std::string GetLocation() const; + + /** + * 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; };