|
||
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 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.
TSockAddr
- No description.
TInquirySockAddr
- Socket address class used for inquiries.
Defined in TInquirySockAddr
:
Action()const
Utility function to get the host resolve action option BTAddr()const
Getter. Cast(const TSockAddr &)
Utility function to downcast a TSockAddr to a TInquirySockAddr ERssiValid
FormatTypeField()const
Getter IAC()const
Getter for Inquiry Access Code MajorClassOfDevice()const
Getter for major device class MajorServiceClass()const
Getter for major service class of the device MinorClassOfDevice()const
Getter for minor device class ResultFlags()const
Rssi()const
Utility function to get TInquirySockAddr::SInquiryAddr
SetAction(TUint8)
Utility function to set the host resolve action option SetBTAddr(const TBTDevAddr &)
Setter. SetIAC(const TUint)
Sets the Inquiry Access Code SetMajorClassOfDevice(TUint8)
Sets major device class SetMajorServiceClass(TUint16)
Sets major service class of the device SetMinorClassOfDevice(TUint8)
Sets minor device class SetResultFlags(TUint8)
SetRssi(const TInt8)
TInquirySockAddr()
Constructor for TInquirySockAddr object TInquirySockAddr(const TSockAddr &)
Constructor taking socket address base class reference. Rather like a copy const...TResolverResultFlags
Version()const
Getter 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
|
IMPORT_C TBTDevAddr BTAddr() const;
Getter.
|
IMPORT_C void SetBTAddr(const TBTDevAddr &aRemote);
Setter.
|
IMPORT_C static TInquirySockAddr& Cast(const TSockAddr &aSockAddr);
Utility function to downcast a TSockAddr
to a TInquirySockAddr
|
|
IMPORT_C TUint16 MajorServiceClass() const;
Getter for major service class of the device
|
IMPORT_C void SetMajorServiceClass(TUint16 aClass);
Sets major service class of the device
|
IMPORT_C TUint8 MajorClassOfDevice() const;
Getter for major device class
|
IMPORT_C void SetMajorClassOfDevice(TUint8 aMajorClassOfDevice);
Sets major device class
|
IMPORT_C TUint8 MinorClassOfDevice() const;
Getter for minor device class
|
IMPORT_C void SetMinorClassOfDevice(TUint8 aMinorClassOfDevice);
Sets minor device class
|
IMPORT_C TUint IAC() const;
Getter for Inquiry Access Code
|
IMPORT_C void SetIAC(const TUint aIAC);
Sets the Inquiry Access Code
|
IMPORT_C TUint8 Action() const;
Utility function to get the host resolve action option
|
IMPORT_C void SetAction(TUint8 aFlags);
Utility function to set the host resolve action option
|
IMPORT_C TInt8 Rssi() const;
Utility function to get TInquirySockAddr::SInquiryAddr
|
protected: IMPORT_C TUint8 FormatTypeField() const;
Getter
|