Syndication Library
#include <dataretriever.h>

Signals | |
void | permanentRedirection (const KUrl &url) |
![]() | |
void | dataRetrieved (const QByteArray &data, bool success) |
Public Member Functions | |
FileRetriever () | |
virtual | ~FileRetriever () |
virtual void | abort () |
virtual int | errorCode () const |
virtual void | retrieveData (const KUrl &url) |
![]() | |
DataRetriever () | |
virtual | ~DataRetriever () |
Static Public Member Functions | |
static void | setUseCache (bool enabled) |
static void | setUserAgent (const QString &userAgent) |
Protected Slots | |
void | slotTimeout () |
Detailed Description
Implements a file retriever, to be used with Loader::loadFrom().
- See also
- DataRetriever, Loader::loadFrom()
Definition at line 150 of file dataretriever.h.
Constructor & Destructor Documentation
◆ FileRetriever()
Syndication::FileRetriever::FileRetriever | ( | ) |
Default constructor.
Definition at line 51 of file dataretriever.cpp.
◆ ~FileRetriever()
|
virtual |
Destructor.
Definition at line 56 of file dataretriever.cpp.
Member Function Documentation
◆ abort()
|
virtual |
aborts the retrieval process.
Implements Syndication::DataRetriever.
Definition at line 141 of file dataretriever.cpp.
◆ errorCode()
|
virtual |
- Returns
- The error code for the last process of retrieving data. The returned numbers correspond directly to the error codes as defined by KIO.
Implements Syndication::DataRetriever.
Definition at line 113 of file dataretriever.cpp.
◆ permanentRedirection
|
signal |
Signals a permanent redirection.
The redirection itself is handled internally, so you don't need to call Loader::loadFrom() with the new URL. This signal is useful in case you want to notify the user, or adjust a database entry.
- Parameters
-
url the new URL after the redirection
- See also
- Loader::loadFrom()
◆ retrieveData()
|
virtual |
Downloads the file referenced by the given URL and passes it's contents on to the Loader.
- Parameters
-
url An URL referencing a file which is assumed to reference valid XML.
- See also
- Loader::loadFrom()
Implements Syndication::DataRetriever.
Definition at line 74 of file dataretriever.cpp.
◆ setUseCache()
|
static |
sets whether the retriever should use the KHTML cache or always refetch the file.
By default, the cache is used.
- Parameters
-
enabled whether to use the HTML cache or not
Definition at line 69 of file dataretriever.cpp.
◆ setUserAgent()
|
static |
sets the user agent string sent to the remote server
- Parameters
-
userAgent user agent string
Definition at line 64 of file dataretriever.cpp.
◆ slotTimeout
|
protectedslot |
Definition at line 101 of file dataretriever.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.