Aegis  4.25.D505
Defines | Enumerations | Functions | Variables
/home/archives/aegis/branch.4/branch.25/delta28933.505/libaegis/http.h File Reference
#include <libaegis/change.h>

Go to the source code of this file.

Defines

#define HISTOGRAM_HEIGHT   12
#define HISTOGRAM_WIDTH   120

Enumerations

enum  http_error_t {
  http_error_continue = 100, http_error_switching_protocols = 101, http_error_ok = 200, http_error_created = 201,
  http_error_accepted = 202, http_error_non_authoritative_information = 203, http_error_no_content = 204, http_error_reset_content = 205,
  http_error_partial_content = 206, http_error_multiple_choices = 300, http_error_moved_permanently = 301, http_error_moved_temporarily = 302,
  http_error_see_other = 303, http_error_not_modified = 304, http_error_use_proxy = 305, http_error_bad_request = 400,
  http_error_unauthorized = 401, http_error_payment_required = 402, http_error_forbidden = 403, http_error_not_found = 404,
  http_error_method_not_allowed = 405, http_error_not_acceptable = 406, http_error_proxy_authentication_required = 407, http_error_request_time_out = 408,
  http_error_conflict = 409, http_error_gone = 410, http_error_length_required = 411, http_error_precondition_failed = 412,
  http_error_request_entity_too_large = 413, http_error_request_url_too_large = 414, http_error_unsupported_media_type = 415, http_error_internal_server = 500,
  http_error_not_implemented = 501, http_error_bad_gateway = 502, http_error_out_of_resources = 503, http_error_gateway_time_out = 504,
  http_error_version_not_supported = 505
}

Functions

void http_fatal (http_error_t oops, const char *fmt,...)
const char * http_getenv (const char *)
void html_escape_string (string_ty *)
void html_escape_string (const nstring &)
void html_escape_charstar (const char *)
void html_encode_string (string_ty *)
void html_encode_string (const nstring &)
void html_encode_charstar (const char *)
void http_content_type_header (string_ty *)
void html_header (project *, change::pointer)
void html_header_ps (project *, change::pointer)
void html_footer (project *, change::pointer)
void emit_change (change::pointer)
void emit_change_but1 (change::pointer)
void emit_change_uuid_href (change::pointer, const nstring &, const nstring &, const nstring &)
const char * http_script_name (void)
void emit_project_href (project *pp)
void emit_project_href (project *pp, const char *modifier,...)
void emit_change_href (change::pointer cp, const char *modifier)
void emit_change_href_n (project *pp, long change_number, const char *modifier)
void emit_file_href (change::pointer cp, const nstring &filename, const char *modifier)
void emit_file_href (change::pointer cp, string_ty *filename, const char *modifier)
void emit_rect_image (int width, int height, const char *label, int hspace=-1)
void emit_rect_image_rgb (int width, int height, const char *color, int hspace=-1)
bool modifier_test (string_list_ty *modifiers, const char *name)
bool modifier_test_and_clear (string_list_ty *modifiers, const char *name)
void emit_rss_icon_with_link (project *pp, const nstring &rss_filename)
void emit_rss_meta_data (project *pp, const nstring &rss_filename)
nstring http_sanitize_content_type (const nstring &content_type)

Variables

bool http_fatal_noerror

Define Documentation

#define HISTOGRAM_HEIGHT   12

Definition at line 262 of file http.h.

#define HISTOGRAM_WIDTH   120

Definition at line 263 of file http.h.


Enumeration Type Documentation

Enumerator:
http_error_continue 
http_error_switching_protocols 
http_error_ok 
http_error_created 
http_error_accepted 
http_error_non_authoritative_information 
http_error_no_content 
http_error_reset_content 
http_error_partial_content 
http_error_multiple_choices 
http_error_moved_permanently 
http_error_moved_temporarily 
http_error_see_other 
http_error_not_modified 
http_error_use_proxy 
http_error_bad_request 
http_error_unauthorized 
http_error_payment_required 
http_error_forbidden 
http_error_not_found 
http_error_method_not_allowed 
http_error_not_acceptable 
http_error_proxy_authentication_required 
http_error_request_time_out 
http_error_conflict 
http_error_gone 
http_error_length_required 
http_error_precondition_failed 
http_error_request_entity_too_large 
http_error_request_url_too_large 
http_error_unsupported_media_type 
http_error_internal_server 
http_error_not_implemented 
http_error_bad_gateway 
http_error_out_of_resources 
http_error_gateway_time_out 
http_error_version_not_supported 

