private-output.h 1.6 KB

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