Set the image type of encoded image buffer
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / common / encoded-image-buffer-impl.h
index 2c8e924..f482325 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_ENCODED_IMAGE_BUFFER_IMPL_H
 
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -34,17 +34,19 @@ class EncodedImageBuffer : public BaseObject
 {
 public:
   using RawBufferType = Dali::EncodedImageBuffer::RawBufferType;
+  using ImageType     = Dali::EncodedImageBuffer::ImageType;
 
   /**
    * Constructor
-   * @param [in] buffer The raw buffer of image.
+   * @param[in] buffer The raw buffer of image.
+   * @param[in] type The type of image.
    */
-  EncodedImageBuffer(const RawBufferType& buffer);
+  EncodedImageBuffer(const RawBufferType& buffer, ImageType type);
 
   /**
    * @copydoc Dali::EncodedImageBuffer::New
    */
-  static IntrusivePtr<EncodedImageBuffer> New(const RawBufferType& buffer);
+  static IntrusivePtr<EncodedImageBuffer> New(const RawBufferType& buffer, ImageType type);
 
   /**
    * @copydoc Dali::EncodedImageBuffer::GetRawBuffer
@@ -54,7 +56,17 @@ public:
   /**
    * @copydoc Dali::EncodedImageBuffer::GetHash
    */
-  const std::size_t GetHash() const;
+  std::size_t GetHash() const;
+
+  /**
+   * @copydoc Dali::EncodedImageBuffer::SetImageType
+   */
+  void SetImageType(ImageType type);
+
+  /**
+   * @copydoc Dali::EncodedImageBuffer::GetImageType
+   */
+  ImageType GetImageType() const;
 
 protected:
   /**
@@ -72,6 +84,7 @@ private:
 private:
   Dali::Vector<uint8_t> mBuffer;
   std::size_t           mBufferHash;
+  ImageType             mType;
 };
 
 } // namespace Internal