From d825017aa0d372b0c72e777b7fd7b4e61a2f544e Mon Sep 17 00:00:00 2001 From: Michael Sweet Date: Tue, 12 Apr 2016 07:00:21 -0400 Subject: [PATCH] Drop API help for CGI, MIME, and PPD compiler libraries. Don't uninstall public headers, these are all now private headers. --- Makefile | 6 +- cgi-bin/Makefile | 30 +- cgi-bin/api-cgi.header | 34 - cgi-bin/api-cgi.shtml | 17 - doc/Makefile | 5 +- doc/help/api-cgi.html | 1138 ------------------- doc/help/api-mime.html | 841 -------------- doc/help/api-ppdc.html | 2208 ------------------------------------- ppdc/Makefile | 29 +- ppdc/api-ppdc.header | 32 - ppdc/api-ppdc.shtml | 16 - scheduler/Makefile | 28 +- scheduler/api-mime.header | 32 - scheduler/api-mime.shtml | 15 - 14 files changed, 17 insertions(+), 4414 deletions(-) delete mode 100644 cgi-bin/api-cgi.header delete mode 100644 cgi-bin/api-cgi.shtml delete mode 100644 doc/help/api-cgi.html delete mode 100644 doc/help/api-mime.html delete mode 100644 doc/help/api-ppdc.html delete mode 100644 ppdc/api-ppdc.header delete mode 100644 ppdc/api-ppdc.shtml delete mode 100644 scheduler/api-mime.header delete mode 100644 scheduler/api-mime.shtml diff --git a/Makefile b/Makefile index bac8ac092..1bc05d4f6 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # # Top-level Makefile for CUPS. # -# Copyright 2007-2014 by Apple Inc. +# Copyright 2007-2016 by Apple Inc. # Copyright 1997-2007 by Easy Software Products, all rights reserved. # # These coded instructions, statements, and computer programs are the @@ -266,13 +266,13 @@ debugcheck: all unittests # apihelp: - for dir in cgi-bin cups filter ppdc scheduler; do\ + for dir in cups filter; do\ echo Generating API help in $$dir... ;\ (cd $$dir; $(MAKE) $(MFLAGS) apihelp) || exit 1;\ done framedhelp: - for dir in cgi-bin cups filter ppdc scheduler; do\ + for dir in cups filter; do\ echo Generating framed API help in $$dir... ;\ (cd $$dir; $(MAKE) $(MFLAGS) framedhelp) || exit 1;\ done diff --git a/cgi-bin/Makefile b/cgi-bin/Makefile index 1ebef2ed7..6bc1dbaeb 100644 --- a/cgi-bin/Makefile +++ b/cgi-bin/Makefile @@ -179,31 +179,11 @@ uninstall: $(RM) $(LIBDIR)/libcupscgi.so $(RM) $(LIBDIR)/libcupscgi.so.1 -$(RMDIR) $(LIBDIR) - $(RM) $(INCLUDEDIR)/cups/cgi.h - $(RM) $(INCLUDEDIR)/cups/help-index.h - -$(RMDIR) $(INCLUDEDIR)/cups - - -# -# Automatic API help files... -# - -apihelp: - mxmldoc --section "Programming" \ - --title "CGI API" \ - --css ../doc/cups-printable.css \ - --header api-cgi.header --intro api-cgi.shtml \ - cgi.h help-index.h $(LIBOBJS:.o=.c) >../doc/help/api-cgi.html - mxmldoc --tokens help/api-cgi.html api-cgi.xml >../doc/help/api-cgi.tokens - $(RM) api-cgi.xml - -framedhelp: - mxmldoc --framed api-cgi \ - --section "Programming" \ - --title "CGI API" \ - --css ../doc/cups-printable.css \ - --header api-cgi.header --intro api-cgi.shtml \ - cgi.h help-index.h $(LIBOBJS:.o=.c) + -if test "x$(privateinclude)" != x; then \ + $(RM) $(PRIVATEINCLUDE)/cgi.h; \ + $(RM) $(PRIVATEINCLUDE)/help-index.h; \ + $(RMDIR) $(PRIVATEINCLUDE); \ + fi # diff --git a/cgi-bin/api-cgi.header b/cgi-bin/api-cgi.header deleted file mode 100644 index e3355a6b9..000000000 --- a/cgi-bin/api-cgi.header +++ /dev/null @@ -1,34 +0,0 @@ - - -

CGI API

- -
- - - - - - - - - - - - - - - - -
Headercups/cgi.h
Library-lcupscgi
See AlsoProgramming: Introduction to CUPS Programming
diff --git a/cgi-bin/api-cgi.shtml b/cgi-bin/api-cgi.shtml deleted file mode 100644 index cf0413a5e..000000000 --- a/cgi-bin/api-cgi.shtml +++ /dev/null @@ -1,17 +0,0 @@ - - -

Overview

- -

The CGI API provides Common Gateway Interface functions for CUPS.

diff --git a/doc/Makefile b/doc/Makefile index df3f2f7a0..cccb68a3f 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,7 +1,7 @@ # # Documentation makefile for CUPS. # -# Copyright 2007-2014 by Apple Inc. +# Copyright 2007-2016 by Apple Inc. # Copyright 1997-2007 by Easy Software Products. # # These coded instructions, statements, and computer programs are the @@ -45,15 +45,12 @@ HELPIMAGES = \ HELPFILES = \ help/accounting.html \ help/api-array.html \ - help/api-cgi.html \ help/api-cups.html \ help/api-filedir.html \ help/api-filter.html \ help/api-httpipp.html \ - help/api-mime.html \ help/api-overview.html \ help/api-ppd.html \ - help/api-ppdc.html \ help/api-raster.html \ help/cgi.html \ help/glossary.html \ diff --git a/doc/help/api-cgi.html b/doc/help/api-cgi.html deleted file mode 100644 index 63eb9ca6d..000000000 --- a/doc/help/api-cgi.html +++ /dev/null @@ -1,1138 +0,0 @@ - - - - - CGI API - - - - - - -
- - -

CGI API

- -
- - - - - - - - - - - - - - - - -
Headercups/cgi.h
Library-lcupscgi
See AlsoProgramming: Introduction to CUPS Programming
-

Contents

- - - -

Overview

- -

The CGI API provides Common Gateway Interface functions for CUPS.

-

Functions

-

cgiCheckVariables

-

Check for the presence of "required" variables.

-

-int cgiCheckVariables (
-    const char *names
-);

-

Parameters

-
-
names
-
Variables to look for
-
-

Return Value

-

1 if all variables present, 0 otherwise

-

Discussion

-

Names may be separated by spaces and/or commas.

-

cgiClearVariables

-

Clear all form variables.

-

-void cgiClearVariables (void);

-

cgiCompileSearch

-

Compile a search string.

-

-void *cgiCompileSearch (
-    const char *query
-);

-

Parameters

-
-
query
-
Query string
-
-

Return Value

-

Search context

-

cgiCopyTemplateFile

-

Copy a template file and replace all the -'{variable}' strings with the variable value.

-

-void cgiCopyTemplateFile (
-    FILE *out,
-    const char *tmpl
-);

-

Parameters

-
-
out
-
Output file
-
tmpl
-
Template file to read
-
-

cgiCopyTemplateLang

-

Copy a template file using a language...

-

-void cgiCopyTemplateLang (
-    const char *tmpl
-);

-

Parameters

