X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=pdns%2Farguments.hh;h=93705958414023edfffbe1a9327dc99decdd061c;hb=a704db08874786f5f6290411e36dfe5dce195214;hp=c62ece7afc3231c37d3127ff85e52d7f40eb8040;hpb=85217c6f8d58de40d3a25dd99353f1eb5c5eb497;p=thirdparty%2Fpdns.git diff --git a/pdns/arguments.hh b/pdns/arguments.hh index c62ece7afc..9370595841 100644 --- a/pdns/arguments.hh +++ b/pdns/arguments.hh @@ -1,21 +1,24 @@ /* - PowerDNS Versatile Database Driven Nameserver - Copyright (C) 2002 PowerDNS.COM BV - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 - as published by the Free Software Foundation - - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ + * This file is part of PowerDNS or dnsdist. + * Copyright -- PowerDNS.COM B.V. and its contributors + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * In addition, for the avoidance of any doubt, permission is granted to + * link this program with OpenSSL and to (re)distribute the binaries + * produced as the result of such linking. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ #ifndef ARGUMENTS_HH #define ARGUMENTS_HH @@ -27,11 +30,9 @@ #include #include "misc.hh" #include "pdnsexception.hh" -#ifndef WIN32 -# include -# include -# include -#endif +#include +#include +#include #include "namespaces.hh" @@ -61,7 +62,7 @@ typedef PDNSException ArgException; R.parse(argc, argv); // read the arguments from main() - cout<<"Will we be a deamon?: "<::const_iterator i; @@ -91,24 +92,23 @@ public: { return file(fname,true); } + bool parseFile(const char *fname, const string& arg, bool lax); // param_t; //!< use this if you need to know the content of the map bool parmIsset(const string &var); //!< Checks if a parameter is set to *a* value bool mustDo(const string &var); //!< if a switch is given, if we must do something (--help) - int asNum(const string &var); //!< return a variable value as a number -#ifndef WIN32 - mode_t asMode(const string &var); //list(); string getHelp(const string &item); @@ -117,6 +117,7 @@ public: const param_t::const_iterator end(); //!< iterator semantics const string &operator[](const string &); //!< iterator semantics const vector&getCommands(); + void gatherIncludes(std::vector &extraConfigs); private: void parseOne(const string &unparsed, const string &parseOnly="", bool lax=false); typedef map params_t;