Skip to content

Commit 6a4c7b0

Browse files
Roland QuastRoland Quast
authored andcommitted
Added all descriptions for the settings.
1 parent 6d85ef1 commit 6a4c7b0

File tree

2 files changed

+114
-7
lines changed

2 files changed

+114
-7
lines changed

jsonscan/JsonConfiguration.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ static NSString * const JSCOptionUseBlackWhiteThreshold = @"use-back-white-thres
88
static NSString * const JSCOptionDefaultBlackWhiteThreshold = @"default-black-and-white-threshold";
99
static NSString * const JSCOptionThresholdForBlackAndWhiteScanning = @"threshold-for-black-and-white-scanning";
1010
static NSString * const JSCCanPerformOverviewScan = @"can-perform-overview-scan";
11+
static NSString * const JSCOverviewResolution = @"overview-resolution";
1112
static NSString * const JSCBitDepth = @"bit-depth";
1213
static NSString * const JSCMeasurementUnit = @"measurement-unit";
1314
static NSString * const JSCNativeXResolution = @"native-x-resolution";
1415
static NSString * const JSCNativeYResolution = @"native-y-resolution";
15-
static NSString * const JSCOverviewResolution = @"overview-resolution";
1616
static NSString * const JSCPixelDataType = @"pixel-data-type";
17+
static NSString * const JSCSupportedPixelDataTypes = @"supported-pixel-data-types";
1718
static NSString * const JSCScaleFactor = @"scale-factor";
1819
static NSString * const JSCSupportedBitDepths = @"supported-bit-depths";
1920
static NSString * const JSCPreferredResolutions = @"preferred-resolutions";
@@ -29,6 +30,7 @@ static NSString * const JSCIsReverseFeederPageOrder = @"is-reverse-feeder-page-o
2930
static NSString * const JSCSupportsDuplexScanning = @"supports-duplex-scanning";
3031
static NSString * const JSCResolution = @"resolution";
3132
static NSString * const JSCDocumentType = @"document-type";
33+
static NSString * const JSCSupportedDocumentTypes = @"supported-document-types";
3234
static NSString * const JSCEvenPageOrientation = @"even-page-orientation";
3335
static NSString * const JSCOddPageOrientation = @"odd-page-orientation";
3436

jsonscan/JsonConfiguration.m

