Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

multiauthconfig.h

Go to the documentation of this file.
00001 
00006 /*
00007                =.            This file is part of the Opie Project
00008              .=l.            Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org>
00009            .>+-=
00010  _;:,     .>    :=|.         This library is free software; you can 
00011 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00012 :`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00013 .="- .-=="i,     .._         License as published by the Free Software
00014  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00015      ._= =}       :          or (at your option) any later version.
00016     .%`+i>       _;_.        
00017     .i_,=:_.      -<s.       This library is distributed in the hope that  
00018      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00019     : ..    .:,     . . .    without even the implied warranty of
00020     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00021   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00022 ..}^=.=       =       ;      Library General Public License for more
00023 ++=   -.     .`     .:       details.
00024  :     =  ...= . :.=-        
00025  -.   .:....=;==+<;          You should have received a copy of the GNU
00026   -_. . .   )=.  =           Library General Public License along with
00027     --        :-=`           this library; see the file COPYING.LIB. 
00028                              If not, write to the Free Software Foundation,
00029                              Inc., 59 Temple Place - Suite 330,
00030                              Boston, MA 02111-1307, USA.
00031 
00032 */
00033 
00034 #ifndef MULTIAUTHCONFIG_H
00035 #define MULTIAUTHCONFIG_H
00036 
00037 #include <opie2/multiauthplugininterface.h>
00038 #include <opie2/multiauthcommon.h>
00039 
00040 /* OPIE */
00041 #include <opie2/otabwidget.h>
00042 
00043 /* QT */
00044 #include <qdialog.h>
00045 #include <qwidget.h>
00046 #include <qcheckbox.h>
00047 #include <qspinbox.h>
00048 #include <qpe/config.h>
00049 #include <qlistview.h>
00050 #include <qmap.h>
00051 #include <qcombobox.h>
00052 #include <qpushbutton.h>
00053 #include <qmessagebox.h>
00054 #include <qtextstream.h>
00055 
00056 /* UI */
00057 #include "syncbase.h"
00058 #include "loginbase.h"
00059 
00060 class MultiauthConfig;
00061 class MultiauthGeneralConfig;
00062 
00064 class MultiauthGeneralConfig : public QWidget
00065 {
00066     Q_OBJECT
00067 public:
00068     MultiauthGeneralConfig(MultiauthConfig * parentConfig, QWidget * parent, const char * name);
00069     ~MultiauthGeneralConfig();
00070 protected:
00071     QCheckBox *m_onStart, *m_onResume, *m_noProtectConfig, *m_explanScreens;
00072     QSpinBox *m_nbSuccessMin;
00073 private:
00074     friend class MultiauthConfig;
00076     MultiauthConfig *m_parentConfig;
00077     QPushButton *m_tryButton;
00078 private slots:
00079     void tryAuth();
00080 };
00081 
00083 class MultiauthConfig : public QDialog
00084 {
00085     Q_OBJECT
00086     
00087 public:
00088     static QString appName() { return QString::fromLatin1("security"); }
00089     MultiauthConfig(QWidget *parent, const char* name, WFlags fl);
00090     virtual ~MultiauthConfig();
00091     QList<Opie::Security::MultiauthConfigWidget> configWidgetList;
00092     
00093 protected slots:
00094     void accept();
00095     void done(int r); 
00096     void pluginsChanged();
00097     void moveSelectedUp();
00098     void moveSelectedDown();
00099     void writeConfigs();
00100 
00101 private slots:
00102     // Login and Sync stuff
00103     void setSyncNet(const QString&);
00104     void changeLoginName(int);
00105     void toggleAutoLogin(bool);
00106     void restoreDefaults();
00107     void insertDefaultRanges();
00108     void deleteListEntry();
00109 
00110 private:
00111     friend class MultiauthGeneralConfig;
00113     Opie::Ui::OTabWidget *m_mainTW;
00115     QListView *m_pluginListView;
00116     QStringList m_allPlugins, m_excludePlugins;
00117     QMap<QString,QCheckListItem*> m_plugins;
00119     QWidget *m_pluginListWidget;
00121     MultiauthGeneralConfig *m_generalConfig;
00123     LoginBase *m_loginWidget;
00125     SyncBase *m_syncWidget;
00126 
00127     int m_nbSuccessReq;
00128     bool m_plugins_changed;
00129     bool m_pluginsInstalled;
00130     
00131     void readConfig();
00132     void writeConfig();
00133     void loadPlugins();
00134 
00135     // Login and Sync stuff
00136     void loadUsers();
00137     bool telnetAvailable() const;
00138     bool sshAvailable() const;
00139     void updateGUI();
00140 
00141     static void parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits);
00142     void selectNet(int auth_peer,int auth_peer_bits,bool update);
00143 
00144 
00145     bool autoLogin;
00146     QString autoLoginName;
00147 };
00148 
00149 
00150 #endif // MULTIAUTHCONFIG_H
00151 

Generated on Sat Nov 5 16:15:58 2005 for OPIE by  doxygen 1.4.2