-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
9 changed files
with
140 additions
and
94 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,12 +1,14 @@ | ||
namespace NAPS2.Scan; | ||
|
||
public record BitDepthCaps( | ||
bool SupportsColor, | ||
bool SupportsGrayscale, | ||
bool SupportsBlackAndWhite | ||
) | ||
public class BitDepthCaps | ||
{ | ||
private BitDepthCaps() : this(false, false, false) | ||
internal BitDepthCaps() | ||
{ | ||
} | ||
|
||
public bool SupportsColor { get; init; } | ||
|
||
public bool SupportsGrayscale { get; init; } | ||
|
||
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
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,15 +1,20 @@ | ||
namespace NAPS2.Scan; | ||
|
||
public record MetadataCaps( | ||
string? DriverSubtype = null, | ||
string? Manufacturer = null, | ||
string? Model = null, | ||
string? SerialNumber = null, | ||
string? Location = null, | ||
string? IconUri = null | ||
) | ||
public class MetadataCaps | ||
{ | ||
private MetadataCaps() : this(null, null, null, null, null, null) | ||
internal MetadataCaps() | ||
{ | ||
} | ||
|
||
public string? DriverSubtype { get; init; } | ||
|
||
public string? Manufacturer { get; init; } | ||
|
||
public string? Model { get; init; } | ||
|
||
public string? SerialNumber { get; init; } | ||
|
||
public string? Location { get; init; } | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
namespace NAPS2.Scan; | ||
|
||
public record PageSizeCaps( | ||
PageSize ScanAreaSize | ||
) | ||
public class PageSizeCaps | ||
{ | ||
private PageSizeCaps() : this(new PageSize(0, 0, PageSizeUnit.Inch)) | ||
internal PageSizeCaps() | ||
{ | ||
} | ||
|
||
public PageSize? ScanArea { 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
namespace NAPS2.Scan; | ||
|
||
public record PaperSourceCaps( | ||
bool SupportsFlatbed, | ||
bool SupportsFeeder, | ||
bool SupportsDuplex, | ||
bool CanCheckIfFeederHasPaper | ||
) | ||
public class PaperSourceCaps | ||
{ | ||
private PaperSourceCaps() : this(false, false, false, false) | ||
internal PaperSourceCaps() | ||
{ | ||
} | ||
|
||
public bool SupportsFlatbed { get; init; } | ||
|
||
public bool SupportsFeeder { get; init; } | ||
|
||
public bool SupportsDuplex { get; init; } | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
namespace NAPS2.Scan; | ||
|
||
public record PerSourceCaps( | ||
DpiCaps? DpiCaps, | ||
BitDepthCaps? BitDepthCaps, | ||
PageSizeCaps? PageSizeCaps | ||
) | ||
public class PerSourceCaps | ||
{ | ||
private PerSourceCaps() : this(null, null, null) | ||
internal PerSourceCaps() | ||
{ | ||
} | ||
|
||
public DpiCaps? DpiCaps { get; init; } | ||
|
||
public BitDepthCaps? BitDepthCaps { get; init; } | ||
|
||
public PageSizeCaps? PageSizeCaps { 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
namespace NAPS2.Scan; | ||
|
||
public record ScanCaps( | ||
MetadataCaps? MetadataCaps, | ||
PaperSourceCaps? PaperSourceCaps, | ||
PerSourceCaps? FlatbedCaps, | ||
PerSourceCaps? FeederCaps, | ||
PerSourceCaps? DuplexCaps | ||
) | ||
public class ScanCaps | ||
{ | ||
private ScanCaps() : this(null, null, null, null, null) | ||
internal ScanCaps() | ||
{ | ||
} | ||
|
||
public MetadataCaps? MetadataCaps { get; init; } | ||
|
||
public PaperSourceCaps? PaperSourceCaps { get; init; } | ||
|
||
public PerSourceCaps? FlatbedCaps { get; init; } | ||
|
||
public PerSourceCaps? FeederCaps { get; init; } | ||
|
||
public PerSourceCaps? DuplexCaps { get; init; } | ||
} |