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