From: mike
The "job_id" is the number returned by cupsCreateDestJob.
-Returns IPP_OK on success and IPP_NOT_AUTHORIZED or IPP_FORBIDDEN on
+Returns IPP_STATUS_OK on success and IPP_NOT_AUTHORIZED or IPP_FORBIDDEN on
failure.
IPP status code
Use when the last call to cupsStartDocument passed 0 for "last_document".
-"job_id" is the job ID returned by cupsCreateDestJob. Returns IPP_OK
+"job_id" is the job ID returned by cupsCreateDestJob. Returns IPP_STATUS_OK
on success.
IPP status code
Returns IPP_OK
or IPP_OK_SUBST
on success, saving the job ID
+
Returns IPP_STATUS_OK
or IPP_STATUS_OK_SUBST
on success, saving the job ID
in the variable pointed to by "job_id".
The default encryption setting comes from the CUPS_ENCRYPTION
environment variable, then the ~/.cups/client.conf file, and finally the
/etc/cups/client.conf file. If not set, the default is
-HTTP_ENCRYPT_IF_REQUESTED
.
+HTTP_ENCRYPTION_IF_REQUESTED
.
Note: The current encryption setting is tracked separately for each thread
in a program. Multi-threaded programs that override the setting via the
@@ -1628,7 +1641,7 @@ ipp_status_t cupsFinishDestDocument (
Status of document submission
Returns IPP_OK
or IPP_OK_SUBST
on success.
+
Returns IPP_STATUS_OK
or IPP_STATUS_OK_SUBST
on success.
unlink
the returned filename.HTTP_OK
is returned for a new PPD file and
-HTTP_NOT_MODIFIED
if the existing PPD file is up-to-date. Any other
+On success, HTTP_STATUS_OK
is returned for a new PPD file and
+HTTP_STATUS_NOT_MODIFIED
if the existing PPD file is up-to-date. Any other
status is an error.cupsGetPPD3
returns the PPD file for the first printer
@@ -2703,7 +2716,7 @@ void cupsSetEncryption (The default encryption setting comes from the CUPS_ENCRYPTION
environment variable, then the ~/.cups/client.conf file, and finally the
/etc/cups/client.conf file. If not set, the default is
-HTTP_ENCRYPT_IF_REQUESTED
.
+HTTP_ENCRYPTION_IF_REQUESTED
.
Note: The current encryption setting is tracked separately for each thread
in a program. Multi-threaded programs that override the setting need to do
@@ -2992,6 +3005,173 @@ name to be used.
User-Agent string
+Generate a PWG self-describing media size name.
+
+int pwgFormatSizeName (
+ char *keyword,
+ size_t keysize,
+ const char *prefix,
+ const char *name,
+ int width,
+ int length,
+ const char *units
+);
NULL
for automaticNULL
NULL
for automatic1 on success, 0 on failure
+This function generates a PWG self-describing media size name of the form
+"prefix_name_WIDTHxLENGTHunits". The prefix is typically "custom" or "roll"
+for user-supplied sizes but can also be "disc", "iso", "jis", "jpn", "na",
+"oe", "om", "prc", or "roc". A value of NULL
automatically chooses
+"oe" or "om" depending on the units.
+
+The size name may only contain lowercase letters, numbers, "-", and ".". If
+NULL
is passed, the size name will contain the formatted dimensions.
+
+The width and length are specified in hundredths of millimeters, equivalent
+to 1/100000th of a meter or 1/2540th of an inch. The width, length, and
+units used for the generated size name are calculated automatically if the
+units string is NULL
, otherwise inches ("in") or millimeters ("mm")
+are used.
+
+
Initialize a pwg_size_t structure using IPP Job Template +attributes.
+
+int pwgInitSize (
+ pwg_size_t *size,
+ ipp_t *job,
+ int *margins_set
+);
1 if size was initialized, 0 otherwise
+This function initializes a pwg_size_t structure from an IPP "media" or
+"media-col" attribute in the specified IPP message. 0 is returned if neither
+attribute is found in the message or the values are not valid.
+
+The "margins_set" variable is initialized to 1 if any "media-xxx-margin"
+member attribute was specified in the "media-col" Job Template attribute,
+otherwise it is initialized to 0.
+
+
Find a PWG media size by ISO/IPP legacy name.
+
+pwg_media_t *pwgMediaForLegacy (
+ const char *legacy
+);
Matching size or NULL
+The "name" argument specifies the legacy ISO media size name, for example +"iso-a4" or "na-letter". + +
+Find a PWG media size by Adobe PPD name.
+
+pwg_media_t *pwgMediaForPPD (
+ const char *ppd
+);
Matching size or NULL
+The "ppd" argument specifies an Adobe page size name as defined in Table B.1
+of the Adobe PostScript Printer Description File Format Specification Version
+4.3.
+
+If the name is non-standard, the returned PWG media size is stored in
+thread-local storage and is overwritten by each call to the function in the
+thread. Custom names can be of the form "Custom.WIDTHxLENGTH[units]" or
+"WIDTHxLENGTH[units]".
+
+
Find a PWG media size by 5101.1 self-describing name.
+
+pwg_media_t *pwgMediaForPWG (
+ const char *pwg
+);
Matching size or NULL
+The "pwg" argument specifies a self-describing media size name of the form
+"prefix_name_WIDTHxLENGTHunits" as defined in PWG 5101.1.
+
+If the name is non-standard, the returned PWG media size is stored in
+thread-local storage and is overwritten by each call to the function in the
+thread.
+
+
Get the PWG media size for the given dimensions.
+
+pwg_media_t *pwgMediaForSize (
+ int width,
+ int length
+);
PWG media name
+The "width" and "length" are in hundredths of millimeters, equivalent to
+1/100000th of a meter or 1/2540th of an inch.
+
+If the dimensions are non-standard, the returned PWG media size is stored in
+thread-local storage and is overwritten by each call to the function in the
+thread.
+
+
Client credentials callback @@ -3065,6 +3245,21 @@ typedef int (*cups_server_cert_cb_t)(http_t *http, void *tls, cups_array_t *cert
typedef struct cups_size_s cups_size_t;
+Map element - PPD to/from PWG
++typedef struct pwg_map_s pwg_map_t; +
+Common media size data
++typedef struct pwg_media_s pwg_media_t; +
+Size element - PPD to/from PWG
++typedef struct pwg_size_s pwg_size_t; +
Destination
@@ -3169,6 +3364,42 @@ millimetersMap element - PPD to/from PWG
+struct pwg_map_s {
+ char *pwg, *ppd;
+};
Common media size data
+struct pwg_media_s {
+ int width, length;
+ const char *pwg, *legacy, *ppd;
+};
Size element - PPD to/from PWG
+struct pwg_size_s {
+ pwg_map_t map;
+ int width, length, left, bottom, right, top;
+};
Get the Apple language identifier associated with a
diff --git a/doc/help/api-httpipp.html b/doc/help/api-httpipp.html
index 0e50514c87..639571d08b 100644
--- a/doc/help/api-httpipp.html
+++ b/doc/help/api-httpipp.html
@@ -1011,7 +1011,7 @@ int cupsDoAuthentication (
0 on success, -1 on error
This function should be called in response to a HTTP_UNAUTHORIZED
+
This function should be called in response to a HTTP_STATUS_UNAUTHORIZED
status, prior to resubmitting your request.
HTTP status
This function returns HTTP_OK
when the file is successfully retrieved.
+
This function returns HTTP_STATUS_OK
when the file is successfully retrieved.
HTTP status
This function returns HTTP_OK
when the file is successfully retrieved.
+
This function returns HTTP_STATUS_OK
when the file is successfully retrieved.
HTTP status
This function returns HTTP_CREATED
when the file is stored
+
This function returns HTTP_STATUS_CREATED
when the file is stored
successfully.
cupsReadResponseData
to rea
response. Only one request can be sent/queued at a time per http_t
connection.HTTP_CONTINUE
+Returns the initial HTTP status code, which will be HTTP_STATUS_CONTINUE
on a successful send of the request.cupsDoFileRequest
, cupsDoIORequest
, and
@@ -1393,7 +1393,7 @@ http_status_t cupsWriteRequestData (HTTP_CONTINUE
if OK or HTTP status on error
HTTP_STATUS_CONTINUE
if OK or HTTP status on error
This function is used after cupsSendRequest
to provide a PPD and
after cupsStartDocument
to provide a document file.
@@ -2830,7 +2830,7 @@ void httpSetExpect (
HTTP_CONTINUE
)HTTP_STATUS_CONTINUE
)
Currently only HTTP_STATUS_CONTINUE
is supported for the "expect"
@@ -5538,10 +5538,6 @@ are server-oriented...
HTTP status codes