RHostResolver Class Reference

class RHostResolver : public RSubSessionBase

Provides an interface to host name resolution services, such as DNS, that may be provided by particular protocol modules.

The interface provides functions to access the following facilities:

Obtaining names from addresses.

Obtaining addresses from names.

Getting and setting local host name.

Not all actual services provide all these facilities. You should also consult the documentation on the protocol you are intending to use. Functions return KErrNotSupported if the protocol does not support a given operation. Note that a description of the protocol family name resolution capabilities is available at run-time from TProtocolDesc::iNamingServices.

Before using any service, a connection to a socket server session must be made.

Each function is available in both synchronous and asynchronous versions.

A single RHostResolver can only perform one request of any type at once. A client is panicked if it makes two requests.

Inherits from

Public Member Functions
IMPORT_C voidCancel()
IMPORT_C voidClose()
IMPORT_C voidGetByAddress(const TSockAddr &, TNameEntry &, TRequestStatus &)
IMPORT_C TIntGetByAddress(const TSockAddr &, TNameEntry &)
IMPORT_C voidGetByName(const TDesC &, TNameEntry &, TRequestStatus &)
IMPORT_C TIntGetByName(const TDesC &, TNameEntry &)
IMPORT_C TIntGetHostName(TDes &)
IMPORT_C voidGetHostName(TDes &, TRequestStatus &)
IMPORT_C voidNext(TNameEntry &, TRequestStatus &)
IMPORT_C TIntNext(TNameEntry &)
IMPORT_C TIntOpen(RSocketServ &, TUint, TUint)
IMPORT_C TIntOpen(RSocketServ &, TUint, TUint, RConnection &)
IMPORT_C voidQuery(const TDesC8 &, TDes8 &, TRequestStatus &)
IMPORT_C TIntQuery(const TDesC8 &, TDes8 &)
IMPORT_C voidQueryGetNext(TDes8 &, TRequestStatus &)
IMPORT_C TIntQueryGetNext(TDes8 &)
IMPORT_C TIntSetHostName(const TDesC &)
IMPORT_C TIntSetOpt(TUint, TUint, const TDesC8 &)
Inherited Functions
RSubSessionBase::CloseSubSession(TInt)
RSubSessionBase::CreateAutoCloseSubSession(RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::RSubSessionBase()
RSubSessionBase::Send(TInt)const
RSubSessionBase::Send(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt)const
RSubSessionBase::SendReceive(TInt,TRequestStatus &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSubSessionBase::Session()const
RSubSessionBase::SubSessionHandle()const

Member Functions Documentation

Cancel()

IMPORT_C voidCancel()

Close()

IMPORT_C voidClose()

GetByAddress(const TSockAddr &, TNameEntry &, TRequestStatus &)

IMPORT_C voidGetByAddress(const TSockAddr &anAddr,
TNameEntry &aResult,
TRequestStatus &aStatus
)

Parameters

const TSockAddr & anAddr
TNameEntry & aResult
TRequestStatus & aStatus

GetByAddress(const TSockAddr &, TNameEntry &)

IMPORT_C TIntGetByAddress(const TSockAddr &anAddr,
TNameEntry &aResult
)

Parameters

const TSockAddr & anAddr
TNameEntry & aResult

GetByName(const TDesC &, TNameEntry &, TRequestStatus &)

IMPORT_C voidGetByName(const TDesC &aName,
TNameEntry &aResult,
TRequestStatus &aStatus
)

Parameters

const TDesC & aName
TNameEntry & aResult
TRequestStatus & aStatus

GetByName(const TDesC &, TNameEntry &)

IMPORT_C TIntGetByName(const TDesC &aName,
TNameEntry &aResult
)

Parameters

const TDesC & aName
TNameEntry & aResult

GetHostName(TDes &)

IMPORT_C TIntGetHostName(TDes &aName)

Parameters

TDes & aName

GetHostName(TDes &, TRequestStatus &)

IMPORT_C voidGetHostName(TDes &aName,
TRequestStatus &aStatus
)

Parameters

TDes & aName
TRequestStatus & aStatus

Next(TNameEntry &, TRequestStatus &)

IMPORT_C voidNext(TNameEntry &aResult,
TRequestStatus &aStatus
)

Parameters

TNameEntry & aResult
TRequestStatus & aStatus

Next(TNameEntry &)

IMPORT_C TIntNext(TNameEntry &aResult)

Parameters

TNameEntry & aResult

Open(RSocketServ &, TUint, TUint)

IMPORT_C TIntOpen(RSocketServ &aSocketServer,
TUintanAddrFamily,
TUintaProtocol
)

Parameters

RSocketServ & aSocketServer
TUint anAddrFamily
TUint aProtocol

Open(RSocketServ &, TUint, TUint, RConnection &)

IMPORT_C TIntOpen(RSocketServ &aSocketServer,
TUintanAddrFamily,
TUintaProtocol,
RConnection &aConnection
)

Parameters

RSocketServ & aSocketServer
TUint anAddrFamily
TUint aProtocol
RConnection & aConnection

Query(const TDesC8 &, TDes8 &, TRequestStatus &)

IMPORT_C voidQuery(const TDesC8 &aQuery,
TDes8 &aResult,
TRequestStatus &aStatus
)

Parameters

const TDesC8 & aQuery
TDes8 & aResult
TRequestStatus & aStatus

Query(const TDesC8 &, TDes8 &)

IMPORT_C TIntQuery(const TDesC8 &aQuery,
TDes8 &aResult
)

Parameters

const TDesC8 & aQuery
TDes8 & aResult

QueryGetNext(TDes8 &, TRequestStatus &)

IMPORT_C voidQueryGetNext(TDes8 &aResult,
TRequestStatus &aStatus
)

Parameters

TDes8 & aResult
TRequestStatus & aStatus

QueryGetNext(TDes8 &)

IMPORT_C TIntQueryGetNext(TDes8 &aResult)

Parameters

TDes8 & aResult

SetHostName(const TDesC &)

IMPORT_C TIntSetHostName(const TDesC &aName)

Parameters

const TDesC & aName

SetOpt(TUint, TUint, const TDesC8 &)

IMPORT_C TIntSetOpt(TUintanOptionName,
TUintanOptionLevel,
const TDesC8 &anOption =  TPtrC8(NULL, 0)
)

Parameters

TUint anOptionName
TUint anOptionLevel
const TDesC8 & anOption =  TPtrC8(NULL, 0)