2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file FWebWebHistory.h
20 * @brief This is the header file for the %WebHistory class.
23 * This header file contains the declarations of the %WebHistory class.
25 #ifndef _FWEB_WEB_HISTORY_H_
26 #define _FWEB_WEB_HISTORY_H_
28 #include <FBaseObject.h>
30 namespace Tizen { namespace Web
33 class _WebHistoryImpl;
36 namespace Tizen { namespace Web
41 * @brief This class contains the pages visited by users in a browser.
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.
49 class _OSP_EXPORT_ WebHistory
50 : public Tizen::Base::Object
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.
61 * This destructor overrides Tizen::Base::Object::~Object().
65 virtual ~WebHistory(void);
68 * Initializes this instance of %WebHistory.
71 * @privilege %http://tizen.org/privilege/web.privacy
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.
78 result Construct(void);
81 * Gets the history item pointed to by the specified @c index.
84 * @privilege %http://tizen.org/privilege/web.privacy
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.
94 const HistoryItem* GetItemAt(int index) const;
97 * Gets the total number of items.
100 * @privilege %http://tizen.org/privilege/web.privacy
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.
107 int GetItemCount(void) const;
111 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
113 // @param[in] item The instance of the %WebHistory class to copy from
114 // @remarks This constructor is hidden.
116 WebHistory(const WebHistory& item);
119 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
121 // @param[in] item The instance of the %WebHistory class to assign from
122 // @remarks This operator is hidden.
124 WebHistory& operator =(const WebHistory& item);
127 _WebHistoryImpl* __pWebHistoryImpl;
129 friend class _WebHistoryImpl;
133 #endif // _FWEB_WEB_HISTORY_H_