apt  2.2.4
About: Apt (Advanced Package Tool) is a management system for software packages (Debian/Ubuntu). Release series 2.2.
  Fossies Dox: apt-2.2.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

FtpMethod Class Reference

#include <ftp.h>

Inheritance diagram for FtpMethod:
[legend]
Collaboration diagram for FtpMethod:
[legend]

Public Member Functions

 FtpMethod ()
 
- Public Member Functions inherited from aptAuthConfMethod
bool MaybeAddAuthTo (URI &uri)
 
 aptAuthConfMethod (std::string &&Binary, char const *const Ver, unsigned long const Flags) APT_NONNULL(3)
 
- Public Member Functions inherited from aptMethod
bool RunningInQemu (void)
 
bool LoadSeccomp ()
 
bool CalculateHashes (FetchItem const *const Itm, FetchResult &Res) const APT_NONNULL(2)
 
void Warning (std::string &&msg)
 
void setPostfixForMethodNames (char const *const postfix) APT_NONNULL(2)
 
bool DebugEnabled () const
 
std::string ConfigFind (char const *const postfix, std::string const &defValue) const APT_NONNULL(2)
 
std::string ConfigFind (std::string const &postfix, std::string const &defValue) const
 
bool ConfigFindB (char const *const postfix, bool const defValue) const APT_NONNULL(2)
 
int ConfigFindI (char const *const postfix, int const defValue) const APT_NONNULL(2)
 
bool TransferModificationTimes (char const *const From, char const *const To, time_t &LastModified) APT_NONNULL(2
 
 if (lstat(To, &Buf2) !=0||S_ISLNK(Buf2.st_mode)) return true
 
 if (stat(From, &Buf) !=0) return _error -> Errno("stat", _("Failed to stat"))
 
 if (utimes(To, times) !=0) return _error -> Errno("utimes", _("Failed to set modification time"))
 
void Dequeue ()
 
 aptMethod (std::string &&Binary, char const *const Ver, unsigned long const Flags) APT_NONNULL(3)
 
- Public Member Functions inherited from pkgAcqMethod
void Log (const char *Format,...)
 
void Status (const char *Format,...)
 
void Redirect (const std::string &NewURI)
 
int Run (bool Single=false)
 
void SetFailReason (std::string Msg)
 
void SetIP (std::string aIP)
 
 pkgAcqMethod (const char *Ver, unsigned long Flags=0)
 
virtual ~pkgAcqMethod ()
 
void DropPrivsOrDie ()
 

Private Member Functions

virtual bool Fetch (FetchItem *Itm) APT_OVERRIDE
 
virtual bool Configuration (std::string Message) APT_OVERRIDE
 

Static Private Member Functions

static APT_NORETURN void SigTerm (int)
 

Private Attributes

FTPConnServer
 

Static Private Attributes

static std::string FailFile
 
static int FailFd = -1
 
static time_t FailTime = 0
 

Additional Inherited Members

- Public Types inherited from pkgAcqMethod
enum  CnfFlags {
  SingleInstance = (1 << 0) , Pipeline = (1 << 1) , SendConfig = (1 << 2) , LocalOnly = (1 << 3) ,
  NeedsCleanup = (1 << 4) , Removable = (1 << 5) , AuxRequests = (1 << 6) , SendURIEncoded = (1 << 7)
}
 
- Static Public Member Functions inherited from aptMethod
static std::string URIEncode (std::string const &part)
 
static std::string DecodeSendURI (std::string const &part)
 
- Public Attributes inherited from aptMethod
std::vector< std::string > methodNames
 
bool struct stat Buf2
 
struct stat Buf
 
struct timeval times [2]
 
times[0] tv_sec = Buf.st_atime
 
 LastModified = times[1].tv_sec = Buf.st_mtime
 
times[0] tv_usec = times[1].tv_usec = 0
 
return true
 
- Protected Types inherited from aptMethod
enum  Seccomp { BASE = (1 << 1) , NETWORK = (1 << 2) , DIRECTORY = (1 << 3) }
 
- Protected Member Functions inherited from pkgAcqMethod
virtual bool URIAcquire (std::string const &, FetchItem *Itm)
 
void Fail (bool Transient=false)
 
void Fail (const char *Why, bool Transient=false)
 
virtual void Fail (std::string Why, bool Transient=false)
 
virtual void URIStart (FetchResult &Res)
 
virtual void URIDone (FetchResult &Res, FetchResult *Alt=0)
 
void SendMessage (std::string const &header, std::unordered_map< std::string, std::string > &&fields)
 
bool MediaFail (std::string Required, std::string Drive)
 
virtual void Exit ()
 
 APT_DEPRECATED_MSG ("Use SendMessage instead") void PrintStatus(char const *const header
 
- Protected Attributes inherited from aptMethod
std::string const Binary
 
unsigned long SeccompFlags
 
- Protected Attributes inherited from pkgAcqMethod
std::vector< std::string > Messages
 
FetchItemQueue
 
FetchItemQueueBack
 
std::string FailReason
 
std::string UsedMirror
 
std::string IP
 
const char * Format
 
const char va_list &args const
 

Detailed Description

Definition at line 74 of file ftp.h.

Constructor & Destructor Documentation

◆ FtpMethod()

Member Function Documentation

◆ Configuration()

bool Configuration ( std::string  Message)
privatevirtual

Reimplemented from aptAuthConfMethod.

Definition at line 1025 of file ftp.cc.

References _config, aptAuthConfMethod::Configuration(), and TimeOut.

◆ Fetch()

◆ SigTerm()

void SigTerm ( int  )
staticprivate

Definition at line 1005 of file ftp.cc.

References FailFd, FailFile, FailTime, and aptMethod::times.

Referenced by FtpMethod().

Member Data Documentation

◆ FailFd

int FailFd = -1
staticprivate

Definition at line 82 of file ftp.h.

Referenced by Fetch(), FtpMethod(), and SigTerm().

◆ FailFile

string FailFile
staticprivate

Definition at line 81 of file ftp.h.

Referenced by Fetch(), and SigTerm().

◆ FailTime

time_t FailTime = 0
staticprivate

Definition at line 83 of file ftp.h.

Referenced by Fetch(), and SigTerm().

◆ Server

FTPConn* Server
private

Definition at line 79 of file ftp.h.

Referenced by Fetch(), and FtpMethod().


The documentation for this class was generated from the following files: