Skip to content

Commit e978e06

Browse files
[various] Update Windows packages to Pigeon 21 (flutter#7180)
Updates all Windows platform implementation packages to use the latest version of Pigeon. The main motivation was picking up the enum naming fix, but I figured I'd do all of them at once, even if they didn't use enums.
1 parent c21b01d commit e978e06

File tree

27 files changed

+499
-293
lines changed

27 files changed

+499
-293
lines changed

packages/camera/camera_windows/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.4+1
2+
3+
* Updates to pigeon 21.
4+
15
## 0.2.4
26

37
* Removes `maxVideoDuration`/`maxDuration`, as the feature was never exposed at

packages/camera/camera_windows/lib/src/messages.g.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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 (v20.0.2), do not edit directly.
4+
// Autogenerated from Pigeon (v21.0.0), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers
77

packages/camera/camera_windows/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: camera_windows
22
description: A Flutter plugin for getting information about and controlling the camera on Windows.
33
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_windows
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
5-
version: 0.2.4
5+
version: 0.2.4+1
66

77
environment:
88
sdk: ^3.2.0
@@ -29,7 +29,7 @@ dev_dependencies:
2929
flutter_test:
3030
sdk: flutter
3131
mockito: 5.4.4
32-
pigeon: ^20.0.0
32+
pigeon: ^21.0.0
3333

3434
topics:
3535
- camera

packages/camera/camera_windows/windows/capture_controller.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ CaptureControllerImpl::CaptureControllerImpl(
3535
CaptureControllerListener* listener)
3636
: capture_controller_listener_(listener),
3737
media_settings_(
38-
PlatformMediaSettings(PlatformResolutionPreset::max, true)),
38+
PlatformMediaSettings(PlatformResolutionPreset::kMax, true)),
3939
CaptureController(){};
4040

