summaryrefslogtreecommitdiff
path: root/methods/ftp.h
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-11-10 16:56:21 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-11-10 16:56:21 +0100
commit7cb543fb742a837c4931513674febaec5e4c1401 (patch)
treeddefe5b9329907818aa6eb3b593f555b29ccb869 /methods/ftp.h
parentf6cb0880a4b5d31e398cceb2e2577b6b82f4fffb (diff)
parent71ecaad29d8066a494f516efc5efd80860653fe2 (diff)
merged from lp:~mvo/apt/mvo (that has all the changes from debian-experimental2) and resolved a bunch of conflicts
Diffstat (limited to 'methods/ftp.h')
-rw-r--r--methods/ftp.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/methods/ftp.h b/methods/ftp.h
index d7f1f7fbe..2634f0732 100644
--- a/methods/ftp.h
+++ b/methods/ftp.h
@@ -10,6 +10,10 @@
#ifndef APT_FTP_H
#define APT_FTP_H
+#include <apt-pkg/strutl.h>
+
+#include <string>
+
class FTPConn
{
char Buffer[1024*10];
@@ -33,7 +37,7 @@ class FTPConn
socklen_t ServerAddrLen;
// Private helper functions
- bool ReadLine(string &Text);
+ bool ReadLine(std::string &Text);
bool Login();
bool CreateDataFd();
bool Finalize();
@@ -43,8 +47,8 @@ class FTPConn
bool Comp(URI Other) {return Other.Host == ServerName.Host && Other.Port == ServerName.Port && Other.User == ServerName.User && Other.Password == ServerName.Password; };
// Raw connection IO
- bool ReadResp(unsigned int &Ret,string &Text);
- bool WriteMsg(unsigned int &Ret,string &Text,const char *Fmt,...);
+ bool ReadResp(unsigned int &Ret,std::string &Text);
+ bool WriteMsg(unsigned int &Ret,std::string &Text,const char *Fmt,...);
// Connection control
bool Open(pkgAcqMethod *Owner);
@@ -53,9 +57,9 @@ class FTPConn
bool ExtGoPasv();
// Query
- bool Size(const char *Path,unsigned long &Size);
+ bool Size(const char *Path,unsigned long long &Size);
bool ModTime(const char *Path, time_t &Time);
- bool Get(const char *Path,FileFd &To,unsigned long Resume,
+ bool Get(const char *Path,FileFd &To,unsigned long long Resume,
Hashes &MD5,bool &Missing);
FTPConn(URI Srv);
@@ -65,11 +69,11 @@ class FTPConn
class FtpMethod : public pkgAcqMethod
{
virtual bool Fetch(FetchItem *Itm);
- virtual bool Configuration(string Message);
+ virtual bool Configuration(std::string Message);
FTPConn *Server;
- static string FailFile;
+ static std::string FailFile;
static int FailFd;
static time_t FailTime;
static void SigTerm(int);