-
-
tmpl
-
Base filename
-
-

cgiDoSearch

-

Do a search of some text.

-

-int cgiDoSearch (
-    void *search,
-    const char *text
-);

-

Parameters

-
-
search
-
Search context
-
text
-
Text to search
-
-

Return Value

-

Number of matches

-

cgiEndHTML

-

End a HTML page.

-

-void cgiEndHTML (void);

-

cgiEndMultipart

-

End the delivery of a multipart web page.

-

-void cgiEndMultipart (void);

-

cgiFormEncode

-

Encode a string as a form variable.

-

-char *cgiFormEncode (
-    char *dst,
-    const char *src,
-    size_t dstsize
-);

-

Parameters

-
-
dst
-
Destination string
-
src
-
Source string
-
dstsize
-
Size of destination string
-
-

Return Value

-

Destination string

-

cgiFreeSearch

-

Free a compiled search context.

-

-void cgiFreeSearch (
-    void *search
-);

-

Parameters

-
-
search
-
Search context
-
-

cgiGetArray

-

Get an element from a form array.

-

-const char *cgiGetArray (
-    const char *name,
-    int element
-);

-

Parameters

-
-
name
-
Name of array variable
-
element
-
Element number (0 to N)
-
-

Return Value

-

Element value or NULL

-

cgiGetAttributes

-

Get the list of attributes that are needed -by the template file.

-

-void cgiGetAttributes (
-    ipp_t *request,
-    const char *tmpl
-);

-

Parameters

-
-
request
-
IPP request
-
tmpl
-
Base filename
-
-

cgiGetCookie

-

Get a cookie value.

-

-const char *cgiGetCookie (
-    const char *name
-);

-

Parameters

-
-
name
-
Name of cookie
-
-

Return Value

-

Value or NULL

-

cgiGetFile

-

Get the file (if any) that was submitted in the form.

-

-const cgi_file_t *cgiGetFile (void);

-

Return Value

-

Attached file or NULL

-

cgiGetIPPObjects

-

Get the objects in an IPP response.

-

-cups_array_t *cgiGetIPPObjects (
-    ipp_t *response,
-    void *search
-);

-

Parameters

-
-
response
-
IPP response
-
search
-
Search filter
-
-

Return Value

-

Array of objects

-

cgiGetSize

-

Get the size of a form array value.

-

-int cgiGetSize (
-    const char *name
-);

-

Parameters

-
-
name
-
Name of variable
-
-

Return Value

-

Number of elements

-

cgiGetTemplateDir

-

Get the templates directory...

-

-char *cgiGetTemplateDir (void);

-

Return Value

-

Template directory

-

cgiGetVariable

-

Get a CGI variable from the database.

-

-const char *cgiGetVariable (
-    const char *name
-);

-

Parameters

-
-
name
-
Name of variable
-
-

Return Value

-

Value of variable

-

Discussion

-

Returns NULL if the variable doesn't exist. If the variable is an -array of values, returns the last element.

-

cgiInitialize

-

Initialize the CGI variable "database".

-

-int cgiInitialize (void);

-

Return Value

-

Non-zero if there was form data

-

cgiIsPOST

-

Determine whether this page was POSTed.

-

-int cgiIsPOST (void);

-

Return Value

-

1 if POST, 0 if GET

-

cgiMoveJobs

-

Move one or more jobs.

-

-void cgiMoveJobs (
-    http_t *http,
-    const char *dest,
-    int job_id
-);

-

Parameters

-
-
http
-
Connection to server
-
dest
-
Destination or NULL
-
job_id
-
Job ID or 0 for all
-
-

Discussion

-

At least one of dest or job_id must be non-zero/NULL.

-

cgiPrintCommand

-

Print a CUPS command job.

-

-void cgiPrintCommand (
-    http_t *http,
-    const char *dest,
-    const char *command,
-    const char *title
-);

-

Parameters

-
-
http
-
Connection to server
-
dest
-
Destination printer
-
command
-
Command to send
-
title
-
Page/job title
-
-

cgiPrintTestPage

-

Print a test page.

-

-void cgiPrintTestPage (
-    http_t *http,
-    const char *dest
-);

-

Parameters

-
-
http
-
Connection to server
-
dest
-
Destination printer/class
-
-

cgiRewriteURL

-

Rewrite a printer URI into a web browser URL...

-

-char *cgiRewriteURL (
-    const char *uri,
-    char *url,
-    int urlsize,
-    const char *newresource
-);

-

Parameters

-
-
uri
-
Current URI
-
url
-
New URL
-
urlsize
-
Size of URL buffer
-
newresource
-
Replacement resource
-
-

Return Value

-

New URL

-

cgiSetArray

-

Set array element N to the specified string.

-

-void cgiSetArray (
-    const char *name,
-    int element,
-    const char *value
-);

-

Parameters

-
-
name
-
Name of variable
-
element
-
Element number (0 to N)
-
value
-
Value of variable
-
-

Discussion

-

If the variable array is smaller than (element + 1), the intervening -elements are set to NULL.

-

cgiSetCookie

-

Set a cookie value.

-

-void cgiSetCookie (
-    const char *name,
-    const char *value,
-    const char *path,
-    const char *domain,
-    time_t expires,
-    int secure
-);

-

Parameters

-
-
name
-
Name
-
value
-
Value
-
path
-
Path (typically "/")
-
domain
-
Domain name
-
expires
-
Expiration date (0 for session)
-
secure
-
Require SSL
-
-

cgiSetIPPObjectVars

-

Set CGI variables from an IPP object.

-

-ipp_attribute_t *cgiSetIPPObjectVars (
-    ipp_attribute_t *obj,
-    const char *prefix,
-    int element
-);

-

Parameters

-
-
obj
-
Response data to be copied...
-
prefix
-
Prefix for name or NULL
-
element
-
Parent element number
-
-

Return Value

-

Next object

-

cgiSetIPPVars

-

Set CGI variables from an IPP response.

-

-int cgiSetIPPVars (
-    ipp_t *response,
-    const char *filter_name,
-    const char *filter_value,
-    const char *prefix,
-    int parent_el
-);

-

Parameters

-
-
response
-
Response data to be copied...
-
filter_name
-
Filter name
-
filter_value
-
Filter value
-
prefix
-
Prefix for name or NULL
-
parent_el
-
Parent element number
-
-

Return Value

-

Maximum number of elements

-

cgiSetServerVersion

-

Set the server name and CUPS version...

-

-void cgiSetServerVersion (void);

-

cgiSetSize

-

Set the array size.

-

-void cgiSetSize (
-    const char *name,
-    int size
-);

-

Parameters

-
-
name
-
Name of variable
-
size
-
Number of elements (0 to N)
-
-

cgiSetVariable

-

Set a CGI variable in the database.

-

-void cgiSetVariable (
-    const char *name,
-    const char *value
-);

-

Parameters

-
-
name
-
Name of variable
-
value
-
Value of variable
-
-

Discussion

-

If the variable is an array, this truncates the array to a single element.

-

cgiShowIPPError

-

Show the last IPP error message.

-

-void cgiShowIPPError (
-    const char *message
-);

-

Parameters

-
-
message
-
Contextual message
-
-

Discussion

-

The caller must still call cgiStartHTML() and cgiEndHTML().

-

cgiShowJobs

-

Show print jobs.

-

-void cgiShowJobs (
-    http_t *http,
-    const char *dest
-);

