2025-01-28 17:43:46 +00:00
|
|
|
/*
|
|
|
|
|
* Deskflow -- mouse and keyboard sharing utility
|
|
|
|
|
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
|
|
|
|
|
* SPDX-FileCopyrightText: (C) 2021 Barrier Contributors
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2025-03-28 03:43:04 +00:00
|
|
|
#include "Fingerprint.h"
|
2025-01-28 17:43:46 +00:00
|
|
|
|
2025-03-28 03:43:04 +00:00
|
|
|
#include <QList>
|
2025-01-28 17:43:46 +00:00
|
|
|
|
|
|
|
|
class FingerprintDatabase
|
|
|
|
|
{
|
|
|
|
|
public:
|
2025-03-28 03:43:04 +00:00
|
|
|
void read(const QString &path);
|
2025-05-13 00:23:00 +00:00
|
|
|
bool write(const QString &path);
|
2025-01-28 17:43:46 +00:00
|
|
|
|
2025-03-28 03:43:04 +00:00
|
|
|
void readStream(QTextStream &in);
|
2025-05-13 00:23:00 +00:00
|
|
|
bool writeStream(QTextStream &out);
|
2025-01-28 17:43:46 +00:00
|
|
|
|
|
|
|
|
void clear();
|
2025-03-28 03:43:04 +00:00
|
|
|
void addTrusted(const Fingerprint &fingerprint);
|
|
|
|
|
bool isTrusted(const Fingerprint &fingerprint);
|
2025-01-28 17:43:46 +00:00
|
|
|
|
2025-03-28 03:43:04 +00:00
|
|
|
const QList<Fingerprint> &fingerprints() const
|
2025-01-28 17:43:46 +00:00
|
|
|
{
|
|
|
|
|
return m_fingerprints;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
2025-03-28 03:43:04 +00:00
|
|
|
QList<Fingerprint> m_fingerprints;
|
2025-01-28 17:43:46 +00:00
|
|
|
};
|