Fixed Nabi Issues
[apps/osp/Internet.git] / inc / IntPresentationModelBase.h
index 5b4f12e..4562ab1 100644 (file)
@@ -2,7 +2,7 @@
 
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
@@ -29,6 +29,8 @@
 #include <FIo.h>
 
 #include "IntTypes.h"
+#include "IntBookmarkData.h"
+#include "IntHistoryData.h"
 
 /**
  * @class      PresentationModelBase
@@ -50,12 +52,12 @@ public:
        /**
         * Initialize storage service
         */
-       static result Initialize(void);
+        result Initialize();
 
        /**
         * Deinitialize storage service
         */
-       static result UnInitialize(void);
+        result UnInitialize(void);
 
 public:
 
@@ -67,9 +69,9 @@ public:
         * @exception   E_SUCCESS               The database closed successfully
         * @exception   E_FAILURE               The database is not closed successfully
         */
-       static result CloseDb(void);
+        result CloseDb(void);
 
-       static result CommitDb(void);
+        result CommitDb(void);
 
        /**
         * This function creates the table in database
@@ -79,7 +81,7 @@ public:
         * @exception   E_SUCCESS               The table is created successfully in database
         * @exception   E_FAILURE               The table creation in database is not successful
         */
-       static result CreateDBTables(BrowserDbTableTypes tableType);
+        result CreateDBTables(BrowserDbTableTypes tableType);
 
        /**
         * This function drops the existing tables from database
@@ -89,9 +91,9 @@ public:
         * @exception   E_SUCCESS               The table is dropped successfully from database
         * @exception   E_FAILURE               The table drop is unsuccessful
         */
-       static result DropDBTables(void);
+        result DropDBTables(void);
 
-       static result DbIsNextRowPresent(bool& nextRowpresent);
+        result DbIsNextRowPresent(bool& nextRowpresent);
 
        /**
         * This function drops the existing tables from database
@@ -101,15 +103,31 @@ public:
         * @exception   E_SUCCESS               The table is dropped successfully from database
         * @exception   E_FAILURE               The table drop is unsuccessful
         */
-       static result ExecuteQuery(const Tizen::Base::String& pszFormatQuery, int& nRowCount);
+        result ExecuteQuery(const Tizen::Base::String& pszFormatQuery, int& nRowCount);
 
-       static result GetColumn(int nIndex, Tizen::Base::String& strVal);
+        /**
+         * This function drops the existing tables from database
+         *
+         * @return      An error code
+         * @param              No parameter
+         * @exception  E_SUCCESS               The table is dropped successfully from database
+         * @exception  E_FAILURE               The table drop is unsuccessful
+         */
+        result ExecuteBookmarkQuery(const Tizen::Base::String& pszFormatQuery, int& nRowCount, BookmarkData& bookmark);
 
-       static result GetColumn(int nIndex, int& nIntVal);
+        result ExecuteHistoryQuery(const Tizen::Base::String& pszFormatQuery, int& nRowCount, History& history);
 
-       static result GetColumn(int nIndex, double& dblVal);
+        result ExecuteUpdateHistoryFavIconQuery(const Tizen::Base::String& formatQuery, int& nRowCount, History& history);
 
-       static result GetColumn(int nIndex, Tizen::Base::DateTime& dtVal);
+        result GetColumn(int nIndex, Tizen::Base::String& strVal);
+
+        result GetColumn(int nIndex, int& nIntVal);
+
+        result GetColumn(int nIndex, double& dblVal);
+
+        result GetColumn(int nIndex, Tizen::Base::DateTime& dtVal);
+
+        result GetColumn(int nIndex,Tizen::Base::ByteBuffer& favIconBuffer);
 
        static bool GetCurrentDateTime(Tizen::Base::DateTime& dt);
 
@@ -123,7 +141,7 @@ public:
         * @exception   E_FAILURE               The method is not successful
         * @remarks             To work properly , the table name should be passed properly
         */
-       static result GetLastInsertedId(Tizen::Base::String& tableName, int& rowId);
+        result GetLastInsertedId(Tizen::Base::String& tableName, int& rowId);
 
        /**
         * This function calls the CreateDBTables function for all the tables
@@ -131,9 +149,9 @@ public:
         * @return      An error code
         * @param               No parameter
         */
-       static result InitializeDBTables(void);
+        result InitializeDBTables(void);
 
-       static result IsNullColumn(int nIndex, bool& isColumNull);
+        result IsNullColumn(int nIndex, bool& isColumNull);
 
        /**
         * This function creates the database and constructs it.
@@ -143,21 +161,22 @@ public:
         * @exception   E_SUCCESS               The database created successfully
         * @exception   E_FAILURE               The database creation is failed
         */
-       static result OpenDb(void);
+        result OpenDb(void);
 
-       static result RollbackDb(void);
+        result RollbackDb(void);
 
 public:
-    static Tizen::Base::String DB_FILE_PATH;
+     Tizen::Base::String DB_FILE_PATH;
+
        static const int MAX_DB_QUERY_SIZE;
-       static const int QUERY_TYPE_LENGTH;
+        static const int QUERY_TYPE_LENGTH;
 
 private:
-    static bool __isBeginTransaction;
+     bool __isBeginTransaction;
 
-       static Tizen::Io::Database* __pDataBase;
-       static Tizen::Io::DbEnumerator* __pDbEnum;
-       static Tizen::Io::DbStatement* __pDbStatement;
+        Tizen::Io::Database* __pDataBase;
+        Tizen::Io::DbEnumerator* __pDbEnum;
+        Tizen::Io::DbStatement* __pDbStatement;
 
 };