From bc831fd57187ea5242dd414506da9515d99b22e8 Mon Sep 17 00:00:00 2001 From: marco Date: Sat, 6 Oct 2012 11:32:50 +0000 Subject: [PATCH] * commited bindings for sqlite backup functions. Patch by Ludo #22394 which is only partially fixed by this git-svn-id: trunk@22558 - --- packages/sqlite/src/sqlite3.inc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/sqlite/src/sqlite3.inc b/packages/sqlite/src/sqlite3.inc index d463c629db..1a0215cfeb 100644 --- a/packages/sqlite/src/sqlite3.inc +++ b/packages/sqlite/src/sqlite3.inc @@ -5715,6 +5715,19 @@ const SQLITE_TESTCTRL_PRNG_RESET = 7; SQLITE_TESTCTRL_BITVEC_TEST = 8; + +{Backup api} +type + psqlite3backup = Pointer; + +{$IFDEF S}function{$ELSE}var{$ENDIF} sqlite3_backup_init{$IFDEF D}: function{$ENDIF}(pDest: psqlite3; const zDestName: pchar; pSource: psqlite3; const zSourceName: pchar): psqlite3backup; cdecl;{$IFDEF S}external Sqlite3Lib;{$ENDIF} +{$IFDEF S}function{$ELSE}var{$ENDIF} sqlite3_backup_step{$IFDEF D}: function{$ENDIF}(p: psqlite3backup; nPage: Integer): Integer; cdecl;{$IFDEF S}external Sqlite3Lib;{$ENDIF} +{$IFDEF S}function{$ELSE}var{$ENDIF} sqlite3_backup_finish{$IFDEF D}: function{$ENDIF}(p: psqlite3backup): Integer; cdecl;{$IFDEF S}external Sqlite3Lib;{$ENDIF} +{$IFDEF S}function{$ELSE}var{$ENDIF} sqlite3_backup_remaining{$IFDEF D}: function{$ENDIF}(p: psqlite3backup): Integer; cdecl;{$IFDEF S}external Sqlite3Lib;{$ENDIF} +{$IFDEF S}function{$ELSE}var{$ENDIF} sqlite3_backup_pagecount{$IFDEF D}: function{$ENDIF}(p: psqlite3backup): Integer; cdecl;{$IFDEF S}external Sqlite3Lib;{$ENDIF} + + + {$IFDEF LOAD_DYNAMICALLY} function InitializeSqlite(const LibraryName: String = ''): Integer; @@ -5897,6 +5910,11 @@ begin pointer(sqlite3_mutex_free) := GetProcedureAddress(LibHandle,'sqlite3_mutex_free'); pointer(sqlite3_mutex_ente) := GetProcedureAddress(LibHandle,'sqlite3_mutex_ente'); pointer(sqlite3_mutex_leave) := GetProcedureAddress(LibHandle,'sqlite3_mutex_leave'); + pointer(sqlite3_backup_init) := GetProcedureAddress(LibHandle,'sqlite3_backup_init'); + pointer(sqlite3_backup_step) := GetProcedureAddress(LibHandle,'sqlite3_backup_step'); + pointer(sqlite3_backup_finish) := GetProcedureAddress(LibHandle,'sqlite3_backup_finish'); + pointer(sqlite3_backup_remaining) := GetProcedureAddress(LibHandle,'sqlite3_backup_remaining'); + pointer(sqlite3_backup_pagecount) := GetProcedureAddress(LibHandle,'sqlite3_backup_pagecount'); {$IFDEF SQLITE_OBSOLETE} pointer(sqlite3_aggregate_count) := GetProcedureAddress(LibHandle,'sqlite3_aggregate_count'); pointer(sqlite3_expired) := GetProcedureAddress(LibHandle,'sqlite3_expired');