4141
CaptureControllerImpl::~CaptureControllerImpl() {
@@ -381,17 +381,17 @@ void CaptureControllerImpl::TakePicture(const std::string& file_path) {
381381

382382
uint32_t CaptureControllerImpl::GetMaxPreviewHeight() const {
383383
switch (media_settings_.resolution_preset()) {
384-
case PlatformResolutionPreset::low:
384+
case PlatformResolutionPreset::kLow:
385385
return 240;
386-
case PlatformResolutionPreset::medium:
386+
case PlatformResolutionPreset::kMedium:
387387
return 480;
388-
case PlatformResolutionPreset::high:
388+
case PlatformResolutionPreset::kHigh:
389389
return 720;
390-
case PlatformResolutionPreset::veryHigh:
390+
case PlatformResolutionPreset::kVeryHigh:
391391
return 1080;
392-
case PlatformResolutionPreset::ultraHigh:
392+
case PlatformResolutionPreset::kUltraHigh:
393393
return 2160;
394-
case PlatformResolutionPreset::max:
394+
case PlatformResolutionPreset::kMax:
395395
default:
396396
// no limit.
397397
return 0xffffffff;

packages/camera/camera_windows/windows/messages.g.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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 (v20.0.2), do not edit directly.
4+
// Autogenerated from Pigeon (v21.0.0), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66

77
#undef _HAS_EXCEPTIONS

packages/camera/camera_windows/windows/messages.g.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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 (v20.0.2), do not edit directly.
4+
// Autogenerated from Pigeon (v21.0.0), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66

77
#ifndef PIGEON_MESSAGES_G_H_
@@ -60,12 +60,12 @@ class ErrorOr {
6060

6161
// Pigeon version of platform interface's ResolutionPreset.
6262
enum class PlatformResolutionPreset {
63-
low = 0,
64-
medium = 1,
65-
high = 2,
66-
veryHigh = 3,
67-
ultraHigh = 4,
68-
max = 5
63+
kLow = 0,
64+
kMedium = 1,
65+
kHigh = 2,
66+
kVeryHigh = 3,
67+
kUltraHigh = 4,
68+
kMax = 5
6969
};
7070

7171
// Pigeon version of MediaSettings.

packages/camera/camera_windows/windows/test/camera_plugin_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ TEST(CameraPlugin, CreateHandlerCallsInitCamera) {
142142
};
143143

144144
plugin.Create(MOCK_CAMERA_NAME,
145-
PlatformMediaSettings(PlatformResolutionPreset::max, true),
145+
PlatformMediaSettings(PlatformResolutionPreset::kMax, true),
146146
std::move(create_result));
147147

148148
EXPECT_TRUE(result_called);
@@ -168,7 +168,7 @@ TEST(CameraPlugin, CreateHandlerErrorOnInvalidDeviceId) {
168168
};
169169

170170
plugin.Create(MOCK_INVALID_CAMERA_NAME,
171-
PlatformMediaSettings(PlatformResolutionPreset::max, true),
171+
PlatformMediaSettings(PlatformResolutionPreset::kMax, true),
172172
std::move(create_result));
173173

174174
EXPECT_TRUE(result_called);
@@ -204,7 +204,7 @@ TEST(CameraPlugin, CreateHandlerErrorOnExistingDeviceId) {
204204
EXPECT_EQ(reply.value(), 1);
205205
};
206206

207-
PlatformMediaSettings media_settings(PlatformResolutionPreset::max, true);
207+
PlatformMediaSettings media_settings(PlatformResolutionPreset::kMax, true);
208208
plugin.Create(MOCK_CAMERA_NAME, media_settings,
209209
std::move(first_create_result));
210210

@@ -263,7 +263,7 @@ TEST(CameraPlugin, CreateHandlerAllowsRetry) {
263263
EXPECT_TRUE(reply.has_error());
264264
};
265265

266-
PlatformMediaSettings media_settings(PlatformResolutionPreset::max, true);
266+
PlatformMediaSettings media_settings(PlatformResolutionPreset::kMax, true);
267267
plugin.Create(MOCK_CAMERA_NAME, media_settings,
268268
std::move(first_create_result));
269269

packages/camera/camera_windows/windows/test/camera_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ TEST(Camera, InitCameraCreatesCaptureController) {
4949

5050
EXPECT_TRUE(camera->GetCaptureController() == nullptr);
5151

52-
PlatformMediaSettings media_settings(PlatformResolutionPreset::max, false);
52+
PlatformMediaSettings media_settings(PlatformResolutionPreset::kMax, false);
5353

5454
// Init camera with mock capture controller factory
5555
bool result = camera->InitCamera(
@@ -81,7 +81,7 @@ TEST(Camera, InitCameraReportsFailure) {
8181

8282
EXPECT_TRUE(camera->GetCaptureController() == nullptr);
8383

84-
PlatformMediaSettings media_settings(PlatformResolutionPreset::max, false);
84+
PlatformMediaSettings media_settings(PlatformResolutionPreset::kMax, false);
8585

8686
// Init camera with mock capture controller factory
8787
bool result = camera->InitCamera(

packages/camera/camera_windows/windows/test/capture_controller_test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void MockInitCaptureController(
3434
MockTextureRegistrar* texture_registrar, MockCaptureEngine* engine,
3535
MockCamera* camera, int64_t mock_texture_id,
3636
const PlatformMediaSettings media_settings =
37-
PlatformMediaSettings(PlatformResolutionPreset::max, true)) {
37+
PlatformMediaSettings(PlatformResolutionPreset::kMax, true)) {
3838
ComPtr<MockMediaSource> video_source = new MockMediaSource();
3939
ComPtr<MockMediaSource> audio_source = new MockMediaSource();
4040

@@ -261,7 +261,7 @@ TEST(CaptureController, InitCaptureEngineCanOnlyBeCalledOnce) {
261261

262262
bool result = capture_controller->InitCaptureDevice(
263263
texture_registrar.get(), MOCK_DEVICE_ID,
264-
PlatformMediaSettings(PlatformResolutionPreset::max, true));
264+
PlatformMediaSettings(PlatformResolutionPreset::kMax, true));
265265

266266
EXPECT_FALSE(result);
267267

@@ -303,7 +303,7 @@ TEST(CaptureController, InitCaptureEngineReportsFailure) {
303303

304304
bool result = capture_controller->InitCaptureDevice(
305305
texture_registrar.get(), MOCK_DEVICE_ID,
306-
PlatformMediaSettings(PlatformResolutionPreset::max, true));
306+
PlatformMediaSettings(PlatformResolutionPreset::kMax, true));
307307

308308
EXPECT_FALSE(result);
309309
EXPECT_FALSE(engine->initialized_);
@@ -348,7 +348,7 @@ TEST(CaptureController, InitCaptureEngineReportsAccessDenied) {
348348

349349
bool result = capture_controller->InitCaptureDevice(
350350
texture_registrar.get(), MOCK_DEVICE_ID,
351-
PlatformMediaSettings(PlatformResolutionPreset::max, true));
351+
PlatformMediaSettings(PlatformResolutionPreset::kMax, true));
352352

353353
EXPECT_FALSE(result);
354354
EXPECT_FALSE(engine->initialized_);
@@ -734,7 +734,7 @@ TEST(CaptureController, StartRecordWithSettingsSuccess) {
734734
const auto kVideoBitrate = 200000;
735735
const auto kAudioBitrate = 32000;
736736

737-
PlatformMediaSettings media_settings(PlatformResolutionPreset::max, true);
737+
PlatformMediaSettings media_settings(PlatformResolutionPreset::kMax, true);
738738
media_settings.set_frames_per_second(kFps);
739739
media_settings.set_video_bitrate(kVideoBitrate);
740740
media_settings.set_audio_bitrate(kAudioBitrate);

packages/file_selector/file_selector_windows/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 0.9.3+2
22

3+
* Updates to pigeon 21.
34
* Updates minimum supported SDK version to Flutter 3.16/Dart 3.2.
45

56
## 0.9.3+1

packages/file_selector/file_selector_windows/lib/file_selector_windows.dart

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ class FileSelectorWindows extends FileSelectorPlatform {
2323
}) async {
2424
final FileDialogResult result = await _hostApi.showOpenDialog(
2525
SelectionOptions(
26-
allowMultiple: false,
27-
selectFolders: false,
2826
allowedTypes: _typeGroupsFromXTypeGroups(acceptedTypeGroups),
2927
),
3028
initialDirectory,
@@ -41,7 +39,6 @@ class FileSelectorWindows extends FileSelectorPlatform {
4139
final FileDialogResult result = await _hostApi.showOpenDialog(
4240
SelectionOptions(
4341
allowMultiple: true,
44-
selectFolders: false,
4542
allowedTypes: _typeGroupsFromXTypeGroups(acceptedTypeGroups),
4643
),
4744
initialDirectory,
@@ -73,8 +70,6 @@ class FileSelectorWindows extends FileSelectorPlatform {
7370
}) async {
7471
final FileDialogResult result = await _hostApi.showSaveDialog(
7572
SelectionOptions(
76-
allowMultiple: false,
77-
selectFolders: false,
7873
allowedTypes: _typeGroupsFromXTypeGroups(acceptedTypeGroups),
7974
),
8075
options.initialDirectory,
@@ -95,7 +90,6 @@ class FileSelectorWindows extends FileSelectorPlatform {
9590
}) async {
9691
final FileDialogResult result = await _hostApi.showOpenDialog(
9792
SelectionOptions(
98-
allowMultiple: false,
9993
selectFolders: true,
10094
allowedTypes: <TypeGroup>[],
10195
),

0 commit comments

Comments
 (0)