enum Gio::ResolverRecordType

Overview

The type of record that g_resolver_lookup_records() or g_resolver_lookup_records_async() should retrieve. The records are returned as lists of #GVariant tuples. Each record type has different values in the variant tuples returned.

%G_RESOLVER_RECORD_SRV records are returned as variants with the signature (qqqs), containing a guint16 with the priority, a guint16 with the weight, a guint16 with the port, and a string of the hostname.

%G_RESOLVER_RECORD_MX records are returned as variants with the signature (qs), representing a guint16 with the preference, and a string containing the mail exchanger hostname.

%G_RESOLVER_RECORD_TXT records are returned as variants with the signature (as), representing an array of the strings in the text record. Note: Most TXT records only contain a single string, but RFC 1035 does allow a record to contain multiple strings. The RFC which defines the interpretation of a specific TXT record will likely require concatenation of multiple strings if they are present, as with RFC 7208.

%G_RESOLVER_RECORD_SOA records are returned as variants with the signature (ssuuuuu), representing a string containing the primary name server, a string containing the administrator, the serial as a guint32, the refresh interval as a guint32, the retry interval as a guint32, the expire timeout as a guint32, and the TTL as a guint32.

%G_RESOLVER_RECORD_NS records are returned as variants with the signature (s), representing a string of the hostname of the name server.

Defined in:

lib/gi-crystal/src/auto/gio-2.0/gio.cr

Enum Members

Srv = 1_u32

look up DNS SRV records for a domain

Mx = 2_u32

look up DNS MX records for a domain

Txt = 3_u32

look up DNS TXT records for a name

Soa = 4_u32

look up DNS SOA records for a zone

Ns = 5_u32

look up DNS NS records for a domain

Class Method Summary

Instance Method Summary

Class methods inherited from struct Enum

g_type : UInt64 g_type

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


Instance Method Detail

def mx? #

def ns? #

def soa? #

def srv? #

def txt? #