-rw-r--r-- | core/settings/security/demo/config.in | 4 | ||||
-rw-r--r-- | core/settings/security/demo/main.cpp | 34 | ||||
-rw-r--r-- | core/settings/security/demo/multiauth.control | 13 | ||||
-rw-r--r-- | core/settings/security/demo/multiauth.pro | 17 |
4 files changed, 68 insertions, 0 deletions
diff --git a/core/settings/security/demo/config.in b/core/settings/security/demo/config.in new file mode 100644 index 0000000..d867014 --- a/dev/null +++ b/core/settings/security/demo/config.in | |||
@@ -0,0 +1,4 @@ | |||
1 | config MULTIAUTH_DEMO | ||
2 | boolean "opie-security multiauth demo (provides several ways to lock and unlock the device)" | ||
3 | default "y" | ||
4 | depends SECURITY | ||
diff --git a/core/settings/security/demo/main.cpp b/core/settings/security/demo/main.cpp new file mode 100644 index 0000000..4ae76e4 --- a/dev/null +++ b/core/settings/security/demo/main.cpp | |||
@@ -0,0 +1,34 @@ | |||
1 | #include <opie2/multiauthmainwindow.h> | ||
2 | #include <opie2/multiauthcommon.h> | ||
3 | |||
4 | #include <opie2/oapplication.h> | ||
5 | |||
6 | /// main() function of the opie-multiauth-standalone demonstration application | ||
7 | /** | ||
8 | * Calls each plugin one after the other, and asks them to perform one authentication. | ||
9 | * It loads the plugins one after another through the MultiauthPluginInterface, | ||
10 | * then calls MultiauthPluginObject::authenticate(). | ||
11 | * \em Note: calls are not parsed by doxygen since they are done via a QInterfacePtr: | ||
12 | * \see http://dudu.dyn.2-h.org/nist/doxydoc/allOpie//classQInterfacePtr.html | ||
13 | */ | ||
14 | int main( int argc, char ** argv ) | ||
15 | { | ||
16 | Opie::Core::OApplication app(argc, argv, "Multi-authentication demo"); | ||
17 | |||
18 | /* Constructs the main window, which displays messages and blocks | ||
19 | * access to the desktop | ||
20 | */ | ||
21 | Opie::Security::MultiauthMainWindow win; | ||
22 | |||
23 | app.showMainWidget(&win); | ||
24 | |||
25 | // resize the QDialog object so it fills all the screen | ||
26 | QRect desk = qApp->desktop()->geometry(); | ||
27 | win.setGeometry( 0, 0, desk.width(), desk.height() ); | ||
28 | |||
29 | // the authentication has already succeeded (without win interactions) | ||
30 | if ( win.isAlreadyDone() ) | ||
31 | return 0; | ||
32 | |||
33 | return app.exec(); | ||
34 | } | ||
diff --git a/core/settings/security/demo/multiauth.control b/core/settings/security/demo/multiauth.control new file mode 100644 index 0000000..9b4d554 --- a/dev/null +++ b/core/settings/security/demo/multiauth.control | |||
@@ -0,0 +1,13 @@ | |||
1 | Package: opie-multiauth | ||
2 | Files: bin/multiauth apps/Applications/multiauth.desktop pics/security/multiauth.png | ||
3 | Priority: optional | ||
4 | Section: opie/settings | ||
5 | Maintainer: Clement Seveillac <clement@nist.gov> | ||
6 | Architecture: arm | ||
7 | Version: 0.0.1.13 | ||
8 | Depends: opie-security | ||
9 | Description: multi-plugin authentication demonstrator for Opie. | ||
10 | This demonstration application allows us to use one or several | ||
11 | ways to lock and unlock our device. | ||
12 | You must install some opie-multiauth-* plugins, and configure | ||
13 | them through opie-security, to really see its possibilities. | ||
diff --git a/core/settings/security/demo/multiauth.pro b/core/settings/security/demo/multiauth.pro new file mode 100644 index 0000000..ef931a5 --- a/dev/null +++ b/core/settings/security/demo/multiauth.pro | |||
@@ -0,0 +1,17 @@ | |||
1 | TEMPLATE = app | ||
2 | CONFIG += qt warn_on | ||
3 | |||
4 | HEADERS = | ||
5 | SOURCES = main.cpp | ||
6 | |||
7 | INCLUDEPATH += $(OPIEDIR)/include | ||
8 | DEPENDPATH += | ||
9 | |||
10 | LIBS += -lqpe -lopiecore2 -lopieui2 -lopiesecurity2 | ||
11 | |||
12 | DESTDIR = $(OPIEDIR)/bin | ||
13 | TARGET = multiauth | ||
14 | |||
15 | include ( $(OPIEDIR)/include.pro ) | ||
16 | |||
17 | |||