GDAL
cpl_vsi_error.h
00001 /******************************************************************************
00002  * $Id: cpl_vsi_error.h 36769 2016-12-10 01:44:43Z goatbar $
00003  *
00004  * Project:  VSI Virtual File System
00005  * Purpose:  Implement an error system for reporting file system errors.
00006  *           Filesystem errors need to be handled separately from the
00007  *           CPLError architecture because they are potentially ignored.
00008  * Author:   Rob Emanuele, rdemanuele at gmail.com
00009  *
00010  ******************************************************************************
00011  * Copyright (c) 2016, Rob Emanuele <rdemanuele at gmail.com>
00012  *
00013  * Permission is hereby granted, free of charge, to any person obtaining a
00014  * copy of this software and associated documentation files (the "Software"),
00015  * to deal in the Software without restriction, including without limitation
00016  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00017  * and/or sell copies of the Software, and to permit persons to whom the
00018  * Software is furnished to do so, subject to the following conditions:
00019  *
00020  * The above copyright notice and this permission notice shall be included
00021  * in all copies or substantial portions of the Software.
00022  *
00023  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00024  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00025  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00026  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00027  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00028  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00029  * DEALINGS IN THE SOFTWARE.
00030  ****************************************************************************/
00031 
00032 #ifndef CPL_VSI_ERROR_H_INCLUDED
00033 #define CPL_VSI_ERROR_H_INCLUDED
00034 
00035 #include "cpl_port.h"
00036 #include "cpl_error.h"
00037 
00038 /* ====================================================================
00039         Filesystem error codes.
00040    ==================================================================== */
00041 
00042 CPL_C_START
00043 
00044 typedef int VSIErrorNum;
00045 
00046 #define VSIE_None                       0
00047 #define VSIE_FileError                  1
00048 #define VSIE_HttpError                  2
00049 
00050 #define VSIE_AWSError                   5
00051 #define VSIE_AWSAccessDenied            6
00052 #define VSIE_AWSBucketNotFound          7
00053 #define VSIE_AWSObjectNotFound          8
00054 #define VSIE_AWSInvalidCredentials      9
00055 #define VSIE_AWSSignatureDoesNotMatch   10
00056 
00057 void CPL_DLL VSIError( VSIErrorNum err_no,
00058                        CPL_FORMAT_STRING(const char *fmt), ... )
00059     CPL_PRINT_FUNC_FORMAT (2, 3);
00060 
00061 void CPL_DLL CPL_STDCALL VSIErrorReset( void );
00062 VSIErrorNum CPL_DLL CPL_STDCALL VSIGetLastErrorNo( void );
00063 const char CPL_DLL * CPL_STDCALL VSIGetLastErrorMsg( void );
00064 
00065 int CPL_DLL CPL_STDCALL VSIToCPLError( CPLErr eErrClass,
00066                                        CPLErrorNum eDefaultErrorNo );
00067 
00068 CPL_C_END
00069 
00070 #endif /* CPL_VSI_ERROR_H_INCLUDED */

Generated for GDAL by doxygen 1.7.6.1.