Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Classes | Typedefs | Functions | Variables
direct_bt::BTSecurityRegistry Namespace Reference

Application toolkit providing BT security setup and its device association on a pattern matching basis, i.e. More...

Classes

struct  Entry
 

Typedefs

typedef bool(* AddressNameEntryMatchFunc) (const EUI48 &address, const std::string &name, const Entry &e)
 Function for user defined EUI48 address and name BTSecurityRegistry::Entry matching criteria and algorithm. More...
 
typedef bool(* AddressSubNameEntryMatchFunc) (const EUI48Sub &addressSub, const std::string &name, const Entry &e)
 Function for user defined EUI48Sub addressSub and name BTSecurityRegistry::Entry matching criteria and algorithm. More...
 
typedef bool(* NameEntryMatchFunc) (const std::string &name, const Entry &e)
 Function for user defined std::string name BTSecurityRegistry::Entry matching criteria and algorithm. More...
 

Functions

Entryget (const EUI48 &addr, const std::string &name, AddressNameEntryMatchFunc m) noexcept
 Returns a matching BTSecurityRegistry::Entry with the given. More...
 
Entryget (const EUI48Sub &addrSub, const std::string &name, AddressSubNameEntryMatchFunc m) noexcept
 Returns a matching BTSecurityRegistry::Entry with the given. More...
 
Entryget (const std::string &name, NameEntryMatchFunc m) noexcept
 Returns a matching BTSecurityRegistry::Entry with the given. More...
 
EntrygetStartOf (const EUI48 &addr, const std::string &name) noexcept
 Returns a matching Entry,. More...
 
EntrygetStartOf (const EUI48Sub &addrSub, const std::string &name) noexcept
 Returns a matching Entry,. More...
 
EntrygetStartOf (const std::string &name) noexcept
 Returns a matching Entry, which Entry::nameSub is set and the given. More...
 
EntrygetEqual (const EUI48Sub &addrSub, const std::string &name) noexcept
 Returns a matching Entry,. More...
 
EntrygetEqual (const std::string &name) noexcept
 Returns a matching Entry, which Entry::nameSub is set and the given. More...
 
jau::darray< Entry > & getEntries () noexcept
 Returns the reference of the current list of Entry, not a copy. More...
 
EntrygetOrCreate (const std::string &addrOrNameSub) noexcept
 Determines whether the given. More...
 
void clear () noexcept
 Clears internal list. More...
 
std::string allToString () noexcept
 

Variables

static jau::darray< EntrydevicesSecDetails
 

Detailed Description

Application toolkit providing BT security setup and its device association on a pattern matching basis, i.e.

EUI48Sub or name-sub.

Typedef Documentation

◆ AddressNameEntryMatchFunc

typedef bool(* direct_bt::BTSecurityRegistry::AddressNameEntryMatchFunc) (const EUI48 &address, const std::string &name, const Entry &e)

Function for user defined EUI48 address and name BTSecurityRegistry::Entry matching criteria and algorithm.

Return

true

if the given

address

or

name

matches with the BTSecurityRegistry::Entry.

Parameters
addressEUI48 address
nameoptional name, maybe empty
eEntry entry

Definition at line 95 of file BTSecurityRegistry.hpp.

◆ AddressSubNameEntryMatchFunc

typedef bool(* direct_bt::BTSecurityRegistry::AddressSubNameEntryMatchFunc) (const EUI48Sub &addressSub, const std::string &name, const Entry &e)

Function for user defined EUI48Sub addressSub and name BTSecurityRegistry::Entry matching criteria and algorithm.

Return

true

if the given

addressSub

or

name

matches with the BTSecurityRegistry::Entry.

Parameters
addressSubEUI48Sub address
nameoptional name, maybe empty
eEntry entry

Definition at line 108 of file BTSecurityRegistry.hpp.

◆ NameEntryMatchFunc

typedef bool(* direct_bt::BTSecurityRegistry::NameEntryMatchFunc) (const std::string &name, const Entry &e)

Function for user defined std::string name BTSecurityRegistry::Entry matching criteria and algorithm.

Return

true

if the given

name

matches with the BTSecurityRegistry::Entry.

Parameters
name
eEntry entry

Definition at line 120 of file BTSecurityRegistry.hpp.

Function Documentation

◆ allToString()

std::string direct_bt::BTSecurityRegistry::allToString ( )
noexcept
Examples
dbt_scanner10.cpp.

