Loading...
Searching...
No Matches
QXmppBitsOfBinaryContentId.h
// SPDX-FileCopyrightText: 2019 Linus Jahn <lnj@kaidan.im>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#ifndef QXMPPBITSOFBINARYCONTENTID_H
#define QXMPPBITSOFBINARYCONTENTID_H
#include "QXmppGlobal.h"
#include <QCryptographicHash>
#include <QSharedDataPointer>
class QXmppBitsOfBinaryContentIdPrivate;
class QXMPP_EXPORT QXmppBitsOfBinaryContentId
{
public:
static QXmppBitsOfBinaryContentId fromCidUrl(const QString &input);
static QXmppBitsOfBinaryContentId fromContentId(const QString &input);
QXmppBitsOfBinaryContentId();
QXmppBitsOfBinaryContentId(const QXmppBitsOfBinaryContentId &cid);
QXmppBitsOfBinaryContentId(QXmppBitsOfBinaryContentId &&);
~QXmppBitsOfBinaryContentId();
QXmppBitsOfBinaryContentId &operator=(const QXmppBitsOfBinaryContentId &other);
QXmppBitsOfBinaryContentId &operator=(QXmppBitsOfBinaryContentId &&);
QString toContentId() const;
QString toCidUrl() const;
QByteArray hash() const;
void setHash(const QByteArray &hash);
QCryptographicHash::Algorithm algorithm() const;
void setAlgorithm(QCryptographicHash::Algorithm algo);
bool isValid() const;
static bool isBitsOfBinaryContentId(const QString &uri, bool checkIsCidUrl = false);
bool operator==(const QXmppBitsOfBinaryContentId &other) const;
private:
QSharedDataPointer<QXmppBitsOfBinaryContentIdPrivate> d;
};
#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