DVBCore  22.3.0
Open Source DVB Engine
sqlite.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2013 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
26 #ifndef DBA_SQLITE_H
27 #define DBA_SQLITE_H
28 
29 #include "techtype.h"
30 
35 BOOLEAN SQLite_Initialise(void);
36 
40 void SQLite_Uninitialise(void);
41 
49 BOOLEAN SQLite_Open(const char *filename);
50 
54 void SQLite_Close(void);
55 
60 BOOLEAN SQLite_Reset(void);
61 
66 BOOLEAN SQLite_SaveDatabaseRecords(void);
67 
73 U32BIT SQLite_GetBlobSize(U32BIT id);
74 
82 U32BIT SQLite_ReadBlob(U32BIT id, void *data, U32BIT data_size);
83 
91 BOOLEAN SQLite_WriteBlob(U32BIT id, const void *data, U32BIT data_size);
92 
98 BOOLEAN SQLite_CreateBackup(const char *filename);
99 
106 BOOLEAN SQLite_RestoreBackup(const char *filename, BOOLEAN check_exists_only);
107 
112 void SQLite_RemoveBackup(const char *filename);
113 
114 #endif
115 
BOOLEAN SQLite_Reset(void)
Reset database and clear in-memory database. Database closed on failure.
Definition: sqlite.c:291
BOOLEAN SQLite_Open(const char *filename)
Open database 'filename'. The database is created and initialised if it does not exist. The database is upgraded if it is older than the current version. The in-memory database is cleared and database records are loaded into it.
Definition: sqlite.c:164
BOOLEAN SQLite_WriteBlob(U32BIT id, const void *data, U32BIT data_size)
Write 'data' into blob 'id'.
Definition: sqlite.c:550
void SQLite_RemoveBackup(const char *filename)
Remove backup 'filename'.
Definition: sqlite.c:806
BOOLEAN SQLite_Initialise(void)
Initialise SQLite interface.
Definition: sqlite.c:97
void SQLite_Uninitialise(void)
Uninitialise SQLite interface.
Definition: sqlite.c:131
U32BIT SQLite_ReadBlob(U32BIT id, void *data, U32BIT data_size)
Read blob 'id' into 'data'.
Definition: sqlite.c:489
System Wide Global Technical Data Type Definitions.
BOOLEAN SQLite_SaveDatabaseRecords(void)
Save in-memory database changes into the database.
Definition: sqlite.c:359
U32BIT SQLite_GetBlobSize(U32BIT id)
Get size of blob 'id'.
Definition: sqlite.c:437
BOOLEAN SQLite_RestoreBackup(const char *filename, BOOLEAN check_exists_only)
Restore backup 'filename'.
Definition: sqlite.c:707
BOOLEAN SQLite_CreateBackup(const char *filename)
Create backup 'filename'.
Definition: sqlite.c:631
void SQLite_Close(void)
Close database.
Definition: sqlite.c:257