]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/notify.c
Move debug printfs to internal usage only.
[thirdparty/cups.git] / cups / notify.c
index 2a89aca3c6cf0ba32b410d521e0235e229216a5b..590962c76fac8f675b81f440418a22989601cf44 100644 (file)
@@ -1,51 +1,29 @@
 /*
- * "$Id: notify.c 4961 2006-01-20 22:19:13Z mike $"
+ * Notification routines for CUPS.
  *
- *   Notification routines for the Common UNIX Printing System (CUPS).
+ * Copyright 2007-2013 by Apple Inc.
+ * Copyright 2005-2006 by Easy Software Products.
  *
- *   Copyright 2005-2006 by Easy Software Products.
- *
- *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products and are protected by Federal
- *   copyright law.  Distribution and use rights are outlined in the file
- *   "LICENSE.txt" which should have been included with this file.  If this
- *   file is missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
- *
- *   This file is subject to the Apple OS-Developed Software exception.
- *
- * Contents:
- *
- *   cupsNotifySubject() - Return the subject for the given notification
- *                         message.
- *   cupsNotifyText()    - Return the text for the given notification message.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
  */
 
 /*
  * Include necessary headers...
  */
 
-#include "globals.h"
+#include "cups-private.h"
+#include "debug-internal.h"
 
 
 /*
  * 'cupsNotifySubject()' - Return the subject for the given notification message.
  *
- * The returned string must be freed by the caller using free().
+ * The returned string must be freed by the caller using @code free@.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/macOS 10.5@
  */
 
-char *                                 /* O - Subject string or NULL */
+char *                                 /* O - Subject string or @code NULL@ */
 cupsNotifySubject(cups_lang_t *lang,   /* I - Language data */
                   ipp_t       *event)  /* I - Event data */
 {
@@ -92,25 +70,25 @@ cupsNotifySubject(cups_lang_t *lang,        /* I - Language data */
 
     switch (job_state->values[0].integer)
     {
-      case IPP_JOB_PENDING :
+      case IPP_JSTATE_PENDING :
           state = _cupsLangString(lang, _("pending"));
          break;
-      case IPP_JOB_HELD :
+      case IPP_JSTATE_HELD :
           state = _cupsLangString(lang, _("held"));
          break;
-      case IPP_JOB_PROCESSING :
+      case IPP_JSTATE_PROCESSING :
           state = _cupsLangString(lang, _("processing"));
          break;
-      case IPP_JOB_STOPPED :
+      case IPP_JSTATE_STOPPED :
           state = _cupsLangString(lang, _("stopped"));
          break;
-      case IPP_JOB_CANCELLED :
+      case IPP_JSTATE_CANCELED :
           state = _cupsLangString(lang, _("canceled"));
          break;
-      case IPP_JOB_ABORTED :
+      case IPP_JSTATE_ABORTED :
           state = _cupsLangString(lang, _("aborted"));
          break;
-      case IPP_JOB_COMPLETED :
+      case IPP_JSTATE_COMPLETED :
           state = _cupsLangString(lang, _("completed"));
          break;
       default :
@@ -136,13 +114,13 @@ cupsNotifySubject(cups_lang_t *lang,      /* I - Language data */
 
     switch (printer_state->values[0].integer)
     {
-      case IPP_PRINTER_IDLE :
+      case IPP_PSTATE_IDLE :
           state = _cupsLangString(lang, _("idle"));
          break;
-      case IPP_PRINTER_PROCESSING :
+      case IPP_PSTATE_PROCESSING :
           state = _cupsLangString(lang, _("processing"));
          break;
-      case IPP_PRINTER_STOPPED :
+      case IPP_PSTATE_STOPPED :
           state = _cupsLangString(lang, _("stopped"));
          break;
       default :
@@ -171,12 +149,12 @@ cupsNotifySubject(cups_lang_t *lang,      /* I - Language data */
 /*
  * 'cupsNotifyText()' - Return the text for the given notification message.
  *
- * The returned string must be freed by the caller using free().
+ * The returned string must be freed by the caller using @code free@.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/macOS 10.5@
  */
 
-char *                                 /* O - Message text or NULL */
+char *                                 /* O - Message text or @code NULL@ */
 cupsNotifyText(cups_lang_t *lang,      /* I - Language data */
                ipp_t       *event)     /* I - Event data */
 {
@@ -204,8 +182,3 @@ cupsNotifyText(cups_lang_t *lang,   /* I - Language data */
 
   return (strdup(notify_text->values[0].string.text));
 }
-
-
-/*
- * End of "$Id: notify.c 4961 2006-01-20 22:19:13Z mike $".
- */