Change wrong character on 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. @n
42  * 
43  *
44  * @since               2.1
45  */
46 typedef int RecordId;
47
48 /**
49  * The root folder ID. @n
50  * In fact, it is symbolic value because the root folder record doesn't 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 * @final                This class is not intended for extension.
62 *
63 * The %BookmarkItem class provides access to the WebBookmark class.
64 * Each item contains the title, the URL of the page, the item type and parent folder id.
65 */
66 class _OSP_EXPORT_ BookmarkItem
67         : public Tizen::Base::Object
68 {
69 public:
70
71         /**
72          * Copying of objects using this copy constructor is allowed.
73          * This is the copy constructor for the %BookmarkItem class. @n
74          * It creates an instance of %BookmarkItem with the values of the specified instance.
75          *
76          * @since               2.1
77          *
78          * @param[in] setting An instance of %BookmarkItem
79          */
80         BookmarkItem(const BookmarkItem& rhs);
81
82         /**
83          * This destructor overrides Tizen::Base::Object::~Object().
84          *
85          * @since               2.1
86          */
87         virtual ~BookmarkItem(void);
88
89         /**
90          * Gets the title from the current bookmark item.
91          *
92          * @since               2.1
93          *
94          * @privlevel   platform
95          * @privilege   http://tizen.org/privilege/bookmark.read
96          *
97          * @return              The title of the current bookmark item
98          */
99         Tizen::Base::String GetTitle(void) const;
100
101         /**
102          * Gets the URL from the current bookmark item.
103          *
104          * @since               2.1
105          *
106          * @privlevel   platform
107          * @privilege   http://tizen.org/privilege/bookmark.read
108          *
109          * @return              The URL of the current bookmark item @n
110          *                              If the item type is folder, this method will return the empty string.
111          * @see IsFolder()
112          */
113         Tizen::Base::String GetUrl(void) const;
114
115         /**
116          * Gets the favicon image from current bookmark item.
117          *       
118          * @since               2.1
119          *
120          * @return              The image
121          *
122          * @privlevel   platform
123          * @privilege   http://tizen.org/privilege/bookmark.read
124          *
125          * @exception   E_SUCCESS       The method is successful.
126          * @exception   E_SYSTEM        Either of the following conditions has occurred: @n
127          *                                              - The method cannot proceed due to a severe system error. @n
128          *                                              - The method has failed because it doesn't work on a service application.
129          * @remarks     The specific error code can be accessed using the GetLastResult() method.
130          */
131         Tizen::Graphics::Bitmap* GetFaviconN(void) const;
132
133         /**
134          * Gets the parent folder id of the current bookmark item. 
135          *
136          * @since               2.1
137          *
138          * @privlevel   platform
139          * @privilege   http://tizen.org/privilege/bookmark.read
140          *
141          * @return              The parent folder id of the current bookmark item @n
142          *                              If the current bookmark item is the one in topmost level, this method will return ::ROOT_FOLDER_ID.
143          */
144         RecordId GetParentFolderId(void) const;
145
146         /**
147          * Checks whether the type of current bookmark item is folder or not.
148          *
149          * @since               2.1
150          *
151          * @privlevel   platform
152          * @privilege   http://tizen.org/privilege/bookmark.read
153          *
154          * @return              @c true if the type of current bookmark item is folder, @n
155          *                                      else @c false
156          */
157         bool IsFolder(void) const;
158
159         /**
160          * Gets the hash value of the current instance.
161          *
162          * @since               2.1
163          *
164          * @return              The hash value of the current instance
165          */
166         virtual int GetHashCode(void) const;
167
168         /**
169          * Compares two instances of the %BookmarkItem class.
170          *
171          * @since               2.1
172          *
173          * @return              @c true if the two instances match, or if and only if the two instances contain the same elements, @n
174          *                                      else @c false @n
175          * @param[in]   obj                             The object to compare with the current instance
176          * @see Tizen::Base::Object::Equals()
177          */
178         virtual bool Equals(const Object& obj) const;
179
180         /**
181          * Copying of objects using this copy assignment operator is allowed. 
182          *
183          * @since               2.1
184          *
185          * @param[in]   setting                 The instance of the %BookmarkItem class to assign from
186          */
187         BookmarkItem& operator =(const BookmarkItem& rhs);
188
189 private:
190         //
191         // This default constructor is intentionally declared as private to implement the Singleton semantic
192         //
193         // @remarks     This constructor is hidden.
194         //
195         BookmarkItem(void);
196
197 private:
198         _BookmarkItemImpl* __pBookmarkItemImpl;
199
200         friend class _BookmarkItemImpl;
201
202         friend class _WebBookmarkImpl;
203 };
204
205 }}
206 #endif // _FWEB_BOOKMARK_ITEM_H_