3 //=============================================================================
7 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
9 //=============================================================================
15 #include "Mem_Map_Stream.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "URL_Status.h"
24 #include "ace/SString.h"
27 // Forward declaration.
33 * @brief Base class for a URL.
35 * This class plays a role in the Visitor pattern.
44 * Accept the visitor, which will then perform a particular
45 * visitation strategy on the URL. This method is part of the
48 virtual int accept (URL_Visitor
*visitor
) = 0;
50 /// Send a <GET> command to fetch the contents in the URI from the
52 virtual ssize_t
send_request () = 0;
54 /// Returns the URL that we represent.
55 virtual const ACE_URL_Addr
&url_addr () const = 0;
57 /// Returns the <Mem_Map_Stream>.
58 virtual Mem_Map_Stream
&stream ();
60 // = Get/set the reply status.
61 virtual const URL_Status
&reply_status ();
62 virtual void reply_status (const URL_Status
&);
64 // = Get/set the reply status.
65 virtual const ACE_CString
&content_type ();
66 virtual void content_type (const ACE_CString
&);
70 /// Reply status of the URL.
71 URL_Status reply_status_
;
73 /// Content-type of the URL.
74 ACE_CString content_type_
;
76 /// Contents of the stream.
77 Mem_Map_Stream stream_
;