Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 672a77e

Browse files
committed
[camera]remove prefix for header file
1 parent 298b5ab commit 672a77e

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

packages/camera/camera/example/ios/RunnerTests/FLTFlashModeTests.m

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ @interface FLTFlashModeTests : XCTestCase
1212

1313
@implementation FLTFlashModeTests
1414

15-
- (void)testGetFLTFlashModeForString {
16-
XCTAssertEqual(FLTFlashModeOff, getFLTFlashModeForString(@"off"));
17-
XCTAssertEqual(FLTFlashModeAuto, getFLTFlashModeForString(@"auto"));
18-
XCTAssertEqual(FLTFlashModeAlways, getFLTFlashModeForString(@"always"));
19-
XCTAssertEqual(FLTFlashModeTorch, getFLTFlashModeForString(@"torch"));
20-
XCTAssertThrows(getFLTFlashModeForString(@"unkwown"));
15+
- (void)testFLTGetFLTFlashModeForString {
16+
XCTAssertEqual(FLTFlashModeOff, FLTGetFLTFlashModeForString(@"off"));
17+
XCTAssertEqual(FLTFlashModeAuto, FLTGetFLTFlashModeForString(@"auto"));
18+
XCTAssertEqual(FLTFlashModeAlways, FLTGetFLTFlashModeForString(@"always"));
19+
XCTAssertEqual(FLTFlashModeTorch, FLTGetFLTFlashModeForString(@"torch"));
20+
XCTAssertThrows(FLTGetFLTFlashModeForString(@"unkwown"));
2121
}
2222

23-
- (void)testGetAVCaptureFlashModeForFLTFlashMode {
24-
XCTAssertEqual(AVCaptureFlashModeOff, getAVCaptureFlashModeForFLTFlashMode(FLTFlashModeOff));
25-
XCTAssertEqual(AVCaptureFlashModeAuto, getAVCaptureFlashModeForFLTFlashMode(FLTFlashModeAuto));
26-
XCTAssertEqual(AVCaptureFlashModeOn, getAVCaptureFlashModeForFLTFlashMode(FLTFlashModeAlways));
27-
XCTAssertEqual(-1, getAVCaptureFlashModeForFLTFlashMode(FLTFlashModeTorch));
23+
- (void)testFLTGetAVCaptureFlashModeForFLTFlashMode {
24+
XCTAssertEqual(AVCaptureFlashModeOff, FLTGetAVCaptureFlashModeForFLTFlashMode(FLTFlashModeOff));
25+
XCTAssertEqual(AVCaptureFlashModeAuto, FLTGetAVCaptureFlashModeForFLTFlashMode(FLTFlashModeAuto));
26+
XCTAssertEqual(AVCaptureFlashModeOn, FLTGetAVCaptureFlashModeForFLTFlashMode(FLTFlashModeAlways));
27+
XCTAssertEqual(-1, FLTGetAVCaptureFlashModeForFLTFlashMode(FLTFlashModeTorch));
2828
}
2929

3030
@end

packages/camera/camera/ios/Classes/CameraPlugin.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
#import <CoreMotion/CoreMotion.h>
1111
#import <libkern/OSAtomic.h>
1212
#import <uuid/uuid.h>
13-
#import "FLTFlashMode.h"
1413
#import "FLTThreadSafeEventChannel.h"
1514
#import "FLTThreadSafeFlutterResult.h"
1615
#import "FLTThreadSafeMethodChannel.h"
1716
#import "FLTThreadSafeTextureRegistry.h"
17+
#import "FlashMode.h"
1818

1919
@interface FLTSavePhotoDelegate : NSObject <AVCapturePhotoCaptureDelegate>
2020
@property(readonly, nonatomic) NSString *path;
@@ -440,7 +440,7 @@ - (void)captureToFile:(FLTThreadSafeFlutterResult *)result API_AVAILABLE(ios(10)
440440
[settings setHighResolutionPhotoEnabled:YES];
441441
}
442442

443-
AVCaptureFlashMode avFlashMode = getAVCaptureFlashModeForFLTFlashMode(_flashMode);
443+
AVCaptureFlashMode avFlashMode = FLTGetAVCaptureFlashModeForFLTFlashMode(_flashMode);
444444
if (avFlashMode != -1) {
445445
[settings setFlashMode:avFlashMode];
446446
}
@@ -887,7 +887,7 @@ - (void)unlockCaptureOrientationWithResult:(FLTThreadSafeFlutterResult *)result
887887
- (void)setFlashModeWithResult:(FLTThreadSafeFlutterResult *)result mode:(NSString *)modeStr {
888888
FLTFlashMode mode;
889889
@try {
890-
mode = getFLTFlashModeForString(modeStr);
890+
mode = FLTGetFLTFlashModeForString(modeStr);
891891
} @catch (NSError *e) {
892892
[result sendError:e];
893893
return;
@@ -917,7 +917,7 @@ - (void)setFlashModeWithResult:(FLTThreadSafeFlutterResult *)result mode:(NSStri
917917
details:nil];
918918
return;
919919
}
920-
AVCaptureFlashMode avFlashMode = getAVCaptureFlashModeForFLTFlashMode(mode);
920+
AVCaptureFlashMode avFlashMode = FLTGetAVCaptureFlashModeForFLTFlashMode(mode);
921921
if (![_capturePhotoOutput.supportedFlashModes
922922
containsObject:[NSNumber numberWithInt:((int)avFlashMode)]]) {
923923
[result sendErrorWithCode:@"setFlashModeFailed"

packages/camera/camera/ios/Classes/CameraPlugin.modulemap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ framework module camera {
66

77
explicit module Test {
88
header "CameraPlugin_Test.h"
9-
header "FLTFlashMode.h"
9+
header "FlashMode.h"
1010
}
1111
}

packages/camera/camera/ios/Classes/FLTFlashMode.h renamed to packages/camera/camera/ios/Classes/FlashMode.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ typedef NS_ENUM(NSInteger, FLTFlashMode) {
2121
* Gets FLTFlashMode from its string representation.
2222
* @param mode a string representation of the FLTFlashMode.
2323
*/
24-
extern FLTFlashMode getFLTFlashModeForString(NSString *mode);
24+
extern FLTFlashMode FLTGetFLTFlashModeForString(NSString *mode);
2525

2626
/**
2727
* Gets AVCaptureFlashMode from FLTFlashMode.
2828
* @param mode flash mode.
2929
*/
30-
extern AVCaptureFlashMode getAVCaptureFlashModeForFLTFlashMode(FLTFlashMode mode);
30+
extern AVCaptureFlashMode FLTGetAVCaptureFlashModeForFLTFlashMode(FLTFlashMode mode);
3131

3232
NS_ASSUME_NONNULL_END

packages/camera/camera/ios/Classes/FLTFlashMode.m renamed to packages/camera/camera/ios/Classes/FlashMode.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
#import "FLTFlashMode.h"
5+
#import "FlashMode.h"
66

7-
FLTFlashMode getFLTFlashModeForString(NSString *mode) {
7+
FLTFlashMode FLTGetFLTFlashModeForString(NSString *mode) {
88
if ([mode isEqualToString:@"off"]) {
99
return FLTFlashModeOff;
1010
} else if ([mode isEqualToString:@"auto"]) {
@@ -24,7 +24,7 @@ FLTFlashMode getFLTFlashModeForString(NSString *mode) {
2424
}
2525
}
2626

27-
AVCaptureFlashMode getAVCaptureFlashModeForFLTFlashMode(FLTFlashMode mode) {
27+
AVCaptureFlashMode FLTGetAVCaptureFlashModeForFLTFlashMode(FLTFlashMode mode) {
2828
switch (mode) {
2929
case FLTFlashModeOff:
3030
return AVCaptureFlashModeOff;

0 commit comments

Comments
 (0)