1 /* 2 * Copyright 2013 Luciad (http://www.luciad.com) 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #ifndef GPKG_H 17 #define GPKG_H 18 19 #include <sqlite3ext.h> 20 21 #ifdef GPKG_HAVE_CONFIG_H 22 #include "config.h" 23 #endif 24 25 /** 26 * \addtogroup gpkg Library initialization and metadata 27 * @{ 28 */ 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 #ifndef GPKG_EXPORT 35 #define GPKG_EXPORT 36 #endif 37 38 #ifndef GPKG_CALL 39 #define GPKG_CALL 40 #endif 41 42 /** 43 * Returns the version number of libgpkg as a string. 44 * @return a version number 45 */ 46 GPKG_EXPORT const char *GPKG_CALL gpkg_libversion(); 47 48 /** 49 * Entry point for the libgpkg SQLite extension that forces usage of the GeoPackage database schema. 50 */ 51 GPKG_EXPORT int GPKG_CALL sqlite3_gpkg_init(sqlite3 *db, const char **pzErrMsg, const sqlite3_api_routines *pThunk); 52 53 /** 54 * Entry point for the libgpkg SQLite extension that attempts to autodetect the schema to use. 55 */ 56 GPKG_EXPORT int GPKG_CALL sqlite3_gpkg_auto_init(sqlite3 *db, const char **pzErrMsg, const sqlite3_api_routines *pThunk); 57 58 /** 59 * Entry point for the libgpkg SQLite extension that forces usage of the Spatialite 2.x database schema. 60 */ 61 GPKG_EXPORT int GPKG_CALL sqlite3_gpkg_spl2_init(sqlite3 *db, const char **pzErrMsg, const sqlite3_api_routines *pThunk); 62 63 /** 64 * Entry point for the libgpkg SQLite extension that forces usage of the Spatialite 3.x database schema. 65 */ 66 GPKG_EXPORT int GPKG_CALL sqlite3_gpkg_spl3_init(sqlite3 *db, const char **pzErrMsg, const sqlite3_api_routines *pThunk); 67 68 /** 69 * Entry point for the libgpkg SQLite extension that forces usage of the Spatialite 4.x database schema. 70 */ 71 GPKG_EXPORT int GPKG_CALL sqlite3_gpkg_spl4_init(sqlite3 *db, const char **pzErrMsg, const sqlite3_api_routines *pThunk); 72 73 #ifdef __cplusplus 74 } 75 #endif 76 77 /** @} */ 78 79 #endif 80