html.c File Reference

Parse HTML CGI POST data and other CGI routines. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <time.h>
#include "log.h"
#include "hlrmisc.h"
#include "format.h"
#include "linestream.h"
#include "html.h"

Go to the source code of this file.

Functions

char * cgiConstructCookie (char *name, char *value, int lifelength)
 Construct a string for a transient or permanent cookie.
void cgiDecodeWord (Stringa a)
 URL-decodes a string.
void cgiDomainSet (char *domain)
 Set the domain to be used in the next cookie to be constructed.
void cgiEncodeWord (char *s, Stringa a)
 Encode string for use in a URL.
void cgiEncodingSet (char *charset)
 Sets the character set specification which is written into the cgi header.
void cgiExpiresSet (int seconds_valid)
 Sets the lifetime of the next html page to be constructed.
char * cgiGet2Post (void)
 Enables access to data generated by method GET via cgiGetNextPair().
void cgiGet2PostReset (void)
 Allows to use the function cgiGetNextPair() after cgiGet2Post() was called, by resetting the CGI buffer.
char * cgiGetByName (char *name)
 Get and return value of name from POST.
char * cgiGetByNameM (char *name)
 Like cgiGetByName(), but die()s if field not found (M = mandatory).
void cgiGetF (char *fieldName, Stringa value)
 Like cgiGetFo, but field's existence is mandatory.
int cgiGetFo (char *fieldName, Stringa value)
 Optionally get next field from form.
void cgiGetInit (void)
char * cgiGetNext (Stringa value)
 Get the name and value of the next form field.
int cgiGetNextPair (int *first, Array item, Array value)
 Provides the next item/value pair.
void cgiHeader (char *mimeType)
 Print html header of type, but only if running under WWW.
void cgiHeaderCookie (char *mimeType, char *cookieSpec)
 Like cgiHeader, but include a cookie for transmission to the client.
int cgiHeaderIsPrinted (void)
void cgiInit (void)
 Initialize the CGI module.
int cgiIsCGI (void)
void cgiMpDeinit (void)
 Deinitialize multi-part module and release all temporarily allocated resources.
void cgiMpInit (void)
 Initialize module for reading multi-part forms.
int cgiMpNext (Stringa item, Array value, Stringa filename, Stringa contentType)
 Returns next item/value pair plus optional information for file upload.
void cgiMpReset (void)
 Reset multi-part reading to first part.
char * cgiReadCookie (char *name)
 If the current process is a CGI process and received a cookie from the client, the cookie is examined for a parameter called 'name', whose value is extracted and returned.
void cgiRedirSet (char *url)
 Instruct the next cgiHeader call to immediately redirect the browser to address 'url'.
void cgiURLAdd (char *param)
 Add parameter to URL currently under construction.
void cgiURLAddInt (int param)
 Add integer parameter to url currently under construction.
void cgiURLAddNV (char *name, char *value)
 Add name-value pair to url currently under construction.
void cgiURLCreate (char *host, int port, char *program)
void cgiURLCreate2 (char *cgiServerUrl, char *program)
char * cgiURLGet (void)
void html_appletParam (char *name, char *value)
 Include a parameter to an open applet tag.
void html_appletTagClose (void)
void html_appletTagOpen (FILE *fp, char *jarFileUrls, char *appletClass, int width, int height)
 Construct html that will start a java applet under Internet Explorer and in case this is not possible, show a suitable diagnostic message to the user.
char * html_clink3 (char *class, char *method, char *p1, char *p2, char *p3)
 Construct parameterized URL to the program set in html_URLSet() (c for CGI).
void html_encode (char *inText, Array outText, int withExceptions)
 HTML-encode HTML-special chars.
char * html_encodeS (char *s)
 Like html_encode(), but manages the buffer.
void html_hlink3 (char *class, char *method, char *label, char *p1, char *p2, char *p3)
 Construct a parameterized hyperlink to the program set in html_URLSet() (h for hyperlink).
void html_printGenericStyleSheet (int bodyFontSize)
 Print a generic style sheet.
char * html_tab2table (char *tab, int firstLineIsHeader, int borderWidth, int withMarkup)
 Converts tab delimited ASCII data into HTML tables.
char * html_text2tables (char *tab, int firstLineIsHeader, int borderWidth, int withMarkup)
 Like html_tab2table(), but allows for several tables separted by lines not containing a tab character.
int html_uniqueIntGet (void)
 Generate an integer that is unique for this process.
