/Headers/Foundation/NSURLError.h

http://github.com/gnustep/gnustep-base · C Header · 98 lines · 54 code · 12 blank · 32 comment · 1 complexity · 788236f8b68fd07dd66006b3c2c9b06d MD5 · raw file

  1. /* Interface for NSURLError for GNUstep
  2. Copyright (C) 2006 Software Foundation, Inc.
  3. Written by: Richard Frith-Macdonald <frm@gnu.org>
  4. Date: 2006
  5. This file is part of the GNUstep Base Library.
  6. This library is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU Lesser General Public
  8. License as published by the Free Software Foundation; either
  9. version 2 of the License, or (at your option) any later version.
  10. This library is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. Library General Public License for more details.
  14. You should have received a copy of the GNU Lesser General Public
  15. License along with this library; if not, write to the Free
  16. Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17. Boston, MA 02111 USA.
  18. */
  19. #ifndef __NSURLError_h_GNUSTEP_BASE_INCLUDE
  20. #define __NSURLError_h_GNUSTEP_BASE_INCLUDE
  21. #import <GNUstepBase/GSVersionMacros.h>
  22. #if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
  23. #import <Foundation/NSObject.h>
  24. #if defined(__cplusplus)
  25. extern "C" {
  26. #endif
  27. @class NSString;
  28. /**
  29. * The domain for a URL error.
  30. */
  31. extern NSString * const NSURLErrorDomain;
  32. /**
  33. * Obtain the URL which caused the failure
  34. */
  35. extern NSString * const NSErrorFailingURLStringKey;
  36. /**
  37. * Error codes for URL errors
  38. */
  39. enum
  40. {
  41. NSURLErrorUnknown = -1,
  42. NSURLErrorCancelled = -999,
  43. NSURLErrorBadURL = -1000,
  44. NSURLErrorTimedOut = -1001,
  45. NSURLErrorUnsupportedURL = -1002,
  46. NSURLErrorCannotFindHost = -1003,
  47. NSURLErrorCannotConnectToHost = -1004,
  48. NSURLErrorNetworkConnectionLost = -1005,
  49. NSURLErrorDNSLookupFailed = -1006,
  50. NSURLErrorHTTPTooManyRedirects = -1007,
  51. NSURLErrorResourceUnavailable = -1008,
  52. NSURLErrorNotConnectedToInternet = -1009,
  53. NSURLErrorRedirectToNonExistentLocation = -1010,
  54. NSURLErrorBadServerResponse = -1011,
  55. NSURLErrorUserCancelledAuthentication = -1012,
  56. NSURLErrorUserAuthenticationRequired = -1013,
  57. NSURLErrorZeroByteResource = -1014,
  58. NSURLErrorFileDoesNotExist = -1100,
  59. NSURLErrorFileIsDirectory = -1101,
  60. NSURLErrorNoPermissionsToReadFile = -1102,
  61. NSURLErrorSecureConnectionFailed = -1200,
  62. NSURLErrorServerCertificateHasBadDate = -1201,
  63. NSURLErrorServerCertificateUntrusted = -1202,
  64. NSURLErrorServerCertificateHasUnknownRoot = -1203,
  65. NSURLErrorServerCertificateNotYetValid = -1204,
  66. NSURLErrorClientCertificateRejected = -1205,
  67. NSURLErrorCannotLoadFromNetwork = -2000,
  68. NSURLErrorCannotCreateFile = -3000,
  69. NSURLErrorCannotOpenFile = -3001,
  70. NSURLErrorCannotCloseFile = -3002,
  71. NSURLErrorCannotWriteToFile = -3003,
  72. NSURLErrorCannotRemoveFile = -3004,
  73. NSURLErrorCannotMoveFile = -3005,
  74. NSURLErrorDownloadDecodingFailedMidStream = -3006,
  75. NSURLErrorDownloadDecodingFailedToComplete = -3007
  76. };
  77. #if defined(__cplusplus)
  78. }
  79. #endif
  80. #endif
  81. #endif