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.
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 ) |
Private Member Functions | |
---|---|
TPtr8 | AddressPtr () |
SInquiryAddr & | InquiryAddrStruct () |
Public Member Enumerations | |
---|---|
enum | TResolverResultFlags { ERssiValid = 0x1 } |
Inherited Attributes | |
---|---|
TBuf8< KMaxSockAddrSize >::iBuf | |
TDes8::__DECLARE_TEST | |
TDes8::iMaxLength |
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
const TSockAddr & aSockAddr | a previously filled TSockAddr |
IMPORT_C TInquirySockAddr & | Cast | ( | const TSockAddr & | aSockAddr | ) | [static] |
Utility function to downcast a TSockAddr to a TInquirySockAddr
const TSockAddr & aSockAddr | Represents an end point address |
IMPORT_C TUint16 | MajorServiceClass | ( | ) | const |
Getter for major service class of the device
IMPORT_C void | SetAction | ( | TUint8 | aFlags | ) |
Utility function to set the host resolve action option
TUint8 aFlags | can be KHostResInquiry and/or KHostResName |
IMPORT_C void | SetBTAddr | ( | const TBTDevAddr & | aRemote | ) |
Setter.
const TBTDevAddr & 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.
TUint8 aType | is Format Type Field number to be assigned |
IMPORT_C void | SetIAC | ( | const TUint | aIAC | ) |
Sets the Inquiry Access Code
const TUint aIAC | is Inquiry Access Code to be assigned |
IMPORT_C void | SetMajorClassOfDevice | ( | TUint8 | aMajorClassOfDevice | ) |
Sets major device class
TUint8 aMajorClassOfDevice | is major class of device to be assigned |
IMPORT_C void | SetMajorServiceClass | ( | TUint16 | aClass | ) |
Sets major service class of the device
TUint16 aClass | is major service class to be assigned |
IMPORT_C void | SetMinorClassOfDevice | ( | TUint8 | aMinorClassOfDevice | ) |
Sets minor device class
TUint8 aMinorClassOfDevice | is minor device class to be assigned |
IMPORT_C void | SetResultFlags | ( | TUint8 | aResultFlags | ) |
TUint8 aResultFlags |
void | SetVersion | ( | TVersion | aVersion | ) | [protected] |
Sets a version number. Only the major and minor numbers of the TVersion parameter are used. Both these must be <=3.
TVersion aVersion | TVersion specifying version number to be assigned |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.