Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support to PAPPL for converting non-eSCL scanners to eSCL Servers #249

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
68ccc82
Update for better codedoc parsing
Kappuccino111 Jan 18, 2023
50e6683
Update for better codedoc parsing
Kappuccino111 Jan 18, 2023
b44151d
Update for better codedoc parsing
Kappuccino111 Jan 18, 2023
5429058
Update scanning implementations
Kappuccino111 Jan 18, 2023
ed10846
Update for scanning implementation using codedoc
Kappuccino111 Jan 18, 2023
9924dff
Updating Links.c to update papplScannerRemoveLink
Kappuccino111 Feb 10, 2023
85bb95d
Update system-accessors.c
Kappuccino111 Feb 10, 2023
35ef686
Updating system-private.h
Kappuccino111 Feb 10, 2023
7520b7a
Updating client-webif.c with scan implementations
Kappuccino111 Feb 10, 2023
19a66b1
Updating client-accessors.c with scan implementations
Kappuccino111 Feb 10, 2023
7696170
Update job-accessors.c
Kappuccino111 Feb 10, 2023
d6d0f7c
Update job-accessors file for scan implemenat
Kappuccino111 Feb 10, 2023
17f9fb4
Update scanner.h according to needs of implementation of scanning
Kappuccino111 Feb 10, 2023
0830028
Update system.h after scan implementation
Kappuccino111 Feb 10, 2023
2b9880e
Updating various functions for scanning implementations
Kappuccino111 Feb 14, 2023
a89a977
Updating copyright info
Kappuccino111 Feb 14, 2023
5f107d2
Updating job-process.c with scan implementations
Kappuccino111 Feb 14, 2023
3db54dc
Updating minor changes
Kappuccino111 Feb 14, 2023
75ada28
Updating position of "extern char environ"
Kappuccino111 Feb 18, 2023
3b8a0cf
General Updates
Kappuccino111 Feb 18, 2023
4ba7090
Creating file for USB Supported Scanning
Kappuccino111 Feb 18, 2023
4f54374
Removing papplScannerGetScanGroup function
Kappuccino111 Feb 18, 2023
f1a102d
Adding scanner-xml.h for escl-parser support
Kappuccino111 Mar 10, 2023
53708f8
Adding client-escl.c for parsing for Scanner Capabilities.
Kappuccino111 Mar 10, 2023
c47f965
Creating xml-parser baseline implementation.
Kappuccino111 Jun 5, 2023
6d36b8f
Updating Makefile for escl-ops.c
Kappuccino111 Jun 28, 2023
63fa90c
Create dummy file: ScannerCapabilities.xml
Kappuccino111 Jun 28, 2023
e63d288
Create dummy status file: ScannerStatus.xml
Kappuccino111 Jun 28, 2023
468c042
Adding escl-ops.c and its header.
Kappuccino111 Jun 28, 2023
05f0a26
Delete escl-ops.c
Kappuccino111 Jun 28, 2023
aa2612c
Delete escl-ops.h
Kappuccino111 Jun 28, 2023
df632a6
Adding escl-ops.c in pappl directory
Kappuccino111 Jun 28, 2023
b74724d
Update client.c for GET and POST requests.
Kappuccino111 Jun 28, 2023
4e80adc
Updating indentation in ScannerStatus.xml
Kappuccino111 Jul 9, 2023
7da8f74
Update indentation in ScannerCapabilities.xml
Kappuccino111 Jul 9, 2023
5802ac5
Deleting redundant escl.o file
Kappuccino111 Jul 9, 2023
693bbfb
Update escl-ops.c with necessary indents and comments
Kappuccino111 Jul 9, 2023
66bb5f0
Update escl-ops.h with necessary format.
Kappuccino111 Jul 9, 2023
7f1922c
Update client.c with necessary indentation and comments
Kappuccino111 Jul 9, 2023
8c53f39
Deleting redundant file xml_parser.c
Kappuccino111 Jul 9, 2023
3715760
Changes In Configure and Makefile to include libxml
Kappuccino111 Aug 13, 2023
e352634
Autogen file for aclocal
Kappuccino111 Aug 13, 2023
5f7e257
Fixing any formatting errors
Kappuccino111 Aug 13, 2023
c56f109
File containing Data Structures and XML creation
Kappuccino111 Aug 13, 2023
aa6355e
Adding extra end line at EOF
Kappuccino111 Aug 13, 2023
e2dc822
Fixing formatting
Kappuccino111 Aug 13, 2023
d7fdce8
Updating Dummy Driver Files
Kappuccino111 Oct 18, 2023
b40fbcd
Updating Make and Status Files
Kappuccino111 Oct 18, 2023
aa9d6cb
Updating client connection files
Kappuccino111 Oct 18, 2023
891b9be
Updating PAPPL makefile
Kappuccino111 Oct 18, 2023
7de9732
Updating IP handler files
Kappuccino111 Oct 18, 2023
7c07317
Updating Scanner Capabilities Files
Kappuccino111 Oct 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 121 additions & 8 deletions doc/pappl-body.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,9 @@ PAPPL provides five main objects:
printer application;
- [Clients](@) (`pappl_client_t`): The objects that manage client connections;
- [Devices](@) (`pappl_device_t`): The objects that manage printer connections;
- [Printers](@) (`pappl_printer_t`): The objects that manage printers; and
- [Jobs](@) (`pappl_job_t`): The objects that manage print jobs.
- [Printers](@) (`pappl_printer_t`): The objects that manage printers;
- [Scanners](@) (`pappl_scanner_t`): The objects that manage scanners; and
- [Jobs](@) (`pappl_job_t`): The objects that manage print and scan jobs.

