"Fossies" - the Fresh Open Source Software Archive

Member "hermes-1.9/src/Configfile.h.in" (29 Jun 2014, 1463 Bytes) of package /linux/privat/hermes-1.9.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 /**
    2  * hermes antispam proxy
    3  * Copyright (C) 2006, 2007 Juan José Gutiérrez de Quevedo <juanjo@gutierrezdequevedo.com>
    4  *
    5  * This program is free software; you can redistribute it and/or modify
    6  * it under the terms of the GNU General Public License as published by
    7  * the Free Software Foundation; version 2 of the License
    8  *
    9  * This program is distributed in the hope that it will be useful,
   10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   12  * GNU General Public License for more details.
   13  *
   14  * You should have received a copy of the GNU General Public License along
   15  * with this program; if not, write to the Free Software Foundation, Inc.,
   16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
   17  *
   18  * @author Juan José Gutiérrez de Quevedo <juanjo@gutierrezdequevedo.com>
   19  */
   20 #ifndef CONFIGFILE_H
   21 #define CONFIGFILE_H
   22 
   23 #include "hermes.h"
   24 #include <list>
   25 #include <string>
   26 #include <iostream>
   27 #include <fstream>
   28 
   29 #include "Utils.h"
   30 
   31 using namespace std;
   32 
   33 class Configfile
   34 {
   35   private:
   36     static string parseAsString(string);
   37     static bool parseAsBool(string);
   38     static long parseAsInt(string);
   39     static list<string> parseAsList(string);
   40     int uid;
   41     int gid;
   42     %templ_privateattribs%
   43   public:
   44     Configfile();
   45     void parse(string);
   46     void validateConfig();
   47     int getUid();
   48     int getGid();
   49     %templ_publicmethods%
   50 };
   51 
   52 #endif //CONFIGFILE_H