]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/subscriptions.h
Remove all of the Subversion keywords from various source files.
[thirdparty/cups.git] / scheduler / subscriptions.h
index 646757120798e71f76900999040b1c289704de8b..159db2a09cb68d31e94cae7c2407669f5bea62aa 100644 (file)
@@ -1,25 +1,14 @@
 /*
- * "$Id: subscriptions.h 5305 2006-03-18 03:05:12Z mike $"
+ * Subscription definitions for the CUPS scheduler.
  *
- *   Subscription definitions for the Common UNIX Printing System (CUPS) scheduler.
+ * Copyright 2007-2010 by Apple Inc.
+ * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
- *
- *   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
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. 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
+ * file is missing or damaged, see the license at "http://www.cups.org/".
  */
 
 /*
 typedef enum
 {
   /* Individual printer events... */
-  CUPSD_EVENT_PRINTER_RESTARTED = 0x0001,
+  CUPSD_EVENT_PRINTER_STATE = 0x0001,  /* Sent after generic printer state change */
+  CUPSD_EVENT_PRINTER_RESTARTED = 0x0002,
                                        /* Sent after printer restarted */
-  CUPSD_EVENT_PRINTER_SHUTDOWN = 0x0002,/* Sent after printer shutdown */
-  CUPSD_EVENT_PRINTER_STOPPED = 0x0004,        /* Sent after printer stopped */
-  CUPSD_EVENT_PRINTER_FINISHINGS_CHANGED = 0x0008,
+  CUPSD_EVENT_PRINTER_SHUTDOWN = 0x0004,/* Sent after printer shutdown */
+  CUPSD_EVENT_PRINTER_STOPPED = 0x0008,        /* Sent after printer stopped */
+
+  CUPSD_EVENT_PRINTER_CONFIG = 0x0010, /* Send after add/modify changes attrs */
+  CUPSD_EVENT_PRINTER_FINISHINGS_CHANGED = 0x0020,
                                        /* Sent after finishings-supported changed */
-  CUPSD_EVENT_PRINTER_MEDIA_CHANGED = 0x0010,
+  CUPSD_EVENT_PRINTER_MEDIA_CHANGED = 0x0040,
                                        /* Sent after media-supported changed */
-  CUPSD_EVENT_PRINTER_ADDED = 0x0020,  /* Sent after printer added */
-  CUPSD_EVENT_PRINTER_DELETED = 0x0040,        /* Sent after printer deleted */
-  CUPSD_EVENT_PRINTER_MODIFIED = 0x0080,/* Sent after printer modified */
+  CUPSD_EVENT_PRINTER_ADDED = 0x0080,  /* Sent after printer added */
+  CUPSD_EVENT_PRINTER_DELETED = 0x0100,        /* Sent after printer deleted */
+  CUPSD_EVENT_PRINTER_MODIFIED = 0x0200,/* Sent after printer modified */
+  CUPSD_EVENT_PRINTER_QUEUE_ORDER_CHANGED = 0x0400,
+                                       /* Sent when the order of jobs is changed */
 
   /* Convenience printer event groupings... */
-  CUPSD_EVENT_PRINTER_STATE_CHANGED = 0x0007,
-                                       /* RESTARTED + SHUTDOWN + STOPPED */
-  CUPSD_EVENT_PRINTER_CONFIG_CHANGED = 0x0018,
-                                       /* FINISHINGS_CHANGED + MEDIA_CHANGED */
-  CUPSD_EVENT_PRINTER_CHANGED = 0x00ff,        /* All of the above */
+  CUPSD_EVENT_PRINTER_STATE_CHANGED = 0x000f,
+                                       /* STATE + RESTARTED + SHUTDOWN + STOPPED */
+  CUPSD_EVENT_PRINTER_CONFIG_CHANGED = 0x0070,
+                                       /* CONFIG + FINISHINGS_CHANGED + MEDIA_CHANGED */
+  CUPSD_EVENT_PRINTER_CHANGED = 0x07ff,        /* All of the above */
 
   /* Individual job events... */
