31 #ifndef PTLIB_HTTPFORM_H
32 #define PTLIB_HTTPFORM_H
243 const char *
title = NULL,
244 const char *
help = NULL,
245 bool includeHeaders =
false
303 virtual PINDEX
GetSize()
const;
323 const char *
title = NULL,
324 PINDEX primaryField = 0,
325 PINDEX secondaryField = P_MAX_INDEX
372 virtual PINDEX
GetSize()
const;
402 const char * initVal = NULL,
403 const char *
help = NULL
409 const char * initVal = NULL,
410 const char *
help = NULL
440 const char * initVal = NULL,
441 const char *
help = NULL
447 const char * initVal = NULL,
448 const char *
help = NULL
501 const char *
units = NULL,
502 const char *
help = NULL
509 const char *
units = NULL,
510 const char *
help = NULL
552 const char *
help = NULL
558 const char *
help = NULL
598 const char *
help = NULL
605 const char *
help = NULL
610 const char *
const * valueStrings,
612 const char *
help = NULL
617 const char *
const * valueStrings,
618 const char *
const * titleStrings,
620 const char *
help = NULL
624 const char * groupTitle,
627 const char *
help = NULL
631 const char * groupTitle,
635 const char *
help = NULL
639 const char * groupTitle,
641 const char *
const * valueStrings,
643 const char *
help = NULL
647 const char * groupTitle,
649 const char *
const * valueStrings,
650 const char *
const * titleStrings,
652 const char *
help = NULL
688 const char *
help = NULL
693 const char *
const * valueStrings,
695 const char *
help = NULL
702 const char *
help = NULL
708 const char *
const * valueStrings,
710 const char *
help = NULL
853 ) { section = sect; }
862 const char * prefix = NULL,
863 const char * suffix = NULL
900 const PURL & editSection,
901 const PURL & newSection,
925 #endif // P_HTTPFORMS
927 #endif // PTLIB_HTTPFORM_H
virtual void GetAllNames(PStringArray &names) const
Retrieve all the names in the field and subfields.
Definition: httpform.h:493
virtual PINDEX GetSize() const
Get the number of sub-fields in the composite field.
virtual void SaveToConfig(PConfig &cfg) const
Set the value of the sub-field into the PConfig.
virtual PBoolean Post(PHTTPRequest &request, const PStringToString &data, PHTML &replyMessage)
Get a block of data (eg HTML) that the resource contains.
void RemoveAll()
Definition: httpform.h:308
PHTTPField(const char *bname, const char *title, const char *help)
const PString & GetConfigSection() const
Get the configuration file section that the page will alter.
Definition: httpform.h:849
Definition: httpform.h:237
PHTTPSelectField(const char *name, const PStringArray &valueArray, PINDEX initVal=0, const char *help=NULL)
void AddArrayControlBox(PHTML &html, PINDEX fld) const
PHTTPPasswordField(const char *name, PINDEX size, const char *initVal=NULL, const char *help=NULL)
virtual void GetHTMLTag(PHTML &html) const
Convert the field to HTML form tag for inclusion into the HTTP page.
PCaselessString fullName
Definition: httpform.h:228
int value
Definition: httpform.h:539
PString editSectionLink
Definition: httpform.h:921
virtual PString GetValue(PBoolean dflt=false) const
Get the string value of the field.
PHTTPConfigSectionList(const PURL &url, const PHTTPAuthority &auth, const PString §ionPrefix, const PString &additionalValueName, const PURL &editSection, const PURL &newSection, const PString &newSectionTitle, PHTML &heading)
void AddNewKeyFields(PHTTPField *keyFld, PHTTPField *valFld)
Add fields to the HTTP form for adding a new key to the config file section.
void SetConfigSection(const PString §)
Definition: httpform.h:851
PBoolean canAddElements
Definition: httpform.h:391
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
PINDEX size
Definition: httpform.h:429
PHTTPBooleanField(const char *name, PBoolean initVal=false, const char *help=NULL)
virtual void ExpandFieldNames(PString &text, PINDEX start, PINDEX &finish) const
PStringArray titles
Definition: httpform.h:674
PHTTPFieldArray(PHTTPField *baseField, PBoolean ordered, PINDEX fixedSize=0)
This abstract class describes the authorisation mechanism for a Universal Resource Locator...
Definition: http.h:1002
This class defines an absolute time and date.
Definition: ptime.h:53
PHTTPDateField(const char *name, const PTime &initVal=PTime(0), PTime::TimeFormat fmt=PTime::ShortDate)
virtual void GetHTMLTag(PHTML &html) const
Convert the field to HTML form tag for inclusion into the HTTP page.
virtual PBoolean Post(PHTTPRequest &request, const PStringToString &data, PHTML &replyMessage)
Get a block of data (eg HTML) that the resource contains.
A class representing a configuration for the application.
Definition: config.h:67
This class is a standard C++ stream class descendent for reading or writing streamed data to or from ...
Definition: pstring.h:1878
virtual void SaveToConfig(PConfig &cfg) const
Set the value of the sub-field into the PConfig.
virtual void ExpandFieldNames(PString &text, PINDEX start, PINDEX &finish) const
This is a dictionary collection class of PString objects, keyed by another string.
Definition: pstring.h:2784
virtual PString GetHTMLSelect(const PString &selection) const
Convert the field input to HTML for inclusion into the HTTP page.
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:1184
PString sectionPrefix
Definition: httpform.h:917
virtual PHTTPField * NewField() const
Create a new field of the same class as the current field.
This class is a variation of a string that ignores case.
Definition: pstring.h:1708
virtual Comparison Compare(const PObject &obj) const
Compare the fields using the field names.
Definition: httpform.h:433
Definition: httpform.h:467
virtual void GetHTMLTag(PHTML &html) const
Convert the field to HTML form tag for inclusion into the HTTP page.
PString initialValue
Definition: httpform.h:428
This is an array collection class of PString objects.
Definition: pstring.h:2024
Definition: httpform.h:395
virtual void SaveToConfig(PConfig &cfg) const
Set the value of the sub-field into the PConfig.
virtual PINDEX GetSize() const
Get the number of sub-fields in the composite field.
This object describes a HyperText Transport Protocol resource which is a string kept in memory...
Definition: http.h:1525
Definition: httpform.h:590
PBoolean orderedArray
Definition: httpform.h:390
void SetHelp(const PString &text)
Definition: httpform.h:113
virtual void LoadFromConfig(PConfig &cfg)
Get the value of the PConfig to the sub-field.
PString additionalValueName
Definition: httpform.h:918
virtual PString GetValue(PBoolean dflt=false) const =0
Get the string value of the field.
PHTTPField * sectionField
Definition: httpform.h:879
PTime::TimeFormat m_format
Definition: httpform.h:489
PBoolean notInHTML
Definition: httpform.h:231
virtual PHTTPField * NewField() const =0
Create a new field of the same class as the current field.
virtual void RemoveAll()
Remove all of the elements in the collection.
TimeFormat
Standard time formats for string representations of a time and date.
Definition: ptime.h:399
PHTTPField * keyField
Definition: httpform.h:880
virtual PString GetHTMLInput(const PString &input) const
Convert the field input to HTML for inclusion into the HTTP page.
virtual PHTTPField * NewField() const
Create a new field of the same class as the current field.
virtual PHTTPField * NewField() const
Create a new field of the same class as the current field.
virtual PString GetValue(PBoolean dflt=false) const
Get the string value of the field.
virtual void GetHTMLTag(PHTML &html) const
Convert the field to HTML form tag for inclusion into the HTTP page.
BOOL PBoolean
Definition: object.h:102
PString section
Definition: httpform.h:876
virtual void SetValue(const PString &newVal)
Set the value of the field.
PString help
Definition: httpform.h:230
PString initialValue
Definition: httpform.h:676
PString value
Definition: httpform.h:730
virtual void SetAllValues(const PStringToString &data)
Set the value of the field in a list of fields.
int high
Definition: httpform.h:539
virtual PHTTPField * NewField() const
Create a new field of the same class as the current field.
virtual void LoadFromConfig(PConfig &cfg)
Get the value of the PConfig to the sub-field.
virtual void SetValue(const PString &newVal)
Set the value of the field.
PBoolean initialValue
Definition: httpform.h:586
PINDEX initialValue
Definition: httpform.h:731
void SetStrings(PConfig &cfg, const PStringArray &values)
PStringArray GetStrings(PConfig &cfg)
Definition: httpform.h:545
virtual void SetValue(const PString &newVal)
Set the value of the field.
Definition: httpform.h:339
PCaselessString baseName
Definition: httpform.h:227
virtual void GetHTMLTag(PHTML &html) const
Convert the field to HTML form tag for inclusion into the HTTP page.
void Append(PHTTPField *fld)
virtual void SetValue(const PString &newVal)
Set the value of the field.
PString sectionSuffix
Definition: httpform.h:878
PStringArray values
Definition: httpform.h:726
PHTTPConfig(const PURL &url, const PString §ion)
Date with numeric month and no time.
Definition: ptime.h:421
const PCaselessString & GetName() const
Get the identifier name of the field.
Definition: httpform.h:75
virtual void SetValue(const PString &newValue)=0
Set the value of the field.
virtual PString GetValue(PBoolean dflt=false) const
Get the string value of the field.
PHTTPField * valField
Definition: httpform.h:881
virtual PHTTPField * NewField() const
Create a new field of the same class as the current field.
virtual void GetHTMLHeading(PHTML &html) const
Convert the field to HTML for inclusion into the HTTP page.
PStringArray values
Definition: httpform.h:673
virtual PBoolean Validated(const PString &newVal, PStringStream &msg) const
Validate the new field value before SetValue() is called.
const PCaselessString & GetBaseName() const
Get the identifier name of the field.
Definition: httpform.h:82
virtual PHTTPField * NewField() const
Create a new field of the same class as the current field.
The character string class.
Definition: pstring.h:108
virtual void SaveToConfig(PConfig &cfg) const
Set the value of the sub-field into the PConfig.
virtual void SetName(const PString &newName)
Set the name for the field.
PString newSectionLink
Definition: httpform.h:919
This is a set collection class of PString objects.
Definition: pstring.h:2391
virtual PBoolean ValidateAll(const PStringToString &data, PStringStream &msg) const
Validate the new field value in a list before SetValue() is called.
virtual PBoolean Validated(const PString &newVal, PStringStream &msg) const
Validate the new field value before SetValue() is called.
virtual void SetName(const PString &name)
Set the name for the field.
void RemoveAt(PINDEX idx)
Definition: httpform.h:307
virtual void SetValue(const PString &newValue)
Set the value of the field.
PString newSectionTitle
Definition: httpform.h:920
virtual void LoadFromConfig(PConfig &cfg)
Get the value of the PConfig to the sub-field.
virtual PBoolean ValidateAll(const PStringToString &data, PStringStream &msg) const
Validate the new field value in a list before SetValue() is called.
virtual PHTTPField * NewField() const
Create a new field of the same class as the current field.
PString value
Definition: httpform.h:427
virtual PString GetHTMLInput(const PString &input) const
Convert the field input to HTML for inclusion into the HTTP page.
Definition: httpform.h:891
PString title
Definition: httpform.h:229
PHTTPField * AddSectionField(PHTTPField *sectionFld, const char *prefix=NULL, const char *suffix=NULL)
Add a field that will determine the name opf the secontion into which the other fields are to be adde...
static PString Decrypt(const PString &pword)
virtual void SetValue(const PString &newVal)
Set the value of the field.
bool m_includeHeaders
Definition: httpform.h:312
const PString & GetHelp() const
Get the title of the field.
Definition: httpform.h:111
virtual PString GetHTMLInput(const PString &input) const
Convert the field input to HTML for inclusion into the HTTP page.
virtual const PHTTPField * LocateName(const PString &name) const
Locate the field naem, recusing down for composite fields.
virtual PString GetHTMLInput(const PString &input) const
Convert the field input to HTML for inclusion into the HTTP page.
virtual PString GetValue(PBoolean dflt=false) const
Get the string value of the field.
PBoolean NotYetInHTML() const
Definition: httpform.h:223
This class describes a HyperText markup Language string as used by the World Wide Web and the PURL an...
Definition: html.h:49
PHTTPCompositeField(const char *name, const char *title=NULL, const char *help=NULL, bool includeHeaders=false)
virtual void SetValue(const PString &newVal)
Set the value of the field.
virtual void GetHTMLTag(PHTML &html) const
Convert the field to HTML form tag for inclusion into the HTTP page.
PBoolean value
Definition: httpform.h:586
PHTTPFields fields
Definition: httpform.h:311
int low
Definition: httpform.h:539
virtual void LoadFromConfig(PConfig &cfg)
Get the value of the PConfig to the sub-field.
virtual void SetValue(const PString &newValue)
Set the value of the field.
virtual PBoolean Validated(const PString &newValue, PStringStream &msg) const
Validate the new field value before SetValue() is called.
virtual void GetHTMLHeading(PHTML &html) const
Convert the field to HTML for inclusion into the HTTP page.
This class is the abstract base class for fields in a PHTTPForm resource type.
Definition: httpform.h:50
virtual void OnLoadedText(PHTTPRequest &request, PString &text)
This is called after the text has been loaded and may be used to customise or otherwise mangle a load...
virtual PHTTPField * NewField() const
Create a new field of the same class as the current field.
virtual PHTTPField * NewField() const
Create a new field of the same class as the current field.
void LoadFromConfig()
Load all of the values for the resource from the configuration.
const PString & GetTitle() const
Get the title of the field.
Definition: httpform.h:104
Definition: httpform.h:680
PHTTPStringField(const char *name, PINDEX size, const char *initVal=NULL, const char *help=NULL)
virtual void GetHTMLTag(PHTML &html) const
Convert the field to HTML form tag for inclusion into the HTTP page.
PString sectionPrefix
Definition: httpform.h:877
void SetSize(PINDEX newSize)
virtual PString GetValue(PBoolean dflt=false) const
Get the string value of the field.
virtual void SetAllValues(const PStringToString &data)
Set the value of the field in a list of fields.
PHTTPField * baseField
Definition: httpform.h:389
virtual void OnLoadedText(PHTTPRequest &request, PString &text)
This is called after the text has been loaded and may be used to customise or otherwise mangle a load...
PString value
Definition: httpform.h:675
PHTTPIntegerField(const char *name, int low, int high, int initVal=0, const char *units=NULL, const char *help=NULL)
int initialValue
Definition: httpform.h:540
virtual void GetHTMLTag(PHTML &html) const
Convert the field to HTML form tag for inclusion into the HTTP page.
PString units
Definition: httpform.h:541
virtual void GetHTMLTag(PHTML &html) const =0
Convert the field to HTML form tag for inclusion into the HTTP page.
This object describes a HyperText Transport Protocol request.
Definition: http.h:968
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
virtual void GetAllNames(PStringArray &names) const
Retrieve all the names in the field and subfields.
virtual void SetAllValues(const PStringToString &data)
Set the value of the field in a list of fields.
This class describes a Universal Resource Locator.
Definition: url.h:54
PHTTPField & operator[](PINDEX idx) const
Definition: httpform.h:306
virtual void LoadFromConfig(PConfig &cfg)
Get the value of the PConfig to the sub-field.
virtual void SaveToConfig(PConfig &cfg) const
Set the value of the sub-field into the PConfig.
virtual PString GetValue(PBoolean dflt=false) const
Get the string value of the field.
void SetArrayFieldName(PINDEX idx) const
void SetInHTML()
Definition: httpform.h:224
virtual const PHTTPField * LocateName(const PString &name) const
Locate the field naem, recusing down for composite fields.
virtual void ExpandFieldNames(PString &text, PINDEX start, PINDEX &finish) const
PHTTPRadioField(const char *name, const PStringArray &valueArray, PINDEX initVal=0, const char *help=NULL)
virtual PString GetValue(PBoolean dflt=false) const
Get the string value of the field.
Definition: httpform.h:804