Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <bt_sock.h>
Link against: bluetooth.lib

Class TInquirySockAddr

class TInquirySockAddr : public TSockAddr;

Description

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 TInquirySockAddr::BTAddr()const 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(const TSockAddr &,TNameEntry &,TRequestStatus &), RHostResolver::GetByName(const TDesC &,TNameEntry &,TRequestStatus &), or RHostResolver::Next(TNameEntry &,TRequestStatus &) with Bluetooth protocol are:

1) If you operate on one instance of RHostResolver you can perform only one request by calling either RHostResolver::GetByAddress(const TSockAddr &,TNameEntry &,TRequestStatus &) or RHostResolver::GetByName(const TDesC &,TNameEntry &,TRequestStatus &). 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(const TSockAddr &,TNameEntry &,TRequestStatus &) or RHostResolver::GetByName(const TDesC &,TNameEntry &,TRequestStatus &) 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.

Derivation

Members

Defined in TInquirySockAddr:


Construction and destruction


TInquirySockAddr()

IMPORT_C TInquirySockAddr();

Description

Constructor for TInquirySockAddr object


TInquirySockAddr(const TSockAddr &)

IMPORT_C TInquirySockAddr(const TSockAddr &aSockAddr);

Description

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 &aSockAddr

a previously filled TSockAddr

[Top]


Member functions


BTAddr()const

IMPORT_C TBTDevAddr BTAddr() const;

Description

Getter.

Return value

TBTDevAddr

The device address specified by this Socket address.


SetBTAddr(const TBTDevAddr &)

IMPORT_C void SetBTAddr(const TBTDevAddr &aRemote);

Description

Setter.

Parameters

const TBTDevAddr &aRemote

is bluetooth device address


Cast(const TSockAddr &)

IMPORT_C static TInquirySockAddr& Cast(const TSockAddr &aSockAddr);

Description

Utility function to downcast a TSockAddr to a TInquirySockAddr

Parameters

const TSockAddr &aSockAddr

Represents an end point address

Return value

TInquirySockAddr &

Socket address used for inquiries


MajorServiceClass()const

IMPORT_C TUint16 MajorServiceClass() const;

Description

Getter for major service class of the device

Return value

TUint16

The major service class of device


SetMajorServiceClass(TUint16)

IMPORT_C void SetMajorServiceClass(TUint16 aClass);

Description

Sets major service class of the device

Parameters

TUint16 aClass

is major service class to be assigned


MajorClassOfDevice()const

IMPORT_C TUint8 MajorClassOfDevice() const;

Description

Getter for major device class

Return value

TUint8

The major class of device


SetMajorClassOfDevice(TUint8)

IMPORT_C void SetMajorClassOfDevice(TUint8 aMajorClassOfDevice);

Description

Sets major device class

Parameters

TUint8 aMajorClassOfDevice

is major class of device to be assigned


MinorClassOfDevice()const

IMPORT_C TUint8 MinorClassOfDevice() const;

Description

Getter for minor device class

Return value

TUint8

The minor class of device


SetMinorClassOfDevice(TUint8)

IMPORT_C void SetMinorClassOfDevice(TUint8 aMinorClassOfDevice);

Description

Sets minor device class

Parameters

TUint8 aMinorClassOfDevice

is minor device class to be assigned


IAC()const

IMPORT_C TUint IAC() const;

Description

Getter for Inquiry Access Code

Return value

TUint

Inquiry Access Code


SetIAC(const TUint)

IMPORT_C void SetIAC(const TUint aIAC);

Description

Sets the Inquiry Access Code

Parameters

const TUint aIAC

is Inquiry Access Code to be assigned


Action()const

IMPORT_C TUint8 Action() const;

Description

Utility function to get the host resolve action option

Return value

TUint8

action which can be KHostResInquiry and/or KHostResName


SetAction(TUint8)

IMPORT_C void SetAction(TUint8 aFlags);

Description

Utility function to set the host resolve action option

Parameters

TUint8 aFlags

can be KHostResInquiry and/or KHostResName


Version()const

IMPORT_C TVersion Version() const;

Description

Getter

Return value

TVersion

version information


Rssi()const

IMPORT_C TInt8 Rssi() const;

Description

Utility function to get TInquirySockAddr::SInquiryAddr

Return value

TInt8

TInquirySockAddr::SInquiryAddr class contained within the TInquirySockAddr


SetRssi(const TInt8)

IMPORT_C void SetRssi(const TInt8 aRssi);

Description

Parameters

const TInt8 aRssi


ResultFlags()const

IMPORT_C TUint8 ResultFlags() const;

Description

Return value

TUint8


SetResultFlags(TUint8)

IMPORT_C void SetResultFlags(TUint8 aResultFlags);

Description

Parameters

TUint8 aResultFlags


FormatTypeField()const

protected: IMPORT_C TUint8 FormatTypeField() const;

Description

Getter

Return value

TUint8

Format Type Field number

[Top]


Member enumerations


Enum TResolverResultFlags

TResolverResultFlags

Description

ERssiValid