]>
Commit | Line | Data |
---|---|---|
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 | ||
49 | typedef 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 | ||
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); | |
fa73b229 | 83 | extern void cgiMoveJobs(http_t *http, const char *dest, int job_id); |
84 | extern void cgiPrintTestPage(http_t *http, const char *dest); | |
ef416fc2 | 85 | extern char *cgiRewriteURL(const char *uri, char *url, int urlsize, |
86 | const char *newresource); | |
87 | extern void cgiSetArray(const char *name, int element, | |
88 | const char *value); | |
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); | |
fa73b229 | 100 | extern void cgiShowIPPError(const char *message); |
ef416fc2 | 101 | extern void cgiShowJobs(http_t *http, const char *dest); |
102 | extern void cgiStartHTML(const char *title); | |
fa73b229 | 103 | extern 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 | */ |