gcgi  0.9.5
About: GCGI implements NCSA's Common Gateway Interface along with the extensions to that interface defined in RFC2388.
  Fossies Dox: gcgi-0.9.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

gcgi_private.h
Go to the documentation of this file.
1 /* -*-mode:c; c-style:k&r; c-basic-offset:4; -*- */
2 /*
3  * GCGI Library, implementing NCSA'a Common Gateway Interface and RFC2338.
4  * Copyright (C) 2001-2002 Julian Catchen, julian@catchen.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 #ifndef __GCGI_PRIVATE_H__
22 #define __GCGI_PRIVATE_H__
23 
24 #include "gcgi.h"
25 #include "common.h"
26 #include "parse.h"
27 #include "mime.h"
28 
29 #ifdef USE_SSL
30 # include "crypt.h"
31 #endif
32 
34 
35 /*------ Structures ------*/
36 typedef struct querystringnode {
37  char *field;
38  char *data;
39  size_t size;
41  char *subtype;
43  char *filename;
44  size_t truncated;
47 
48 
49 typedef struct querystringcoll {
50  size_t num;
55 
56 
57 typedef struct cgiquery {
58  char **env;
59  size_t envCount;
60  size_t queryCount;
62 } CgiQuery;
63 
64 
65 /*------ Structure Functions ------*/
74 gcgiReturnType findQueryStringNodeByData(char *field, char *data, QueryStringNode **q);
78 gcgiReturnType findQueryStringColl(char *field, int *index);
80 
81 /*------ Debugging Functions ------*/
84 
85 /*------ Parse Functions------*/
87 gcgiReturnType parseGetQueryString(int *numBytes);
88 gcgiReturnType parseUrlEncoded(char *querystring, int clen);
89 gcgiReturnType parseFormData(FILE *data);
90 void decodeUrl(QueryStringNode *qString);
91 
93 
94 #endif /* __GCGI_PRIVATE_H__ */
findQueryStringNodeByData
gcgiReturnType findQueryStringNodeByData(char *field, char *data, QueryStringNode **q)
Definition: gcgi.c:1497
querystringcoll::beg
QueryStringNode * beg
Definition: gcgi_private.h:51
querystringcoll::num
size_t num
Definition: gcgi_private.h:50
createCgiQuery
gcgiReturnType createCgiQuery(void)
Definition: gcgi.c:1269
parseGetQueryString
gcgiReturnType parseGetQueryString(int *numBytes)
Definition: gcgi.c:180
parsePostQueryString
gcgiReturnType parsePostQueryString(int *numBytes)
Definition: gcgi.c:118
querystringnode::data
char * data
Definition: gcgi_private.h:38
querystringnode::encoding
MimeEncoding encoding
Definition: gcgi_private.h:42
printQueryStringColl
gcgiReturnType printQueryStringColl(QueryStringColl *q, FILE *stream)
Definition: gcgi.c:1603
querystringnode::subtype
char * subtype
Definition: gcgi_private.h:41
querystringcoll::cur
QueryStringNode * cur
Definition: gcgi_private.h:53
END_C_DECLS
#define END_C_DECLS
Definition: common.h:29
cgiquery
Definition: gcgi_private.h:57
getEnvVariables
gcgiReturnType getEnvVariables(void)
Definition: gcgi.c:1318
querystringnode
Definition: gcgi_private.h:36
findQueryStringNodeFirst
gcgiReturnType findQueryStringNodeFirst(char *field, QueryStringNode **q)
Definition: gcgi.c:1403
parseUrlEncoded
gcgiReturnType parseUrlEncoded(char *querystring, int clen)
Definition: gcgi.c:199
cgiquery::envCount
size_t envCount
Definition: gcgi_private.h:59
gcgi.h
parse.h
querystringnode::size
size_t size
Definition: gcgi_private.h:39
crypt.h
freeQueryStringNode
gcgiReturnType freeQueryStringNode(QueryStringNode *q)
Definition: gcgi.c:1536
printQueryStringNode
gcgiReturnType printQueryStringNode(QueryStringNode *q, FILE *stream)
Definition: gcgi.c:1630
querystringnode::truncated
size_t truncated
Definition: gcgi_private.h:44
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: common.h:28
createQueryStringColl
gcgiReturnType createQueryStringColl(QueryStringColl **q)
Definition: gcgi.c:1551
QueryStringColl
struct querystringcoll QueryStringColl
createQueryStringNode
gcgiReturnType createQueryStringNode(QueryStringNode **q)
Definition: gcgi.c:1519
freeQueryStringColl
gcgiReturnType freeQueryStringColl(QueryStringColl *q)
Definition: gcgi.c:1583
cgiquery::queryCount
size_t queryCount
Definition: gcgi_private.h:60
createQueryStringCollArray
gcgiReturnType createQueryStringCollArray(int numColls)
Definition: gcgi.c:1565
freeCgiQuery
gcgiReturnType freeCgiQuery(void)
Definition: gcgi.c:1294
cgiquery::query
QueryStringColl ** query
Definition: gcgi_private.h:61
cgiquery::env
char ** env
Definition: gcgi_private.h:58
parseFormData
gcgiReturnType parseFormData(FILE *data)
Definition: gcgi.c:248
findQueryStringNode
gcgiReturnType findQueryStringNode(char *field, QueryStringNode **q)
Definition: gcgi.c:1432
insertQueryStringNode
gcgiReturnType insertQueryStringNode(QueryStringNode *q)
Definition: gcgi.c:1340
MimeType
MimeType
Definition: gcgi.h:65
querystringnode::field
char * field
Definition: gcgi_private.h:37
common.h
gcgiReturnType
gcgiReturnType
Definition: gcgi.h:54
MimeEncoding
MimeEncoding
Definition: gcgi.h:76
querystringcoll::end
QueryStringNode * end
Definition: gcgi_private.h:52
querystringnode::filename
char * filename
Definition: gcgi_private.h:43
querystringnode::next
struct querystringnode * next
Definition: gcgi_private.h:45
decodeUrl
void decodeUrl(QueryStringNode *qString)
Definition: gcgi.c:314
querystringcoll
Definition: gcgi_private.h:49
QueryStringNode
struct querystringnode QueryStringNode
mime.h
findQueryStringColl
gcgiReturnType findQueryStringColl(char *field, int *index)
Definition: gcgi.c:1377
findQueryStringNodeCur
gcgiReturnType findQueryStringNodeCur(char *field, QueryStringNode **q)
Definition: gcgi.c:1467
CgiQuery
struct cgiquery CgiQuery
querystringnode::type
MimeType type
Definition: gcgi_private.h:40