QXmpp
Version: 1.5.3
src
base
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
13
class
QXmppBitsOfBinaryContentIdPrivate;
14
15
class
QXMPP_EXPORT
QXmppBitsOfBinaryContentId
16
{
17
public
:
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
44
private
:
45
QSharedDataPointer<QXmppBitsOfBinaryContentIdPrivate> d;
46
};
47
48
#endif // QXMPPBITSOFBINARYCONTENTID_H
QXmppBitsOfBinaryContentId
Definition:
QXmppBitsOfBinaryContentId.h:15
Generated by
1.8.14