mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
4acf884fb9
fixes #5116 and #5117
33 lines
692 B
C++
33 lines
692 B
C++
#ifndef TOXPK_H
|
|
#define TOXPK_H
|
|
|
|
#include <QByteArray>
|
|
#include <QString>
|
|
#include <cstdint>
|
|
|
|
class ToxPk
|
|
{
|
|
public:
|
|
ToxPk();
|
|
ToxPk(const ToxPk& other);
|
|
explicit ToxPk(const QByteArray& rawId);
|
|
explicit ToxPk(const uint8_t* rawId);
|
|
ToxPk& operator=(const ToxPk& other) = default;
|
|
ToxPk& operator=(ToxPk&& other) = default;
|
|
|
|
bool operator==(const ToxPk& other) const;
|
|
bool operator!=(const ToxPk& other) const;
|
|
bool operator<(const ToxPk& other) const;
|
|
QString toString() const;
|
|
QByteArray getKey() const;
|
|
const uint8_t* getBytes() const;
|
|
bool isEmpty() const;
|
|
|
|
static int getPkSize();
|
|
|
|
private:
|
|
QByteArray key;
|
|
};
|
|
|
|
#endif // TOXPK_H
|