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.
17 * @file DTapps2SqliteDB.h
20 #ifndef __DTAPPS_SQLITE_DB_H__
21 #define __DTAPPS_SQLITE_DB_H__
23 #include "TADC_Core.h"
24 #include "drm_intf_tapps.h"
26 #define DTAPPS_SQL_FREE_TABLE sqlite3_free_table
28 typedef struct _tagTAPPSSqliteSelectTable {
33 } TAPPSSqliteSelectTable;
35 /* Declarations for DB Wrappers */
36 BOOL DTappsDBOpen(void *&pDb, const char *CallingFun);
37 BOOL DTappsDBGet(void *&pDBConnection);
38 BOOL DTappsDBClose(const char *CallingFun);
39 BOOL DTappsDBBeginImmedTrans(const char *CallingFun);
40 BOOL DTappsDBCommit(const char *CallingFun);
41 BOOL DTappsDBRollback(const char *CallingFun);
42 BOOL DTappsExecuteSQL(void *pDB, const char *query);
43 BOOL DTappsSQLGetTable(void *pDB, const char *query,
44 TAPPSSqliteSelectTable *select_table);
45 char *DTappsGetSQLCreateTable(const char *tableName);
46 void *DTappsStmtPrepare(void *pDB, const char *query);
47 int DTappsStmtBindParam(
52 unsigned int dParamSize);
53 int DTappsStmtExecute(void *pStmt);
54 int DTappsStmtRelease(void *pStmt);
55 BOOL DTapps_DB_Install(const char *sql_query);
56 BOOL DTapps_Read_DB(const char *sql_query,
57 TAPPSSqliteSelectTable *select_table);
59 #endif /*__DTAPPS_SQLITE_DB_H__ */