void html_URLOptSet (char *option)
 Sets optional argument to be added to the URL.
void html_URLSet (char *host, int port, char *program)
 Fix URL parts for subsequent calls to html_hlink() and html_clink().
void html_URLSet2 (char *cgiServerUrl, char *program)
 Same function as html_URLSet(), but different interface.
void html_webstartAddArg (char *arg)
void html_webstartAddJar (char *jar)
void html_webstartClose (void)
 Must be called to finish writing the jnlp XML.
void html_webstartOpen (FILE *fp, char *codebase, char *title, char *homepage, char *description, char *icon, int allPermissions, char *heap, char *mainClass)


Detailed Description

Parse HTML CGI POST data and other CGI routines.

Author:
Adapted by Lukas Habegger (lukas.habegger@yale.edu)

Definition in file html.c.


Function Documentation

char* cgiConstructCookie ( char *  name,
char *  value,
int  lifelength 
)

Construct a string for a transient or permanent cookie.

The returned string can be used in cgiHeaderCookie().

Parameters:
[in] name Name of the cookie for use in cgiReadCookie
[in] value Value to be stored
[in] lifelength 0 : transient cookie (bound to browser process), >0 : go to disk and stay there for 'lifelength' seconds, <0 : delete this cookie
Returns:
Pointer to constructed text; this memory may be modified but not free'd nor realloc'ed by the caller of this routine. Stable until next call to this routine

Definition at line 140 of file html.c.

void cgiDecodeWord ( Stringa  a  ) 

URL-decodes a string.

Parameters:
[in] a Array of char, null-terminated
[out] a Modified. Encoded hex characters are turned into their ascii equivalents, and +'s are turned back into spaces.

Definition at line 84 of file html.c.

void cgiDomainSet ( char *  domain  ) 

Set the domain to be used in the next cookie to be constructed.

Parameters:
[in] domain Domain name, or NULL to quit setting a domain e.g. ".roche.com"
Postcondition:
cgiConstructCookie() will add the domain spec

Definition at line 123 of file html.c.

void cgiEncodeWord ( char *  s,
Stringa  a 
)

Encode string for use in a URL.

Parameters:
[in] s Null-terminated string
[in] a Array of char (must exist)
[out] a With URL-conform translation of s

Definition at line 575 of file html.c.

void cgiEncodingSet ( char *  charset  ) 

Sets the character set specification which is written into the cgi header.

Parameters:
[in] charset Character set, e.g. "iso-8859-1", "utf-8", ... If NULL, no character set specification is written into the cgi header.
Precondition:
cgiHeader() has not yet been called
Postcondition:
cgiHeader() will set the character set specification

Definition at line 794 of file html.c.

void cgiExpiresSet ( int  seconds_valid  ) 

Sets the lifetime of the next html page to be constructed.

Parameters:
[in] seconds_valid If a WWW browser directed back to a page visited before it has the choice to load the page from its cache or retrieve it from the HTTP server. 'seconds_valid' decides that choice: if the more than 'seconds_valid' seconds have passed, the browser is forced to reload the page; else it can get if from its cache. 0 for 'seconds_valid' is OK.
Precondition:
cgiHeader() has not yet been called
Postcondition:
cgiHeader() will set an expires-flag
Note:
Uses a standard HTTP 1.0 protocol feature that should work everywhere

Definition at line 764 of file html.c.

char* cgiGet2Post ( void   ) 

Enables access to data generated by method GET via cgiGetNextPair().

The data generated by method POST is not accessible after this call.

Returns:
Pointer to value of 'QUERY_STRING' or NULL
Precondition:
None
Postcondition:
If 'QUERY_STRING' is defined, cgiGetNextPair() can be called on name/value pairs of 'QUERY_STRING' (method GET), but not on name/value pairs of stdin (method POST) anymore until you call cgiGet2PostReset() afterwards.

Definition at line 347 of file html.c.

void cgiGet2PostReset ( void   ) 

Allows to use the function cgiGetNextPair() after cgiGet2Post() was called, by resetting the CGI buffer.

Call this function directly after using cgiGet2Post().

Definition at line 368 of file html.c.

char* cgiGetByName ( char *  name  ) 

Get and return value of name from POST.

Parameters:
[in] name Name of item posted
Returns:
NULL if no item named 'name' found, else pointer to value associated with 'name'
Note:
The memory returend is managed by this routine. The user may change it, but not free or realloc it. The value returned is stable until the next call to this routine

