"Fossies" - the Fresh Open Source Software Archive

Member "libgcgi.a-0.9.5/src/gcgi_private.h" (22 Jun 2002, 3327 Bytes) of package /linux/www/old/gcgi-0.9.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "gcgi_private.h" see the Fossies "Dox" file reference documentation.

    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 
   33 BEGIN_C_DECLS
   34 
   35 /*------ Structures ------*/
   36 typedef struct querystringnode {
   37     char         *field;
   38     char         *data;
   39     size_t        size;
   40     MimeType      type;
   41     char         *subtype;
   42     MimeEncoding  encoding;
   43     char         *filename;
   44     size_t        truncated;
   45     struct querystringnode *next;
   46 } QueryStringNode;
   47 
   48 
   49 typedef struct querystringcoll {
   50     size_t           num;
   51     QueryStringNode *beg;
   52     QueryStringNode *end;
   53     QueryStringNode *cur;
   54 } QueryStringColl;
   55 
   56 
   57 typedef struct cgiquery {
   58     char            **env;
   59     size_t            envCount;
   60     size_t            queryCount;
   61     QueryStringColl **query;
   62 } CgiQuery;
   63 
   64 
   65 /*------ Structure Functions ------*/
   66 gcgiReturnType         createCgiQuery( void );
   67 gcgiReturnType         freeCgiQuery( void );
   68 gcgiReturnType         insertQueryStringNode(QueryStringNode *q);
   69 gcgiReturnType         createQueryStringNode(QueryStringNode **q);
   70 gcgiReturnType         freeQueryStringNode(QueryStringNode *q);
   71 gcgiReturnType         findQueryStringNodeFirst(char *field, QueryStringNode **q);
   72 gcgiReturnType         findQueryStringNode(char *field, QueryStringNode **q);
   73 gcgiReturnType         findQueryStringNodeCur(char *field, QueryStringNode **q);
   74 gcgiReturnType         findQueryStringNodeByData(char *field, char *data, QueryStringNode **q);
   75 gcgiReturnType         createQueryStringColl(QueryStringColl **q);
   76 gcgiReturnType         createQueryStringCollArray(int numColls); 
   77 gcgiReturnType         freeQueryStringColl(QueryStringColl *q);
   78 gcgiReturnType         findQueryStringColl(char *field, int *index);
   79 gcgiReturnType         getEnvVariables( void );
   80 
   81 /*------ Debugging Functions ------*/
   82 gcgiReturnType         printQueryStringNode(QueryStringNode *q, FILE *stream);
   83 gcgiReturnType         printQueryStringColl(QueryStringColl *q, FILE *stream);
   84 
   85 /*------ Parse Functions------*/
   86 gcgiReturnType         parsePostQueryString(int *numBytes);
   87 gcgiReturnType         parseGetQueryString(int *numBytes);
   88 gcgiReturnType         parseUrlEncoded(char *querystring, int clen);
   89 gcgiReturnType         parseFormData(FILE *data);
   90 void                   decodeUrl(QueryStringNode *qString);
   91 
   92 END_C_DECLS
   93 
   94 #endif /* __GCGI_PRIVATE_H__ */