# include <sys/types.h> # ifdefined(_WIN32) && !defined(__CUPS_SSIZE_T_DEFINED) # define __CUPS_SSIZE_T_DEFINED # include <stddef.h> /* Windows does not support the ssize_t type, so map it to long... */ typedeflong ssize_t; /* @private@ */ # endif /* _WIN32 && !__CUPS_SSIZE_T_DEFINED */
# include "file.h" # include "ipp.h" # include "language.h" # include "pwg.h"
/* Flags for cupsConnectDest and cupsEnumDests */ # define CUPS_DEST_FLAGS_NONE 0x00 /* No flags are set */ # define CUPS_DEST_FLAGS_UNCONNECTED 0x01 /* There is no connection */ # define CUPS_DEST_FLAGS_MORE 0x02 /* There are more destinations */ # define CUPS_DEST_FLAGS_REMOVED 0x04 /* The destination has gone away */ # define CUPS_DEST_FLAGS_ERROR 0x08 /* An error occurred */ # define CUPS_DEST_FLAGS_RESOLVING 0x10 /* The destination address is being
* resolved */ # define CUPS_DEST_FLAGS_CONNECTING 0x20 /* A connection is being established */ # define CUPS_DEST_FLAGS_CANCELED 0x40 /* Operation was canceled */ # define CUPS_DEST_FLAGS_DEVICE 0x80 /* For @link cupsConnectDest@: Connect to device */
/* Flags for cupsGetDestMediaByName/Size */ # define CUPS_MEDIA_FLAGS_DEFAULT 0x00 /* Find the closest size supported by
* the printer */ # define CUPS_MEDIA_FLAGS_BORDERLESS 0x01 /* Find a borderless size */ # define CUPS_MEDIA_FLAGS_DUPLEX 0x02 /* Find a size compatible with 2-sided
* printing */ # define CUPS_MEDIA_FLAGS_EXACT 0x04 /* Find an exact match for the size */ # define CUPS_MEDIA_FLAGS_READY 0x08 /* If the printer supports media * sensing, find the size amongst the
* "ready" media. */
typedefunsigned cups_ptype_t; /* Printer type/capability bits */ enum cups_ptype_e /* Printer type/capability bit
* constants */
{ /* Not a typedef'd enum so we can OR */
CUPS_PRINTER_LOCAL = 0x0000, /* Local printer or class */
CUPS_PRINTER_CLASS = 0x0001, /* Printer class */
CUPS_PRINTER_REMOTE = 0x0002, /* Remote printer or class */
CUPS_PRINTER_BW = 0x0004, /* Can do B&W printing */
CUPS_PRINTER_COLOR = 0x0008, /* Can do color printing */
CUPS_PRINTER_DUPLEX = 0x0010, /* Can do two-sided printing */
CUPS_PRINTER_STAPLE = 0x0020, /* Can staple output */
CUPS_PRINTER_COPIES = 0x0040, /* Can do copies in hardware */
CUPS_PRINTER_COLLATE = 0x0080, /* Can quickly collate copies */
CUPS_PRINTER_PUNCH = 0x0100, /* Can punch output */
CUPS_PRINTER_COVER = 0x0200, /* Can cover output */
CUPS_PRINTER_BIND = 0x0400, /* Can bind output */
CUPS_PRINTER_SORT = 0x0800, /* Can sort output */
CUPS_PRINTER_SMALL = 0x1000, /* Can print on Letter/Legal/A4-size media */
CUPS_PRINTER_MEDIUM = 0x2000, /* Can print on Tabloid/B/C/A3/A2-size media */
CUPS_PRINTER_LARGE = 0x4000, /* Can print on D/E/A1/A0-size media */
CUPS_PRINTER_VARIABLE = 0x8000, /* Can print on rolls and custom-size media */
CUPS_PRINTER_IMPLICIT = 0x10000, /* Implicit class @private@
* @since Deprecated@ */
CUPS_PRINTER_DEFAULT = 0x20000, /* Default printer on network */
CUPS_PRINTER_FAX = 0x40000, /* Fax queue */
CUPS_PRINTER_REJECTING = 0x80000, /* Printer is rejecting jobs */
CUPS_PRINTER_DELETE = 0x100000, /* Delete printer
* @deprecated@ @exclude all@ */
CUPS_PRINTER_NOT_SHARED = 0x200000, /* Printer is not shared
* @since CUPS 1.2/macOS 10.5@ */
CUPS_PRINTER_AUTHENTICATED = 0x400000,/* Printer requires authentication
* @since CUPS 1.2/macOS 10.5@ */
CUPS_PRINTER_COMMANDS = 0x800000, /* Printer supports maintenance commands
* @since CUPS 1.2/macOS 10.5@ */
CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was discovered @since CUPS 1.2/macOS 10.5@ */
CUPS_PRINTER_SCANNER = 0x2000000, /* Scanner-only device
* @since CUPS 1.4/macOS 10.6@ @private@ */
CUPS_PRINTER_MFP = 0x4000000, /* Printer with scanning capabilities
* @since CUPS 1.4/macOS 10.6@ @private@ */
CUPS_PRINTER_3D = 0x8000000, /* Printer with 3D capabilities @exclude all@ @private@ */
CUPS_PRINTER_OPTIONS = 0x6fffc /* ~(CLASS | REMOTE | IMPLICIT | * DEFAULT | FAX | REJECTING | DELETE | * NOT_SHARED | AUTHENTICATED |
* COMMANDS | DISCOVERED) @private@ */
};
typedefstruct cups_option_s /**** Printer Options ****/
{ char *name; /* Name of option */ char *value; /* Value of option */
} cups_option_t;
typedefstruct cups_dest_s /**** Destination ****/
{ char *name, /* Printer or class name */
*instance; /* Local instance name or NULL */ int is_default; /* Is this printer the default? */ int num_options; /* Number of options */
cups_option_t *options; /* Options */
} cups_dest_t;
typedefstruct _cups_dinfo_s cups_dinfo_t; /* Destination capability and status
* information @since CUPS 1.6/macOS 10.8@ */
typedefstruct cups_job_s /**** Job ****/
{ int id; /* The job ID */ char *dest; /* Printer or class name */ char *title; /* Title/job name */ char *user; /* User that submitted the job */ char *format; /* Document format */
ipp_jstate_t state; /* Job state */ int size; /* Size in kilobytes */ int priority; /* Priority (1-100) */
time_t completed_time; /* Time the job was completed */
time_t creation_time; /* Time the job was created */
time_t processing_time; /* Time the job was processed */
} cups_job_t;
typedefstruct cups_size_s /**** Media Size @since CUPS 1.6/macOS 10.8@ ****/
{ char media[128]; /* Media name to use */ int width, /* Width in hundredths of millimeters */
length, /* Length in hundredths of
* millimeters */
bottom, /* Bottom margin in hundredths of
* millimeters */
left, /* Left margin in hundredths of
* millimeters */
right, /* Right margin in hundredths of
* millimeters */
top; /* Top margin in hundredths of
* millimeters */
} cups_size_t;
/* New in CUPS 2.2/macOS 10.12 */ extern ssize_t cupsHashData(constchar *algorithm, constvoid *data, size_t datalen, unsignedchar *hash, size_t hashsize) _CUPS_API_2_2;
/* New in CUPS 2.2.4 */ externint cupsAddIntegerOption(constchar *name, int value, int num_options, cups_option_t **options) _CUPS_API_2_2_4; externint cupsGetIntegerOption(constchar *name, int num_options, cups_option_t *options) _CUPS_API_2_2_4;
/* New in CUPS 2.2.7 */ externconstchar *cupsHashString(constunsignedchar *hash, size_t hashsize, char *buffer, size_t bufsize) _CUPS_API_2_2_7;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.