]> git.ipfire.org Git - thirdparty/cups.git/blame - cgi-bin/cgi.h
Load cups into easysw/current.
[thirdparty/cups.git] / cgi-bin / cgi.h
CommitLineData
ef416fc2 1/*
f7faf1f5 2 * "$Id: cgi.h 4931 2006-01-14 20:37:40Z mike $"
ef416fc2 3 *
4 * CGI support library definitions.
5 *
6 * Copyright 1997-2006 by Easy Software Products.
7 *
8 * These coded instructions, statements, and computer programs are the
9 * property of Easy Software Products and are protected by Federal
10 * copyright law. Distribution and use rights are outlined in the file
11 * "LICENSE.txt" which should have been included with this file. If this
12 * file is missing or damaged please contact Easy Software Products
13 * at:
14 *
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
19 *
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
23 */
24
25#ifndef _CUPS_CGI_H_
26# define _CUPS_CGI_H_
27
28# include <stdio.h>
29# include <stdlib.h>
30# include <time.h>
31# include <sys/stat.h>
32
33# ifdef WIN32
34# include <direct.h>
35# include <io.h>
36# else
37# include <unistd.h>
38# endif /* WIN32 */
39
40# include <cups/cups.h>
41# include <cups/array.h>
42# include "help-index.h"
43
44
45/*
46 * Types...
47 */
48
49typedef struct cgi_file_s /**** Uploaded file data ****/
50{
51 char tempfile[1024], /* Temporary file containing data */
52 *name, /* Variable name */
53 *filename, /* Original filename */
54 *mimetype; /* MIME media type */
55 size_t filesize; /* Size of uploaded file */
56} cgi_file_t;
57
58
59/*
60 * Prototypes...
61 */
62
63extern void cgiAbort(const char *title, const char *stylesheet,
64 const char *format, ...);
65extern int cgiCheckVariables(const char *names);
66extern void *cgiCompileSearch(const char *query);
67extern void cgiCopyTemplateFile(FILE *out, const char *tmpl);
68extern void cgiCopyTemplateLang(const char *tmpl);
69extern int cgiDoSearch(void *search, const char *text);
70extern void cgiEndHTML(void);
71extern char *cgiFormEncode(char *dst, const char *src, size_t dstsize);
72extern void cgiFreeSearch(void *search);
73extern const char *cgiGetArray(const char *name, int element);
74extern void cgiGetAttributes(ipp_t *request, const char *tmpl);
75extern char *cgiGetCookie(const char *name, char *buf, int buflen);
76extern const cgi_file_t *cgiGetFile(void);
77extern cups_array_t *cgiGetIPPObjects(ipp_t *response, void *search);
78extern int cgiGetSize(const char *name);
79extern char *cgiGetTemplateDir(void);
80extern const char *cgiGetVariable(const char *name);
81extern int cgiInitialize(void);
82extern int cgiIsPOST(void);
fa73b229 83extern void cgiMoveJobs(http_t *http, const char *dest, int job_id);
84extern void cgiPrintTestPage(http_t *http, const char *dest);
ef416fc2 85extern char *cgiRewriteURL(const char *uri, char *url, int urlsize,
86 const char *newresource);
87extern void cgiSetArray(const char *name, int element,
88 const char *value);
89extern void cgiSetCookie(const char *name, const char *value,
90 const char *path, const char *domain,
91 time_t expires, int secure);
92extern ipp_attribute_t *cgiSetIPPObjectVars(ipp_attribute_t *obj,
93 const char *prefix, int element);
94extern int cgiSetIPPVars(ipp_t *response, const char *filter_name,
95 const char *filter_value,
96 const char *prefix, int parent_el);
97extern void cgiSetServerVersion(void);
98extern void cgiSetSize(const char *name, int size);
99extern void cgiSetVariable(const char *name, const char *value);
fa73b229 100extern void cgiShowIPPError(const char *message);
ef416fc2 101extern void cgiShowJobs(http_t *http, const char *dest);
102extern void cgiStartHTML(const char *title);
fa73b229 103extern const char *cgiText(const char *message);
ef416fc2 104
105#endif /* !_CUPS_CGI_H_ */
106
107/*
f7faf1f5 108 * End of "$Id: cgi.h 4931 2006-01-14 20:37:40Z mike $".
ef416fc2 109 */