LIBRARY
Printer Application Framework (libpappl, "pkg-config --cflags --libs pappl")

SYNOPSIS
#include <pappl/pappl.h>

typedef struct _pappl_printer_s pappl_printer_t;

void
papplPrinterCancelAllJobs(pappl_printer_t *printer);

void
papplPrinterCloseDevice(pappl_printer_t *printer);

pappl_printer_t *
papplPrinterCreate(pappl_system_t *system, int printer_id, const char *printer_name, const char *driver_name, const char *device_id, const char *device_uri);

void
papplPrinterDelete(pappl_printer_t *printer);

pappl_job_t *
papplPrinterFindJob(pappl_printer_t *printer, int job_id);

pappl_contact_t *
papplPrinterGetContact(pappl_printer_t *printer, pappl_contact_t *contact);

const char *
papplPrinterGetDeviceID(pappl_printer_t *printer);

const char *
papplPrinterGetDeviceURI(pappl_printer_t *printer);

char *
papplPrinterGetDNSSDName(pappl_printer_t *printer, char *buffer, size_t bufsize);

ipp_t *
papplPrinterGetDriverAttributes(pappl_printer_t *printer);

pappl_driver_data_t *
papplPrinterGetDriverData(pappl_printer_t *printer, pappl_driver_data_t *data);

const char *
papplPrinterGetDriverName(pappl_printer_t *printer);

char *
papplPrinterGetGeoLocation(pappl_printer_t *printer, char *buffer, size_t bufsize);

int
papplPrinterGetID(pappl_printer_t *printer);

int
papplPrinterGetImpressionsCompleted(pappl_printer_t *printer);

char *
papplPrinterGetLocation(pappl_printer_t *printer, char *buffer, size_t bufsize);

int
papplPrinterGetMaxActiveJobs(pappl_printer_t *printer);

int
papplPrinterGetMaxCompletedJobs(pappl_printer_t *printer);

const char *
papplPrinterGetName(pappl_printer_t *printer);

int
papplPrinterGetNextJobID(pappl_printer_t *printer);

int
papplPrinterGetNumberOfActiveJobs(pappl_printer_t *printer);

int
papplPrinterGetNumberOfCompletedJobs(pappl_printer_t *printer);

int
papplPrinterGetNumberOfJobs(pappl_printer_t *printer);

char *
papplPrinterGetOrganization(pappl_printer_t *printer, char *buffer, size_t bufsize);

char *
papplPrinterGetOrganizationalUnit(pappl_printer_t *printer, char *buffer, size_t bufsize);

char *
papplPrinterGetPrintGroup(pappl_printer_t *printer, char *buffer, size_t bufsize);

pappl_preason_t
papplPrinterGetReasons(pappl_printer_t *printer);

ipp_pstate_t
papplPrinterGetState(pappl_printer_t *printer);

int
papplPrinterGetSupplies(pappl_printer_t *printer, int max_supplies, pappl_supply_t *supplies);

pappl_system_t *
papplPrinterGetSystem(pappl_printer_t *printer);

void
papplPrinterIterateActiveJobs(pappl_printer_t *printer, pappl_job_cb_t cb, void *data, int first_index, int limit);

void
papplPrinterIterateAllJobs(pappl_printer_t *printer, pappl_job_cb_t cb, void *data, int first_index, int limit);

void
papplPrinterIterateCompletedJobs(pappl_printer_t *printer, pappl_job_cb_t cb, void *data, int first_index, int limit);

pappl_device_t *
papplPrinterOpenDevice(pappl_printer_t *printer);

void
papplPrinterPause(pappl_printer_t *printer);

void
papplPrinterResume(pappl_printer_t *printer);

void
papplPrinterSetContact(pappl_printer_t *printer, pappl_contact_t *contact);

void
papplPrinterSetDNSSDName(pappl_printer_t *printer, const char *value);

void
papplPrinterSetDriverData(pappl_printer_t *printer, pappl_driver_data_t *data, ipp_t *attrs);

void
papplPrinterSetDriverDefaults(pappl_printer_t *printer, pappl_driver_data_t *data);

void
papplPrinterSetGeoLocation(pappl_printer_t *printer, const char *value);

void
papplPrinterSetImpressionsCompleted(pappl_printer_t *printer, int add);

void
papplPrinterSetLocation(pappl_printer_t *printer, const char *value);

void
papplPrinterSetMaxActiveJobs(pappl_printer_t *printer, int max_active_jobs);

void
papplPrinterSetMaxCompletedJobs(pappl_printer_t *printer, int max_completed_jobs);

void
papplPrinterSetNextJobID(pappl_printer_t *printer, int next_job_id);

void
papplPrinterSetOrganization(pappl_printer_t *printer, const char *value);

void
papplPrinterSetOrganizationalUnit(pappl_printer_t *printer, const char *value);

void
papplPrinterSetPrintGroup(pappl_printer_t *printer, const char *value);

void
papplPrinterSetReadyMedia(pappl_printer_t *printer, int num_ready, pappl_media_col_t *ready);

void
papplPrinterSetReasons(pappl_printer_t *printer, pappl_preason_t add, pappl_preason_t remove);

void
papplPrinterSetSupplies(pappl_printer_t *printer, int num_supplies, pappl_supply_t *supplies);

void
papplPrinterSetUSB(pappl_printer_t *printer, unsigned vendor_id, unsigned product_id, pappl_uoptions_t options);

DESCRIPTION
The PAPPL printer functions provide access to the printer object. Printers are created and deleted by the printer application while the life cycle of the pappl_printer_t objects are managed automatically by the system object for the printer application.

The papplPrinterCreate function creates a new printer while the papplPrinterDelete function deletes a printer.

The papplPrinterPause function stops a printer while the papplPrinterResume function starts a printer.

The papplPrinterGet functions get the current values associated with a printer while the papplPrinterSet functions set the current values associated with a printer.

The papplPrinterCancelAddJobs, papplPrinterFindJob, papplPrinterGetNumberOfActiveJobs, papplPrinterGetNumberOfCompletedJobs, papplPrinterGetNumberOfJobs, papplPrinterIterateActiveJobs, papplPrinterIterateAllJobs, and papplPrinterIterateCompletedJobs functions provide access to the jobs queued on a printer.

The papplPrinterOpenDevice function provides access to the device associated with a printer when it is not processing a job. The device must be later closed using the papplPrinterCloseDevice function so that the printer can resume job processing.