1 #ifndef DALI_TOOLKIT_INTERNAL_IMAGE_URL_H
2 #define DALI_TOOLKIT_INTERNAL_IMAGE_URL_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/object/base-object.h>
26 #include <dali-toolkit/public-api/image-loader/image-url.h>
35 using ImageUrlPtr = IntrusivePtr<ImageUrl>;
37 class ImageUrl : public BaseObject
43 ImageUrl(Texture& texture);
46 * @copydoc Dali::Toolkit::ImageUrl::New
48 static ImageUrlPtr New(Texture& texture);
51 * @copydoc Dali::Toolkit::ImageUrl::GetUrl
53 const std::string& GetUrl() const;
57 * @brief A reference counted object may only be deleted by calling Unreference()
63 ImageUrl(const ImageUrl&);
66 ImageUrl& operator=(const ImageUrl& rhs);
72 } // namespace Internal
73 } // namespace Toolkit
75 // Helpers for public-api forwarding methods
77 inline Toolkit::Internal::ImageUrl& GetImpl(Dali::Toolkit::ImageUrl& imageUrl)
79 DALI_ASSERT_ALWAYS(imageUrl && "ImageUrl handle is empty");
81 BaseObject& handle = imageUrl.GetBaseObject();
83 return static_cast<Toolkit::Internal::ImageUrl&>(handle);
86 inline const Toolkit::Internal::ImageUrl& GetImpl(const Dali::Toolkit::ImageUrl& imageUrl)
88 DALI_ASSERT_ALWAYS(imageUrl && "ImageUrl handle is empty");
90 const BaseObject& handle = imageUrl.GetBaseObject();
92 return static_cast<const Toolkit::Internal::ImageUrl&>(handle);
95 } // End of namespace Dali
97 #endif // DALI_TOOLKIT_INTERNAL_IMAGE_URL_H