]>
git.ipfire.org Git - thirdparty/cups.git/blob - cups/dest-job.c
4 * Destination job support for CUPS.
6 * Copyright 2012 by Apple Inc.
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/".
14 * This file is subject to the Apple OS-Developed Software exception.
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.
26 * Include necessary headers...
29 #include "cups-private.h"
33 * 'cupsCancelDestJob()' - Cancel a job on a destination.
35 * The "job_id" is the number returned by cupsCreateDestJob.
37 * Returns IPP_OK on success and IPP_NOT_AUTHORIZED or IPP_FORBIDDEN on
44 cupsCancelDestJob(http_t
*http
, /* I - Connection to destination */
45 cups_dest_t
*dest
, /* I - Destination */
46 int job_id
) /* I - Job ID */
48 return (IPP_NOT_FOUND
);
53 * 'cupsCloseDestJob()' - Close a job and start printing.
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
64 http_t
*http
, /* I - Connection to destination */
65 cups_dest_t
*dest
, /* I - Destination */
66 int job_id
) /* I - Job ID */
68 return (IPP_NOT_FOUND
);
73 * 'cupsCreateDestJob()' - Create a job on a destination.
75 * Returns IPP_OK or IPP_OK_SUBST on success, saving the job ID in the variable
76 * pointed to by "job_id".
81 ipp_status_t
/* O - IPP status code */
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 */
93 return (IPP_NOT_POSSIBLE
);
98 * 'cupsFinishDestDocument()' - Finish the current document.
100 * Returns IPP_OK on success.
106 cupsFinishDestDocument(
107 http_t
*http
, /* I - Connection to destination */
108 cups_dest_t
*dest
) /* I - Destination */
110 return (IPP_NOT_FOUND
);
115 * 'cupsStartDestDocument()' - Start a new document.
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.
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 */
139 return (HTTP_CONTINUE
);