| Flutter macOS Embedder |

Public Member Functions | Protected Member Functions | List of all members
flutter::EngineMethodResult< T > Class Template Reference

`#include <engine_method_result.h>`

Inheritance diagram for flutter::EngineMethodResult< T >:

## Public Member Functions
| EngineMethodResult (BinaryReply reply_handler, const MethodCodec< T > *codec)
| ~EngineMethodResult ()=default
Public Member Functions inherited from flutter::MethodResult< T >
| MethodResult ()=default
virtual | ~MethodResult ()=default
| MethodResult (MethodResult const &)=delete
MethodResult & | operator= (MethodResult const &)=delete
void | Success (const T &result)
void | Success ()
void | Error (const std::string &error_code, const std::string &error_message, const T &error_details)
void | Error (const std::string &error_code, const std::string &error_message="")
void | NotImplemented ()

## Protected Member Functions
void | SuccessInternal (const T *result) override
void | ErrorInternal (const std::string &error_code, const std::string &error_message, const T *error_details) override
void | NotImplementedInternal () override

## Detailed Description

### template<typename T>
class flutter::EngineMethodResult< T >

Definition at line 44 of file engine_method_result.h.

## Constructor & Destructor Documentation

## ◆ EngineMethodResult()

template<typename T >

flutter::EngineMethodResult< T >::EngineMethodResult | ( | BinaryReply | reply_handler,
|  | const MethodCodec< T > * | codec
| ) |  |
| inline

Definition at line 49 of file engine_method_result.h.

50 : reply_manager_(
51 std::make_unique<internal::ReplyManager>(std::move(reply_handler))),
52 codec_(codec) {}

## ◆ ~EngineMethodResult()

template<typename T >

flutter::EngineMethodResult< T >::~EngineMethodResult | ( |  | ) |
| default

## Member Function Documentation

## ◆ ErrorInternal()

template<typename T >

void flutter::EngineMethodResult< T >::ErrorInternal | ( | const std::string & | error_code,
|  | const std::string & | error_message,
|  | const T * | error_details
| ) |  |
| inlineoverrideprotectedvirtual

Implements flutter::MethodResult< T >.

Definition at line 65 of file engine_method_result.h.

67 {
68 std::unique_ptr<std::vector<uint8_t>> data =
69 codec_->EncodeErrorEnvelope(error_code, error_message, error_details);
70 reply_manager_->SendResponseData(data.get());
71 }

## ◆ NotImplementedInternal()

template<typename T >

void flutter::EngineMethodResult< T >::NotImplementedInternal | ( |  | ) |
| inlineoverrideprotectedvirtual

Implements flutter::MethodResult< T >.

Definition at line 74 of file engine_method_result.h.

74 {
75 reply_manager_->SendResponseData(nullptr);
76 }

## ◆ SuccessInternal()

template<typename T >

void flutter::EngineMethodResult< T >::SuccessInternal | ( | const T * | result | ) |
| inlineoverrideprotectedvirtual

Implements flutter::MethodResult< T >.

Definition at line 58 of file engine_method_result.h.

58 {
59 std::unique_ptr<std::vector<uint8_t>> data =
60 codec_->EncodeSuccessEnvelope(result);
61 reply_manager_->SendResponseData(data.get());
62 }

The documentation for this class was generated from the following file:

- shell/platform/common/client_wrapper/include/flutter/engine_method_result.h