-

Parameters

-
-
http
-
Connection to server
-
dest
-
Destination name or NULL
-
-

cgiStartHTML

-

Start a HTML page.

-

-void cgiStartHTML (
-    const char *title
-);

-

Parameters

-
-
title
-
Title of page
-
-

cgiStartMultipart

-

Start a multipart delivery of a web page.

-

-void cgiStartMultipart (void);

-

cgiSupportsMultipart

-

Does the browser support multi-part documents?

-

-int cgiSupportsMultipart (void);

-

Return Value

-

1 if multi-part supported, 0 otherwise

-

cgiText

-

Return localized text.

-

-const char *cgiText (
-    const char *message
-);

-

Parameters

-
-
message
-
Message
-
-

Return Value

-

Localized message

-

helpDeleteIndex

-

Delete an index, freeing all memory used.

-

-void helpDeleteIndex (
-    help_index_t *hi
-);

-

Parameters

-
-
hi
-
Help index
-
-

helpFindNode

-

Find a node in an index.

-

-help_node_t *helpFindNode (
-    help_index_t *hi,
-    const char *filename,
-    const char *anchor
-);

-

Parameters

-
-
hi
-
Index
-
filename
-
Filename
-
anchor
-
Anchor
-
-

Return Value

-

Node pointer or NULL

-

helpLoadIndex

-

Load a help index from disk.

-

-help_index_t *helpLoadIndex (
-    const char *hifile,
-    const char *directory
-);

-

Parameters

-
-
hifile
-
Index filename
-
directory
-
Directory that is indexed
-
-

Return Value

-

Index pointer or NULL

-

helpSaveIndex

-

Save a help index to disk.

-

-int helpSaveIndex (
-    help_index_t *hi,
-    const char *hifile
-);

-

Parameters

-
-
hi
-
Index
-
hifile
-
Index filename
-
-

Return Value

-

0 on success, -1 on error

-

helpSearchIndex

-

Search an index.

-

-help_index_t *helpSearchIndex (
-    help_index_t *hi,
-    const char *query,
-    const char *section,
-    const char *filename
-);

-

Parameters

-
-
hi
-
Index
-
query
-
Query string
-
section
-
Limit search to this section
-
filename
-
Limit search to this file
-
-

Return Value

-

Search index

-

Data Types

-

cgi_file_t

-

Uploaded file data

-

-typedef struct cgi_file_s cgi_file_t; -

-

help_index_t

-

Help index structure

-

-typedef struct help_index_s help_index_t; -

-

help_node_t

-

Help node structure...

-

-typedef struct help_node_s help_node_t; -

-

help_word_t

-

Help word structure...

-

-typedef struct help_word_s help_word_t; -

-

Structures

-

cgi_file_s

-

Uploaded file data

-

struct cgi_file_s {
-    size_t filesize;
-    char tempfile[1024], *name, *filename, *mimetype;
-};

-

Members

-
-
filesize
-
Size of uploaded file
-
mimetype
-
MIME media type
-
-

help_index_s

-

Help index structure

-

struct help_index_s {
-    cups_array_t *nodes;
-    int search;
-    cups_array_t *sorted;
-};

-

Members

-
-
nodes
-
Nodes sorted by filename
-
search
-
1 = search index, 0 = normal
-
sorted
-
Nodes sorted by score + text
-
-

help_node_s

-

Help node structure...

-

struct help_node_s {
-    char *anchor;
-    char *filename;
-    size_t length;
-    time_t mtime;
-    off_t offset;
-    int score;
-    char *section;
-    char *text;
-    cups_array_t *words;
-};

-

Members

-
-
anchor
-
Anchor name (NULL if none)
-
filename
-
Filename, relative to help dir
-
length
-
Length in bytes
-
mtime
-
Last modification time
-
offset
-
Offset in file
-
score
-
Search score
-
section
-
Section name (NULL if none)
-
text
-
Text in anchor
-
words
-
Words after this node
-
-

help_word_s

-

Help word structure...

-

struct help_word_s {
-    int count;
-    char *text;
-};

-

Members

-
-
count
-
Number of occurrences
-
text
-
Word text
-
-
- - diff --git a/doc/help/api-mime.html b/doc/help/api-mime.html deleted file mode 100644 index ecfbcfde2..000000000 --- a/doc/help/api-mime.html +++ /dev/null @@ -1,841 +0,0 @@ - - - - - MIME API - - - - - - -
- - -

MIME API

- -
- - - - - - - - - - - - - - - - -
Headercups/mime.h
Library-lcupsmime
See AlsoProgramming: Introduction to CUPS Programming
-

Contents

- - - -

Overview

- -

The MIME API provides file typing and conversion services for CUPS.

-

Functions

-

mimeAddFilter

-

Add a filter to the current MIME database.

-

-mime_filter_t *mimeAddFilter (
-    mime_t *mime,
-    mime_type_t *src,
-    mime_type_t *dst,
-    int cost,
-    const char *filter
-);

-

Parameters

-
-
mime
-
MIME database
-
src
-
Source type
-
dst
-
Destination type
-
cost
-
Relative time/resource cost
-
filter
-
Filter program to run
-
-

Return Value

-

New filter

-

mimeAddType

-

Add a MIME type to a database.

-

-mime_type_t *mimeAddType (
-    mime_t *mime,
-    const char *super,
-    const char *type
-);

-

Parameters

-
-
mime
-
MIME database
-
super
-
Super-type name
-
type
-
Type name
-
-

Return Value

-

New (or existing) MIME type

-

mimeAddTypeRule

-

Add a detection rule for a file type.

-

-int mimeAddTypeRule (
-    mime_type_t *mt,
-    const char *rule
-);

-

Parameters

-
-
mt
-
Type to add to
-
rule
-
Rule to add
-
-

Return Value

-

0 on success, -1 on failure

-

mimeDelete

-

Delete (free) a MIME database.

-

-void mimeDelete (
-    mime_t *mime
-);

-

Parameters

-
-
mime
-
MIME database
-
-

mimeDeleteFilter

-

Delete a filter from the MIME database.

-

-void mimeDeleteFilter (
-    mime_t *mime,
-    mime_filter_t *filter
-);

-

Parameters

-
-
mime
-
MIME database
-
filter
-
Filter
-
-

mimeDeleteType

-

Delete a type from the MIME database.

-

-void mimeDeleteType (
-    mime_t *mime,
-    mime_type_t *mt
-);

-

Parameters

-
-
mime
-
MIME database
-
mt
-
Type
-
-

mimeFileType

-

Determine the type of a file.

-

-mime_type_t *mimeFileType (
-    mime_t *mime,
-    const char *pathname,
-    const char *filename,
-    int *compression
-);

-

Parameters

-
-
mime
-
MIME database
-
pathname
-
Name of file to check on disk
-
filename
-
Original filename or NULL
-
compression
-
Is the file compressed?
-
-

Return Value

-

Type of file

-

mimeFilter

-

Find the fastest way to convert from one type to another.

-

-cups_array_t *mimeFilter (
-    mime_t *mime,
-    mime_type_t *src,
-    mime_type_t *dst,
-    int *cost
-);

-

Parameters

-
-
mime
-
MIME database
-
src
-
Source file type
-
dst
-
Destination file type
-
cost
-
Cost of filters
-
-

Return Value

-

Array of filters to run

-

mimeFilter2

-

