private-output.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 V, std::ostream &out,
  20. bool include_summary=true);
  21. // helper to describe global state
  22. APT_PUBLIC void ShowBroken(std::ostream &out,CacheFile &Cache,bool Now);
  23. APT_PUBLIC bool ShowList(std::ostream &out, std::string Title, std::string List,
  24. std::string VersionsList);
  25. void ShowNew(std::ostream &out,CacheFile &Cache);
  26. void ShowDel(std::ostream &out,CacheFile &Cache);
  27. void ShowKept(std::ostream &out,CacheFile &Cache);
  28. void ShowUpgraded(std::ostream &out,CacheFile &Cache);
  29. bool ShowDowngraded(std::ostream &out,CacheFile &Cache);
  30. bool ShowHold(std::ostream &out,CacheFile &Cache);
  31. bool ShowEssential(std::ostream &out,CacheFile &Cache);
  32. void Stats(std::ostream &out, pkgDepCache &Dep);
  33. // prompting
  34. bool YnPrompt(bool Default=true);
  35. bool AnalPrompt(const char *Text);
  36. #endif