26#ifndef DBT_SEC_SETTINGS_HPP_
27#define DBT_SEC_SETTINGS_HPP_
45 namespace BTSecurityRegistry {
86 return "BTSecurityDetail["+
id+
", lvl "+
164 return get(addr, name, [](
const EUI48& a,
const std::string& n,
const Entry& e)->
bool {
177 return get(addrSub, name, [](
const EUI48Sub& as,
const std::string& n,
const Entry& e)->
bool {
189 return get(name, [](
const std::string& n,
const Entry& e)->
bool {
202 return get(addrSub, name, [](
const EUI48Sub& as,
const std::string& n,
const Entry& e)->
bool {
214 return get(name, [](
const std::string& n,
const Entry& e)->
bool {
238 void clear() noexcept;
Implementation of a dynamic linear array storage, aka vector.
@ big
Identifier for big endian, equivalent to endian::big.
std::string to_string(const alphabet &v) noexcept
SMPIOCapability
Vol 3, Part H, 2.3.2 IO capabilities.
@ UNSET
Denoting unset value, i.e.
Entry * getStartOf(const EUI48 &addr, const std::string &name) noexcept
Returns a matching Entry,.
bool(* NameEntryMatchFunc)(const std::string &name, const Entry &e)
Function for user defined std::string name BTSecurityRegistry::Entry matching criteria and algorithm.
Entry * getOrCreate(const std::string &addrOrNameSub) noexcept
Determines whether the given addrOrNameSub is a EUI48Sub or just a name and retrieves an entry.
void clear() noexcept
Clears internal list.
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 algo...
std::string to_string(const DiscoveryPolicy v) noexcept
bool(* AddressSubNameEntryMatchFunc)(const EUI48Sub &addressSub, const std::string &name, const Entry &e)
Function for user defined EUI48Sub addressSub and name BTSecurityRegistry::Entry matching criteria an...
Entry * get(const EUI48 &addr, const std::string &name, AddressNameEntryMatchFunc m) noexcept
Returns a matching BTSecurityRegistry::Entry with the given addr and/or name.
Entry * getEqual(const EUI48Sub &addrSub, const std::string &name) noexcept
Returns a matching Entry,.
std::string allToString() noexcept
BTSecurityLevel
Bluetooth Security Level.
jau::darray< Entry > & getEntries() noexcept
Returns the reference of the current list of Entry, not a copy.
@ UNSET
Security Level not set, value 0.
BTSecurityLevel sec_level
static constexpr int NO_PASSKEY
SMPIOCapability io_cap_auto
constexpr bool isSecLevelOrIOCapSet() const noexcept
constexpr const BTSecurityLevel & getSecLevel() const noexcept
constexpr int getPairingPasskey() const noexcept
constexpr bool getPairingNumericComparison() const noexcept
constexpr const SMPIOCapability & getSecurityAutoIOCap() const noexcept
constexpr const SMPIOCapability & getIOCap() const noexcept
Entry(const EUI48Sub &addrSub_)
constexpr bool isSecurityAutoEnabled() const noexcept
Entry(std::string nameSub_)
std::string toString() const noexcept
A 48 bit EUI-48 sub-identifier, see EUI48.
jau::nsize_t length
The actual length in bytes of the EUI48 sub-address, less or equal 6 bytes.
static jau::snsize_t indexOf(const uint8_t haystack_b[], const jau::nsize_t haystack_length, const uint8_t needle_b[], const jau::nsize_t needle_length, const lb_endian_t byte_order) noexcept
Find index of needle within haystack in the given byte order.
std::string toString() const noexcept
Returns the EUI48 sub-string representation with MSB first (lb_endian::big), less or equal 17 charact...
A packed 48 bit EUI-48 identifier, formerly known as MAC-48 or simply network device MAC address (Med...
jau::snsize_t indexOf(const EUI48Sub &needle, const lb_endian_t byte_order) const noexcept