Definition at line 500 of file html.c.

int cgiGetFo ( char *  fieldName,
Stringa  value 
)

Optionally get next field from form.

Abort if field is not named according to 'fieldName'.

Parameters:
[in] value Array of char, null-terminated, must exist
[in] fieldName Name of expected field
[out] value Contains field contents, if 1 returned, else contains an empty string
Returns:
1 if field read, 0 if there was no field to read
Note:
Usage: implicitly calls cgiGetNextPair() -- beware when using cgiGetFo() and cgiGetNextPair() in the same process.

Can be used only for one form within one process; there is no way to reset and read the next form.

Definition at line 541 of file html.c.

void cgiGetInit ( void   ) 

Precondition:
Running in a CGI
Postcondition:
cgiGetNext() can be called and will return the first field of the POSTed data, if any

Definition at line 462 of file html.c.

char* cgiGetNext ( Stringa  value  ) 

Get the name and value of the next form field.

Parameters:
[in] value Existing Stringa
Returns:
Name of field, NULL if no more field;
Note:
The memory returned is managed by this routine; it may be written to, but not free'd or realloc'd by the user; it stays stable until the next call to this routine.
Parameters:
[out] value Filled with contents of field; contents undefined if no more field
Precondition:
successful cgiGetInit() or cgiGetNext()
Postcondition:
Next call to cgiGetNext() returns next form field
Note:
cgiGetInit/cgiGetNext do not add functionality to the basic routine cgiGetNextPair() but are usually more convenient to use.

Definition at line 481 of file html.c.

int cgiGetNextPair ( int *  first,
Array  item,
Array  value 
)

Provides the next item/value pair.

  usage:
    int first = 1 ;
    Array item  = arrayCreate(10, char) ;
    Array value = arrayCreate(10, char) ;
    while (cgiGetNextPair(&first,item,value)) { ... }
  
This function is the basis for all other calls here to read from a form (cgiGetNext/cgiGetInit, cgiGetF, cgiGetFo, cgiGetByName) This function is necessary, all the others are convenience

Definition at line 387 of file html.c.

void cgiHeader ( char *  mimeType  ) 

Print html header of type, but only if running under WWW.

Print only once during a process. The behaviour of this function can be customized by cgiRedirSet(), cgiEncodingSet() and cgiExpiresSet()

Parameters:
[in] mimeType If NULL, text/html is assumed, if empty string, do not print header and prevent die, warn etc. to print header (useful if header has been printed outside of this process)
Precondition:
gHeaderDestination is set (where to write the header)

Definition at line 812 of file html.c.

void cgiHeaderCookie ( char *  mimeType,
char *  cookieSpec 
)

Like cgiHeader, but include a cookie for transmission to the client.

Precondition:
cgiHeader() has not yet been called. If it was called before, cgiHeaderCookie() has no effect

Definition at line 860 of file html.c.

int cgiHeaderIsPrinted ( void   ) 

Returns:
1 if cgiHeader is printed, 0 otherwise

Definition at line 875 of file html.c.

void cgiInit ( void   ) 

Initialize the CGI module.

Within a CGI program, this function should be called as early as possible. cgiInit ensures that error messages generated by die() and warn() will output a cgi header, if this has not yet happened. This makes sure that die/warn in lower level routines (e.g. from this library) will not result in a "server error" message displayed in the user's browser.

Definition at line 302 of file html.c.

int cgiIsCGI ( void   ) 

Returns:
1, if process is a CGI program called by the HTTP deamon, 0 otherwise

Definition at line 740 of file html.c.

void cgiMpDeinit ( void   ) 

Deinitialize multi-part module and release all temporarily allocated resources.

Precondition:
Module initialized
Postcondition:
Module not initialized
Note:
Important to use if some parts are files which can be VERY LARGE

Definition at line 1728 of file html.c.

void cgiMpInit ( void   ) 

Initialize module for reading multi-part forms.

Note:
These forms MUST have ENCTYPE="multipart/form-data"
Precondition:
mp not initialized
Postcondition:
mp initialized, other cgiMp... functions can be called
  Example call sequence:
  cgiMpInit();
  while (cgiMpNext(a, b, c, d))
  ...
  cgiMpReset();
  while (cgiMpNext(a, b, c, d))
  ...
  cgiMpDeinit();
        
  deinitialization may be crucial e.g. if VERY LARGE files are read
  
  since these functions are reading from stdin initialization will 
  be allowed only once; but contents can be read multiple times by 
  using cgiMpReset()
  

