]>
git.saurik.com Git - apt.git/blob - methods/mirror.h
6ebe08e6b6f179afbba1eb25524e46ab2cc40977
1 // -*- mode: cpp; mode: fold -*-
3 /* ######################################################################
5 MIRROR Acquire Method - This is the MIRROR acquire method for APT.
7 ##################################################################### */
23 class MirrorMethod
: public HttpMethod
26 // we simply transform between BaseUri and Mirror
27 std::string BaseUri
; // the original mirror://... url
28 std::string Mirror
; // the selected mirror uri (http://...)
29 std::vector
<std::string
> AllMirrors
; // all available mirrors
30 std::string MirrorFile
; // the file that contains the list of mirrors
31 bool DownloadedMirrorFile
; // already downloaded this session
32 std::string Dist
; // the target distrubtion (e.g. sid, oneiric)
37 bool DownloadMirrorFile(std::string uri
);
38 bool RandomizeMirrorFile(std::string file
);
39 std::string
GetMirrorFileName(std::string uri
);
42 void CurrentQueueUriToMirror();
43 bool Clean(std::string dir
);
45 // we need to overwrite those to transform the url back
46 virtual void Fail(std::string Why
, bool Transient
= false) APT_OVERRIDE
;
47 virtual void URIStart(FetchResult
&Res
) APT_OVERRIDE
;
48 virtual void URIDone(FetchResult
&Res
,FetchResult
*Alt
= 0) APT_OVERRIDE
;
49 virtual bool Configuration(std::string Message
) APT_OVERRIDE
;
53 virtual bool Fetch(FetchItem
*Itm
) APT_OVERRIDE
;