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, 47 insertions, 23 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 | |||
@@ -9,12 +9,15 @@ | |||
9 | #include <qhbox.h> | 9 | #include <qhbox.h> |
10 | #include <qlabel.h> | 10 | #include <qlabel.h> |
11 | #include <qpushbutton.h> | 11 | #include <qpushbutton.h> |
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) { |
18 | m_config = new Config("Security"); | 21 | m_config = new Config("Security"); |
19 | m_config->setGroup("BluepingPlugin"); | 22 | m_config->setGroup("BluepingPlugin"); |
20 | bluetoothAlreadyRestarted = false; | 23 | bluetoothAlreadyRestarted = false; |
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 | |||
@@ -43,21 +43,21 @@ | |||
43 | #include <qpe/config.h> | 43 | #include <qpe/config.h> |
44 | 44 | ||
45 | /// Multi-authentication bluetooth plugin, which tries to ping a specific MAC address. | 45 | /// Multi-authentication bluetooth plugin, which tries to ping a specific MAC address. |
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 | ||
53 | public: | 53 | public: |
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; |
61 | 61 | ||
62 | signals: | 62 | signals: |
63 | /// Signal carrying the result code of this plugin | 63 | /// Signal carrying the result code of this plugin |
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,8 +1,11 @@ | |||
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 | } |
6 | 9 | ||
7 | BluepingPluginImpl::~BluepingPluginImpl() { | 10 | BluepingPluginImpl::~BluepingPluginImpl() { |
8 | delete bluepingPlugin; | 11 | delete bluepingPlugin; |
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 | |||
@@ -34,25 +34,24 @@ | |||
34 | #ifndef BLUEPING_PLUGIN_IMPL_H | 34 | #ifndef BLUEPING_PLUGIN_IMPL_H |
35 | #define BLUEPING_PLUGIN_IMPL_H | 35 | #define BLUEPING_PLUGIN_IMPL_H |
36 | 36 | ||
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(); |
44 | virtual ~BluepingPluginImpl(); | 44 | virtual ~BluepingPluginImpl(); |
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 | 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 | |||
@@ -4,12 +4,15 @@ | |||
4 | 4 | ||
5 | #include <qdialog.h> | 5 | #include <qdialog.h> |
6 | #include <qlayout.h> | 6 | #include <qlayout.h> |
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"; |
13 | } | 16 | } |
14 | 17 | ||
15 | /// no configuration widget for the moment | 18 | /// no configuration widget for the moment |
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 | |||
@@ -39,19 +39,19 @@ | |||
39 | #include <opie2/multiauthplugininterface.h> | 39 | #include <opie2/multiauthplugininterface.h> |
40 | 40 | ||
41 | /// Multi-authentication example plugin, implementing a trivial 'yes/no' verification. | 41 | /// Multi-authentication example plugin, implementing a trivial 'yes/no' verification. |
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; |
55 | 55 | ||
56 | signals: | 56 | signals: |
57 | /// Signal carrying the result code of this plugin | 57 | /// Signal carrying the result code of this plugin |
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,8 +1,11 @@ | |||
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 | } |
6 | 9 | ||
7 | DummyPluginImpl::~DummyPluginImpl() { | 10 | DummyPluginImpl::~DummyPluginImpl() { |
8 | delete dummyPlugin; | 11 | delete dummyPlugin; |
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 | |||
@@ -34,25 +34,24 @@ | |||
34 | #ifndef DUMMY_PLUGIN_IMPL_H | 34 | #ifndef DUMMY_PLUGIN_IMPL_H |
35 | #define DUMMY_PLUGIN_IMPL_H | 35 | #define DUMMY_PLUGIN_IMPL_H |
36 | 36 | ||
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(); |
44 | virtual ~DummyPluginImpl(); | 44 | virtual ~DummyPluginImpl(); |
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 | 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 | |||
@@ -5,12 +5,14 @@ | |||
5 | #include <qwidget.h> | 5 | #include <qwidget.h> |
6 | #include <qlayout.h> | 6 | #include <qlayout.h> |
7 | #include <qlabel.h> | 7 | #include <qlabel.h> |
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 | { |
14 | QVBoxLayout *baseLayout = new QVBoxLayout( this); | 16 | QVBoxLayout *baseLayout = new QVBoxLayout( this); |
15 | baseLayout->setSpacing(11); | 17 | baseLayout->setSpacing(11); |
16 | baseLayout->setMargin(6); | 18 | baseLayout->setMargin(6); |
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 | |||
@@ -46,13 +46,13 @@ static char defaultNoticeText [] = "<h2>NOTICE TO USERS</h2>\n" | |||
46 | "use only. Users have no expectation of privacy.</p>\n" | 46 | "use only. Users have no expectation of privacy.</p>\n" |
47 | "<p><strong>Unauthorized or improper use of this system may result in " | 47 | "<p><strong>Unauthorized or improper use of this system may result in " |
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 | ||
56 | public: | 56 | public: |
57 | NoticeConfigWidget(QWidget* parent, const char* name); | 57 | NoticeConfigWidget(QWidget* parent, const char* name); |
58 | virtual ~NoticeConfigWidget(); | 58 | virtual ~NoticeConfigWidget(); |
@@ -66,6 +66,7 @@ private: | |||
66 | Config * m_config; | 66 | Config * m_config; |
67 | QString getNoticeText(); | 67 | QString getNoticeText(); |
68 | void setNoticeText(QString noticeText); | 68 | void setNoticeText(QString noticeText); |
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 | |||
@@ -2,12 +2,14 @@ | |||
2 | 2 | ||
3 | #include <opie2/oapplication.h> | 3 | #include <opie2/oapplication.h> |
4 | 4 | ||
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) { |
11 | m_config = new Config("Security"); | 13 | m_config = new Config("Security"); |
12 | m_config->setGroup("NoticePlugin"); | 14 | m_config->setGroup("NoticePlugin"); |
13 | } | 15 | } |
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 | |||
@@ -40,21 +40,21 @@ | |||
40 | #include "noticeConfigWidget.h" | 40 | #include "noticeConfigWidget.h" |
41 | 41 | ||
42 | /// Multi-authentication plugin, having the user accept a (legal, etc.) notice text. | 42 | /// Multi-authentication plugin, having the user accept a (legal, etc.) notice text. |
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 | ||
50 | public: | 50 | 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; |
58 | private: | 58 | private: |
59 | NoticeConfigWidget * noticeW; | 59 | NoticeConfigWidget * noticeW; |
60 | Config * m_config; | 60 | Config * m_config; |
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,8 +1,11 @@ | |||
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 | } |
6 | 9 | ||
7 | NoticePluginImpl::~NoticePluginImpl() { | 10 | NoticePluginImpl::~NoticePluginImpl() { |
8 | delete noticePlugin; | 11 | delete noticePlugin; |
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 | |||
@@ -36,26 +36,25 @@ | |||
36 | 36 | ||
37 | #include "noticeplugin.h" | 37 | #include "noticeplugin.h" |
38 | 38 | ||
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(); |
46 | virtual ~NoticePluginImpl(); | 46 | virtual ~NoticePluginImpl(); |
47 | 47 | ||
48 | QRESULT queryInterface( const QUuid &, QUnknownInterface** ); | 48 | QRESULT queryInterface( const QUuid &, QUnknownInterface** ); |
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 |
61 | 60 | ||
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 |