browsercore/appfw/Api/Views/mostvisitedpagestore.h
changeset 16 3c88a81ff781
parent 12 afcd8e6d025b
--- a/browsercore/appfw/Api/Views/mostvisitedpagestore.h	Thu Sep 23 15:32:11 2010 -0400
+++ b/browsercore/appfw/Api/Views/mostvisitedpagestore.h	Fri Oct 15 17:30:59 2010 -0400
@@ -18,13 +18,22 @@
 * Description:
 *
 */
-#include "BWFGlobal.h"
+#ifndef MOSTVISITEDPAGESTORE_H
+#define MOSTVISITEDPAGESTORE_H
+
+
+#include "BWFGlobal.h" 
+#include <QObject>
+#include "singleton.h"
+#include "wrtbrowsercontainer.h"
 
 class QDataStream;
 
+
 //Most visited page item
 class BWF_EXPORT MostVisitedPage : public QObject
 {
+	  Q_OBJECT
     Q_PROPERTY(QString pageUrl READ pageUrl)
 public:
 
@@ -58,6 +67,7 @@
 //Store for managing MV pages
 class BWF_EXPORT MostVisitedPageStore : public QObject
 {
+	  Q_OBJECT
 public:
     //Construction and destruction
     MostVisitedPageStore();
@@ -74,12 +84,16 @@
     MostVisitedPage *pageAt(int index);
     
     void initializeDefaultPageThumbnails();
-    void clearMostVisitedPageStore();
+private slots:
+  	void update(WRT::WrtBrowserContainer *page);  	
+    void clear();
+    void onLoadFinished(const bool ok);
 protected:
     bool compareUrls(QString& url1, QString &url2);
     void readStore();
     void writeStore();
 
+
 private:
     MostVisitedPageList m_pageList;
     QString m_mvpFile;
@@ -88,3 +102,5 @@
 		friend class MostVistedPageTest;
 #endif
 };
+typedef Singleton<MostVisitedPageStore> MostVisitedPageStoreSingleton;
+#endif
\ No newline at end of file