-  CUPSD_EVENT_JOB_STATE = 0x0100,      /* Any state change */
-  CUPSD_EVENT_JOB_CREATED = 0x0200,    /* Send after job is created */
-  CUPSD_EVENT_JOB_COMPLETED = 0x0400,  /* Sent after job is completed */
-  CUPSD_EVENT_JOB_STOPPED = 0x0800,    /* Sent after job is stopped */
-  CUPSD_EVENT_JOB_CONFIG_CHANGED = 0x1000,
+  CUPSD_EVENT_JOB_STATE = 0x0800,      /* Any state change */
+  CUPSD_EVENT_JOB_CREATED = 0x1000,    /* Send after job is created */
+  CUPSD_EVENT_JOB_COMPLETED = 0x2000,  /* Sent after job is completed */
+  CUPSD_EVENT_JOB_STOPPED = 0x4000,    /* Sent after job is stopped */
+  CUPSD_EVENT_JOB_CONFIG_CHANGED = 0x8000,
                                        /* Sent after set-job-attributes */
-  CUPSD_EVENT_JOB_PROGRESS = 0x2000,   /* Sent for each page */
+  CUPSD_EVENT_JOB_PROGRESS = 0x10000,  /* Sent for each page */
 
   /* Convenience job event grouping... */
-  CUPSD_EVENT_JOB_STATE_CHANGED = 0x0f00,
-                                       /* Any state change + CREATED + COMPLETED + STOPPED */
+  CUPSD_EVENT_JOB_STATE_CHANGED = 0x7800,
+                                       /* STATE + CREATED + COMPLETED + STOPPED */
 
   /* Server events... */
-  CUPSD_EVENT_SERVER_RESTARTED = 0x4000,/* Sent after server restarts */
-  CUPSD_EVENT_SERVER_STARTED = 0x8000, /* Sent when server first starts */
-  CUPSD_EVENT_SERVER_STOPPED = 0x10000,        /* Sent when server is stopped */
-  CUPSD_EVENT_SERVER_AUDIT = 0x20000,  /* Security-related stuff */
+  CUPSD_EVENT_SERVER_RESTARTED = 0x20000,/* Sent after server restarts */
+  CUPSD_EVENT_SERVER_STARTED = 0x40000,        /* Sent when server first starts */
+  CUPSD_EVENT_SERVER_STOPPED = 0x80000,        /* Sent when server is stopped */
+  CUPSD_EVENT_SERVER_AUDIT = 0x100000, /* Security-related stuff */
 
   /* Everything and nothing... */
   CUPSD_EVENT_NONE = 0,                        /* Nothing */
-  CUPSD_EVENT_ALL = 0x1ffff            /* Everything */
+  CUPSD_EVENT_ALL = 0x1fffff           /* Everything */
 } cupsd_eventmask_t;
 
 
@@ -104,9 +98,8 @@ typedef struct cupsd_subscription_s  /**** Subscription structure ****/
   time_t               last;           /* Time of last notification */
   time_t               expire;         /* Lease expiration time */
   int                  first_event_id, /* First event-id in cache */
-                       next_event_id,  /* Next event-id to use */
-                       num_events;     /* Number of cached events */
-  cupsd_event_t                **events;       /* Cached events */
+                       next_event_id;  /* Next event-id to use */
+  cups_array_t         *events;        /* Cached events */
 } cupsd_subscription_t;
 
 
@@ -131,13 +124,9 @@ VAR int            MaxSubscriptions VALUE(100),
 VAR cups_array_t *Subscriptions VALUE(NULL);
                                        /* Active subscriptions */
 
-VAR int                MaxEvents VALUE(100),   /* Maximum number of events */
-               NumEvents VALUE(0);     /* Number of active events */
-VAR cupsd_event_t **Events VALUE(NULL);        /* Active events */
-
-VAR unsigned   LastEvent VALUE(0);     /* Last events processed */
-VAR time_t     LastEventTime VALUE(0); /* Time that the last events were sent */
+VAR int                MaxEvents VALUE(100);   /* Maximum number of events */
 
+VAR unsigned   LastEvent VALUE(0);     /* Last event(s) processed */
 VAR int                NotifierPipes[2] VALUE2(-1, -1);
                                        /* Pipes for notifier error/debug output */
 VAR cupsd_statbuf_t *NotifierStatusBuffer VALUE(NULL);
@@ -168,9 +157,3 @@ extern void cupsdExpireSubscriptions(cupsd_printer_t *dest,
 extern void    cupsdLoadAllSubscriptions(void);
 extern void    cupsdSaveAllSubscriptions(void);
 extern void    cupsdStopAllNotifiers(void);
-extern void    cupsdUpdateNotifierStatus(void);
-
-
-/*
- * End of "$Id: subscriptions.h 5305 2006-03-18 03:05:12Z mike $".
- */