/*************************************************************************** * Copyright (C) 2006 by Michael Kaufmann * * michael@enlighter.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * 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., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "../config.h" #endif #ifndef CONFIGWIZARD_H #define CONFIGWIZARD_H #include "configWizardBase.h" #include "authmanager.h" #include #include class configWizard: public configWizardBase { Q_OBJECT public: configWizard( QWidget *parent = 0, const char *name = 0 ); ~configWizard(); bool isConfigFile( const QString & path ); public slots: void scanPlaceToggled( bool ); void newPasswordGUI( bool & cancel, bool & failure, const QString & ressource, QString & passphrase, const QString & message ); protected slots: void scan(); void modify(); void next(); // void slotUrlSelected( const QString & scanPath ); protected: struct mi { QString name; QString host; unsigned int port; QString pwfile; bool management; bool management_query_passwords; bool management_hold; bool auth_retry; QStringList file; }; void scan( const QString & scanPath ); void modify( const QString & ); bool createPasswordFile( const QString & , const QString & ); void debug( const QString & method, const QString & message = "I was called" ); QStringList configOptions; private: authManager * mAuthManager; QStringList mScanResults; QStringList mSelectedFiles; QValueList mUsedPorts; /* Every port can be used once - not more! */ QValueList mReservedPorts; /* This ports are from the existing configurations */ // All configuration parameters. Important to not assigning the same port twice. QMap mConfigurations; /* This port is freely chosen. I've chosen it because it's 10000 above the standard OpenVPN port */ int mStartingPort; }; #endif