Definition at line 32 of file http.h.


Function Documentation

The emit_change function is used to emit the project name and change number cross linked to all of the relevant pages. This is used in web page headings.

The emit_change function is used to emit the project name and change number cross linked to all of the relevant pages, except the last element. This is used in web page headings.

void emit_change_href ( change::pointer  cp,
const char *  modifier 
)

The emit_change_href function is used to print the leading portion of a change reference.

void emit_change_href_n ( project pp,
long  change_number,
const char *  modifier 
)

The emit_change_href_n function is used to print the leading portion of a change reference, with an explict change number.

void emit_change_uuid_href ( change::pointer  ,
const nstring ,
const nstring ,
const nstring  
)
void emit_file_href ( change::pointer  cp,
const nstring filename,
const char *  modifier 
)

The emit_file_href function is used to print the leading portion of a file reference.

Parameters:
cpThe change to work within.
filenameThe name of the file being linked.
modifierextra equery elements
void emit_file_href ( change::pointer  cp,
string_ty filename,
const char *  modifier 
)

The emit_file_href function is used to print the leading portion of a file reference.

Parameters:
cpThe change to work within.
filenameThe name of the file being linked.
modifierextra equery elements
Note:
This function will be DEPRECATED one day
void emit_project_href ( project pp)

The emit_project_href function is used to print the leading portion of a project reference.

void emit_project_href ( project pp,
const char *  modifier,
  ... 
)
void emit_rect_image ( int  width,
int  height,
const char *  label,
int  hspace = -1 
)

The emit_rect_image function is used to print an <img> of a rectangle, use for drawing histograms.

Parameters:
widthThe width of the image
heightThe height of the image
labelThe label to write on the rectangle
hspaceThe horizontal space desired around the image.
void emit_rect_image_rgb ( int  width,
int  height,
const char *  color,
int  hspace = -1 
)

The emit_rect_image_rgb function is used to print an <img> of a rectangle, use for drawing histograms, of s specific color.

Parameters:
widthThe width of the rectangle image
heightThe height of the rectangle image
colorThe color of the rectangle image
hspaceThe horizontal spacing to add around the rectangle image.
void emit_rss_icon_with_link ( project pp,
const nstring rss_filename 
)

Insert an RSS icon image and link it to an RSS feed file.

Parameters:
ppThe project details.
rss_filenameThe file name of the RSS feed file. Not the full path.
void emit_rss_meta_data ( project pp,
const nstring rss_filename 
)

Print RSS-related meta data.

Parameters:
ppThe project details.
rss_filenameThe file name of the RSS feed file. Not the full path.
void html_encode_charstar ( const char *  )
void html_encode_string ( const nstring )
void html_escape_charstar ( const char *  )
void html_escape_string ( const nstring )
void html_footer ( project ,
change::pointer   
)

The html_footer function is used to emit the final page footer, including date and version.

The "html:body-end" attributes are inserted at this point.

void html_header ( project ,
change::pointer   
)

The html_header function is used to emit the initial portion of a HTML file, for the necessary meta attrributes and style sheet information.

The "html:meta" attributes are inserted at this point.

void html_header_ps ( project ,
change::pointer   
)

The html_header_os function is used to emit the "html:body-begin" attributes.

void http_fatal ( http_error_t  oops,
const char *  fmt,
  ... 
)
const char* http_getenv ( const char *  )
nstring http_sanitize_content_type ( const nstring content_type)

The http_sanitize_content_type function is used to turn "text/whatever" content types into "test/plain" content types, except "text/html". Other content types are passed through unchanged.

Parameters:
content_typeThe content-type to clean up
Returns:
text/plain for most text types, otherwise unchanged
const char* http_script_name ( void  )

The http_script_name is used to obtainb the value sof the SCRIPT_NAME environment variable. This is necessary for web pages which need to refer to other web pages generated by the same script.

bool modifier_test ( string_list_ty modifiers,
const char *  name 
)

The modifier_test_and_clear function may be used to look for the named modifier in the modifier list.

Parameters:
modifiersThe modifiers specified for this web page GET.
nameThe name of the modifier to look for.
Returns:
true if the modifier is present, false if not
bool modifier_test_and_clear ( string_list_ty modifiers,
const char *  name 
)

The modifier_test_and_clear function may be used to look for the named modifier in the modifier list. The modifier will be premoved if it is found.

Parameters:
modifiersThe modifiers specified for this web page GET.
nameThe name of the modifier to look for.
Returns:
true if the modifier is present, false if not

Variable Documentation