]> git.ipfire.org Git - thirdparty/cups.git/blob - cups/dest-job.c
Merge changes from CUPS 1.6svn-r10188, including changes for <rdar://problem/10127258...
[thirdparty/cups.git] / cups / dest-job.c
1 /*
2 * "$Id$"
3 *
4 * Destination job support for CUPS.
5 *
6 * Copyright 2012 by Apple Inc.
7 *
8 * These coded instructions, statements, and computer programs are the
9 * property of Apple Inc. and are protected by Federal copyright
10 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
11 * which should have been included with this file. If this file is
12 * file is missing or damaged, see the license at "http://www.cups.org/".
13 *
14 * This file is subject to the Apple OS-Developed Software exception.
15 *
16 * Contents:
17 *
18  * cupsCancelDestJob() - Cancel a job on a destination.
19 * cupsCloseDestJob() - Close a job and start printing.
20 * cupsCreateDestJob() - Create a job on a destination.
21 * cupsFinishDestDocument() - Finish the current document.
22 * cupsStartDestDocument() - Start a new document.
23 */
24
25 /*
26 * Include necessary headers...
27 */
28
29 #include "cups-private.h"
30
31
32 /*
33 * 'cupsCancelDestJob()' - Cancel a job on a destination.
34 *
35 * The "job_id" is the number returned by cupsCreateDestJob.
36 *
37 * Returns IPP_OK on success and IPP_NOT_AUTHORIZED or IPP_FORBIDDEN on
38 * failure.
39 *
40 * @since CUPS 1.6@
41 */
42
43 ipp_status_t
44 cupsCancelDestJob(http_t *http, /* I - Connection to destination */
45 cups_dest_t *dest, /* I - Destination */
46 int job_id) /* I - Job ID */
47 {
48 return (IPP_NOT_FOUND);
49 }
50
51
52 /*
53 * 'cupsCloseDestJob()' - Close a job and start printing.
54 *
55 * Use when the last call to cupsStartDocument passed 0 for "last_document".
56 * "job_id" is the job ID returned by cupsCreateDestJob. Returns IPP_OK on
57 * success.
58 *
59 * @since CUPS 1.6@
60 */
61
62 ipp_status_t
63 cupsCloseDestJob(
64 http_t *http, /* I - Connection to destination */
65 cups_dest_t *dest, /* I - Destination */
66 int job_id) /* I - Job ID */
67 {
68 return (IPP_NOT_FOUND);
69 }
70
71
72 /*
73 * 'cupsCreateDestJob()' - Create a job on a destination.
74 *
75 * Returns IPP_OK or IPP_OK_SUBST on success, saving the job ID in the variable
76 * pointed to by "job_id".
77 *
78 * @since CUPS 1.6@
79 */
80
81 ipp_status_t /* O - IPP status code */
82 cupsCreateDestJob(
83 http_t *http, /* I - Connection to destination */
84 cups_dest_t *dest, /* I - Destination */
85 cups_dinfo_t *info, /* I - Destination information */
86 int *job_id, /* O - Job ID or 0 on error */
87 const char *title, /* I - Job name */
88 int num_options, /* I - Number of job options */
89 cups_option_t *options) /* I - Job options */
90 {
91 *job_id = 0;
92
93 return (IPP_NOT_POSSIBLE);
94 }
95
96
97 /*
98 * 'cupsFinishDestDocument()' - Finish the current document.
99 *
100 * Returns IPP_OK on success.
101 *
102 * @since CUPS 1.6@
103 */
104
105 ipp_status_t
106 cupsFinishDestDocument(
107 http_t *http, /* I - Connection to destination */
108 cups_dest_t *dest) /* I - Destination */
109 {
110 return (IPP_NOT_FOUND);
111 }
112
113
114 /*
115 * 'cupsStartDestDocument()' - Start a new document.
116 *
117 * "job_id" is the job ID returned by cupsCreateDestJob. "docname" is the name
118 * of the document/file being printed, "format" is the MIME media type for the
119 * document (see CUPS_FORMAT_xxx constants), and "num_options" and "options"
120 * are the options do be applied to the document. "last_document" should be 1
121 * if this is the last document to be submitted in the job. Returns
122 * HTTP_CONTINUE on success.
123 *
124 * @since CUPS 1.6@
125 */
126
127 http_status_t
128 cupsStartDestDocument(
129 http_t *http, /* I - Connection to destination */
130 cups_dest_t *dest, /* I - Destination */
131 cups_dinfo_t *info, /* I - Destination information */
132 int job_id, /* I - Job ID */
133 const char *docname, /* I - Document name */
134 const char *format, /* I - Document format */
135 int num_options, /* I - Number of document options */
136 cups_option_t *options, /* I - Document options */
137 int last_document) /* I - 1 if this is the last document */
138 {
139 return (HTTP_CONTINUE);
140 }
141
142
143 /*
144 * End of "$Id$".
145 */