Lines changed: 111 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,116 @@ + (NSDictionary*)getOptions
1818
{
1919

2020
return @{
21+
22+
JSCIsDocumentLoaded: @{
23+
@"description": @"Is there a page loaded in the document feeder?",
24+
},
25+
JSCIsDuplexScanningEnabled: @{
26+
@"description": @"Is double-sided scanning (duplex) enabled?",
27+
@"see": JSCSupportsDuplexScanning
28+
},
29+
JSCIsReverseFeederPageOrder: @{
30+
@"description": @"Does the document feeder support reading pages from back to front?",
31+
},
32+
JSCSupportsDuplexScanning: @{
33+
@"description": @"Does this device support double-sided scanning?",
34+
@"see": JSCIsDuplexScanningEnabled
35+
},
36+
JSCCanPerformOverviewScan: @{
37+
@"description": @"Can perform an overview scan (a quick scan for displaying a preview image).",
38+
@"see": JSCOverviewResolution
39+
},
40+
JSCOverviewResolution: @{
41+
@"description": @"Resolution in DPI for overview scans.",
42+
@"see": JSCCanPerformOverviewScan
43+
},
44+
JSCMeasurementUnit: @{
45+
@"description": @"The measurement unit (type of measurement) used for measurements.",
46+
@"see": JSCSupportedMeasurementUnits
47+
},
48+
JSCSupportedMeasurementUnits: @{
49+
@"setter": JSCMeasurementUnit,
50+
@"description": @"A list of supported measurement units for this device.",
51+
},
52+
JSCResolution: @{
53+
@"description": @"The resolution for scanning (in DPI).",
54+
@"see": JSCPreferredResolutions
55+
},
56+
JSCPreferredResolutions: @{
57+
@"setter": JSCResolution,
58+
@"description": @"A list of resolutions that the device prefers for scanning.",
59+
},
60+
JSCNativeXResolution: @{
61+
@"description": @"The native resolution of the scanner across the x axis.",
62+
@"see": JSCNativeYResolution
63+
},
64+
JSCNativeYResolution: @{
65+
@"description": @"The native resolution of the scanner across the y axis.",
66+
@"see": JSCNativeXResolution
67+
},
68+
JSCScanArea: @{
69+
@"description": @"The area to be scanned.",
70+
},
71+
JSCScanAreaOrientation: @{
72+
@"description": @"Page orientation for the scan."
73+
},
74+
JSCEvenPageOrientation: @{
75+
@"description": @"Page orientation for the scan for for even pages.",
76+
},
77+
JSCOddPageOrientation: @{
78+
@"description": @"Page orientation for the scan for for odd pages.",
79+
},
80+
JSCDocumentType: @{
81+
@"description": @"The document type to be scanned.",
82+
@"see": JSCSupportedDocumentTypes
83+
},
84+
JSCSupportedDocumentTypes: @{
85+
@"setter": JSCDocumentType,
86+
@"description": @"A list of supported document types that can be scanned."
87+
},
88+
JSCDocumentSize: @{
89+
@"description": @"The size of the document to be scanned."
90+
},
91+
JSCScaleFactor: @{
92+
@"description": @"The scale (in percent) that the image is to be scanned at.",
93+
@"see": JSCPreferredScaleFactors
94+
},
95+
JSCPreferredScaleFactors: @{
96+
@"setter": JSCScaleFactor,
97+
@"description": @"A list of preferred scale factors for the device."
98+
},
99+
JSCBitDepth: @{
100+
@"description": @"The bit depth to scan at.",
101+
@"see": JSCSupportedBitDepths
102+
},
103+
JSCSupportedBitDepths: @{
104+
@"setter": JSCBitDepth,
105+
@"description": @"A list of supported bit depths the device is capable of.",
106+
},
107+
JSCPixelDataType: @{
108+
@"description": @"Pixel data type for the scan.",
109+
@"see": JSCSupportedPixelDataTypes
110+
},
111+
JSCSupportedPixelDataTypes: @{
112+
@"setter": JSCPixelDataType,
113+
@"description": @"A list of supported pixel data types for the device."
114+
},
21115
JSCOptionCanUseBlackWhiteThreshold: @{
22-
@"setter": JSCOptionUseBlackWhiteThreshold,
116+
@"setter": JSCOptionThresholdForBlackAndWhiteScanning,
23117
@"description": @"Convert images to black & white using a threshold value.",
24118
@"see": JSCOptionDefaultBlackWhiteThreshold
25-
},
119+
},
26120
JSCOptionDefaultBlackWhiteThreshold: @{
27121
@"setter": JSCOptionThresholdForBlackAndWhiteScanning,
28-
@"description": @"A range from 0 to 255 for the black and white scanning conversion threshold.",
122+
@"description": @"A default value for the black and white scanning conversion threshold.",
29123
@"see": JSCOptionCanUseBlackWhiteThreshold
30-
}
31-
};
124+
},
125+
JSCOptionThresholdForBlackAndWhiteScanning: @{
126+
@"description": @"A value between 0 and 255 for the black and white scanning conversion threshold.",
127+
@"see": JSCOptionCanUseBlackWhiteThreshold
128+
}
129+
130+
};
32131

33132
}
34133

@@ -388,6 +487,12 @@ - (MutableOrderedDictionary*)getScannerOptions:(ICScannerFunctionalUnit*)functio
388487

389488
ICScannerPixelDataType pixelDataType = functionalUnit.pixelDataType;
390489
[readwrite setObject:[self getPixelDataTypeOptions:pixelDataType] forKey:JSCPixelDataType];
490+
491+
MutableOrderedDictionary * supportedPixelDataTypes = [[MutableOrderedDictionary alloc] init];
492+
for (int i = 0; i <= 8; i++) {
493+
[supportedPixelDataTypes addEntriesFromDictionary:[self getPixelDataTypeOptions:i]];
494+
};
495+
[readonly setObject:supportedPixelDataTypes forKey:JSCSupportedPixelDataTypes];
391496

392497
[readwrite setObject:[NSString stringWithFormat:@"%@", @(functionalUnit.scaleFactor)] forKey:JSCScaleFactor];
393498

@@ -450,7 +555,7 @@ - (MutableOrderedDictionary*)getScannerOptions:(ICScannerFunctionalUnit*)functio
450555
[dfu.supportedDocumentTypes enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) {
451556
[supportedDocumentTypes addEntriesFromDictionary:[self getDocumentTypeOptions:idx]];
452557
}];
453-
[readonly setObject:supportedDocumentTypes forKey:JSCDocumentType];
558+
[readonly setObject:supportedDocumentTypes forKey:JSCSupportedDocumentTypes];
454559

455560
ICEXIFOrientationType evenPageOrientation = dfu.evenPageOrientation;
456561
[readwrite setObject:[self getOrientationOptions:evenPageOrientation] forKey:JSCEvenPageOrientation];

0 commit comments

Comments
 (0)