1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
qTox/src/core/toxpk.h
Diadlo 8e93af7fca
refactor: Add copy and move assignment operator to toxid and toxpk
Add assignment operator to classes which has copy constructor
2017-06-12 13:46:42 +03:00

32 lines
646 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;
QString toString() const;
QByteArray getKey() const;
const uint8_t* getBytes() const;
bool isEmpty() const;
static int getPkSize();
private:
QByteArray key;
};
#endif // TOXPK_H