file_bookmark_mac.h 744 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. namespace Platform {
  9. class FileBookmark final {
  10. public:
  11. FileBookmark(const QByteArray &bookmark);
  12. ~FileBookmark();
  13. [[nodiscard]] bool check() const;
  14. bool enable() const;
  15. void disable() const;
  16. [[nodiscard]] const QString &name(const QString &original) const;
  17. [[nodiscard]] QByteArray bookmark() const;
  18. private:
  19. #ifdef OS_MAC_STORE
  20. struct Data;
  21. Data *data = nullptr;
  22. #endif // OS_MAC_STORE
  23. };
  24. [[nodiscard]] QByteArray PathBookmark(const QString &path);
  25. } // namespace Platform