Kallisto Linux API
Library for interacting with Kallisto devices
|
#include <bluetooth_scanner_filter.hpp>
Data Structures | |
class | Builder |
Public Member Functions | |
~BluetoothScannerFilter () | |
BluetoothScannerFilter (const BluetoothScannerFilter &filter) | |
BluetoothScannerFilter & | operator= (const BluetoothScannerFilter &filter) |
BluetoothScannerFilter (BluetoothScannerFilter &&configuration) | |
BluetoothScannerFilter & | operator= (BluetoothScannerFilter &&configuration) |
bool | filter (std::string name, std::string mac) |
This class represents a Scanner filter.
A scanner filter allows the developer to filter un-wanted devices that are not compatible with the system using naming and MAC criteria.
Use the Builder class to get a valid configuration.
BluetoothScannerFilter destructor.
BluetoothScannerFilter | ( | const BluetoothScannerFilter & | filter | ) |
Copy Constructor.
BluetoothScannerFilter | ( | BluetoothScannerFilter && | configuration | ) |
Move Constructor.
bool filter | ( | std::string | name, |
std::string | mac | ||
) |
Checks if the passed parameters are compliant with this filter.
Several criteria can be configured:
TODO: A device with Constants#KALLISTO_DFU_NAME always passes the filter.
There are some priorities relating the filters since it isn't obligatory to configure all lists. If there is any MAC in an inclusive MAC list, this list decides the outcome. If this list is empty, next it evaluates the exclusive MAC list. If the MAC passes this list, the name lists are evaluated next.
If no list is configured, all devices pass the filter.
name | The advertising name. |
mac | The MAC address. Should follow the MAC_PATTERN. |
BluetoothScannerFilter& operator= | ( | const BluetoothScannerFilter & | filter | ) |
Copy assigment operator.
BluetoothScannerFilter& operator= | ( | BluetoothScannerFilter && | configuration | ) |
Move assigment operator.