Definition at line 93 of file BTSecurityRegistry.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

void direct_bt::BTSecurityRegistry::clear ( )
noexcept

Clears internal list.

Definition at line 90 of file BTSecurityRegistry.cpp.

Here is the caller graph for this function:

◆ get() [1/3]

Entry * direct_bt::BTSecurityRegistry::get ( const EUI48 addr,
const std::string &  name,
AddressNameEntryMatchFunc  m 
)
noexcept

Returns a matching BTSecurityRegistry::Entry with the given.

addr

and/or

name

.

Matching criteria and algorithm is defined by the given AddressNameEntryMatchFunc.

Examples
test_type_traits_queries01.cpp.

Definition at line 36 of file BTSecurityRegistry.cpp.

Here is the caller graph for this function:

◆ get() [2/3]

Entry * direct_bt::BTSecurityRegistry::get ( const EUI48Sub addrSub,
const std::string &  name,
AddressSubNameEntryMatchFunc  m 
)
noexcept

Returns a matching BTSecurityRegistry::Entry with the given.

addrSub

and/or

name

.

Matching criteria and algorithm is defined by the given AddressSubNameEntryMatchFunc.

Definition at line 46 of file BTSecurityRegistry.cpp.

◆ get() [3/3]

Entry * direct_bt::BTSecurityRegistry::get ( const std::string &  name,
NameEntryMatchFunc  m 
)
noexcept

Returns a matching BTSecurityRegistry::Entry with the given.

name

.

Matching criteria and algorithm is defined by the given NameEntryMatchFunc.

Definition at line 56 of file BTSecurityRegistry.cpp.

◆ getEntries()

jau::darray< Entry > & direct_bt::BTSecurityRegistry::getEntries ( )
noexcept

Returns the reference of the current list of Entry, not a copy.

Definition at line 67 of file BTSecurityRegistry.cpp.

◆ getEqual() [1/2]

Entry* direct_bt::BTSecurityRegistry::getEqual ( const EUI48Sub addrSub,
const std::string &  name 
)
inlinenoexcept

Returns a matching Entry,.

Otherwise

null

is returned.

Definition at line 191 of file BTSecurityRegistry.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEqual() [2/2]

Entry* direct_bt::BTSecurityRegistry::getEqual ( const std::string &  name)
inlinenoexcept

Returns a matching Entry, which Entry::nameSub is set and the given.

name

starts with Entry::nameSub.

Otherwise

null

is returned.

Definition at line 203 of file BTSecurityRegistry.hpp.

Here is the call graph for this function:

◆ getOrCreate()

Entry * direct_bt::BTSecurityRegistry::getOrCreate ( const std::string &  addrOrNameSub)
noexcept

Determines whether the given.

addrOrNameSub

is a EUI48Sub or just a

name

and retrieves an entry. If no entry exists, creates a new entry.

Implementation uses getEqual() to find a pre-existing entry.

Parameters
addrOrNameSubeither a EUI48Sub or just a name
Returns
new or existing instance
Examples
dbt_scanner10.cpp.

Definition at line 71 of file BTSecurityRegistry.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getStartOf() [1/3]

Entry* direct_bt::BTSecurityRegistry::getStartOf ( const EUI48 addr,
const std::string &  name 
)
inlinenoexcept

Returns a matching Entry,.

Otherwise

null

is returned.

Examples
dbt_scanner10.cpp.

Definition at line 153 of file BTSecurityRegistry.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getStartOf() [2/3]

Entry* direct_bt::BTSecurityRegistry::getStartOf ( const EUI48Sub addrSub,
const std::string &  name 
)
inlinenoexcept

Returns a matching Entry,.

Otherwise

null

is returned.

Definition at line 166 of file BTSecurityRegistry.hpp.

Here is the call graph for this function:

◆ getStartOf() [3/3]

Entry* direct_bt::BTSecurityRegistry::getStartOf ( const std::string &  name)
inlinenoexcept

Returns a matching Entry, which Entry::nameSub is set and the given.

name

starts with Entry::nameSub.

Otherwise

null

is returned.

Definition at line 178 of file BTSecurityRegistry.hpp.

Here is the call graph for this function:

Variable Documentation

◆ devicesSecDetails

jau::darray<Entry> direct_bt::BTSecurityRegistry::devicesSecDetails
static

Definition at line 34 of file BTSecurityRegistry.cpp.