jigdo API
MakeImage Class Reference
Download & interpret .jigdo, download parts, assemble image. More...
#include <makeimage.hh>

Public Member Functions | |
MakeImage () | |
jigdoFile argument is only used for displaying error messages when scanning the .jigdo file contents. | |
~MakeImage () |
Detailed Description
Download & interpret .jigdo, download parts, assemble image.MakeImage is the "core" class, other components use it for part of the work, e.g. MakeImageDl uses SingleUrls for file downloads, then passes the data to MakeImage.
Below, arrow "A->B" means "A uses B"
GtkMakeImage(GTK GUI) CursesMakeImage(curses GUI)[0] | | V V MakeImageDl "jigdo-file make-image"[1] | | V V MakeImage
[0] Curses GUI non-existent so far [1] ATM, jigdo-file uses its own implementation of MakeImage's functionality, TODO fix that.
MakeImage: Everything for turning many data sources into one final image
-
Maintains .jigdo file contents, but does not download the .jigdo data - someone else must do this and pass the file info to MakeImage.
-
Stores name of .template file once present, opens & reads it.
-
Access to list of MD5 sums which are still needed to complete the image, i.e. list of parts left to download.
-
Lookup of MD5 sum, gives list of URLs for file, with indication WRT which server is preferred by the user.
-
Stores name of output image, creates image and writes to it.
-
You can give it chunks of downloaded data from *any* part, it'll write the output image as far as necessary (with zero areas for as yet non-downloaded data) and write out the downloaded data.
-
For resuming partial downloads of files in the image, can query how many bytes of the data for a part have been passed to MakeImage, and request some of those bytes for the checks of an overlapping resume.
-
Non-blocking operation for .template unpacking: If it needs to write lots of data to disc, will not do this during one long-lasting call to it, but will queue the disc-intensive request and expect you to call it back whenever it should do the next chunk of work.
-
While a disc request is active, downloaded data from any part can still be given to MakeImage. If the respective section of the image has already been written out (filled with zeroes), writes the data to disc. Otherwise, buffers the data. It'll indicate when the amount of buffered data exceeds a certain limit (=> the downloader *should* pause downloading), but will continue to accept and buffer further data.
-
Blocking operation when writing downloaded data: Usually, downloaded data of parts is not buffered in memory. In this case, will always write out the complete supplied data to disc in one go, regardless of the size of the downloaded chunk of data.
MakeImageDl: Everything related to downloads
-
Downloads and interprets .jigdo file contents
-
Downloads .template via SingleURL, notifies MakeImage once done
-
"Owner" of the layout of the temporary directory, only component that directly makes modifications to this dir. (MakeImage only writes to the image file.)
-
Does simple cache management; if requested file already downloaded, immediately returns its data, or does an If-Modified-Since request; if partially downloaded, resumes.
-
Starts further SingleURLs for download of individual parts.
-
Automatic server selection: For servers which were rated equally acceptable by the user, measures their speed, then prefers the faster ones (but does not completely stop using the slower ones).
GtkMakeImage: Is notified by MakeImageDl when anything interesting happens, updates GTK+ widgets. Also pauses, continues etc. the MakeImageDl.
Constructor & Destructor Documentation
MakeImage::MakeImage | ( | ) | [inline, explicit] |
jigdoFile argument is only used for displaying error messages when scanning the .jigdo file contents.
TODO param destDir destination directory that the final image should be written to. Initially, MakeImage will create a temporary dir (name based on jigdoFile leafname) to store administrative data in.
MakeImage::~MakeImage | ( | ) | [inline] |
The documentation for this class was generated from the following file:
- job/makeimage.hh
Generated on Tue Sep 23 14:27:43 2008 for jigdo by
