KTextAddons

speechtotextengineaccessmanager.cpp
1/*
2 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6#include "speechtotextengineaccessmanager.h"
7
8#include <QNetworkAccessManager>
9
10using namespace TextSpeechToText;
11SpeechToTextEngineAccessManager::SpeechToTextEngineAccessManager(QObject *parent)
12 : QObject(parent)
13 , mNetworkAccessManager(new QNetworkAccessManager(this))
14{
15 mNetworkAccessManager->setRedirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy);
16 mNetworkAccessManager->setStrictTransportSecurityEnabled(true);
17 mNetworkAccessManager->enableStrictTransportSecurityStore(true);
18}
19
20SpeechToTextEngineAccessManager::~SpeechToTextEngineAccessManager() = default;
21
22SpeechToTextEngineAccessManager *SpeechToTextEngineAccessManager::self()
23{
24 static SpeechToTextEngineAccessManager s_self;
25 return &s_self;
26}
27
28QNetworkAccessManager *SpeechToTextEngineAccessManager::networkManager() const
29{
30 return mNetworkAccessManager;
31}
32
33#include "moc_speechtotextengineaccessmanager.cpp"
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.