httpform.h
Go to the documentation of this file.
/*
* httpform.h
*
* Forms management using HTTP User Interface.
*
* Portable Windows Library
*
* Copyright (c) 1993-2002 Equivalence Pty. Ltd.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Portable Windows Library.
*
* The Initial Developer of the Original Code is Equivalence Pty. Ltd.
*
* Contributor(s): ______________________________________.
*
* $Revision: 24177 $
* $Author: rjongbloed $
* $Date: 2010-04-05 06:52:04 -0500 (Mon, 05 Apr 2010) $
*/
#ifndef PTLIB_HTTPFORM_H
#define PTLIB_HTTPFORM_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#if P_HTTPFORMS
#include <ptclib/http.h>
#include <ptclib/html.h>
// PHTTPField
class PHTTPField : public PObject
{
PCLASSINFO(PHTTPField, PObject)
public:
PHTTPField(
const char * bname, // base name (identifier) for the field.
const char * title, // Title text for field (defaults to name).
const char * help // Help text for the field.
);
// Create a new field in a HTTP form.
virtual Comparison Compare(
const PObject & obj
) const;
const PCaselessString & GetName() const { return fullName; }
const PCaselessString & GetBaseName() const { return baseName; }
virtual void SetName(
const PString & newName // New name for field
);
virtual const PHTTPField * LocateName(
const PString & name // Full field name to locate
) const;
const PString & GetTitle() const { return title; }
const PString & GetHelp() const { return help; }
void SetHelp(
const PString & text // Help text.
) { help = text; }
void SetHelp(
const PString & hotLinkURL, // URL for link to help page.
const PString & linkText // Help text in the link.
);
void SetHelp(
const PString & hotLinkURL, // URL for link to help page.
const PString & imageURL, // URL for image to be displayed in link.
const PString & imageText // Text in the link when image unavailable.
);
// Set the help text for the field.
virtual PHTTPField * NewField() const = 0;
virtual void ExpandFieldNames(PString & text, PINDEX start, PINDEX & finish) const;
// Splice expanded macro substitutions into text string
virtual void GetHTMLTag(
PHTML & html // HTML to receive the fields HTML tag.
) const = 0;
virtual PString GetHTMLInput(
const PString & input // Source HTML text for input tag.
) const;
virtual PString GetHTMLSelect(
const PString & selection // Source HTML text for input tag.
) const;
virtual void GetHTMLHeading(
PHTML & html // HTML to receive the field info.
) const;
virtual PString GetValue(PBoolean dflt = false) const = 0;
virtual void SetValue(
const PString & newValue // New value for the field.
) = 0;
virtual void LoadFromConfig(
PConfig & cfg // Configuration for value transfer.
);
virtual void SaveToConfig(
PConfig & cfg // Configuration for value transfer.
) const;
virtual PBoolean Validated(
const PString & newVal, // Proposed new value for the field.
PStringStream & msg // Stream to take error HTML if value not valid.
) const;
virtual void GetAllNames(PStringArray & names) const;
virtual void SetAllValues(
const PStringToString & data // New value for the field.
);
virtual PBoolean ValidateAll(
const PStringToString & data, // Proposed new value for the field.
PStringStream & msg // Stream to take error HTML if value not valid.
) const;
PBoolean NotYetInHTML() const { return notInHTML; }
void SetInHTML() { notInHTML = false; }
protected:
PCaselessString baseName;
PCaselessString fullName;
PString title;
PString help;
PBoolean notInHTML;
};
PARRAY(PHTTPFields, PHTTPField);
class PHTTPCompositeField : public PHTTPField
{
PCLASSINFO(PHTTPCompositeField, PHTTPField)
public:
PHTTPCompositeField(
const char * name, // Name (identifier) for the field.
const char * title = NULL, // Title text for field (defaults to name).
const char * help = NULL, // Help text for the field.
bool includeHeaders = false // Make a sub-table and put headers on HTML fields.
);
virtual void SetName(
const PString & name // New name for field
);
virtual const PHTTPField * LocateName(
const PString & name // Full field name to locate
) const;
virtual PHTTPField * NewField() const;
virtual void ExpandFieldNames(PString & text, PINDEX start, PINDEX & finish) const;
virtual void GetHTMLTag(
PHTML & html // HTML to receive the field info.
) const;
virtual PString GetHTMLInput(
const PString & input // Source HTML text for input tag.
) const;
virtual void GetHTMLHeading(
PHTML & html // HTML to receive the field info.
) const;
virtual PString GetValue(PBoolean dflt = false) const;
virtual void SetValue(
const PString & newValue // New value for the field.
);
virtual void LoadFromConfig(
PConfig & cfg // Configuration for value transfer.
);
virtual void SaveToConfig(
PConfig & cfg // Configuration for value transfer.
) const;
virtual void GetAllNames(PStringArray & names) const;
virtual void SetAllValues(
const PStringToString & data // New value for the field.
);
virtual PBoolean ValidateAll(
const PStringToString & data, // Proposed new value for the field.
PStringStream & msg // Stream to take error HTML if value not valid.
) const;
virtual PINDEX GetSize() const;
void Append(PHTTPField * fld);
PHTTPField & operator[](PINDEX idx) const { return fields[idx]; }
void RemoveAt(PINDEX idx) { fields.RemoveAt(idx); }
void RemoveAll() { fields.RemoveAll(); }
protected:
PHTTPFields fields;
bool m_includeHeaders;
};
class PHTTPSubForm : public PHTTPCompositeField
{
PCLASSINFO(PHTTPSubForm, PHTTPCompositeField)
public:
PHTTPSubForm(
const PString & subFormName, // URL for the sub-form
const char * name, // Name (identifier) for the field.
const char * title = NULL, // Title text for field (defaults to name).
PINDEX primaryField = 0, // Pimary field whove value is in hot link
PINDEX secondaryField = P_MAX_INDEX // Seconary field next to hotlink
);
PHTTPField * NewField() const;
void GetHTMLTag(PHTML & html) const;
void GetHTMLHeading(PHTML & html) const;
protected:
PString subFormName;
PINDEX primary;
PINDEX secondary;
};
class PHTTPFieldArray : public PHTTPCompositeField
{
PCLASSINFO(PHTTPFieldArray, PHTTPCompositeField)
public:
PHTTPFieldArray(
PHTTPField * baseField,
PBoolean ordered,
PINDEX fixedSize = 0
);
~PHTTPFieldArray();
virtual PHTTPField * NewField() const;
virtual void ExpandFieldNames(PString & text, PINDEX start, PINDEX & finish) const;
virtual void GetHTMLTag(
PHTML & html // HTML to receive the field info.
) const;
virtual void LoadFromConfig(
PConfig & cfg // Configuration for value transfer.
);
virtual void SaveToConfig(
PConfig & cfg // Configuration for value transfer.
) const;
virtual void SetAllValues(
const PStringToString & data // New value for the field.
);
virtual PINDEX GetSize() const;
void SetSize(PINDEX newSize);
PStringArray GetStrings(
PConfig & cfg
);
void SetStrings(
PConfig & cfg,
const PStringArray & values
);
protected:
void AddBlankField();
void AddArrayControlBox(PHTML & html, PINDEX fld) const;
void SetArrayFieldName(PINDEX idx) const;
PHTTPField * baseField;
PBoolean orderedArray;
PBoolean canAddElements;
};
class PHTTPStringField : public PHTTPField
{
PCLASSINFO(PHTTPStringField, PHTTPField)
public:
PHTTPStringField(
const char * name,
PINDEX size,
const char * initVal = NULL,
const char * help = NULL
);
PHTTPStringField(
const char * name,
const char * title,
PINDEX size,
const char * initVal = NULL,
const char * help = NULL
);
virtual PHTTPField * NewField() const;
virtual void GetHTMLTag(
PHTML & html
) const;
virtual PString GetValue(PBoolean dflt = false) const;
virtual void SetValue(
const PString & newVal
);
protected:
PString value;
PString initialValue;
PINDEX size;
};
class PHTTPPasswordField : public PHTTPStringField
{
PCLASSINFO(PHTTPPasswordField, PHTTPStringField)
public:
PHTTPPasswordField(
const char * name,
PINDEX size,
const char * initVal = NULL,
const char * help = NULL
);
PHTTPPasswordField(
const char * name,
const char * title,
PINDEX size,
const char * initVal = NULL,
const char * help = NULL
);
virtual PHTTPField * NewField() const;
virtual void GetHTMLTag(
PHTML & html
) const;
virtual PString GetValue(PBoolean dflt = false) const;
virtual void SetValue(
const PString & newVal
);
static PString Decrypt(const PString & pword);
};
class PHTTPDateField : public PHTTPStringField
{
PCLASSINFO(PHTTPDateField, PHTTPStringField)
public:
PHTTPDateField(
const char * name,
const PTime & initVal = PTime(0),
PTime::TimeFormat fmt = PTime::ShortDate
);
virtual PHTTPField * NewField() const;
virtual void SetValue(
const PString & newValue
);
virtual PBoolean Validated(
const PString & newValue,
PStringStream & msg
) const;
protected:
PTime::TimeFormat m_format;
};
class PHTTPIntegerField : public PHTTPField
{
PCLASSINFO(PHTTPIntegerField, PHTTPField)
public:
PHTTPIntegerField(
const char * name,
int low, int high,
int initVal = 0,
const char * units = NULL,
const char * help = NULL
);
PHTTPIntegerField(
const char * name,
const char * title,
int low, int high,
int initVal = 0,
const char * units = NULL,
const char * help = NULL
);
virtual PHTTPField * NewField() const;
virtual void GetHTMLTag(
PHTML & html
) const;
virtual PString GetValue(PBoolean dflt = false) const;
virtual void SetValue(
const PString & newVal
);
virtual void LoadFromConfig(
PConfig & cfg
);
virtual void SaveToConfig(
PConfig & cfg
) const;
virtual PBoolean Validated(
const PString & newVal,
PStringStream & msg
) const;
protected:
int low, high, value;
int initialValue;
PString units;
};
class PHTTPBooleanField : public PHTTPField
{
PCLASSINFO(PHTTPBooleanField, PHTTPField)
public:
PHTTPBooleanField(
const char * name,
PBoolean initVal = false,
const char * help = NULL
);
PHTTPBooleanField(
const char * name,
const char * title,
PBoolean initVal = false,
const char * help = NULL
);
virtual PHTTPField * NewField() const;
virtual void GetHTMLTag(
PHTML & html
) const;
virtual PString GetHTMLInput(
const PString & input
) const;
virtual PString GetValue(PBoolean dflt = false) const;
virtual void SetValue(
const PString & newVal
);
virtual void LoadFromConfig(
PConfig & cfg
);
virtual void SaveToConfig(
PConfig & cfg
) const;
protected:
PBoolean value, initialValue;
};
class PHTTPRadioField : public PHTTPField
{
PCLASSINFO(PHTTPRadioField, PHTTPField)
public:
PHTTPRadioField(
const char * name,
const PStringArray & valueArray,
PINDEX initVal = 0,
const char * help = NULL
);
PHTTPRadioField(
const char * name,
const PStringArray & valueArray,
const PStringArray & titleArray,
PINDEX initVal = 0,
const char * help = NULL
);
PHTTPRadioField(
const char * name,
PINDEX count,
const char * const * valueStrings,
PINDEX initVal = 0,
const char * help = NULL
);
PHTTPRadioField(
const char * name,
PINDEX count,
const char * const * valueStrings,
const char * const * titleStrings,
PINDEX initVal = 0,
const char * help = NULL
);
PHTTPRadioField(
const char * name,
const char * groupTitle,
const PStringArray & valueArray,
PINDEX initVal = 0,
const char * help = NULL
);
PHTTPRadioField(
const char * name,
const char * groupTitle,
const PStringArray & valueArray,
const PStringArray & titleArray,
PINDEX initVal = 0,
const char * help = NULL
);
PHTTPRadioField(
const char * name,
const char * groupTitle,
PINDEX count,
const char * const * valueStrings,
PINDEX initVal = 0,
const char * help = NULL
);
PHTTPRadioField(
const char * name,
const char * groupTitle,
PINDEX count,
const char * const * valueStrings,
const char * const * titleStrings,
PINDEX initVal = 0,
const char * help = NULL
);
virtual PHTTPField * NewField() const;
virtual void GetHTMLTag(
PHTML & html
) const;
virtual PString GetHTMLInput(
const PString & input
) const;
virtual PString GetValue(PBoolean dflt = false) const;
virtual void SetValue(
const PString & newVal
);
protected:
PStringArray values;
PStringArray titles;
PString value;
PString initialValue;
};
class PHTTPSelectField : public PHTTPField
{
PCLASSINFO(PHTTPSelectField, PHTTPField)
public:
PHTTPSelectField(
const char * name,
const PStringArray & valueArray,
PINDEX initVal = 0,
const char * help = NULL
);
PHTTPSelectField(
const char * name,
PINDEX count,
const char * const * valueStrings,
PINDEX initVal = 0,
const char * help = NULL
);
PHTTPSelectField(
const char * name,
const char * title,
const PStringArray & valueArray,
PINDEX initVal = 0,
const char * help = NULL
);
PHTTPSelectField(
const char * name,
const char * title,
PINDEX count,
const char * const * valueStrings,
PINDEX initVal = 0,
const char * help = NULL
);
virtual PHTTPField * NewField() const;
virtual void GetHTMLTag(
PHTML & html
) const;
virtual PString GetValue(PBoolean dflt = false) const;
virtual void SetValue(
const PString & newVal
);
PStringArray values;
protected:
PString value;
PINDEX initialValue;
};
// PHTTPForm
class PHTTPForm : public PHTTPString
{
PCLASSINFO(PHTTPForm, PHTTPString)
public:
PHTTPForm(
const PURL & url
);
PHTTPForm(
const PURL & url,
const PHTTPAuthority & auth
);
PHTTPForm(
const PURL & url,
const PString & html
);
PHTTPForm(
const PURL & url,
const PString & html,
const PHTTPAuthority & auth
);
virtual void OnLoadedText(
PHTTPRequest & request,
PString & text
);
virtual PBoolean Post(
PHTTPRequest & request,
const PStringToString & data,
PHTML & replyMessage
);
PHTTPField * Add(
PHTTPField * fld
);
void RemoveAllFields()
{ fields.RemoveAll(); fieldNames.RemoveAll(); }
enum BuildOptions {
CompleteHTML,
InsertIntoForm,
InsertIntoHTML
};
void BuildHTML(
const char * heading
);
void BuildHTML(
const PString & heading
);
void BuildHTML(
PHTML & html,
BuildOptions option = CompleteHTML
);
protected:
PHTTPCompositeField fields;
PStringSet fieldNames;
};
// PHTTPConfig
class PHTTPConfig : public PHTTPForm
{
PCLASSINFO(PHTTPConfig, PHTTPForm)
public:
PHTTPConfig(
const PURL & url,
const PString & section
);
PHTTPConfig(
const PURL & url,
const PString & section,
const PHTTPAuthority & auth
);
PHTTPConfig(
const PURL & url,
const PString & section,
const PString & html
);
PHTTPConfig(
const PURL & url,
const PString & section,
const PString & html,
const PHTTPAuthority & auth
);
virtual void OnLoadedText(
PHTTPRequest & request,
PString & text
);
virtual PBoolean Post(
PHTTPRequest & request,
const PStringToString & data,
PHTML & replyMessage
);
void LoadFromConfig();
const PString & GetConfigSection() const { return section; }
void SetConfigSection(
const PString & sect
) { section = sect; }
// Set the configuration file section.
PHTTPField * AddSectionField(
PHTTPField * sectionFld,
const char * prefix = NULL,
const char * suffix = NULL
);
void AddNewKeyFields(
PHTTPField * keyFld,
PHTTPField * valFld
);
protected:
PString section;
PString sectionPrefix;
PString sectionSuffix;
PHTTPField * sectionField;
PHTTPField * keyField;
PHTTPField * valField;
private:
void Construct();
};
// PHTTPConfigSectionList
class PHTTPConfigSectionList : public PHTTPString
{
PCLASSINFO(PHTTPConfigSectionList, PHTTPString)
public:
PHTTPConfigSectionList(
const PURL & url,
const PHTTPAuthority & auth,
const PString & sectionPrefix,
const PString & additionalValueName,
const PURL & editSection,
const PURL & newSection,
const PString & newSectionTitle,
PHTML & heading
);
virtual void OnLoadedText(
PHTTPRequest & request,
PString & text
);
virtual PBoolean Post(
PHTTPRequest & request,
const PStringToString & data,
PHTML & replyMessage
);
protected:
PString sectionPrefix;
PString additionalValueName;
PString newSectionLink;
PString newSectionTitle;
PString editSectionLink;
};
#endif // P_HTTPFORMS
#endif // PTLIB_HTTPFORM_H
// End Of File ///////////////////////////////////////////////////////////////
PHTTPIntegerField
Definition: httpform.h:493
PHTTPCompositeField::RemoveAll
void RemoveAll()
Definition: httpform.h:308
PHTTPField::PHTTPField
PHTTPField(const char *bname, const char *title, const char *help)
PHTTPField::ExpandFieldNames
virtual void ExpandFieldNames(PString &text, PINDEX start, PINDEX &finish) const
PHTTPField::GetHTMLHeading
virtual void GetHTMLHeading(PHTML &html) const
Convert the field to HTML for inclusion into the HTTP page.
PHTTPField::ValidateAll
virtual PBoolean ValidateAll(const PStringToString &data, PStringStream &msg) const
Validate the new field value in a list before SetValue() is called.
PHTTPCompositeField
Definition: httpform.h:237
PHTTPField::fullName
PCaselessString fullName
Definition: httpform.h:228
PHTTPIntegerField::value
int value
Definition: httpform.h:539
PHTTPConfigSectionList::editSectionLink
PString editSectionLink
Definition: httpform.h:921
PHTTPSubForm::secondary
PINDEX secondary
Definition: httpform.h:335
PHTTPConfig::SetConfigSection
void SetConfigSection(const PString &sect)
Definition: httpform.h:851
PHTTPFieldArray::canAddElements
PBoolean canAddElements
Definition: httpform.h:391
PCLASSINFO
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
PHTTPStringField::size
PINDEX size
Definition: httpform.h:429
PHTTPRadioField::titles
PStringArray titles
Definition: httpform.h:674
PARRAY
PARRAY(PHTTPFields, PHTTPField)
html.h
PHTTPAuthority
This abstract class describes the authorisation mechanism for a Universal Resource Locator...
Definition: http.h:1002
PTime
This class defines an absolute time and date.
Definition: ptime.h:53
PConfig
A class representing a configuration for the application.
Definition: config.h:67
PHTTPSubForm::primary
PINDEX primary
Definition: httpform.h:334
PStringStream
This class is a standard C++ stream class descendent for reading or writing streamed data to or from ...
Definition: pstring.h:1878
PStringToString
This is a dictionary collection class of PString objects, keyed by another string.
Definition: pstring.h:2784
PObject::Comparison
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:1184
PHTTPConfigSectionList::sectionPrefix
PString sectionPrefix
Definition: httpform.h:917
PHTTPForm::BuildOptions
BuildOptions
Definition: httpform.h:777
PCaselessString
This class is a variation of a string that ignores case.
Definition: pstring.h:1708
PHTTPForm::InsertIntoForm
Definition: httpform.h:779
PHTTPPasswordField
Definition: httpform.h:433
PHTTPDateField
Definition: httpform.h:467
PHTTPStringField::initialValue
PString initialValue
Definition: httpform.h:428
PStringArray
This is an array collection class of PString objects.
Definition: pstring.h:2024
PHTTPStringField
Definition: httpform.h:395
PHTTPString
This object describes a HyperText Transport Protocol resource which is a string kept in memory...
Definition: http.h:1525
PHTTPRadioField
Definition: httpform.h:590
PHTTPFieldArray::orderedArray
PBoolean orderedArray
Definition: httpform.h:390
PHTTPField::SetHelp
void SetHelp(const PString &text)
Definition: httpform.h:113
PHTTPConfigSectionList::additionalValueName
PString additionalValueName
Definition: httpform.h:918
PHTTPField::GetValue
virtual PString GetValue(PBoolean dflt=false) const =0
Get the string value of the field.
PHTTPConfig::sectionField
PHTTPField * sectionField
Definition: httpform.h:879
PHTTPDateField::m_format
PTime::TimeFormat m_format
Definition: httpform.h:489
PHTTPField::notInHTML
PBoolean notInHTML
Definition: httpform.h:231
PHTTPField::NotYetInHTML
PBoolean NotYetInHTML() const
Definition: httpform.h:223
PHTTPField::NewField
virtual PHTTPField * NewField() const =0
Create a new field of the same class as the current field.
PTime::TimeFormat
TimeFormat
Standard time formats for string representations of a time and date.
Definition: ptime.h:399
http.h
PHTTPConfig::keyField
PHTTPField * keyField
Definition: httpform.h:880
PHTTPField::GetHTMLInput
virtual PString GetHTMLInput(const PString &input) const
Convert the field input to HTML for inclusion into the HTTP page.
PBoolean
BOOL PBoolean
Definition: object.h:102
PHTTPConfig::section
PString section
Definition: httpform.h:876
PHTTPSubForm::subFormName
PString subFormName
Definition: httpform.h:333
PHTTPField::help
PString help
Definition: httpform.h:230
PHTTPRadioField::initialValue
PString initialValue
Definition: httpform.h:676
PHTTPSelectField::value
PString value
Definition: httpform.h:730
PHTTPField::LoadFromConfig
virtual void LoadFromConfig(PConfig &cfg)
Get the value of the PConfig to the sub-field.
PHTTPSelectField::initialValue
PINDEX initialValue
Definition: httpform.h:731
PHTTPField::GetHelp
const PString & GetHelp() const
Get the title of the field.
Definition: httpform.h:111
PHTTPBooleanField
Definition: httpform.h:545
PHTTPFieldArray
Definition: httpform.h:339
PHTTPField::baseName
PCaselessString baseName
Definition: httpform.h:227
PHTTPField::GetBaseName
const PCaselessString & GetBaseName() const
Get the identifier name of the field.
Definition: httpform.h:82
PHTTPField::GetAllNames
virtual void GetAllNames(PStringArray &names) const
Retrieve all the names in the field and subfields.
PHTTPConfig::sectionSuffix
PString sectionSuffix
Definition: httpform.h:878
PHTTPSelectField::values
PStringArray values
Definition: httpform.h:726
PTime::ShortDate
Date with numeric month and no time.
Definition: ptime.h:421
PHTTPField::GetTitle
const PString & GetTitle() const
Get the title of the field.
Definition: httpform.h:104
PHTTPField::SetValue
virtual void SetValue(const PString &newValue)=0
Set the value of the field.
PHTTPSubForm
Definition: httpform.h:316
PHTTPConfig::valField
PHTTPField * valField
Definition: httpform.h:881
PHTTPRadioField::values
PStringArray values
Definition: httpform.h:673
PString
The character string class.
Definition: pstring.h:108
PHTTPField::SetName
virtual void SetName(const PString &newName)
Set the name for the field.
PHTTPConfigSectionList::newSectionLink
PString newSectionLink
Definition: httpform.h:919
PStringSet
This is a set collection class of PString objects.
Definition: pstring.h:2391
PHTTPField::GetName
const PCaselessString & GetName() const
Get the identifier name of the field.
Definition: httpform.h:75
PHTTPCompositeField::RemoveAt
void RemoveAt(PINDEX idx)
Definition: httpform.h:307
PHTTPConfigSectionList::newSectionTitle
PString newSectionTitle
Definition: httpform.h:920
PHTTPStringField::value
PString value
Definition: httpform.h:427
PHTTPConfigSectionList
Definition: httpform.h:891
PHTTPForm::CompleteHTML
Definition: httpform.h:778
PHTTPField::title
PString title
Definition: httpform.h:229
PHTTPCompositeField::m_includeHeaders
bool m_includeHeaders
Definition: httpform.h:312
PHTML
This class describes a HyperText markup Language string as used by the World Wide Web and the PURL an...
Definition: html.h:49
PHTTPField::Validated
virtual PBoolean Validated(const PString &newVal, PStringStream &msg) const
Validate the new field value before SetValue() is called.
PHTTPBooleanField::value
PBoolean value
Definition: httpform.h:586
PHTTPCompositeField::fields
PHTTPFields fields
Definition: httpform.h:311
PHTTPCompositeField::operator[]
PHTTPField & operator[](PINDEX idx) const
Definition: httpform.h:306
PHTTPField
This class is the abstract base class for fields in a PHTTPForm resource type.
Definition: httpform.h:50
PHTTPForm::fieldNames
PStringSet fieldNames
Definition: httpform.h:797
PHTTPSelectField
Definition: httpform.h:680
PHTTPForm::RemoveAllFields
void RemoveAllFields()
Definition: httpform.h:774
PHTTPField::SaveToConfig
virtual void SaveToConfig(PConfig &cfg) const
Set the value of the sub-field into the PConfig.
PHTTPField::GetHTMLSelect
virtual PString GetHTMLSelect(const PString &selection) const
Convert the field input to HTML for inclusion into the HTTP page.
PHTTPConfig::sectionPrefix
PString sectionPrefix
Definition: httpform.h:877
PHTTPField::SetAllValues
virtual void SetAllValues(const PStringToString &data)
Set the value of the field in a list of fields.
PHTTPField::Compare
virtual Comparison Compare(const PObject &obj) const
Compare the fields using the field names.
PHTTPFieldArray::baseField
PHTTPField * baseField
Definition: httpform.h:389
PHTTPRadioField::value
PString value
Definition: httpform.h:675
PHTTPForm
Definition: httpform.h:738
PHTTPIntegerField::initialValue
int initialValue
Definition: httpform.h:540
PHTTPIntegerField::units
PString units
Definition: httpform.h:541
PHTTPField::GetHTMLTag
virtual void GetHTMLTag(PHTML &html) const =0
Convert the field to HTML form tag for inclusion into the HTTP page.
PHTTPRequest
This object describes a HyperText Transport Protocol request.
Definition: http.h:968
PObject
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
PHTTPField::LocateName
virtual const PHTTPField * LocateName(const PString &name) const
Locate the field naem, recusing down for composite fields.
PHTTPConfig::GetConfigSection
const PString & GetConfigSection() const
Get the configuration file section that the page will alter.
Definition: httpform.h:849
PURL
This class describes a Universal Resource Locator.
Definition: url.h:54
PHTTPField::SetInHTML
void SetInHTML()
Definition: httpform.h:224
PHTTPForm::fields
PHTTPCompositeField fields
Definition: httpform.h:796
PHTTPConfig
Definition: httpform.h:804