Indy 9
TTextRecord
Hierarchy, Properties, Methods, Unit: IdDNSResolver
Represents resource records in a DNS response that include Text String resource record types.
TTextRecord = class(TResultRecord)
Unit
IdDNSResolver
Description
TTextRecord is a TResultRecord descendant that represents a resource record returned in the results for a DNS query. TTextRecord is the collection item created to represent a resource resource returned when TIdDNSResolver.QueryRecords includes the value qtTXT for Text String resource records.

Text String resource records are used to provide variable length text string values associated with the Domain owner. Text String resource records do not describe the semantics of the test string contents, and is dependent on the domain where it is located.

A Text String resource record uses the same DNS packet layout as other TResultRecord-based responses, but extends the use of RData to include the following definition and format:

  +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  |                                               |
  .                                               .
  .                   TXT-DATA                    .
  .                                               .
  |                                               |
  +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

  • TXT-DATA - One or more character strings.

TTextRecord extends TResultRecord to implement the specifics of accessing RData values as properties, including Text. TTextRecord also overrides the Parse method to read the values in RData into their property counterparts.


TTextRecord.Text
TTextRecord
Represents character strings associated with the owner.
property Text: TStrings;
Description
Text is a read-only TStrings property that represents one or more string values that occur in the RData field of a Text String resource record. Values in Text are associated with the owner in Name, and semantics of its contents are dependent on the domain where it is located.

TTextRecord.Create
TTextRecord
Constructor for the object instance.
constructor Create(Collection: TCollection); override;
Parameters
Collection: TCollection
Owner of the collection item.
Description
Create is the constructor for the object instance. Create calls the inherited Create method using Collection as the owner of the collection item.

TTextRecord.Destroy
TTextRecord, See Also
Frees the resource record collection item.
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy frees resources allocated to the Text property in the Create method. Destroy calls the inherited Destroy method prior to exit.

TTextRecord.Parse
TTextRecord
Parses RData values into properties.
procedure Parse(CompleteMessage: String; APos: Integer); override;
Parameters
CompleteMessage: String
Contents of the resource record.
APos: Integer
Position where RData values begin in the answer.
Description
Parse is an overridden procedure that implements a routine to parse resource record values in the DNS response into their property-based counterparts.

CompleteMessage is the contents of the resource record. Since the DNS message can contain compressed data, the whole message is needed for parsing and pointer location.

APos is the position in the resource record where RData values for this record type are located in the DNS Answer.

Parse calls the inherited Parse method, and retrieves the DNS labels and values for the Text property.


Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.