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

Inheritance diagram

 Inheritance diagram of SFBDNSConfig2Class

Version

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

Reference

BREW API IDNSConfig2

Member

Public Functions
SFCError GetServers( AEESockAddrStorage * servers , UInt16Ptr count )
Retrieve the current DNS server list.
static
SFBDNSConfig2Smp
NewInstance( SFBDNSSmpConstRef dns , SFCErrorPtr exception = null )
Create a new SFBDNSConfig2 instance.
static
SFBDNSConfig2Smp
NewInstance( SFBDNSSmpConstRef dns , AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBDNSConfig2 instance.
SFCError SelectNetworkEx( SInt32 network , UInt16 family )
Select a specific data network.
SFCError SetServers( AEESockAddrStorage const * servers , UInt16 count )
Specify DNS server(s) to query.
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.

SFBDNSConfig2::GetServers
Retrieve the current DNS server list.
[ public ]
SFCError GetServers(
    AEESockAddrStorage * servers   // pointer to an array of *count server addresses 
    UInt16Ptr count                // the number of servers 
);

Return value

  • AEE_NET_SUCCESS: if the servers were set
  • AEE_EMEMPTR: if one of pServers or pwCount is not a valid pointer

Reference

BREW API IDNSConfig2_GetServers


SFBDNSConfig2::NewInstance
Create a new SFBDNSConfig2 instance.
[ public, static ]
SFBDNSConfig2Smp NewInstance(
    SFBDNSSmpConstRef dns          // SFBDNS instance
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBDNSConfig2Smp NewInstance(
    SFBDNSSmpConstRef dns          // SFBDNS instance
    AEECLSID id                    // Class ID for the SFBDNSConfig2 instance
    SFCErrorPtr exception = null   // Error
);

SFBDNSConfig2::SelectNetworkEx
Select a specific data network.
[ public ]
SFCError SelectNetworkEx(
    SInt32 network   // data network type (AEE_NETWORK_*) 
    UInt16 family    // address family (AEE_AF_*) 
);

Return value

  • AEE_NET_SUCCESS: the data network was selected
  • AEE_NET_EINVAL: the network is not valid
  • AEE_NET_EOPNOTSUPP: the network has already been selected.
  • AEE_EFAILED: other error.
Other error codes are also possible.

Description

Most applications will not need to explicitly select the network.

Reference

BREW API IDNSConfig2_SelectNetworkEx


SFBDNSConfig2::SetServers
Specify DNS server(s) to query.
[ public ]
SFCError SetServers(
    AEESockAddrStorage const * servers   // pointer to an array of count server addresses 
    UInt16 count                         // the number of servers
);

Return value

  • AEE_NET_SUCCESS: if the servers were set
  • AEE_EMEMPTR: if pServers is not a valid pointer
  • AEE_EFAILED: other error.

Reference

BREW API IDNSConfig_SetServers