Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 6ffce823058df614fd928704460ec612 > files > 46

cgicc-3.2.1-2mdk.ppc.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
   "http://www.w3.org/TR/REC-html40/loose.dtd">

<html lang="en" dir="LTR">

<head>
  <!-- $Id: header.html,v 1.3 2002/03/09 18:30:37 sbooth Exp $ -->
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <title>Cgicc.h Source File</title>
  <link rev="made" href="mailto:bug-cgicc@gnu.org" />
  <link href="cgicc-doc.css" rel="stylesheet" type="text/css" />
</head>

<body>
<!-- Generated by Doxygen 1.2.13.1 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>Cgicc.h</h1><a href="Cgicc_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/* -*-c++-*- */</font>
00002 <font class="comment">/*</font>
00003 <font class="comment"> *  $Id: Cgicc.h,v 1.11 2002/03/09 18:34:18 sbooth Exp $</font>
00004 <font class="comment"> *</font>
00005 <font class="comment"> *  Copyright (C) 1996 - 2002 Stephen F. Booth</font>
00006 <font class="comment"> *</font>
00007 <font class="comment"> *  This library is free software; you can redistribute it and/or</font>
00008 <font class="comment"> *  modify it under the terms of the GNU Lesser General Public</font>
00009 <font class="comment"> *  License as published by the Free Software Foundation; either</font>
00010 <font class="comment"> *  version 2.1 of the License, or (at your option) any later version.</font>
00011 <font class="comment"> *</font>
00012 <font class="comment"> *  This library is distributed in the hope that it will be useful,</font>
00013 <font class="comment"> *  but WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00014 <font class="comment"> *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</font>
00015 <font class="comment"> *  Lesser General Public License for more details.</font>
00016 <font class="comment"> *</font>
00017 <font class="comment"> *  You should have received a copy of the GNU Lesser General Public</font>
00018 <font class="comment"> *  License along with this library; if not, write to the Free Software</font>
00019 <font class="comment"> *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</font>
00020 <font class="comment"> */</font>
00021 
00022 <font class="preprocessor">#ifndef _CGICC_H_</font>
00023 <font class="preprocessor"></font><font class="preprocessor">#define _CGICC_H_ 1</font>
00024 <font class="preprocessor"></font>
00025 <font class="preprocessor">#ifdef __GNUG__</font>
00026 <font class="preprocessor"></font><font class="preprocessor">#  pragma interface</font>
00027 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00028 <font class="preprocessor"></font>
00033 <font class="comment">/*</font>
00034 <font class="comment"> * The GNU cgicc library, by Stephen F. Booth &lt;sbooth@gnu.org&gt;</font>
00035 <font class="comment"> * http://www.cgicc.org</font>
00036 <font class="comment"> *</font>
00037 <font class="comment"> * The latest version can be found on your closest GNU mirror site.</font>
00038 <font class="comment"> * Please mail bug reports to &lt;bug-cgicc@gnu.org&gt;</font>
00039 <font class="comment"> */</font>
00040 
00041 <font class="preprocessor">#include &lt;vector&gt;</font>
00042 <font class="preprocessor">#include &lt;string&gt;</font>
00043 
00044 <font class="preprocessor">#include "<a class="code" href="CgiDefs_8h.html">cgicc/CgiDefs.h</a>"</font>
00045 <font class="preprocessor">#include "<a class="code" href="FormEntry_8h.html">cgicc/FormEntry.h</a>"</font>
00046 <font class="preprocessor">#include "<a class="code" href="FormFile_8h.html">cgicc/FormFile.h</a>"</font>
00047 <font class="preprocessor">#include "<a class="code" href="CgiInput_8h.html">cgicc/CgiInput.h</a>"</font>
00048 <font class="preprocessor">#include "<a class="code" href="CgiEnvironment_8h.html">cgicc/CgiEnvironment.h</a>"</font>
00049 
<a name="l00050"></a><a class="code" href="namespacecgicc.html">00050</a> CGICC_BEGIN_NAMESPACE
00051 
00052 <font class="preprocessor">#ifdef WIN32</font>
00053 <font class="preprocessor"></font>  <font class="keyword">template</font> <font class="keyword">class </font>CGICC_API STDNS vector&lt;FormEntry&gt;;
00054   <font class="keyword">template</font> <font class="keyword">class </font>CGICC_API STDNS vector&lt;FormFile&gt;;
00055 <font class="preprocessor">#endif</font>
00056 <font class="preprocessor"></font>  
00057 <font class="keyword">class </font>MultipartHeader;
00058 
00059 <font class="comment">// ============================================================</font>
00060 <font class="comment">// Iterator typedefs</font>
00061 <font class="comment">// ============================================================</font>
00062 
00064 <font class="keyword">typedef</font> STDNS vector&lt;FormEntry&gt;::iterator       <a class="code" href="namespacecgicc.html#a0">form_iterator</a>;
00066 <font class="keyword">typedef</font> STDNS vector&lt;FormEntry&gt;::const_iterator <a class="code" href="namespacecgicc.html#a1">const_form_iterator</a>;
00067 
00069 <font class="keyword">typedef</font> STDNS vector&lt;FormFile&gt;::iterator        <a class="code" href="namespacecgicc.html#a2">file_iterator</a>;
00071 <font class="keyword">typedef</font> STDNS vector&lt;FormFile&gt;::const_iterator  <a class="code" href="namespacecgicc.html#a3">const_file_iterator</a>;
00072 
00073 <font class="comment">// ============================================================</font>
00074 <font class="comment">// Class Cgicc</font>
00075 <font class="comment">// ============================================================</font>
00076 
<a name="l00101"></a><a class="code" href="classcgicc_1_1Cgicc.html">00101</a> <font class="keyword">class </font>CGICC_API Cgicc {
00102 <font class="keyword">public</font>:
00103 
00104   <font class="comment">// ============================================================</font>
00105 
00108 
00118   Cgicc(CgiInput *input = 0);
00119   
00125   ~Cgicc();
00127   
00128   <font class="comment">// ============================================================</font>
00129 
00134 
00141   <font class="keyword">const</font> <font class="keywordtype">char</font>*
00142   getCompileDate()                                      <font class="keyword">const</font>;
00143   
00150   <font class="keyword">const</font> <font class="keywordtype">char</font>*
00151   getCompileTime()                                      <font class="keyword">const</font>;
00152   
00159   <font class="keyword">const</font> <font class="keywordtype">char</font>*
00160   getVersion()                                          <font class="keyword">const</font>;
00161 
00168   <font class="keyword">const</font> <font class="keywordtype">char</font>*
00169   getHost()                                             <font class="keyword">const</font>;
00171   
00172   <font class="comment">// ============================================================</font>
00173 
00178 
00185   <font class="keywordtype">bool</font> 
00186   queryCheckbox(<font class="keyword">const</font> STDNS string&amp; elementName)        <font class="keyword">const</font>;
00187   
00194   <font class="keyword">inline</font> <a class="code" href="namespacecgicc.html#a0">form_iterator</a> 
<a name="l00195"></a><a class="code" href="classcgicc_1_1Cgicc.html#z2_1">00195</a>   operator[] (<font class="keyword">const</font> STDNS string&amp; name)
00196     { <font class="keywordflow">return</font> getElement(name); }
00197 
00204   <font class="keyword">inline</font> <a class="code" href="namespacecgicc.html#a1">const_form_iterator</a> 
<a name="l00205"></a><a class="code" href="classcgicc_1_1Cgicc.html#z2_2">00205</a>   operator[] (<font class="keyword">const</font> STDNS string&amp; name)                 <font class="keyword">const</font>
00206     { <font class="keywordflow">return</font> getElement(name); }
00207   
00214   <a class="code" href="namespacecgicc.html#a0">form_iterator</a> 
00215   getElement(<font class="keyword">const</font> STDNS string&amp; name);
00216   
00223   <a class="code" href="namespacecgicc.html#a1">const_form_iterator</a> 
00224   getElement(<font class="keyword">const</font> STDNS string&amp; name)                  <font class="keyword">const</font>;
00225   
00233   <font class="keywordtype">bool</font> 
00234   getElement(<font class="keyword">const</font> STDNS string&amp; name,
00235              STDNS vector&lt;FormEntry&gt;&amp; result)           <font class="keyword">const</font>;
00236 
00243   <a class="code" href="namespacecgicc.html#a0">form_iterator</a> 
00244   getElementByValue(<font class="keyword">const</font> STDNS string&amp; value);
00245   
00252   <a class="code" href="namespacecgicc.html#a1">const_form_iterator</a> 
00253   getElementByValue(<font class="keyword">const</font> STDNS string&amp; value)          <font class="keyword">const</font>;
00254   
00262   <font class="keywordtype">bool</font> 
00263   getElementByValue(<font class="keyword">const</font> STDNS string&amp; value,
00264                     STDNS vector&lt;FormEntry&gt;&amp; result)    <font class="keyword">const</font>;
00265 
00271   <font class="keyword">inline</font> <font class="keyword">const</font> STDNS vector&lt;FormEntry&gt;&amp; 
<a name="l00272"></a><a class="code" href="classcgicc_1_1Cgicc.html#z2_9">00272</a>   operator* ()                                          <font class="keyword">const</font>
00273     { <font class="keywordflow">return</font> fFormData; }
00274   
00280   <font class="keyword">inline</font> <font class="keyword">const</font> STDNS vector&lt;FormEntry&gt;&amp;
<a name="l00281"></a><a class="code" href="classcgicc_1_1Cgicc.html#z2_10">00281</a>   getElements()                                         <font class="keyword">const</font>
00282     { <font class="keywordflow">return</font> fFormData; }
00284 
00285   <font class="comment">// ============================================================</font>
00286 
00289 
00296   <a class="code" href="namespacecgicc.html#a2">file_iterator</a> 
00297   getFile(<font class="keyword">const</font> STDNS string&amp; name);
00298   
00305   <a class="code" href="namespacecgicc.html#a3">const_file_iterator</a> 
00306   getFile(<font class="keyword">const</font> STDNS string&amp; name)                     <font class="keyword">const</font>;
00307 
00312   <font class="keyword">inline</font> <font class="keyword">const</font> STDNS vector&lt;FormFile&gt;&amp;
<a name="l00313"></a><a class="code" href="classcgicc_1_1Cgicc.html#z3_2">00313</a>   getFiles()                                            <font class="keyword">const</font>
00314     { <font class="keywordflow">return</font> fFormFiles; }
00316   
00317   <font class="comment">// ============================================================</font>
00318 
00321 
00326   <font class="keyword">inline</font> <font class="keyword">const</font> CgiEnvironment&amp;
<a name="l00327"></a><a class="code" href="classcgicc_1_1Cgicc.html#z4_0">00327</a>   getEnvironment()                                      <font class="keyword">const</font>
00328     { <font class="keywordflow">return</font> fEnvironment;}
00330   
00331   <font class="comment">// ============================================================</font>
00332 
00335   
00342   <font class="keywordtype">void</font> 
00343   save(<font class="keyword">const</font> STDNS string&amp; filename)                    <font class="keyword">const</font>;
00344   
00351   <font class="keywordtype">void</font> 
00352   restore(<font class="keyword">const</font> STDNS string&amp; filename);
00354   
00355 <font class="keyword">private</font>:
00356   CgiEnvironment                fEnvironment;
00357   STDNS vector&lt;FormEntry&gt;       fFormData;
00358   STDNS vector&lt;FormFile&gt;        fFormFiles;
00359   
00360   <font class="comment">// Convert query string into a list of FormEntries</font>
00361   <font class="keywordtype">void</font> 
00362   parseFormInput(<font class="keyword">const</font> STDNS string&amp; data);
00363   
00364   <font class="comment">// Parse a multipart/form-data header</font>
00365   MultipartHeader
00366   parseHeader(<font class="keyword">const</font> STDNS string&amp; data);
00367   
00368   <font class="comment">// Parse a (name=value) form entry</font>
00369   <font class="keywordtype">void</font> 
00370   parsePair(<font class="keyword">const</font> STDNS string&amp; data);
00371   
00372   <font class="comment">// Parse a MIME entry for ENCTYPE=""</font>
00373   <font class="keywordtype">void</font>
00374   parseMIME(<font class="keyword">const</font> STDNS string&amp; data);
00375 
00376   <font class="comment">// Find elements in the list of entries</font>
00377   <font class="keywordtype">bool</font> 
00378   findEntries(<font class="keyword">const</font> STDNS string&amp; param, 
00379               <font class="keywordtype">bool</font> byName,
00380               STDNS vector&lt;FormEntry&gt;&amp; result)          <font class="keyword">const</font>;
00381 };
00382 
00383 CGICC_END_NAMESPACE
00384 
00385 <font class="preprocessor">#endif </font><font class="comment">/* ! _CGICC_H_ */</font>
</pre></div><!-- $Id: footer.html,v 1.3 2002/03/09 18:30:37 sbooth Exp $ -->

<hr>

<address><small>
GNU cgicc - A C++ class library for writing CGI applications<br />
Copyright &copy; 1996 - 2002 
<a href="mailto:sbooth@gnu.org">Stephen F. Booth</a><br />
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front Cover Texts, and with no Back-Cover
Texts.<br />
Documentation generated Sun Mar 17 16:40:57 2002 for cgicc by
<a HREF="http://www.doxygen.org/index.html">doxygen</a> 1.2.13.1
</small></address>

</body>

</html>