-
-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
namespace NAPS2.Scan; | ||
|
||
/// <summary> | ||
/// Represents valid values for ScanOptions.BitDepth as part of PerSourceCaps. | ||
/// </summary> | ||
public class BitDepthCaps | ||
{ | ||
/// <summary> | ||
/// Whether the scanner supports BitDepth.Color. | ||
/// </summary> | ||
public bool SupportsColor { get; init; } | ||
|
||
/// <summary> | ||
/// Whether the scanner supports BitDepth.Grayscale. | ||
/// </summary> | ||
public bool SupportsGrayscale { get; init; } | ||
|
||
/// <summary> | ||
/// Whether the scanner supports BitDepth.BlackAndWhite. | ||
/// </summary> | ||
public bool SupportsBlackAndWhite { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,37 @@ | ||
namespace NAPS2.Scan; | ||
|
||
/// <summary> | ||
/// Represents scanner metadata as part of ScanCaps. | ||
/// </summary> | ||
public class MetadataCaps | ||
{ | ||
/// <summary> | ||
/// For SANE, this is the backend name. | ||
/// </summary> | ||
public string? DriverSubtype { get; init; } | ||
|
||
/// <summary> | ||
/// The device manufacturer. | ||
/// </summary> | ||
public string? Manufacturer { get; init; } | ||
|
||
/// <summary> | ||
/// The device model name. | ||
/// </summary> | ||
public string? Model { get; init; } | ||
|
||
/// <summary> | ||
/// The device serial number. | ||
/// </summary> | ||
public string? SerialNumber { get; init; } | ||
|
||
/// <summary> | ||
/// The location note associated with the device. | ||
/// </summary> | ||
public string? Location { get; init; } | ||
|
||
/// <summary> | ||
/// The URI for an icon associated with the device. | ||
/// </summary> | ||
public string? IconUri { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
namespace NAPS2.Scan; | ||
|
||
/// <summary> | ||
/// Represents valid values for ScanOptions.PaperSource as part of ScanCaps. | ||
/// </summary> | ||
public class PaperSourceCaps | ||
{ | ||
/// <summary> | ||
/// Whether the scanner supports PaperSource.Flatbed. | ||
/// </summary> | ||
public bool SupportsFlatbed { get; init; } | ||
|
||
/// <summary> | ||
/// Whether the scanner supports PaperSource.Feeder. | ||
/// </summary> | ||
public bool SupportsFeeder { get; init; } | ||
|
||
/// <summary> | ||
/// Whether the scanner supports PaperSource.Duplex. | ||
/// </summary> | ||
public bool SupportsDuplex { get; init; } | ||
|
||
/// <summary> | ||
/// Whether the scanner has the ability to detect if paper is in the feeder for use with PaperSource.Auto. | ||
/// </summary> | ||
public bool CanCheckIfFeederHasPaper { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,33 @@ | ||
namespace NAPS2.Scan; | ||
|
||
/// <summary> | ||
/// Represents scanner capabilities. This includes valid values for scanning options and extra metadata beyond just the | ||
/// device name and id. | ||
/// </summary> | ||
public class ScanCaps | ||
{ | ||
/// <summary> | ||
/// Metadata for the device. | ||
/// </summary> | ||
public MetadataCaps? MetadataCaps { get; init; } | ||
|
||
/// <summary> | ||
/// Valid values for ScanOptions.PaperSource. | ||
/// </summary> | ||
public PaperSourceCaps? PaperSourceCaps { get; init; } | ||
|
||
/// <summary> | ||
/// Capabilities specific to the Flatbed paper source. | ||
/// </summary> | ||
public PerSourceCaps? FlatbedCaps { get; init; } | ||
|
||
/// <summary> | ||
/// Capabilities specific to the Feeder paper source. | ||
/// </summary> | ||
public PerSourceCaps? FeederCaps { get; init; } | ||
|
||
/// <summary> | ||
/// Capabilities specific to the Duplex paper source. | ||
/// </summary> | ||
public PerSourceCaps? DuplexCaps { get; init; } | ||
} |