2 * Copyright (c) 2000-2015 Samsung Electronics Co., Ltd.
4 * Licensed under the Flora License, Version 1.1 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file DTapps2SqliteDB.h
19 * @brief This file includes declarations and classes relating to DataBase.
22 #ifndef __DTAPPS_SQLITE_DB_H__
23 #define __DTAPPS_SQLITE_DB_H__
29 #include "TADC_Core.h"
30 #include "drm_intf_tapps.h"
32 #define DTAPPS_SQL_FREE_TABLE sqlite3_free_table
34 typedef struct _tagTAPPSSqliteSelectTable{
39 }TAPPSSqliteSelectTable;
41 /* Declarations for DB Wrappers */
42 BOOL DTappsDBOpen(void *&pDb,const char* CallingFun);
43 BOOL DTappsDBGet(void *& pDBConnection);
44 BOOL DTappsDBClose(const char* CallingFun);
45 BOOL DTappsDBBeginImmedTrans (const char* CallingFun);
46 BOOL DTappsDBCommit(const char* CallingFun);
47 BOOL DTappsDBRollback (const char* CallingFun);
48 BOOL DTappsExecuteSQL(void* pDB, const char* query);
49 BOOL DTappsSQLGetTable(void* pDB, const char* query, TAPPSSqliteSelectTable* select_table);
50 char* DTappsGetSQLCreateTable(const char* tableName);
51 void* DTappsStmtPrepare(void* pDB, const char* query);
52 int DTappsStmtBindParam (
57 unsigned int dParamSize );
58 int DTappsStmtExecute (void* pStmt);
59 int DTappsStmtRelease (void* pStmt);
60 BOOL DTapps_DB_Install(const char* sql_query);
61 BOOL DTapps_Read_DB(const char* sql_query, TAPPSSqliteSelectTable* select_table);
67 #endif /*__DTAPPS_SQLITE_DB_H__ */