
End-User Programs
Objective: To provide command line access to key APS library functionality. For
this we need to have a set of programs that provide complete APS functionality from
command line.
Proposed programs for providing command line functionality to aps are
- Operating on Printer
- apsaddprn - add a printer.
- apsconfigureprn - configure existing printer.
- apsremoveprn - remove an existing printer.
- Dispatching jobs
- apsprint - dispatch jobs.
- Queue and job related operations
- apsqueue - all queue related operations.
- System verification
- apslistprn - prints out list of installed printers
- apsprninfo - prints out available attributes and other info for a printer
- apstestpage - prints a test page
- Printer Database operations
- apsmodeldb - go through model database
All programs must support the following.
- If SU privileges are required and user is executing with-out these privileges then
program should printout detailed error message returned by GetResultText() and quit.
- Programs should be able to take arguments from command line or a text file whose name if
provided at command line and has one argument on each line.
- Option "--help" & "?" to print help on using the program.
- All program names to be small case and start with "aps".
- All programs should be able to accept input from pipes(stdin). This should be the case
for all the programs. Only thing to consider is ;o let the programs know when to stop
waiting for inputs. This situation will arise only when the command line parameters are
being sent to stdin. For apsprint before the actual job, job attributes can be sent.
Separation two different types of data has to be taken care of.
Command line options can be divided as follows.
apsaddprn - command line options
- <printer name> If used this way it has to be the first argument.
- -P<printer name>
- --commandFile=<name of file containing command line options>
- -/+eofatend
- -/+addcr
- -/+textastext
- -/+headerpage
- --manufacturer=<Manufacturer's name>
- --model=<Printer Model>
- --device=<Port Connected to>
- --location=<Location of Network printer>
- --ppdfilename=<PPD File name>
- -attr<PropertyName>=<Property value>*
apsconfigureprn - command line options
- <printer name> If used this way it has to be the first argument.
- -P<printer name>
- --newname=<new printer name>
- --ommandFile=<name of file containing command line options>
- -/+eofatend
- -/+addcr
- -/+textastext
- -/+headerpage
- --manufacturer=<Manufacturer's name>
- --model=<Printer Model>
- --device=<Port Connected to>
- --location=<Location of Network printer>
- --ppdfilename=<PPD File name>
- -attr<PropertyName>=<Property value>*
apsremoveprn - command line options
- <printer name>
- -P<printer name> (for consistency)
apsprint - command line options
- -P<printer name> (will not support printer name without -P switch)
- --newname=<new printer name>
- --commandFile=<name of file containing command line options>
- -/+eofatend
- -/+addcr
- -/+textastext
- -/+headerpage
- --ppdfilename=<PPD File name>
- --format=<format of the file to be printed>
- -attr<PropertyName>=<Property value>*
- <file name> (file to be printerd)
-
apsqueue - command line options
- <printer name> If used this way has to be the first argument
- -P<printer name>
- -J<JobID>
- --purge**
- --resume**
- --suspend**
- -/+pausealljobs
- -/+autopausenewjobs
- -/+auto-discardnewjobs
- -/+autodenynewjobs
apslistprn - does not take command line arguments.
apsprninfo - command line options
- <printer name>
- -P<printer name> (for consistency)
apstestpage - command line options
- <printer name>
- -P<printer name> (for consistency)
apsmodeldb - command line options
- --manufacturer=<manufacturer>
- --model=<model>
- --gsdevice=<device name>
- --all (all entries that fit the above, if none provided it will dump the whole db)
- --bestfit
- --firstfit
*Property name should be in same format as it would be taken by the Attributes
function. This will allow us to add new options to the configuration file.
** These operations can be performed on individual jobs as well as queues.