Find the fastest way to convert from one type to another, -including file size.

-

-cups_array_t *mimeFilter2 (
-    mime_t *mime,
-    mime_type_t *src,
-    size_t srcsize,
-    mime_type_t *dst,
-    int *cost
-);

-

Parameters

-
-
mime
-
MIME database
-
src
-
Source file type
-
srcsize
-
Size of source file
-
dst
-
Destination file type
-
cost
-
Cost of filters
-
-

Return Value

-

Array of filters to run

-

mimeFilterLookup

-

Lookup a filter.

-

-mime_filter_t *mimeFilterLookup (
-    mime_t *mime,
-    mime_type_t *src,
-    mime_type_t *dst
-);

-

Parameters

-
-
mime
-
MIME database
-
src
-
Source type
-
dst
-
Destination type
-
-

Return Value

-

Filter for src->dst

-

mimeFirstFilter

-

Get the first filter in the MIME database.

-

-mime_filter_t *mimeFirstFilter (
-    mime_t *mime
-);

-

Parameters

-
-
mime
-
MIME database
-
-

Return Value

-

Filter or NULL

-

mimeFirstType

-

Get the first type in the MIME database.

-

-mime_type_t *mimeFirstType (
-    mime_t *mime
-);

-

Parameters

-
-
mime
-
MIME database
-
-

Return Value

-

Type or NULL

-

mimeLoad

-

Create a new MIME database from disk.

-

-mime_t *mimeLoad (
-    const char *pathname,
-    const char *filterpath
-);

-

Parameters

-
-
pathname
-
Directory to load
-
filterpath
-
Directory to load
-
-

Return Value

-

New MIME database

-

Discussion

-

This function uses mimeLoadFilters and mimeLoadTypes to -create a MIME database from a single directory.

-

mimeLoadFilters

-

Load filter definitions from disk.

-

-mime_t *mimeLoadFilters (
-    mime_t *mime,
-    const char *pathname,
-    const char *filterpath
-);

-

Parameters

-
-
mime
-
MIME database
-
pathname
-
Directory to load from
-
filterpath
-
Default filter program directory
-
-

Return Value

-

MIME database

-

Discussion

-

This function loads all of the .convs files from the specified directory. -Use mimeLoadTypes to load all types before you load the filters.

-

mimeLoadTypes

-

Load type definitions from disk.

-

-mime_t *mimeLoadTypes (
-    mime_t *mime,
-    const char *pathname
-);

-

Parameters

-
-
mime
-
MIME database or NULL to create a new one
-
pathname
-
Directory to load from
-
-

Return Value

-

MIME database

-

Discussion

-

This function loads all of the .types files from the specified directory. -Use mimeLoadFilters to load all filters after you load the types.

-

mimeNew

-

Create a new, empty MIME database.

-

-mime_t *mimeNew (void);

-

Return Value

-

MIME database

-

mimeNextFilter

-

Get the next filter in the MIME database.

-

-mime_filter_t *mimeNextFilter (
-    mime_t *mime
-);

-

Parameters

-
-
mime
-
MIME database
-
-

Return Value

-

Filter or NULL

-

mimeNextType

-

Get the next type in the MIME database.

-

-mime_type_t *mimeNextType (
-    mime_t *mime
-);

-

Parameters

-
-
mime
-
MIME database
-
-

Return Value

-

Type or NULL

-

mimeNumFilters

-

Next type

-

-int mimeNumFilters (
-    mime_t *mime
-);

-

Parameters

-
-
mime
-
MIME database
-
-

Return Value

-

Get the number of filters in a MIME database.

-

mimeNumTypes

-

MIME database

-

-int mimeNumTypes (
-    mime_t *mime
-);

-

Parameters

-
-
mime
-
MIME database
-
-

Return Value

-

Get the number of types in a MIME database.

-

mimeSetErrorCallback

-

Set the callback for error messages.

-

-void mimeSetErrorCallback (
-    mime_t *mime,
-    mime_error_cb_t cb,
-    void *ctx
-);

-

Parameters

-
-
mime
-
MIME database
-
cb
-
Callback function
-
ctx
-
Context pointer for callback
-
-

mimeType

-

Lookup a file type.

-

-mime_type_t *mimeType (
-    mime_t *mime,
-    const char *super,
-    const char *type
-);

-

Parameters

-
-
mime
-
MIME database
-
super
-
Super-type name
-
type
-
Type name
-
-

Return Value

-

Matching file type definition

-

Data Types

-

const

-

MIME Database

-

