blob: 1d62ca0f342f14ff1039be245d87ed63f93e859f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
// -*- C++ -*-
//
// $Id$
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
namespace ACE
{
namespace HTTP
{
ACE_INLINE
void Status::set_status(Code status)
{
this->code_ = status;
}
ACE_INLINE
Status::Code Status::get_status() const
{
return this->code_;
}
ACE_INLINE
void Status::set_reason(const ACE_CString& reason)
{
this->reason_ = reason;
}
ACE_INLINE
const ACE_CString& Status::get_reason() const
{
return this->reason_;
}
ACE_INLINE
void Status::set_status_and_reason(Code status)
{
this->reason_ = get_reason (this->code_ = status);
}
ACE_INLINE
bool Status::is_valid () const
{
return this->code_ != INVALID;
}
ACE_INLINE
bool Status::is_ok () const
{
return this->code_ >= HTTP_OK && this->code_ < HTTP_BAD_REQUEST;
}
ACE_INLINE
Status::operator bool() const
{
return this->is_valid ();
}
ACE_INLINE
bool Status::operator !() const
{
return !this->is_valid ();
}
}
}
ACE_END_VERSIONED_NAMESPACE_DECL
|