ldap: Don't use the backend's display name as identifier
[quassel.git] / src / core / authenticator.h
index ce8a42a..3bec6f6 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2015 by the Quassel Project                        *
+ *   Copyright (C) 2005-2016 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#ifndef AUTHENTICATOR_H
-#define AUTHENTICATOR_H
+#pragma once
 
-#include <QtCore>
+#include <QObject>
+#include <QString>
+#include <QStringList>
+#include <QVariant>
 
 #include "types.h"
 
@@ -34,9 +36,9 @@ public:
     virtual ~Authenticator() {};
 
     enum State {
-        IsReady,        // ready to go
-        NeedsSetup,        // need basic setup (ask the user for input)
-        NotAvailable     // remove the authenticator backend from the list of avaliable authenticators.
+        IsReady,      // ready to go
+        NeedsSetup,   // need basic setup (ask the user for input)
+        NotAvailable  // remove the authenticator backend from the list of avaliable authenticators.
     };
 
 
@@ -50,9 +52,13 @@ public slots:
      */
     virtual bool isAvailable() const = 0;
 
+    //! Returns the identifier of the authenticator backend
+    /** \return A string that can be used by the client to identify the authenticator backend */
+    virtual QString backendId() const = 0;
+
     //! Returns the display name of the authenticator backend
     /** \return A string that can be used by the client to name the authenticator backend */
-    virtual QString backendId() const = 0;
+    virtual QString displayName() const = 0;
 
     //! Returns a description of this authenticator backend
     /** \return A string that can be displayed by the client to describe the authenticator */
@@ -91,5 +97,3 @@ public slots:
 private:
 
 };
-
-#endif