Re: [patch] dbus printer addition/removal notifications



On Fri, 2004-09-10 at 00:38 -0400, Colin Walters wrote:
> On Fri, 2004-09-10 at 00:03 -0400, Jody Goldberg wrote:

> > My preference would be to go directly to hal (code we can get fixed
> > quickly) but I can live with this approach.
> 
> So you are saying HAL would listen for CUPS network broadcasts?  That
> sounds a bit weird to me...

Just to clarify things a bit, here's the cupsd end of the patch:

--- cups-1.1.21rc2/scheduler/printers.c~	2004-06-28 23:27:35.000000000 -0400
+++ cups-1.1.21rc2/scheduler/printers.c	2004-09-08 11:59:36.105185568 -0400
@@ -143,6 +143,8 @@
 
   WritePrintcap();
 
+  dbus_broadcast_printer_added (name);
+
  /*
   * Bump the printer count and return...
   */
@@ -653,6 +655,8 @@
   FreePrinterUsers(p);
   FreeQuotas(p);
 
+  dbus_broadcast_printer_removed (p->name);
+
   ClearString(&p->uri);
   ClearString(&p->hostname);
   ClearString(&p->name);

As you can see it's very simple, all this is doing is broadcasting a
notification when cups's internal list of printers change, which can
happen from new local or network printers.

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]