+class pkgAcquireStatus
+{
+ protected:
+
+ struct timeval Time;
+ struct timeval StartTime;
+ double LastBytes;
+ double CurrentCPS;
+ double CurrentBytes;
+ double TotalBytes;
+ double FetchedBytes;
+ unsigned long ElapsedTime;
+ unsigned long TotalItems;
+ unsigned long CurrentItems;
+
+ public:
+
+ bool Update;
+ bool MorePulses;
+
+ // Called by items when they have finished a real download
+ virtual void Fetched(unsigned long Size,unsigned long ResumePoint);
+
+ // Called to change media
+ virtual bool MediaChange(string Media,string Drive) = 0;
+
+ // 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 bool Pulse(pkgAcquire *Owner); // returns false on user cancel
+ virtual void Start();
+ virtual void Stop();
+
+ pkgAcquireStatus();
+ virtual ~pkgAcquireStatus() {};
+};
+