• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List
  • File Members

crc.h

Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
00003 //   Foundation, Inc
00004 // 
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or
00008 // (at your option) any later version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 
00019 #ifndef __CRC_H__
00020 #define __CRC_H__
00021 
00022 #include <string>
00023 #include <iostream> // for output operator
00024 
00025 #include "rc.h"
00026 
00031 namespace cygnal {
00032     
00037 class DSOEXPORT CRcInitFile : public gnash::RcInitFile
00038 {
00039 public:
00041     CRcInitFile();
00043     ~CRcInitFile();
00044     
00046     static CRcInitFile& getDefaultInstance();
00047     
00054     bool loadFiles();
00055     
00061     bool parseFile(const std::string& filespec);
00062 
00064 
00066     int getPortOffset() { return _port_offset; };
00067 
00068     // \brief Set the port offset
00069     void setPortOffset(int x) { _port_offset = x; };
00070 
00072     int getFDThread() { return _fdthread; };
00074     void setFDThread(int x) { _fdthread = x; };
00075 
00077     bool getTestingFlag() { return _testing; };
00079     void setTestingFlag(bool x) { _testing = x; };
00080 
00082     bool getThreadingFlag() { return _threading; };
00084     void setThreadingFlag(bool x) { _threading = x; };
00085 
00087     bool getNetDebugFlag() const { return _netdebug; }
00089     void setNetDebugFlag(bool x) { _netdebug = x; }    
00090 
00092     bool getAdminFlag() const { return _admin; }
00094     void setAdminFlag(bool x) { _admin = x; }
00095 
00096     void setDocumentRoot(const std::string &x) { _wwwroot = x; }
00097     std::string getDocumentRoot() { return _wwwroot; }
00098     
00099     void setCgiRoot(const std::string &x) { _cgiroot = x; }
00100     std::string getCgiRoot() { return _cgiroot; }
00101     
00103     const std::string& getRootCert() const {
00104         return _rootcert;
00105     }
00107     void setRootCert(const std::string& value) {
00108         _rootcert = value;
00109     }
00110 
00112     const std::string& getCertFile() const {
00113         return _certfile;
00114     }
00116     void setCertFile(const std::string& value) {
00117         _certfile = value;
00118     }
00119 
00121     const std::string& getCertDir() const {
00122         return _certdir;
00123     }
00125     void setCertDir(const std::string& value) {
00126         _certdir = value;
00127     }
00128 
00131     void dump() const { dump(std::cerr); }
00132     
00134     void dump(std::ostream& os) const;
00135     
00136   private:
00139     std::string _wwwroot;
00140     
00143     std::string _cgiroot;
00144 
00150     int _port_offset;
00151 
00155     bool _testing;
00156 
00161     bool _threading;
00162 
00168     size_t _fdthread;
00169     
00173     bool _netdebug;
00174 
00178     bool _admin;
00179 
00182     std::string _certfile;
00183 
00186     std::string _certdir;
00187 
00188 };
00189 
00191 inline std::ostream& operator << (std::ostream& os, const CRcInitFile& crcini)
00192 {
00193         crcini.dump(os);
00194         return os;
00195 }
00196 
00197 // End of gnash namespace 
00198 }
00199 
00200 // __CRC_H__
00201 #endif
00202 
00203 
00204 // local Variables:
00205 // mode: C++
00206 // indent-tabs-mode: t
00207 // End:

Generated on Fri Mar 16 2012 15:46:09 for Gnash by  doxygen 1.7.1