summaryrefslogtreecommitdiff
path: root/websvcs/lib/URL_Addr.i
blob: 2e3c8ddba8929adba91d5506fa0c85c012618b22 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// -*- C++ -*-
// $Id$

// ****************************************************************

#include "ace/OS_NS_string.h"

ACE_INLINE
ACE_URL_Addr::ACE_URL_Addr (const ACE_URL_Addr& address)
  :  ACE_Addr (),
     url_ (address.url_ == 0 ? 0 : ACE_OS::strdup (address.url_))
{
}

ACE_INLINE ACE_URL_Addr&
ACE_URL_Addr::operator= (const ACE_URL_Addr& address)
{
  if (this == &address)
    return *this;

  this->set (address);
  return *this;
}

ACE_INLINE const ACE_TCHAR *
ACE_URL_Addr::get_url (void) const
{
  return this->url_;
}

ACE_INLINE void
ACE_URL_Addr::set_url (ACE_TCHAR *url)
{
  this->url_ = url;
}

ACE_INLINE u_long
ACE_URL_Addr::hash (void) const
{
  return ACE::hash_pjw (this->url_);
}

// ****************************************************************

ACE_INLINE ACE_HTTP_Addr&
ACE_HTTP_Addr::operator= (const ACE_HTTP_Addr& rhs)
{
  if (this == &rhs)
    return *this;

  this->set (rhs);
  return *this;
}

ACE_INLINE ACE_INET_Addr
ACE_HTTP_Addr::get_inet_address (void) const
{
  return ACE_INET_Addr (this->port_number_, this->hostname_);
}

ACE_INLINE const ACE_TCHAR *
ACE_HTTP_Addr::get_hostname (void) const
{
  return this->hostname_;
}

ACE_INLINE u_short
ACE_HTTP_Addr::get_port_number (void) const
{
  return this->port_number_;
}

ACE_INLINE const ACE_TCHAR *
ACE_HTTP_Addr::get_path (void) const
{
  return this->path_;
}

ACE_INLINE const ACE_TCHAR *
ACE_HTTP_Addr::get_query (void) const
{
  return this->query_;
}

// ****************************************************************

ACE_INLINE ACE_FTP_Addr&
ACE_FTP_Addr::operator= (const ACE_FTP_Addr& rhs)
{
  if (this == &rhs)
    return *this;

  this->set (rhs);
  return *this;
}

ACE_INLINE const ACE_TCHAR *
ACE_FTP_Addr::get_user (void) const
{
  return this->user_;
}

ACE_INLINE const ACE_TCHAR *
ACE_FTP_Addr::get_hostname (void) const
{
  return this->hostname_;
}

ACE_INLINE const ACE_TCHAR *
ACE_FTP_Addr::get_passwd (void) const
{
  return this->password_;
}

ACE_INLINE const ACE_TCHAR *
ACE_FTP_Addr::get_path (void) const
{
  return this->path_;
}

ACE_INLINE ACE_INET_Addr
ACE_FTP_Addr::get_inet_address (void) const
{
  return ACE_INET_Addr (ACE_TEXT ("ftp"), this->hostname_);
}

// ****************************************************************

ACE_INLINE ACE_Mailto_Addr&
ACE_Mailto_Addr::operator= (const ACE_Mailto_Addr& rhs)
{
  if (this == &rhs)
    return *this;

  this->set (rhs);
  return *this;
}

ACE_INLINE const ACE_TCHAR *
ACE_Mailto_Addr::get_user (void) const
{
  return this->user_;
}

ACE_INLINE const ACE_TCHAR *
ACE_Mailto_Addr::get_hostname (void) const
{
  return this->hostname_;
}

ACE_INLINE const ACE_TCHAR *
ACE_Mailto_Addr::get_headers (void) const
{
  return this->headers_;
}