From ecdc06282a65bd04f801c877d2ceb83106d737e1 Mon Sep 17 00:00:00 2001
From: jlovell Add an element to the array. Add an element to the array.
+
+When adding an element to a sorted array, non-unique elements are
+appended at the end of the run. For unsorted arrays, the element
+is inserted at the end of the array. First element or NULL Get the N-th element in the array. N-th element or NULL Insert an element in the array.
+
+When inserting an element in a sorted array, non-unique elements are
+inserted at the beginning of the run. For unsorted arrays, the element
+is inserted at the beginning of the array. 0 on failure, 1 on success Get the last element in the array. The CUPS APIs provide... The CUPS library provides a whole collection of interfaces
+needed to support the internal needs of the CUPS software as well
+as the needs of applications, filters, printer drivers, and
+backends. Unlike the rest of CUPS, the CUPS API library is provided
+under the GNU Library General Public License. This means that you
+can use the CUPS API library in both proprietary and open-source
+programs.cupsArrayAdd()
Description
-Syntax
int
@@ -242,6 +248,50 @@ cupsArrayFirst(
Returns
cupsArrayIndex()
+Description
+Syntax
+
+void *
+cupsArrayIndex(
+ cups_array_t * a,
+ int n);
+
+Arguments
+
+
+
+Name Description
+a Array
+n Index into array, starting at 0 Returns
+cupsArrayInsert()
+Description
+Syntax
+
+int
+cupsArrayInsert(
+ cups_array_t * a,
+ void * e);
+
+Arguments
+
+
+
+Name Description
+a Array
+e Element Returns
+cupsArrayLast()
Description
Introduction
-General Usage
@@ -115,10 +123,6 @@ CUPS 1.1 or higher.
int cupsAddDest( - const char * name, - const char * instance, + const char * name, + const char * instance, int num_dests, cups_dest_t ** dests);@@ -200,8 +204,8 @@ cupsAddDest(
int cupsAddOption( - const char * name, - const char * value, + const char * name, + const char * value, int num_options, cups_option_t ** options);@@ -227,7 +231,7 @@ the cause of any failure.
int cupsCancelJob( - const char * name, + const char * name, int job);
1 on success, 0 on failure
-Authenticate a request. - -This function should be called in response to a HTTP_UNAUTHORIZED -status, prior to resubmitting your request. - -
--int -cupsDoAuthentication( - http_t * http, - const char * method, - const char * resource); --
Name | Description |
---|---|
http | HTTP connection to server |
method | Request method (GET, POST, PUT) |
resource | Resource path |
0 on success, -1 on error
- -Do an IPP request. - -This function sends any IPP request to the specified server, retrying -and authenticating as necessary.
--ipp_t * -cupsDoFileRequest( - http_t * http, - ipp_t * request, - const char * resource, - const char * filename); --
Name | Description |
---|---|
http | HTTP connection to server |
request | IPP request |
resource | HTTP resource for POST |
filename | File to send or NULL for none |
Response data
- -Encode printer options into IPP attributes. - -This function adds operation, job, and then subscription attributes, -in that order. Use the cupsEncodeOptions2() function to add attributes -for a single group.
--void -cupsEncodeOptions( - ipp_t * ipp, - int num_options, - cups_option_t * options); --
Name | Description |
---|---|
ipp | Request to add to |
num_options | Number of options |
options | Options |
Nothing.
- -Encode printer options into IPP attributes for a group. - -This function only adds attributes for a single group. Call this -function multiple times for each group, or use cupsEncodeOptions() -to add the standard groups. - -
--void -cupsEncodeOptions2( - ipp_t * ipp, - int num_options, - cups_option_t * options, - ipp_tag_t group_tag); --
Name | Description |
---|---|
ipp | Request to add to |
num_options | Number of options |
options | Options |
group_tag | Group to encode |
Nothing.
-Get the default encryption settings. @@ -439,7 +333,7 @@ This function is deprecated - use cupsGetDests() instead.
int cupsGetClasses( - char *** classes); + char *** classes);
fd | File descriptor |
Status
+HTTP status
filename | Filename |
Status
+HTTP status
Number of jobs
@@ -651,7 +557,7 @@ int cupsGetJobs2( http_t * http, cups_job_t ** jobs, - const char * mydest, + const char * mydest, int myjobs, int completed); @@ -661,9 +567,11 @@ cupsGetJobs2(Number of jobs
@@ -673,9 +581,9 @@ cupsGetJobs2(Get an option value.
-const char * +const char * cupsGetOption( - const char * name, + const char * name, int num_options, cups_option_t * options);@@ -698,9 +606,9 @@ For classes, cupsGetPPD() returns the PPD file for the first printer in the class.
-const char * +const char * cupsGetPPD( - const char * name); + const char * name);
fd | File descriptor |
Status
+HTTP status
filename | Filename |
Status
+HTTP status
-const char * +const char * cupsServer(void);
void cupsSetPasswordCB( - cups_password_cb_t cb); + cups_password_cb_t cb);
Name | Description |
---|---|
completed_time | Time the job was completed |
creation_time | Time the job was created |
dest | Printer or class name |
format | Document format |
id | The job ID |
priority | Priority (1-100) |
processing_time | Time the job was processed |
size | Size in kilobytes |
state | Job state |
title | Title/job name |
user | User the submitted the job |
Types and structures...
+Printer Options
struct cups_option_s { - char * name; - char * value; + char * name; + char * value; };
Printer Options
--typedef const * (*charcups_password_cb_t)(const char *); --
Destination
@@ -1447,12 +1362,20 @@ typedef struct cups_job_s cups_job_t;Types and structures...
+Printer Options
typedef struct cups_option_s cups_option_t;+
Password callback
++typedef const char * (*cups_password_cb_t)(const char *); ++
Printer Type/Capability Bits
diff --git a/doc/help/api-filedir.html b/doc/help/api-filedir.html index 07c8a74a5..51fc07fb1 100644 --- a/doc/help/api-filedir.html +++ b/doc/help/api-filedir.html @@ -97,6 +97,7 @@ library:1 on EOF, 0 otherwise
+Find a file using the specified path. + +This function allows the paths in the path string to be separated by +colons (UNIX standard) or semicolons (Windows standard) and stores the +result in the buffer supplied. If the file cannot be found in any of +the supplied paths, NULL is returned. A NULL path only matches the +current directory.
++const char * +cupsFileFind( + const char * filename, + const char * path, + int executable, + char * buffer, + int bufsize); ++
Name | Description |
---|---|
filename | File to find |
path | Colon/semicolon-separated path |
executable | 1 = executable files, 0 = any file/dir |
buffer | Filename buffer |
bufsize | Size of filename buffer |
Full path to file or NULL
+Flush pending output.
@@ -303,7 +336,7 @@ cupsFileGetConf(Line read of NULL on eof/error
+Line read or NULL on eof/error
The CUPS filter and backend APIs provide...
+The CUPS filter and backend APIs define standard exit codes +and provide access to the backchannel data stream. They are only +used when writing backends, filters, and port monitors.
The <cups/backend.h> and <cups/cups.h> header files must be included to use the CUPS_BACKEND_ constants and -cupsBackchannel functions, respectively.
+cupsBackChannel functions, respectively.Programs using these functions must be linked to the CUPS library: libcups.a, libcups.so.2, @@ -71,11 +73,11 @@ library:
Read data from the backchannel. @@ -87,10 +89,10 @@ for data indefinitely.
-int -cupsBackchannelRead( +ssize_t +cupsBackChannelRead( char * buffer, - int bytes, + size_t bytes, double timeout);
Bytes read or -1 on error
-Write data to the backchannel. @@ -116,10 +118,10 @@ indefinitely.
-int -cupsBackchannelWrite( +ssize_t +cupsBackChannelWrite( const char * buffer, - int bytes, + size_t bytes, double timeout);
The CUPS HTTP and IPP APIs provide...
+The CUPS HTTP and IPP APIs provide low-level access to the +HTTP and IPP protocols and CUPS scheduler. They are typically +used by monitoring and administration programs to perform +specific functions not supported by the high-level CUPS API +functions.
Not a typedef'd enum so we can OR
-Name | Description |
---|---|
CUPS_PRINTER_AUTHENTICATED CUPS 1.2 | Printer requires authentication |
CUPS_PRINTER_BIND | Can bind output |
CUPS_PRINTER_BW | Can do B&W printing |
CUPS_PRINTER_CLASS | Printer class |
CUPS_PRINTER_COLLATE | Can collage copies |
CUPS_PRINTER_COLOR | Can do color printing |
CUPS_PRINTER_COPIES | Can do copies |
CUPS_PRINTER_COVER | Can cover output |
CUPS_PRINTER_DEFAULT | Default printer on network |
CUPS_PRINTER_DELETE CUPS 1.2 | Delete printer |
CUPS_PRINTER_DUPLEX | Can do duplexing |
CUPS_PRINTER_FAX | Fax queue |
CUPS_PRINTER_IMPLICIT | Implicit class |
CUPS_PRINTER_LARGE | Can do D/E/A1/A0 |
CUPS_PRINTER_LOCAL | Local printer or class |
CUPS_PRINTER_MEDIUM | Can do Tabloid/B/C/A3/A2 |
CUPS_PRINTER_NOT_SHARED CUPS 1.2 | Printer is not shared |
CUPS_PRINTER_OPTIONS | ~(CLASS | REMOTE | IMPLICIT) |
CUPS_PRINTER_PUNCH | Can punch output |
CUPS_PRINTER_REJECTING | Printer is rejecting jobs |
CUPS_PRINTER_REMOTE | Remote printer or class |
CUPS_PRINTER_SMALL | Can do Letter/Legal/A4 |
CUPS_PRINTER_SORT | Can sort output |
CUPS_PRINTER_STAPLE | Can staple output |
CUPS_PRINTER_VARIABLE | Can do variable sizes |
HTTP authentication types
@@ -252,52 +225,123 @@ require CUPS 1.1 or higher.Types and structures...
+Name | Description |
---|---|
IPP_RES_PER_CM | Pixels per centimeter |
IPP_RES_PER_INCH | Pixels per inch |
IPP status codes...
+Name | Description |
---|---|
IPP_ATTRIBUTES | client-error-attributes-or-values-not-supported |
IPP_ATTRIBUTES_NOT_SETTABLE | client-error-attributes-not-settable |
IPP_BAD_REQUEST | client-error-bad-request |
IPP_CHARSET | client-error-charset-not-supported |
IPP_COMPRESSION_ERROR | client-error-compression-error |
IPP_COMPRESSION_NOT_SUPPORTED | client-error-compression-not-supported |
IPP_CONFLICT | client-error-conflicting-attributes |
IPP_DEVICE_ERROR | server-error-device-error |
IPP_DOCUMENT_ACCESS_ERROR | client-error-document-access-error |
IPP_DOCUMENT_FORMAT | client-error-document-format-not-supported |
IPP_DOCUMENT_FORMAT_ERROR | client-error-document-format-error |
IPP_ERROR_JOB_CANCELLED | server-error-job-canceled |
IPP_FORBIDDEN | client-error-forbidden |
IPP_GONE | client-error-gone |
IPP_IGNORED_ALL_NOTIFICATIONS | client-error-ignored-all-notifications |
IPP_IGNORED_ALL_SUBSCRIPTIONS | client-error-ignored-all-subscriptions |
IPP_INTERNAL_ERROR | server-error-internal-error |
IPP_MULTIPLE_JOBS_NOT_SUPPORTED | server-error-multiple-document-jobs-not-supported |
IPP_NOT_ACCEPTING | server-error-not-accepting-jobs |
IPP_NOT_AUTHENTICATED | client-error-not-authenticated |
IPP_NOT_AUTHORIZED | client-error-not-authorized |
IPP_NOT_FOUND | client-error-not-found |
IPP_NOT_POSSIBLE | client-error-not-possible |
IPP_OK | successful-ok |
IPP_OK_BUT_CANCEL_SUBSCRIPTION | successful-ok-but-cancel-subscription |
IPP_OK_CONFLICT | successful-ok-conflicting-attributes |
IPP_OK_EVENTS_COMPLETE | successful-ok-events-complete |
IPP_OK_IGNORED_NOTIFICATIONS | successful-ok-ignored-notifications |
IPP_OK_IGNORED_SUBSCRIPTIONS | successful-ok-ignored-subscriptions |
IPP_OK_SUBST | successful-ok-ignored-or-substituted-attributes |
IPP_OK_TOO_MANY_EVENTS | successful-ok-too-many-events |
IPP_OPERATION_NOT_SUPPORTED | server-error-operation-not-supported |
IPP_PRINTER_BUSY | server-error-busy |
IPP_PRINTER_IS_DEACTIVATED | server-error-printer-is-deactivated |
IPP_PRINT_SUPPORT_FILE_NOT_FOUND | client-error-print-support-file-not-found |
IPP_REDIRECTION_OTHER_SITE | |
IPP_REQUEST_ENTITY | client-error-request-entity-too-large |
IPP_REQUEST_VALUE | client-error-request-value-too-long |
IPP_SERVICE_UNAVAILABLE | server-error-service-unavailable |
IPP_TEMPORARY_ERROR | server-error-temporary-error |
IPP_TIMEOUT | client-error-timeout |
IPP_TOO_MANY_SUBSCRIPTIONS | client-error-too-many-subscriptions |
IPP_URI_SCHEME | client-error-uri-scheme-not-supported |
IPP_VERSION_NOT_SUPPORTED | server-error-version-not-supported |
Format tags for attributes...
+Name | Description |
---|---|
IPP_TAG_ADMINDEFINE | Admin-defined value |
IPP_TAG_BEGIN_COLLECTION | Beginning of collection value |
IPP_TAG_BOOLEAN | Boolean value |
IPP_TAG_CHARSET | Character set value |
IPP_TAG_COPY | Bitflag for copied attribute values |
IPP_TAG_DATE | Date/time value |
IPP_TAG_DEFAULT | Default value |
IPP_TAG_DELETEATTR | Delete-attribute value |
IPP_TAG_END | End-of-attributes |
IPP_TAG_END_COLLECTION | End of collection value |
IPP_TAG_ENUM | Enumeration value |
IPP_TAG_EVENT_NOTIFICATION | Event group |
IPP_TAG_INTEGER | Integer value |
IPP_TAG_JOB | Job group |
IPP_TAG_KEYWORD | Keyword value |
IPP_TAG_LANGUAGE | Language value |
IPP_TAG_MASK | Mask for copied attribute values |
IPP_TAG_MEMBERNAME | Collection member name value |
IPP_TAG_MIMETYPE | MIME media type value |
IPP_TAG_NAME | Name value |
IPP_TAG_NAMELANG | Name-with-language value |
IPP_TAG_NOTSETTABLE | Not-settable value |
IPP_TAG_NOVALUE | No-value value |
IPP_TAG_OPERATION | Operation group |
IPP_TAG_PRINTER | Printer group |
IPP_TAG_RANGE | Range value |
IPP_TAG_RESOLUTION | Resolution value |
IPP_TAG_STRING | Octet string value |
IPP_TAG_SUBSCRIPTION | Subscription group |
IPP_TAG_TEXT | Text value |
IPP_TAG_TEXTLANG | Text-with-language value |
IPP_TAG_UNKNOWN | Unknown value |
IPP_TAG_UNSUPPORTED_GROUP | Unsupported attributes group |
IPP_TAG_UNSUPPORTED_VALUE | Unsupported value |
IPP_TAG_URI | URI value |
IPP_TAG_URISCHEME | URI scheme value |
IPP_TAG_ZERO | Zero tag - used for separators |
Add a destination to the list of destinations. - -Use the cupsSaveDests() function to save the updated list of destinations -to the user's lpoptions file.
--int -cupsAddDest( - const char * name, - const char * instance, - int num_dests, - cups_dest_t ** dests); --
Name | Description |
---|---|
name | Name of destination |
instance | Instance of destination or NULL for none/primary |
num_dests | Number of destinations |
dests | Destinations |
New number of destinations
- -Add an option to an option array.
--int -cupsAddOption( - const char * name, - const char * value, - int num_options, - cups_option_t ** options); --
Name | Description |
---|---|
name | Name of option |
value | Value of option |
num_options | Number of options |
options | Pointer to options |
Number of options
- -Cancel a print job on the default server. - -Use the cupsLastError() and cupsLastErrorString() functions to get -the cause of any failure.
--int -cupsCancelJob( - const char * name, - int job); --
Name | Description |
---|---|
name | Name of printer or class |
job | Job ID |
1 on success, 0 on failure
- -Authenticate a request. - -This function should be called in response to a HTTP_UNAUTHORIZED -status, prior to resubmitting your request. - -
--int -cupsDoAuthentication( - http_t * http, - const char * method, - const char * resource); --
Name | Description |
---|---|
http | HTTP connection to server |
method | Request method (GET, POST, PUT) |
resource | Resource path |
0 on success, -1 on error
- -Do an IPP request. - -This function sends any IPP request to the specified server, retrying -and authenticating as necessary.
--ipp_t * -cupsDoFileRequest( - http_t * http, - ipp_t * request, - const char * resource, - const char * filename); --
Name | Description |
---|---|
http | HTTP connection to server |
request | IPP request |
resource | HTTP resource for POST |
filename | File to send or NULL for none |
Response data
- -Encode printer options into IPP attributes. - -This function adds operation, job, and then subscription attributes, -in that order. Use the cupsEncodeOptions2() function to add attributes -for a single group.
--void -cupsEncodeOptions( - ipp_t * ipp, - int num_options, - cups_option_t * options); --
Name | Description |
---|---|
ipp | Request to add to |
num_options | Number of options |
options | Options |
Nothing.
- -Encode printer options into IPP attributes for a group. - -This function only adds attributes for a single group. Call this -function multiple times for each group, or use cupsEncodeOptions() -to add the standard groups. - -
--void -cupsEncodeOptions2( - ipp_t * ipp, - int num_options, - cups_option_t * options, - ipp_tag_t group_tag); --
Name | Description |
---|---|
ipp | Request to add to |
num_options | Number of options |
options | Options |
group_tag | Group to encode |
Nothing.
- -Get the default encryption settings. - -The default encryption setting comes from the CUPS_ENCRYPTION -environment variable, then the ~/.cupsrc file, and finally the -/etc/cups/client.conf file. If not set, the default is -HTTP_ENCRYPT_IF_REQUESTED.
--http_encryption_t -cupsEncryption(void); --
None.
-Encryption settings
- -Free the memory used by the list of destinations.
--void -cupsFreeDests( - int num_dests, - cups_dest_t * dests); --
Name | Description |
---|---|
num_dests | Number of destinations |
dests | Destinations |
Nothing.
- -Free memory used by job data.
--void -cupsFreeJobs( - int num_jobs, - cups_job_t * jobs); --
Name | Description |
---|---|
num_jobs | Number of jobs |
jobs | Jobs |
Nothing.
- -Free all memory used by options.
--void -cupsFreeOptions( - int num_options, - cups_option_t * options); --
Name | Description |
---|---|
num_options | Number of options |
options | Pointer to options |
Nothing.
- -Get a list of printer classes from the default server. - -This function is deprecated - use cupsGetDests() instead. - -
--int -cupsGetClasses( - char *** classes); --
Name | Description |
---|---|
classes | Classes |
Number of classes
- -Get the default printer or class for the default server. - -This function returns the default printer or class as defined by -the LPDEST or PRINTER environment variables. If these environment -variables are not set, the server default destination is returned. -Applications should use the cupsGetDests() and cupsGetDest() functions -to get the user-defined default printer, as this function does not -support the lpoptions-defined default printer.
--const char * -cupsGetDefault(void); --
None.
-Default printer or NULL
- -Get the default printer or class for the specified server. - -This function returns the default printer or class as defined by -the LPDEST or PRINTER environment variables. If these environment -variables are not set, the server default destination is returned. -Applications should use the cupsGetDests() and cupsGetDest() functions -to get the user-defined default printer, as this function does not -support the lpoptions-defined default printer. - -
--const char * -cupsGetDefault2( - http_t * http); --
Name | Description |
---|---|
http | HTTP connection |
Default printer or NULL
- -Get the named destination from the list. - -Use the cupsGetDests() or cupsGetDests2() functions to get a -list of supported destinations for the current user.
--cups_dest_t * -cupsGetDest( - const char * name, - const char * instance, - int num_dests, - cups_dest_t * dests); --
Name | Description |
---|---|
name | Name of destination |
instance | Instance of destination |
num_dests | Number of destinations |
dests | Destinations |
Destination pointer or NULL
- -Get the list of destinations from the default server.
--int -cupsGetDests( - cups_dest_t ** dests); --
Name | Description |
---|---|
dests | Destinations |
Number of destinations
- -Get the list of destinations from the specified server. - -
--int -cupsGetDests2( - http_t * http, - cups_dest_t ** dests); --
Name | Description |
---|---|
http | HTTP connection |
dests | Destinations |
Number of destinations
- -Get a file from the server. - -This function returns HTTP_OK when the file is successfully retrieved. - -
--http_status_t -cupsGetFd( - http_t * http, - const char * resource, - int fd); --
Name | Description |
---|---|
http | HTTP connection to server |
resource | Resource name |
fd | File descriptor |
Status
- -Get a file from the server. - -This function returns HTTP_OK when the file is successfully retrieved. - -
--http_status_t -cupsGetFile( - http_t * http, - const char * resource, - const char * filename); --
Name | Description |
---|---|
http | HTTP connection to server |
resource | Resource name |
filename | Filename |
Status
- -Get the jobs from the default server.
--int -cupsGetJobs( - cups_job_t ** jobs, - const char * mydest, - int myjobs, - int completed); --
Name | Description |
---|---|
jobs | Job data |
mydest | Only show jobs for dest? |
myjobs | Only show my jobs? |
completed | Only show completed jobs? |
Number of jobs
- -Get the jobs from the specified server. - -
--int -cupsGetJobs2( - http_t * http, - cups_job_t ** jobs, - const char * mydest, - int myjobs, - int completed); --
Name | Description |
---|---|
http | HTTP connection |
jobs | Job data |
mydest | Only show jobs for dest? |
myjobs | Only show my jobs? |
completed | Only show completed jobs? |
Number of jobs
- -Get an option value.
--const char * -cupsGetOption( - const char * name, - int num_options, - cups_option_t * options); --
Name | Description |
---|---|
name | Name of option |
num_options | Number of options |
options | Options |
Option value or NULL
- -Get the PPD file for a printer on the default server. - -For classes, cupsGetPPD() returns the PPD file for the first printer -in the class.
--const char * -cupsGetPPD( - const char * name); --
Name | Description |
---|---|
name | Printer name |
Filename for PPD file
- -Get the PPD file for a printer from the specified server. - -For classes, cupsGetPPD2() returns the PPD file for the first printer -in the class. - -
--const char * -cupsGetPPD2( - http_t * http, - const char * name); --
Name | Description |
---|---|
http | HTTP connection |
name | Printer name |
Filename for PPD file
- -Get a password from the user. - -Returns NULL if the user does not provide a password.
--const char * -cupsGetPassword( - const char * prompt); --
Name | Description |
---|---|
prompt | Prompt string |
Password
- -Get a list of printers from the default server. - -This function is deprecated - use cupsGetDests() instead. - -
--int -cupsGetPrinters( - char *** printers); --
Name | Description |
---|---|
printers | Printers |
Number of printers
- -Return the last IPP status code.
--ipp_status_t -cupsLastError(void); --
None.
-IPP status code from last request
- -Return the last IPP status-message. - -
--const char * -cupsLastErrorString(void); --
None.
-status-message text from last request
- -Mark command-line options in a PPD file.
--int -cupsMarkOptions( - ppd_file_t * ppd, - int num_options, - cups_option_t * options); --
Name | Description |
---|---|
ppd | PPD file |
num_options | Number of options |
options | Options |
1 if conflicting
- -Parse options from a command-line argument. - -This function converts space-delimited name/value pairs according -to the PAPI text option ABNF specification. Collection values -("name={a=... b=... c=...}") are stored with the curley brackets -intact - use cupsParseOptions() on the value to extract the collection -attributes.
--int -cupsParseOptions( - const char * arg, - int num_options, - cups_option_t ** options); --
Name | Description |
---|---|
arg | Argument to parse |
num_options | Number of options |
options | Options found |
Number of options found
- -Print a file to a printer or class on the default server.
--int -cupsPrintFile( - const char * name, - const char * filename, - const char * title, - int num_options, - cups_option_t * options); --
Name | Description |
---|---|
name | Printer or class name |
filename | File to print |
title | Title of job |
num_options | Number of options |
options | Options |
Job ID
- -Print a file to a printer or class on the specified server. - -
--int -cupsPrintFile2( - http_t * http, - const char * name, - const char * filename, - const char * title, - int num_options, - cups_option_t * options); --
Name | Description |
---|---|
http | HTTP connection |
name | Printer or class name |
filename | File to print |
title | Title of job |
num_options | Number of options |
options | Options |
Job ID
- -Print one or more files to a printer or class on the default server.
--int -cupsPrintFiles( - const char * name, - int num_files, - const char ** files, - const char * title, - int num_options, - cups_option_t * options); --
Name | Description |
---|---|
name | Printer or class name |
num_files | Number of files |
files | File(s) to print |
title | Title of job |
num_options | Number of options |
options | Options |
Job ID
+Print one or more files to a printer or class on the specified server. +
Authenticate a request. + +This function should be called in response to a HTTP_UNAUTHORIZED +status, prior to resubmitting your request.
int -cupsPrintFiles2( +cupsDoAuthentication( http_t * http, - const char * name, - int num_files, - const char ** files, - const char * title, - int num_options, - cups_option_t * options); + const char * method, + const char * resource);
Name | Description |
---|---|
http | HTTP connection |
name | Printer or class name |
num_files | Number of files |
files | File(s) to print |
title | Title of job |
num_options | Number of options |
options | Options |
http | HTTP connection to server |
method | Request method (GET, POST, PUT) |
resource | Resource path |
Job ID
+0 on success, -1 on error
-Put a file on the server. - -This function returns HTTP_CREATED when the file is stored successfully. +
Do an IPP request with a file. -
+This function sends the IPP request to the specified server, retrying +and authenticating as necessary. The request is freed with ippDelete() +after receiving a valid IPP response.-http_status_t -cupsPutFd( +ipp_t * +cupsDoFileRequest( http_t * http, - const char * resource, - int fd); + ipp_t * request, + const char * resource, + const char * filename);
Name | Description |
---|---|
http | HTTP connection to server |
resource | Resource name |
fd | File descriptor |
request | IPP request |
resource | HTTP resource for POST |
filename | File to send or NULL for none |
Status
+Response data
-Put a file on the server. - -This function returns HTTP_CREATED when the file is stored successfully. +
Do an IPP request. -
+This function sends the IPP request to the specified server, retrying +and authenticating as necessary. The request is freed with ippDelete() +after receiving a valid IPP response.-http_status_t -cupsPutFile( +ipp_t * +cupsDoRequest( http_t * http, - const char * resource, - const char * filename); + ipp_t * request, + const char * resource);
Name | Description |
---|---|
http | HTTP connection to server |
resource | Resource name |
filename | Filename |
request | IPP request |
resource | HTTP resource for POST |
Status
- -Return the hostname/address of the default server. - -The returned value can be a fully-qualified hostname, a numeric -IPv4 or IPv6 address, or a domain socket pathname.
--const char * -cupsServer(void); --
None.
-Server name
+Response data
-Save the list of destinations for the default server. +
Encode printer options into IPP attributes. -This function saves the destinations to /etc/cups/lpoptions when run -as root and ~/.lpoptions when run as a normal user.
+This function adds operation, job, and then subscription attributes, +in that order. Use the cupsEncodeOptions2() function to add attributes +for a single group.void -cupsSetDests( - int num_dests, - cups_dest_t * dests); +cupsEncodeOptions( + ipp_t * ipp, + int num_options, + cups_option_t * options);
Name | Description |
---|---|
num_dests | Number of destinations |
dests | Destinations |
ipp | Request to add to |
num_options | Number of options |
options | Options |
Nothing.
-Save the list of destinations for the specified server. +
Encode printer options into IPP attributes for a group. -This function saves the destinations to /etc/cups/lpoptions when run -as root and ~/.lpoptions when run as a normal user. +This function only adds attributes for a single group. Call this +function multiple times for each group, or use cupsEncodeOptions() +to add the standard groups.
-int -cupsSetDests2( - http_t * http, - int num_dests, - cups_dest_t * dests); --
Name | Description |
---|---|
http | HTTP connection |
num_dests | Number of destinations |
dests | Destinations |
0 on success, -1 on error
- -Set the encryption preference.
--void -cupsSetEncryption( - http_encryption_t e); --
Name | Description |
---|---|
e | New encryption preference |
Nothing.
- -Set the password callback for CUPS. - -Pass NULL to restore the default (console) password callback.
--void -cupsSetPasswordCB( - cups_password_cb_t cb); --
Name | Description |
---|---|
cb | Callback function |
Nothing.
- -Set the default server name. - -The "server" string can be a fully-qualified hostname, a numeric -IPv4 or IPv6 address, or a domain socket pathname. Pass NULL to -restore the default server name.
--void -cupsSetServer( - const char * server); --
Name | Description |
---|---|
server | Server name |
Nothing.
- -Set the default user name. - -Pass NULL to restore the default user name.
-void -cupsSetUser( - const char * user); +cupsEncodeOptions2( + ipp_t * ipp, + int num_options, + cups_option_t * options, + ipp_tag_t group_tag);
Name | Description |
---|---|
user | User name |
ipp | Request to add to |
num_options | Number of options |
options | Options |
group_tag | Group to encode |
Nothing.
-Return the current user's name.
--const char * -cupsUser(void); --
None.
-User name
-Check for the "any" address. @@ -1446,7 +620,7 @@ httpAddrEqual(
1 if equal, 0 if !=
+1 if equal, 0 if not
-char * +char * httpAddrLookup( const http_addr_t * addr, - char * name, + char * name, int namelen);
Convert an IP address to a dotted string. +
Convert an address to a numeric string.
-char * +char * httpAddrString( const http_addr_t * addr, - char * s, + char * s, int slen);
IP string
+Numeric address string
Assemble a uniform resource identifier from its components. -This function properly escapes all reserved characters in a URI. You -should use this function in place of traditional string functions -whenever you need to create a URI string. +This function escapes reserved characters in the URI depending on the +value of the "encoding" argument. You should use this function in +place of traditional string functions whenever you need to create a +URI string.
http_uri_status_t httpAssembleURI( - char * uri, + http_uri_coding_t encoding, + char * uri, int urilen, - const char * scheme, - const char * username, - const char * host, + const char * scheme, + const char * username, + const char * host, int port, - const char * resource); + const char * resource);
Name | Description |
---|---|
encoding | Encoding flags |
uri | URI buffer |
urilen | Size of URI buffer |
scheme | Scheme name |
Name | Description |
---|---|
encoding | Encoding flags |
uri | URI buffer |
urilen | Size of URI buffer |
scheme | Scheme name |
Name | Description |
---|---|
http | HTTP connection |
b | 1 = blocking, 0 = non-blocking |
Nothing.
+Check to see if there is a pending response from the server.
@@ -1646,7 +846,25 @@ httpClearCookie(Name | Description |
---|---|
http | Connection |
http | HTTP connection |
Nothing.
+ +Clear HTTP request fields.
++void +httpClearFields( + http_t * http); ++
Name | Description |
---|---|
http | HTTP connection |
Nothing.
@@ -1664,7 +882,7 @@ httpClose(Name | Description |
---|---|
http | Connection to close |
http | HTTP connection |
Nothing.
@@ -1676,7 +894,7 @@ httpClose(http_t * httpConnect( - const char * host, + const char * host, int port);
http_t * httpConnectEncrypt( - const char * host, + const char * host, int port, http_encryption_t encryption);@@ -1711,15 +929,20 @@ httpConnectEncrypt(
New HTTP connection
-Base64-decode a string.
+Base64-decode a string. + +This function is deprecated. Use the httpDecode64_2() function instead +which provides buffer length arguments. + +
-char * +char * httpDecode64( - char * out, - const char * in); + char * out, + const char * in);
Name | Description |
---|---|
http | HTTP data |
http | HTTP connection |
uri | URI to delete |
Status of call (0 = success)
-Base64-encode a string.
+Base64-encode a string. + +This function is deprecated. Use the httpEncode64_2() function instead +which provides buffer length arguments. + +
-char * +char * httpEncode64( - char * out, - const char * in); + char * out, + const char * in);
Name | Description |
---|---|
http | HTTP data |
http | HTTP connection |
e | New encryption preference |
-1 on error, 0 on success
+Get the last error on a connection.
++int +httpError( + http_t * http); ++
Name | Description |
---|---|
http | HTTP connection |
Error code (errno) value
+Flush data from a HTTP connection.
@@ -1854,7 +1100,7 @@ httpFlush(Name | Description |
---|---|
http | HTTP data |
http | HTTP connection |
Nothing.
@@ -1874,30 +1120,68 @@ httpFlushWrite(Name | Description |
---|---|
http | HTTP data |
http | HTTP connection |
Bytes written or -1 on error
+ +Send a GET request to the server.
++int +httpGet( + http_t * http, + const char * uri); ++
Name | Description |
---|---|
http | HTTP connection |
uri | URI to get |
Status of call (0 = success)
+ +Get the blocking/non-block state of a connection. + +
++int +httpGetBlocking( + http_t * http); ++
Name | Description |
---|---|
http | HTTP connection |
Bytes written or -1 on error
+1 if blocking, 0 if non-blocking
-Send a GET request to the server.
+Get any cookie data from the response.
-int -httpGet( - http_t * http, - const char * uri); +const char * +httpGetCookie( + http_t * http);
Name | Description |
---|---|
http | HTTP data |
uri | URI to get |
http | HTTP connecion |
Status of call (0 = success)
+Cookie data or NULL
-const char * +const char * httpGetDateString( time_t t);@@ -1926,10 +1210,10 @@ httpGetDateString(
-const char * +const char * httpGetDateString2( time_t t, - char * s, + char * s, int slen);
time_t httpGetDateTime( - const char * s); + const char * s);
Name | Description |
---|---|
http | HTTP connection |
File descriptor or -1 if none
+ +Get a field value from a request/response.
++const char * +httpGetField( + http_t * http, + http_field_t field); ++
Name | Description |
---|---|
http | HTTP connection |
field | Field to get |
Field value
+Lookup a hostname or IPv4 address, and return @@ -1971,7 +1295,7 @@ address records for the specified name.
struct hostent * httpGetHostByName( - const char * name); + const char * name);
Name | Description |
---|---|
http | HTTP data |
http | HTTP connection |
Content length
-Get the amount of data remaining from the content-length or transfer-encoding fields. This function returns the complete content length, even for -content larger than 2^31 - 1.
+content larger than 2^31 - 1. + +off_t @@ -2048,11 +1374,31 @@ httpGetLength2(
- Name Description + http HTTP data http HTTP connection Returns
Content length
+CUPS 1.2 httpGetStatus()
+Description
+Get the status of the last HTTP request. + +
+Syntax
++http_status_t +httpGetStatus( + http_t * http); ++Arguments
+++
+ + Name Description + http HTTP connection Returns
+HTTP status
+DEPRECATED httpGetSubField()
Description
Get a sub-field value. @@ -2060,18 +1406,18 @@ httpGetLength2(
Syntax
-char * +char * httpGetSubField( http_t * http, http_field_t field, - const char * name, - char * value); + const char * name, + char * value);Arguments
- Name Description + http HTTP data http HTTP connection field Field index name Name of sub-field @@ -2086,19 +1432,19 @@ httpGetSubField( value Value string Syntax
-char * +char * httpGetSubField2( http_t * http, http_field_t field, - const char * name, - char * value, + const char * name, + char * value, int valuelen);Arguments
- Name Description + http HTTP data http HTTP connection field Field index name Name of sub-field @@ -2112,9 +1458,9 @@ httpGetSubField2( value Value string Get a line of text from a HTTP connection.
Syntax
-char * +char * httpGets( - char * line, + char * line, int length, http_t * http);@@ -2124,7 +1470,7 @@ httpGets(line Line to read into - length Max length of buffer + http HTTP data http HTTP connection Returns
Line or NULL
@@ -2137,13 +1483,13 @@ httpGets( int httpHead( http_t * http, - const char * uri); + const char * uri);Arguments
- Name Description + http HTTP data http HTTP connection uri URI for head Returns
@@ -2168,12 +1514,12 @@ httpInitialize(void);Compute the MD5 sum of the username:group:password.
Syntax
-char * +char * httpMD5( - const char * username, - const char * realm, - const char * passwd, - char md5[33]); + const char * username, + const char * realm, + const char * passwd, + char md5[33]);Arguments
@@ -2194,12 +1540,12 @@ with the server-supplied nonce value, method, and request-uri.
Syntax
-char * +char * httpMD5Final( - const char * nonce, - const char * method, - const char * resource, - char md5[33]); + const char * nonce, + const char * method, + const char * resource, + char md5[33]);Arguments
@@ -2218,10 +1564,10 @@ httpMD5Final(
Convert an MD5 sum to a character string.
Syntax
-char * +char * httpMD5String( - const unsigned char * sum, - char md5[33]); + const unsigned char * sum, + char md5[33]);Arguments
@@ -2241,13 +1587,13 @@ httpMD5String( int httpOptions( http_t * http, - const char * uri); + const char * uri);
Arguments
- Name Description + http HTTP data http HTTP connection uri URI for options Returns
@@ -2261,76 +1607,83 @@ httpOptions( int httpPost( http_t * http, - const char * uri); + const char * uri);Arguments
- Name Description + http HTTP data http HTTP connection uri URI for post Returns
Status of call (0 = success)
-httpPrintf()
+httpPut()
Description
-Print a formatted string to a HTTP connection.
+Send a PUT request to the server.
Syntax
int -httpPrintf( +httpPut( http_t * http, - const char * format, - ...); + const char * uri);Arguments
- Name Description - http HTTP data - format printf-style format string + ... Additional args as needed + http HTTP connection uri URI to put Returns
-Number of bytes written
+Status of call (0 = success)
-httpPut()
+DEPRECATED httpRead()
Description
-Send a PUT request to the server.
+Read data from a HTTP connection. + +This function is deprecated. Use the httpRead2() function which can +read more than 2GB of data. + +
Syntax
int -httpPut( +httpRead( http_t * http, - const char * uri); + char * buffer, + int length);Arguments
- Name Description - http HTTP data + uri URI to put + http HTTP connection + buffer Buffer for data length Maximum number of bytes Returns
-Status of call (0 = success)
+Number of bytes read
-httpRead()
+CUPS 1.2 httpRead2()
Description
-Read data from a HTTP connection.
+Read data from a HTTP connection. + +
Syntax
-int -httpRead( +ssize_t +httpRead2( http_t * http, - char * buffer, - int length); + char * buffer, + size_t length);Arguments
@@ -2339,7 +1692,7 @@ httpRead(
- Name Description + http HTTP data http HTTP connection buffer Buffer for data length Maximum number of bytes httpReconnect()
Description
-Reconnect to a HTTP server...
+Reconnect to a HTTP server.
Syntax
int @@ -2350,25 +1703,29 @@ httpReconnect(
- Name Description + http HTTP data http HTTP connection Returns
0 on success, non-zero on failure
-httpSeparate()
+DEPRECATED httpSeparate()
Description
Separate a Universal Resource Identifier into its -components.
+components. + +This function is deprecated; use the httpSeparateURI() function instead. + +Syntax
void httpSeparate( - const char * uri, - char * scheme, - char * username, - char * host, + const char * uri, + char * scheme, + char * username, + char * host, int * port, - char * resource); + char * resource);Arguments
@@ -2389,20 +1746,23 @@ httpSeparate(
Separate a Universal Resource Identifier into its components. +This function is deprecated; use the httpSeparateURI() function instead. + +
Syntax
void httpSeparate2( - const char * uri, - char * scheme, + const char * uri, + char * scheme, int schemelen, - char * username, + char * username, int usernamelen, - char * host, + char * host, int hostlen, int * port, - char * resource, + char * resource, int resourcelen);Arguments
@@ -2433,21 +1793,23 @@ components.http_uri_status_t httpSeparateURI( - const char * uri, - char * scheme, + http_uri_coding_t decoding, + const char * uri, + char * scheme, int schemelen, - char * username, + char * username, int usernamelen, - char * host, + char * host, int hostlen, int * port, - char * resource, + char * resource, int resourcelen);Arguments
+ Name Description decoding Decoding flags uri Universal Resource Identifier scheme Scheme (http, https, etc.) @@ -2472,7 +1834,7 @@ httpSeparateURI( void httpSetCookie( http_t * http, - const char * cookie); + const char * cookie); schemelen Size of scheme buffer Arguments
@@ -2493,13 +1855,13 @@ void httpSetField( http_t * http, http_field_t field, - const char * value); + const char * value);
Arguments
@@ -2522,7 +1884,7 @@ httpSetLength(
- Name Description + http HTTP data http HTTP connection field Field index value Value
- Name Description + http HTTP data http HTTP connection length Length (0 for chunked) Returns
@@ -2533,7 +1895,7 @@ httpSetLength(Return a short string describing a HTTP status code.
Syntax
-const char * +const char * httpStatus( http_status_t status);@@ -2554,13 +1916,13 @@ httpStatus( int httpTrace( http_t * http, - const char * uri); + const char * uri);Arguments
- Name Description + http HTTP data http HTTP connection uri URI for trace Returns
@@ -2579,7 +1941,7 @@ httpUpdate(
- Name Description + http HTTP data http HTTP connection Returns
HTTP status
@@ -2600,28 +1962,57 @@ httpWait(
- Name Description + http HTTP data http HTTP connection msec Milliseconds to wait Returns
1 if data is available, 0 otherwise
-httpWrite()
+DEPRECATED httpWrite()
Description
-Write data to a HTTP connection.
+Write data to a HTTP connection. + +This function is deprecated. Use the httpWrite2() function which can +write more than 2GB of data. + +
Syntax
int httpWrite( http_t * http, - const char * buffer, + const char * buffer, int length);Arguments
+
- Name Description + http HTTP data + http HTTP connection + buffer Buffer for data + length Number of bytes to write Returns
+Number of bytes written
+ +CUPS 1.2 httpWrite2()
+Description
+Write data to a HTTP connection. + +
+Syntax
++ssize_t +httpWrite2( + http_t * http, + const char * buffer, + size_t length); ++Arguments
+@@ -2630,21 +2021,21 @@ httpWrite(+
+ + Name Description http HTTP connection buffer Buffer for data length Number of bytes to write ippAddBoolean()
Description
-Add a boolean attribute to an IPP request.
+Add a boolean attribute to an IPP message.
Syntax
ipp_attribute_t * ippAddBoolean( ipp_t * ipp, ipp_tag_t group, - const char * name, - char value); + const char * name, + char value);Arguments
- Name Description + ipp IPP request ipp IPP message group IPP group name Name of attribute @@ -2661,15 +2052,15 @@ ippAddBoolean( ippAddBooleans( ipp_t * ipp, ipp_tag_t group, - const char * name, + const char * name, int num_values, - const char * values); + const char * values); value Value of attribute Arguments
- Name Description + ipp IPP request ipp IPP message group IPP group name Name of attribute @@ -2689,14 +2080,14 @@ ippAddBooleans( ippAddCollection( ipp_t * ipp, ipp_tag_t group, - const char * name, + const char * name, ipp_t * value); num_values Number of values Arguments
- Name Description + ipp IPP request ipp IPP message group IPP group name Name of attribute @@ -2715,7 +2106,7 @@ ippAddCollection( ippAddCollections( ipp_t * ipp, ipp_tag_t group, - const char * name, + const char * name, int num_values, const ipp_t ** values); @@ -2723,7 +2114,7 @@ ippAddCollections( value Value
- Name Description + ipp IPP request ipp IPP message group IPP group name Name of attribute @@ -2734,21 +2125,21 @@ ippAddCollections( num_values Number of values ippAddDate()
Description
-Add a date attribute to an IPP request.
+Add a date attribute to an IPP message.
Syntax
ipp_attribute_t * ippAddDate( ipp_t * ipp, ipp_tag_t group, - const char * name, + const char * name, const ipp_uchar_t * value);Arguments
- Name Description + ipp IPP request ipp IPP message group IPP group name Name of attribute @@ -2758,7 +2149,7 @@ ippAddDate( value Value ippAddInteger()
Description
-Add a integer attribute to an IPP request.
+Add a integer attribute to an IPP message.
Syntax
ipp_attribute_t * @@ -2766,14 +2157,14 @@ ippAddInteger( ipp_t * ipp, ipp_tag_t group, ipp_tag_t type, - const char * name, + const char * name, int value);Arguments
- Name Description + ipp IPP request ipp IPP message group IPP group type Type of attribute @@ -2792,7 +2183,7 @@ ippAddIntegers( ipp_t * ipp, ipp_tag_t group, ipp_tag_t type, - const char * name, + const char * name, int num_values, const int * values); @@ -2800,7 +2191,7 @@ ippAddIntegers( name Name of attribute
- Name Description + ipp IPP request ipp IPP message group IPP group type Type of attribute @@ -2812,7 +2203,7 @@ ippAddIntegers( name Name of attribute CUPS 1.2 ippAddOctetString()
Description
-Add an octetString value to an IPP request. +
Add an octetString value to an IPP message.
Syntax
@@ -2821,7 +2212,7 @@ ippAddIntegers( ippAddOctetString( ipp_t * ipp, ipp_tag_t group, - const char * name, + const char * name, const void * data, int datalen); @@ -2829,7 +2220,7 @@ ippAddOctetString(
- Name Description + ipp IPP request ipp IPP message group IPP group name Name of attribute @@ -2840,14 +2231,14 @@ ippAddOctetString( data octetString data ippAddRange()
Description
-Add a range of values to an IPP request.
+Add a range of values to an IPP message.
Syntax
ipp_attribute_t * ippAddRange( ipp_t * ipp, ipp_tag_t group, - const char * name, + const char * name, int lower, int upper);@@ -2855,7 +2246,7 @@ ippAddRange(
- Name Description + ipp IPP request ipp IPP message group IPP group name Name of attribute @@ -2866,14 +2257,14 @@ ippAddRange( lower Lower value ippAddRanges()
Description
-Add ranges of values to an IPP request.
+Add ranges of values to an IPP message.
Syntax
ipp_attribute_t * ippAddRanges( ipp_t * ipp, ipp_tag_t group, - const char * name, + const char * name, int num_values, const int * lower, const int * upper); @@ -2882,7 +2273,7 @@ ippAddRanges(
- Name Description + ipp IPP request ipp IPP message group IPP group name Name of attribute @@ -2894,14 +2285,14 @@ ippAddRanges( num_values Number of values ippAddResolution()
Description
-Add a resolution value to an IPP request.
+Add a resolution value to an IPP message.
Syntax
ipp_attribute_t * ippAddResolution( ipp_t * ipp, ipp_tag_t group, - const char * name, + const char * name, ipp_res_t units, int xres, int yres); @@ -2910,7 +2301,7 @@ ippAddResolution(
- Name Description + ipp IPP request ipp IPP message group IPP group name Name of attribute @@ -2922,14 +2313,14 @@ ippAddResolution( units Units for resolution ippAddResolutions()
Description
-Add resolution values to an IPP request.
+Add resolution values to an IPP message.
Syntax
ipp_attribute_t * ippAddResolutions( ipp_t * ipp, ipp_tag_t group, - const char * name, + const char * name, int num_values, ipp_res_t units, const int * xres, @@ -2939,7 +2330,7 @@ ippAddResolutions(
- Name Description + ipp IPP request ipp IPP message group IPP group name Name of attribute @@ -2952,7 +2343,7 @@ ippAddResolutions( num_values Number of values ippAddSeparator()
Description
-Add a group separator to an IPP request.
+Add a group separator to an IPP message.
Syntax
ipp_attribute_t * @@ -2963,14 +2354,14 @@ ippAddSeparator(
- Name Description + ipp IPP request ipp IPP message Returns
New attribute
ippAddString()
Description
-Add a language-encoded string to an IPP request.
+Add a language-encoded string to an IPP message.
Syntax
ipp_attribute_t * @@ -2978,15 +2369,15 @@ ippAddString( ipp_t * ipp, ipp_tag_t group, ipp_tag_t type, - const char * name, - const char * charset, - const char * value); + const char * name, + const char * charset, + const char * value);Arguments
- Name Description + ipp IPP request ipp IPP message group IPP group type Type of attribute @@ -2998,7 +2389,7 @@ ippAddString( name Name of attribute ippAddStrings()
Description
-Add language-encoded strings to an IPP request.
+Add language-encoded strings to an IPP message.
Syntax
ipp_attribute_t * @@ -3006,16 +2397,16 @@ ippAddStrings( ipp_t * ipp, ipp_tag_t group, ipp_tag_t type, - const char * name, + const char * name, int num_values, - const char * charset, - const char *const * values); + const char * charset, + const char *const * values);Arguments
-
- Name Description + ipp IPP request ipp IPP message group IPP group type Type of attribute @@ -3047,7 +2438,7 @@ ippDateToTime( name Name of attribute ippDelete()
Description
-Delete an IPP request.
+Delete an IPP message.
Syntax
void @@ -3058,14 +2449,14 @@ ippDelete(
- Name Description + ipp IPP request ipp IPP message Returns
Nothing.
CUPS 1.1.19 ippDeleteAttribute()
Description
-Delete a single attribute in an IPP request. +
Delete a single attribute in an IPP message.
Syntax
@@ -3079,7 +2470,7 @@ ippDeleteAttribute(
- Name Description + ipp IPP request ipp IPP message attr Attribute to delete Returns
@@ -3090,7 +2481,7 @@ ippDeleteAttribute(Return a name for the given status code.
Syntax
-const char * +const char * ippErrorString( ipp_status_t error);@@ -3112,7 +2503,7 @@ ippErrorString(ipp_status_t ippErrorValue( - const char * name); + const char * name);Arguments
-@@ -3131,14 +2522,14 @@ ippErrorValue( ipp_attribute_t * ippFindAttribute( ipp_t * ipp, - const char * name, + const char * name, ipp_tag_t type);
Arguments
@@ -3153,14 +2544,14 @@ ippFindAttribute( ipp_attribute_t * ippFindNextAttribute( ipp_t * ipp, - const char * name, + const char * name, ipp_tag_t type);
- Name Description + ipp IPP request ipp IPP message name Name of attribute type Type of attribute Arguments
@@ -3169,7 +2560,7 @@ ippFindNextAttribute(
- Name Description + ipp IPP request ipp IPP message name Name of attribute type Type of attribute ippLength()
Description
-Compute the length of an IPP request.
+Compute the length of an IPP message.
Syntax
size_t @@ -3180,14 +2571,14 @@ ippLength(
- Name Description + ipp IPP request ipp IPP message Returns
-Size of IPP request
+Size of IPP message
ippNew()
Description
-Allocate a new IPP request.
+Allocate a new IPP message.
Syntax
ipp_t * @@ -3196,7 +2587,31 @@ ippNew(void);Arguments
None.
Returns
-New IPP request
+New IPP message
+ +CUPS 1.2 ippNewRequest()
+Description
+Allocate a new IPP request message. + +The new request message is initialized with the attributes-charset and +attributes-natural-language attributes added. The +attributes-natural-language value is derived from the current locale. + +
+Syntax
++ipp_t * +ippNewRequest( + ipp_op_t op); ++Arguments
+++
+ + Name Description + op Operation code Returns
+IPP request message
CUPS 1.2 ippOpString()
Description
@@ -3205,7 +2620,7 @@ ippNew(void);Syntax
-const char * +const char * ippOpString( ipp_op_t op);@@ -3227,7 +2642,7 @@ ippOpString(ipp_op_t ippOpValue( - const char * name); + const char * name);Arguments
@@ -3253,7 +2668,7 @@ ippPort(void);
ippRead()
Description
-Read data for an IPP request from a HTTP connection.
+Read data for an IPP message from a HTTP connection.
Syntax
ipp_state_t @@ -3273,7 +2688,7 @@ ippRead(CUPS 1.1.19 ippReadFile()
Description
-Read data for an IPP request from a file. +
Read data for an IPP message from a file.
Syntax
@@ -3293,9 +2708,9 @@ ippReadFile(Returns
Current state
-CUPS 1.1.19 ippReadIO()
+CUPS 1.2 ippReadIO()
Description
-Read data for an IPP request. +
Read data for an IPP message.
Syntax
@@ -3359,7 +2774,7 @@ ippTimeToDate(ippWrite()
Description
-Write data for an IPP request to a HTTP connection.
+Write data for an IPP message to a HTTP connection.
Syntax
ipp_state_t @@ -3379,7 +2794,7 @@ ippWrite(CUPS 1.1.19 ippWriteFile()
Description
-Write data for an IPP request to a file. +
Write data for an IPP message to a file.
Syntax
@@ -3399,9 +2814,9 @@ ippWriteFile(Returns
Current state
-CUPS 1.1.19 ippWriteIO()
+CUPS 1.2 ippWriteIO()
Description
-Write data for an IPP request. +
Write data for an IPP message.
Syntax
@@ -3421,7 +2836,7 @@ ippWriteIO(dst Destination cb Write callback function - blocking Use blocking IO? + parent Parent IPP request parent Parent IPP message ipp IPP data Returns
@@ -3429,82 +2844,11 @@ ippWriteIO(Structures
-
-- cups_dest_s
-- cups_job_s
-- cups_option_s
- http_addrlist_s CUPS 1.2
-- http_s
- ipp_attribute_s
-- ipp_str
+- ipp_s
cups_dest_s
-Description
-Destination
-Definition
--struct cups_dest_s -{ - char *name, * instance; - int is_default; - int num_options; - cups_option_t * options; -}; --Members
-- --
- - Name Description - instance Local instance name or NULL - is_default Is this printer the default? - num_options Number of options - options Options cups_job_s
-Description
-Job
-Definition
--struct cups_job_s -{ - char *dest, *title, *user, * format; - int id; - int size, priority; - time_t completed_time, creation_time, processing_time; - ipp_jstate_t state; -}; --Members
-- --
- - Name Description - format Document format - id The job ID - priority Priority (1-100) - processing_time Time the job was processed - state Job state cups_option_s
-Description
-Types and structures...
-Definition
--struct cups_option_s -{ - char * name; - char * value; -}; --Members
---
- - Name Description - name Name of option - value Value of option CUPS 1.2 http_addrlist_s
Description
Socket address list, which is @@ -3527,79 +2871,6 @@ struct http_addrlist_s
next Pointer to next address in list http_s
-Description
-HTTP connection structure.
-Definition
--struct http_s -{ - time_t activity; - http_addrlist_t * addrlist; - int auth_type; - int blocking; - char buffer[HTTP_MAX_BUFFER]; - char * cookie; - char * data; - http_encoding_t data_encoding; - off_t data_remaining; - int digest_tries; - http_encryption_t encryption; - int error; - http_status_t expect; - int fd; - char hostname[HTTP_MAX_HOST], fields[HTTP_FIELD_MAX][HTTP_MAX_VALUE]; - http_addr_t * hostaddr; - fd_set * input_set; - http_keepalive_t keep_alive; - _cups_md5_state_t md5_state; - char nonce[HTTP_MAX_VALUE]; - int nonce_count; - http_state_t state; - http_status_t status; - void * tls; - int used; - char authstring[HTTP_MAX_VALUE], userpass[HTTP_MAX_VALUE]; - http_version_t version; - char wbuffer[HTTP_MAX_BUFFER]; - int wused; -}; --Members
---
- - Name Description - activity Time since last read/write - addrlist CUPS 1.2 List of valid addresses - auth_type Authentication in use - blocking To block or not to block - buffer[HTTP_MAX_BUFFER] Buffer for incoming data - cookie CUPS 1.1.19 Cookie value(s) - data Pointer to data buffer - data_encoding Chunked or not - data_remaining CUPS 1.2 Number of bytes left - digest_tries CUPS 1.1.20 Number of tries for digest auth - encryption Encryption requirements - error Last error on read - expect CUPS 1.1.19 Expect: header - fd File descriptor for this socket - fields[HTTP_FIELD_MAX][HTTP_MAX_VALUE] Field values - hostaddr CUPS 1.2 Current host address and port - input_set CUPS 1.1.19 select() set for httpWait() - keep_alive Keep-alive supported? - md5_state MD5 state - nonce[HTTP_MAX_VALUE] Nonce value - nonce_count Nonce count - state State of client - status Status of last request - tls TLS state information - used Number of bytes used in buffer - userpass[HTTP_MAX_VALUE] CUPS 1.1.20 Username:password string - version Protocol version - wbuffer[HTTP_MAX_BUFFER] Buffer for outgoing data - wused CUPS 1.2 Write buffer bytes used ipp_attribute_s
Description
Attribute
@@ -3607,7 +2878,7 @@ struct http_sstruct ipp_attribute_s { - char * name; + char * name; struct ipp_attribute_s * next; int num_values; ipp_tag_t group_tag, value_tag; @@ -3625,15 +2896,17 @@ struct ipp_attribute_svalues[1] Values ipp_str
+ipp_s
Description
IPP Request/Response/Notification
Definition
-struct ipp_str +struct ipp_s { - ipp_attribute_t *attrs, *last, * current; + ipp_attribute_t * attrs; + ipp_attribute_t * current; ipp_tag_t curtag; + ipp_attribute_t * last; ipp_attribute_t * prev; ipp_request_t request; ipp_state_t state; @@ -3643,8 +2916,10 @@ struct ipp_str
+ Name Description attrs Attributes current Current attribute (for read/write) + curtag Current attribute group tag last Last attribute in list prev Previous attribute (for read) request Request header @@ -3652,63 +2927,19 @@ struct ipp_str state State of request Types
-
-- char
-- cups_dest_t
-- cups_job_t
-- cups_option_t
-- cups_ptype_t
- http_addrlist_t CUPS 1.2
- http_auth_t
- http_encoding_t
- http_encryption_t
- http_t
- ipp_attribute_t
-- ipp_iocb_t
+- ipp_iocb_t CUPS 1.2
- ipp_request_t
- ipp_t
+- ipp_uchar_t
- ipp_value_t
char
-Description
-Printer Options
-Definition
--typedef const * (*charcups_password_cb_t)(const char *); -- -cups_dest_t
-Description
-Destination
-Definition
--typedef struct cups_dest_s cups_dest_t; -- -cups_job_t
-Description
-Job
-Definition
--typedef struct cups_job_s cups_job_t; -- -cups_option_t
-Description
-Types and structures...
-Definition
--typedef struct cups_option_s cups_option_t; -- -cups_ptype_t
-Description
-Printer Type/Capability Bits
-Definition
--typedef unsigned cups_ptype_t; --CUPS 1.2 http_addrlist_t
Description
Socket address list, which is @@ -3749,7 +2980,7 @@ typedef enum http_encryption_e http_encryption_
HTTP connection structure.
Definition
-typedef struct http_s http_t; +typedef struct _http_s http_t;ipp_attribute_t
@@ -3760,12 +2991,12 @@ typedef struct http_s http_t; typedef struct ipp_attribute_s ipp_attribute_t; -ipp_iocb_t
+CUPS 1.2 ipp_iocb_t
Description
-IPP IO Callback Function
+IPP IO Callback Function
Definition
-typedef int (*ipp_iocb_t)(void *, ipp_uchar_t *, int); +typedef ssize_t (*ipp_iocb_t)(void *, ipp_uchar_t *, size_t);ipp_request_t
@@ -3773,7 +3004,7 @@ typedef int (*ipp_iocb_t)(void *, ipp_uchar_t *, int)Request Header
Definition
-typedef union ipp_request_t; +typedef union ipp_request_u ipp_request_t;ipp_t
@@ -3781,7 +3012,15 @@ typedef union ipp_request_t;Attribute Value
Definition
-typedef struct ipp_str ipp_t; +typedef struct ipp_s ipp_t; ++ +ipp_uchar_t
+Description
+IPP status codes...
+Definition
++typedef typedef unsigned char ipp_uchar_t;ipp_value_t
@@ -3789,7 +3028,51 @@ typedef struct ipp_str ipp_t;New in CUPS 1.1.19
Definition
-typedef union ipp_value_t; +typedef union ipp_value_u ipp_value_t; ++ +Unions
++
+ +- ipp_request_u
+- ipp_value_u
+ipp_request_u
+Description
+Request Header
+Definition
++union ipp_request_u +{ +}; ++Members
++ ++
+ + Name Description ipp_value_u
+Description
+New in CUPS 1.1.19
+Definition
++union ipp_value_u +{ + char boolean; + ipp_t * collection; + ipp_uchar_t date[11]; + int integer; +};+Members
++
+ + Name Description + boolean Boolean value + collection Collection value + date[11] Date/time value + integer Integer/enumerated value