export_output_stats.h 606 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. #include <atomic>
  9. namespace Export {
  10. namespace Output {
  11. class Stats {
  12. public:
  13. Stats() = default;
  14. Stats(const Stats &other);
  15. void incrementFiles();
  16. void incrementBytes(int count);
  17. int filesCount() const;
  18. int64 bytesCount() const;
  19. private:
  20. std::atomic<int> _files;
  21. std::atomic<int64> _bytes;
  22. };
  23. } // namespace Output
  24. } // namespace Export