Definition at line 1559 of file html.c.

int cgiMpNext ( Stringa  item,
Array  value,
Stringa  filename,
Stringa  contentType 
)

Returns next item/value pair plus optional information for file upload.

Parameters:
[in] item Stringa to store item name in, must not be NULL
[in] value Array of char* to store item value in, must not be NULL
[in] filename Stringa to store filename in if any; may be NULL if not interested
[in] contentType Stringa to store content MIME type in; may be NULL if not interested
[out] item Name of the item read
[out] value Value of the item; a Stringa if form data or a text file; binary buffer (no trailing null-termination character) when data from a binary file
[out] filename The filename if value is from a file, an empty string "" if value is not from a file but a form field.
[out] contentType MIME type of content; empty ("") if form data or a text file (MIME type="text/plain"); a binary file else.
Returns:
0 if all items used up, 1 else
Precondition:
Module initialized: cgiMpInit()

Definition at line 1609 of file html.c.

void cgiMpReset ( void   ) 

Reset multi-part reading to first part.

Precondition:
Module initialized, 0 - all parts have been read
Postcondition:
Ready for reading from first part again

Definition at line 1712 of file html.c.

char* cgiReadCookie ( char *  name  ) 

If the current process is a CGI process and received a cookie from the client, the cookie is examined for a parameter called 'name', whose value is extracted and returned.

Parameters:
[in] name Name of the cookie whose value is the be returned
Returns:
Pointer to value of cookie named 'name' if available; else 0
Note:
This memory may be modified but not free'd nor realloc'ed by the caller of this routine it is kept stable until the next call to cgiReadCookie()

Definition at line 185 of file html.c.

void cgiRedirSet ( char *  url  ) 

Instruct the next cgiHeader call to immediately redirect the browser to address 'url'.

This is usefull for setting a cookie and redirecting at the same time.

Definition at line 779 of file html.c.

void cgiURLAdd ( char *  param  ) 

Add parameter to URL currently under construction.

Parameters:
[in] param Null-terminated string
Precondition:
Last call was cgiURLCreate(), cgiURLCreate(), cgiURLAdd(), or cgiURLAddInt()
Postcondition:
cgiURLGet() will return URL with param included

Definition at line 667 of file html.c.

void cgiURLAddInt ( int  param  ) 

Add integer parameter to url currently under construction.

Parameters:
[in] param Number to be added
Precondition:
Last call was cgiURLCreate(), cgiURLCreate2(), cgiURLAdd(), or cgiURLAddInt()
Postcondition:
cgiURLGet() will return URL with param included

Definition at line 709 of file html.c.

void cgiURLAddNV ( char *  name,
char *  value 
)

Add name-value pair to url currently under construction.

Parameters:
[in] name Null-terminated string
[in] value Null-terminated string
Precondition:
Last call was cgiURLCreate(), cgiURLCreate2(), or cgiURLAddNV()
Postcondition:
cgiURLGet() will return URL with param included

Definition at line 686 of file html.c.

void cgiURLCreate ( char *  host,
int  port,
char *  program 
)

Parameters:
[in] host e.g. bioinfo.bas.roche.com
[in] port e.g. 8080, 0 means no port
[in] program e.g. /htbin/fetch_noform.cgi
Precondition:
none
Postcondition:
cgiURLAdd(), cgiURLAddNV() cgiURLAddInt and cgiURLGet() can be called
Note:
Typycial sequence of calls: cgiURLCreate() -- cgiURLAdd() -- cgiURLAddInt() -- cgiURLGet() -- cgiURLCreate() ...

Definition at line 616 of file html.c.

void cgiURLCreate2 ( char *  cgiServerUrl,
char *  program 
)

Parameters:
[in] cgiServerUrl e.g. "http://bioinfo:8080/htbin"
[in] program e.g. fetch_noform or NULL (if NULL, then only cgiServerUrl is used)
Precondition:
none
Postcondition:
cgiURLAdd() and cgiURLGet() can be called
Note:
Typycial sequence of calls: cgiURLCreate2() -- cgiURLAdd() -- cgiURLAdd() -- cgiURLGet() -- cgiURLCreate2() ...

This is an alternative to cgiURLCreate, in case you already have an URL stub.

Definition at line 646 of file html.c.

char* cgiURLGet ( void   ) 

