private-output.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef APT_PRIVATE_OUTPUT_H
  2. #define APT_PRIVATE_OUTPUT_H
  3. #include <apt-pkg/pkgcache.h>
  4. #include <apt-pkg/macros.h>
  5. #include <fstream>
  6. #include <string>
  7. // forward declaration
  8. class pkgCacheFile;
  9. class CacheFile;
  10. class pkgDepCache;
  11. class pkgRecords;
  12. APT_PUBLIC extern std::ostream c0out;
  13. APT_PUBLIC extern std::ostream c1out;
  14. APT_PUBLIC extern std::ostream c2out;
  15. APT_PUBLIC extern std::ofstream devnull;
  16. APT_PUBLIC extern unsigned int ScreenWidth;
  17. APT_PUBLIC bool InitOutput();
  18. void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records,
  19. pkgCache::VerIterator const &V, std::ostream &out,
  20. std::string const &format);
  21. // helper to describe global state
  22. APT_PUBLIC void ShowBroken(std::ostream &out, CacheFile &Cache, bool const Now);
  23. APT_PUBLIC void ShowBroken(std::ostream &out, pkgCacheFile &Cache, bool const Now);
  24. APT_PUBLIC bool ShowList(std::ostream &out, std::string Title, std::string List,
  25. std::string VersionsList);
  26. void ShowNew(std::ostream &out,CacheFile &Cache);
  27. void ShowDel(std::ostream &out,CacheFile &Cache);
  28. void ShowKept(std::ostream &out,CacheFile &Cache);
  29. void ShowUpgraded(std::ostream &out,CacheFile &Cache);
  30. bool ShowDowngraded(std::ostream &out,CacheFile &Cache);
  31. bool ShowHold(std::ostream &out,CacheFile &Cache);
  32. bool ShowEssential(std::ostream &out,CacheFile &Cache);
  33. void Stats(std::ostream &out, pkgDepCache &Dep);
  34. // prompting
  35. bool YnPrompt(bool Default=true);
  36. bool AnalPrompt(const char *Text);
  37. #endif