svcore
1.9
|
FileSource.h
Go to the documentation of this file.
void setLeaveLocalFile(bool leave)
Specify whether any local, cached file should remain on disc after this FileSource has been destroyed...
Definition: FileSource.cpp:580
QString getLocation() const
Return the location filename or URL as passed to the constructor.
Definition: FileSource.cpp:616
Definition: ProgressReporter.h:22
void downloadProgress(qint64 done, qint64 total)
Definition: FileSource.cpp:730
bool isRemote() const
Return true if this FileSource is referring to a remote URL.
Definition: FileSource.cpp:610
FileSource(QString fileOrUrl, ProgressReporter *reporter=0, QString preferredContentType="")
Construct a FileSource using the given local file path or URL.
Definition: FileSource.cpp:90
QString getLocalFilename() const
Return the name of the local file this FileSource refers to.
Definition: FileSource.cpp:622
void statusAvailable()
Emitted when the file's existence has been tested and/or response header received.
void waitForData()
Block on a sub-event-loop until the whole of the data has been retrieved (if it is remote)...
Definition: FileSource.cpp:570
void progress(int percent)
Emitted during URL retrieval, when the retrieval progress notches up to a new percentage.
QString getErrorString() const
Return an error message, if isOK() is false.
Definition: FileSource.cpp:650
void waitForStatus()
Block on a sub-event-loop until the availability of the file or remote URL is known.
Definition: FileSource.cpp:561
static void debugReport()
Print some stats, if FileSource was compiled with debugging.
Definition: FileSource.cpp:85
bool wasCancelled() const
Return true if the operation was cancelled by the user through the ProgressReporter interface...
Definition: FileSource.cpp:598
bool isDone() const
Return true if the entire file has been retrieved and is available.
Definition: FileSource.cpp:592
FileSource & operator=(const FileSource &)
FileSource is a class used to refer to the contents of a file that may be either local or at a remote...
Definition: FileSource.h:59
QString getContentType() const
Return the MIME content type of this file, if known.
Definition: FileSource.cpp:634
bool isResource() const
Return true if this FileSource is referring to a QRC resource.
Definition: FileSource.cpp:604
void ready()
Emitted when the entire file data has been retrieved and the local file is complete (if no error has ...
static bool canHandleScheme(QUrl url)
Return true if FileSource can handle the retrieval scheme for the given URL (or if the URL is for a l...
Definition: FileSource.cpp:534
QString getExtension() const
Return the file extension for this file, if any.
Definition: FileSource.cpp:640
bool isOK() const
Return true if the FileSource object is valid and neither error nor cancellation occurred while retri...
Definition: FileSource.cpp:586
Generated by 1.8.11