Loading...

printing@lists.apple.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

Command Filters and Status Chad Hulbert Thu Jul 29 08:00:46 2010

I am currently investigating the use of command filters to report device
status on Mac OS X 10.5 and higher but I¹ve run into a few apparent
inconsistencies between the documentation and the apparent behavior of Mac
OS X.  I¹ve mocked up a simple combination of a PPD, a PDE and a command
filter to test things out.

PPD

The PPD has a *cupsIPPReason attribute for the custom state:

LocAttribute cupsIPPReason "com.xerox-error/Super bad error!"
"http://www.xerox.com/"

PDE

The PDE, upon initialization, submits a ReportStatus command to the current
printer:

OSStatus status = PMPrinterSendCommand( [ _pdeCallback PMPrinter ],
CFSTR("ReportStatus"), NULL, NULL );

(Yes, I know that PMPrinterSendCommand() is 10.6-only.)

Filter

void 
report_status()
{
    fprintf( stderr, "STATE: com.xerox-error\n" );
}

Results and Questions

1. When the PDE issues the command and the state is set, the printer queue
icon appears in the dock with the correct error badge, bounces once and
disappears.  It is hardly perceptible.  Is this the intended behavior
described in the CUPS documentation?  We would prefer to see the icon
persist and continue to bounce until the user interacts with it?  Should we
not be initiating a ReportStatus command from our PDEs?  If not, then when?
2. When I open the printer queue the correct state is set and the message
³Super bad error!² is visible; however, there is no manifestation of the
optional URI.  In my experience, text: URIs do work, however ‹ it is http,
file and Apple Help URIs that do not.

Thanks for your time,

Chad Hulbert
Software Engineer
Xerox Corporation
800 Phillips Rd
Webster, NY 14580

p 585.427.3295  (8*707.3295)

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Printing mailing list      ([EMAIL PROTECTED])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/printing/alexiscircle%40gmail.com

This email sent to [EMAIL PROTECTED]