PConfigSectionsPage Class Reference

`#include <httpsvc.h>`

Inheritance diagram for PConfigSectionsPage:

## Public Member Functions

| PConfigSectionsPage (PHTTPServiceProcess &app, const PURL &url, const PHTTPAuthority &auth, const PString &prefix, const PString &valueName, const PURL &editSection, const PURL &newSection, const PString &newTitle, PHTML &heading)
void | OnLoadedText (PHTTPRequest &, PString &text)
| This is called after the text has been loaded and may be used to customise or otherwise mangle a loaded piece of text. More...
PBoolean | OnPOST (PHTTPServer &server, const PURL &url, const PMIMEInfo &info, const PStringToString &data, const PHTTPConnectionInfo &connectInfo)
| Handle the POST command passed from the HTTP socket. More...
virtual PBoolean | Post (PHTTPRequest &request, const PStringToString &data, PHTML &replyMessage)
| Get a block of data (eg HTML) that the resource contains. More...
Public Member Functions inherited from PHTTPConfigSectionList
| PHTTPConfigSectionList (const PURL &url, const PHTTPAuthority &auth, const PString &sectionPrefix, const PString &additionalValueName, const PURL &editSection, const PURL &newSection, const PString &newSectionTitle, PHTML &heading)
Public Member Functions inherited from PHTTPString
| PHTTPString (const PURL &url)
| Contruct a new simple string resource for the HTTP space. More...
| PHTTPString (const PURL &url, const PHTTPAuthority &auth)
| PHTTPString (const PURL &url, const PString &str)
| PHTTPString (const PURL &url, const PString &str, const PString &contentType)
| PHTTPString (const PURL &url, const PString &str, const PHTTPAuthority &auth)
| PHTTPString (const PURL &url, const PString &str, const PString &contentType, const PHTTPAuthority &auth)
virtual PBoolean | LoadHeaders (PHTTPRequest &request)
| Get the headers for block of data (eg HTML) that the resource contains. More...
virtual PString | LoadText (PHTTPRequest &request)
| Get a block of text data (eg HTML) that the resource contains. More...
const PString & | GetString ()
| Get the string for this resource. More...
void | SetString (const PString &str)
| Set the string to be returned by this resource. More...
Public Member Functions inherited from PHTTPResource
virtual | ~PHTTPResource ()
const PURL & | GetURL () const
| Get the URL for this resource. More...
const PString & | GetContentType () const
| Get the current content type for the resource. More...
PHTTPAuthority * | GetAuthority () const
| Get the current authority for the resource. More...
void | SetAuthority (const PHTTPAuthority &auth)
| Set the current authority for the resource. More...
void | ClearAuthority ()
| Set the current authority for the resource to unrestricted. More...
DWORD | GetHitCount () const
| Get the current hit count for the resource. More...
void | ClearHitCount ()
virtual PBoolean | OnGET (PHTTPServer &server, const PURL &url, const PMIMEInfo &info, const PHTTPConnectionInfo &conInfo)
| Handle the GET command passed from the HTTP socket. More...
virtual PBoolean | OnGETData (PHTTPServer &server, const PURL &url, const PHTTPConnectionInfo &connectInfo, PHTTPRequest &request)
| Send the data associated with a GET command. More...
virtual PBoolean | OnHEAD (PHTTPServer &server, const PURL &url, const PMIMEInfo &info, const PHTTPConnectionInfo &conInfo)
| Handle the HEAD command passed from the HTTP socket. More...
virtual PBoolean | OnPOSTData (PHTTPRequest &request, const PStringToString &data)
| Send the data associated with a POST command. More...
virtual PBoolean | IsModifiedSince (const PTime &when)
| Check to see if the resource has been modified since the date specified. More...
virtual PHTTPRequest * | CreateRequest (const PURL &url, const PMIMEInfo &inMIME, const PMultiPartList &multipartFormInfo, PHTTPServer &socket)
| Create a new request block for this type of resource. More...
virtual void | SendData (PHTTPRequest &request)
| Send the data associated with a command. More...
virtual PBoolean | LoadData (PHTTPRequest &request, PCharArray &data)
| Get a block of data that the resource contains. More...
Public Member Functions inherited from PObject
virtual | ~PObject ()
virtual PObject * | Clone () const
| Create a copy of the class on the heap. More...
virtual PINDEX | HashFunction () const
| This function yields a hash value required by the `PDictionary` class. More...
virtual Comparison | Compare (const PObject &obj) const
| Compare the two objects and return their relative rank. More...
virtual Comparison | CompareObjectMemoryDirect (const PObject &obj) const
| Determine the byte wise comparison of two objects. More...
bool | operator== (const PObject &obj) const
| Compare the two objects. More...
bool | operator!= (const PObject &obj) const
| Compare the two objects. More...
bool | operator< (const PObject &obj) const
| Compare the two objects. More...
bool | operator> (const PObject &obj) const
| Compare the two objects. More...
bool | operator<= (const PObject &obj) const
| Compare the two objects. More...
bool | operator>= (const PObject &obj) const
| Compare the two objects. More...
virtual const char * | GetClass (unsigned ancestor=0) const
| Get the current dynamic type of the object instance. More...
PBoolean | IsClass (const char *cls) const
virtual PBoolean | InternalIsDescendant (const char *clsName) const
| Determine if the dynamic type of the current instance is a descendent of the specified class. More...
virtual void | PrintOn (ostream &strm) const
| Output the contents of the object to the stream. More...
virtual void | ReadFrom (istream &strm)
| Input the contents of the object from the stream. More...

