api_earn.h 750 B

1234567891011121314151617181920212223242526272829303132333435
  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. class ChannelData;
  9. namespace Ui {
  10. class RippleButton;
  11. class Show;
  12. } // namespace Ui
  13. namespace Api {
  14. void RestrictSponsored(
  15. not_null<ChannelData*> channel,
  16. bool restricted,
  17. Fn<void(QString)> failed);
  18. struct RewardReceiver final {
  19. ChannelData *currencyReceiver = nullptr;
  20. PeerData *creditsReceiver = nullptr;
  21. Fn<uint64()> creditsAmount;
  22. };
  23. void HandleWithdrawalButton(
  24. RewardReceiver receiver,
  25. not_null<Ui::RippleButton*> button,
  26. std::shared_ptr<Ui::Show> show);
  27. } // namespace Api