Returns:
URL constructed. The memory is managed by this routine. It may by written to, but not free'd or realloc'd by the caller of this this routine. It contents stay stable until the next call to cgiURLCreate() or cgiURLCreate2()
Precondition:
Last call was cgiURLCreate(), cgiURLCreate2(), cgiURLAdd(), cgiURLAddNV(), or cgiURLAddInt(). For calling sequence see cgiURLCreate())
Postcondition:
Next allowed functions are cgiURLCreate(), cgiURLCreate2() or repeated calls of cgiURLGet()

Definition at line 726 of file html.c.

void html_appletParam ( char *  name,
char *  value 
)

Include a parameter to an open applet tag.

Parameters:
[in] name Cannot be NULL
[in] value Can be NULL
Precondition:
html_appletTagOpen()

Definition at line 1321 of file html.c.

void html_appletTagClose ( void   ) 

Precondition:
html_appletTagOpen()
Postcondition:
HTML closing applet tag has been printed html_appletTagOpen() can be called again

Definition at line 1338 of file html.c.

void html_appletTagOpen ( FILE *  fp,
char *  jarFileUrls,
char *  appletClass,
int  width,
int  height 
)

Construct html that will start a java applet under Internet Explorer and in case this is not possible, show a suitable diagnostic message to the user.

Parameters:
fp Output destination, e.g. stdout
jarFileUrls Example: "http://bioinfo.bas.roche.com:8080/apps/humangenome/genomeviewer.jar" (separate several JARs with ',' (comma))
appletClass Example: GenomeApplet.class
width In pixels
height In pixels
Postcondition:
HTML for loading applet has been printed; html_appletParam() and html_appletTagClose() can be called

Definition at line 1282 of file html.c.

char* html_clink3 ( char *  class,
char *  method,
char *  p1,
char *  p2,
char *  p3 
)

Construct parameterized URL to the program set in html_URLSet() (c for CGI).

Precondition:
html_URLSet() was called

Definition at line 956 of file html.c.

void html_encode ( char *  inText,
Array  outText,
int  withExceptions 
)

HTML-encode HTML-special chars.

 There are three operating modes: 
  - standard: 'inText' is assumed to be non-HTML; every HTML-special char
    is encoded. This mode is turned on by setting 'withExceptions' to 0;
  - a "half-HTML-mode": assume the text is non-HTML,
    except for hyperlinks (<a href>) and the two basic
    formatting markups <b> and <em>
    this mode is turned on by setting 'withExceptions' to 1
    and 'inText' IS NOT starting with "<html>"
  - a full HTML-mode
    'inText' is treated as being already in HTML format --
    i.e. this routine just copies the 'inText' to 'outText' without change;
    this mode is turned on by setting 'withExceptions' to 1
    and 'inText' starts with "<html>"
  
Parameters:
[in] inText Original text to be encoded
[in] outText Array of char, null-terminated
[in] withExceptions If 1, then exceptions are left alone, else every special char is encoded
[out] outText Filled with encoded version of 'inText'

Definition at line 1010 of file html.c.

char* html_encodeS ( char *  s  ) 

Like html_encode(), but manages the buffer.

Note:
Things like printf("%s %s", html_encodeS(s1), html_encodeS(s2)) don't work because there is only one buffer.

Definition at line 1100 of file html.c.

void html_hlink3 ( char *  class,
char *  method,
char *  label,
char *  p1,
char *  p2,
char *  p3 
)

Construct a parameterized hyperlink to the program set in html_URLSet() (h for hyperlink).

Precondition:
html_URLSet() was called

Definition at line 981 of file html.c.

void html_printGenericStyleSheet ( int  bodyFontSize  ) 

Print a generic style sheet.

This should be enclosed within the head tags.

Definition at line 1748 of file html.c.

char* html_tab2table ( char *  tab,
int  firstLineIsHeader,
int  borderWidth,
int  withMarkup 
)

Converts tab delimited ASCII data into HTML tables.

