TInquirySockAddr Class Reference

class TInquirySockAddr : public TSockAddr

Socket address class used for inquiries.

Used to specify the inquiry request, and then filled with information about remote devices discovered through the inquiry process.

Use the BTAddr() method to extract the device address to connect to.

Note: Usage of RHostResolver class for Bluetooth protocol.

The RHostResolver class is a generic interface to host name resolution services, such as DNS, that may be provided by particular protocol modules.

The points to remember when using RHostResolver::GetByAddress(), RHostResolver::GetByName(), or RHostResolver::Next() with Bluetooth protocol are:

1) If you operate on one instance of RHostResolver you can perform only one request by calling either RHostResolver::GetByAddress() or RHostResolver::GetByName(). If these functions are called again and if there is more than one possible response for a given host name then that will be returned (The host resolving process will not start from the beginning). It is exactly as if the RHostResolve::Next() method was called.

2) In order to start resolving new hosts from the beginning using the same instance of RHostResolver, the instance must be closed and reopened again.

3) In order to perform several RHostResolver requests they should be issued on separate instances of RHostResolver (many RHostResolver instances might exist and perform requests at the same time).

4) The KHostResIgnoreCache flag is only valid when issuing RHostResolver::GetByAddress() or RHostResolver::GetByName() request for the first time.

5) As an RHostResolver is only intended to be used once, it is recommended that it be closed as soon as it is finished with as the semantics of Cancel merely indicates that one client server request should be cancelled.

Nested Classes and Structures

