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

SYNOPSIS
#include <pappl/pappl.h>

typedef struct _pappl_system_s pappl_system_t;

bool
papplSystemAddListeners(pappl_system_t *system, const char *name);

void
papplSystemAddMIMEFilter(pappl_system_t *system, const char *srctype, const char *dsttype, pappl_mime_filter_cb_t cb, void *data);

void
papplSystemCleanJobs(pappl_system_t *system);

pappl_system_t *
papplSystemCreate(pappl_soptions_t options, const char *name, int port, const char *subtypes, const char *spooldir, const char *logfile, pappl_loglevel_t loglevel, const char *auth_service, bool tls_only);

void
papplSystemDelete(pappl_system_t *system);

pappl_printer_t *
papplSystemFindPrinter(pappl_system_t *system, const char *resource, int printer_id, const char *device_uri);

char *
papplSystemGetAdminGroup(pappl_system_t *system, char *buffer, size_t bufsize);

const char *
papplSystemGetAuthService(pappl_system_t *system);

pappl_contact_t *
papplSystemGetContact(pappl_system_t *system, pappl_contact_t *contact);

int
papplSystemGetDefaultPrinterID(pappl_system_t *system);

char *
papplSystemGetDefaultPrintGroup(pappl_system_t *system, char *buffer, size_t bufsize);

char *
papplSystemGetDNSSDName(pappl_system_t *system, char *buffer, size_t bufsize);

const char *
papplSystemGetFooterHTML(pappl_system_t *system);

char *
papplSystemGetGeoLocation(pappl_system_t *system, char *buffer, size_t bufsize);

char *
papplSystemGetHostname(pappl_system_t *system, char *buffer, size_t bufsize);

char *
papplSystemGetLocation(pappl_system_t *system, char *buffer, size_t bufsize);

pappl_loglevel_t
papplSystemGetLogLevel(pappl_system_t *system);

size_t
papplSystemGetMaxLogSize(pappl_system_t *system);

char *
papplSystemGetName(pappl_system_t *system, char *buffer, size_t bufsize);

int
papplSystemGetNextPrinterID(pappl_system_t *system);

pappl_soptions_t
papplSystemGetOptions(pappl_system_t *system);

char *
papplSystemGetOrganization(pappl_system_t *system, char *buffer, size_t bufsize);

char *
papplSystemGetOrganizationalUnit(pappl_system_t *system, char *buffer, size_t bufsize);

char *
papplSystemGetPassword(pappl_system_t *system, char *buffer, size_t bufsize);

int
papplSystemGetPort(pappl_system_t *system);

const char *
papplSystemGetServerHeader(pappl_system_t *system);

char *
papplSystemGetSessionKey(pappl_system_t *system, char *buffer, size_t bufsize);

bool
papplSystemGetTLSOnly(pappl_system_t *system);

const char *
papplSystemGetUUID(pappl_system_t *system);

int
papplSystemGetVersions(pappl_system_t *system, int max_versions, pappl_version_t *versions);

char *
papplSystemHashPassword(pappl_system_t *system, const char *salt, const char *password, char *buffer, size_t bufsize);

bool
papplSystemIsRunning(pappl_system_t *system);

bool
papplSystemIsShutdown(pappl_system_t *system);

void
papplSystemIteratePrinters(pappl_system_t *system, pappl_printer_cb_t cb, void *data);

bool
papplSystemLoadState(pappl_system_t *system, const char *filename);

const char *
papplSystemMatchDriver(pappl_system_t *system, const char *device_id);

void
papplSystemRemoveResource(pappl_system_t *system, const char *path);

void
papplSystemRun(pappl_system_t *system);

bool
papplSystemSaveState(pappl_system_t *system, const char *filename);

void
papplSystemSetAdminGroup(pappl_system_t *system, const char *value);

void
papplSystemSetContact(pappl_system_t *system, pappl_contact_t *contact);

void
papplSystemSetDefaultPrinterID(pappl_system_t *system, int default_printer_id);

void
papplSystemSetDefaultPrintGroup(pappl_system_t *system, const char *value);

void
papplSystemSetDrivers(pappl_system_t *system, int num_drivers, pappl_driver_t *drivers, pappl_driver_cb_t cb, void *data);

void
papplSystemSetDNSSDName(pappl_system_t *system, const char *value);

void
papplSystemSetFooterHTML(pappl_system_t *system, const char *html);

void
papplSystemSetGeoLocation(pappl_system_t *system, const char *value);

void
papplSystemSetHostname(pappl_system_t *system, const char *value);

void
papplSystemSetLocation(pappl_system_t *system, const char *value);

void
papplSystemSetLogLevel(pappl_system_t *system, pappl_loglevel_t loglevel);

void
papplSystemSetMaxLogSize(pappl_system_t *system, size_t maxSize);

void
papplSystemSetMIMECallback(pappl_system_t *system, pappl_mime_cb_t cb, void *data);

void
papplSystemSetNextPrinterID(pappl_system_t *system, int next_printer_id);

void
papplSystemSetOperationCallback(pappl_system_t *system, pappl_ipp_op_cb_t cb, void *data);

void
papplSystemSetOrganization(pappl_system_t *system, const char *value);

void
papplSystemSetOrganizationalUnit(pappl_system_t *system, const char *value);

void
papplSystemSetPassword(pappl_system_t *system, const char *hash);

void
papplSystemSetSaveCallback(pappl_system_t *system, pappl_save_cb_t cb, void *data);

void
papplSystemSetUUID(pappl_system_t *system, const char *value);

void
papplSystemSetVersions(pappl_system_t *system, int num_versions, pappl_version_t *versions);

void
papplSystemShutdown(pappl_system_t *system);

DESCRIPTION
The PAPPL system functions provide access to the system object. System are created and deleted by the printer application while the life cycle of the pappl_system_t object is managed automatically for the printer application. The papplSystemCreate function creates a new system while the papplSystemDelete function deletes a system.

The papplSystemRun function starts a system while the papplSystemShutdown function stops a running system.

The papplSystemGet functions get the current values associated with a system while the papplSystemSet functions set the current values associated with a system.