summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-02-13 13:38:38 +0100
committerLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-02-24 12:59:11 +0000
commitce3a0b4558d05e23cc0a0eadaea3fd0301b51099 (patch)
treea98dad2d3aa59c4d2a1bc509e2a8cf1265bf9539 /src/libs
parente1f201c76e8bfc8ea1a180d3f139c55d02152102 (diff)
Doc: Add docs for FileDownloaderFactory and FileDownloaderProxyFactory
Change-Id: I45658cacef985fd81a22f8ac9c7010b5f58de108 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp53
1 files changed, 51 insertions, 2 deletions
diff --git a/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp b/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp
index fd119fe89..fad1023d1 100644
--- a/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp
+++ b/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp
@@ -49,7 +49,9 @@ using namespace KDUpdater;
be created and its reference can be fetched from the instance() method.
*/
-
+/*!
+ Returns the file downloader factory instance.
+*/
FileDownloaderFactory& FileDownloaderFactory::instance()
{
static KDUpdater::FileDownloaderFactory theFactory;
@@ -57,7 +59,7 @@ FileDownloaderFactory& FileDownloaderFactory::instance()
}
/*!
- Constructor
+ Constructs a file downloader factory and registers the default file downloader set.
*/
FileDownloaderFactory::FileDownloaderFactory()
: d (new FileDownloaderFactoryData)
@@ -78,42 +80,66 @@ FileDownloaderFactory::FileDownloaderFactory()
d->m_followRedirects = false;
}
+/*!
+ Returns whether redirects should be followed.
+*/
bool FileDownloaderFactory::followRedirects()
{
return FileDownloaderFactory::instance().d->m_followRedirects;
}
+/*!
+ Determines that redirects should be followed if \a val is \c true.
+*/
void FileDownloaderFactory::setFollowRedirects(bool val)
{
FileDownloaderFactory::instance().d->m_followRedirects = val;
}
+/*!
+ Sets \a factory as the file downloader proxy factory.
+*/
void FileDownloaderFactory::setProxyFactory(FileDownloaderProxyFactory *factory)
{
delete FileDownloaderFactory::instance().d->m_factory;
FileDownloaderFactory::instance().d->m_factory = factory;
}
+/*!
+ Returns \c true if SSL errors should be ignored.
+*/
bool FileDownloaderFactory::ignoreSslErrors()
{
return FileDownloaderFactory::instance().d->m_ignoreSslErrors;
}
+/*!
+ Determines that SSL errors should be ignored if \a ignore is \c true.
+*/
void FileDownloaderFactory::setIgnoreSslErrors(bool ignore)
{
FileDownloaderFactory::instance().d->m_ignoreSslErrors = ignore;
}
+/*!
+ Destroys the file downloader factory.
+*/
FileDownloaderFactory::~FileDownloaderFactory()
{
delete d;
}
+/*!
+ Returns a list of supported schemes.
+*/
QStringList FileDownloaderFactory::supportedSchemes()
{
return FileDownloaderFactory::instance().d->m_supportedSchemes;
}
+/*!
+ Returns \c true if \a scheme is a supported scheme.
+*/
bool FileDownloaderFactory::isSupportedScheme(const QString &scheme)
{
return FileDownloaderFactory::instance().d->m_supportedSchemes.contains(scheme
@@ -148,3 +174,26 @@ FileDownloader *FileDownloaderFactory::create(const QString &scheme, QObject *pa
a downloader with the same scheme, the downloader is replaced. When create() is called
with that \a scheme, the file downloader is constructed using its default constructor.
*/
+
+/*!
+ \inmodule kdupdater
+ \class KDUpdater::FileDownloaderProxyFactory
+ \brief The FileDownloaderProxyFactory class provides fine-grained proxy selection.
+
+ File downloader objects use a proxy factory to determine a more specific
+ list of proxies to be used for a given request, instead of trying to use the
+ same proxy value for all requests. This might only be of use for HTTP or FTP
+ requests.
+*/
+
+/*!
+ \fn FileDownloaderProxyFactory::~FileDownloaderProxyFactory()
+
+ Destroys the file downloader proxy factory.
+*/
+
+/*!
+ \fn FileDownloaderProxyFactory::clone() const
+
+ Clones a file downloader proxy factory.
+*/