mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
4db159d4fb
Signed-off-by: DL6ER <dl6er@dl6er.de>
35 lines
1.0 KiB
C
35 lines
1.0 KiB
C
/* Pi-hole: A black hole for Internet advertisements
|
|
* (c) 2019 Pi-hole, LLC (https://pi-hole.net)
|
|
* Network-wide ad blocking via your own hardware.
|
|
*
|
|
* FTL Engine
|
|
* Database prototypes
|
|
*
|
|
* This file is copyright under the latest version of the EUPL.
|
|
* Please see LICENSE file for your rights under this license. */
|
|
#ifndef DATABASE_COMMON_H
|
|
#define DATABASE_COMMON_H
|
|
|
|
#include "sqlite3.h"
|
|
|
|
bool check_database(int rc);
|
|
void db_init(void);
|
|
void *DB_thread(void *val);
|
|
int db_get_FTL_property(const unsigned int ID);
|
|
bool db_set_FTL_property(const unsigned int ID, const int value);
|
|
bool dbquery(const char *format, ...);
|
|
bool dbopen(void);
|
|
void dbclose(void);
|
|
int db_query_int(const char*);
|
|
void SQLite3LogCallback(void *pArg, int iErrCode, const char *zMsg);
|
|
long int last_ID_in_DB(void);
|
|
bool db_set_counter(const unsigned int ID, const int value);
|
|
bool db_update_counters(const int total, const int blocked);
|
|
|
|
extern sqlite3 *FTL_db;
|
|
extern bool database;
|
|
extern long int lastdbindex;
|
|
extern bool DBdeleteoldqueries;
|
|
|
|
#endif //DATABASE_COMMON_H
|