]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/sidechannel.h
Merge changes from CUPS 1.4svn-r8628.
[thirdparty/cups.git] / cups / sidechannel.h
index e2eae6eb78c842be5e6e04c06eccbe9acb8fb6b0..8242247cbb252a30da9a6fc5a44eca689a3de223 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: sidechannel.h 6649 2007-07-11 21:46:42Z mike $"
+ * "$Id: sidechannel.h 7616 2008-05-28 00:34:13Z mike $"
  *
  *   Side-channel API definitions for the Common UNIX Printing System (CUPS).
  *
@@ -45,7 +45,7 @@ extern "C" {
  * Enumerations...
  */
 
-enum cups_sc_bidi_e                    /**** Bidirectional capabilities ****/
+enum cups_sc_bidi_e                    /**** Bidirectional capability values ****/
 {
   CUPS_SC_BIDI_NOT_SUPPORTED = 0,      /* Bidirectional I/O is not supported */
   CUPS_SC_BIDI_SUPPORTED = 1           /* Bidirectional I/O is supported */
@@ -59,15 +59,17 @@ enum cups_sc_command_e                      /**** Request command codes ****/
   CUPS_SC_CMD_DRAIN_OUTPUT = 2,                /* Drain all pending output */
   CUPS_SC_CMD_GET_BIDI = 3,            /* Return bidirectional capabilities */
   CUPS_SC_CMD_GET_DEVICE_ID = 4,       /* Return the IEEE-1284 device ID */
-  CUPS_SC_CMD_GET_STATE = 5            /* Return the device state */
+  CUPS_SC_CMD_GET_STATE = 5,           /* Return the device state */
+  CUPS_SC_CMD_SNMP_GET = 6,            /* Query an SNMP OID @since CUPS 1.4/Mac OS X 10.6@ */
+  CUPS_SC_CMD_SNMP_GET_NEXT = 7                /* Query the next SNMP OID @since CUPS 1.4/Mac OS X 10.6@ */
 };
 typedef enum cups_sc_command_e cups_sc_command_t;
                                        /**** Request command codes ****/
 
 enum cups_sc_state_e                   /**** Printer state bits ****/
 {
-  CUPS_SC_STATE_OFFLINE = 0,           /* Device is off-line */
-  CUPS_SC_STATE_ONLINE = 1,            /* Device is on-line */
+  CUPS_SC_STATE_OFFLINE = 0,           /* Device is offline */
+  CUPS_SC_STATE_ONLINE = 1,            /* Device is online */
   CUPS_SC_STATE_BUSY = 2,              /* Device is busy */
   CUPS_SC_STATE_ERROR = 4,             /* Other error condition */
   CUPS_SC_STATE_MEDIA_LOW = 16,                /* Paper low condition */
@@ -92,6 +94,10 @@ enum cups_sc_status_e                        /**** Response status codes ****/
 typedef enum cups_sc_status_e cups_sc_status_t;
                                        /**** Response status codes ****/
 
+typedef void (*cups_sc_walk_func_t)(const char *oid, const char *data,
+                                    int datalen, void *context);
+                                       /**** SNMP walk callback ****/
+
 
 /*
  * Prototypes...
@@ -109,6 +115,14 @@ extern int         cupsSideChannelWrite(cups_sc_command_t command,
                                             const char *data, int datalen,
                                             double timeout) _CUPS_API_1_3;
 
+/**** New in CUPS 1.4 ****/
+extern cups_sc_status_t        cupsSideChannelSNMPGet(const char *oid, char *data,
+                                              int *datalen, double timeout)
+                                              _CUPS_API_1_4;
+extern cups_sc_status_t        cupsSideChannelSNMPWalk(const char *oid, double timeout,
+                                               cups_sc_walk_func_t cb,
+                                               void *context) _CUPS_API_1_4;
+
 
 #  ifdef __cplusplus
 }
@@ -117,5 +131,5 @@ extern int          cupsSideChannelWrite(cups_sc_command_t command,
 #endif /* !_CUPS_SIDECHANNEL_H_ */
 
 /*
- * End of "$Id: sidechannel.h 6649 2007-07-11 21:46:42Z mike $".
+ * End of "$Id: sidechannel.h 7616 2008-05-28 00:34:13Z mike $".
  */