]>
git.saurik.com Git - apt.git/blob - methods/mirror.h
1 // -*- mode: cpp; mode: fold -*-
2 // Description /*{{{*/// $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $
3 // $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $
4 /* ######################################################################
6 MIRROR Acquire Method - This is the MIRROR acquire method for APT.
8 ##################################################################### */
24 class MirrorMethod
: public HttpMethod
27 // we simply transform between BaseUri and Mirror
28 std::string BaseUri
; // the original mirror://... url
29 std::string Mirror
; // the selected mirror uri (http://...)
30 std::vector
<std::string
> AllMirrors
; // all available mirrors
31 std::string MirrorFile
; // the file that contains the list of mirrors
32 bool DownloadedMirrorFile
; // already downloaded this session
33 std::string Dist
; // the target distrubtion (e.g. sid, oneiric)
38 bool DownloadMirrorFile(std::string uri
);
39 bool RandomizeMirrorFile(std::string file
);
40 std::string
GetMirrorFileName(std::string uri
);
43 void CurrentQueueUriToMirror();
44 bool Clean(std::string dir
);
46 // we need to overwrite those to transform the url back
47 virtual void Fail(std::string Why
, bool Transient
= false);
48 virtual void URIStart(FetchResult
&Res
);
49 virtual void URIDone(FetchResult
&Res
,FetchResult
*Alt
= 0);
50 virtual bool Configuration(std::string Message
);
54 virtual bool Fetch(FetchItem
*Itm
);