]>
git.ipfire.org Git - thirdparty/cups.git/blob - cgi-bin/cgi.h
2 * "$Id: cgi.h 6649 2007-07-11 21:46:42Z mike $"
4 * CGI support library definitions.
6 * Copyright 2007-2009 by Apple Inc.
7 * Copyright 1997-2006 by Easy Software Products.
9 * These coded instructions, statements, and computer programs are the
10 * property of Apple Inc. and are protected by Federal copyright
11 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 * which should have been included with this file. If this file is
13 * file is missing or damaged, see the license at "http://www.cups.org/".
22 # include <sys/stat.h>
31 # include <cups/cups.h>
32 # include <cups/array.h>
33 # include "help-index.h"
42 # endif /* __cplusplus */
48 typedef struct cgi_file_s
/**** Uploaded file data ****/
50 char tempfile
[1024], /* Temporary file containing data */
51 *name
, /* Variable name */
52 *filename
, /* Original filename */
53 *mimetype
; /* MIME media type */
54 size_t filesize
; /* Size of uploaded file */
62 extern void cgiAbort(const char *title
, const char *stylesheet
,
63 const char *format
, ...);
64 extern int cgiCheckVariables(const char *names
);
65 extern void cgiClearVariables(void);
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 void cgiEndMultipart(void);
72 extern char *cgiFormEncode(char *dst
, const char *src
, size_t dstsize
);
73 extern void cgiFreeSearch(void *search
);
74 extern const char *cgiGetArray(const char *name
, int element
);
75 extern void cgiGetAttributes(ipp_t
*request
, const char *tmpl
);
76 extern char *cgiGetCookie(const char *name
, char *buf
, int buflen
);
77 extern const cgi_file_t
*cgiGetFile(void);
78 extern cups_array_t
*cgiGetIPPObjects(ipp_t
*response
, void *search
);
79 extern int cgiGetSize(const char *name
);
80 extern char *cgiGetTemplateDir(void);
81 extern const char *cgiGetVariable(const char *name
);
82 extern int cgiInitialize(void);
83 extern int cgiIsPOST(void);
84 extern void cgiMoveJobs(http_t
*http
, const char *dest
, int job_id
);
85 extern void cgiPrintCommand(http_t
*http
, const char *dest
,
86 const char *command
, const char *title
);
87 extern void cgiPrintTestPage(http_t
*http
, const char *dest
);
88 extern char *cgiRewriteURL(const char *uri
, char *url
, int urlsize
,
89 const char *newresource
);
90 extern void cgiSetArray(const char *name
, int element
,
92 extern void cgiSetCookie(const char *name
, const char *value
,
93 const char *path
, const char *domain
,
94 time_t expires
, int secure
);
95 extern ipp_attribute_t
*cgiSetIPPObjectVars(ipp_attribute_t
*obj
,
96 const char *prefix
, int element
);
97 extern int cgiSetIPPVars(ipp_t
*response
, const char *filter_name
,
98 const char *filter_value
,
99 const char *prefix
, int parent_el
);
100 extern void cgiSetServerVersion(void);
101 extern void cgiSetSize(const char *name
, int size
);
102 extern void cgiSetVariable(const char *name
, const char *value
);
103 extern void cgiShowIPPError(const char *message
);
104 extern void cgiShowJobs(http_t
*http
, const char *dest
);
105 extern void cgiStartHTML(const char *title
);
106 extern void cgiStartMultipart(void);
107 extern int cgiSupportsMultipart(void);
108 extern const char *cgiText(const char *message
);
112 # endif /* __cplusplus */
114 #endif /* !_CUPS_CGI_H_ */
117 * End of "$Id: cgi.h 6649 2007-07-11 21:46:42Z mike $".