TBTRegistrySearch Class Reference

class TBTRegistrySearch

Set search criteria on the Bluetooth Registry.

The search logic is "AND", so if device bonded is set, and code set to headsets the search results contain all the bonded headsets in the registry.

Other things can be added to the search criteria e.g. recently used headsets can easil be found by adding in the LastUsed criterion.

Public Member Functions
TBTRegistrySearch()
TBTRegistrySearch(const TBTRegistrySearch &)
IMPORT_C voidFindAddress(const TBTDevAddr &)
IMPORT_C voidFindAll()
IMPORT_C voidFindBluetoothName(const TDesC8 &)
IMPORT_C voidFindBonded()
IMPORT_C voidFindCoD(const TBTDeviceClass &)
IMPORT_C voidFindCoD(const TBTDeviceClass &, TBTDeviceClassSearch)
IMPORT_C voidFindCurrentProcessOwned()
IMPORT_C voidFindFriendlyName(const TDesC &)
IMPORT_C voidFindSinceSeen(const TTime &)
IMPORT_C voidFindSinceUsed(const TTime &)
IMPORT_C voidFindTrusted()
IMPORT_C voidFindUiCookie(TUint32)
IMPORT_C voidFindUiCookie(TUint32, TUint32)
IMPORT_C voidReset()
IMPORT_C TBTRegistrySearch &operator=(const TBTRegistrySearch &)
Private Member Enumerations
enumTSearchMask {
EAddress = 0x0001, EBonded = 0x0002, ETrusted = 0x0004, ECoD = 0x0008, ECoDMajorDev = 0x0010, ECoDMinorDev = 0x0020, ECoDService = 0x0040, ELastSeen = 0x0080, ELastUsed = 0x0100, EBTName = 0x0200, EFriendlyName = 0x0400, EUiCookie = 0x2000, EProcess = 0x4000, EAll = 0x8000, EExtension = 0x80000000
}
Private Attributes
TPtrC8 iBluetoothName
TUid iCurrentProcessSID
TBTDevAddr iDeviceAddress
TBTDeviceClass iDeviceClass
TPtrC iFriendlyName
TTime iLastSeen
TTime iLastUsed
TUint iSearchMask
TUint32 iUiCookie
TUint32 iUiCookieMask

Constructor & Destructor Documentation

TBTRegistrySearch()

IMPORT_CTBTRegistrySearch()

Default constructor

TBTRegistrySearch(const TBTRegistrySearch &)

IMPORT_CTBTRegistrySearch(const TBTRegistrySearch &aSearch)

Copy Constructor

Parameters

const TBTRegistrySearch & aSearch

Member Functions Documentation

FindAddress(const TBTDevAddr &)

IMPORT_C voidFindAddress(const TBTDevAddr &aAddress)

Add search criterion to search for given device

Parameters

const TBTDevAddr & aAddressaddress of device to search for

FindAll()

IMPORT_C voidFindAll()

Add search criterion to search for finding all devices

FindBluetoothName(const TDesC8 &)

IMPORT_C voidFindBluetoothName(const TDesC8 &aName)

Add search criterion to search for devices with some Bluetooth device name

Parameters

const TDesC8 & aNamedevice name to search for Add search criteria of specific Bluetooth name

FindBonded()

IMPORT_C voidFindBonded()

Add search criterion for bonded devices

FindCoD(const TBTDeviceClass &)

IMPORT_C voidFindCoD(const TBTDeviceClass &aClass)

Add search criterion to search for specific CoD TBTDeviceClass

Parameters

const TBTDeviceClass & aClassThe CoD to search

FindCoD(const TBTDeviceClass &, TBTDeviceClassSearch)

IMPORT_C voidFindCoD(const TBTDeviceClass &aClass,
TBTDeviceClassSearchaPref
)

Add search criterion to search for certain classes of device TBTDeviceClass enum TBTDeviceClassSearch

Parameters

const TBTDeviceClass & aClassthe device class to search for
TBTDeviceClassSearch aPrefdescribes the type of device search to perform

FindCurrentProcessOwned()

IMPORT_C voidFindCurrentProcessOwned()

Add search criterion to search for devices added by the current process

FindFriendlyName(const TDesC &)

IMPORT_C voidFindFriendlyName(const TDesC &aName)

Add search criterion to search for devices with some friendly name

Parameters

const TDesC & aNamedevice name to search for

FindSinceSeen(const TTime &)

IMPORT_C voidFindSinceSeen(const TTime &aLastSeen)

Add search criterion to search for devices seen since given date NOTE not currently implemented

Parameters

const TTime & aLastSeendate from which to find devices

FindSinceUsed(const TTime &)

IMPORT_C voidFindSinceUsed(const TTime &aLastUsed)

Add search criterion to search for devices used since given date

Parameters

const TTime & aLastUseddate from which to find devices

FindTrusted()

IMPORT_C voidFindTrusted()

Add search criterion for trusted devices

FindUiCookie(TUint32)

IMPORT_C voidFindUiCookie(TUint32aUiCookie)

Add search criterion to search for devices with a particular UI Cookie value.

Parameters

TUint32 aUiCookieThe particular UI cookie value to search on.

FindUiCookie(TUint32, TUint32)

IMPORT_C voidFindUiCookie(TUint32aUiCookie,
TUint32aUiCookieMask
)

Add search criterion to search for devices with a particular UI Cookie value.

Parameters

TUint32 aUiCookieThe particular UI cookie value to search on.
TUint32 aUiCookieMaskThe mask to indicate which bits of the cookie value are to be searched on.

Reset()

IMPORT_C voidReset()

Resets the search criteria

operator=(const TBTRegistrySearch &)

IMPORT_C TBTRegistrySearch &operator=(const TBTRegistrySearch &aSearch)

Assignment operator

Parameters

const TBTRegistrySearch & aSearchthe search pattern to which to assign this

Member Enumerations Documentation

Enum TSearchMask

Enumerators

EAddress = 0x0001
EBonded = 0x0002
ETrusted = 0x0004
ECoD = 0x0008
ECoDMajorDev = 0x0010
ECoDMinorDev = 0x0020
ECoDService = 0x0040
ELastSeen = 0x0080
ELastUsed = 0x0100
EBTName = 0x0200
EFriendlyName = 0x0400
EUiCookie = 0x2000
EProcess = 0x4000
EAll = 0x8000
EExtension = 0x80000000

Member Data Documentation

TPtrC8 iBluetoothName

TPtrC8 iBluetoothName[private]

TUid iCurrentProcessSID

TUid iCurrentProcessSID[private]

TBTDevAddr iDeviceAddress

TBTDevAddr iDeviceAddress[private]

TBTDeviceClass iDeviceClass

TBTDeviceClass iDeviceClass[private]

TPtrC iFriendlyName

TPtrC iFriendlyName[private]

TTime iLastSeen

TTime iLastSeen[private]

TTime iLastUsed

TTime iLastUsed[private]

TUint iSearchMask

TUint iSearchMask[private]

TUint32 iUiCookie

TUint32 iUiCookie[private]

TUint32 iUiCookieMask

TUint32 iUiCookieMask[private]