Parameters:
[in] tab Buffer containing data; new-line charater delimites rows, tab character separates items within a row; HTML options can be included in the TD or TH tags: these options must be enclosed by backslash characters and occur directly at the beginning of an item
[in] firstLineIsHeader If 1, for the first non-empty line TH tags will be used
[in] borderWidth 0 means no border
[in] withMarkup 1 to parse for \... at the beginning of each field, 0 to output each field unchanged
[out] tab Contents destroyed
Returns:
A buffer containing an HTML formatted table; read/write access OK; memory managed by this routine.
  Example:

  "Name \t Age \n
  Adam \t 45 \n
  Eva \t\bgcolor=red\ 42 \n"
  
  would be transformed into (assuming firstLineIsHeader==1, withMarkup==1)
  
  <table border=0>
  <tr><th>Name</th><th>Age</th></tr>\n
  <tr><td>Adam</td><td>45</td></tr>\n
  <tr><td>Eva</td><td bgcolor=red>42</td></tr>\n
  </table>
  

Definition at line 1158 of file html.c.

char* html_text2tables ( char *  tab,
int  firstLineIsHeader,
int  borderWidth,
int  withMarkup 
)

Like html_tab2table(), but allows for several tables separted by lines not containing a tab character.

Inputs: same as for html_text2tables() Output: contents of 'tab' destroyed

Returns:
A buffer containing an HTML formatted table; read/write access OK; memory managed by this routine.
Note:
Input format: one or more table sections can be embedded in normal text; the beginning and end of these sections is determined automatically (lines in tables contain at least one tab);
  Example:

  "This is just ordinary text\n
  The table starts in the next line\n
  Name \t Age \n
  Adam \t 45 \n
  Eva \t\bgcolor=red\ 42 \n
  This is a footer"
  
  would be transformed into (assuming firstLineIsHeader==1, withMarkup==1)
  
  "This is just ordinary text<br>\n
  The table starts in the next line<br>\n
  <table border=0>
  <tr><th>Name</th><th>Age</th></tr>\n
  <tr><td>Adam</td><td>45</td></tr>\n
  <tr><td>Eva</td><td bgcolor=red>42</td></tr>\n
  </table>
  This is a footer<br>"
 

Definition at line 1231 of file html.c.

int html_uniqueIntGet ( void   ) 

Generate an integer that is unique for this process.

   Typcial usage: 
    printf("<a href=\"http://adr\" target=%d>", html_uniqueIntGet()) ;
    This will make the browser to open a new window when the user clicks the hyperlink
    

Definition at line 1123 of file html.c.

void html_URLOptSet ( char *  option  ) 

Sets optional argument to be added to the URL.

Parameters:
[in] option Can also be NULL, can be changed after this function has been called without affecting the postcondition
Precondition:
html_URLSet
Postcondition:
html_clink3() will insert 'option' as first parameter

Definition at line 943 of file html.c.

void html_URLSet ( char *  host,
int  port,
char *  program 
)

Fix URL parts for subsequent calls to html_hlink() and html_clink().

Inputs: like cgiURLCreate()

   Typical usage:
   html_URLSet("bioinfo.bas.roche.com", 8080, "/htbin/proteomiscgidev") ;
   printf("<FORM ACTION=%s METHOD=POST>\n", html_clink("login", "do")) ;
   html_hlink("menu", "display", "Goto Menu") ;
   

Definition at line 911 of file html.c.

void html_URLSet2 ( char *  cgiServerUrl,
char *  program 
)

Same function as html_URLSet(), but different interface.

Inputs: like cgiURLCreate2()

Definition at line 927 of file html.c.

void html_webstartAddArg ( char *  arg  ) 

Parameters:
[in] arg An argument of the application
Precondition:
Call after html_webstartOpen
Note:
Call this function for every argument used to invoke the application

Definition at line 1439 of file html.c.

void html_webstartAddJar ( char *  jar  ) 

Parameters:
[in] jar Name of a jar file
Precondition:
Call after html_webstartOpen
Note:
Call this function for every jar used by the application

Definition at line 1427 of file html.c.

void html_webstartOpen ( FILE *  fp,
char *  codebase,
char *  title,
char *  homepage,
char *  description,
char *  icon,
int  allPermissions,
char *  heap,
char *  mainClass 
)

Parameters:
[in] fp Where to write the XML text
[in] codebase Code base of JAVA application
[in] title Title of the application
[in] homepage Home page of the application (can be NULL)
[in] description Description of the application (can be NULL)
[in] icon Icon of the application (can be NULL)
[in] allPermissions Whether the application has all permissions (essentially whether it is signed)
[in] heap Will be used in the j2se tag: max-heap-size, e.g. 400m
[in] mainClass Main class of the application

Definition at line 1380 of file html.c.


Generated on Fri Aug 7 15:46:43 2009 for BIOS by  doxygen 1.5.7.1