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

SYNOPSIS
#include <pappl/pappl.h>

typedef struct _pappl_job_s pappl_job_t;

void
papplJobCancel(pappl_job_t *job);

bool
papplJobFilterImage(pappl_job_t *job, pappl_device_t *device, pappl_joptions_t *options, const unsigned char *pixels, unsigned width, unsigned height, unsigned depth, bool smoothing);

ipp_attribute_t *
papplJobGetAttribute(pappl_job_t *job, const char *name);

void *
papplJobGetData(pappl_job_t *job);

const char *
papplJobGetFilename(pappl_job_t *job);

const char *
papplJobGetFormat(pappl_job_t *job);

int
papplJobGetID(pappl_job_t *job);

int
papplJobGetImpressions(pappl_job_t *job);

int
papplJobGetImpressionsCompleted(pappl_job_t *job);

const char *
papplJobGetMessage(pappl_job_t *job);

const char *
papplJobGetName(pappl_job_t *job);

pappl_joptions_t *
papplJobGetOptions(pappl_job_t *job, pappl_joptions_t *options, unsigned num_pages, bool color);

pappl_printer_t *
papplJobGetPrinter(pappl_job_t *job);

pappl_jreason_t
papplJobGetReasons(pappl_job_t *job);

ipp_jstate_t
papplJobGetState(pappl_job_t *job);

time_t
papplJobGetTimeCompleted(pappl_job_t *job);

time_t
papplJobGetTimeCreated(pappl_job_t *job);

time_t
papplJobGetTimeProcessed(pappl_job_t *job);

const char *
papplJobGetUsername(pappl_job_t *job);

bool
papplJobIsCanceled(pappl_job_t *job);

int
papplJobOpenFile(pappl_job_t *job, char *fname, size_t fnamesize, const char *directory, const char *ext, const char *mode);

void
papplJobSetData(pappl_job_t *job, void *data);

void
papplJobSetImpressions(pappl_job_t *job, int impressions);

void
papplJobSetImpressionsCompleted(pappl_job_t *job, int add);

void
papplJobSetMessage(pappl_job_t *job, const char *message, ...);

void
papplJobSetReasons(pappl_job_t *job, pappl_jreason_t add, pappl_jreason_t remove);

DESCRIPTION
The PAPPL job functions provide access to the job object. Jobs and the life cycle of the pappl_job_t objects are managed automatically by the system object for the printer application.

The papplJobGet functions get the current values associated with a job while the papplJobSet functions set the current values associated with a job.

The papplJobCancel function cancels processing of a job, while the papplJobIsCanceled function returns whether a job is in the canceled state (IPP_JSTATE_CANCELED) or is in the process of being canceled (IPP_JSTATE_PROCESSING and PAPPL_JREASON_PROCESSING_TO_STOP_POINT).

The papplJobOpenFile function opens a file associated with the job. The file descriptor must be closed by the caller using the close(2) system call.

The papplJobFilterImage function converts raw image data to raster data suitable for the printer.