Public Member Functions
TInquirySockAddr()
TInquirySockAddr(const TSockAddr &)
IMPORT_C TUint8Action()
IMPORT_C TBTDevAddrBTAddr()
IMPORT_C TInquirySockAddr &Cast(const TSockAddr &)
IMPORT_C TUintIAC()
IMPORT_C TUint8MajorClassOfDevice()
IMPORT_C TUint16MajorServiceClass()
IMPORT_C TUint8MinorClassOfDevice()
IMPORT_C TUint8ResultFlags()
IMPORT_C TInt8Rssi()
IMPORT_C voidSetAction(TUint8)
IMPORT_C voidSetBTAddr(const TBTDevAddr &)
IMPORT_C voidSetIAC(const TUint)
IMPORT_C voidSetMajorClassOfDevice(TUint8)
IMPORT_C voidSetMajorServiceClass(TUint16)
IMPORT_C voidSetMinorClassOfDevice(TUint8)
IMPORT_C voidSetResultFlags(TUint8)
IMPORT_C voidSetRssi(const TInt8)
IMPORT_C TVersionVersion()
Protected Member Functions
IMPORT_C TUint8FormatTypeField()
voidSetFormatTypeField(TUint8)
voidSetVersion(TVersion)
Private Member Functions
TPtr8 AddressPtr()
SInquiryAddr &InquiryAddrStruct()
Inherited Functions
TBuf8< KMaxSockAddrSize >::TBuf8()
TBuf8< KMaxSockAddrSize >::TBuf8(TInt)
TBuf8< KMaxSockAddrSize >::TBuf8(const TDesC8 &)
TBuf8< KMaxSockAddrSize >::TBuf8(const TUint8 *)
TBuf8< KMaxSockAddrSize >::operator=(const TBuf8< S > &)
TBuf8< KMaxSockAddrSize >::operator=(const TDesC8 &)
TBuf8< KMaxSockAddrSize >::operator=(const TUint8 *)
TBufBase8::TBufBase8(TInt)
TBufBase8::TBufBase8(TInt,TInt)
TBufBase8::TBufBase8(const TDesC8 &,TInt)
TBufBase8::TBufBase8(const TUint8 *,TInt)
TDes8::Append(TChar)
TDes8::Append(const TDesC16 &)
TDes8::Append(const TDesC8 &)
TDes8::Append(const TUint8 *,TInt)
TDes8::AppendFill(TChar,TInt)
TDes8::AppendFormat(TRefByValue< const TDesC8 >,...)
TDes8::AppendFormat(TRefByValue< const TDesC8 >,TDes8Overflow *,...)
TDes8::AppendFormatList(const TDesC8 &,VA_LIST,TDes8Overflow *)
TDes8::AppendJustify(const TDesC8 &,TInt,TAlign,TChar)
TDes8::AppendJustify(const TDesC8 &,TInt,TInt,TAlign,TChar)
TDes8::AppendJustify(const TUint8 *,TInt,TAlign,TChar)
TDes8::AppendJustify(const TUint8 *,TInt,TInt,TAlign,TChar)
TDes8::AppendNum(TInt64)
TDes8::AppendNum(TReal,const TRealFormat &)
TDes8::AppendNum(TUint64,TRadix)
TDes8::AppendNumFixedWidth(TUint,TRadix,TInt)
TDes8::AppendNumFixedWidthUC(TUint,TRadix,TInt)
TDes8::AppendNumUC(TUint64,TRadix)
TDes8::Capitalize()
TDes8::Collapse()
TDes8::Collate()
TDes8::Copy(const TDesC16 &)
TDes8::Copy(const TDesC8 &)
TDes8::Copy(const TUint8 *)
TDes8::Copy(const TUint8 *,TInt)
TDes8::CopyC(const TDesC8 &)
TDes8::CopyCP(const TDesC8 &)
TDes8::CopyF(const TDesC8 &)
TDes8::CopyLC(const TDesC8 &)
TDes8::CopyUC(const TDesC8 &)
TDes8::Delete(TInt,TInt)
TDes8::DoAppendNum(TUint64,TRadix,TUint,TInt)
TDes8::DoPadAppendNum(TInt,TInt,const TUint8 *)
TDes8::Expand()
TDes8::Fill(TChar)
TDes8::Fill(TChar,TInt)
TDes8::FillZ()
TDes8::FillZ(TInt)
TDes8::Fold()
TDes8::Format(TRefByValue< const TDesC8 >,...)
TDes8::FormatList(const TDesC8 &,VA_LIST)
TDes8::Insert(TInt,const TDesC8 &)
TDes8::Justify(const TDesC8 &,TInt,TAlign,TChar)
TDes8::LeftTPtr(TInt)const
TDes8::LowerCase()
TDes8::MaxLength()const
TDes8::MaxSize()const
TDes8::MidTPtr(TInt)const
TDes8::MidTPtr(TInt,TInt)const
TDes8::Num(TInt64)
TDes8::Num(TReal,const TRealFormat &)
TDes8::Num(TUint64,TRadix)
TDes8::NumFixedWidth(TUint,TRadix,TInt)
TDes8::NumFixedWidthUC(TUint,TRadix,TInt)
TDes8::NumUC(TUint64,TRadix)
TDes8::PtrZ()
TDes8::Repeat(const TDesC8 &)
TDes8::Repeat(const TUint8 *,TInt)
TDes8::Replace(TInt,TInt,const TDesC8 &)
TDes8::RightTPtr(TInt)const
TDes8::SetLength(TInt)
TDes8::SetMax()
TDes8::Swap(TDes8 &)
TDes8::TDes8()
TDes8::TDes8(TInt,TInt,TInt)
TDes8::Trim()
TDes8::TrimAll()
TDes8::TrimLeft()
TDes8::TrimRight()
TDes8::UpperCase()
TDes8::WPtr()const
TDes8::Zero()
TDes8::ZeroTerminate()
TDes8::operator+=(const TDesC8 &)
TDes8::operator=(const TDes8 &)
TDes8::operator[](TInt)
TDes8::operator[](TInt)const
TDesC8::Alloc()const
TDesC8::AllocL()const
TDesC8::AllocLC()const
TDesC8::AtC(TInt)const
TDesC8::Compare(const TDesC8 &)const
TDesC8::CompareC(const TDesC8 &)const
TDesC8::CompareF(const TDesC8 &)const
TDesC8::DoSetLength(TInt)
TDesC8::Find(const TDesC8 &)const
TDesC8::Find(const TUint8 *,TInt)const
TDesC8::FindC(const TDesC8 &)const
TDesC8::FindC(const TUint8 *,TInt)const
TDesC8::FindF(const TDesC8 &)const
TDesC8::FindF(const TUint8 *,TInt)const
TDesC8::Left(TInt)const
TDesC8::Length()const
TDesC8::Locate(TChar)const
TDesC8::LocateF(TChar)const
TDesC8::LocateReverse(TChar)const
TDesC8::LocateReverseF(TChar)const
TDesC8::Match(const TDesC8 &)const
TDesC8::MatchC(const TDesC8 &)const
TDesC8::MatchF(const TDesC8 &)const
TDesC8::Mid(TInt)const
TDesC8::Mid(TInt,TInt)const
TDesC8::Ptr()const
TDesC8::Right(TInt)const
TDesC8::Size()const
TDesC8::TDesC8()
TDesC8::TDesC8(TInt,TInt)
TDesC8::Type()const
TDesC8::operator!=(const TDesC8 &)const
TDesC8::operator<(const TDesC8 &)const
TDesC8::operator<=(const TDesC8 &)const
TDesC8::operator==(const TDesC8 &)const
TDesC8::operator>(const TDesC8 &)const
TDesC8::operator>=(const TDesC8 &)const
TSockAddr::CmpPort(const TSockAddr &)const
TSockAddr::Family()const
TSockAddr::GetUserLen()
TSockAddr::Port()const
TSockAddr::SetFamily(TUint)
TSockAddr::SetPort(TUint)
TSockAddr::SetUserLen(TInt)
TSockAddr::TSockAddr()
TSockAddr::TSockAddr(TUint)
TSockAddr::UserPtr()const
Public Member Enumerations
enumTResolverResultFlags { ERssiValid = 0x1 }
Inherited Attributes
TBuf8< KMaxSockAddrSize >::iBuf
TDes8::__DECLARE_TEST
TDes8::iMaxLength

