summaryrefslogtreecommitdiff
path: root/cups/dest-job.c
blob: 31cac7903c11c3f429c394ab5652426e1a3630ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/*
 * "$Id$"
 *
 *   Destination job support for CUPS.
 *
 *   Copyright 2012 by Apple Inc.
 *
 *   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/".
 *
 *   This file is subject to the Apple OS-Developed Software exception.
 *
 * Contents:
 *
 *   cupsCancelDestJob()      - Cancel a job on a destination.
 *   cupsCloseDestJob()       - Close a job and start printing.
 *   cupsCreateDestJob()      - Create a job on a destination.
 *   cupsFinishDestDocument() - Finish the current document.
 *   cupsStartDestDocument()  - Start a new document.
 */

/*
 * Include necessary headers...
 */

#include "cups-private.h"


/*
 * 'cupsCancelDestJob()' - Cancel a job on a destination.
 *
 * The "job_id" is the number returned by cupsCreateDestJob.
 *
 * Returns IPP_OK on success and IPP_NOT_AUTHORIZED or IPP_FORBIDDEN on
 * failure.
 *
 * @since CUPS 1.6@
 */

ipp_status_t
cupsCancelDestJob(http_t      *http,	/* I - Connection to destination */
                  cups_dest_t *dest,	/* I - Destination */
                  int         job_id)	/* I - Job ID */
{
  return (IPP_NOT_FOUND);
}


/*
 * 'cupsCloseDestJob()' - Close a job and start printing.
 *
 * Use when the last call to cupsStartDocument passed 0 for "last_document".
 * "job_id" is the job ID returned by cupsCreateDestJob. Returns IPP_OK on
 * success.
 *
 * @since CUPS 1.6@
 */

ipp_status_t
cupsCloseDestJob(
    http_t      *http,			/* I - Connection to destination */
    cups_dest_t *dest,			/* I - Destination */
    int         job_id)			/* I - Job ID */
{
  return (IPP_NOT_FOUND);
}


/*
 * 'cupsCreateDestJob()' - Create a job on a destination.
 *
 * Returns IPP_OK or IPP_OK_SUBST on success, saving the job ID in the variable
 * pointed to by "job_id".
 *
 * @since CUPS 1.6@
 */

ipp_status_t				/* O - IPP status code */
cupsCreateDestJob(
    http_t        *http,		/* I - Connection to destination */
    cups_dest_t   *dest,		/* I - Destination */
    cups_dinfo_t  *info, 		/* I - Destination information */
    int           *job_id,		/* O - Job ID or 0 on error */
    const char    *title,		/* I - Job name */
    int           num_options,		/* I - Number of job options */
    cups_option_t *options)		/* I - Job options */
{
  *job_id = 0;

  return (IPP_NOT_POSSIBLE);
}


/*
 * 'cupsFinishDestDocument()' - Finish the current document.
 *
 * Returns IPP_OK on success.
 *
 * @since CUPS 1.6@
 */

ipp_status_t
cupsFinishDestDocument(
    http_t      *http,			/* I - Connection to destination */
    cups_dest_t *dest)			/* I - Destination */
{
  return (IPP_NOT_FOUND);
}


/*
 * 'cupsStartDestDocument()' - Start a new document.
 *
 * "job_id" is the job ID returned by cupsCreateDestJob.  "docname" is the name
 * of the document/file being printed, "format" is the MIME media type for the
 * document (see CUPS_FORMAT_xxx constants), and "num_options" and "options"
 * are the options do be applied to the document. "last_document" should be 1
 * if this is the last document to be submitted in the job.  Returns
 * HTTP_CONTINUE on success.
 *
 * @since CUPS 1.6@
 */

http_status_t
cupsStartDestDocument(
    http_t        *http,		/* I - Connection to destination */
    cups_dest_t   *dest,		/* I - Destination */
    cups_dinfo_t  *info, 		/* I - Destination information */
    int           job_id,		/* I - Job ID */
    const char    *docname,		/* I - Document name */
    const char    *format,		/* I - Document format */
    int           num_options,		/* I - Number of document options */
    cups_option_t *options,		/* I - Document options */
    int           last_document)	/* I - 1 if this is the last document */
{
  return (HTTP_CONTINUE);
}


/*
 * End of "$Id$".
 */