blob: b64fea9b761ac655fd06820183f8c5221d37cd2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#ifndef GATOADDRESS_H
#define GATOADDRESS_H
#include <QtCore/QDebug>
#include <QtCore/QSharedDataPointer>
#include "libgato_global.h"
class GatoAddressPrivate;
class LIBGATO_EXPORT GatoAddress
{
public:
enum Type {
TypeNull,
TypeBREDR,
TypeLEPublic,
TypeLERandom
};
GatoAddress();
explicit GatoAddress(quint8 addr[], Type = TypeLEPublic);
explicit GatoAddress(quint64 addr, Type = TypeLEPublic);
explicit GatoAddress(const QString &addr, Type = TypeLEPublic);
GatoAddress(const GatoAddress& o);
~GatoAddress();
GatoAddress& operator=(const GatoAddress& o);
bool isNull() const;
Type type() const;
void toUInt8Array(quint8 addr[]) const;
quint64 toUInt64() const;
QString toString() const;
private:
QSharedDataPointer<GatoAddressPrivate> d;
};
inline QDebug operator<<(QDebug debug, const GatoAddress &a)
{
debug << a.toString().toLatin1().constData();
return debug.space();
}
LIBGATO_EXPORT bool operator==(const GatoAddress &a, const GatoAddress &b);
LIBGATO_EXPORT uint qHash(const GatoAddress &a);
#endif // GATOADDRESS_H
|