AndroidAnalytics.cpp 712 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2018 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "Common/AndroidAnalytics.h"
  4. #include <functional>
  5. #include <string>
  6. namespace Common
  7. {
  8. static std::function<void(std::string, std::string)> s_android_send_report;
  9. void AndroidSetReportHandler(std::function<void(std::string, std::string)> func)
  10. {
  11. s_android_send_report = std::move(func);
  12. }
  13. AndroidAnalyticsBackend::AndroidAnalyticsBackend(std::string passed_endpoint)
  14. : m_endpoint{std::move(passed_endpoint)}
  15. {
  16. }
  17. AndroidAnalyticsBackend::~AndroidAnalyticsBackend() = default;
  18. void AndroidAnalyticsBackend::Send(std::string report)
  19. {
  20. s_android_send_report(m_endpoint, report);
  21. }
  22. } // namespace Common