FileDownloaderFactory Class

class KDUpdater::FileDownloaderFactory

The FileDownloaderFactory class acts as a factory for KDUpdater::FileDownloader. More...

Header: #include <FileDownloaderFactory>
Inherits: GenericFactory

Public Functions

virtual ~FileDownloaderFactory()
KDUpdater::FileDownloader *create(const QString &scheme, QObject *parent = 0) const

Static Public Members

bool followRedirects()
bool ignoreSslErrors()
KDUpdater::FileDownloaderFactory &instance()
bool isSupportedScheme(const QString &scheme)
void setFollowRedirects(bool val)
void setIgnoreSslErrors(bool ignore)
void setProxyFactory(KDUpdater::FileDownloaderProxyFactory *factory)
QStringList supportedSchemes()

Detailed Description

You can register one or more file downloaders with this factory and query them based on their scheme. The class follows the singleton design pattern. Only one instance of this class can be created and its reference can be fetched from the instance() method.

Member Function Documentation

[virtual noexcept] FileDownloaderFactory::~FileDownloaderFactory()

Destroys the file downloader factory.

KDUpdater::FileDownloader *FileDownloaderFactory::create(const QString &scheme, QObject *parent = 0) const

Returns a new instance of a KDUpdater::FileDownloader subclass. The instantiation of a subclass depends on the communication protocol string stored in scheme with the parent parent.

Note: Ownership of the created object remains with the programmer.

[static] bool FileDownloaderFactory::followRedirects()

Returns whether redirects should be followed.

See also setFollowRedirects().

[static] bool FileDownloaderFactory::ignoreSslErrors()

Returns true if SSL errors should be ignored.

See also setIgnoreSslErrors().

[static] KDUpdater::FileDownloaderFactory &FileDownloaderFactory::instance()

Returns the file downloader factory instance.

[static] bool FileDownloaderFactory::isSupportedScheme(const QString &scheme)

Returns true if scheme is a supported scheme.

[static] void FileDownloaderFactory::setFollowRedirects(bool val)

Determines that redirects should be followed if val is true.

See also followRedirects().

[static] void FileDownloaderFactory::setIgnoreSslErrors(bool ignore)

Determines that SSL errors should be ignored if ignore is true.

See also ignoreSslErrors().

[static] void FileDownloaderFactory::setProxyFactory(KDUpdater::FileDownloaderProxyFactory *factory)

Sets factory as the file downloader proxy factory.

[static] QStringList FileDownloaderFactory::supportedSchemes()

Returns a list of supported schemes.

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.