libQuotient
A Qt library for building matrix clients
networkaccessmanager.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2018 Kitsune Ral <kitsune-ral@users.sf.net>
2
// SPDX-License-Identifier: LGPL-2.1-or-later
3
4
#
pragma
once
5
6
#
include
"Quotient/quotient_export.h"
7
8
#
include
<
QtNetwork
/
QNetworkAccessManager
>
9
10
namespace
Quotient
{
11
12
class
QUOTIENT_API
NetworkAccessManager
:
public
QNetworkAccessManager
{
13
Q_OBJECT
14
public
:
15
using
QNetworkAccessManager
::
QNetworkAccessManager
;
16
17
static
void
addAccount
(
const
QString
&
accountId
,
const
QUrl
&
homeserver
,
18
const
QByteArray
&
accessToken
= {});
19
static
void
updateAccountSpecVersions
(
QStringView
accountId
,
const
QStringList
&
versions
);
20
static
void
dropAccount
(
QStringView
accountId
);
21
22
static
QList
<
QSslError
>
ignoredSslErrors
();
23
static
void
addIgnoredSslError
(
const
QSslError
&
error
);
24
static
void
clearIgnoredSslErrors
();
25
26
static
void
setAccessToken
(
const
QString
&
userId
,
const
QByteArray
&
token
);
27
28
//! Get a NAM instance for the current thread
29
static
NetworkAccessManager
*
instance
();
30
31
private
Q_SLOTS
:
32
QStringList
supportedSchemesImplementation
()
const
;
// clazy:exclude=const-signal-or-slot
33
34
private
:
35
QNetworkReply
*
createRequest
(
Operation
op
,
const
QNetworkRequest
&
request
,
36
QIODevice
*
outgoingData
=
nullptr
)
override
;
37
};
38
}
// namespace Quotient
Quotient
networkaccessmanager.h
Generated by
1.9.1