]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/ipp.h
<rdar://problem/13655599> Seed: Print queue JOBS disappear after computer Wakes up...
[thirdparty/cups.git] / cups / ipp.h
index 65e4f285af8b281224d6d3a95db7ed56bdd717b8..10ff50c1a1293b6fa24496f0f48883694b2698c4 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: ipp.h 7847 2008-08-19 04:22:14Z mike $"
+ * "$Id$"
  *
  *   Internet Printing Protocol definitions for CUPS.
  *
- *   Copyright 2007-2012 by Apple Inc.
+ *   Copyright 2007-2013 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -23,6 +23,7 @@
  */
 
 #  include "http.h"
+#  include <stdarg.h>
 
 
 /*
@@ -101,7 +102,7 @@ typedef enum ipp_finishings_e               /**** Finishings ****/
   IPP_FINISHINGS_TRIM,                 /* Trim (any type) */
   IPP_FINISHINGS_BALE,                 /* Bale (any type) */
   IPP_FINISHINGS_BOOKLET_MAKER,                /* Fold to make booklet */
-  IPP_FINISHINGS_JOB_OFFSET,           /* Offset for binding (any type) */
+  IPP_FINISHINGS_JOG_OFFSET,           /* Offset for binding (any type) */
   IPP_FINISHINGS_STAPLE_TOP_LEFT = 20, /* Staple top left corner */
   IPP_FINISHINGS_STAPLE_BOTTOM_LEFT,   /* Staple bottom left corner */
   IPP_FINISHINGS_STAPLE_TOP_RIGHT,     /* Staple top right corner */
@@ -122,8 +123,35 @@ typedef enum ipp_finishings_e              /**** Finishings ****/
   IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS, /* Trim output after each document */
   IPP_FINISHINGS_TRIM_AFTER_COPIES,    /* Trim output after each copy */
   IPP_FINISHINGS_TRIM_AFTER_JOB,       /* Trim output after job */
-
-  /* Proposed extensions for finishings */
+  IPP_FINISHINGS_PUNCH_TOP_LEFT = 70,  /* Punch 1 hole top left */
+  IPP_FINISHINGS_PUNCH_BOTTOM_LEFT,    /* Punch 1 hole bottom left */
+  IPP_FINISHINGS_PUNCH_TOP_RIGHT,      /* Punch 1 hole top right */
+  IPP_FINISHINGS_PUNCH_BOTTOM_RIGHT,   /* Punch 1 hole bottom right */
+  IPP_FINISHINGS_PUNCH_DUAL_LEFT,      /* Punch 2 holes left side */
+  IPP_FINISHINGS_PUNCH_DUAL_TOP,       /* Punch 2 holes top edge */
+  IPP_FINISHINGS_PUNCH_DUAL_RIGHT,     /* Punch 2 holes right side */
+  IPP_FINISHINGS_PUNCH_DUAL_BOTTOM,    /* Punch 2 holes bottom edge */
+  IPP_FINISHINGS_PUNCH_TRIPLE_LEFT,    /* Punch 3 holes left side */
+  IPP_FINISHINGS_PUNCH_TRIPLE_TOP,     /* Punch 3 holes top edge */
+  IPP_FINISHINGS_PUNCH_TRIPLE_RIGHT,   /* Punch 3 holes right side */
+  IPP_FINISHINGS_PUNCH_TRIPLE_BOTTOM,  /* Punch 3 holes bottom edge */
+  IPP_FINISHINGS_PUNCH_QUAD_LEFT,      /* Punch 4 holes left side */
+  IPP_FINISHINGS_PUNCH_QUAD_TOP,       /* Punch 4 holes top edge */
+  IPP_FINISHINGS_PUNCH_QUAD_RIGHT,     /* Punch 4 holes right side */
+  IPP_FINISHINGS_PUNCH_QUAD_BOTTOM,    /* Punch 4 holes bottom edge */
+  IPP_FINISHINGS_FOLD_ACCORDIAN = 90,  /* Accordian-fold the paper vertically into four sections */
+  IPP_FINISHINGS_FOLD_DOUBLE_GATE,     /* Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically */
+  IPP_FINISHINGS_FOLD_GATE,            /* Fold the top and bottom quarters of the paper towards the midline */
+  IPP_FINISHINGS_FOLD_HALF,            /* Fold the paper in half vertically */
+  IPP_FINISHINGS_FOLD_HALF_Z,          /* Fold the paper in half horizontally, then Z-fold the paper vertically */
+  IPP_FINISHINGS_FOLD_LEFT_GATE,       /* Fold the top quarter of the paper towards the midline */
+  IPP_FINISHINGS_FOLD_LETTER,          /* Fold the paper into three sections vertically; sometimes also known as a C fold*/
+  IPP_FINISHINGS_FOLD_PARALLEL,                /* Fold the paper in half vertically two times, yielding four sections */
+  IPP_FINISHINGS_FOLD_POSTER,          /* Fold the paper in half horizontally and vertically; sometimes also called a cross fold */
+  IPP_FINISHINGS_FOLD_RIGHT_GATE,      /* Fold the bottom quarter of the paper towards the midline */
+  IPP_FINISHINGS_FOLD_Z,               /* Fold the paper vertically into three sections, forming a Z */
+
+  /* CUPS extensions for finishings (pre-standard versions of values above) */
   IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT = 0x40000046,
                                        /* Punch 1 hole top left */
   IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT,/* Punch 1 hole bottom left */
