location_pickers.h 721 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 "base/weak_ptr.h"
  9. namespace Api {
  10. struct SendAction;
  11. } // namespace Api
  12. namespace Ui {
  13. class LocationPicker;
  14. } // namespace Ui
  15. namespace Data {
  16. class LocationPickers final {
  17. public:
  18. LocationPickers();
  19. ~LocationPickers();
  20. Ui::LocationPicker *lookup(const Api::SendAction &action);
  21. void emplace(
  22. const Api::SendAction &action,
  23. not_null<Ui::LocationPicker*> picker);
  24. private:
  25. struct Entry;
  26. std::vector<Entry> _pickers;
  27. };
  28. } // namespace Data