QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
QXmppEncryptedFileSource.h
1// SPDX-FileCopyrightText: 2022 Linus Jahn <lnj@kaidan.im>
2// SPDX-FileCopyrightText: 2022 Jonah BrĂ¼chert <jbb@kaidan.im>
3//
4// SPDX-License-Identifier: LGPL-2.1-or-later
5
6#ifndef QXMPPENCRYPTEDFILESOURCE_H
7#define QXMPPENCRYPTEDFILESOURCE_H
8
9#include "QXmppGlobal.h"
10#include "QXmppHash.h"
11#include "QXmppHttpFileSource.h"
12
13#include <QSharedDataPointer>
14#include <QUrl>
15#include <QVector>
16
17class QXmppEncryptedFileSourcePrivate;
18
19// exported for tests
20class QXMPP_EXPORT QXmppEncryptedFileSource
21{
22public:
24 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppEncryptedFileSource)
25
26 QXmpp::Cipher cipher() const;
27 void setCipher(QXmpp::Cipher newCipher);
28
29 const QByteArray &key() const;
30 void setKey(const QByteArray &newKey);
31
32 const QByteArray &iv() const;
33 void setIv(const QByteArray &newIv);
34
35 const QVector<QXmppHash> &hashes() const;
36 void setHashes(const QVector<QXmppHash> &newHashes);
37
38 const QVector<QXmppHttpFileSource> &httpSources() const;
39 void setHttpSources(const QVector<QXmppHttpFileSource> &newHttpSources);
40
42 bool parse(const QDomElement &el);
43 void toXml(QXmlStreamWriter *writer) const;
45
46private:
47 QSharedDataPointer<QXmppEncryptedFileSourcePrivate> d;
48};
49
50#endif // QXMPPENCRYPTEDFILESOURCE_H
Represents an encrypted file source for file sharing.
Definition QXmppEncryptedFileSource.h:21
Cipher
Definition QXmppGlobal.h:160