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 local_auth_windows {
21
+ using flutter::BasicMessageChannel;
22
+ using flutter::CustomEncodableValue;
23
+ using flutter::EncodableList;
24
+ using flutter::EncodableMap;
25
+ using flutter::EncodableValue;
26
+
21
27
// / The codec used by LocalAuthApi.
22
28
const flutter::StandardMessageCodec& LocalAuthApi::GetCodec () {
23
29
return flutter::StandardMessageCodec::GetInstance (
@@ -29,24 +35,23 @@ const flutter::StandardMessageCodec& LocalAuthApi::GetCodec() {
29
35
void LocalAuthApi::SetUp (flutter::BinaryMessenger* binary_messenger,
30
36
LocalAuthApi* api) {
31
37
{
32
- auto channel =
33
- std::make_unique<flutter::BasicMessageChannel<flutter::EncodableValue>>(
34
- binary_messenger,
35
- " dev.flutter.pigeon.LocalAuthApi.isDeviceSupported" , &GetCodec ());
38
+ auto channel = std::make_unique<BasicMessageChannel<>>(
39
+ binary_messenger, " dev.flutter.pigeon.LocalAuthApi.isDeviceSupported" ,
40
+ &GetCodec ());
36
41
if (api != nullptr ) {
37
42
channel->SetMessageHandler (
38
- [api](const flutter:: EncodableValue& message,
39
- const flutter::MessageReply<flutter:: EncodableValue>& reply) {
43
+ [api](const EncodableValue& message,
44
+ const flutter::MessageReply<EncodableValue>& reply) {
40
45
try {
41
46
api->IsDeviceSupported ([reply](ErrorOr<bool >&& output) {
42
47
if (output.has_error ()) {
43
48
reply (WrapError (output.error ()));
44
49
return ;
45
50
}
46
- flutter:: EncodableList wrapped;
51
+ EncodableList wrapped;
47
52
wrapped.push_back (
48
- flutter:: EncodableValue (std::move (output).TakeValue ()));
49
- reply (flutter:: EncodableValue (std::move (wrapped)));
53
+ EncodableValue (std::move (output).TakeValue ()));
54
+ reply (EncodableValue (std::move (wrapped)));
50
55
});
51
56
} catch (const std::exception & exception ) {
52
57
reply (WrapError (exception .what ()));
@@ -57,16 +62,15 @@ void LocalAuthApi::SetUp(flutter::BinaryMessenger* binary_messenger,
57
62
}
58
63
}
59
64
{
60
- auto channel =
61
- std::make_unique<flutter::BasicMessageChannel<flutter::EncodableValue>>(
62
- binary_messenger, " dev.flutter.pigeon.LocalAuthApi.authenticate" ,
63
- &GetCodec ());
65
+ auto channel = std::make_unique<BasicMessageChannel<>>(
66
+ binary_messenger, " dev.flutter.pigeon.LocalAuthApi.authenticate" ,
67
+ &GetCodec ());
64
68
if (api != nullptr ) {
65
69
channel->SetMessageHandler (
66
- [api](const flutter:: EncodableValue& message,
67
- const flutter::MessageReply<flutter:: EncodableValue>& reply) {
70
+ [api](const EncodableValue& message,
71
+ const flutter::MessageReply<EncodableValue>& reply) {
68
72
try {
69
- const auto & args = std::get<flutter:: EncodableList>(message);
73
+ const auto & args = std::get<EncodableList>(message);
70
74
const auto & encodable_localized_reason_arg = args.at (0 );
71
75
if (encodable_localized_reason_arg.IsNull ()) {
72
76
reply (WrapError (" localized_reason_arg unexpectedly null." ));
@@ -80,10 +84,10 @@ void LocalAuthApi::SetUp(flutter::BinaryMessenger* binary_messenger,
80
84
reply (WrapError (output.error ()));
81
85
return ;
82
86
}
83
- flutter:: EncodableList wrapped;
87
+ EncodableList wrapped;
84
88
wrapped.push_back (
85
- flutter:: EncodableValue (std::move (output).TakeValue ()));
86
- reply (flutter:: EncodableValue (std::move (wrapped)));
89
+ EncodableValue (std::move (output).TakeValue ()));
90
+ reply (EncodableValue (std::move (wrapped)));
87
91
});
88
92
} catch (const std::exception & exception ) {
89
93
reply (WrapError (exception .what ()));
@@ -95,16 +99,16 @@ void LocalAuthApi::SetUp(flutter::BinaryMessenger* binary_messenger,
95
99
}
96
100
}
97
101
98
- flutter::EncodableValue LocalAuthApi::WrapError (
99
- std::string_view error_message) {
100
- return flutter::EncodableValue (flutter::EncodableList{
101
- flutter::EncodableValue (std::string (error_message)),
102
- flutter::EncodableValue (" Error" ), flutter::EncodableValue ()});
102
+ EncodableValue LocalAuthApi::WrapError (std::string_view error_message) {
103
+ return EncodableValue (
104
+ EncodableList{EncodableValue (std::string (error_message)),
105
+ EncodableValue (" Error" ), EncodableValue ()});
103
106
}
104
- flutter::EncodableValue LocalAuthApi::WrapError (const FlutterError& error) {
105
- return flutter::EncodableValue (flutter::EncodableList{
106
- flutter::EncodableValue (error.message ()),
107
- flutter::EncodableValue (error.code ()), error.details ()});
107
+
108
+ EncodableValue LocalAuthApi::WrapError (const FlutterError& error) {
109
+ return EncodableValue (EncodableList{EncodableValue (error.code ()),
110
+ EncodableValue (error.message ()),
111
+ error.details ()});
108
112
}
109
113
110
114
} // namespace local_auth_windows
0 commit comments