comparison PalanthirCppClient/HttpEnumerations.h @ 45:33d67e1ab173

r
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Sep 2012 13:24:59 +0200
parents PalantirCppClient/HttpEnumerations.h@9be852ad33d2
children a15e90e5d6fc
comparison
equal deleted inserted replaced
43:9be852ad33d2 45:33d67e1ab173
1 /**
2 * Palantir - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012 Medical Physics Department, CHU of Liege,
4 * Belgium
5 *
6 * Permission is hereby granted, free of charge, to any person
7 * obtaining a copy of this software and associated documentation
8 * files (the "Software"), to deal in the Software without
9 * restriction, including without limitation the rights to use, copy,
10 * modify, merge, publish, distribute, sublicense, and/or sell copies
11 * of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be
15 * included in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
21 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
22 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 * SOFTWARE.
25 **/
26
27
28 #pragma once
29
30
31 /**
32 * This file contains the enumerations for the access to the Palantir
33 * REST API in C and C++. Namespaces are not used, in order to enable
34 * the access in C.
35 **/
36
37 // Most common, non-joke and non-experimental HTTP status codes
38 // http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
39 enum Palantir_HttpStatus
40 {
41 Palantir_HttpStatus_None = -1,
42
43 // 1xx Informational
44 Palantir_HttpStatus_100_Continue = 100,
45 Palantir_HttpStatus_101_SwitchingProtocols = 101,
46 Palantir_HttpStatus_102_Processing = 102,
47
48 // 2xx Success
49 Palantir_HttpStatus_200_Ok = 200,
50 Palantir_HttpStatus_201_Created = 201,
51 Palantir_HttpStatus_202_Accepted = 202,
52 Palantir_HttpStatus_203_NonAuthoritativeInformation = 203,
53 Palantir_HttpStatus_204_NoContent = 204,
54 Palantir_HttpStatus_205_ResetContent = 205,
55 Palantir_HttpStatus_206_PartialContent = 206,
56 Palantir_HttpStatus_207_MultiStatus = 207,
57 Palantir_HttpStatus_208_AlreadyReported = 208,
58 Palantir_HttpStatus_226_IMUsed = 226,
59
60 // 3xx Redirection
61 Palantir_HttpStatus_300_MultipleChoices = 300,
62 Palantir_HttpStatus_301_MovedPermanently = 301,
63 Palantir_HttpStatus_302_Found = 302,
64 Palantir_HttpStatus_303_SeeOther = 303,
65 Palantir_HttpStatus_304_NotModified = 304,
66 Palantir_HttpStatus_305_UseProxy = 305,
67 Palantir_HttpStatus_307_TemporaryRedirect = 307,
68
69 // 4xx Client Error
70 Palantir_HttpStatus_400_BadRequest = 400,
71 Palantir_HttpStatus_401_Unauthorized = 401,
72 Palantir_HttpStatus_402_PaymentRequired = 402,
73 Palantir_HttpStatus_403_Forbidden = 403,
74 Palantir_HttpStatus_404_NotFound = 404,
75 Palantir_HttpStatus_405_MethodNotAllowed = 405,
76 Palantir_HttpStatus_406_NotAcceptable = 406,
77 Palantir_HttpStatus_407_ProxyAuthenticationRequired = 407,
78 Palantir_HttpStatus_408_RequestTimeout = 408,
79 Palantir_HttpStatus_409_Conflict = 409,
80 Palantir_HttpStatus_410_Gone = 410,
81 Palantir_HttpStatus_411_LengthRequired = 411,
82 Palantir_HttpStatus_412_PreconditionFailed = 412,
83 Palantir_HttpStatus_413_RequestEntityTooLarge = 413,
84 Palantir_HttpStatus_414_RequestUriTooLong = 414,
85 Palantir_HttpStatus_415_UnsupportedMediaType = 415,
86 Palantir_HttpStatus_416_RequestedRangeNotSatisfiable = 416,
87 Palantir_HttpStatus_417_ExpectationFailed = 417,
88 Palantir_HttpStatus_422_UnprocessableEntity = 422,
89 Palantir_HttpStatus_423_Locked = 423,
90 Palantir_HttpStatus_424_FailedDependency = 424,
91 Palantir_HttpStatus_426_UpgradeRequired = 426,
92
93 // 5xx Server Error
94 Palantir_HttpStatus_500_InternalServerError = 500,
95 Palantir_HttpStatus_501_NotImplemented = 501,
96 Palantir_HttpStatus_502_BadGateway = 502,
97 Palantir_HttpStatus_503_ServiceUnavailable = 503,
98 Palantir_HttpStatus_504_GatewayTimeout = 504,
99 Palantir_HttpStatus_505_HttpVersionNotSupported = 505,
100 Palantir_HttpStatus_506_VariantAlsoNegotiates = 506,
101 Palantir_HttpStatus_507_InsufficientStorage = 507,
102 Palantir_HttpStatus_509_BandwidthLimitExceeded = 509,
103 Palantir_HttpStatus_510_NotExtended = 510
104 };
105
106
107 enum Palantir_HttpMethod
108 {
109 Palantir_HttpMethod_Get = 0,
110 Palantir_HttpMethod_Post = 1,
111 Palantir_HttpMethod_Delete = 2,
112 Palantir_HttpMethod_Put = 3
113 };