Diffstat (limited to 'noncore/securityplugins/notice') (more/less context) (show whitespace changes)
6 files changed, 13 insertions, 6 deletions
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 | ||