]>
git.ipfire.org Git - thirdparty/cups.git/blob - cgi-bin/cgi.h
2 * "$Id: cgi.h 177 2006-06-21 00:20:03Z jlovell $"
4 * CGI support library definitions.
6 * Copyright 1997-2006 by Easy Software Products.
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
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
31 # include <sys/stat.h>
40 # include <cups/cups.h>
41 # include <cups/array.h>
42 # include "help-index.h"
49 typedef struct cgi_file_s
/**** Uploaded file data ****/
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 */
63 extern void cgiAbort(const char *title
, const char *stylesheet
,
64 const char *format
, ...);
65 extern int cgiCheckVariables(const char *names
);
66 extern void *cgiCompileSearch(const char *query
);
67 extern void cgiCopyTemplateFile(FILE *out
, const char *tmpl
);
68 extern void cgiCopyTemplateLang(const char *tmpl
);
69 extern int cgiDoSearch(void *search
, const char *text
);
70 extern void cgiEndHTML(void);
71 extern char *cgiFormEncode(char *dst
, const char *src
, size_t dstsize
);
72 extern void cgiFreeSearch(void *search
);
73 extern const char *cgiGetArray(const char *name
, int element
);
74 extern void cgiGetAttributes(ipp_t
*request
, const char *tmpl
);
75 extern char *cgiGetCookie(const char *name
, char *buf
, int buflen
);
76 extern const cgi_file_t
*cgiGetFile(void);
77 extern cups_array_t
*cgiGetIPPObjects(ipp_t
*response
, void *search
);
78 extern int cgiGetSize(const char *name
);
79 extern char *cgiGetTemplateDir(void);
80 extern const char *cgiGetVariable(const char *name
);
81 extern int cgiInitialize(void);
82 extern int cgiIsPOST(void);
83 extern void cgiMoveJobs(http_t
*http
, const char *dest
, int job_id
);
84 extern void cgiPrintTestPage(http_t
*http
, const char *dest
);
85 extern char *cgiRewriteURL(const char *uri
, char *url
, int urlsize
,
86 const char *newresource
);
87 extern void cgiSetArray(const char *name
, int element
,
89 extern void cgiSetCookie(const char *name
, const char *value
,
90 const char *path
, const char *domain
,
91 time_t expires
, int secure
);
92 extern ipp_attribute_t
*cgiSetIPPObjectVars(ipp_attribute_t
*obj
,
93 const char *prefix
, int element
);
94 extern int cgiSetIPPVars(ipp_t
*response
, const char *filter_name
,
95 const char *filter_value
,
96 const char *prefix
, int parent_el
);
97 extern void cgiSetServerVersion(void);
98 extern void cgiSetSize(const char *name
, int size
);
99 extern void cgiSetVariable(const char *name
, const char *value
);
100 extern void cgiShowIPPError(const char *message
);
101 extern void cgiShowJobs(http_t
*http
, const char *dest
);
102 extern void cgiStartHTML(const char *title
);
103 extern const char *cgiText(const char *message
);
105 #endif /* !_CUPS_CGI_H_ */
108 * End of "$Id: cgi.h 177 2006-06-21 00:20:03Z jlovell $".