瀏覽代碼

* commited bindings for sqlite backup functions. Patch by Ludo #22394 which is only partially fixed by this

git-svn-id: trunk@22558 -
marco 13 年之前
父節點
當前提交
bc831fd571
共有 1 個文件被更改,包括 18 次插入0 次删除
  1. 18 0
      packages/sqlite/src/sqlite3.inc

+ 18 - 0
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');