11// Copyright 2013 The Flutter Authors. All rights reserved.
22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
4- // Autogenerated from Pigeon (v5.0.1 ), do not edit directly.
4+ // Autogenerated from Pigeon (v10.1.2 ), do not edit directly.
55// See also: https://pub.dev/packages/pigeon
66
77#undef _HAS_EXCEPTIONS
1818#include < string>
1919
2020namespace url_launcher_windows {
21+ using flutter::BasicMessageChannel;
22+ using flutter::CustomEncodableValue;
23+ using flutter::EncodableList;
24+ using flutter::EncodableMap;
25+ using flutter::EncodableValue;
2126
2227// / The codec used by UrlLauncherApi.
2328const flutter::StandardMessageCodec& UrlLauncherApi::GetCodec () {
@@ -30,16 +35,15 @@ const flutter::StandardMessageCodec& UrlLauncherApi::GetCodec() {
3035void UrlLauncherApi::SetUp (flutter::BinaryMessenger* binary_messenger,
3136 UrlLauncherApi* api) {
3237 {
33- auto channel =
34- std::make_unique<flutter::BasicMessageChannel<flutter::EncodableValue>>(
35- binary_messenger, " dev.flutter.pigeon.UrlLauncherApi.canLaunchUrl" ,
36- &GetCodec ());
38+ auto channel = std::make_unique<BasicMessageChannel<>>(
39+ binary_messenger, " dev.flutter.pigeon.UrlLauncherApi.canLaunchUrl" ,
40+ &GetCodec ());
3741 if (api != nullptr ) {
3842 channel->SetMessageHandler (
39- [api](const flutter:: EncodableValue& message,
40- const flutter::MessageReply<flutter:: EncodableValue>& reply) {
43+ [api](const EncodableValue& message,
44+ const flutter::MessageReply<EncodableValue>& reply) {
4145 try {
42- const auto & args = std::get<flutter:: EncodableList>(message);
46+ const auto & args = std::get<EncodableList>(message);
4347 const auto & encodable_url_arg = args.at (0 );
4448 if (encodable_url_arg.IsNull ()) {
4549 reply (WrapError (" url_arg unexpectedly null." ));
@@ -51,10 +55,9 @@ void UrlLauncherApi::SetUp(flutter::BinaryMessenger* binary_messenger,
5155 reply (WrapError (output.error ()));
5256 return ;
5357 }
54- flutter::EncodableList wrapped;
55- wrapped.push_back (
56- flutter::EncodableValue (std::move (output).TakeValue ()));
57- reply (flutter::EncodableValue (std::move (wrapped)));
58+ EncodableList wrapped;
59+ wrapped.push_back (EncodableValue (std::move (output).TakeValue ()));
60+ reply (EncodableValue (std::move (wrapped)));
5861 } catch (const std::exception& exception) {
5962 reply (WrapError (exception.what ()));
6063 }
@@ -64,16 +67,15 @@ void UrlLauncherApi::SetUp(flutter::BinaryMessenger* binary_messenger,
6467 }
6568 }
6669 {
67- auto channel =
68- std::make_unique<flutter::BasicMessageChannel<flutter::EncodableValue>>(
69- binary_messenger, " dev.flutter.pigeon.UrlLauncherApi.launchUrl" ,
70- &GetCodec ());
70+ auto channel = std::make_unique<BasicMessageChannel<>>(
71+ binary_messenger, " dev.flutter.pigeon.UrlLauncherApi.launchUrl" ,
72+ &GetCodec ());
7173 if (api != nullptr ) {
7274 channel->SetMessageHandler (
73- [api](const flutter:: EncodableValue& message,
74- const flutter::MessageReply<flutter:: EncodableValue>& reply) {
75+ [api](const EncodableValue& message,
76+ const flutter::MessageReply<EncodableValue>& reply) {
7577 try {
76- const auto & args = std::get<flutter:: EncodableList>(message);
78+ const auto & args = std::get<EncodableList>(message);
7779 const auto & encodable_url_arg = args.at (0 );
7880 if (encodable_url_arg.IsNull ()) {
7981 reply (WrapError (" url_arg unexpectedly null." ));
@@ -85,9 +87,9 @@ void UrlLauncherApi::SetUp(flutter::BinaryMessenger* binary_messenger,
8587 reply (WrapError (output.value ()));
8688 return ;
8789 }
88- flutter:: EncodableList wrapped;
89- wrapped.push_back (flutter:: EncodableValue ());
90- reply (flutter:: EncodableValue (std::move (wrapped)));
90+ EncodableList wrapped;
91+ wrapped.push_back (EncodableValue ());
92+ reply (EncodableValue (std::move (wrapped)));
9193 } catch (const std::exception& exception) {
9294 reply (WrapError (exception.what ()));
9395 }
@@ -98,16 +100,16 @@ void UrlLauncherApi::SetUp(flutter::BinaryMessenger* binary_messenger,
98100 }
99101}
100102
101- flutter::EncodableValue UrlLauncherApi::WrapError (
102- std::string_view error_message) {
103- return flutter::EncodableValue (flutter::EncodableList{
104- flutter::EncodableValue (std::string (error_message)),
105- flutter::EncodableValue (" Error" ), flutter::EncodableValue ()});
103+ EncodableValue UrlLauncherApi::WrapError (std::string_view error_message) {
104+ return EncodableValue (
105+ EncodableList{EncodableValue (std::string (error_message)),
106+ EncodableValue (" Error" ), EncodableValue ()});
106107}
107- flutter::EncodableValue UrlLauncherApi::WrapError (const FlutterError& error) {
108- return flutter::EncodableValue (flutter::EncodableList{
109- flutter::EncodableValue (error.message ()),
110- flutter::EncodableValue (error.code ()), error.details ()});
108+
109+ EncodableValue UrlLauncherApi::WrapError (const FlutterError& error) {
110+ return EncodableValue (EncodableList{EncodableValue (error.code ()),
111+ EncodableValue (error.message ()),
112+ error.details ()});
111113}
112114
113115} // namespace url_launcher_windows
0 commit comments