notifications_manager_linux.h 1.2 KB

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