@@ -143,9 +171,24 @@ typedef enum ipp_finishings_e              /**** Finishings ****/
   IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT, /* Punch 4 holes left side */
   IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP,  /* Punch 4 holes top edge */
   IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT,        /* Punch 4 holes right side */
-  IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM        /* Punch 4 holes bottom edge */
+  IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM,/* Punch 4 holes bottom edge */
+
+  IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN = 0x4000005A,
+                                       /* Accordian-fold the paper vertically into four sections */
+  IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE,        /* Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically */
+  IPP_FINISHINGS_CUPS_FOLD_GATE,       /* Fold the top and bottom quarters of the paper towards the midline */
+  IPP_FINISHINGS_CUPS_FOLD_HALF,       /* Fold the paper in half vertically */
+  IPP_FINISHINGS_CUPS_FOLD_HALF_Z,     /* Fold the paper in half horizontally, then Z-fold the paper vertically */
+  IPP_FINISHINGS_CUPS_FOLD_LEFT_GATE,  /* Fold the top quarter of the paper towards the midline */
+  IPP_FINISHINGS_CUPS_FOLD_LETTER,     /* Fold the paper into three sections vertically; sometimes also known as a C fold*/
+  IPP_FINISHINGS_CUPS_FOLD_PARALLEL,   /* Fold the paper in half vertically two times, yielding four sections */
+  IPP_FINISHINGS_CUPS_FOLD_POSTER,     /* Fold the paper in half horizontally and vertically; sometimes also called a cross fold */
+  IPP_FINISHINGS_CUPS_FOLD_RIGHT_GATE, /* Fold the bottom quarter of the paper towards the midline */
+  IPP_FINISHINGS_CUPS_FOLD_Z           /* Fold the paper vertically into three sections, forming a Z */
 } ipp_finishings_t;
 #  ifndef _CUPS_NO_DEPRECATED
+#    define IPP_FINISHINGS_JOB_OFFSET  IPP_FINISHINGS_JOG_OFFSET
+                                       /* Long-time misspelling... */
 typedef enum ipp_finishings_e ipp_finish_t;
 #  endif /* !_CUPS_NO_DEPRECATED */
 
