root/branches/branch-5-0/mapserver/cgiutil.h

Revision 6428, 2.8 kB (checked in by dmorissette, 1 year ago)

Added missing line at end of license text

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /******************************************************************************
2  * $Id$
3  *
4  * Project:  MapServer
5  * Purpose:  cgiRequestObj and CGI parsing utility related declarations.
6  * Author:   Steve Lime and the MapServer team.
7  *
8  ******************************************************************************
9  * Copyright (c) 1996-2005 Regents of the University of Minnesota.
10  *
11  * Permission is hereby granted, free of charge, to any person obtaining a
12  * copy of this software and associated documentation files (the "Software"),
13  * to deal in the Software without restriction, including without limitation
14  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15  * and/or sell copies of the Software, and to permit persons to whom the
16  * Software is furnished to do so, subject to the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be included in
19  * all copies of this Software or works derived from this Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  ****************************************************************************/
29
30 #ifndef CGIUTIL_H
31 #define CGIUTIL_H
32
33 #if defined(_WIN32) && !defined(__CYGWIN__)
34 define MS_DLL_EXPORT     __declspec(dllexport)
35 #else
36 #define  MS_DLL_EXPORT
37 #endif
38
39 /*
40 ** Misc. defines
41 */
42 #define MS_MAX_CGI_PARAMS 100
43
44 enum MS_REQUEST_TYPE {MS_GET_REQUEST, MS_POST_REQUEST};
45
46 /* structure to hold request information */
47 typedef struct
48 {
49 #ifndef SWIG
50   char **ParamNames;
51   char **ParamValues;
52 #endif
53
54 #ifdef SWIG
55 %immutable;
56 #endif
57   int NumParams;
58 #ifdef SWIG
59 %mutable;
60 #endif
61
62   enum MS_REQUEST_TYPE type;
63   char *contenttype;
64
65   char *postrequest;
66 } cgiRequestObj;
67      
68
69 /*
70 ** Function prototypes
71 */
72 #ifndef SWIG
73 MS_DLL_EXPORT  int loadParams(cgiRequestObj *);
74 MS_DLL_EXPORT void getword(char *, char *, char);
75 MS_DLL_EXPORT char *makeword_skip(char *, char, char);
76 MS_DLL_EXPORT char *makeword(char *, char);
77 MS_DLL_EXPORT char *fmakeword(FILE *, char, int *);
78 MS_DLL_EXPORT char x2c(char *);
79 MS_DLL_EXPORT void unescape_url(char *);
80 MS_DLL_EXPORT void plustospace(char *);
81 MS_DLL_EXPORT int rind(char *, char);
82 MS_DLL_EXPORT int _getline(char *, int, FILE *);
83 MS_DLL_EXPORT void send_fd(FILE *, FILE *);
84 MS_DLL_EXPORT int ind(char *, char);
85 MS_DLL_EXPORT void escape_shell_cmd(char *);
86
87 MS_DLL_EXPORT cgiRequestObj *msAllocCgiObj(void);
88 MS_DLL_EXPORT void msFreeCgiObj(cgiRequestObj *request);
89 #endif /*SWIG*/
90
91 #endif /* CGIUTIL_H */
Note: See TracBrowser for help on using the browser.