- Main Page
- Related Pages
- Classes
- Files

# cpl_http.h

Go to the documentation of this file.

    00001 /******************************************************************************
    00002  * $Id: cpl_http.h 19840 2010-06-11 13:29:45Z chaitanya $
    00003  *
    00004  * Project:  Common Portability Library
    00005  * Purpose:  Function wrapper for libcurl HTTP access.
    00006  * Author:   Frank Warmerdam, warmerdam@pobox.com
    00007  *
    00008  ******************************************************************************
    00009  * Copyright (c) 2006, Frank Warmerdam
    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_HTTP_H_INCLUDED
    00031 #define CPL_HTTP_H_INCLUDED
    00032
    00033 #include "cpl_conv.h"
    00034 #include "cpl_string.h"
    00035 #include "cpl_vsi.h"
    00036
    00043 CPL_C_START
    00044
    00046 typedef struct { char **papszHeaders;
    00048      GByte *pabyData; int    nDataLen;
    00051 } CPLMimePart;
    00052
    00054 typedef struct {
    00056     int     nStatus;
    00057
    00059     char    *pszContentType;
    00060
    00062     char    *pszErrBuf;
    00063
    00065     int     nDataLen;
    00066     int     nDataAlloc;
    00067
    00069     GByte   *pabyData;
    00070
    00072     char    **papszHeaders;
    00073
    00075     int     nMimePartCount;
    00076
    00078     CPLMimePart *pasMimePart;
    00079
    00080 } CPLHTTPResult;
    00081
    00082 int CPL_DLL   CPLHTTPEnabled( void );
    00083 CPLHTTPResult CPL_DLL *CPLHTTPFetch( const char *pszURL, char **papszOptions);
    00084 void CPL_DLL  CPLHTTPCleanup( void );
    00085 void CPL_DLL  CPLHTTPDestroyResult( CPLHTTPResult *psResult );
    00086 int  CPL_DLL  CPLHTTPParseMultipartMime( CPLHTTPResult *psResult );
    00087
    00088 CPL_C_END
    00089
    00090 #endif /* ndef CPL_HTTP_H_INCLUDED */

Generated for GDAL by 1.5.6.