history_translation.h 700 B

1234567891011121314151617181920212223242526272829303132
  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 "spellcheck/spellcheck_types.h"
  9. class History;
  10. class HistoryTranslation final {
  11. public:
  12. HistoryTranslation(
  13. not_null<History*> history,
  14. const LanguageId &offerFrom);
  15. void offerFrom(LanguageId id);
  16. [[nodiscard]] LanguageId offeredFrom() const;
  17. void translateTo(LanguageId id);
  18. [[nodiscard]] LanguageId translatedTo() const;
  19. private:
  20. const not_null<History*> _history;
  21. LanguageId _offerFrom;
  22. LanguageId _translatedTo;
  23. };