cpl_vsil_curl_priv.h

00001 /******************************************************************************
00002  * $Id: cpl_vsil_curl_priv.h 27044 2014-03-16 23:41:27Z rouault $
00003  *
00004  * Project:  CPL - Common Portability Library
00005  * Purpose:  Private API for VSICurl
00006  * Author:   Even Rouault, even.rouault at mines-paris.org
00007  *
00008  ******************************************************************************
00009  * Copyright (c) 2012, Even Rouault <even dot rouault at mines-paris dot org>
00010  *
00011  * Permission is hereby granted, free of charge, to any person obtaining a
00012  * copy of this software and associated documentation files (the "Software"),
00013  * to deal in the Software without restriction, including without limitation
00014  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00015  * and/or sell copies of the Software, and to permit persons to whom the
00016  * Software is furnished to do so, subject to the following conditions:
00017  *
00018  * The above copyright notice and this permission notice shall be included
00019  * in all copies or substantial portions of the Software.
00020  *
00021  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00022  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00023  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00024  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00025  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00026  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00027  * DEALINGS IN THE SOFTWARE.
00028  ****************************************************************************/
00029 
00030 #ifndef CPL_VSIL_CURL_PRIV_H_INCLUDED
00031 #define CPL_VSIL_CURL_PRIV_H_INCLUDED
00032 
00033 #include "cpl_vsi_virtual.h"
00034 
00035 /* NOTE: this is private API for GDAL internal use. May change without notice. */
00036 /* Used by the MBTiles driver for now */
00037 
00038 /* Return TRUE to go on downloading, FALSE to stop */
00039 typedef int (*VSICurlReadCbkFunc) (VSILFILE* fp, void *pabyBuffer, size_t nBufferSize, void* pfnUserData);
00040 
00041 /* fp must be a VSICurl file handle, otherwise bad things will happen ! */
00042 /* bStopOnInterrruptUntilUninstall must be set to TRUE if all downloads */
00043 /* must be cancelled after a first one has been stopped by the callback function. */
00044 /* In that case, downloads will restart after uninstalling the callback. */
00045 int VSICurlInstallReadCbk(VSILFILE* fp, VSICurlReadCbkFunc pfnReadCbk, void* pfnUserData,
00046                           int bStopOnInterrruptUntilUninstall);
00047 int VSICurlUninstallReadCbk(VSILFILE* fp);
00048 
00049 #endif // CPL_VSIL_CURL_PRIV_H_INCLUDED

Generated for GDAL by doxygen 1.7.1.