sqlite_web_vfs 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ /*
2
+ ** SQLite loadable extension providing web VFS
3
+ */
4
+ #include <sqlite3ext.h>
5
+ extern "C" {
6
+ SQLITE_EXTENSION_INIT1
7
+ }
8
+ #include "web_vfs.h"
9
+
10
+ /*************************************************************************************************/
11
+
12
+ /*
13
+ ** This routine is called when the extension is loaded.
14
+ ** Register the new VFS.
15
+ */
16
+ extern "C" int sqlite3_webvfs_init(sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi) {
17
+ SQLITE_EXTENSION_INIT2(pApi);
18
+ int rc = SQLITE_OK;
19
+ rc = (new WebVFS::VFS())->Register("web");
20
+ return rc != SQLITE_OK ? rc : SQLITE_OK_LOAD_PERMANENTLY;
21
+ }