You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

46 lines
1.4 KiB

  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. /* ######################################################################
  4. Acquire Progress - Command line progress meter
  5. ##################################################################### */
  6. /*}}}*/
  7. #ifndef ACQPROGRESS_H
  8. #define ACQPROGRESS_H
  9. #include <apt-pkg/acquire.h>
  10. #include <apt-pkg/macros.h>
  11. #include <iostream>
  12. #include <string>
  13. class APT_PUBLIC AcqTextStatus : public pkgAcquireStatus2
  14. {
  15. std::ostream &out;
  16. unsigned int &ScreenWidth;
  17. size_t LastLineLength;
  18. unsigned long ID;
  19. unsigned long Quiet;
  20. APT_HIDDEN void clearLastLine();
  21. APT_HIDDEN void AssignItemID(pkgAcquire::ItemDesc &Itm);
  22. public:
  23. virtual bool ReleaseInfoChanges(metaIndex const * const LastRelease, metaIndex const * const CurrentRelease, std::vector<ReleaseInfoChange> &&Changes) APT_OVERRIDE;
  24. virtual bool MediaChange(std::string Media,std::string Drive) APT_OVERRIDE;
  25. virtual void IMSHit(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE;
  26. virtual void Fetch(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE;
  27. virtual void Done(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE;
  28. virtual void Fail(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE;
  29. virtual void Start() APT_OVERRIDE;
  30. virtual void Stop() APT_OVERRIDE;
  31. bool Pulse(pkgAcquire *Owner) APT_OVERRIDE;
  32. AcqTextStatus(std::ostream &out, unsigned int &ScreenWidth,unsigned int const Quiet);
  33. };
  34. #endif