diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:23 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:23 +0000 |
commit | b98f285980c3c2701539e196993ead268141aaeb (patch) | |
tree | 3e3859db916e6f9b3d56b341b91a2836ff5b4d51 /apt-pkg/acquire.h | |
parent | 769f7e1ae907a499199c1f7a34124c1770f37176 (diff) |
Almost done now
Author: jgg
Date: 1998-11-11 06:54:13 GMT
Almost done now
Diffstat (limited to 'apt-pkg/acquire.h')
-rw-r--r-- | apt-pkg/acquire.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h index 0d8803c1d..5d6e5502c 100644 --- a/apt-pkg/acquire.h +++ b/apt-pkg/acquire.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire.h,v 1.9 1998/11/09 01:09:26 jgg Exp $ +// $Id: acquire.h,v 1.10 1998/11/11 06:54:17 jgg Exp $ /* ###################################################################### Acquire - File Acquiration @@ -39,6 +39,7 @@ #pragma interface "apt-pkg/acquire.h" #endif +#include <sys/time.h> #include <unistd.h> class pkgAcquireStatus; @@ -180,18 +181,34 @@ struct pkgAcquire::MethodConfig class pkgAcquireStatus { + protected: + + struct timeval Time; + struct timeval StartTime; + unsigned long LastBytes; + double CurrentCPS; + unsigned long CurrentBytes; + unsigned long TotalBytes; + unsigned long FetchedBytes; + unsigned long ElapsedTime; + public: bool Update; + // Called by items when they have finished a real download + virtual void Fetched(unsigned long Size,unsigned long ResumePoint); + // Each of these is called by the workers when an event occures virtual void IMSHit(pkgAcquire::ItemDesc &Itm) {}; virtual void Fetch(pkgAcquire::ItemDesc &Itm) {}; virtual void Done(pkgAcquire::ItemDesc &Itm) {}; virtual void Fail(pkgAcquire::ItemDesc &Itm) {}; - virtual void Pulse(pkgAcquire *Owner) {}; - - pkgAcquireStatus() : Update(false) {}; + virtual void Pulse(pkgAcquire *Owner); + virtual void Start(); + virtual void Stop(); + + pkgAcquireStatus(); virtual ~pkgAcquireStatus() {}; }; |