]>
git.ipfire.org Git - thirdparty/cups.git/blob - cgi-bin/cgi.h
9604f97a21394c3f20508782990befa81baab560
2 * CGI support library definitions for CUPS.
4 * Copyright 2007-2010 by Apple Inc.
5 * Copyright 1997-2006 by Easy Software Products.
7 * These coded instructions, statements, and computer programs are the
8 * property of Apple Inc. and are protected by Federal copyright
9 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
10 * which should have been included with this file. If this file is
11 * file is missing or damaged, see the license at "http://www.cups.org/".
20 # include <sys/stat.h>
29 # include <cups/cups.h>
30 # include <cups/array.h>
31 # include "help-index.h"
40 # endif /* __cplusplus */
46 typedef struct cgi_file_s
/**** Uploaded file data ****/
48 char tempfile
[1024], /* Temporary file containing data */
49 *name
, /* Variable name */
50 *filename
, /* Original filename */
51 *mimetype
; /* MIME media type */
52 size_t filesize
; /* Size of uploaded file */
60 extern void cgiAbort(const char *title
, const char *stylesheet
,
61 const char *format
, ...);
62 extern int cgiCheckVariables(const char *names
);
63 extern void cgiClearVariables(void);
64 extern void *cgiCompileSearch(const char *query
);
65 extern void cgiCopyTemplateFile(FILE *out
, const char *tmpl
);
66 extern void cgiCopyTemplateLang(const char *tmpl
);
67 extern int cgiDoSearch(void *search
, const char *text
);
68 extern void cgiEndHTML(void);
69 extern void cgiEndMultipart(void);
70 extern char *cgiFormEncode(char *dst
, const char *src
,
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 const char *cgiGetCookie(const char *name
);
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 cgiPrintCommand(http_t
*http
, const char *dest
,
85 const char *command
, const char *title
);
86 extern void cgiPrintTestPage(http_t
*http
, const char *dest
);
87 extern char *cgiRewriteURL(const char *uri
, char *url
, int urlsize
,
88 const char *newresource
);
89 extern void cgiSetArray(const char *name
, int element
,
91 extern void cgiSetCookie(const char *name
, const char *value
,
92 const char *path
, const char *domain
,
93 time_t expires
, int secure
);
94 extern ipp_attribute_t
*cgiSetIPPObjectVars(ipp_attribute_t
*obj
,
95 const char *prefix
, int element
);
96 extern int cgiSetIPPVars(ipp_t
*response
, const char *filter_name
,
97 const char *filter_value
,
98 const char *prefix
, int parent_el
);
99 extern void cgiSetServerVersion(void);
100 extern void cgiSetSize(const char *name
, int size
);
101 extern void cgiSetVariable(const char *name
, const char *value
);
102 extern void cgiShowIPPError(const char *message
);
103 extern void cgiShowJobs(http_t
*http
, const char *dest
);
104 extern void cgiStartHTML(const char *title
);
105 extern void cgiStartMultipart(void);
106 extern int cgiSupportsMultipart(void);
107 extern const char *cgiText(const char *message
);
111 # endif /* __cplusplus */
113 #endif /* !_CUPS_CGI_H_ */