diff options
author | 2012-04-14 13:13:09 +0000 | |
---|---|---|
committer | 2012-04-14 13:13:09 +0000 | |
commit | dbe60eea59e076f767d5d7dce342b5ed0430e8f7 (patch) | |
tree | cbbe70f70e0ed6f1fc7f75b0778dd4703d71e71c /lib/libsqlite3/ext/rtree/sqlite3rtree.h | |
parent | Make kvm_getfile2() have a fighting change to work correctly on crash (diff) | |
download | wireguard-openbsd-dbe60eea59e076f767d5d7dce342b5ed0430e8f7.tar.xz wireguard-openbsd-dbe60eea59e076f767d5d7dce342b5ed0430e8f7.zip |
sqlite 3.7.11 library, vendor sources
Diffstat (limited to 'lib/libsqlite3/ext/rtree/sqlite3rtree.h')
-rw-r--r-- | lib/libsqlite3/ext/rtree/sqlite3rtree.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/lib/libsqlite3/ext/rtree/sqlite3rtree.h b/lib/libsqlite3/ext/rtree/sqlite3rtree.h new file mode 100644 index 00000000000..cffb300092e --- /dev/null +++ b/lib/libsqlite3/ext/rtree/sqlite3rtree.h @@ -0,0 +1,56 @@ +/* +** 2010 August 30 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +*/ + +#ifndef _SQLITE3RTREE_H_ +#define _SQLITE3RTREE_H_ + +#include <sqlite3.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct sqlite3_rtree_geometry sqlite3_rtree_geometry; + +/* +** Register a geometry callback named zGeom that can be used as part of an +** R-Tree geometry query as follows: +** +** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) +*/ +int sqlite3_rtree_geometry_callback( + sqlite3 *db, + const char *zGeom, + int (*xGeom)(sqlite3_rtree_geometry *, int nCoord, double *aCoord, int *pRes), + void *pContext +); + + +/* +** A pointer to a structure of the following type is passed as the first +** argument to callbacks registered using rtree_geometry_callback(). +*/ +struct sqlite3_rtree_geometry { + void *pContext; /* Copy of pContext passed to s_r_g_c() */ + int nParam; /* Size of array aParam[] */ + double *aParam; /* Parameters passed to SQL geom function */ + void *pUser; /* Callback implementation user data */ + void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */ +}; + + +#ifdef __cplusplus +} /* end of the 'extern "C"' block */ +#endif + +#endif /* ifndef _SQLITE3RTREE_H_ */ |