![PAPPL Block Diagram::100%](../doc/pappl-block.png)

Expand All @@ -169,7 +170,7 @@ The System
----------

The system is an object of type [`pappl_system_t`](@@) that manages client and
device connections, listeners, the log, printers, and resources. It implements
device connections, listeners, the log, printers, scanners and resources. It implements
a subset of the IPP System Service
([PWG 5100.22](https://ftp.pwg.org/pub/pwg/candidates/cs-ippsystem10-20191122-5100.22.pdf))
with each printer implementing IPP Everywhere™
Expand All @@ -187,6 +188,9 @@ functions:
- [`papplSystemIteratePrinters`](@@): Iterates all print queues managed by the
system.

Similarly [scanners](@) can be accessed using the following function:
- [`papplSystemFindScanner`](@@): Finds the named or numbered scan queue.

The [`papplSystemLoadState`](@@) function is often used to load system values
and printers from a prior run which used the [`papplSystemSaveState`](@@)
function.
Expand Down Expand Up @@ -275,8 +279,7 @@ Similarly, the `papplSystemSet` functions set various system values:

The PAPPL logging functions record messages to the configured log file. The
[`papplLog`](@@) records messages applying to the system as a whole while
[`papplLogClient`](@@), [`papplLogJob`](@@), and [`papplLogPrinter`](@@) record
messages specific to a client connection, print job, or printer respectively.
[`papplLogClient`](@@), [`papplLogJob`](@@), [`papplLogPrinter`](@@), and [`papplLogScanner`](@@) record messages specific to a client connection, print job, or printer respectively.

The "level" argument specifies a log level from debugging
(`PAPPL_LOGLEVEL_DEBUG`) to fatal (`PAPPL_LOGLEVEL_FATAL`) and is used to
Expand Down Expand Up @@ -349,14 +352,15 @@ localize your own dynamic content and/or main loop sub-command:
- [`papplLocFormatString`](@@) formats a localized string from a given
collection,
- [`papplLocGetString`](@@) returns a localized string from a given
collection, and
collection, and
- [`papplSystemFindLoc`](@@) finds the collection of localization strings for
the specified language.

Key to these functions is the [`pappl_loc_t`](@@) collection of localization
strings, which combines the strings from the built-in PAPPL localizations and
any strings file resources that have been added.


### Web Interface Localization ###

When localizing the web interface, PAPPL looks up strings for titles and labels
Expand Down Expand Up @@ -391,6 +395,17 @@ and "contone" might be localized as:
"smi32473-algorithm.ordered" = "À Motifs";
"smi32473-algorithm.contone" = "Tonalité Continue";

Web pages can display a localized HTML banner for the resource path, for
example:

/* English strings file */
"/" = "Example text for the root web page.";
"/network" = "<p>Example text for the <em>network</em> web page.</p>";

/* French strings file */
"/" = "Exemple de texte pour la page Web racine.";
"/network" = "<p>Exemple de texte pour la page Web du <em>réseau</em>.</p>";


Clients
-------
Expand Down Expand Up @@ -619,7 +634,9 @@ When necessary, the device associated with a printer can be opened with the
### Controlling Printers ###

Printers are stopped using the [`papplPrinterPause`](@@) function and started
using the [`papplPrinterResume`](@@) function.
using the [`papplPrinterResume`](@@) function. New jobs can be held using the
[`papplPrinterHoldNewJobs`](@@) function and later released for printing using
the [`papplPrinterReleaseHeldNewJobs`](@@) function.


### Navigation Links ###
Expand All @@ -628,6 +645,98 @@ Navigation links can be added to the web interface using the
[`papplPrinterAddLink`](@@) function and removed using the
[`papplPrinterRemoveLink`](@@) function.

Scanners
----
Scanners are managed by the system and are represented by the
[`pappl_scanner_t`](@@) type.

Scanners are created using the [`papplScannerCreate`](@@) function and deleted
using the [`papplScannerDelete`](@@) function. Each scanner has zero or more
jobs that are pending, processing (scanning), or completed which can be access
using any of the following functions:

- [`papplScannerIterateActiveJobs`](@@): Iterates active scan jobs managed by
the scanner,
- [`papplScannerIterateAllJobs`](@@): Iterates all scan jobs managed by the
scanner, and
- [`papplScannerIterateCompletedJobs`](@@): Iterates completed scan jobs
managed by the scanner.

The `papplScannerGet` functions get various scanner values:

- [`papplScannerGetContact`](@@): Gets the contact information,
- [`papplScannerGetDeviceID`](@@): Gets the IEEE-1284 device ID,
- [`papplScannerGetDeviceURI`](@@): Gets the device URI,
- [`papplScannerGetDNSSDName`](@@): Gets the DNS-SD service instance name,
- [`papplScannerGetDriverAttributes`](@@): Gets a copy of the current driver attributes,
- [`papplScannerGetDriverData`](@@): Gets the current scan driver data,
- [`papplScannerGetDriverName`](@@): Gets the driver name for a scanner,
- [`papplScannerGetGeoLocation`](@@): Gets the geographic location as a "geo:"
URI,
- [`papplScannerGetID`](@@): Gets the ID number,
- [`papplScannerGetImpressionsCompleted`](@@): Gets the number of impressions
(sides) that have been scanned,
- [`papplScannerGetLocation`](@@): Gets the human-readable location,
- [`papplScannerGetMaxActiveJobs`](@@): Gets the maximum number of simultaneous
active (queued) jobs,
- [`papplScannnerGetMaxCompletedJobs`](@@): Gets the maximum number of completed
jobs for the job history,
- [`papplScannerGetName`](@@): Gets the name,
- [`papplScannerGetNextJobID`](@@): Gets the ID number of the next job that is
created,
- [`papplScannerGetNumberOfActiveJobs`](@@): Gets the current number of active
jobs,
- [`papplScannnerGetNumberOfCompletedJobs`](@@): Gets the current number of
completed jobs in the job history,
- [`papplScannerGetNumberOfJobs`](@@): Gets the total number of jobs in memory,
- [`papplScannerGetOrganization`](@@): Gets the organization name,
- [`papplScannerGetOrganizationalUnit`](@@): Gets the organizational unit name,
- [`papplScannerGetPath`](@@): Gets the path of a scanner web page,
- [`papplScannerGetScanGroup`](@@): Gets the scan authorization group name,
- [`papplScannerGetReasons`](@@): Gets the "scanner-state-reasons" bitfield,
- [`papplScannerGetState`](@@): Gets the "scanner-state" value,
- [`papplScannerGetSystem`](@@): Gets the system managing the scanner.

Similarly, the `papplScannerSet` functions set those values:

- [`papplScannerSetContact`](@@): Sets the contact information,
- [`papplScannerSetDNSSDName`](@@): Sets the DNS-SD service instance name,
- [`papplScannerSetDriverData`](@@): Sets the current scan driver data,
- [`papplScannerSetDriverDefaults`](@@): Sets the driver name for a scanner,
- [`papplScannerSetGeoLocation`](@@): Sets the geographic location as a "geo:"
URI,
- [`papplScannerSetImpressionsCompleted`](@@): Sets the number of impressions
that have been scanned,
- [`papplScannerSetLocation`](@@): Sets the human-readable location,
- [`papplScannerSetMaxActiveJobs`](@@): Sets the maximum number of jobs that can
be queued,
- [`papplScannerSetMaxCompletedJobs`](@@): Sets the maximum number of completed
jobs that are kept in the job history,
- [`papplScannerSetMaxPreservedJobs`](@@): Sets the maximum number of preserved
jobs (with document data) that are kept in the job history,
- [`papplScannerSetNextJobID`](@@): Sets the ID number of the next job that is
created,
- [`papplScannerSetOrganization`](@@): Sets the organization name,
- [`papplScannnerSetOrganizationalUnit`](@@): Sets the organizational unit name,
- [`papplScannerSetReadyMedia`](@@): Sets the ready (loaded) media, and
- [`papplScannerSetReasons`](@@): Sets or clears "scanner-state-reasons" values.

### Accessing the Scanner Device ###

When necessary, the device associated with a scanner can be opened with the
[`papplScannerOpenDevice`](@@) function and subsequently closed using the
[`papplScannerCloseDevice`](@@) function.


### Controlling Scanners ###

Scanners are stopped using the [`papplScannerPause`](@@) function and started
using the [`papplScannerResume`](@@) function.

### Navigation Links ###

Navigation links can be added to the web interface using the
[`papplScannerAddLink`](@@) function.

Jobs
----
Expand Down Expand Up @@ -676,7 +785,11 @@ a job:

The [`papplJobCancel`](@@) function cancels processing of a job while the
[`papplJobIsCanceled`](@@) function returns whether a job is in the canceled
state (`IPP_JSTATE_CANCELED`) or is in the process of being canceled (`IPP_JSTATE_PROCESSING` and `PAPPL_JREASON_PROCESSING_TO_STOP_POINT`).
state (`IPP_JSTATE_CANCELED`) or is in the process of being canceled
(`IPP_JSTATE_PROCESSING` and `PAPPL_JREASON_PROCESSING_TO_STOP_POINT`).

The [`papplJobHold`](@@) function holds a job while the [`papplJobRelease`](@@)
function releases a job for printing.


### Processing Jobs ###
Expand Down
Loading