summaryrefslogtreecommitdiff
path: root/core/settings/security/demo/main.cpp
Side-by-side diff
Diffstat (limited to 'core/settings/security/demo/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/security/demo/main.cpp34
1 files changed, 34 insertions, 0 deletions
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 @@
+#include <opie2/multiauthmainwindow.h>
+#include <opie2/multiauthcommon.h>
+
+#include <opie2/oapplication.h>
+
+/// main() function of the opie-multiauth-standalone demonstration application
+/**
+ * Calls each plugin one after the other, and asks them to perform one authentication.
+ * It loads the plugins one after another through the MultiauthPluginInterface,
+ * then calls MultiauthPluginObject::authenticate().
+ * \em Note: calls are not parsed by doxygen since they are done via a QInterfacePtr:
+ * \see http://dudu.dyn.2-h.org/nist/doxydoc/allOpie//classQInterfacePtr.html
+ */
+int main( int argc, char ** argv )
+{
+ Opie::Core::OApplication app(argc, argv, "Multi-authentication demo");
+
+ /* Constructs the main window, which displays messages and blocks
+ * access to the desktop
+ */
+ Opie::Security::MultiauthMainWindow win;
+
+ app.showMainWidget(&win);
+
+ // resize the QDialog object so it fills all the screen
+ QRect desk = qApp->desktop()->geometry();
+ win.setGeometry( 0, 0, desk.width(), desk.height() );
+
+ // the authentication has already succeeded (without win interactions)
+ if ( win.isAlreadyDone() )
+ return 0;
+
+ return app.exec();
+}