Fix comments of encoded image buffer
[platform/core/uifw/dali-adaptor.git] / dali / public-api / adaptor-framework / encoded-image-buffer.h
1 #ifndef DALI_ENCODED_IMAGE_BUFFER_H
2 #define DALI_ENCODED_IMAGE_BUFFER_H
3 /*
4  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 // EXTERNAL INCLUDES
21 #include <dali/public-api/object/base-handle.h>
22 #include <dali/public-api/common/dali-vector.h>
23
24 // INTERNAL INCLUDES
25 #include <dali/public-api/dali-adaptor-common.h>
26
27 namespace Dali
28 {
29 namespace Internal DALI_INTERNAL
30 {
31 class EncodedImageBuffer;
32 }
33
34 /**
35  * @brief EncodedImageBuffer contains the large encoded raw buffer informations.
36  *
37  * @note Object will copy raw buffer data.
38  */
39 class DALI_ADAPTOR_API EncodedImageBuffer : public BaseHandle
40 {
41 public:
42   using RawBufferType = Dali::Vector<uint8_t>;
43
44 public:
45   /**
46    * @brief Create a new EncodedImageBuffer.
47    *
48    * @param [in] buffer The encoded raw buffer
49    * @return A handle to a new EncodedImageBuffer.
50    */
51   static EncodedImageBuffer New(const RawBufferType& buffer);
52
53   /**
54    * @brief Create an empty handle.
55    *
56    * Calling member functions of an empty handle is not allowed.
57    */
58   EncodedImageBuffer();
59
60   /**
61    * @brief Destructor.
62    */
63   ~EncodedImageBuffer();
64
65   /**
66    * @brief This copy constructor is required for (smart) pointer semantics.
67    *
68    * @param [in] handle A reference to the copied handle
69    */
70   EncodedImageBuffer(const EncodedImageBuffer& handle);
71
72   /**
73    * @brief This assignment operator is required for (smart) pointer semantics.
74    *
75    * @param [in] handle  A reference to the copied handle
76    * @return A reference to this
77    */
78   EncodedImageBuffer& operator=(const EncodedImageBuffer& handle);
79
80   /**
81    * @brief Get raw buffer data
82    * @note this method return const value. Mean, you cannot change raw buffer
83    * @return A RawBufferType this buffer have
84    */
85   const RawBufferType& GetRawBuffer() const;
86
87 public: // Not intended for developer use
88   explicit DALI_INTERNAL EncodedImageBuffer(Internal::EncodedImageBuffer* impl);
89 };
90
91 } // namespace Dali
92
93 #endif // DALI_ENCODED_IMAGE_BUFFER_H