950d11cc531f65bb495983380424e016648767c3
[framework/osp/web.git] / inc / FWebHistoryItem.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file                FWebHistoryItem.h
20  * @brief               This is the header file for the %HistoryItem class.
21  *
22  * This header file contains the declarations of the %HistoryItem class.
23  */
24 #ifndef _FWEB_HISTORY_ITEM_H_
25 #define _FWEB_HISTORY_ITEM_H_
26
27 #include <FBaseObject.h>
28 #include <FBaseString.h>
29 #include <FGrpBitmap.h>
30
31 namespace Tizen { namespace Web
32 {
33 class _HistoryItemImpl;
34 class _WebHistoryImpl;
35 }} // Tizen::Web
36
37 namespace Tizen { namespace Web { namespace Controls
38 {
39 class _WebImpl;
40 }}} // Tizen::Web::Controls
41
42 namespace Tizen { namespace Web
43 {
44
45 /**
46  * @class               HistoryItem
47  * @brief               This class is used for accessing a history item stored in the PageNavigationList class or the WebHistory class.
48  *
49  * @since               2.0
50  *
51  * The %HistoryItem class provides access to the Controls::PageNavigationList class item and the WebHistory class.
52  * Each item contains the title and the URL of the page visited.
53  */
54 class _OSP_EXPORT_ HistoryItem
55         : public Tizen::Base::Object
56 {
57 public:
58         /**
59          * This destructor overrides Tizen::Base::Object::~Object().
60          *
61          * @since               2.0
62          */
63         virtual ~HistoryItem(void);
64
65         /**
66          * Gets the page title of the current history item.
67          *
68          * @since               2.0
69          *
70          * @return      The title of the current history item
71          */
72         Tizen::Base::String GetTitle(void) const;
73
74         /**
75          * Gets the URL of the current history item.
76          *
77          * @since               2.0
78          *
79          * @return      The URL of the current history item
80          */
81         Tizen::Base::String GetUrl(void) const;
82
83         /**
84          * Gets the favicon image from HistoryItem
85          *
86          * @since       2.0
87          *
88          * @return              The image
89          *
90          * @exception   E_SUCCESS       The method is successful.
91          * @remarks     The specific error code can be accessed using the GetLastResult() method.
92          */
93         Tizen::Graphics::Bitmap* GetFaviconN(void) const;
94
95 private:
96         //
97         // This default constructor is intentionally declared as private to implement the Singleton semantic
98         //
99         // @remarks             This constructor is hidden.
100         //
101         HistoryItem(void);
102
103         //
104         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
105         //
106         // @param[in]   item            The instance of the %HistoryItem class to copy from
107         // @remarks             This constructor is hidden.
108         //
109         HistoryItem(const HistoryItem& item);
110
111         //
112         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
113         //
114         // @param[in]   item            The instance of the %HistoryItem class to assign from
115         // @remarks             This operator is hidden.
116         //
117         HistoryItem& operator =(const HistoryItem& item);
118
119 private:
120         _HistoryItemImpl* __pHistoryItemImpl;
121
122         friend class Tizen::Web::Controls::_WebImpl;
123
124         friend class _HistoryItemImpl;
125
126         friend class _WebHistoryImpl;
127 }; // HistoryItem
128
129 }} // Tizen::Web
130 #endif // _FWEB_HISTORY_ITEM_H_