36 using std::ostringstream ;
62 :
BESInfo( key, strm, strm_owned ),
88 add_data( (
string)
"<TITLE>" + response_name +
"</TITLE>\n" ) ;
89 if( _indent.length() >= 4 )
90 _indent = _indent.substr( 0, _indent.length()-4 ) ;
106 if( _indent.length() >= 4 )
107 _indent = _indent.substr( 0, _indent.length()-4 ) ;
109 if( _indent.length() >= 4 )
110 _indent = _indent.substr( 0, _indent.length()-4 ) ;
122 const string &tag_data,
123 map<string,string> *attrs )
125 string to_add = tag_name +
": " + tag_data +
"<BR />\n" ;
129 map<string,string>::const_iterator i = attrs->begin() ;
130 map<string,string>::const_iterator e = attrs->end() ;
133 string name = (*i).first ;
134 string val = (*i).second ;
147 map<string,string> *attrs )
150 string to_add = tag_name +
"<BR />\n" ;
155 map<string,string>::const_iterator i = attrs->begin() ;
156 map<string,string>::const_iterator e = attrs->end() ;
159 string name = (*i).first ;
160 string val = (*i).second ;
176 if( _indent.length() >= 4 )
177 _indent = _indent.substr( 0, _indent.length()-4 ) ;
188 for(
unsigned long i = 0; i < num_spaces; i++ )
204 for(
unsigned long i = 0; i < num_breaks; i++ )
248 string newkey = key +
".HTML" ;
278 << (
void *)
this <<
")" << endl ;
BESHTMLInfo()
constructs an html formatted information response object.
virtual void add_data_from_file(const string &key, const string &name)
add data from a file to the informational object.
static BESInfo * BuildHTMLInfo(const string &info_type)
virtual void end_response()
end the response
virtual void dump(ostream &strm) const
Displays debug information about this object.
virtual void add_space(unsigned long num_spaces)
add a space to the informational response
informational response object
virtual void begin_tag(const string &tag_name, map< string, string > *attrs=0)
begin a tagged part of the information, information to follow
virtual void add_tag(const string &tag_name, const string &tag_data, map< string, string > *attrs=0)
add tagged information to the inforamtional response
static void set_mime_html(ostream &strm)
Generate an HTTP 1.0 response header for a html document.
virtual void begin_tag(const string &tag_name, map< string, string > *attrs=0)
static ostream & LMarg(ostream &strm)
virtual void add_data(const string &s)
add data to this informational object.
virtual void add_break(unsigned long num_breaks)
add a line break to the information
virtual void end_tag(const string &tag_name)
end a tagged part of the informational response
Structure storing information used by the BES to handle the request.
virtual void dump(ostream &strm) const
dumps information about this object
virtual void add_data_from_file(const string &key, const string &name)
add data from a file to the informational object
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
virtual void add_data(const string &s)
add data to this informational object.
virtual void send_html(BESInfo &info, BESDataHandlerInterface &dhi)=0
virtual void end_tag(const string &tag_name)
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the text information as text
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response