Fixed Nabi Issues and Language related changes
[apps/osp/Internet.git] / inc / IntHistoryData.h
1 //
2
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 /**
20  * Internet
21  * @file        IntHistory.h
22  * @brief This is a model class which contains all the properties of History class
23  * and the methods to get and set the values for those properties
24  *
25  * This header file contains the declarations of the History class.
26  */
27 #ifndef _INT_HISTORY_DATA_H_
28 #define _INT_HISTORY_DATA_H_
29
30 #include <FApp.h>
31 #include <FBase.h>
32 #include <FContent.h>
33 #include <FGraphics.h>
34 #include <FIo.h>
35 #include <FLocales.h>
36 #include <FMedia.h>
37 #include <FSystem.h>
38 #include <FUi.h>
39
40
41 class History
42         : public Tizen::Base::Object
43 {
44 public:
45         /**
46          * Default constructor
47          */
48         History(void);
49
50         /**
51          * Initialises the instance the class History with the specified parameter
52          */
53         History(const History& hs);
54
55         /**
56          * Default destructor
57          */
58         ~History(void);
59
60         /**
61          * "=" operator overloading
62          */
63         History& operator =(const History& pHistory);
64
65         /**
66          * This function is used to get the bookmark id
67          *
68          * @return      bookmarkID
69          * @param               No parameter
70          */
71         Tizen::Base::String GetBookmarkId(void) const;
72
73         /**
74          * This function gets the FaviconId
75          *
76          * @return      A String
77          * @param               No parameter
78          */
79         Tizen::Base::String GetFaviconId(void) const;
80
81         /**
82          * This function gets the HistoryId
83          *
84          * @return      A String
85          * @param               No parameter
86          */
87         Tizen::Base::String GetHistoryId(void) const;
88
89         /**
90          * This function gets the path of the favicon of URL
91          *
92          * @return      A String
93          * @param               No parameter
94          */
95         Tizen::Base::String GetHistoryIconPath(void) const;
96
97         /**
98          * This function gets the HistoryTitle
99          *
100          * @return      A String
101          * @param               No parameter
102          */
103         Tizen::Base::String GetHistoryTitle(void) const;
104         /**
105          * This function gets the URL
106          *
107          * @return      A String
108          * @param               No parameter
109          */
110         Tizen::Base::String GetHistoryUrl(void) const;
111
112         /*
113          * This function is used to get thumbnail
114          *
115          * @return      thumbnail
116          * @param               No parameter
117          */
118         Tizen::Graphics::Bitmap* GetThumbnail(void) const;
119
120         Tizen::Base::String GetThumbnailPath(void) const;
121
122         /**
123          * This function is used to get visited count
124          *
125          * @return      visited count
126          * @param               No parameter
127          */
128         int GetVisitedCount(void) const;
129
130         /**
131          * This function gets the visited time for the History
132          *
133          * @return      DateTime
134          * @param               No parameter
135          */
136         Tizen::Base::DateTime GetVisitedTime(void) const;
137
138         /**
139          * This function sets history to bookmark or removes the history from bookmarks
140          *
141          * @return      No return type
142          * @param               isBookmark                                      true to add to bookmark, false to remove from bookmark
143          */
144         void SetBookmarkId(const Tizen::Base::String& bookmarkId);
145
146         /**
147          * This function sets the faviconid
148          *
149          * @return      No return type
150          * @param               strFaviconId                            The ID for the favicon object
151          */
152         void SetFaviconId(const Tizen::Base::String& strFaviconId);
153
154         /**
155          * This function sets the HistoryId for the History object
156          *
157          * @return      No return type
158          * @param               strHistoryId                            The ID for the History object
159          */
160         void SetHistoryId(const Tizen::Base::String& strHistoryId);
161
162         /**
163          * This function sets the HistoryTitle for the History object
164          *
165          * @return      No return type
166          * @param               strTitle                                        The Title for the History object
167          */
168         void SetHistoryTitle(Tizen::Base::String& strHistoryTitle);
169
170         /**
171          * This function sets the URL for the History object
172          *
173          * @return      No return type
174          * @param               strTitle                                        The URL for the History object
175          */
176         void SetHistoryUrl(const Tizen::Base::String& strHistoryUrl);
177
178         /**
179          * This function sets the path for the favicon of the History object
180          *
181          * @return      No return type
182          * @param               strFilePath                                     The path for the favicon icon of History
183          */
184         void SetIconPath(const Tizen::Base::String& strFilePath);
185
186         /**
187          * This function sets thumbnail of a URL
188          *
189          * @return      No return type
190          * @param               thumbnail                               to set thumbnail of URL
191          */
192         void SetThumbnail(Tizen::Graphics::Bitmap* thumbnail);
193
194         /**
195          * This function sets thumbnail path of a URL
196          *
197          * @return      No return type
198          * @param               thumbnailPath                           to set thumbnail path of URL
199          */
200         void SetThumbnailPath(Tizen::Base::String& thumbnailPath);
201
202         /**
203          * This function sets the createdTime for the History object
204          *
205          * @return      No return type
206          * @param               strCreatedTime                          The createdTime for the bookmark
207          */
208         void SetVisitedTime(const Tizen::Base::DateTime& strVisitedTime);
209
210         /**
211          * This function sets visited count of a URL
212          *
213          * @return      No return type
214          * @param               visitedCount                            to set visited count of URL
215          */
216         void SetVisitedCount(int& visitedCount);
217
218         void SetFavIconBitmap(Tizen::Graphics::Bitmap& favIconImage);
219
220         void SetFavIconBuffer(Tizen::Base::ByteBuffer& favIconBuffer);
221
222         Tizen::Base::ByteBuffer* GetFavIconBuffer();
223
224         Tizen::Graphics::Bitmap* GetFavIconBitmap();
225
226         int GetFavIconWidth();
227
228         int GetFavIconHeight();
229
230         void SetFavIconWidth(int favIconWidth);
231
232         void SetFavIconHeight(int favIconHeight);
233
234 private:
235         Tizen::Base::String __bookmarkId;
236         Tizen::Base::String     __faviconId;
237         Tizen::Base::String __historyId;
238         Tizen::Base::String __historyTitle;
239         Tizen::Base::String __historyUrl;
240         Tizen::Base::String __iconPath;
241         Tizen::Base::String __thumbnailPath;
242         Tizen::Graphics::Bitmap* __pThumbnail;
243         int __visitedCount;
244         Tizen::Base::DateTime __visitedTime;
245         Tizen::Base::ByteBuffer* __pFavIconData;
246         int __favIconWidth;
247         int __favIconHeight;
248 };
249
250 #endif //_INT_HISTORY_DATA_H_