## Protected Member Functions

virtual PBoolean | GetExpirationDate (PTime &when)
| Get a block of data (eg HTML) that the resource contains. More...
Protected Member Functions inherited from PHTTPResource
| PHTTPResource (const PURL &url)
| PHTTPResource (const PURL &url, const PHTTPAuthority &auth)
| PHTTPResource (const PURL &url, const PString &contentType)
| PHTTPResource (const PURL &url, const PString &contentType, const PHTTPAuthority &auth)
virtual PBoolean | CheckAuthority (PHTTPServer &server, const PHTTPRequest &request, const PHTTPConnectionInfo &conInfo)
| See if the resource is authorised given the mime info. More...
virtual PBoolean | OnGETOrHEAD (PHTTPServer &server, const PURL &url, const PMIMEInfo &info, const PHTTPConnectionInfo &conInfo, PBoolean isGet)
| common code for GET and HEAD commands More...
Protected Member Functions inherited from PObject
| PObject ()
| Constructor for PObject, made protected so cannot ever create one on its own. More...

## Protected Attributes

PHTTPServiceProcess & | process
Protected Attributes inherited from PHTTPConfigSectionList
PString | sectionPrefix
PString | additionalValueName
PString | newSectionLink
PString | newSectionTitle
PString | editSectionLink
Protected Attributes inherited from PHTTPString
PString | string
Protected Attributes inherited from PHTTPResource
PURL | baseURL
| Base URL for the resource, may accept URLS with a longer hierarchy. More...
PString | contentType
| MIME content type for the resource. More...
PHTTPAuthority * | authority
| Authorisation method for the resource. More...
volatile DWORD | hitCount
| COunt of number of times resource was accessed. More...

## Additional Inherited Members

Public Types inherited from PObject
enum | Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }
| Result of the comparison operation performed by the `Compare()` function. More...
Static Public Member Functions inherited from PObject
static Comparison | InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size)
| Internal function caled from CompareObjectMemoryDirect() More...
static const char * | Class ()
| Get the name of the class as a C string. More...
Static Protected Member Functions inherited from PHTTPResource
static PBoolean | CheckAuthority (PHTTPAuthority &authority, PHTTPServer &server, const PHTTPRequest &request, const PHTTPConnectionInfo &connectInfo)

## Constructor & Destructor Documentation

PConfigSectionsPage::PConfigSectionsPage | ( | PHTTPServiceProcess & | app,
|  | const PURL & | url,
|  | const PHTTPAuthority & | auth,
|  | const PString & | prefix,
|  | const PString & | valueName,
|  | const PURL & | editSection,
|  | const PURL & | newSection,
|  | const PString & | newTitle,
|  | PHTML & | heading
| ) |  |

## Member Function Documentation

virtual PBoolean PConfigSectionsPage::GetExpirationDate | ( | PTime & | when | ) |

protected virtual

Get a block of data (eg HTML) that the resource contains.

Returns
  Status of load operation.

Parameters

  when | Time that the resource expires

Reimplemented from PHTTPResource.

void PConfigSectionsPage::OnLoadedText | ( | PHTTPRequest & | request,
|  | PString & | text
| ) |  |

virtual

This is called after the text has been loaded and may be used to customise or otherwise mangle a loaded piece of text.

Typically this is used with HTML responses.

The default action for this function is to do nothing.

Reimplemented from PHTTPConfigSectionList.

PBoolean PConfigSectionsPage::OnPOST | ( | PHTTPServer & | server,
|  | const PURL & | url,
|  | const PMIMEInfo & | info,
|  | const PStringToString & | data,
|  | const PHTTPConnectionInfo & | conInfo
| ) |  |

virtual

Handle the POST command passed from the HTTP socket.

The default action is to check the authorisation for the resource and call the virtual `Post()` function to handle the data being received.

Returns
  true if the connection may persist, false if the connection must close If there is no ContentLength field in the response, this value must be false for correct operation.

Reimplemented from PHTTPResource.

virtual PBoolean PConfigSectionsPage::Post | ( | PHTTPRequest & | request,
|  | const PStringToString & | data,
|  | PHTML & | replyMessage
| ) |  |

virtual

Get a block of data (eg HTML) that the resource contains.

The default action for this function is to do nothing and return success.

Returns
  true if the connection may persist, false if the connection must close

Parameters

  request | Information on this request.
  data | Variables in the POST data.
  replyMessage | Reply message for post.

Reimplemented from PHTTPConfigSectionList.

## Member Data Documentation

PHTTPServiceProcess& PConfigSectionsPage::process

protected

The documentation for this class was generated from the following file:

- httpsvc.h