2017-05-14 09:48:41 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsnetworkcontentfetcher.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-29 07:40:04 +10:00
|
|
|
class QgsNetworkContentFetcher : QObject
|
|
|
|
{
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2018-05-26 14:10:30 +10:00
|
|
|
HTTP network content fetcher. A simple method for fetching remote HTTP content
|
2017-05-14 09:48:41 +02:00
|
|
|
and converting the content to standard formats. Url redirects are automatically
|
|
|
|
handled.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-03-29 14:00:57 +10:00
|
|
|
.. seealso:: :py:class:`QgsNetworkContentFetcherTask`
|
2018-05-28 11:31:08 -04:00
|
|
|
|
|
|
|
.. versionadded:: 2.5
|
2014-07-29 07:40:04 +10:00
|
|
|
%End
|
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsnetworkcontentfetcher.h"
|
|
|
|
%End
|
2014-07-29 07:40:04 +10:00
|
|
|
public:
|
2017-09-28 08:17:06 +10:00
|
|
|
|
2014-07-29 07:40:04 +10:00
|
|
|
QgsNetworkContentFetcher();
|
2017-09-28 08:17:06 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsNetworkContentFetcher.
|
2017-09-28 08:17:06 +10:00
|
|
|
%End
|
2014-07-29 07:40:04 +10:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
~QgsNetworkContentFetcher();
|
2014-07-29 07:40:04 +10:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void fetchContent( const QUrl &url );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Fetches content from a remote URL and handles redirects. The finished()
|
|
|
|
signal will be emitted when content has been fetched.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param url: URL to fetch
|
2018-03-29 12:39:34 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void fetchContent( const QNetworkRequest &request );
|
|
|
|
%Docstring
|
|
|
|
Fetches content using a network ``request`` and handles redirects. The finished()
|
|
|
|
signal will be emitted when content has been fetched.
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
2017-05-14 09:48:41 +02:00
|
|
|
%End
|
2014-08-20 09:56:48 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
QNetworkReply *reply();
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns a reference to the network reply
|
|
|
|
|
|
|
|
:return: QNetworkReply for fetched URL content
|
2017-05-14 09:48:41 +02:00
|
|
|
%End
|
2014-08-20 09:56:48 +02:00
|
|
|
|
2014-07-29 07:40:04 +10:00
|
|
|
QString contentAsString() const;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the fetched content as a string
|
|
|
|
|
|
|
|
:return: string containing network content
|
2018-03-29 14:29:21 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void cancel();
|
|
|
|
%Docstring
|
|
|
|
Cancels any ongoing request.
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
2017-05-14 09:48:41 +02:00
|
|
|
%End
|
2014-08-20 09:56:48 +02:00
|
|
|
|
2014-07-29 07:40:04 +10:00
|
|
|
signals:
|
|
|
|
|
|
|
|
void finished();
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Emitted when content has loaded
|
2018-03-29 14:00:57 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void downloadProgress( qint64 bytesReceived, qint64 bytesTotal );
|
|
|
|
%Docstring
|
|
|
|
Emitted when data is received.
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
2017-05-14 09:48:41 +02:00
|
|
|
%End
|
2014-07-29 07:40:04 +10:00
|
|
|
|
|
|
|
};
|
2017-05-14 09:48:41 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsnetworkcontentfetcher.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|