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. @n
55 * For full construction, the Construct() method must be called right after calling this constructor.
62 * This destructor overrides Tizen::Base::Object::~Object().
66 virtual ~WebHistory(void);
69 * Initializes this instance of %WebHistory.
73 * @return An error code
74 * @exception E_SUCCESS The method is successful.
75 * @exception E_SYSTEM A system error has occurred.
77 result Construct(void);
80 * 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.
101 * @privilege %http://tizen.org/privilege/web.privacy
103 * @return The total number of items
104 * @exception E_SUCCESS The method is successful.
105 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
106 * @remarks The specific error code can be accessed using the GetLastResult() method.
108 int GetItemCount(void) const;
112 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
114 // @param[in] item The instance of the %WebHistory class to copy from
115 // @remarks This constructor is hidden.
117 WebHistory(const WebHistory& item);
120 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
122 // @param[in] item The instance of the %WebHistory class to assign from
123 // @remarks This operator is hidden.
125 WebHistory& operator =(const WebHistory& item);
128 _WebHistoryImpl* __pWebHistoryImpl;
130 friend class _WebHistoryImpl;
134 #endif // _FWEB_WEB_HISTORY_H_