diff options
| author | Frank Warmerdam <warmerdam@pobox.com> | 2010-06-11 01:51:24 +0000 |
|---|---|---|
| committer | Frank Warmerdam <warmerdam@pobox.com> | 2010-06-11 01:51:24 +0000 |
| commit | ec678c07c2acb83da8a2187c541b8a2e452dec4b (patch) | |
| tree | a4c004a6e88d7330fe9d1c6ed793129831b5bdca /src/proj_api.h | |
| parent | a7290836114dc82b35eceb1efcb5ecdf605d335f (diff) | |
| download | PROJ-ec678c07c2acb83da8a2187c541b8a2e452dec4b.tar.gz PROJ-ec678c07c2acb83da8a2187c541b8a2e452dec4b.zip | |
preliminary implementation of projCtx API
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1854 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src/proj_api.h')
| -rw-r--r-- | src/proj_api.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/proj_api.h b/src/proj_api.h index d1f643b6..287d532f 100644 --- a/src/proj_api.h +++ b/src/proj_api.h @@ -55,8 +55,10 @@ extern int pj_errno; /* global error return code */ typedef void *projPJ; #define projXY projUV #define projLP projUV + typedef void *projCtx; #else typedef PJ *projPJ; + typedef projCtx_t *projCtx; # define projXY XY # define projLP LP #endif @@ -77,7 +79,7 @@ int pj_geodetic_to_geocentric( double a, double es, long point_count, int point_offset, double *x, double *y, double *z ); int pj_compare_datums( projPJ srcdefn, projPJ dstdefn ); -int pj_apply_gridshift( const char *, int, +int pj_apply_gridshift( projCtx, const char *, int, long point_count, int point_offset, double *x, double *y, double *z ); void pj_deallocate_grids(void); @@ -89,6 +91,8 @@ void pj_set_finder( const char *(*)(const char *) ); void pj_set_searchpath ( int count, const char **path ); projPJ pj_init(int, char **); projPJ pj_init_plus(const char *); +projPJ pj_init_ctx( projCtx, int, char ** ); +projPJ pj_init_plus_ctx( projCtx, const char * ); char *pj_get_def(projPJ, int); projPJ pj_latlong_from_proj( projPJ ); void *pj_malloc(size_t); @@ -100,6 +104,26 @@ void pj_acquire_lock(void); void pj_release_lock(void); void pj_cleanup_lock(void); +projCtx pj_get_default_ctx(void); +projCtx pj_get_ctx( projPJ ); +void pj_set_ctx( projPJ, projCtx ); +projCtx pj_ctx_alloc(void); +void pj_ctx_free( projCtx ); +int pj_ctx_get_errno( projCtx ); +void pj_ctx_set_errno( projCtx, int ); +void pj_ctx_set_debug( projCtx, int ); +void pj_ctx_set_logger( projCtx, void (*)(void *, int, const char *) ); +void pj_ctx_set_app_data( projCtx, void * ); +void *pj_ctx_get_app_data( projCtx ); + +void pj_log( projCtx ctx, int level, const char *fmt, ... ); +void pj_stderr_logger( void *, int, const char * ); + +#define PJ_LOG_NONE 0 +#define PJ_LOG_ERROR 1 +#define PJ_LOG_DEBUG_MAJOR 2 +#define PJ_LOG_DEBUG_MINOR 3 + #ifdef __cplusplus } #endif |
