-rw-r--r-- | noncore/securityplugins/pin/pin.cpp | 5 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pin.h | 4 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pinConfigWidget.cpp | 2 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pinConfigWidget.h | 2 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pinpluginimpl.cpp | 3 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pinpluginimpl.h | 5 |
6 files changed, 14 insertions, 7 deletions
diff --git a/noncore/securityplugins/pin/pin.cpp b/noncore/securityplugins/pin/pin.cpp index 37dc5be..c21ffcd 100644 --- a/noncore/securityplugins/pin/pin.cpp +++ b/noncore/securityplugins/pin/pin.cpp | |||
@@ -38,14 +38,17 @@ | |||
38 | #include <unistd.h> | 38 | #include <unistd.h> |
39 | #include <stdlib.h> | 39 | #include <stdlib.h> |
40 | #include <time.h> | 40 | #include <time.h> |
41 | 41 | ||
42 | extern "C" char *crypt(const char *key, const char *salt); | 42 | extern "C" char *crypt(const char *key, const char *salt); |
43 | 43 | ||
44 | using Opie::Security::MultiauthConfigWidget; | ||
45 | using Opie::Security::MultiauthPluginObject; | ||
46 | |||
44 | /// set to TRUE when we press the 'Skip' button | 47 | /// set to TRUE when we press the 'Skip' button |
45 | bool isSkip = FALSE; | 48 | static bool isSkip = FALSE; |
46 | 49 | ||
47 | /// PIN input graphical widget. | 50 | /// PIN input graphical widget. |
48 | /** | 51 | /** |
49 | * Inherits the PinDialogBase class defined originally in pinDialogBase.ui interface file. | 52 | * Inherits the PinDialogBase class defined originally in pinDialogBase.ui interface file. |
50 | * \sa PinDlg and PinDialog (the class generated from the .ui file) | 53 | * \sa PinDlg and PinDialog (the class generated from the .ui file) |
51 | * It comes from the original PIN locking code in Opie : | 54 | * It comes from the original PIN locking code in Opie : |
diff --git a/noncore/securityplugins/pin/pin.h b/noncore/securityplugins/pin/pin.h index 6cd328a..1832210 100644 --- a/noncore/securityplugins/pin/pin.h +++ b/noncore/securityplugins/pin/pin.h | |||
@@ -40,19 +40,19 @@ | |||
40 | #include "pinConfigWidget.h" | 40 | #include "pinConfigWidget.h" |
41 | 41 | ||
42 | /// Multi-authentication plugin, implementing a PIN verification. | 42 | /// Multi-authentication plugin, implementing a PIN verification. |
43 | /** | 43 | /** |
44 | * The plugin itself, implementing the main authenticate() function. | 44 | * The plugin itself, implementing the main authenticate() function. |
45 | */ | 45 | */ |
46 | class PinPlugin : public QObject, public MultiauthPluginObject { | 46 | class PinPlugin : public QObject, public Opie::Security::MultiauthPluginObject { |
47 | 47 | ||
48 | Q_OBJECT | 48 | Q_OBJECT |
49 | 49 | ||
50 | public: | 50 | public: |
51 | int authenticate(); | 51 | int authenticate(); |
52 | MultiauthConfigWidget * configWidget(QWidget * parent); | 52 | Opie::Security::MultiauthConfigWidget * configWidget(QWidget * parent); |
53 | QString pixmapNameConfig() const; | 53 | QString pixmapNameConfig() const; |
54 | QString pixmapNameWidget() const; | 54 | QString pixmapNameWidget() const; |
55 | QString pluginName() const; | 55 | QString pluginName() const; |
56 | 56 | ||
57 | private slots: | 57 | private slots: |
58 | QString getPIN( const QString& prompt ); | 58 | QString getPIN( const QString& prompt ); |
diff --git a/noncore/securityplugins/pin/pinConfigWidget.cpp b/noncore/securityplugins/pin/pinConfigWidget.cpp index 53e1a20..b34db8b 100644 --- a/noncore/securityplugins/pin/pinConfigWidget.cpp +++ b/noncore/securityplugins/pin/pinConfigWidget.cpp | |||
@@ -2,12 +2,14 @@ | |||
2 | #include <qlayout.h> | 2 | #include <qlayout.h> |
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <qgroupbox.h> | 4 | #include <qgroupbox.h> |
5 | 5 | ||
6 | #include "pinConfigWidget.h" | 6 | #include "pinConfigWidget.h" |
7 | 7 | ||
8 | using Opie::Security::MultiauthConfigWidget; | ||
9 | |||
8 | PinConfigWidget::PinConfigWidget(QWidget* parent = 0, const char* name = "PIN configuration widget") | 10 | PinConfigWidget::PinConfigWidget(QWidget* parent = 0, const char* name = "PIN configuration widget") |
9 | : MultiauthConfigWidget(parent, name) | 11 | : MultiauthConfigWidget(parent, name) |
10 | { | 12 | { |
11 | QVBoxLayout * baseLayout = new QVBoxLayout( this); | 13 | QVBoxLayout * baseLayout = new QVBoxLayout( this); |
12 | baseLayout->setSpacing(11); | 14 | baseLayout->setSpacing(11); |
13 | baseLayout->setMargin(11); | 15 | baseLayout->setMargin(11); |
diff --git a/noncore/securityplugins/pin/pinConfigWidget.h b/noncore/securityplugins/pin/pinConfigWidget.h index 3242ad0..6d5edff 100644 --- a/noncore/securityplugins/pin/pinConfigWidget.h +++ b/noncore/securityplugins/pin/pinConfigWidget.h | |||
@@ -34,13 +34,13 @@ | |||
34 | #ifndef PINCONFIGWIDGET_H | 34 | #ifndef PINCONFIGWIDGET_H |
35 | #define PINCONFIGWIDGET_H | 35 | #define PINCONFIGWIDGET_H |
36 | #include <qpushbutton.h> | 36 | #include <qpushbutton.h> |
37 | 37 | ||
38 | #include <opie2/multiauthconfigwidget.h> | 38 | #include <opie2/multiauthconfigwidget.h> |
39 | 39 | ||
40 | class PinConfigWidget : public MultiauthConfigWidget { | 40 | class PinConfigWidget : public Opie::Security::MultiauthConfigWidget { |
41 | public: | 41 | public: |
42 | PinConfigWidget(QWidget* parent, const char* name); | 42 | PinConfigWidget(QWidget* parent, const char* name); |
43 | virtual ~PinConfigWidget(); | 43 | virtual ~PinConfigWidget(); |
44 | virtual void writeConfig(); | 44 | virtual void writeConfig(); |
45 | ///\todo to protect? | 45 | ///\todo to protect? |
46 | QPushButton *changePIN; | 46 | QPushButton *changePIN; |
diff --git a/noncore/securityplugins/pin/pinpluginimpl.cpp b/noncore/securityplugins/pin/pinpluginimpl.cpp index 1c32f81..6cd2467 100644 --- a/noncore/securityplugins/pin/pinpluginimpl.cpp +++ b/noncore/securityplugins/pin/pinpluginimpl.cpp | |||
@@ -1,8 +1,11 @@ | |||
1 | #include "pinpluginimpl.h" | 1 | #include "pinpluginimpl.h" |
2 | 2 | ||
3 | using Opie::Security::MultiauthPluginObject; | ||
4 | using Opie::Security::MultiauthPluginInterface; | ||
5 | |||
3 | PinPluginImpl::PinPluginImpl() { | 6 | PinPluginImpl::PinPluginImpl() { |
4 | pinPlugin = new PinPlugin(); | 7 | pinPlugin = new PinPlugin(); |
5 | } | 8 | } |
6 | 9 | ||
7 | PinPluginImpl::~PinPluginImpl() { | 10 | PinPluginImpl::~PinPluginImpl() { |
8 | delete pinPlugin; | 11 | delete pinPlugin; |
diff --git a/noncore/securityplugins/pin/pinpluginimpl.h b/noncore/securityplugins/pin/pinpluginimpl.h index e604b64..cbb9ef0 100644 --- a/noncore/securityplugins/pin/pinpluginimpl.h +++ b/noncore/securityplugins/pin/pinpluginimpl.h | |||
@@ -34,25 +34,24 @@ | |||
34 | #ifndef PIN_PLUGIN_IMPL_H | 34 | #ifndef PIN_PLUGIN_IMPL_H |
35 | #define PIN_PLUGIN_IMPL_H | 35 | #define PIN_PLUGIN_IMPL_H |
36 | 36 | ||
37 | #include "pin.h" | 37 | #include "pin.h" |
38 | 38 | ||
39 | /// Standard multiauth plugin class | 39 | /// Standard multiauth plugin class |
40 | class PinPluginImpl : public MultiauthPluginInterface{ | 40 | class PinPluginImpl : public Opie::Security::MultiauthPluginInterface{ |
41 | 41 | ||
42 | public: | 42 | public: |
43 | PinPluginImpl(); | 43 | PinPluginImpl(); |
44 | virtual ~PinPluginImpl(); | 44 | virtual ~PinPluginImpl(); |
45 | 45 | ||
46 | QRESULT queryInterface( const QUuid &, QUnknownInterface** ); | 46 | QRESULT queryInterface( const QUuid &, QUnknownInterface** ); |
47 | // defines standard addRef() and release() functions | 47 | // defines standard addRef() and release() functions |
48 | Q_REFCOUNT; | 48 | Q_REFCOUNT; |
49 | 49 | ||
50 | virtual MultiauthPluginObject *plugin(); | 50 | virtual Opie::Security::MultiauthPluginObject *plugin(); |
51 | 51 | ||
52 | private: | 52 | private: |
53 | /// the plugin itself | 53 | /// the plugin itself |
54 | PinPlugin *pinPlugin; | 54 | PinPlugin *pinPlugin; |
55 | ulong ref; | ||
56 | }; | 55 | }; |
57 | 56 | ||
58 | #endif | 57 | #endif |