PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBDNS
Wrapper Class for the IDNS interface.
#include <SFBDNS.h.hpp>
class SFBDNS : public SFBQuery;
SFMTYPEDEFWRAPPER(SFBDNS)

Inheritance diagram

 Inheritance diagram of SFBDNSClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
O O O O

Reference

BREW API IDNS

Member

Public Functions
SFCError AddQuestion( AEEDNSType dnsType , AEEDNSClass dnsClass , ACharConstPtr domain )
Add a question to the set of question records in the request.
SFCError AddQuestion( AEEDNSType dnsType , AEEDNSClass dnsClass , SFXAnsiStringConstRef domain )
Add a question to the set of question records in the request.
SFCError GetResponse( AEEDNSResponse const ** response )
Get the DNS response after the query completes.
static
SFBDNSSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBDNS instance.
static
SFBDNSSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBDNS instance.
ACharPtr ParseDomain( VoidConstPtr domain , SInt32Ptr value )
Convert a DNS representation of a domain name into a zero-terminated string with dot (that is, period, or ".") delimiters.
ACharPtr ParseDomain( SFXBufferConstRef domain , SInt32Ptr value )
Convert a DNS representation of a domain name into a zero-terminated string with dot (that is, period, or ".") delimiters.
SFCError Start( PFNNOTIFY notify , VoidPtr data = null )
Start the query, and schedule callback to be called.
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFCError QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFBBaseSmp QueryInterface( AEECLSID clsid ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBDNS::AddQuestion
Add a question to the set of question records in the request.
[ public ]
SFCError AddQuestion(
    AEEDNSType dnsType     // dNS question type
    AEEDNSClass dnsClass   // dNS class
    ACharConstPtr domain   // zero-terminated string representing a domain name in dotted notation (for example, "example.com"). 
                           // single dot terminators (e.g. "example.com.") are acceptable and treated identically to domain names 
                           // without a terminating dot. (Domain search paths and relative domain names are not supported.) 
        
);
[ public ]
SFCError AddQuestion(
    AEEDNSType dnsType             // dNS question type
    AEEDNSClass dnsClass           // dNS class
    SFXAnsiStringConstRef domain   // zero-terminated string representing a domain name in dotted notation (for example, "example.com"). 
                                   // single dot terminators (e.g. "example.com.") are acceptable and treated identically to domain names 
                                   // without a terminating dot. (Domain search paths and relative domain names are not supported.) 
        
);

Reference

BREW API IDNS_AddQuestion | AEEDNSType | AEEDNSClass


SFBDNS::GetResponse
Get the DNS response after the query completes.
[ public ]
SFCError GetResponse(
    AEEDNSResponse const ** response   // a pointer to a structure describing the response
);

Reference

BREW API IDNS_GetResponse | AEEDNSResponse


SFBDNS::NewInstance
Create a new SFBDNS instance.
[ public, static ]
SFBDNSSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBDNSSmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

SFBDNS::ParseDomain
Convert a DNS representation of a domain name into a zero-terminated string with dot (that is, period, or ".") delimiters.
[ public ]
ACharPtr ParseDomain(
    VoidConstPtr domain   
    SInt32Ptr value       
);
[ public ]
ACharPtr ParseDomain(
    SFXBufferConstRef domain   
    SInt32Ptr value            // if not null, the size of buffer is specified
);

Argument

domain

Pointer to the start of the domain name. This pointer must point into the DNS response data as described by an AEEDNSItem record. This can be used to decode domain values, or to decode values within the domain[] array.

value

Pointer to value to hold the number of bytes occupied by the domain name (in the source byte array, not in the resulting string). In the case of a mal-formed domain name, *pcb will be set to zero. if value == null, this parameter will be ignored.

Description

Warning: Buffer size can not over the limit of a SInt32 value.

Reference

BREW API IDNS_ParseDomain


SFBDNS::Start
Start the query, and schedule callback to be called.
[ public ]
SFCError Start(
    PFNNOTIFY notify      // function to be called after the operation completes. 
                          // this will only be called if the operation starts successfully (that is, when Start() returned SUCCESS)
    VoidPtr data = null   // void Pointer which returns the notify() when called
);

Reference

BREW API IDNS_Start | PFNNOTIFY