author | zecke <zecke> | 2004-07-17 16:46:58 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-07-17 16:46:58 (UTC) |
commit | e917f3763a0beb6d540adbfa5f59e478d3baec64 (patch) (unidiff) | |
tree | c2cf3f13559d9693a4f66cd3f65e419b571377bd | |
parent | d6a4bf47ef7dfaabd08fb8d514cde1832a055816 (diff) | |
download | opie-e917f3763a0beb6d540adbfa5f59e478d3baec64.zip opie-e917f3763a0beb6d540adbfa5f59e478d3baec64.tar.gz opie-e917f3763a0beb6d540adbfa5f59e478d3baec64.tar.bz2 |
Addjust to the namespace changes of OMAF
20 files changed, 75 insertions, 51 deletions
diff --git a/noncore/securityplugins/blueping/bluepingplugin.cpp b/noncore/securityplugins/blueping/bluepingplugin.cpp index af0448b..f4c5e95 100644 --- a/noncore/securityplugins/blueping/bluepingplugin.cpp +++ b/noncore/securityplugins/blueping/bluepingplugin.cpp | |||
@@ -12,6 +12,9 @@ | |||
12 | #include <qtimer.h> | 12 | #include <qtimer.h> |
13 | 13 | ||
14 | using namespace Opie::Core; | 14 | using namespace Opie::Core; |
15 | using Opie::Security::MultiauthPluginObject; | ||
16 | using Opie::Security::MultiauthConfigWidget; | ||
17 | |||
15 | 18 | ||
16 | /// creates and initializes the m_config Config object | 19 | /// creates and initializes the m_config Config object |
17 | BluepingPlugin::BluepingPlugin() : MultiauthPluginObject(), m_ping(0) { | 20 | BluepingPlugin::BluepingPlugin() : MultiauthPluginObject(), m_ping(0) { |
diff --git a/noncore/securityplugins/blueping/bluepingplugin.h b/noncore/securityplugins/blueping/bluepingplugin.h index c122471..0df3f78 100644 --- a/noncore/securityplugins/blueping/bluepingplugin.h +++ b/noncore/securityplugins/blueping/bluepingplugin.h | |||
@@ -46,7 +46,7 @@ | |||
46 | /** | 46 | /** |
47 | * The plugin itself, implementing the main authenticate() function. | 47 | * The plugin itself, implementing the main authenticate() function. |
48 | */ | 48 | */ |
49 | class BluepingPlugin : public QObject, public MultiauthPluginObject { | 49 | class BluepingPlugin : public QObject, public Opie::Security::MultiauthPluginObject { |
50 | 50 | ||
51 | Q_OBJECT | 51 | Q_OBJECT |
52 | 52 | ||
@@ -54,7 +54,7 @@ class BluepingPlugin : public QObject, public MultiauthPluginObject { | |||
54 | BluepingPlugin(); | 54 | BluepingPlugin(); |
55 | virtual ~BluepingPlugin(); | 55 | virtual ~BluepingPlugin(); |
56 | int authenticate(); | 56 | int authenticate(); |
57 | MultiauthConfigWidget * configWidget(QWidget * parent); | 57 | Opie::Security::MultiauthConfigWidget * configWidget(QWidget * parent); |
58 | QString pixmapNameConfig() const; | 58 | QString pixmapNameConfig() const; |
59 | QString pixmapNameWidget() const; | 59 | QString pixmapNameWidget() const; |
60 | QString pluginName() const; | 60 | QString pluginName() const; |
diff --git a/noncore/securityplugins/blueping/bluepingpluginimpl.cpp b/noncore/securityplugins/blueping/bluepingpluginimpl.cpp index f7b1bfc..dbca91f 100644 --- a/noncore/securityplugins/blueping/bluepingpluginimpl.cpp +++ b/noncore/securityplugins/blueping/bluepingpluginimpl.cpp | |||
@@ -1,5 +1,8 @@ | |||
1 | #include "bluepingpluginimpl.h" | 1 | #include "bluepingpluginimpl.h" |
2 | 2 | ||
3 | using Opie::Security::MultiauthPluginInterface; | ||
4 | using Opie::Security::MultiauthPluginObject; | ||
5 | |||
3 | BluepingPluginImpl::BluepingPluginImpl() { | 6 | BluepingPluginImpl::BluepingPluginImpl() { |
4 | bluepingPlugin = new BluepingPlugin(); | 7 | bluepingPlugin = new BluepingPlugin(); |
5 | } | 8 | } |
diff --git a/noncore/securityplugins/blueping/bluepingpluginimpl.h b/noncore/securityplugins/blueping/bluepingpluginimpl.h index 2fd023a..4663602 100644 --- a/noncore/securityplugins/blueping/bluepingpluginimpl.h +++ b/noncore/securityplugins/blueping/bluepingpluginimpl.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #include "bluepingplugin.h" | 37 | #include "bluepingplugin.h" |
38 | 38 | ||
39 | /// Standard multiauth plugin class | 39 | /// Standard multiauth plugin class |
40 | class BluepingPluginImpl : public MultiauthPluginInterface{ | 40 | class BluepingPluginImpl : public Opie::Security::MultiauthPluginInterface{ |
41 | 41 | ||
42 | public: | 42 | public: |
43 | BluepingPluginImpl(); | 43 | BluepingPluginImpl(); |
@@ -47,12 +47,11 @@ class BluepingPluginImpl : public MultiauthPluginInterface{ | |||
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 | BluepingPlugin *bluepingPlugin; | 54 | BluepingPlugin *bluepingPlugin; |
55 | ulong ref; | ||
56 | }; | 55 | }; |
57 | 56 | ||
58 | #endif | 57 | #endif |
diff --git a/noncore/securityplugins/dummy/dummyplugin.cpp b/noncore/securityplugins/dummy/dummyplugin.cpp index 0d19e43..594825e 100644 --- a/noncore/securityplugins/dummy/dummyplugin.cpp +++ b/noncore/securityplugins/dummy/dummyplugin.cpp | |||
@@ -7,6 +7,9 @@ | |||
7 | #include <qlabel.h> | 7 | #include <qlabel.h> |
8 | #include <qpushbutton.h> | 8 | #include <qpushbutton.h> |
9 | 9 | ||
10 | using Opie::Security::MultiauthConfigWidget; | ||
11 | using Opie::Security::MultiauthPluginObject; | ||
12 | |||
10 | /// Simply return its name (Dummy plugin) | 13 | /// Simply return its name (Dummy plugin) |
11 | QString DummyPlugin::pluginName() const { | 14 | QString DummyPlugin::pluginName() const { |
12 | return "Dummy plugin"; | 15 | return "Dummy plugin"; |
@@ -54,7 +57,7 @@ int DummyPlugin::authenticate() { | |||
54 | 57 | ||
55 | QRect desk = oApp->desktop()->geometry(); | 58 | QRect desk = oApp->desktop()->geometry(); |
56 | dummyDialog.setGeometry( 0, 0, desk.width(), desk.height() ); | 59 | dummyDialog.setGeometry( 0, 0, desk.width(), desk.height() ); |
57 | 60 | ||
58 | /* Creation of the particular widgets of our Dummy user interface | 61 | /* Creation of the particular widgets of our Dummy user interface |
59 | * Note: we have to resize the VBox to the QDialog size, since it's not | 62 | * Note: we have to resize the VBox to the QDialog size, since it's not |
60 | * done automatically. | 63 | * done automatically. |
@@ -63,7 +66,7 @@ int DummyPlugin::authenticate() { | |||
63 | layout.setSpacing(11); | 66 | layout.setSpacing(11); |
64 | layout.setMargin(11); | 67 | layout.setMargin(11); |
65 | layout.setAlignment( Qt::AlignTop ); | 68 | layout.setAlignment( Qt::AlignTop ); |
66 | 69 | ||
67 | QLabel title("<center><h1>" + tr("\"Dummy\" <br />demonstration plugin") + "</h1></center>", &dummyDialog); | 70 | QLabel title("<center><h1>" + tr("\"Dummy\" <br />demonstration plugin") + "</h1></center>", &dummyDialog); |
68 | QLabel subTitle("<center><h2>" +tr("You can simulate the following outcomes:") + "</h2></center>", &dummyDialog); | 71 | QLabel subTitle("<center><h2>" +tr("You can simulate the following outcomes:") + "</h2></center>", &dummyDialog); |
69 | layout.addWidget(&title); | 72 | layout.addWidget(&title); |
@@ -76,14 +79,14 @@ int DummyPlugin::authenticate() { | |||
76 | hl.addWidget(&pbSuccess, 0, Qt::AlignHCenter); | 79 | hl.addWidget(&pbSuccess, 0, Qt::AlignHCenter); |
77 | hl.addWidget(&pbSkip, 0, Qt::AlignHCenter); | 80 | hl.addWidget(&pbSkip, 0, Qt::AlignHCenter); |
78 | hl.addWidget(&pbFailure, 0, Qt::AlignHCenter); | 81 | hl.addWidget(&pbFailure, 0, Qt::AlignHCenter); |
79 | 82 | ||
80 | /* Linking our pushbuttons to exit functions | 83 | /* Linking our pushbuttons to exit functions |
81 | * (each result button here has a corresponding slot) | 84 | * (each result button here has a corresponding slot) |
82 | */ | 85 | */ |
83 | QObject::connect(&pbSuccess, SIGNAL(clicked()), this, SLOT(success())); | 86 | QObject::connect(&pbSuccess, SIGNAL(clicked()), this, SLOT(success())); |
84 | QObject::connect(&pbFailure, SIGNAL(clicked()), this, SLOT(failure())); | 87 | QObject::connect(&pbFailure, SIGNAL(clicked()), this, SLOT(failure())); |
85 | QObject::connect(&pbSkip, SIGNAL(clicked()), this, SLOT(skip())); | 88 | QObject::connect(&pbSkip, SIGNAL(clicked()), this, SLOT(skip())); |
86 | 89 | ||
87 | /* The value of the signal these three slots will emit corresponds to | 90 | /* The value of the signal these three slots will emit corresponds to |
88 | * the different values we want to return | 91 | * the different values we want to return |
89 | */ | 92 | */ |
diff --git a/noncore/securityplugins/dummy/dummyplugin.h b/noncore/securityplugins/dummy/dummyplugin.h index 9680dff..3bfca98 100644 --- a/noncore/securityplugins/dummy/dummyplugin.h +++ b/noncore/securityplugins/dummy/dummyplugin.h | |||
@@ -42,13 +42,13 @@ | |||
42 | /** | 42 | /** |
43 | * The plugin itself, implementing the main authenticate() function. | 43 | * The plugin itself, implementing the main authenticate() function. |
44 | */ | 44 | */ |
45 | class DummyPlugin : public QObject, public MultiauthPluginObject { | 45 | class DummyPlugin : public QObject, public Opie::Security::MultiauthPluginObject { |
46 | 46 | ||
47 | Q_OBJECT | 47 | Q_OBJECT |
48 | 48 | ||
49 | public: | 49 | public: |
50 | int authenticate(); | 50 | int authenticate(); |
51 | MultiauthConfigWidget * configWidget(QWidget * parent); | 51 | Opie::Security::MultiauthConfigWidget * configWidget(QWidget * parent); |
52 | QString pixmapNameConfig() const; | 52 | QString pixmapNameConfig() const; |
53 | QString pixmapNameWidget() const; | 53 | QString pixmapNameWidget() const; |
54 | QString pluginName() const; | 54 | QString pluginName() const; |
diff --git a/noncore/securityplugins/dummy/dummypluginimpl.cpp b/noncore/securityplugins/dummy/dummypluginimpl.cpp index 518996c..54dbdd1 100644 --- a/noncore/securityplugins/dummy/dummypluginimpl.cpp +++ b/noncore/securityplugins/dummy/dummypluginimpl.cpp | |||
@@ -1,5 +1,8 @@ | |||
1 | #include "dummypluginimpl.h" | 1 | #include "dummypluginimpl.h" |
2 | 2 | ||
3 | using Opie::Security::MultiauthPluginInterface; | ||
4 | using Opie::Security::MultiauthPluginObject; | ||
5 | |||
3 | DummyPluginImpl::DummyPluginImpl() { | 6 | DummyPluginImpl::DummyPluginImpl() { |
4 | dummyPlugin = new DummyPlugin(); | 7 | dummyPlugin = new DummyPlugin(); |
5 | } | 8 | } |
diff --git a/noncore/securityplugins/dummy/dummypluginimpl.h b/noncore/securityplugins/dummy/dummypluginimpl.h index 49a18cd..ce8620d 100644 --- a/noncore/securityplugins/dummy/dummypluginimpl.h +++ b/noncore/securityplugins/dummy/dummypluginimpl.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #include "dummyplugin.h" | 37 | #include "dummyplugin.h" |
38 | 38 | ||
39 | /// Standard multiauth plugin class | 39 | /// Standard multiauth plugin class |
40 | class DummyPluginImpl : public MultiauthPluginInterface{ | 40 | class DummyPluginImpl : public Opie::Security::MultiauthPluginInterface{ |
41 | 41 | ||
42 | public: | 42 | public: |
43 | DummyPluginImpl(); | 43 | DummyPluginImpl(); |
@@ -47,12 +47,11 @@ class DummyPluginImpl : public MultiauthPluginInterface{ | |||
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 | DummyPlugin *dummyPlugin; | 54 | DummyPlugin *dummyPlugin; |
55 | ulong ref; | ||
56 | }; | 55 | }; |
57 | 56 | ||
58 | #endif | 57 | #endif |
diff --git a/noncore/securityplugins/notice/noticeConfigWidget.cpp b/noncore/securityplugins/notice/noticeConfigWidget.cpp index e2c2d83..e532232 100644 --- a/noncore/securityplugins/notice/noticeConfigWidget.cpp +++ b/noncore/securityplugins/notice/noticeConfigWidget.cpp | |||
@@ -8,6 +8,8 @@ | |||
8 | #include <qregexp.h> | 8 | #include <qregexp.h> |
9 | #include <qgroupbox.h> | 9 | #include <qgroupbox.h> |
10 | 10 | ||
11 | using Opie::Security::MultiauthConfigWidget; | ||
12 | |||
11 | /// constructs the widget, filling the noticeMLE QMultiLineEdit with the "noticeText" entry | 13 | /// constructs the widget, filling the noticeMLE QMultiLineEdit with the "noticeText" entry |
12 | NoticeConfigWidget::NoticeConfigWidget(QWidget* parent = 0, const char* name = "Notice configuration widget") : MultiauthConfigWidget(parent, name) | 14 | NoticeConfigWidget::NoticeConfigWidget(QWidget* parent = 0, const char* name = "Notice configuration widget") : MultiauthConfigWidget(parent, name) |
13 | { | 15 | { |
@@ -46,7 +48,7 @@ NoticeConfigWidget::~NoticeConfigWidget() | |||
46 | /// write the notice text in the multiauth.conf Config file | 48 | /// write the notice text in the multiauth.conf Config file |
47 | void NoticeConfigWidget::writeConfig() | 49 | void NoticeConfigWidget::writeConfig() |
48 | { | 50 | { |
49 | if ( noticeMLE->edited() ) { | 51 | if ( noticeMLE->edited() ) { |
50 | odebug << "writing new notice text in Security.conf" << oendl; | 52 | odebug << "writing new notice text in Security.conf" << oendl; |
51 | setNoticeText(noticeMLE->text()); | 53 | setNoticeText(noticeMLE->text()); |
52 | } | 54 | } |
diff --git a/noncore/securityplugins/notice/noticeConfigWidget.h b/noncore/securityplugins/notice/noticeConfigWidget.h index 69f15bf..c90484c 100644 --- a/noncore/securityplugins/notice/noticeConfigWidget.h +++ b/noncore/securityplugins/notice/noticeConfigWidget.h | |||
@@ -7,24 +7,24 @@ | |||
7 | =. This file is part of the Opie Project | 7 | =. This file is part of the Opie Project |
8 | .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> | 8 | .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> |
9 | .>+-= | 9 | .>+-= |
10 | _;:, .> :=|. This library is free software; you can | 10 | _;:, .> :=|. This library is free software; you can |
11 | .> <`_, > . <= redistribute it and/or modify it under | 11 | .> <`_, > . <= redistribute it and/or modify it under |
12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
13 | .="- .-=="i, .._ License as published by the Free Software | 13 | .="- .-=="i, .._ License as published by the Free Software |
14 | - . .-<_> .<> Foundation; either version 2 of the License, | 14 | - . .-<_> .<> Foundation; either version 2 of the License, |
15 | ._= =} : or (at your option) any later version. | 15 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 16 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This library is distributed in the hope that | 17 | .i_,=:_. -<s. This library is distributed in the hope that |
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; Library General Public License for more | 22 | ..}^=.= = ; Library General Public License for more |
23 | ++= -. .` .: details. | 23 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 25 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 26 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 27 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
@@ -48,8 +48,8 @@ static char defaultNoticeText [] = "<h2>NOTICE TO USERS</h2>\n" | |||
48 | "disciplinary action and civil and criminal penalties. <em>By continuing to use " | 48 | "disciplinary action and civil and criminal penalties. <em>By continuing to use " |
49 | "this system you indicate your awareness of and consent to these " | 49 | "this system you indicate your awareness of and consent to these " |
50 | "terms. LOG OFF IMMEDIATELY if you do not agree to them.</em></strong></p>"; | 50 | "terms. LOG OFF IMMEDIATELY if you do not agree to them.</em></strong></p>"; |
51 | 51 | ||
52 | class NoticeConfigWidget : public MultiauthConfigWidget { | 52 | class NoticeConfigWidget : public Opie::Security::MultiauthConfigWidget { |
53 | 53 | ||
54 | Q_OBJECT | 54 | Q_OBJECT |
55 | 55 | ||
@@ -69,3 +69,4 @@ private: | |||
69 | }; | 69 | }; |
70 | 70 | ||
71 | #endif // NOTICECONFIGWIDGET_H | 71 | #endif // NOTICECONFIGWIDGET_H |
72 | |||
diff --git a/noncore/securityplugins/notice/noticeplugin.cpp b/noncore/securityplugins/notice/noticeplugin.cpp index bacc439..25a452a 100644 --- a/noncore/securityplugins/notice/noticeplugin.cpp +++ b/noncore/securityplugins/notice/noticeplugin.cpp | |||
@@ -5,6 +5,8 @@ | |||
5 | #include <qmessagebox.h> | 5 | #include <qmessagebox.h> |
6 | #include <qregexp.h> | 6 | #include <qregexp.h> |
7 | 7 | ||
8 | using Opie::Security::MultiauthPluginObject; | ||
9 | using Opie::Security::MultiauthConfigWidget; | ||
8 | 10 | ||
9 | /// creates and initializes the m_config Config object | 11 | /// creates and initializes the m_config Config object |
10 | NoticePlugin::NoticePlugin() : MultiauthPluginObject(), noticeW(0) { | 12 | NoticePlugin::NoticePlugin() : MultiauthPluginObject(), noticeW(0) { |
@@ -61,10 +63,10 @@ int NoticePlugin::authenticate() { | |||
61 | Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WStyle_StaysOnTop); | 63 | Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WStyle_StaysOnTop); |
62 | 64 | ||
63 | noticeDialog.setButtonText(QMessageBox::Yes, tr("I accept")); | 65 | noticeDialog.setButtonText(QMessageBox::Yes, tr("I accept")); |
64 | 66 | ||
65 | QRect desk = oApp->desktop()->geometry(); | 67 | QRect desk = oApp->desktop()->geometry(); |
66 | noticeDialog.setGeometry( 0, 0, desk.width(), desk.height() ); | 68 | noticeDialog.setGeometry( 0, 0, desk.width(), desk.height() ); |
67 | 69 | ||
68 | switch (noticeDialog.exec()) | 70 | switch (noticeDialog.exec()) |
69 | { | 71 | { |
70 | case QMessageBox::Yes: | 72 | case QMessageBox::Yes: |
diff --git a/noncore/securityplugins/notice/noticeplugin.h b/noncore/securityplugins/notice/noticeplugin.h index 842d47b..4aa6f02 100644 --- a/noncore/securityplugins/notice/noticeplugin.h +++ b/noncore/securityplugins/notice/noticeplugin.h | |||
@@ -43,7 +43,7 @@ | |||
43 | /** | 43 | /** |
44 | * The plugin itself, implementing the main authenticate() function. | 44 | * The plugin itself, implementing the main authenticate() function. |
45 | */ | 45 | */ |
46 | class NoticePlugin : public QObject, public MultiauthPluginObject { | 46 | class NoticePlugin : public QObject, public Opie::Security::MultiauthPluginObject { |
47 | 47 | ||
48 | Q_OBJECT; | 48 | Q_OBJECT; |
49 | 49 | ||
@@ -51,7 +51,7 @@ public: | |||
51 | NoticePlugin(); | 51 | NoticePlugin(); |
52 | virtual ~NoticePlugin(); | 52 | virtual ~NoticePlugin(); |
53 | int authenticate(); | 53 | int authenticate(); |
54 | MultiauthConfigWidget * configWidget(QWidget * parent); | 54 | Opie::Security::MultiauthConfigWidget * configWidget(QWidget * parent); |
55 | QString pixmapNameConfig() const; | 55 | QString pixmapNameConfig() const; |
56 | QString pixmapNameWidget() const; | 56 | QString pixmapNameWidget() const; |
57 | QString pluginName() const; | 57 | QString pluginName() const; |
diff --git a/noncore/securityplugins/notice/noticepluginimpl.cpp b/noncore/securityplugins/notice/noticepluginimpl.cpp index 34e3cfc..7524512 100644 --- a/noncore/securityplugins/notice/noticepluginimpl.cpp +++ b/noncore/securityplugins/notice/noticepluginimpl.cpp | |||
@@ -1,5 +1,8 @@ | |||
1 | #include "noticepluginimpl.h" | 1 | #include "noticepluginimpl.h" |
2 | 2 | ||
3 | using Opie::Security::MultiauthPluginObject; | ||
4 | using Opie::Security::MultiauthPluginInterface; | ||
5 | |||
3 | NoticePluginImpl::NoticePluginImpl() { | 6 | NoticePluginImpl::NoticePluginImpl() { |
4 | noticePlugin = new NoticePlugin(); | 7 | noticePlugin = new NoticePlugin(); |
5 | } | 8 | } |
diff --git a/noncore/securityplugins/notice/noticepluginimpl.h b/noncore/securityplugins/notice/noticepluginimpl.h index b2a1140..1b1e22f 100644 --- a/noncore/securityplugins/notice/noticepluginimpl.h +++ b/noncore/securityplugins/notice/noticepluginimpl.h | |||
@@ -39,7 +39,7 @@ | |||
39 | /** | 39 | /** |
40 | * \brief Standard multiauth plugin class | 40 | * \brief Standard multiauth plugin class |
41 | */ | 41 | */ |
42 | class NoticePluginImpl : public MultiauthPluginInterface{ | 42 | class NoticePluginImpl : public Opie::Security::MultiauthPluginInterface{ |
43 | 43 | ||
44 | public: | 44 | public: |
45 | NoticePluginImpl(); | 45 | NoticePluginImpl(); |
@@ -49,12 +49,11 @@ class NoticePluginImpl : public MultiauthPluginInterface{ | |||
49 | /// defines standard addRef() and release() functions | 49 | /// defines standard addRef() and release() functions |
50 | Q_REFCOUNT; | 50 | Q_REFCOUNT; |
51 | 51 | ||
52 | virtual MultiauthPluginObject *plugin(); | 52 | virtual Opie::Security::MultiauthPluginObject *plugin(); |
53 | 53 | ||
54 | private: | 54 | private: |
55 | /// the plugin itself | 55 | /// the plugin itself |
56 | NoticePlugin *noticePlugin; | 56 | NoticePlugin *noticePlugin; |
57 | ulong ref; | ||
58 | }; | 57 | }; |
59 | 58 | ||
60 | #endif | 59 | #endif |
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 | |||
@@ -41,8 +41,11 @@ | |||
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 | /** |
@@ -232,10 +235,10 @@ QString PinPlugin::getPIN( const QString& prompt ) | |||
232 | { | 235 | { |
233 | PinDlg pd(0,0,TRUE); | 236 | PinDlg pd(0,0,TRUE); |
234 | pd.pinD->setPrompt( prompt ); | 237 | pd.pinD->setPrompt( prompt ); |
235 | 238 | ||
236 | pd.showMaximized(); | 239 | pd.showMaximized(); |
237 | int r = pd.exec(); | 240 | int r = pd.exec(); |
238 | 241 | ||
239 | if ( r == QDialog::Accepted ) { | 242 | if ( r == QDialog::Accepted ) { |
240 | if (pd.pinD->text.isEmpty()) | 243 | if (pd.pinD->text.isEmpty()) |
241 | return ""; | 244 | return ""; |
@@ -302,13 +305,13 @@ int PinPlugin::authenticate() | |||
302 | PinDlg pd(0,0,TRUE,TRUE); | 305 | PinDlg pd(0,0,TRUE,TRUE); |
303 | pd.reset(); | 306 | pd.reset(); |
304 | pd.exec(); | 307 | pd.exec(); |
305 | 308 | ||
306 | // analyse the result | 309 | // analyse the result |
307 | if (isSkip == TRUE) | 310 | if (isSkip == TRUE) |
308 | return MultiauthPluginObject::Skip; | 311 | return MultiauthPluginObject::Skip; |
309 | else if (verify(pd.pinD->text, hashedPin)) | 312 | else if (verify(pd.pinD->text, hashedPin)) |
310 | return MultiauthPluginObject::Success; | 313 | return MultiauthPluginObject::Success; |
311 | else | 314 | else |
312 | return MultiauthPluginObject::Failure; | 315 | return MultiauthPluginObject::Failure; |
313 | } | 316 | } |
314 | owarn << "No PIN has been defined! We consider it as a successful authentication though." << oendl; | 317 | owarn << "No PIN has been defined! We consider it as a successful authentication though." << oendl; |
@@ -331,10 +334,10 @@ QString PinPlugin::pixmapNameConfig() const { | |||
331 | /// returns a PinConfigWidget | 334 | /// returns a PinConfigWidget |
332 | MultiauthConfigWidget * PinPlugin::configWidget(QWidget * parent) { | 335 | MultiauthConfigWidget * PinPlugin::configWidget(QWidget * parent) { |
333 | PinConfigWidget * pinw = new PinConfigWidget(parent, "PIN configuration widget"); | 336 | PinConfigWidget * pinw = new PinConfigWidget(parent, "PIN configuration widget"); |
334 | 337 | ||
335 | connect(pinw->changePIN, SIGNAL( clicked() ), this, SLOT( changePIN() )); | 338 | connect(pinw->changePIN, SIGNAL( clicked() ), this, SLOT( changePIN() )); |
336 | connect(pinw->clearPIN, SIGNAL( clicked() ), this, SLOT( clearPIN() )); | 339 | connect(pinw->clearPIN, SIGNAL( clicked() ), this, SLOT( clearPIN() )); |
337 | 340 | ||
338 | return pinw; | 341 | return pinw; |
339 | } | 342 | } |
340 | 343 | ||
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 | |||
@@ -43,13 +43,13 @@ | |||
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; |
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 | |||
@@ -5,6 +5,8 @@ | |||
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 | { |
@@ -12,7 +14,7 @@ PinConfigWidget::PinConfigWidget(QWidget* parent = 0, const char* name = "PIN co | |||
12 | baseLayout->setSpacing(11); | 14 | baseLayout->setSpacing(11); |
13 | baseLayout->setMargin(11); | 15 | baseLayout->setMargin(11); |
14 | baseLayout->setAlignment( Qt::AlignTop ); | 16 | baseLayout->setAlignment( Qt::AlignTop ); |
15 | 17 | ||
16 | QGroupBox * configBox = new QGroupBox(0, Qt::Vertical, tr("Configure your PIN here"), this); | 18 | QGroupBox * configBox = new QGroupBox(0, Qt::Vertical, tr("Configure your PIN here"), this); |
17 | baseLayout->addWidget(configBox); | 19 | baseLayout->addWidget(configBox); |
18 | QVBoxLayout *boxLayout = new QVBoxLayout( configBox->layout() ); | 20 | QVBoxLayout *boxLayout = new QVBoxLayout( configBox->layout() ); |
@@ -27,7 +29,7 @@ PinConfigWidget::PinConfigWidget(QWidget* parent = 0, const char* name = "PIN co | |||
27 | buttonLayout->addWidget(changePIN); | 29 | buttonLayout->addWidget(changePIN); |
28 | buttonLayout->addWidget(clearPIN); | 30 | buttonLayout->addWidget(clearPIN); |
29 | boxLayout->addLayout(buttonLayout); | 31 | boxLayout->addLayout(buttonLayout); |
30 | 32 | ||
31 | } | 33 | } |
32 | 34 | ||
33 | /// nothing to do | 35 | /// nothing to do |
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 | |||
@@ -7,24 +7,24 @@ | |||
7 | =. This file is part of the Opie Project | 7 | =. This file is part of the Opie Project |
8 | .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> | 8 | .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> |
9 | .>+-= | 9 | .>+-= |
10 | _;:, .> :=|. This library is free software; you can | 10 | _;:, .> :=|. This library is free software; you can |
11 | .> <`_, > . <= redistribute it and/or modify it under | 11 | .> <`_, > . <= redistribute it and/or modify it under |
12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
13 | .="- .-=="i, .._ License as published by the Free Software | 13 | .="- .-=="i, .._ License as published by the Free Software |
14 | - . .-<_> .<> Foundation; either version 2 of the License, | 14 | - . .-<_> .<> Foundation; either version 2 of the License, |
15 | ._= =} : or (at your option) any later version. | 15 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 16 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This library is distributed in the hope that | 17 | .i_,=:_. -<s. This library is distributed in the hope that |
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; Library General Public License for more | 22 | ..}^=.= = ; Library General Public License for more |
23 | ++= -. .` .: details. | 23 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 25 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 26 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 27 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
@@ -37,15 +37,15 @@ | |||
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; |
47 | QPushButton *clearPIN; | 47 | QPushButton *clearPIN; |
48 | 48 | ||
49 | }; | 49 | }; |
50 | 50 | ||
51 | #endif // PINCONFIGWIDGET_H | 51 | #endif // PINCONFIGWIDGET_H |
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,5 +1,8 @@ | |||
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 | } |
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 | |||
@@ -37,7 +37,7 @@ | |||
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(); |
@@ -47,12 +47,11 @@ class PinPluginImpl : public MultiauthPluginInterface{ | |||
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 |