Tizen 2.1 base
[framework/osp/web.git] / inc / FWebWebHistory.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                FWebWebHistory.h
20  * @brief               This is the header file for the %WebHistory class.
21  * @since               2.0
22  *
23  * This header file contains the declarations of the %WebHistory class.
24  */
25 #ifndef _FWEB_WEB_HISTORY_H_
26 #define _FWEB_WEB_HISTORY_H_
27
28 #include <FBaseObject.h>
29
30 namespace Tizen { namespace Web
31 {
32 class HistoryItem;
33 class _WebHistoryImpl;
34 }} // Tizen::Web
35
36 namespace Tizen { namespace Web
37 {
38
39 /**
40  * @class               WebHistory
41  * @brief               This class contains the pages visited by users in a browser.
42  *
43  * @since               2.0
44  *
45  * The %WebHistory class is used to retrieve the pages visited by users in a browser. The visited pages are represented by the HistoryItem class.
46  * The WEB_PRIVACY privilege is required to use this class.
47  *
48  */
49 class _OSP_EXPORT_ WebHistory
50         : public Tizen::Base::Object
51 {
52 public:
53         /**
54          * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
55          *
56          * @since               2.0
57          */
58         WebHistory(void);
59
60         /**
61          * This destructor overrides Tizen::Base::Object::~Object().
62          *
63          * @since               2.0
64          */
65         virtual ~WebHistory(void);
66
67         /**
68          * Initializes this instance of %WebHistory.
69          *
70          * @since               2.0
71          * @privilege   %http://tizen.org/privilege/web.privacy
72          *
73          * @return      An error code
74          * @exception   E_SUCCESS                       The method is successful.
75          * @exception   E_SYSTEM                        A system error has occurred.
76          * @exception   E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
77          */
78         result Construct(void);
79
80         /**
81          * Gets the history item pointed to by the specified @c index.
82          *
83          * @since               2.0
84          * @privilege   %http://tizen.org/privilege/web.privacy
85          *
86          * @return              The history item at the specified @c index
87          * @param[in]   index                   The index of an element @n
88          *                                   The value of the index must be greater than or equal to @c 0.
89          * @exception   E_SUCCESS                       The method is successful.
90          * @exception   E_OUT_OF_RANGE          The specified @c index is out of range.
91          * @exception   E_PRIVILEGE_DENIED              The application does not have the privilege to call this method.
92          * @remarks     The specific error code can be accessed using the GetLastResult() method.
93          */
94         const HistoryItem* GetItemAt(int index) const;
95
96         /**
97          * Gets the total number of items.
98          *
99          * @since               2.0
100          * @privilege   %http://tizen.org/privilege/web.privacy
101          *
102          * @return              The total number of items
103          * @exception   E_SUCCESS               The method is successful.
104          * @exception   E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
105          * @remarks     The specific error code can be accessed using the GetLastResult() method.
106          */
107         int GetItemCount(void) const;
108
109 private:
110         //
111         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
112         //
113         // @param[in]   item            The instance of the %WebHistory class to copy from
114         // @remarks             This constructor is hidden.
115         //
116         WebHistory(const WebHistory& item);
117
118         //
119         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
120         //
121         // @param[in]   item            The instance of the %WebHistory class to assign from
122         // @remarks             This operator is hidden.
123         //
124         WebHistory& operator =(const WebHistory& item);
125
126 private:
127         _WebHistoryImpl* __pWebHistoryImpl;
128
129         friend class _WebHistoryImpl;
130 }; // WebHistory
131
132 }} // Tizen::Web
133 #endif // _FWEB_WEB_HISTORY_H_