#include <bt_sock.h>
class TInquirySockAddr : public TSockAddr |
Public Member Enumerations | |
---|---|
enum | TResolverResultFlags { ERssiValid } |
Public Member Functions | |
---|---|
TInquirySockAddr() | |
TInquirySockAddr(const TSockAddr &) | |
IMPORT_C TUint8 | Action() |
IMPORT_C TBTDevAddr | BTAddr() |
IMPORT_C TInquirySockAddr & | Cast(const TSockAddr &) |
IMPORT_C TUint | IAC() |
IMPORT_C TUint8 | MajorClassOfDevice() |
IMPORT_C TUint16 | MajorServiceClass() |
IMPORT_C TUint8 | MinorClassOfDevice() |
IMPORT_C TUint8 | ResultFlags() |
IMPORT_C TInt8 | Rssi() |
IMPORT_C void | SetAction(TUint8) |
IMPORT_C void | SetBTAddr(const TBTDevAddr &) |
IMPORT_C void | SetIAC(const TUint) |
IMPORT_C void | SetMajorClassOfDevice(TUint8) |
IMPORT_C void | SetMajorServiceClass(TUint16) |
IMPORT_C void | SetMinorClassOfDevice(TUint8) |
IMPORT_C void | SetResultFlags(TUint8) |
IMPORT_C void | SetRssi(const TInt8) |
IMPORT_C TVersion | Version() |
Protected Member Functions | |
---|---|
IMPORT_C TUint8 | FormatTypeField() |
void | SetFormatTypeField(TUint8) |
void | SetVersion(TVersion) |
Inherited Attributes | |
---|---|
TBuf8< KMaxSockAddrSize >::iBuf | |
TDes8::__DECLARE_TEST | |
TDes8::iMaxLength |
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.
IMPORT_C | TInquirySockAddr | ( | 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
Parameter | Description |
---|---|
aSockAddr | a previously filled TSockAddr |
IMPORT_C TUint8 | Action | ( | ) | const |
Utility function to get the host resolve action option
Returns: action which can be KHostResInquiry and/or KHostResName
IMPORT_C TBTDevAddr | BTAddr | ( | ) | const |
Getter.
Returns: The device address specified by this Socket address.
IMPORT_C TInquirySockAddr & | Cast | ( | const TSockAddr & | aSockAddr | ) | [static] |
Utility function to downcast a TSockAddr to a TInquirySockAddr
Parameter | Description |
---|---|
aSockAddr | Represents an end point address |
Returns: Socket address used for inquiries
IMPORT_C TUint8 | MajorClassOfDevice | ( | ) | const |
Getter for major device class
Returns: The major class of device
IMPORT_C TUint16 | MajorServiceClass | ( | ) | const |
Getter for major service class of the device
Returns: The major service class of device
IMPORT_C TUint8 | MinorClassOfDevice | ( | ) | const |
Getter for minor device class
Returns: The minor class of device
IMPORT_C TInt8 | Rssi | ( | ) | const |
Utility function to get SInquiryAddr
Returns: SInquiryAddr class contained within the TInquirySockAddr
IMPORT_C void | SetAction | ( | TUint8 | aFlags | ) |
Utility function to set the host resolve action option
Parameter | Description |
---|---|
aFlags | can be KHostResInquiry and/or KHostResName |
IMPORT_C void | SetBTAddr | ( | const TBTDevAddr & | aRemote | ) |
Setter.
Parameter | Description |
---|---|
aRemote | is bluetooth device address |
void | SetFormatTypeField | ( | TUint8 | aType | ) | [protected] |
Sets the Format Type Field number. This is defined as a 2 bit value and so must be <=3.
Parameter | Description |
---|---|
aType | is Format Type Field number to be assigned |
IMPORT_C void | SetIAC | ( | const TUint | aIAC | ) |
Sets the Inquiry Access Code
Parameter | Description |
---|---|
aIAC | is Inquiry Access Code to be assigned |
IMPORT_C void | SetMajorClassOfDevice | ( | TUint8 | aMajorClassOfDevice | ) |
Sets major device class
Parameter | Description |
---|---|
aMajorClassOfDevice | is major class of device to be assigned |
IMPORT_C void | SetMajorServiceClass | ( | TUint16 | aClass | ) |
Sets major service class of the device
Parameter | Description |
---|---|
aClass | is major service class to be assigned |
IMPORT_C void | SetMinorClassOfDevice | ( | TUint8 | aMinorClassOfDevice | ) |
Sets minor device class
Parameter | Description |
---|---|
aMinorClassOfDevice | is minor device class to be assigned |