mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-28 17:57:15 +02:00
* change parameter to signed int As of wrong paramater, the following problem existed, that will be fixed now with this change. BTScanResultsSet.cpp:67:8: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (i < 0) * Change parameter and variable to int As of wrong paramater, the following problem existed, that will be fixed now with this change. BTScanResultsSet.cpp:67:8: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (i < 0)
43 lines
883 B
C++
43 lines
883 B
C++
/*
|
|
* BTScan.h
|
|
*
|
|
* Created on: Feb 5, 2021
|
|
* Author: Thomas M. (ArcticSnowSky)
|
|
*/
|
|
|
|
#ifndef __BTSCAN_H__
|
|
#define __BTSCAN_H__
|
|
|
|
#include <map>
|
|
#include <string>
|
|
#include <Print.h>
|
|
#include "BTAddress.h"
|
|
#include "BTAdvertisedDevice.h"
|
|
|
|
class BTAdvertisedDevice;
|
|
class BTAdvertisedDeviceSet;
|
|
|
|
|
|
class BTScanResults {
|
|
public:
|
|
virtual ~BTScanResults() = default;
|
|
|
|
virtual void dump(Print *print = nullptr);
|
|
virtual int getCount();
|
|
virtual BTAdvertisedDevice* getDevice(int i);
|
|
};
|
|
|
|
class BTScanResultsSet : public BTScanResults {
|
|
public:
|
|
void dump(Print *print = nullptr);
|
|
int getCount();
|
|
BTAdvertisedDevice* getDevice(int i);
|
|
|
|
bool add(BTAdvertisedDeviceSet advertisedDevice, bool unique = true);
|
|
void clear();
|
|
|
|
std::map<std::string, BTAdvertisedDeviceSet> m_vectorAdvertisedDevices;
|
|
};
|
|
|
|
#endif
|