34 #pragma implementation 40 using std::ostringstream ;
81 bool strm_owned,
bool ishttp )
82 :
BESInfo( key, strm, strm_owned ),
114 const string &tag_data,
115 map<string,string> *attrs )
117 add_data( _indent + tag_name +
": " + tag_data +
"\n" ) ;
120 map<string,string>::const_iterator i = attrs->begin() ;
121 map<string,string>::const_iterator e = attrs->end() ;
124 string name = (*i).first ;
125 string val = (*i).second ;
126 add_data( _indent +
" " + name +
": " + val +
"\n" ) ;
138 map<string,string> *attrs )
141 add_data( _indent + tag_name +
"\n" ) ;
145 map<string,string>::const_iterator i = attrs->begin() ;
146 map<string,string>::const_iterator e = attrs->end() ;
149 string name = (*i).first ;
150 string val = (*i).second ;
151 add_data( _indent + name +
": " + val +
"\n" ) ;
166 if( _indent.length() >= 4 )
167 _indent = _indent.substr( 0, _indent.length()-4 ) ;
193 for(
unsigned long i = 0; i < num_spaces; i++ )
208 for(
unsigned long i = 0; i < num_breaks; i++ )
226 string newkey = key +
".TXT" ;
256 << (
void *)
this <<
")" << endl ;
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
virtual void add_space(unsigned long num_spaces)
add a space to the informational response
virtual void dump(ostream &strm) const
Displays debug information about this 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_data_from_file(const string &key, const string &name)
add data from a file to the informational object.
virtual void dump(ostream &strm) const
dumps information about this object
static BESInfo * BuildTextInfo(const string &info_type)
informational response object
virtual void begin_tag(const string &tag_name, map< string, string > *attrs=0)
static ostream & LMarg(ostream &strm)
virtual void add_data_from_file(const string &key, const string &name)
add data from a file to the informational object
static void set_mime_text(ostream &strm)
Generate an HTTP 1.0 response header for a text document.
virtual void add_tag(const string &tag_name, const string &tag_data, map< string, string > *attrs=0)
add tagged information to the inforamtional response
BESTextInfo(bool ishttp=false)
constructs a basic text information response object.
virtual void send_text(BESInfo &info, BESDataHandlerInterface &dhi)=0
virtual void end_tag(const string &tag_name)
end a tagged part of the informational response
virtual void add_break(unsigned long num_breaks)
add a line break to the information
Structure storing information used by the BES to handle the request.
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 transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the text information as text
virtual void end_tag(const string &tag_name)
virtual void add_data(const string &s)
add string data to the informational response