-typedef void (*constmime_error_cb_t)(void *; -

-

mime_filter_t

-

MIME Conversion Filter Data

-

-typedef struct _mime_filter_s mime_filter_t; -

-

mime_magic_t

-

MIME Magic Data

-

-typedef struct _mime_magic_s mime_magic_t; -

-

mime_op_t

-

Types/structures...

-

-typedef enum mime_op_t; -

-

mime_t

-

MIME Database

-

-typedef struct _mime_s mime_t; -

-

mime_type_t

-

MIME Type Data

-

-typedef struct _mime_type_s mime_type_t; -

-
- - diff --git a/doc/help/api-ppdc.html b/doc/help/api-ppdc.html deleted file mode 100644 index bfdf099a7..000000000 --- a/doc/help/api-ppdc.html +++ /dev/null @@ -1,2208 +0,0 @@ - - - - - PPD Compiler API - - - - - - -
- - -

PPD Compiler API

- -
- - - - - - - - - - - - - - - - -
Headercups/ppdc.h
Library-lcupsppdc
See AlsoProgramming: Introduction to CUPS Programming
-

Contents

- - - -

Overview

- -

The PPD Compiler API provides access to CUPS driver information files and -methods for generating and importing PPD files.

-

Classes

-

ppdcArray

-

// Shared Array

-

class ppdcArray : public ppdcShared {
-  public:
-    int count, alloc, current;
-    ppdcShared **data;
-};

-

Members

-
-
current
-
Current element
-
data
-
Elements
-
-

PPDC_NAME

-

-

-void PPDC_NAME (
-    void add(ppdcShared *d
-);

-
Parameters
-
-
d
-
-

add

-

-

-void add (
-    ppdcShared *d
-);

-
Parameters
-
-
d
-
-

first

-

Return the first element in the array.

-

-ppdcShared *first (void);

-
Return Value
-

-

next

-

Return the next element in the array.

-

-ppdcShared *next (void);

-
Return Value
-

-

ppdcArray

-

-

-void ppdcArray (
-    ppdcArray *a
-);

-
Parameters
-
-
a
-
-

remove

-

-

-void remove (
-    ppdcShared *d
-);

-
Parameters
-
-
d
-
Data element
-
-

~ppdcArray

-

-

-void ~ppdcArray (void);

-

ppdcAttr

-

// Attribute

-

class ppdcAttr : public ppdcShared {
-  public:
-    bool localizable;
-    ppdcString *name, *selector, *text, *value;
-};

-

Members

-
-
localizable
-
Should this attribute be localized?
-
value
-
Value string
-
-

ppdcAttr

-

-

-void ppdcAttr (
-    const char *n,
-    const char *s,
-    const char *t,
-    const char *v,
-    bool loc
-);

-
Parameters
-
-
n
-
Name
-
s
-
Spec string
-
t
-
Human-readable text
-
v
-
Value
-
loc
-
Localize this attribute?
-
-

~ppdcAttr

-

-

-void ~ppdcAttr (void);

-

ppdcCatalog

-

// Translation catalog

-

class ppdcCatalog : public ppdcShared {
-  public:
-    ppdcString *filename;
-    ppdcString *locale;
-    ppdcArray *messages;
-};

-

Members

-
-
filename
-
Name of translation file
-
locale
-
Name of locale
-
messages
-
Array of translation messages
-
-

PPDC_NAME

-

-

-void PPDC_NAME (
-    void add_message(const char *id,
-    const char *string = NULL
-);

-
Parameters
-
-
id
-
string
-
-

add_message

-

-

-void add_message (
-    const char *id,
-    const char *string
-);

-
Parameters
-
-
id
-
Message ID to add
-
string
-
Translation string
-
-

find_message

-

-

-const char *find_message (
-    const char *id
-);

-
Parameters
-
-
id
-
Message ID
-
-
Return Value
-

Message text

-

load_messages

-

-

-int load_messages (
-    const char *f
-);

-
Parameters
-
-
f
-
Message catalog file
-
-
Return Value
-

0 on success, -1 on failure

-

ppdcCatalog

-

-

-void ppdcCatalog (
-    const char *l,
-    const char *f
-);

-
Parameters
-
-
l
-
Locale
-
f
-
Message catalog file
-
-

save_messages

-

-

-int save_messages (
-    const char *f
-);

-
Parameters
-
-
f
-
File to save to
-
-
Return Value
-

0 on success, -1 on error

-

~ppdcCatalog

-

-

-void ~ppdcCatalog (void);

-

ppdcChoice

-

// Option Choice

-

class ppdcChoice : public ppdcShared {
-  public:
-    ppdcString *name, *text, *code;
-};

-

Members

-
-
code
-
PS code of choice
-
-

ppdcChoice

-

-

-void ppdcChoice (
-    const char *n,
-    const char *t,
-    const char *c
-);

-
Parameters
-
-
n
-
Name of choice
-
t
-
Text of choice
-
c
-
Code of choice
-
-

~ppdcChoice

-

-

-void ~ppdcChoice (void);

-

ppdcConstraint

-

// Constraint

-

class ppdcConstraint : public ppdcShared {
-  public:
-    ppdcString *option1, *choice1, *option2, *choice2;
-};

-

Members

-
-
choice2
-
Second choice
-
-

ppdcConstraint

-

-

-void ppdcConstraint (
-    const char *o1,
-    const char *c1,
-    const char *o2,
-    const char *c2
-);

-
Parameters
-
-
o1
-
First option
-
c1
-
First choice
-
o2
-
Second option
-
c2
-
Second choice
-
-

~ppdcConstraint

-

-

-void ~ppdcConstraint (void);

-

ppdcDriver

-

// Printer Driver Data

-

class ppdcDriver : public ppdcShared {
-  public:
-    ppdcArray *copyright;
-    ppdcString *custom_size_code;
-    ppdcString *default_font, *default_size;
-    float left_margin, bottom_margin, right_margin, top_margin, max_width, max_length, min_width, min_length;
-    ppdcArray *attrs, *constraints, *filters, *fonts, *groups, *profiles, *sizes;
-    int model_number, manual_copies, color_device, throughput;
-    ppdcDrvType type;
-    int variable_paper_size;
-    ppdcString *manufacturer, *model_name, *file_name, *pc_file_name, *version;
-};

-

Members

-
-
copyright
-
Copyright strings
-
custom_size_code
-
Custom page size code, if any
-
default_size
-
Default size option
-
min_length
-
Minimum length (points)
-
sizes
-
Fixed sizes
-
throughput
-
Throughput in pages per minute
-
type
-
Driver type
-
variable_paper_size
-
Support variable sizes?
-
version
-
Version number
-
-

PPDC_NAME

-

-

-void PPDC_NAME (
-    void add_attr(ppdcAttr *a
-);

-
Parameters
-
-
a
-
-

add_constraint

-

-

-void add_constraint (
-    ppdcConstraint *c
-);

-
Parameters
-
-
c
-
-

add_copyright

-

-

-void add_copyright (
-    const char *c
-);

-
Parameters
-
-
c
-
-

add_filter

-

-

-void add_filter (
-    ppdcFilter *f
-);

-
Parameters
-
-
f
-
-

add_font

-

-

-void add_font (
-    ppdcFont *f
-);

-
Parameters
-
-
f
-
-

add_group

-

-

-void add_group (
-    ppdcGroup *g
-);

-
Parameters
-
-
g
-
-

add_profile

-

-

-void add_profile (
-    ppdcProfile *p
-);

-
Parameters
-
-
p
-
-

add_size

-

-

-void add_size (
-    ppdcMediaSize *m
-);

-
Parameters
-
-
m
-
-

find_attr

-

-

-ppdcAttr *find_attr (
-    const char *k,
-    const char *s
-);

-
Parameters
-
-
k
-
Keyword string
-
s
-
Spec string
-
-
Return Value
-

Attribute or NULL

-

find_group

-

-

-ppdcGroup *find_group (
-    const char *n
-);

-
Parameters
-
-
n
-
Group name
-
-
Return Value
-

Matching group or NULL

-

find_option

-

-

-ppdcOption *find_option (
-    const char *n
-);

-
Parameters
-
-
n
-
Option name
-
-
Return Value
-

Matching option or NULL

-

find_option_group

-

-

-ppdcOption *find_option_group (
-    const char *n,
-    ppdcGroup **mg
-);

-
Parameters
-
-
n
-
Option name
-
mg
-
Matching group or NULL
-
-
Return Value
-

Matching option or NULL

-

ppdcDriver

-

-

-void ppdcDriver (
-    ppdcDriver *d
-);

-
Parameters
-
-
d
-
Printer driver template
-
-

set_custom_size_code

-

-

-void set_custom_size_code (
-    const char *c
-);

-
Parameters
-
-
c
-
CustomPageSize code
-
-

set_default_font

-

-

-void set_default_font (
-    ppdcFont *f
-);

-
Parameters
-
-
f
-
Font
-
-

set_default_size

-

-

-void set_default_size (
-    ppdcMediaSize *m
-);

-
Parameters
-
-
m
-
Media size
-
-

set_file_name

-

-

-void set_file_name (
-    const char *f
-);

-
Parameters
-
-
f
-
Filename
-
-

set_manufacturer

-

-

-void set_manufacturer (
-    const char *m
-);

-
Parameters
-
-
m
-
Model name
-
-

set_model_name

-

-

-void set_model_name (
-    const char *m
-);

-
Parameters
-
-
m
-
Model name
-
-

set_pc_file_name

-

-

-void set_pc_file_name (
-    const char *f
-);

-
Parameters
-
-
f
-
Filename
-
-

set_version

-

-

-void set_version (
-    const char *v
-);

-
Parameters
-
-
v
-
Version
-
-

write_ppd_file

-

-

-int write_ppd_file (
-    cups_file_t *fp,
-    ppdcCatalog *catalog,
-    ppdcArray *locales,
-    ppdcSource *src,
-    ppdcLineEnding le
-);

-
Parameters
-
-
fp
-
PPD file
-
catalog
-
Message catalog
-
locales
-
Additional languages to add
-
src
-
Driver source
-
le
-
Line endings to use
-
-
Return Value
-

0 on success, -1 on failure

-

~ppdcDriver

-

-

-void ~ppdcDriver (void);

-

ppdcFile

-

// File

-

class ppdcFile {
-  public:
-    bool close_on_delete;
-    const char *filename;
-    cups_file_t *fp;
-    int line;
-};

-

Members

-
-
close_on_delete
-
Close file on delete?
-
filename
-
Filename
-
fp
-
File pointer
-
line
-
Line in file
-
-

get

-

Get a character from a file.

-

-int get (void);

-
Return Value
-

-

peek

-

-

-int peek (void);

-
Return Value
-

Next character in file

-

ppdcFile

-

-

-void ppdcFile (
-    const char *f,
-    cups_file_t *ffp
-);

-
Parameters
-
-
f
-
File to open
-
ffp
-
File pointer to use
-
-

~ppdcFile

-

-

-void ~ppdcFile (void);

-

ppdcFilter

-

// Filter Program

-

class ppdcFilter : public ppdcShared {
-  public:
-    int cost;
-    ppdcString *mime_type, *program;
-};

-

Members

-
-
cost
-
Relative cost of filter
-
program
-
Filter program
-
-

ppdcFilter

-

-

-void ppdcFilter (
-    const char *t,
-    const char *p,
-    int c
-);

-
Parameters
-
-
t
-
MIME type
-
p
-
Filter program
-
c
-
Relative cost
-
-

~ppdcFilter

-

-

-void ~ppdcFilter (void);

-

ppdcFont

-

// Shared Font

-

class ppdcFont : public ppdcShared {
-  public:
-    ppdcString *name, *encoding, *version, *charset;
-    ppdcFontStatus status;
-};

-

Members

-
-
charset
-
Font charset
-
status
-
Font status (ROM or Disk)
-
-

ppdcFont

-

-

-void ppdcFont (
-    const char *n,
-    const char *e,
-    const char *v,
-    const char *c,
-    ppdcFontStatus s
-);

-
Parameters
-
-
n
-
Name of font
-
e
-
Font encoding
-
v
-
Font version
-
c
-
Font charset
-
s
-
Font status
-
-

~ppdcFont

-

-

-void ~ppdcFont (void);

-

ppdcGroup

-

// Group of Options

-

class ppdcGroup : public ppdcShared {
-  public:
-    ppdcArray *options;
-    ppdcString *name, *text;
-};

-

Members

-
-
options
-
Options
-
text
-
Human-readable text of option
-
-

PPDC_NAME

-

-

-void PPDC_NAME (
-    void add_option(ppdcOption *o
-);

-
Parameters
-
-
o
-
-

find_option

-

Find an option in a group.

-

-ppdcOption *find_option (
-    const char *n
-);

-
Parameters
-
-
n
-
Name of option
-
-
Return Value
-

-

ppdcGroup

-

-

-void ppdcGroup (
-    ppdcGroup *g
-);

-
Parameters
-
-
g
-
Group template
-
-

~ppdcGroup

-

-

-void ~ppdcGroup (void);

-

ppdcInteger

-

// Shared integer

-

class ppdcInteger : public ppdcShared {
-  public:
-    int *value;
-};

-

Members

-
-
value
-
Integer value
-
-

ppdcInteger

-

Integer value

-

-void ppdcInteger (
-    int *v
-);

-
Parameters
-
-
v
-
-

ppdcMediaSize

-

// Media Size

-

class ppdcMediaSize : public ppdcShared {
-  public:
-    ppdcString *size_code, *region_code;
-    ppdcString *name, *text;
-    float width, length, left, bottom, right, top;
-};

-

Members

-
-
region_code
-
PageRegion code, if any
-
text
-
Human-readable text
-
top
-
Top limit in points
-
-

ppdcMediaSize

-

-

-void ppdcMediaSize (
-    const char *n,
-    const char *t,
-    float w,
-    float l,
-    float lm,
-    float bm,
-    float rm,
-    float tm,
-    const char *sc,
-    const char *rc
-);

-
Parameters
-
-
n
-
Name of media size
-
t
-
Text of media size
-
w
-
Width in points
-
l
-
Length in points
-
lm
-
Left margin in points
-
bm
-
Bottom margin in points
-
rm
-
Right margin in points
-
tm
-
Top margin in points
-
sc
-
PageSize code, if any
-
rc
-
PageRegion code, if any
-
-

~ppdcMediaSize

-

-

-void ~ppdcMediaSize (void);

-

ppdcMessage

-

// Translation message

-

class ppdcMessage : public ppdcShared {
-  public:
-    ppdcString *id, *string;
-};

-

Members

-
-
string
-
Translation string
-
-

ppdcMessage

-

-

-void ppdcMessage (
-    const char *i,
-    const char *s
-);

-
Parameters
-
-
i
-
ID
-
s
-
Text
-
-

~ppdcMessage

-

-

-void ~ppdcMessage (void);

-

ppdcOption

-

// Option

-

class ppdcOption : public ppdcShared {
-  public:
-    ppdcArray *choices;
-    ppdcString *defchoice;
-    float order;
-    ppdcOptSection section;
-    ppdcString *name, *text;
-    ppdcOptType type;
-};

-

Members

-
-
choices
-
Choices
-
defchoice
-
Default choice
-
order
-
Order number
-
section
-
Section for option code
-
text
-
Human-readable text of option
-
type
-
Type of option
-
-

PPDC_NAME

-

-

-void PPDC_NAME (
-    void add_choice(ppdcChoice *c
-);

-
Parameters
-
-
c
-
-

find_choice

-

-

-ppdcChoice *find_choice (
-    const char *n
-);

-
Parameters
-
-
n
-
Name of choice
-
-
Return Value
-

Choice or NULL

-

ppdcOption

-

-

-void ppdcOption (
-    ppdcOption *o
-);

-
Parameters
-
-
o
-
Template option
-
-

set_defchoice

-

-

-void set_defchoice (
-    ppdcChoice *c
-);

-
Parameters
-
-
c
-
Choice
-
-

~ppdcOption

-

-

-void ~ppdcOption (void);

-

ppdcProfile

-

// Color Profile

-

class ppdcProfile : public ppdcShared {
-  public:
-    ppdcString *resolution, *media_type;
-    float density, gamma, profile[9];
-};

-

Members

-
-
media_type
-
Media type name
-
profile[9]
-
Color profile matrix
-
-

ppdcProfile

-

-

-void ppdcProfile (
-    const char *r,
-    const char *m,
-    float d,
-    float g,
-    const float *p
-);

-
Parameters
-
-
r
-
Resolution name
-
m
-
Media type name
-
d
-
Density
-
g
-
Gamma
-
p
-
3x3 transform matrix
-
-

~ppdcProfile

-

-

-void ~ppdcProfile (void);

-

ppdcShared

-

// Shared Data Value

-

class ppdcShared {
-  private:
-    int use;
-};

-

Members

-
-
use
-
Use count (delete when 0)
-
-

class_name

-

-

-virtual const char *class_name (void);

-
Return Value
-

-

ppdcShared

-

-

-void ppdcShared (void);

-

release

-

-

-void release (void);

-

retain

-

-

-void retain (void);

-

~ppdcShared

-

-

-void ~ppdcShared (void);

-

ppdcSource

-

// Source File

-

class ppdcSource : public ppdcShared {
-  public:
-    int cond_state, *cond_current, cond_stack[101];
-    static const char *driver_types[];
-    ppdcString *filename;
-    static ppdcArray *includes;
-    ppdcArray *base_fonts, *drivers, *po_files, *sizes, *vars;
-};

-

Members

-
-
cond_stack[101]
-
#if state stack
-
driver_types[]
-
Driver types
-
filename
-
Filename
-
includes
-
Include directories
-
vars
-
Defined variables
-
-

PPDC_NAME

-

-

-void PPDC_NAME (
-    static void add_include(const char *d
-);

-
Parameters
-
-
d
-
-

add_include

-

-

-void add_include (
-    const char *d
-);

-
Parameters
-
-
d
-
Include directory
-
-

find_driver

-

-

-ppdcDriver *find_driver (
-    const char *f
-);

-
Parameters
-
-
f
-
Driver file name
-
-
Return Value
-

Driver

-

find_include

-

-

-char *find_include (
-    const char *f,
-    const char *base,
-    char *n,
-    int nlen
-);

-
Parameters
-
-
f
-
Include filename
-
base
-
Current directory
-
n
-
Path buffer
-
nlen
-
Path buffer length
-
-
Return Value
-

Found path or NULL

-

find_po

-

-

-ppdcCatalog *find_po (
-    const char *l
-);

-
Parameters
-
-
l
-
Locale name
-
-
Return Value
-

Message catalog or NULL

-

find_size

-

-

-ppdcMediaSize *find_size (
-    const char *s
-);

-
Parameters
-
-
s
-
Size name
-
-
Return Value
-

Size

-

find_variable

-

-

-ppdcVariable *find_variable (
-    const char *n
-);

-
Parameters
-
-
n
-
Variable name
-
-
Return Value
-

Variable

-

get_attr

-

-

-ppdcAttr *get_attr (
-    ppdcFile *fp,
-    bool loc
-);

-
Parameters
-
-
fp
-
File to read
-
loc
-
Localize this attribute?
-
-
Return Value
-

Attribute

-

get_boolean

-

-

-int get_boolean (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Boolean value

-

get_choice

-

-

-ppdcChoice *get_choice (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Choice data

-

get_color_model

-

-

-ppdcChoice *get_color_model (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Choice data

-

get_color_order

-

-

-int get_color_order (
-    const char *co
-);

-
Parameters
-
-
co
-
Color order string
-
-
Return Value
-

Color order value

-

get_color_profile

-

-

-ppdcProfile *get_color_profile (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Color profile

-

get_color_space

-

-

-int get_color_space (
-    const char *cs
-);

-
Parameters
-
-
cs
-
Colorspace string
-
-
Return Value
-

Colorspace value

-

get_constraint

-

-

-ppdcConstraint *get_constraint (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Constraint

-

get_custom_size

-

-

-ppdcMediaSize *get_custom_size (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Media size

-

get_duplex

-

-

-void get_duplex (
-    ppdcFile *fp,
-    ppdcDriver *d
-);

-
Parameters
-
-
fp
-
File to read from
-
d
-
Current driver
-
-

get_filter

-

-

-ppdcFilter *get_filter (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Filter

-

get_float

-

-

-float get_float (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Number

-

get_font

-

-

-ppdcFont *get_font (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Font data

-

get_generic

-

-

-ppdcChoice *get_generic (
-    ppdcFile *fp,
-    const char *keyword,
-    const char *tattr,
-    const char *nattr
-);

-
Parameters
-
-
fp
-
File to read
-
keyword
-
Keyword name
-
tattr
-
Text attribute
-
nattr
-
Numeric attribute
-
-
Return Value
-

Choice data

-

get_group

-

-

-ppdcGroup *get_group (
-    ppdcFile *fp,
-    ppdcDriver *d
-);

-
Parameters
-
-
fp
-
File to read
-
d
-
Printer driver
-
-
Return Value
-

Group

-

get_installable

-

-

-ppdcOption *get_installable (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Option

-

get_integer

-

-

-int get_integer (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Integer value

-

get_measurement

-

-

-float get_measurement (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Measurement value in points

-

get_option

-

-

-ppdcOption *get_option (
-    ppdcFile *fp,
-    ppdcDriver *d,
-    ppdcGroup *g
-);

-
Parameters
-
-
fp
-
File to read
-
d
-
Printer driver
-
g
-
Current group
-
-
Return Value
-

Option

-

get_po

-

-

-ppdcCatalog *get_po (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Message catalog

-

get_resolution

-

-

-ppdcChoice *get_resolution (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Choice data

-

get_simple_profile

-

-

-ppdcProfile *get_simple_profile (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Color profile

-

get_size

-

-

-ppdcMediaSize *get_size (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Media size

-

get_token

-

-

-char *get_token (
-    ppdcFile *fp,
-    char *buffer,
-    int buflen
-);

-
Parameters
-
-
fp
-
File to read
-
buffer
-
Buffer
-
buflen
-
Length of buffer
-
-
Return Value
-

Token string or NULL

-

get_variable

-

-

-ppdcVariable *get_variable (
-    ppdcFile *fp
-);

-
Parameters
-
-
fp
-
File to read
-
-
Return Value
-

Variable

-

import_ppd

-

-

-int import_ppd (
-    const char *f
-);

-
Parameters
-
-
f
-
Filename
-
-
Return Value
-

1 on success, 0 on failure

-

ppdcSource

-

-

-void ppdcSource (
-    const char *f,
-    cups_file_t *ffp
-);

-
Parameters
-
-
f
-
File to read
-
ffp
-
File pointer to use
-
-

quotef

-

-

-int quotef (
-    cups_file_t *fp,
-    const char *format,
-    ...
-);

-
Parameters
-
-
fp
-
File to write to
-
format
-
Printf-style format string
-
...
-
Additional args as needed
-
-
Return Value
-

Number bytes on success, -1 on failure

-

read_file

-

-

-void read_file (
-    const char *f,
-    cups_file_t *ffp
-);

-
Parameters
-
-
f
-
File to read
-
ffp
-
File pointer to use
-
-

scan_file

-

-

-void scan_file (
-    ppdcFile *fp,
-    ppdcDriver *td,
-    bool inc
-);

-
Parameters
-
-
fp
-
File to read
-
td
-
Driver template
-
inc
-
Including?
-
-

set_variable

-

-

-ppdcVariable *set_variable (
-    const char *name,
-    const char *value
-);

-
Parameters
-
-
name
-
Name
-
value
-
Value
-
-
Return Value
-

Variable

-

write_file

-

-

-int write_file (
-    const char *f
-);

-
Parameters
-
-
f
-
File to write
-
-
Return Value
-

0 on success, -1 on error

-

~ppdcSource

-

-

-void ~ppdcSource (void);

-

ppdcString

-

// Shared String

-

class ppdcString : public ppdcShared {
-  public:
-    char *value;
-};

-

Members

-
-
value
-
String value
-
-

ppdcString

-

-

-void ppdcString (
-    const char *v
-);

-
Parameters
-
-
v
-
String
-
-

~ppdcString

-

-

-void ~ppdcString (void);

-

ppdcVariable

-

// Variable Definition

-

class ppdcVariable : public ppdcShared {
-  public:
-    ppdcString *name, *value;
-};

-

Members

-
-
value
-
Value of variable
-
-

PPDC_NAME

-

-

-void PPDC_NAME (
-    void set_value(const char *v
-);

-
Parameters
-
-
v
-
-

ppdcVariable

-

-

-void ppdcVariable (
-    const char *n,
-    const char *v
-);

-
Parameters
-
-
n
-
Name of variable
-
v
-
Value of variable
-
-

set_value

-

-

-void set_value (
-    const char *v
-);

-
Parameters
-
-
v
-
-

~ppdcVariable

-

-

-void ~ppdcVariable (void);

-

Data Types

-

ppdc_cs_t

-

-

-typedef enum ppdc_cs_t; -

-

Variables

-

ppdcSource

-

// Printer Driver Data

-

class ppdcSource;

-

Constants

-

ppdcCondFlags

-

// Condition flags

-

Constants

-
-
PPDC_COND_NORMAL
-
Normal state
-
PPDC_COND_SATISFIED
-
At least one condition satisfied
-
PPDC_COND_SKIP
-
Skip state
-
-

ppdcDrvType

-

// Driver type

-

Constants

-
-
PPDC_DRIVER_CUSTOM
-
Custom driver
-
PPDC_DRIVER_EPSON
-
rastertoepson driver
-
PPDC_DRIVER_ESCP
-
rastertoescpx driver
-
PPDC_DRIVER_HP
-
rastertohp driver
-
PPDC_DRIVER_LABEL
-
rastertolabel/rastertodymo driver
-
PPDC_DRIVER_MAX
-
Number of driver types defined
-
PPDC_DRIVER_PCL
-
rastertopclx driver
-
PPDC_DRIVER_PS
-
PostScript driver
-
-

ppdcFontStatus

-

// Load status of font

-

Constants

-
-
PPDC_FONT_DISK
-
Font is on disk
-
PPDC_FONT_ROM
-
Font is in ROM
-
-

ppdcLineEnding

-

// Line endings

-

Constants

-
-
PPDC_CRLF
-
CR + LF
-
PPDC_CRONLY
-
CR only
-
PPDC_LFONLY
-
LF only
-
-

ppdcOptSection

-

// Option section

-

Constants

-
-
PPDC_SECTION_ANY
-
AnySetup
-
PPDC_SECTION_DOCUMENT
-
DocumentSetup
-
PPDC_SECTION_EXIT
-
ExitServer
-
PPDC_SECTION_JCL
-
JCLSetup
-
PPDC_SECTION_PAGE
-
PageSetup
-
PPDC_SECTION_PROLOG
-
Prolog
-
-

ppdcOptType

-

// Option type

-

Constants

-
-
PPDC_BOOLEAN
-
True/false option
-
PPDC_PICKMANY
-
Multiple choices from list
-
PPDC_PICKONE
-
Single choice from list
-
-
- - diff --git a/ppdc/Makefile b/ppdc/Makefile index 098029fff..49b93e92d 100644 --- a/ppdc/Makefile +++ b/ppdc/Makefile @@ -205,31 +205,10 @@ uninstall: $(RM) $(LIBDIR)/libcupsppdc.so $(RM) $(LIBDIR)/libcupsppdc.so.1 -$(RMDIR) $(LIBDIR) - $(RM) $(INCLUDEDIR)/cups/ppdc.h - -$(RMDIR) $(INCLUDEDIR)/cups - - -# -# Automatic API help files... -# - -apihelp: - mxmldoc --section "Programming" \ - --title "PPD Compiler API" \ - --css ../doc/cups-printable.css \ - --header api-ppdc.header --intro api-ppdc.shtml \ - api-ppdc.xml \ - ppdc.h $(LIBOBJS:.o=.cxx) >../doc/help/api-ppdc.html - mxmldoc --tokens help/api-ppdc.html api-ppdc.xml >../doc/help/api-ppdc.tokens - $(RM) api-ppdc.xml - -framedhelp: - mxmldoc --framed api-ppdc \ - --section "Programming" \ - --title "PPD Compiler API" \ - --css ../doc/cups-printable.css \ - --header api-ppdc.header --intro api-ppdc.shtml \ - ppdc.h $(LIBOBJS:.o=.cxx) + -if test "x$(privateinclude)" != x; then \ + $(RM) $(PRIVATEINCLUDE)/ppdc.h; \ + $(RMDIR) $(PRIVATEINCLUDE); \ + fi # diff --git a/ppdc/api-ppdc.header b/ppdc/api-ppdc.header deleted file mode 100644 index e237c44b3..000000000 --- a/ppdc/api-ppdc.header +++ /dev/null @@ -1,32 +0,0 @@ - - -

PPD Compiler API

- -
- - - - - - - - - - - - - - - - -
Headercups/ppdc.h
Library-lcupsppdc
See AlsoProgramming: Introduction to CUPS Programming
diff --git a/ppdc/api-ppdc.shtml b/ppdc/api-ppdc.shtml deleted file mode 100644 index 769731b5a..000000000 --- a/ppdc/api-ppdc.shtml +++ /dev/null @@ -1,16 +0,0 @@ - - -

Overview

- -

The PPD Compiler API provides access to CUPS driver information files and -methods for generating and importing PPD files.

diff --git a/scheduler/Makefile b/scheduler/Makefile index 8b21f993a..715d88fdd 100644 --- a/scheduler/Makefile +++ b/scheduler/Makefile @@ -307,8 +307,10 @@ uninstall: $(RM) $(LIBDIR)/libcupsmime.so $(RM) $(LIBDIR)/libcupsmime.so.1 -$(RMDIR) $(LIBDIR) - $(RM) $(INCLUDEDIR)/cups/mime.h - -$(RMDIR) $(INCLUDEDIR)/cups + -if test "x$(privateinclude)" != x; then \ + $(RM) $(PRIVATEINCLUDE)/mime.h; \ + $(RMDIR) $(PRIVATEINCLUDE); \ + fi if test "x$(INITDIR)" != x; then \ echo Uninstalling init scripts...; \ $(RM) $(BUILDROOT)$(INITDIR)/init.d/cups; \ @@ -348,28 +350,6 @@ uninstall: fi -# -# Automatic API help files... -# - -apihelp: - mxmldoc --section "Programming" \ - --title "MIME API" \ - --css ../doc/cups-printable.css \ - --header api-mime.header --intro api-mime.shtml \ - mime.h $(LIBOBJS:.o=.c) >../doc/help/api-mime.html - mxmldoc --tokens help/api-mime.html api-mime.xml >../doc/help/api-mime.tokens - $(RM) api-mime.xml - -framedhelp: - mxmldoc --framed api-mime \ - --section "Programming" \ - --title "MIME API" \ - --css ../doc/cups-printable.css \ - --header api-mime.header --intro api-mime.shtml \ - mime.h $(LIBOBJS:.o=.c) - - # # Make the scheduler executable, "cupsd". # diff --git a/scheduler/api-mime.header b/scheduler/api-mime.header deleted file mode 100644 index 2cde64646..000000000 --- a/scheduler/api-mime.header +++ /dev/null @@ -1,32 +0,0 @@ - - -

MIME API

- -
- - - - - - - - - - - - - - - - -
Headercups/mime.h
Library-lcupsmime
See AlsoProgramming: Introduction to CUPS Programming
diff --git a/scheduler/api-mime.shtml b/scheduler/api-mime.shtml deleted file mode 100644 index db0d493b4..000000000 --- a/scheduler/api-mime.shtml +++ /dev/null @@ -1,15 +0,0 @@ - - -

Overview

- -

The MIME API provides file typing and conversion services for CUPS.

-- 2.39.2