QXmpp: QXmppBitsOfBinaryContentId.h Source File

QXmpp Version: 1.14.3

Loading...
Searching...
No Matches
QXmppBitsOfBinaryContentId.h
1// SPDX-FileCopyrightText: 2019 Linus Jahn <lnj@kaidan.im>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPBITSOFBINARYCONTENTID_H
6#define QXMPPBITSOFBINARYCONTENTID_H
7
8#include "QXmppGlobal.h"
9
10#include <QCryptographicHash>
11#include <QSharedDataPointer>
12
13class QXmppBitsOfBinaryContentIdPrivate;
14
15 class QXMPP_EXPORT QXmppBitsOfBinaryContentId
16{
17public:
18 static QXmppBitsOfBinaryContentId fromCidUrl(const QString &input);
19 static QXmppBitsOfBinaryContentId fromContentId(const QString &input);
20
21 QXmppBitsOfBinaryContentId();
22 QXmppBitsOfBinaryContentId(const QXmppBitsOfBinaryContentId &cid);
23 QXmppBitsOfBinaryContentId(QXmppBitsOfBinaryContentId &&);
24 ~QXmppBitsOfBinaryContentId();
25
26 QXmppBitsOfBinaryContentId &operator=(const QXmppBitsOfBinaryContentId &other);
27 QXmppBitsOfBinaryContentId &operator=(QXmppBitsOfBinaryContentId &&);
28
29 QString toContentId() const;
30 QString toCidUrl() const;
31
32 QByteArray hash() const;
33 void setHash(const QByteArray &hash);
34
35 QCryptographicHash::Algorithm algorithm() const;
36 void setAlgorithm(QCryptographicHash::Algorithm algo);
37
38 bool isValid() const;
39
40 static bool isBitsOfBinaryContentId(const QString &uri, bool checkIsCidUrl = false);
41
42 bool operator==(const QXmppBitsOfBinaryContentId &other) const;
43
44private:
45 QSharedDataPointer<QXmppBitsOfBinaryContentIdPrivate> d;
46};
47
48#endif // QXMPPBITSOFBINARYCONTENTID_H
QXmppBitsOfBinaryContentId::fromContentId
static QXmppBitsOfBinaryContentId fromContentId(const QString &input)
Definition QXmppBitsOfBinary.cpp:360
QXmppBitsOfBinaryContentId::toCidUrl
QString toCidUrl() const
Definition QXmppBitsOfBinary.cpp:431
QXmppBitsOfBinaryContentId::operator=
QXmppBitsOfBinaryContentId & operator=(const QXmppBitsOfBinaryContentId &other)
Default assignment operator.
QXmppBitsOfBinaryContentId::fromCidUrl
static QXmppBitsOfBinaryContentId fromCidUrl(const QString &input)
Definition QXmppBitsOfBinary.cpp:339
QXmppBitsOfBinaryContentId::operator==
bool operator==(const QXmppBitsOfBinaryContentId &other) const
Definition QXmppBitsOfBinary.cpp:397
QXmppBitsOfBinaryContentId::isValid
bool isValid() const
Definition QXmppBitsOfBinary.cpp:487
QXmppBitsOfBinaryContentId::~QXmppBitsOfBinaryContentId
~QXmppBitsOfBinaryContentId()
Default destructor.
QXmppBitsOfBinaryContentId::toContentId
QString toContentId() const
Definition QXmppBitsOfBinary.cpp:416
QXmppBitsOfBinaryContentId::isBitsOfBinaryContentId
static bool isBitsOfBinaryContentId(const QString &uri, bool checkIsCidUrl=false)
Definition QXmppBitsOfBinary.cpp:502
QXmppBitsOfBinaryContentId::setHash
void setHash(const QByteArray &hash)
Definition QXmppBitsOfBinary.cpp:451
QXmppBitsOfBinaryContentId::QXmppBitsOfBinaryContentId
QXmppBitsOfBinaryContentId(const QXmppBitsOfBinaryContentId &cid)
Default copy-constructor.
QXmppBitsOfBinaryContentId::setAlgorithm
void setAlgorithm(QCryptographicHash::Algorithm algo)
Definition QXmppBitsOfBinary.cpp:474
QXmppBitsOfBinaryContentId::algorithm
QCryptographicHash::Algorithm algorithm() const
Definition QXmppBitsOfBinary.cpp:461
QXmppBitsOfBinaryContentId::QXmppBitsOfBinaryContentId
QXmppBitsOfBinaryContentId()
Definition QXmppBitsOfBinary.cpp:389
QXmppBitsOfBinaryContentId::operator=
QXmppBitsOfBinaryContentId & operator=(QXmppBitsOfBinaryContentId &&)
Default move-assignment operator.
QXmppBitsOfBinaryContentId::QXmppBitsOfBinaryContentId
QXmppBitsOfBinaryContentId(QXmppBitsOfBinaryContentId &&)
Default move-constructor.
QXmppBitsOfBinaryContentId::hash
QByteArray hash() const
Definition QXmppBitsOfBinary.cpp:443