Skip to content

Commit

Permalink
Fix AespaOption initializer's accessibility
Browse files Browse the repository at this point in the history
- fix #42
  • Loading branch information
enebin committed Jun 3, 2024
1 parent 334e5ab commit 88e3024
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Sources/Aespa/AespaOption.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public extension AespaOption {
/// The rule for naming video files.
public var fileExtension: String

init(
public init(
albumName: String?,
videoDirectoryName: String = "video",
photoDirectoryName: String = "photo",
Expand Down Expand Up @@ -103,27 +103,35 @@ public extension AespaOption {
/// An `AVCaptureDevice.DeviceType` value that determines camera device.
/// If not specified, the device is automatically selected.
public var cameraDevicePreference: AVCaptureDevice.DeviceType?

public init(cameraDevicePreference: AVCaptureDevice.DeviceType? = nil) {
self.cameraDevicePreference = cameraDevicePreference
}
}

/// `Log` provides an option for enabling or disabling logging.
struct Log {
/// Enable logging
public var loggingEnabled: Bool = true

public init(loggingEnabled: Bool) {
self.loggingEnabled = loggingEnabled
}
}
}

/// `AespaOption` extension related to file naming rules and file extensions.
public extension AespaOption {
/// `FileNamingRulePreset` provides pre-configured file naming rules.
enum FileNamingRulePreset {
struct Timestamp {
public struct Timestamp {
let formatter: DateFormatter
var rule: FileNamingRule {
public var rule: FileNamingRule {
return { formatter.string(from: Date()) }
}

/// Creates a `Timestamp` file naming rule.
init() {
public init() {
formatter = DateFormatter()
formatter.dateFormat = "yyyy_MM_dd_HH_mm_ss"
}
Expand Down

0 comments on commit 88e3024

Please sign in to comment.