4 * @author Martin Corino <mcorino@remedy.nl>
10 #include /**/ "ace/pre.h"
12 #include /**/ "ace/config-all.h"
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 #include "ace/INet/INet_Export.h"
19 #include "ace/INet/URLBase.h"
21 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
30 * @brief Implements HTTP url support.
33 class ACE_INET_Export URL
34 : public ACE::INet::URL_INetAuthBase
38 URL (const ACE_CString
& url_string
);
42 URL
& operator =(const URL
& url
);
44 virtual const ACE_CString
& get_scheme () const;
46 virtual const ACE_CString
& get_query () const;
48 virtual const ACE_CString
& get_fragment () const;
50 virtual ACE_CString
get_request_uri () const;
52 virtual void set_query (const ACE_CString
& query
);
54 virtual void set_fragment (const ACE_CString
& fargment
);
56 void set_proxy (const ACE_CString
& proxy_host
, u_short proxy_port
= HTTP_PROXY_PORT
);
58 const ACE_CString
& get_proxy_host () const;
60 u_short
get_proxy_port () const;
62 bool has_proxy () const;
64 virtual ACE_CString
to_string () const;
66 virtual u_short
default_port () const;
68 static const char* PROTOCOL
;
70 static const ACE_CString
& protocol ();
75 HTTP_PROXY_PORT
= 8080
81 virtual ACE::INet::ClientRequestHandler
* create_default_request_handler () const;
85 ACE_CString fragment_
;
86 ACE_CString proxy_host_
;
91 : public ACE::INet::URL_Base::Factory
96 virtual const ACE_CString
& protocol ();
97 virtual ACE::INet::URL_Base
* create_from_string (const ACE_CString
& url_string
);
100 typedef ACE_Singleton
<Factory
,
101 ACE_Null_Mutex
> TURLFactorySingleton
;
102 static const Factory
& factory_
;
107 ACE_END_VERSIONED_NAMESPACE_DECL
109 #if defined (__ACE_INLINE__)
110 #include "ace/INet/HTTP_URL.inl"
113 #include /**/ "ace/post.h"
114 #endif /* ACE_HTTP_URL_H */