Constructor & Destructor Documentation

TInquirySockAddr()

IMPORT_CTInquirySockAddr()

Constructor for TInquirySockAddr object

TInquirySockAddr(const TSockAddr &)

IMPORT_CTInquirySockAddr(const TSockAddr &aSockAddr)

Constructor taking socket address base class reference. Rather like a copy constructor

Copies the port number and the entirety of the user data, which contains the Bluetooth Address

The family type is set to KBTAddrFamily

Parameters

const TSockAddr & aSockAddra previously filled TSockAddr

Member Functions Documentation

Action()

IMPORT_C TUint8Action()const

Utility function to get the host resolve action option

AddressPtr()

TPtr8 AddressPtr()const [private]

Getter

BTAddr()

IMPORT_C TBTDevAddrBTAddr()const

Getter.

Cast(const TSockAddr &)

IMPORT_C TInquirySockAddr &Cast(const TSockAddr &aSockAddr)[static]

Utility function to downcast a TSockAddr to a TInquirySockAddr

Parameters

const TSockAddr & aSockAddrRepresents an end point address

FormatTypeField()

IMPORT_C TUint8FormatTypeField()const [protected]

Getter

IAC()

IMPORT_C TUintIAC()const

Getter for Inquiry Access Code

InquiryAddrStruct()

SInquiryAddr &InquiryAddrStruct()const [private]

MajorClassOfDevice()

IMPORT_C TUint8MajorClassOfDevice()const

Getter for major device class

MajorServiceClass()

IMPORT_C TUint16MajorServiceClass()const

Getter for major service class of the device

MinorClassOfDevice()

IMPORT_C TUint8MinorClassOfDevice()const

Getter for minor device class

ResultFlags()

IMPORT_C TUint8ResultFlags()const

Rssi()

IMPORT_C TInt8Rssi()const

Utility function to get SInquiryAddr

SetAction(TUint8)

IMPORT_C voidSetAction(TUint8aFlags)

Utility function to set the host resolve action option

Parameters

TUint8 aFlagscan be KHostResInquiry and/or KHostResName

SetBTAddr(const TBTDevAddr &)

IMPORT_C voidSetBTAddr(const TBTDevAddr &aRemote)

Setter.

Parameters

const TBTDevAddr & aRemoteis bluetooth device address

SetFormatTypeField(TUint8)

voidSetFormatTypeField(TUint8aType)[protected]

Sets the Format Type Field number. This is defined as a 2 bit value and so must be <=3.

Parameters

TUint8 aTypeis Format Type Field number to be assigned

SetIAC(const TUint)

IMPORT_C voidSetIAC(const TUintaIAC)

Sets the Inquiry Access Code

Parameters

const TUint aIACis Inquiry Access Code to be assigned

SetMajorClassOfDevice(TUint8)

IMPORT_C voidSetMajorClassOfDevice(TUint8aMajorClassOfDevice)

Sets major device class

Parameters

TUint8 aMajorClassOfDeviceis major class of device to be assigned

SetMajorServiceClass(TUint16)

IMPORT_C voidSetMajorServiceClass(TUint16aClass)

Sets major service class of the device

Parameters

TUint16 aClassis major service class to be assigned

SetMinorClassOfDevice(TUint8)

IMPORT_C voidSetMinorClassOfDevice(TUint8aMinorClassOfDevice)

Sets minor device class

Parameters

TUint8 aMinorClassOfDeviceis minor device class to be assigned

SetResultFlags(TUint8)

IMPORT_C voidSetResultFlags(TUint8aResultFlags)

Parameters

TUint8 aResultFlags

SetRssi(const TInt8)

IMPORT_C voidSetRssi(const TInt8aRssi)

Parameters

const TInt8 aRssi

SetVersion(TVersion)

voidSetVersion(TVersionaVersion)[protected]

Sets a version number. Only the major and minor numbers of the TVersion parameter are used. Both these must be <=3.

Parameters

TVersion aVersionTVersion specifying version number to be assigned

Version()

IMPORT_C TVersionVersion()const

Getter

Member Enumerations Documentation

Enum TResolverResultFlags

Enumerators

ERssiValid = 0x1