notifications_manager_mac.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 "platform/platform_notifications_manager.h"
  9. #include "base/weak_ptr.h"
  10. namespace Platform {
  11. namespace Notifications {
  12. class Manager : public Window::Notifications::NativeManager, public base::has_weak_ptr {
  13. public:
  14. Manager(Window::Notifications::System *system);
  15. ~Manager();
  16. protected:
  17. void doShowNativeNotification(
  18. NotificationInfo &&info,
  19. Ui::PeerUserpicView &userpicView) override;
  20. void doClearAllFast() override;
  21. void doClearFromItem(not_null<HistoryItem*> item) override;
  22. void doClearFromTopic(not_null<Data::ForumTopic*> topic) override;
  23. void doClearFromHistory(not_null<History*> history) override;
  24. void doClearFromSession(not_null<Main::Session*> session) override;
  25. QString accountNameSeparator() override;
  26. bool doSkipToast() const override;
  27. void doMaybePlaySound(Fn<void()> playSound) override;
  28. void doMaybeFlashBounce(Fn<void()> flashBounce) override;
  29. private:
  30. class Private;
  31. const std::unique_ptr<Private> _private;
  32. };
  33. } // namespace Notifications
  34. } // namespace Platform