]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/printers.c
Import CUPS 1.4svn r7023 into easysw/current.
[thirdparty/cups.git] / scheduler / printers.c
index 3400de54953a89fb0382110ec9e92fbcc5addbbf..4f69babbecaf85c923603b132058a76875effaf1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: printers.c 6971 2007-09-17 23:59:05Z mike $"
+ * "$Id: printers.c 6970 2007-09-17 23:58:28Z mike $"
  *
  *   Printer routines for the Common UNIX Printing System (CUPS).
  *
@@ -257,6 +257,7 @@ cupsdCreateCommonData(void)
   cups_array_t         *notifiers;     /* Notifier array */
   char                 filename[1024], /* Filename */
                        *notifier;      /* Current notifier */
+  cupsd_policy_t       *p;             /* Current policy */
   static const int nups[] =            /* number-up-supported values */
                { 1, 2, 4, 6, 9, 16 };
   static const int orients[4] =/* orientation-requested-supported values */
@@ -321,6 +322,8 @@ cupsdCreateCommonData(void)
                  CUPS_GET_PPDS,
                  CUPS_MOVE_JOB,
                  CUPS_AUTHENTICATE_JOB,
+                 CUPS_GET_PPD,
+                 CUPS_GET_DOCUMENT,
                  IPP_RESTART_JOB
                };
   static const char * const charsets[] =/* charset-supported values */
@@ -562,9 +565,15 @@ cupsdCreateCommonData(void)
 
   /* printer-op-policy-supported */
   attr = ippAddStrings(CommonData, IPP_TAG_PRINTER, IPP_TAG_NAME,
-                       "printer-op-policy-supported", NumPolicies, NULL, NULL);
-  for (i = 0; i < NumPolicies; i ++)
-    attr->values[i].string.text = _cupsStrAlloc(Policies[i]->name);
+                       "printer-op-policy-supported", cupsArrayCount(Policies),
+                      NULL, NULL);
+  for (i = 0, p = (cupsd_policy_t *)cupsArrayFirst(Policies);
+       p;
+       i ++, p = (cupsd_policy_t *)cupsArrayNext(Policies))
+    attr->values[i].string.text = _cupsStrAlloc(p->name);
+
+  ippAddBoolean(CommonData, IPP_TAG_PRINTER, "server-is-sharing-printers",
+                BrowseLocalProtocols != 0 && Browsing);
 }
 
 
@@ -3766,5 +3775,5 @@ write_irix_state(cupsd_printer_t *p)      /* I - Printer to update */
 
 
 /*
- * End of "$Id: printers.c 6971 2007-09-17 23:59:05Z mike $".
+ * End of "$Id: printers.c 6970 2007-09-17 23:58:28Z mike $".
  */