reader_method_call.h 989 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef RUNNER_READER_METHOD_CALL_H_
  2. #define RUNNER_READER_METHOD_CALL_H_
  3. #include <flutter/flutter_engine.h>
  4. #include <flutter/method_channel.h>
  5. #include <flutter/plugin_registrar_windows.h>
  6. #include <flutter/standard_method_codec.h>
  7. #include <flutter/event_channel.h>
  8. #include <flutter/event_stream_handler_functions.h>
  9. #include <memory>
  10. #include <string>
  11. // Handle reader functionality method calls
  12. class ReaderMethodCall
  13. {
  14. public:
  15. // Register method channel with the given registrar
  16. static void RegisterWindowsAPI(flutter::FlutterEngine *engine);
  17. private:
  18. // Keep constructor private since this is a utility class
  19. ReaderMethodCall() = delete;
  20. ~ReaderMethodCall() = delete;
  21. // Called when a method is invoked on the channel
  22. static void HandleMethodCall(
  23. const flutter::MethodCall<flutter::EncodableValue> &method_call,
  24. std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result);
  25. };
  26. #endif // RUNNER_READER_METHOD_CALL_H_