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;
307 void RemoveAt(PINDEX idx) { fields.RemoveAt(idx); }
323 const char *
title = NULL,
324 PINDEX primaryField = 0,
325 PINDEX secondaryField = P_MAX_INDEX
372 virtual PINDEX GetSize()
const;
373 void SetSize(PINDEX newSize);
385 void AddBlankField();
386 void AddArrayControlBox(
PHTML & html, PINDEX fld)
const;
387 void SetArrayFieldName(PINDEX idx)
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
760 virtual void OnLoadedText(
775 { fields.RemoveAll(); fieldNames.RemoveAll(); }
829 virtual void OnLoadedText(
853 ) { section = sect; }
862 const char * prefix = NULL,
863 const char * suffix = NULL
869 void AddNewKeyFields(
899 const PString & additionalValueName,
900 const PURL & editSection,
901 const PURL & newSection,
902 const PString & newSectionTitle,
906 virtual void OnLoadedText(
925 #endif // P_HTTPFORMS 927 #endif // PTLIB_HTTPFORM_H Definition: httpform.h:493
void RemoveAll()
Definition: httpform.h:308
PHTTPField(const char *bname, const char *title, const char *help)
virtual void ExpandFieldNames(PString &text, PINDEX start, PINDEX &finish) const
virtual void GetHTMLHeading(PHTML &html) const
Convert the field to HTML for inclusion into the HTTP page.
virtual PBoolean ValidateAll(const PStringToString &data, PStringStream &msg) const
Validate the new field value in a list before SetValue() is called.
Definition: httpform.h:237
PCaselessString fullName
Definition: httpform.h:228
int value
Definition: httpform.h:539
PString editSectionLink
Definition: httpform.h:921
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
PStringArray titles
Definition: httpform.h:674
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
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
This is a dictionary collection class of PString objects, keyed by another string.
Definition: pstring.h:2784
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:1184
PString sectionPrefix
Definition: httpform.h:917
This class is a variation of a string that ignores case.
Definition: pstring.h:1708
Definition: httpform.h:433
Definition: httpform.h:467
PString initialValue
Definition: httpform.h:428
This is an array collection class of PString objects.
Definition: pstring.h:2024
Definition: httpform.h:395
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
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
PBoolean NotYetInHTML() const
Definition: httpform.h:223
virtual PHTTPField * NewField() const =0
Create a new field of the same class as the current field.
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.
BOOL PBoolean
Definition: object.h:102
PString section
Definition: httpform.h:876
PString help
Definition: httpform.h:230
PString initialValue
Definition: httpform.h:676
PString value
Definition: httpform.h:730
virtual void LoadFromConfig(PConfig &cfg)
Get the value of the PConfig to the sub-field.
PINDEX initialValue
Definition: httpform.h:731
const PString & GetHelp() const
Get the title of the field.
Definition: httpform.h:111
Definition: httpform.h:545
Definition: httpform.h:339
PCaselessString baseName
Definition: httpform.h:227
const PCaselessString & GetBaseName() const
Get the identifier name of the field.
Definition: httpform.h:82
virtual void GetAllNames(PStringArray &names) const
Retrieve all the names in the field and subfields.
PString sectionSuffix
Definition: httpform.h:878
PStringArray values
Definition: httpform.h:726
Date with numeric month and no time.
Definition: ptime.h:421
const PString & GetTitle() const
Get the title of the field.
Definition: httpform.h:104
virtual void SetValue(const PString &newValue)=0
Set the value of the field.
PHTTPField * valField
Definition: httpform.h:881
PStringArray values
Definition: httpform.h:673
The character string class.
Definition: pstring.h:108
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
const PCaselessString & GetName() const
Get the identifier name of the field.
Definition: httpform.h:75
void RemoveAt(PINDEX idx)
Definition: httpform.h:307
PString newSectionTitle
Definition: httpform.h:920
PString value
Definition: httpform.h:427
Definition: httpform.h:891
PString title
Definition: httpform.h:229
bool m_includeHeaders
Definition: httpform.h:312
This class describes a HyperText markup Language string as used by the World Wide Web and the PURL an...
Definition: html.h:49
virtual PBoolean Validated(const PString &newVal, PStringStream &msg) const
Validate the new field value before SetValue() is called.
PBoolean value
Definition: httpform.h:586
PHTTPFields fields
Definition: httpform.h:311
PHTTPField & operator[](PINDEX idx) const
Definition: httpform.h:306
This class is the abstract base class for fields in a PHTTPForm resource type.
Definition: httpform.h:50
Definition: httpform.h:680
virtual void SaveToConfig(PConfig &cfg) const
Set the value of the sub-field into the PConfig.
virtual PString GetHTMLSelect(const PString &selection) const
Convert the field input to HTML for inclusion into the HTTP page.
PString sectionPrefix
Definition: httpform.h:877
virtual void SetAllValues(const PStringToString &data)
Set the value of the field in a list of fields.
virtual Comparison Compare(const PObject &obj) const
Compare the fields using the field names.
PHTTPField * baseField
Definition: httpform.h:389
PString value
Definition: httpform.h:675
int initialValue
Definition: httpform.h:540
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 const PHTTPField * LocateName(const PString &name) const
Locate the field naem, recusing down for composite fields.
const PString & GetConfigSection() const
Get the configuration file section that the page will alter.
Definition: httpform.h:849
This class describes a Universal Resource Locator.
Definition: url.h:54
void SetInHTML()
Definition: httpform.h:224
Definition: httpform.h:804