annotate include/http/IResponse.hpp @ 49:1e63e52573a0

Fix typo
author daedric <d43dr1c@gmail.com>
date Tue, 23 Mar 2010 10:33:57 +0100
parents dad671a5f028
children 17fad87d0ed1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
1 #ifndef __ZIA_API_IRESPONSE_HPP__
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
2 # define __ZIA_API_IRESPONSE_HPP__
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
3
2
cd9942c3faaa include path modified
Zoltan K
parents: 0
diff changeset
4 # include "http/IHeader.hpp"
0
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
5
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
6 namespace zia
0
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
7 {
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
8 namespace api
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
9 {
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
10 namespace http
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
11 {
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
12 /**
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
13 * @brief Interface to represent a HTTP response. It provides
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
14 * methods to modify the header and the response line.
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
15 *
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
16 * @see IHeader
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
17 * @see IRequest
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
18 */
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
19 class IResponse
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
20 {
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
21 public:
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
22 typedef int StatusCode;
0
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
23
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
24 virtual ~IResponse(void) { }
0
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
25
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
26 /**
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
27 * @brief Get the status code of the response.
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
28 *
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
29 * @return The status code, 0 if it is unset.
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
30 *
46
dad671a5f028 Corrections de typos, d'orthograffe et de formulations.
David Pineau <dav.pineau@gmail.com>
parents: 41
diff changeset
31 * 'HTTP/1.1 200 OK' -> the '200' in this string.
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
32 */
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
33 virtual StatusCode getStatusCode(void) const = 0;
0
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
34
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
35 /**
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
36 * @brief Get the status message.
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
37 *
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
38 * @return The status message.
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
39 *
46
dad671a5f028 Corrections de typos, d'orthograffe et de formulations.
David Pineau <dav.pineau@gmail.com>
parents: 41
diff changeset
40 * 'HTTP/1.1 200 OK' -> the 'OK' in this string.
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
41 */
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
42 virtual const std::string & getStatusMessage(void) const = 0;
0
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
43
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
44 /**
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
45 * @brief Get the version of HTTP in response.
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
46 *
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
47 * @return The HTTP version.
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
48 *
46
dad671a5f028 Corrections de typos, d'orthograffe et de formulations.
David Pineau <dav.pineau@gmail.com>
parents: 41
diff changeset
49 * 'HTTP/1.1 200 OK' -> the '1.1' in this string.
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
50 */
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
51 virtual const std::string & getVersion(void) const = 0;
0
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
52
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
53 /**
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
54 * @brief Set the status code.
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
55 *
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
56 * @param [in] code The status code to set.
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
57 *
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
58 * @see IResponse::getStatusCode
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
59 */
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
60 virtual void setStatusCode(StatusCode code) = 0;
0
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
61
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
62 /**
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
63 * @brief Set the status message.
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
64 *
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
65 * @param [in] msg The message to set.
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
66 *
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
67 * @see IResponse::getStatusMessage
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
68 */
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
69 virtual void setStatusMessage(const std::string & msg) = 0;
0
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
70
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
71 /**
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
72 * @brief Set the HTTP version.
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
73 *
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
74 * @param [in] v The HTTP version to set.
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
75 *
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
76 * @see IResponse::getVersion
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
77 */
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
78 virtual void setVersion(const std::string & v) = 0;
0
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
79
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
80 /**
46
dad671a5f028 Corrections de typos, d'orthograffe et de formulations.
David Pineau <dav.pineau@gmail.com>
parents: 41
diff changeset
81 * @brief Get HTTP headers associated with the response.
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
82 *
49
1e63e52573a0 Fix typo
daedric <d43dr1c@gmail.com>
parents: 46
diff changeset
83 * @return The HTTP headers.
41
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
84 *
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
85 * @see IHeader
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
86 */
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
87 virtual IHeader & getHeaders(void) const = 0;
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
88 };
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
89 };
7c8cd74023ce Rework file layout, fix build, add README and SUPPORT
Louis Opter <kalessin@kalessin.fr>
parents: 22
diff changeset
90 };
0
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
91 };
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
92
e0a7028df8bf Initial commit
Zoltan K
parents:
diff changeset
93 #endif /* ! __ZIA_API_IRESPONSE_HPP__ */