1
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// 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.
5
5
// See also: https://pub.dev/packages/pigeon
6
6
7
7
#undef _HAS_EXCEPTIONS
18
18
#include < string>
19
19
20
20
namespace url_launcher_windows {
21
+ using flutter::BasicMessageChannel;
22
+ using flutter::CustomEncodableValue;
23
+ using flutter::EncodableList;
24
+ using flutter::EncodableMap;
25
+ using flutter::EncodableValue;
21
26
22
27
// / The codec used by UrlLauncherApi.
23
28
const flutter::StandardMessageCodec& UrlLauncherApi::GetCodec () {
@@ -30,16 +35,15 @@ const flutter::StandardMessageCodec& UrlLauncherApi::GetCodec() {
30
35
void UrlLauncherApi::SetUp (flutter::BinaryMessenger* binary_messenger,
31
36
UrlLauncherApi* api) {
32
37
{
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 ());
37
41
if (api != nullptr ) {
38
42
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) {
41
45
try {
42
- const auto & args = std::get<flutter:: EncodableList>(message);
46
+ const auto & args = std::get<EncodableList>(message);
43
47
const auto & encodable_url_arg = args.at (0 );
44
48
if (encodable_url_arg.IsNull ()) {
45
49
reply (WrapError (" url_arg unexpectedly null." ));
@@ -51,10 +55,9 @@ void UrlLauncherApi::SetUp(flutter::BinaryMessenger* binary_messenger,
51
55
reply (WrapError (output.error ()));
52
56
return ;
53
57
}
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)));
58
61
} catch (const std::exception & exception ) {
59
62
reply (WrapError (exception .what ()));
60
63
}
@@ -64,16 +67,15 @@ void UrlLauncherApi::SetUp(flutter::BinaryMessenger* binary_messenger,
64
67
}
65
68
}
66
69
{
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 ());
71
73
if (api != nullptr ) {
72
74
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) {
75
77
try {
76
- const auto & args = std::get<flutter:: EncodableList>(message);
78
+ const auto & args = std::get<EncodableList>(message);
77
79
const auto & encodable_url_arg = args.at (0 );
78
80
if (encodable_url_arg.IsNull ()) {
79
81
reply (WrapError (" url_arg unexpectedly null." ));
@@ -85,9 +87,9 @@ void UrlLauncherApi::SetUp(flutter::BinaryMessenger* binary_messenger,
85
87
reply (WrapError (output.value ()));
86
88
return ;
87
89
}
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)));
91
93
} catch (const std::exception & exception ) {
92
94
reply (WrapError (exception .what ()));
93
95
}
@@ -98,16 +100,16 @@ void UrlLauncherApi::SetUp(flutter::BinaryMessenger* binary_messenger,
98
100
}
99
101
}
100
102
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 ()});
106
107
}
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 ()});
111
113
}
112
114
113
115
} // namespace url_launcher_windows
0 commit comments