-//
-
-// Copyright (c) 2012 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-
-//!Internet
-/*@file: IntHistoryPresentationModel.h
- *@brief: This is the header file for HistoryPresentationModel class
- */
-
-
-#ifndef _INT_HISTORY_PRESENTATION_MODEL_H
-#define _INT_HISTORY_PRESENTATION_MODEL_H
-
-#include <FAppApp.h>
-#include <FBase.h>
-#include <FIo.h>
-
-
-#include "IntHistoryData.h"
-#include "IntPresentationModelBase.h"
-#include "IntTypes.h"
-
-enum {
- HISTORY_ID = 0,
- HISTORY_TITLE,
- HISTORY_URL,
- HISTORY_VISITED_TIME,
- HISTORY_ICON_PATH,
- HISTORY_FAVICONID,
- HISTORY_THUMBNAIL,
- HISTORY_BOOKMARK_ID,
- HISTORY_VISITED_COUNT
-};
-
-/**
- * @class HistoryPresentationModel
- * @brief This class declares functions which will manage Browser History
- */
-class HistoryPresentationModel
- :public PresentationModelBase
-{
-public:
- /**
- * @brief The method used to get the already created instance of the HistoryPresentationModel
- */
- static HistoryPresentationModel* GetInstance(void);
-
- /**
- * This function deletes all the histories.
- *
- * @return An error code
- * @param No parameter
- */
- result ClearHistory(void);
-
- /**
- * This function creates the list of History
- *
- * @return An error code
- * @param nHistoryCount The no of History present
- * @param historyList An ArrayList where the History will be stored
- * @param maxCount is used for maximum most visited site else its value is default to -1
- * @exception E_SUCCESS The method is successful
- * @exception E_FAILURE The method is not successful as the list is not being created
- * @remarks To work properly , the history count and and existing list should be passed
- */
- result CreateHistoryList(int nHistoryCount, Tizen::Base::Collection::ArrayList& historyList, int maxCount = -1);
-
- /**
- * This function deletes particular history of history ID from the history table
- *
- * @return An error code
- * @param historyId The historyId
- * @exception E_SUCCESS The history is successfully deleted
- * @exception E_FAILURE The history deletion is unsuccessful
- */
- result DeleteHistory(int historyId);
-
- /**
- * This function deletes particular history of history URL.
- *
- * @return An error code
- * @param No parameter
- */
- result DeleteHistory(Tizen::Base::String& historyUrl);
-
- /**
- * This function deletes Multiple histories from the history table
- *
- * @return An error code
- * @param pHistoryIdList The Arraylist of ids of history to be deleted
- * @exception E_SUCCESS The history is successfully deleted
- * @exception E_FAILURE The history deletion is unsuccessful
- */
- result DeleteMultipleHistory(Tizen::Base::Collection::ArrayList* pHistoryIdList);
-
- /**
- * This function adds the history to the history table
- *
- * @return An error code
- * @param history The history
- * @exception E_SUCCESS The history is inserted successfully to the table
- * @exception E_FAILURE The history is not inserted successfully
- */
- result SaveHistory(History& history);
-
- /**
- * This function selects the history from the table
- *
- * @return An error code
- * @param startIndex the OFFSET value
- * @param limit The LIMIT till which the select statement will be executed
- * @param historyList The arraylist where the selected history will be saved
- */
- result GetHistory( int startIndex, int limit, Tizen::Base::Collection::ArrayList& historyList);
-
- /**
- * This function returns the no of history
- *
- * @return An error code
- * @param count The no of History present will be saved in count.
- */
- result GetHistoryCount(int& count);
-
- /**
- * This function returns the history count from the table on the basis of the time range
- *
- * @return An error code
- * @param startTime the startTime
- * @param endTime the end time
- */
- result GetHistoryCountWithTimeRange(Tizen::Base::DateTime& startTime, Tizen::Base::DateTime& endTime, int& count);
-
- /**
- * This function selects the history from the table within given time range
- *
- * @return An error code
- * @param startTime start value of time
- * @param endTime end value of time
- * @param startIndex the OFFSET value
- * @param limit The LIMIT till which the select statement will be executed
- * @param historyList The arraylist where the selected history will be saved
- */
- result GetHistoryWithTimeRange(Tizen::Base::DateTime& startTime, Tizen::Base::DateTime& endTime,int startIndex,int limit, Tizen::Base::Collection::ArrayList& pHistoryList);
-
- /**
- * This function used to get most visited site in a arraylist
- *
- * @return An error code
- * @param historyList The arraylist where the most visited sites will be saved.
- */
- result GetMostVisitedSites(Tizen::Base::Collection::ArrayList& historyList);
-
- /**
- * This function returns the no of searched text history
- *
- * @return An error code
- * @param count The no of History present will be saved in count.
- * @param text text entered for search
- */
- result GetSearchHistoryCount(int& count, Tizen::Base::String& text);
-
- /**
- * This function selects the searched history from the table
- *
- * @return An error code
- * @param startIndex the OFFSET value
- * @param limit The LIMIT till which the select statement will be executed
- * @param text text entered for search
- * @param historyList The arraylist where the selected history will be saved
- */
- result GetSearchHistory(int startIndex,int limit, Tizen::Base::Collection::ArrayList& historyList, Tizen::Base::String& text);
-
- /**
- * This function used to given URL count
- *
- * @return An error code
- * @param url URL to get its count
- * @param count count of a URL
- */
- result GetUrlCount(const Tizen::Base::String& url, int& count);
-
-private:
-
- /**
- * @brief The Default Constructor
- */
- HistoryPresentationModel(void);
-
- /**
- * @brief The Default Destructor
- */
- ~HistoryPresentationModel(void);
-
- /**
- * copy constructor
- */
- HistoryPresentationModel(const HistoryPresentationModel& settingModelObj);
-
- /**
- * assignment operator
- */
-
- HistoryPresentationModel& operator=(const HistoryPresentationModel& settingModelObj);
-
- /**
- *@brief Initialize storage service
- */
- result Construct(void);
-
- /**
- * @brief The method used to create the instance of the SettingsManager class
- */
- static void CreateInstance(void);
-
- /**
- * @brief The method used to remove the already created instance of the SettingsManager
- */
- static void DestroyInstance(void);
-
- /**
- * This function is used to generate file name
- *
- * @return filename name of a file
- * @param No parameter
- */
- Tizen::Base::String GenerateFileName(void);
-
- Tizen::Base::String GetStringFromDate(Tizen::Base::DateTime& date);
-
- static HistoryPresentationModel* __pHistoryPresentationModel;
-};
-
-#endif //_INT_HISTORY_PRESENTATION_MODEL_H
+//\r
+\r
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
+//\r
+// Licensed under the Flora License, Version 1.0 (the License);\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
+//\r
+// http://floralicense.org/license/\r
+//\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an AS IS BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
+//\r
+\r
+\r
+//!Internet\r
+/*@file: IntHistoryPresentationModel.h\r
+ *@brief: This is the header file for HistoryPresentationModel class\r
+ */\r
+\r
+\r
+#ifndef _INT_HISTORY_PRESENTATION_MODEL_H\r
+#define _INT_HISTORY_PRESENTATION_MODEL_H\r
+\r
+#include <FAppApp.h>\r
+#include <FBase.h>\r
+#include <FIo.h>\r
+\r
+\r
+#include "IntHistoryData.h"\r
+#include "IntPresentationModelBase.h"\r
+#include "IntTypes.h"\r
+\r
+enum {\r
+ HISTORY_ID = 0,\r
+ HISTORY_URL,\r
+ HISTORY_TITLE,\r
+ HISTORY_COUNTER,\r
+ HISTORY_VISITED_TIME,\r
+ HISTORY_FAVICON,\r
+ HISTORY_FAVICON_LENGTH,\r
+ HISTORY_FAVICON_W,\r
+ HISTORY_FAVICON_H,\r
+ HISTORY_SNAPSHOT,\r
+ HISTORY_SNAPSHOT_STRIDE,\r
+ HISTORY_SNAPSHOT_W,\r
+ HISTORY_SNAPSHOT_H,\r
+// HISTORY_BOOKMARK_ID,\r
+ HISTORY_VISITED_COUNT\r
+ /*HISTORY_ICON_PATH,\r
+ HISTORY_FAVICONID,\r
+ HISTORY_THUMBNAIL,\r
+ HISTORY_BOOKMARK_ID,\r
+ HISTORY_VISITED_COUNT*/\r
+};\r
+//ID INTEGER PRIMARY KEY AUTOINCREMENT, ADDRESS TEXT, TITLE TEXT, COUNTER INTEGER, VISITDATE DATETIME, FAVICON BLOB,\r
+//FAVICON_LENGTH INTEGER, FAVICON_W INTEGER, FAVICON_H INTEGER, SNAPSHOT BLOB, SNAPSHOT_STRIDE INTEGER, SNAPSHOT_W INTEGER, SNAPSHOT_H INTEGER\r
+/**\r
+ * @class HistoryPresentationModel\r
+ * @brief This class declares functions which will manage Browser History\r
+ */\r
+class HistoryPresentationModel\r
+ :public PresentationModelBase\r
+{\r
+public:\r
+ /**\r
+ * @brief The method used to get the already created instance of the HistoryPresentationModel\r
+ */\r
+ static HistoryPresentationModel* GetInstance(void);\r
+\r
+ /**\r
+ * This function deletes all the histories.\r
+ *\r
+ * @return An error code\r
+ * @param No parameter\r
+ */\r
+ result ClearHistory(void);\r
+\r
+ /**\r
+ * This function creates the list of History\r
+ *\r
+ * @return An error code\r
+ * @param nHistoryCount The no of History present\r
+ * @param historyList An ArrayList where the History will be stored\r
+ * @param maxCount is used for maximum most visited site else its value is default to -1\r
+ * @exception E_SUCCESS The method is successful\r
+ * @exception E_FAILURE The method is not successful as the list is not being created\r
+ * @remarks To work properly , the history count and and existing list should be passed\r
+ */\r
+ result CreateHistoryList(int nHistoryCount, Tizen::Base::Collection::ArrayList& historyList, int maxCount = -1);\r
+\r
+ /**\r
+ * This function deletes particular history of history ID from the history table\r
+ *\r
+ * @return An error code\r
+ * @param historyId The historyId\r
+ * @exception E_SUCCESS The history is successfully deleted\r
+ * @exception E_FAILURE The history deletion is unsuccessful\r
+ */\r
+ result DeleteHistory(int historyId);\r
+\r
+ /**\r
+ * This function deletes particular history of history URL.\r
+ *\r
+ * @return An error code\r
+ * @param No parameter\r
+ */\r
+ result DeleteHistory(Tizen::Base::String& historyUrl);\r
+\r
+ /**\r
+ * This function deletes Multiple histories from the history table\r
+ *\r
+ * @return An error code\r
+ * @param pHistoryIdList The Arraylist of ids of history to be deleted\r
+ * @exception E_SUCCESS The history is successfully deleted\r
+ * @exception E_FAILURE The history deletion is unsuccessful\r
+ */\r
+ result DeleteMultipleHistory(Tizen::Base::Collection::ArrayList* pHistoryIdList);\r
+\r
+ /**\r
+ * This function adds the history to the history table\r
+ *\r
+ * @return An error code\r
+ * @param history The history\r
+ * @exception E_SUCCESS The history is inserted successfully to the table\r
+ * @exception E_FAILURE The history is not inserted successfully\r
+ */\r
+ result SaveHistory(History& history);\r
+\r
+ /**\r
+ * This function selects the history from the table\r
+ *\r
+ * @return An error code\r
+ * @param startIndex the OFFSET value\r
+ * @param limit The LIMIT till which the select statement will be executed\r
+ * @param historyList The arraylist where the selected history will be saved\r
+ */\r
+ result GetHistory( int startIndex, int limit, Tizen::Base::Collection::ArrayList& historyList);\r
+\r
+ /**\r
+ * This function returns the no of history\r
+ *\r
+ * @return An error code\r
+ * @param count The no of History present will be saved in count.\r
+ */\r
+ result GetHistoryCount(int& count);\r
+\r
+ /**\r
+ * This function returns the history count from the table on the basis of the time range\r
+ *\r
+ * @return An error code\r
+ * @param startTime the startTime\r
+ * @param endTime the end time\r
+ */\r
+ result GetHistoryCountWithTimeRange(Tizen::Base::DateTime& startTime, Tizen::Base::DateTime& endTime, int& count);\r
+\r
+ /**\r
+ * This function selects the history from the table within given time range\r
+ *\r
+ * @return An error code\r
+ * @param startTime start value of time\r
+ * @param endTime end value of time\r
+ * @param startIndex the OFFSET value\r
+ * @param limit The LIMIT till which the select statement will be executed\r
+ * @param historyList The arraylist where the selected history will be saved\r
+ */\r
+ result GetHistoryWithTimeRange(Tizen::Base::DateTime& startTime, Tizen::Base::DateTime& endTime,int startIndex,int limit, Tizen::Base::Collection::ArrayList& pHistoryList);\r
+\r
+ /**\r
+ * This function used to get most visited site in a arraylist\r
+ *\r
+ * @return An error code\r
+ * @param historyList The arraylist where the most visited sites will be saved.\r
+ */\r
+ result GetMostVisitedSites(Tizen::Base::Collection::ArrayList& historyList);\r
+\r
+ /**\r
+ * This function returns the no of searched text history\r
+ *\r
+ * @return An error code\r
+ * @param count The no of History present will be saved in count.\r
+ * @param text text entered for search\r
+ */\r
+ result GetSearchHistoryCount(int& count, Tizen::Base::String& text);\r
+\r
+ /**\r
+ * This function selects the searched history from the table\r
+ *\r
+ * @return An error code\r
+ * @param startIndex the OFFSET value\r
+ * @param limit The LIMIT till which the select statement will be executed\r
+ * @param text text entered for search\r
+ * @param historyList The arraylist where the selected history will be saved\r
+ */\r
+ result GetSearchHistory(int startIndex,int limit, Tizen::Base::Collection::ArrayList& historyList, Tizen::Base::String& text);\r
+\r
+ /**\r
+ * This function used to given URL count\r
+ *\r
+ * @return An error code\r
+ * @param url URL to get its count\r
+ * @param count count of a URL\r
+ */\r
+ result GetUrlCount(const Tizen::Base::String& url, int& count);\r
+\r
+private:\r
+\r
+ /**\r
+ * @brief The Default Constructor\r
+ */\r
+ HistoryPresentationModel(void);\r
+\r
+ /**\r
+ * @brief The Default Destructor\r
+ */\r
+ ~HistoryPresentationModel(void);\r
+\r
+ /**\r
+ * copy constructor\r
+ */\r
+ HistoryPresentationModel(const HistoryPresentationModel& settingModelObj);\r
+\r
+ /**\r
+ * assignment operator\r
+ */\r
+\r
+ HistoryPresentationModel& operator=(const HistoryPresentationModel& settingModelObj);\r
+\r
+ /**\r
+ *@brief Initialize storage service\r
+ */\r
+ result Construct(void);\r
+\r
+ /**\r
+ * @brief The method used to create the instance of the SettingsManager class\r
+ */\r
+ static void CreateInstance(void);\r
+\r
+ /**\r
+ * @brief The method used to remove the already created instance of the SettingsManager\r
+ */\r
+ static void DestroyInstance(void);\r
+\r
+ /**\r
+ * This function is used to generate file name\r
+ *\r
+ * @return filename name of a file\r
+ * @param No parameter\r
+ */\r
+ Tizen::Base::String GenerateFileName(void);\r
+\r
+ Tizen::Base::String GetStringFromDate(Tizen::Base::DateTime& date);\r
+\r
+ static HistoryPresentationModel* __pHistoryPresentationModel;\r
+};\r
+\r
+#endif //_INT_HISTORY_PRESENTATION_MODEL_H\r