Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

MIMEtypeXML Class Reference

List of all members.

Public Member Functions

int addExt (const char *)
int addMime (const char *)
void clear ()
int getCmd (int)
const char * getManager (int)
int getType (int)
int load (const char *)
int load_core (XmlParser &)
int loadMemBuf (MemBuf &)
void populateExt (Fl_Browser *)
void populateMime (Fl_Choice *)
void removeExt (int)
int save (const char *)
int save_core (XmlParser &)
int saveMemBuf (MemBuf &)
void setCmd (int, int)
void setManager (int, const char *)
void setType (int, int)
 ~MIMEtypeXML ()

Private Member Functions

void ClearExt ()
void DeleteMimeNode (MimeNode *)

Private Attributes

Vector Ext
Vector Mime

Detailed Description

Loads and saves the MIME type configuration and manipulate the data.


Constructor & Destructor Documentation

MIMEtypeXML::~MIMEtypeXML  ) 
 

Constructor.


Member Function Documentation

int MIMEtypeXML::addExt const char *  name  ) 
 

Adds an ext name to the ext list. If the ext given in name is already in the list, just return the location in the list. Otherwise add the ext name and return the location in the list.

int MIMEtypeXML::addMime const char *  name  ) 
 

Adds a MIME type to the MIME list. If the MIME given in name is already in the list, just return the location in the list. Otherwise add the ext name and return the location in the list.

void MIMEtypeXML::clear  ) 
 

Clear all memory.

void MIMEtypeXML::ClearExt  )  [private]
 

Clear the ext list.

void MIMEtypeXML::DeleteMimeNode MimeNode Node  )  [private]
 

Remove a MIME type. Take a pointer to the MIME type node.

int MIMEtypeXML::getCmd int  extNumber  ) 
 

Gets the cgi command type of the ext. Takes the location number of the ext and returns the command type number. (see mimetype.h)

const char * MIMEtypeXML::getManager int  extNumber  ) 
 

Gets the cgi manager of the ext. Takes the location number of the ext and returns a pointer to an internal string of the manager with compleat path.

int MIMEtypeXML::getType int  extNumber  ) 
 

Gets the MIME type of the ext. Takes the location number of the ext and returns the MIME location number.

int MIMEtypeXML::load const char *  filename  ) 
 

Load the MIME types configuration file. Returns -1 on error.

int MIMEtypeXML::load_core XmlParser parser  ) 
 

Load the values from xml data. Copied and modified from mime_manager.cpp Only returns 0.

int MIMEtypeXML::loadMemBuf MemBuf buffer  ) 
 

Load the MIME types configuration from memory. returns -1 on error.

void MIMEtypeXML::populateExt Fl_Browser *  o  ) 
 

Populate the list box in the interface with the ext names. Takes a pointer to the Fl_Browser FLTK class.

void MIMEtypeXML::populateMime Fl_Choice *  o  ) 
 

Populate the slection box in the interface with the MIME types. Takes a pointer to the Fl_Choice FLTK class.

void MIMEtypeXML::removeExt int  extNumber  ) 
 

Removes an ext from the list. Takes the location number in the list.

int MIMEtypeXML::save const char *  filename  ) 
 

Save the MIME types configuration to file. Returns negative on error.

int MIMEtypeXML::save_core XmlParser xmlFile  ) 
 

Save the MIME types configuration to xml data. Returns negative on error.

int MIMEtypeXML::saveMemBuf MemBuf buffer  ) 
 

Save the MIME types configuration to a memory buffer. Returns negative on error.

void MIMEtypeXML::setCmd int  extNumber,
int  cmdNumber
 

Sets the command type of the ext. extNumber is the location number of the ext. cmdNumber is the enum of the command. See mimetype.h

void MIMEtypeXML::setManager int  extNumber,
const char *  name
 

Sets the cgi manager for the ext. extNumber is the location number of the ext. name is the compleate path and exe name of the manager.

void MIMEtypeXML::setType int  extNumber,
int  mimeNumber
 

Sets an ext to a MIME type. extNumber is the location number of the ext. mimeNumber is the location number of the MIME type.


Member Data Documentation

Vector MIMEtypeXML::Ext [private]
 

Vector MIMEtypeXML::Mime [private]
 


Generated on Mon Jun 16 13:47:19 2008 for MyServer by  doxygen 1.3.9.1