Merge branch 'devel/master' into devel/graphics
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / web-engine-back-forward-list.h
1 #ifndef DALI_WEB_ENGINE_BACK_FORWARD_LIST_H
2 #define DALI_WEB_ENGINE_BACK_FORWARD_LIST_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/devel-api/adaptor-framework/web-engine-back-forward-list-item.h>
23 #include <string>
24
25 namespace Dali
26 {
27 class WebEngineBackForwardListItem;
28
29 /**
30  * @brief A class WebBackForwardList for back forward list of web engine.
31  */
32 class WebEngineBackForwardList
33 {
34 public:
35   /**
36    * @brief Constructor.
37    */
38   WebEngineBackForwardList() = default;
39
40   /**
41    * @brief Destructor.
42    */
43   virtual ~WebEngineBackForwardList() = default;
44
45   /**
46    * @brief Returns the current item in the @a list.
47    * @return The item of back-forward list.
48    */
49   virtual WebEngineBackForwardListItem& GetCurrentItem() const = 0;
50
51   /**
52    * @brief Returns the item at a given @a index relative to the current item.
53    * @param[in] index The index of the item
54    * @return The item of back-forward list.
55    */
56   virtual WebEngineBackForwardListItem& GetItemAtIndex(uint32_t index) const = 0;
57
58   /**
59    * @brief Returns the length of the back-forward list including the current
60    *        item.
61    * @return The length of the back-forward list including the current item,
62    *         otherwise @c 0 in case of an error
63    */
64   virtual uint32_t GetItemCount() const = 0;
65 };
66
67 } // namespace Dali
68
69 #endif // DALI_WEB_ENGINE_BACK_FORWARD_LIST_H