modify doxygen
[framework/osp/web.git] / inc / FWebBookmarkItem.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                FWebBookmarkItem.h
20  * @brief               This is the header file for the %BookmarkItem class.
21  *
22  * This header file contains the declarations of the %BookmarkItem class.
23  */
24
25 #ifndef _FWEB_BOOKMARK_ITEM_H_
26 #define _FWEB_BOOKMARK_ITEM_H_
27
28 #include <FBaseString.h>
29
30 namespace Tizen { namespace Graphics
31 {
32 class Bitmap;
33 }} // Tizen::Graphics
34
35 namespace Tizen { namespace Web
36 {
37 class _BookmarkItemImpl;
38
39 /**
40  * A unique ID. This ID is unique within a local storage only. @n
41  * @c RecordId is assigned by the local storage when a record is saved to the storage.
42  * 
43  *
44  * @since               2.1
45  */
46 typedef int RecordId;
47
48 /**
49  * The root folder ID. @n
50  * In fact, it is a symbolic value because the root folder record does not exist physically.
51  *
52  * @since               2.1
53  */
54 const RecordId ROOT_FOLDER_ID = -1;
55
56 /**
57 * @class                BookmarkItem
58 * @brief                This class is used for accessing a bookmark item stored in the %WebBookmark class.
59 *
60 * @since                2.1
61 *
62 * @final                This class is not intended for extension.
63 *
64 * The %BookmarkItem class provides access to the WebBookmark class.
65 * Each item contains the title, the URL of the page, the item type, and the parent folder ID.
66 */
67 class _OSP_EXPORT_ BookmarkItem
68         : public Tizen::Base::Object
69 {
70 public:
71
72         /**
73          * Copying of objects using this copy constructor is allowed.
74          * This is the copy constructor for the %BookmarkItem class. @n
75          * It creates an instance of %BookmarkItem with the values of the specified instance.
76          *
77          * @since               2.1
78          *
79          * @param[in] rhs An instance of %BookmarkItem
80          */
81         BookmarkItem(const BookmarkItem& rhs);
82
83         /**
84          * This destructor overrides Tizen::Base::Object::~Object().
85          *
86          * @since               2.1
87          */
88         virtual ~BookmarkItem(void);
89
90         /**
91          * Gets the title from the current bookmark item.
92          *
93          * @since               2.1
94          *
95          * @return              The title of the current bookmark item
96          */
97         Tizen::Base::String GetTitle(void) const;
98
99         /**
100          * Gets the URL from the current bookmark item.
101          *
102          * @since               2.1
103          *
104          * @return              The URL of the current bookmark item @n
105          *                              If the item type is folder, this method will return an empty string.
106          * @see IsFolder()
107          */
108         Tizen::Base::String GetUrl(void) const;
109
110         /**
111          * Gets the favicon image from the current bookmark item.
112          *       
113          * @since               2.1
114          *
115          * @return              The image
116          * @exception   E_SUCCESS       The method is successful.
117          * @exception   E_SYSTEM        Either of the following conditions has occurred: @n
118          *                                              - The method cannot proceed due to a severe system error. @n
119          * @remarks     The specific error code can be accessed using the GetLastResult() method.
120          */
121         Tizen::Graphics::Bitmap* GetFaviconN(void) const;
122
123         /**
124          * Gets the parent folder ID of the current bookmark item. 
125          *
126          * @since               2.1
127          *
128          * @return              The parent folder ID of the current bookmark item @n
129          *                              If the current bookmark item is the one in topmost level, this method will return ::ROOT_FOLDER_ID.
130          */
131         RecordId GetParentFolderId(void) const;
132
133         /**
134          * Checks whether the type of the current bookmark item is folder or not.
135          *
136          * @since               2.1
137          *
138          * @return              @c true if the type of the current bookmark item is folder, @n
139          *                                      else @c false
140          */
141         bool IsFolder(void) const;
142
143         /**
144          * Gets the hash value of the current instance.
145          *
146          * @since               2.1
147          *
148          * @return              The hash value of the current instance
149          */
150         virtual int GetHashCode(void) const;
151
152         /**
153          * Compares two instances of the %BookmarkItem class.
154          *
155          * @since               2.1
156          *
157          * @return              @c true if the two instances match, or if and only if the two instances contain the same elements, @n
158          *                                      else @c false @n
159          * @param[in]   obj                             The object to compare with the current instance
160          * @see Tizen::Base::Object::Equals()
161          */
162         virtual bool Equals(const Tizen::Base::Object& obj) const;
163
164         /**
165          * Copying of objects using this copy assignment operator is allowed. 
166          *
167          * @since               2.1
168          *
169          * @param[in]   rhs                     The instance of the %BookmarkItem class to assign from
170          */
171         BookmarkItem& operator =(const BookmarkItem& rhs);
172
173 private:
174         //
175         // This default constructor is intentionally declared as private to implement the Singleton semantic
176         //
177         // @remarks     This constructor is hidden.
178         //
179         BookmarkItem(void);
180
181 private:
182         _BookmarkItemImpl* __pBookmarkItemImpl;
183
184         friend class _BookmarkItemImpl;
185
186         friend class _WebBookmarkImpl;
187 };
188
189 }}
190 #endif // _FWEB_BOOKMARK_ITEM_H_