@@ -246,8 +289,10 @@ typedef enum ipp_op_e                      /**** IPP operations ****/
   IPP_OP_CANCEL_MY_JOBS,               /* Cancel-My-Jobs */
   IPP_OP_RESUBMIT_JOB,                 /* Resubmit-Job */
   IPP_OP_CLOSE_JOB,                    /* Close-Job */
-  IPP_OP_IDENTIFY_PRINTER,             /* Identify-Printer (proposed IPP JPS3) */
-  IPP_OP_VALIDATE_DOCUMENT,            /* Validate-Document (proposed IPP JPS3) */
+  IPP_OP_IDENTIFY_PRINTER,             /* Identify-Printer @private@ */
+  IPP_OP_VALIDATE_DOCUMENT,            /* Validate-Document @private@ */
+  IPP_OP_SEND_HARDCOPY_DOCUMENT,       /* Send-Hardcopy-Document @private@ */
+
   IPP_OP_PRIVATE = 0x4000,             /* Reserved @private@ */
   IPP_OP_CUPS_GET_DEFAULT,             /* Get the default printer */
   IPP_OP_CUPS_GET_PRINTERS,            /* Get a list of printers and/or classes */
@@ -459,12 +504,12 @@ typedef enum ipp_status_e         /**** IPP status codes ****/
 
   /* Proposed extensions for paid printing */
   IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED = 0x049C,
-                                       /* cups-error-account-info-needed @since CUPS 1.7@ */
-  IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED,        /* cups-error-account-closed @since CUPS 1.7@ */
+                                       /* cups-error-account-info-needed @since CUPS 1.7/OS X 10.9@ */
+  IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED,        /* cups-error-account-closed @since CUPS 1.7/OS X 10.9@ */
   IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED,
-                                       /* cups-error-account-limit-reached @since CUPS 1.7@ */
+                                       /* cups-error-account-limit-reached @since CUPS 1.7/OS X 10.9@ */
   IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED,
-                                       /* cups-error-account-authorization-failed @since CUPS 1.7@ */
+                                       /* cups-error-account-authorization-failed @since CUPS 1.7/OS X 10.9@ */
 
   IPP_STATUS_ERROR_INTERNAL = 0x0500,  /* server-error-internal-error */
   IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED,
@@ -919,13 +964,22 @@ extern int                ippContainsInteger(ipp_attribute_t *attr, int value)
                                           _CUPS_API_1_7;
 extern int             ippContainsString(ipp_attribute_t *attr,
                                          const char *value) _CUPS_API_1_7;
+extern cups_array_t    *ippCreateRequestedArray(ipp_t *request) _CUPS_API_1_7;
+extern void            *ippGetOctetString(ipp_attribute_t *attr, int element,
+                                          int *datalen) _CUPS_API_1_7;
 extern ipp_t           *ippNewResponse(ipp_t *request) _CUPS_API_1_7;
+extern int             ippSetOctetString(ipp_t *ipp, ipp_attribute_t **attr,
+                                         int element, const void *data,
+                                         int datalen) _CUPS_API_1_7;
 extern int             ippSetStringf(ipp_t *ipp, ipp_attribute_t **attr,
                                      int element, const char *format,
                                      ...) _CUPS_API_1_7;
 extern int             ippSetStringfv(ipp_t *ipp, ipp_attribute_t **attr,
                                       int element, const char *format,
                                       va_list ap) _CUPS_API_1_7;
+extern int             ippValidateAttribute(ipp_attribute_t *attr)
+                                            _CUPS_API_1_7;
+extern int             ippValidateAttributes(ipp_t *ipp) _CUPS_API_1_7;
 
 
 /*
@@ -938,5 +992,5 @@ extern int          ippSetStringfv(ipp_t *ipp, ipp_attribute_t **attr,
 #endif /* !_CUPS_IPP_H_ */
 
 /*
- * End of "$Id: ipp.h 7847 2008-08-19 04:22:14Z mike $".
+ * End of "$Id$".
  */