Wadseeker Class Reference
Main controlling class.
More...
#include <wadseeker.h>
List of all members.
Detailed Description
Main controlling class.
The Wadseeker class provides an interface for searching for and downloading modifications for Doom engine games. Wadseeker will search for mods in a list of locations provided by setPrimarySites.
Wadseeker will ignore a predefined set of file names which it suspects to be attempts to illegally download commercial game data, so passing in any name which is found in iwadNames will result in the file being ignored.
Using Wadseeker is quite simple, there are three steps required for use:
- Initialize an instance of Wadseeker
- Configure some values such as the sites to search in and target directory.
- Create a list of wads to search for and pass it into seekWads.
Observe the following example on how to do these things.
Member Enumeration Documentation
Wadseeker library uses a message system that contains a type of message together with a string representing it's content. Types should be treated as follows:
- Notice - this is just an information of what Wadseeker is currently doing
- Error - something bad happened but Wadseeker is able to continue by itself.
- CriticalError - Wadseeker stops working after such error. Programmer should return control to the main application.
Constructor & Destructor Documentation
Wadseeker::~Wadseeker |
( |
|
) |
|
Member Function Documentation
void Wadseeker::abort |
( |
|
) |
|
Issues abort commands throughout entire library. aborted() signal is emitted when Wadseeker finishes aborting.
void Wadseeker::aborted |
( |
|
) |
[signal] |
Emitted after
abort() method is used and when it's safe to assume that
Wadseeker finished all its jobs.
void Wadseeker::allDone |
( |
|
) |
[signal] |
Emitted when Wadseeker finishes iterating through all files passed to seekWads() method. This signal is emitted regardless if all files were found or not. To check this use areAllFilesFound() method.
bool Wadseeker::areAllFilesFound |
( |
|
) |
const |
- Returns:
- true if all files that were passed to seekWads() method were found.
const QString Wadseeker::author |
( |
|
) |
[static] |
- Returns:
- author of the library.
QStringList Wadseeker::defaultSitesListEncoded |
( |
|
) |
[static] |
Runs content of defaultSites array through QUrl::toPercentEncoding() and returns a list of so encoded strings.
const QString Wadseeker::description |
( |
|
) |
[static] |
- Returns:
- description of the library.
void Wadseeker::downloadProgress |
( |
int |
done, |
|
|
int |
total | |
|
) |
| | [signal] |
Emits download progress. Programmer may use this to update a progress bar, for example.
- Parameters:
-
| done | - bytes downloaded |
| total | - size of file |
const QStringList & Wadseeker::filesNotFound |
( |
|
) |
const |
- Returns:
- list of files that weren't found
bool Wadseeker::isIwad |
( |
const QString & |
wad |
) |
[static] |
Attempts to detect if the input is an iwad.
- Parameters:
-
| wad | Name of wad trying to be searched for. |
- Returns:
- True if the wad specified is an iwad.
- See also:
- iwadNames
Emitted when Wadseeker wants to communicate about its progress with outside world.
- Parameters:
-
This slot acts as a pipe to the message signal.
- See also:
- message
void Wadseeker::seekWads |
( |
const QStringList & |
wads |
) |
|
Library's "entry" method. This is where Wadseeker begins to iterate through WWW sites to find all files specified on the list.
- Parameters:
-
| wads | - list of files that will be searched for |
void Wadseeker::setCustomSite |
( |
const QUrl & |
url |
) |
|
Sets a custom site. This site has priority over all other sites and will be searched first. For example a link provided by the server can be passed here.
- Parameters:
-
| url | - a valid, absolute URL |
void Wadseeker::setPrimarySites |
( |
const QStringList & |
lst |
) |
|
Sets a list of primary sites. This is where Wadseeker begins it's search and where it returns to if nothing of interest was found on other pages.
- Parameters:
-
| lst | - list of valid, absolute URLs |
void Wadseeker::setPrimarySitesToDefault |
( |
|
) |
|
Convenience method. Sets list of primary sites to sites hardcoded into library itself.
- See also:
- defaultSites
void Wadseeker::setTargetDirectory |
( |
const QString & |
dir |
) |
|
Target directory is a directory where all seeked files will be saved.
QString Wadseeker::targetDirectory |
( |
|
) |
const |
Target directory is a directory where all seeked files will be saved.
const QString Wadseeker::version |
( |
|
) |
[static] |
- Returns:
- version string of the library.
QStringList Wadseeker::wantedFilenames |
( |
const QString & |
wad |
) |
[static, protected] |
Returns the name of the actual files that will be searched for. For example, if somemod.wad was searched for, this would return somemod.wad and somemod.zip
- Parameters:
-
| wad | Absolute file being searched for. (ex: somemod.wad) |
const QString Wadseeker::yearSpan |
( |
|
) |
[static] |
- Returns:
- Development dates.
Member Data Documentation
Initial value:
{
QString("http://doom.dogsoft.net/getwad.php?search=%WADNAME%"),
QString("http://hs.keystone.gr/lap/"),
QString("http://www.rarefiles.com/download/"),
QString("http://supergod.servegame.com/"),
QString("http://www.coffeenet.org/~vulture/wads/"),
QString("")
}
List of default sites to search for files.
- See also:
- setPrimarySitesToDefault
Initial value:
{
"doom", "doom2", "heretic", "hexen", "tnt", "plutonia", "hexdd", "strife1", "voices", ""
}
List of file names that will be ignored as they are part of a commercial product.
- See also:
- isIwad
The documentation for this class was generated from the following files: