gooderp18绿色标准版
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

71 lines
2.9KB

  1. /******************************************************************************
  2. * $Id: cpl_vsi_error.h 1515758e53dd91f1c7f21f1e075e0c88e0e17fea 2016-12-10 01:44:43Z Kurt Schwehr $
  3. *
  4. * Project: VSI Virtual File System
  5. * Purpose: Implement an error system for reporting file system errors.
  6. * Filesystem errors need to be handled separately from the
  7. * CPLError architecture because they are potentially ignored.
  8. * Author: Rob Emanuele, rdemanuele at gmail.com
  9. *
  10. ******************************************************************************
  11. * Copyright (c) 2016, Rob Emanuele <rdemanuele at gmail.com>
  12. *
  13. * Permission is hereby granted, free of charge, to any person obtaining a
  14. * copy of this software and associated documentation files (the "Software"),
  15. * to deal in the Software without restriction, including without limitation
  16. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  17. * and/or sell copies of the Software, and to permit persons to whom the
  18. * Software is furnished to do so, subject to the following conditions:
  19. *
  20. * The above copyright notice and this permission notice shall be included
  21. * in all copies or substantial portions of the Software.
  22. *
  23. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  24. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  25. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  26. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  27. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  28. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  29. * DEALINGS IN THE SOFTWARE.
  30. ****************************************************************************/
  31. #ifndef CPL_VSI_ERROR_H_INCLUDED
  32. #define CPL_VSI_ERROR_H_INCLUDED
  33. #include "cpl_port.h"
  34. #include "cpl_error.h"
  35. /* ====================================================================
  36. Filesystem error codes.
  37. ==================================================================== */
  38. CPL_C_START
  39. typedef int VSIErrorNum;
  40. #define VSIE_None 0
  41. #define VSIE_FileError 1
  42. #define VSIE_HttpError 2
  43. #define VSIE_AWSError 5
  44. #define VSIE_AWSAccessDenied 6
  45. #define VSIE_AWSBucketNotFound 7
  46. #define VSIE_AWSObjectNotFound 8
  47. #define VSIE_AWSInvalidCredentials 9
  48. #define VSIE_AWSSignatureDoesNotMatch 10
  49. void CPL_DLL VSIError( VSIErrorNum err_no,
  50. CPL_FORMAT_STRING(const char *fmt), ... )
  51. CPL_PRINT_FUNC_FORMAT (2, 3);
  52. void CPL_DLL CPL_STDCALL VSIErrorReset( void );
  53. VSIErrorNum CPL_DLL CPL_STDCALL VSIGetLastErrorNo( void );
  54. const char CPL_DLL * CPL_STDCALL VSIGetLastErrorMsg( void );
  55. int CPL_DLL CPL_STDCALL VSIToCPLError( CPLErr eErrClass,
  56. CPLErrorNum eDefaultErrorNo );
  57. CPL_C_END
  58. #endif /* CPL_VSI_ERROR_H_INCLUDED */
上海开阖软件有限公司 沪ICP备12045867号-1