GDAL

- Main Page
- Related Pages
- Classes
- Files
- Download
- Issue Tracker

- File List
- File Members

cpl_vsil_curl_priv.h
1 /******************************************************************************
2 * $Id$
3 *
4 * Project: CPL - Common Portability Library
5 * Purpose: Private API for VSICurl
6 * Author: Even Rouault, even.rouault at mines-paris.org
7 *
8 ******************************************************************************
9 * Copyright (c) 2012, Even Rouault <even dot rouault at mines-paris dot org>
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a
12 * copy of this software and associated documentation files (the "Software"),
13 * to deal in the Software without restriction, including without limitation
14 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15 * and/or sell copies of the Software, and to permit persons to whom the
16 * Software is furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included
19 * in all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27 * DEALINGS IN THE SOFTWARE.
28 ****************************************************************************/
29
30 #ifndef CPL_VSIL_CURL_PRIV_H_INCLUDED
31 #define CPL_VSIL_CURL_PRIV_H_INCLUDED
32
33 #include "cpl_vsi_virtual.h"
34
35 /* NOTE: this is private API for GDAL internal use. */
36 /* May change without notice. */
37 /* Used by the MBTiles driver for now. */
38
39 /* Return TRUE to go on downloading, FALSE to stop. */
40 typedef int (*VSICurlReadCbkFunc) (VSILFILE* fp, void *pabyBuffer,
41 size_t nBufferSize, void* pfnUserData);
42
43 /* fp must be a VSICurl file handle, otherwise bad things will happen. */
44 /* bStopOnInterruptUntilUninstall must be set to TRUE if all downloads */
45 /* must be canceled after a first one has been stopped by the callback */
46 /* function. In that case, downloads will restart after uninstalling the */
47 /* callback. */
48 int VSICurlInstallReadCbk( VSILFILE* fp, VSICurlReadCbkFunc pfnReadCbk,
49 void* pfnUserData,
50 int bStopOnInterruptUntilUninstall );
51 int VSICurlUninstallReadCbk( VSILFILE* fp );
52
53 #endif // CPL_VSIL_CURL_PRIV_H_INCLUDED
VSILFILE
FILE VSILFILE
Opaque type for a FILE that implements the VSIVirtualHandle API.
Definition: cpl_vsi.h:156

Generated for GDAL by 1.8.8.