2023-11-13 22:05:26 +00:00
|
|
|
/*
|
|
|
|
* Squawk messenger.
|
|
|
|
* Copyright (C) 2019 Yury Gubich <blue@macaw.me>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2023-01-01 17:25:51 +00:00
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <QByteArray>
|
2023-01-11 20:45:38 +00:00
|
|
|
#include <QDateTime>
|
2023-01-01 17:25:51 +00:00
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#include "enums.h"
|
|
|
|
|
|
|
|
namespace Shared {
|
|
|
|
|
2023-11-13 22:05:26 +00:00
|
|
|
class KeyInfo {
|
2023-01-01 17:25:51 +00:00
|
|
|
public:
|
|
|
|
KeyInfo(
|
|
|
|
uint32_t id,
|
2023-01-11 20:45:38 +00:00
|
|
|
const QByteArray& fingerPrint,
|
2023-01-01 17:25:51 +00:00
|
|
|
const QString& label,
|
2023-01-11 20:45:38 +00:00
|
|
|
const QDateTime& lastInteraction,
|
2023-01-01 17:25:51 +00:00
|
|
|
TrustLevel trustLevel,
|
2023-03-02 18:17:06 +00:00
|
|
|
EncryptionProtocol protocol = EncryptionProtocol::omemo2,
|
2023-01-01 17:25:51 +00:00
|
|
|
bool currentDevice = false
|
|
|
|
);
|
|
|
|
KeyInfo();
|
2023-01-03 15:27:03 +00:00
|
|
|
KeyInfo(const KeyInfo& other);
|
2023-01-01 17:25:51 +00:00
|
|
|
|
2023-01-03 15:27:03 +00:00
|
|
|
KeyInfo& operator=(const KeyInfo& other);
|
|
|
|
|
|
|
|
public:
|
2023-01-01 17:25:51 +00:00
|
|
|
uint32_t id;
|
|
|
|
QByteArray fingerPrint;
|
|
|
|
QString label;
|
2023-01-11 20:45:38 +00:00
|
|
|
QDateTime lastInteraction;
|
2023-01-01 17:25:51 +00:00
|
|
|
TrustLevel trustLevel;
|
|
|
|
EncryptionProtocol protocol;
|
|
|
|
bool currentDevice;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|