ldap: ConnectionProperties -> AuthProperties
[quassel.git] / src / core / ldapauthenticator.h
index cf14694..59a35b6 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  *
  *
  */
 
-#ifndef LDAPAUTHENTICATOR_H
-#define LDAPAUTHENTICATOR_H
+#pragma once
 
 #include "authenticator.h"
 
 #include "core.h"
 
 // Link against LDAP.
+/* We should use openldap on windows if at all possible, rather than trying to
+ * write some kind of compatiblity routine.
+#ifdef Q_CC_MSVC
+#include <windows.h>
+#include <winldap.h>
+#else*/
 #include <ldap.h>
+//#endif
 
 // Default LDAP server port.
 #define DEFAULT_LDAP_PORT 389
@@ -50,17 +56,19 @@ public:
 public slots:
     /* General */
     bool isAvailable() const;
-    QString displayName() const;
+    QString backendId() const;
     QString description() const;
     virtual QStringList setupKeys() const;
     virtual QVariantMap setupDefaults() const;
 
+    virtual inline bool canChangePassword() const { return false; }
+
     bool setup(const QVariantMap &settings = QVariantMap());
     State init(const QVariantMap &settings = QVariantMap());
     UserId validateUser(const QString &user, const QString &password);
 
 protected:
-    virtual void setConnectionProperties(const QVariantMap &properties);
+    virtual void setAuthProperties(const QVariantMap &properties);
     bool ldapConnect();
     void ldapDisconnect();
     bool ldapAuth(const QString &username, const QString &password);
@@ -84,6 +92,3 @@ private:
     LDAP *_connection;
 
 };
-
-
-#endif