#define DALI_TOOLKIT_INTERNAL_VISUAL_URL_H
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
// EXTERNAL INCLUDES
#include <cstdint>
#include <string>
+#include <string_view>
namespace Dali
{
const std::string& GetUrl() const;
/**
+ * Get the ellipsed URL.
+ * @return The ellipsed url
+ */
+ std::string GetEllipsedUrl() const;
+
+ /**
* Get the hash value of full URL
* @return The hash value of url
*/
std::string GetLocation() const;
/**
+ * @return the location part of the url without extension
+ */
+ std::string GetLocationWithoutExtension() const;
+
+ /**
* Helper to create a URL of type TEXTURE
* @param location the location of the texture
* @return the Url
/**
* Helper to create a URL of type BUFFER
- * @param location the location of the texture
+ * @param[in] location the location of the texture
+ * @param[in] extension the extension of url
* @return the Url
*/
- static std::string CreateBufferUrl(const std::string& location);
+ static std::string CreateBufferUrl(const std::string& location, const std::string_view& extension);
/**
* Helper to get a ProtocolType from url
*/
static std::string GetLocation(const std::string& url);
+ /**
+ * Helper to get a location from url without extension
+ * @param[in] url the location of the texture
+ * @return the location without extension
+ */
+ static std::string GetLocationWithoutExtension(const std::string& url);
+
private:
std::string mUrl;
Type mType;