// 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
//
#include <FIo.h>
#include "IntTypes.h"
+#include "IntBookmarkData.h"
+#include "IntHistoryData.h"
/**
* @class PresentationModelBase
/**
* Initialize storage service
*/
- static result Initialize(void);
+ result Initialize();
/**
* Deinitialize storage service
*/
- static result UnInitialize(void);
+ result UnInitialize(void);
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
* @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
* @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
* @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);
* @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
* @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.
* @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;
};