Bug 237662 - CUPS D-Bus notifier
Summary: CUPS D-Bus notifier
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 10
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-24 15:50 UTC by Tim Waugh
Modified: 2009-05-14 15:26 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-05-14 15:26:02 UTC
Type: ---
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
CUPS Bugs and Features 2529 0 None None None Never

Description Tim Waugh 2007-04-24 15:50:43 UTC
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 15:52:34 UTC
Removing: JobStateChanged
This is not a real event, but a convenience mask.

Comment 2 Tim Waugh 2007-04-26 16:19:36 UTC
STRING printer-state-reasons

This is a comma-separated list.

Comment 3 Tim Waugh 2007-04-26 17:33:13 UTC
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 17:55:52 UTC
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 12:17:08 UTC
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 12:25:32 UTC
PrinterConfigChanged and PrinterChanged removed as well, since they are also
bitmasks.

Comment 7 Tim Waugh 2007-04-27 12:27:24 UTC
Created attachment 153613 [details]
cups-dbus-notifier.patch

Okay, this patch seems to work quite well now.

Comment 8 Tim Waugh 2007-04-28 12:51:27 UTC
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 13:07:40 UTC
Created attachment 154538 [details]
cups-dbus-notifier.patch

Added license banner to dbus.c.

Comment 10 Bug Zapper 2008-05-14 02:48:14 UTC
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 09:44:18 UTC
Deferring to rawhide.

Comment 12 Bug Zapper 2008-11-26 01:53:23 UTC
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 17:03:38 UTC
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 15:26:02 UTC
No time for this.


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