diff OrthancCppClient/HttpException.cpp @ 473:c9a5d72f8481

changing the namespace of HTTP enumerations
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 15 Jul 2013 17:22:13 +0200
parents e3a40c7846b8
children a9693dc7089c
line wrap: on
line diff
--- a/OrthancCppClient/HttpException.cpp	Mon Jul 15 13:50:36 2013 +0200
+++ b/OrthancCppClient/HttpException.cpp	Mon Jul 15 17:22:13 2013 +0200
@@ -31,7 +31,7 @@
 {
   const char* HttpException::What() const
   {
-    if (status_ == Orthanc_HttpStatus_None)
+    if (status_ == HttpStatus_None)
     {
       return custom_.c_str();
     }
@@ -41,164 +41,164 @@
     }
   }
 
-  const char* HttpException::GetDescription(Orthanc_HttpStatus status)
+  const char* HttpException::GetDescription(HttpStatus status)
   {
     switch (status)
     {
-    case Orthanc_HttpStatus_100_Continue:
+    case HttpStatus_100_Continue:
       return "Continue";
 
-    case Orthanc_HttpStatus_101_SwitchingProtocols:
+    case HttpStatus_101_SwitchingProtocols:
       return "Switching Protocols";
 
-    case Orthanc_HttpStatus_102_Processing:
+    case HttpStatus_102_Processing:
       return "Processing";
 
-    case Orthanc_HttpStatus_200_Ok:
+    case HttpStatus_200_Ok:
       return "OK";
 
-    case Orthanc_HttpStatus_201_Created:
+    case HttpStatus_201_Created:
       return "Created";
 
-    case Orthanc_HttpStatus_202_Accepted:
+    case HttpStatus_202_Accepted:
       return "Accepted";
 
-    case Orthanc_HttpStatus_203_NonAuthoritativeInformation:
+    case HttpStatus_203_NonAuthoritativeInformation:
       return "Non-Authoritative Information";
 
-    case Orthanc_HttpStatus_204_NoContent:
+    case HttpStatus_204_NoContent:
       return "No Content";
 
-    case Orthanc_HttpStatus_205_ResetContent:
+    case HttpStatus_205_ResetContent:
       return "Reset Content";
 
-    case Orthanc_HttpStatus_206_PartialContent:
+    case HttpStatus_206_PartialContent:
       return "Partial Content";
 
-    case Orthanc_HttpStatus_207_MultiStatus:
+    case HttpStatus_207_MultiStatus:
       return "Multi-Status";
 
-    case Orthanc_HttpStatus_208_AlreadyReported:
+    case HttpStatus_208_AlreadyReported:
       return "Already Reported";
 
-    case Orthanc_HttpStatus_226_IMUsed:
+    case HttpStatus_226_IMUsed:
       return "IM Used";
 
-    case Orthanc_HttpStatus_300_MultipleChoices:
+    case HttpStatus_300_MultipleChoices:
       return "Multiple Choices";
 
-    case Orthanc_HttpStatus_301_MovedPermanently:
+    case HttpStatus_301_MovedPermanently:
       return "Moved Permanently";
 
-    case Orthanc_HttpStatus_302_Found:
+    case HttpStatus_302_Found:
       return "Found";
 
-    case Orthanc_HttpStatus_303_SeeOther:
+    case HttpStatus_303_SeeOther:
       return "See Other";
 
-    case Orthanc_HttpStatus_304_NotModified:
+    case HttpStatus_304_NotModified:
       return "Not Modified";
 
-    case Orthanc_HttpStatus_305_UseProxy:
+    case HttpStatus_305_UseProxy:
       return "Use Proxy";
 
-    case Orthanc_HttpStatus_307_TemporaryRedirect:
+    case HttpStatus_307_TemporaryRedirect:
       return "Temporary Redirect";
 
-    case Orthanc_HttpStatus_400_BadRequest:
+    case HttpStatus_400_BadRequest:
       return "Bad Request";
 
-    case Orthanc_HttpStatus_401_Unauthorized:
+    case HttpStatus_401_Unauthorized:
       return "Unauthorized";
 
-    case Orthanc_HttpStatus_402_PaymentRequired:
+    case HttpStatus_402_PaymentRequired:
       return "Payment Required";
 
-    case Orthanc_HttpStatus_403_Forbidden:
+    case HttpStatus_403_Forbidden:
       return "Forbidden";
 
-    case Orthanc_HttpStatus_404_NotFound:
+    case HttpStatus_404_NotFound:
       return "Not Found";
 
-    case Orthanc_HttpStatus_405_MethodNotAllowed:
+    case HttpStatus_405_MethodNotAllowed:
       return "Method Not Allowed";
 
-    case Orthanc_HttpStatus_406_NotAcceptable:
+    case HttpStatus_406_NotAcceptable:
       return "Not Acceptable";
 
-    case Orthanc_HttpStatus_407_ProxyAuthenticationRequired:
+    case HttpStatus_407_ProxyAuthenticationRequired:
       return "Proxy Authentication Required";
 
-    case Orthanc_HttpStatus_408_RequestTimeout:
+    case HttpStatus_408_RequestTimeout:
       return "Request Timeout";
 
-    case Orthanc_HttpStatus_409_Conflict:
+    case HttpStatus_409_Conflict:
       return "Conflict";
 
-    case Orthanc_HttpStatus_410_Gone:
+    case HttpStatus_410_Gone:
       return "Gone";
 
-    case Orthanc_HttpStatus_411_LengthRequired:
+    case HttpStatus_411_LengthRequired:
       return "Length Required";
 
-    case Orthanc_HttpStatus_412_PreconditionFailed:
+    case HttpStatus_412_PreconditionFailed:
       return "Precondition Failed";
 
-    case Orthanc_HttpStatus_413_RequestEntityTooLarge:
+    case HttpStatus_413_RequestEntityTooLarge:
       return "Request Entity Too Large";
 
-    case Orthanc_HttpStatus_414_RequestUriTooLong:
+    case HttpStatus_414_RequestUriTooLong:
       return "Request-URI Too Long";
 
-    case Orthanc_HttpStatus_415_UnsupportedMediaType:
+    case HttpStatus_415_UnsupportedMediaType:
       return "Unsupported Media Type";
 
-    case Orthanc_HttpStatus_416_RequestedRangeNotSatisfiable:
+    case HttpStatus_416_RequestedRangeNotSatisfiable:
       return "Requested Range Not Satisfiable";
 
-    case Orthanc_HttpStatus_417_ExpectationFailed:
+    case HttpStatus_417_ExpectationFailed:
       return "Expectation Failed";
 
-    case Orthanc_HttpStatus_422_UnprocessableEntity:
+    case HttpStatus_422_UnprocessableEntity:
       return "Unprocessable Entity";
 
-    case Orthanc_HttpStatus_423_Locked:
+    case HttpStatus_423_Locked:
       return "Locked";
 
-    case Orthanc_HttpStatus_424_FailedDependency:
+    case HttpStatus_424_FailedDependency:
       return "Failed Dependency";
 
-    case Orthanc_HttpStatus_426_UpgradeRequired:
+    case HttpStatus_426_UpgradeRequired:
       return "Upgrade Required";
 
-    case Orthanc_HttpStatus_500_InternalServerError:
+    case HttpStatus_500_InternalServerError:
       return "Internal Server Error";
 
-    case Orthanc_HttpStatus_501_NotImplemented:
+    case HttpStatus_501_NotImplemented:
       return "Not Implemented";
 
-    case Orthanc_HttpStatus_502_BadGateway:
+    case HttpStatus_502_BadGateway:
       return "Bad Gateway";
 
-    case Orthanc_HttpStatus_503_ServiceUnavailable:
+    case HttpStatus_503_ServiceUnavailable:
       return "Service Unavailable";
 
-    case Orthanc_HttpStatus_504_GatewayTimeout:
+    case HttpStatus_504_GatewayTimeout:
       return "Gateway Timeout";
 
-    case Orthanc_HttpStatus_505_HttpVersionNotSupported:
+    case HttpStatus_505_HttpVersionNotSupported:
       return "HTTP Version Not Supported";
 
-    case Orthanc_HttpStatus_506_VariantAlsoNegotiates:
+    case HttpStatus_506_VariantAlsoNegotiates:
       return "Variant Also Negotiates";
 
-    case Orthanc_HttpStatus_507_InsufficientStorage:
+    case HttpStatus_507_InsufficientStorage:
       return "Insufficient Storage";
 
-    case Orthanc_HttpStatus_509_BandwidthLimitExceeded:
+    case HttpStatus_509_BandwidthLimitExceeded:
       return "Bandwidth Limit Exceeded";
 
-    case Orthanc_HttpStatus_510_NotExtended:
+    case HttpStatus_510_NotExtended:
       return "Not Extended";
 
     default: