Bug 237662 - CUPS D-Bus notifier
CUPS D-Bus notifier
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: cups (Show other bugs)
10
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-24 11:50 EDT by Tim Waugh
Modified: 2009-05-14 11:26 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-14 11:26:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
cups-dbus-notifier.patch (10.55 KB, patch)
2007-04-26 13:55 EDT, Tim Waugh
no flags Details | Diff
cups-dbus-notifier.patch (13.06 KB, patch)
2007-04-27 08:27 EDT, Tim Waugh
no flags Details | Diff
cups-dbus-notifier.patch (14.38 KB, patch)
2007-04-28 08:51 EDT, Tim Waugh
no flags Details | Diff
cups-dbus-notifier.patch (15.01 KB, patch)
2007-05-11 09:07 EDT, Tim Waugh
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
CUPS Bugs and Features 2529 None None None Never

  None (edit)
Description Tim Waugh 2007-04-24 11:50:43 EDT
There should be a D-Bus notifier following the IPP notifications model.

D-Bus object: org.cups.cupsd
D-Bus object path: /org/cups/cupsd
D-Bus interface name: org.cups.cupsd

Signals:

PrinterRestarted
PrinterShutdown
PrinterStopped
rinterFinishingsChanged
PrinterMediaChanged
PrinterAdded
PrinterDeleted
PrinterModified
PrinterStateChanged
PrinterConfigChanged
PrinterChanged

JobCreated
JobCompleted
JobStopped
JobConfigChanged
JobProgress
JobState
JobStateChanged

ServerRestarted
ServerStarted
ServerStopped
ServerAudit

The parameters to the signal would be:

None for the Server* signals.

For the Printer* and Job* signals:

STRING printer-uri
STRING printer-name
INT32 printer-state
STRING printer-state-reasons
BOOL printer-is-accepting-jobs

For the Job* signals only:

INT32 job-id
INT32 job-state
STRING job-state-reasons
STRING job-name or ""
INT32 job-impressions-completed

The job-impressions-completed parameter is actually sourced from the
job-media-sheets-completed value.
Comment 1 Tim Waugh 2007-04-26 11:52:34 EDT
Removing: JobStateChanged
This is not a real event, but a convenience mask.
Comment 2 Tim Waugh 2007-04-26 12:19:36 EDT
STRING printer-state-reasons

This is a comma-separated list.
Comment 3 Tim Waugh 2007-04-26 13:33:13 EDT
For the Printer* and Job* signals:

STRING printer-uri
  May be "" if there is no associated printer, in which case
  the other printer parameters must be ignored.
STRING printer-name
INT32 printer-state
STRING printer-state-reasons
  This is a comma separated list.
BOOL printer-is-accepting-jobs

Rationale: printer-uri may not be supplied in a job signal if the job never started.
Comment 4 Tim Waugh 2007-04-26 13:55:52 EDT
Created attachment 153536 [details]
cups-dbus-notifier.patch

Here's what I have so far.  It seems to work, but printer-is-accepting-jobs
always seems to be false which doesn't seem right.
Comment 5 Tim Waugh 2007-04-27 08:17:08 EDT
PrinterStateChanged has been removed for the same reasons as JobStateChanged.
New parameter inserted before all the others: STRING text.  This comes from
notify-text, and applies to all signals.
Comment 6 Tim Waugh 2007-04-27 08:25:32 EDT
PrinterConfigChanged and PrinterChanged removed as well, since they are also
bitmasks.
Comment 7 Tim Waugh 2007-04-27 08:27:24 EDT
Created attachment 153613 [details]
cups-dbus-notifier.patch

Okay, this patch seems to work quite well now.
Comment 8 Tim Waugh 2007-04-28 08:51:27 EDT
Created attachment 153707 [details]
cups-dbus-notifier.patch

Here is an updated patch.

PrinterStateChanged is added back in because cupsd does emit this notification
('printer-state-changed').  Should JobStateChanged be added back in, even
though it is a convenience bitmask and cupsd does not emit that notification?

A lock-file is now used to prevent duplicate D-BUS message when more than one
dbus: subscription is in place.
Comment 9 Tim Waugh 2007-05-11 09:07:40 EDT
Created attachment 154538 [details]
cups-dbus-notifier.patch

Added license banner to dbus.c.
Comment 10 Bug Zapper 2008-05-13 22:48:14 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 11 Tim Waugh 2008-05-28 05:44:18 EDT
Deferring to rawhide.
Comment 12 Bug Zapper 2008-11-25 20:53:23 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 13 Tim Waugh 2008-12-17 12:03:38 EST
CUPS 1.4 (in rawhide) has a D-Bus notifier now.  Keeping open for F-10 in case of backport.
Comment 14 Tim Waugh 2009-05-14 11:26:02 EDT
No time for this.

Note You need to log in before you can comment on or make changes to this bug.