]>
git.saurik.com Git - apt.git/blob - methods/ftp.h
1 // -*- mode: cpp; mode: fold -*-
2 // Description /*{{{*/// $Id: ftp.h,v 1.2 1999/03/15 07:20:41 jgg Exp $
3 /* ######################################################################
5 FTP Aquire Method - This is the FTP aquire method for APT.
7 ##################################################################### */
23 struct sockaddr_in PasvAddr
;
24 struct sockaddr_in Peer
;
26 // Private helper functions
27 bool ReadLine(string
&Text
);
34 bool Comp(URI Other
) {return Other
.Host
== ServerName
.Host
&& Other
.Port
== ServerName
.Port
;};
37 bool ReadResp(unsigned int &Ret
,string
&Text
);
38 bool WriteMsg(unsigned int &Ret
,string
&Text
,const char *Fmt
,...);
41 bool Open(pkgAcqMethod
*Owner
);
46 bool Size(const char *Path
,unsigned long &Size
);
47 bool ModTime(const char *Path
, time_t &Time
);
48 bool Get(const char *Path
,FileFd
&To
,unsigned long Resume
,
49 MD5Summation
&MD5
,bool &Missing
);
55 class FtpMethod
: public pkgAcqMethod
57 virtual bool Fetch(FetchItem
*Itm
);
58 virtual bool Configuration(string Message
);
62 static string FailFile
;
64 static time_t FailTime
;
65 static void SigTerm(int);