1 #include "ace/INet/FTP_URL.h"
3 #if !defined (__ACE_INLINE__)
4 #include "ace/INet/FTP_URL.inl"
7 #include "ace/INet/String_IOStream.h"
8 #include "ace/INet/FTP_ClientRequestHandler.h"
10 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
16 const char* URL::PROTOCOL
= "ftp";
18 const ACE_CString
& URL::protocol ()
20 static const ACE_CString
protocol_ (PROTOCOL
);
25 : ACE::INet::URL_INetAuthBase (FTP_PORT
)
29 URL::URL (const ACE_CString
& url_string
)
30 : ACE::INet::URL_INetAuthBase (FTP_PORT
)
32 this->parse (url_string
);
35 URL::URL (const URL
& url
)
36 : ACE::INet::URL_INetAuthBase (0)
45 URL
& URL::operator =(const URL
& url
)
47 this->set_user_info (url
.get_user_info ());
48 this->set_host (url
.get_host ());
49 this->set_port (url
.get_port ());
50 this->set_path (url
.get_path ());
54 ACE_CString
URL::to_string () const
56 ACE::IOS::CString_OStream sos
;
57 sos
<< this->get_scheme () << "://"
58 << this->get_authority ().c_str ()
59 << this->get_path ().c_str ();
63 ACE::INet::ClientRequestHandler
* URL::create_default_request_handler () const
65 ACE::INet::ClientRequestHandler
* prh
= 0;
66 ACE_NEW_NORETURN (prh
, ClientRequestHandler ());
70 const URL::Factory
& URL::factory_
= *URL::TURLFactorySingleton::instance ();
72 URL::Factory::Factory ()
74 ACE::INet::URL_Base::register_factory (this);
77 URL::Factory::~Factory ()
80 const ACE_CString
& URL::Factory::protocol ()
82 return URL::protocol ();
85 ACE::INet::URL_Base
* URL::Factory::create_from_string (const ACE_CString
& url_string
)
88 ACE_NEW_NORETURN (purl
, URL (url_string
));
94 ACE_END_VERSIONED_NAMESPACE_DECL