summaryrefslogtreecommitdiff
path: root/include/modules/ldap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/modules/ldap.h')
-rw-r--r--include/modules/ldap.h38
1 files changed, 23 insertions, 15 deletions
diff --git a/include/modules/ldap.h b/include/modules/ldap.h
index 373c9cfa3..da560adf2 100644
--- a/include/modules/ldap.h
+++ b/include/modules/ldap.h
@@ -1,13 +1,23 @@
/*
+ * Anope IRC Services
*
- * (C) 2011-2016 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2011-2016 Anope Team <team@anope.org>
*
- * Please read COPYING and README for further details.
+ * This file is part of Anope. Anope is free software; you can
+ * redistribute it and/or modify it under the terms of the GNU
+ * General Public License as published by the Free Software
+ * Foundation, version 2.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see see <http://www.gnu.org/licenses/>.
*/
-#ifndef ANOPE_LDAP_H
-#define ANOPE_LDAP_H
+#pragma once
class LDAPException : public ModuleException
{
@@ -118,8 +128,8 @@ class LDAPInterface
LDAPInterface(Module *m) : owner(m) { }
virtual ~LDAPInterface() { }
- virtual void OnResult(const LDAPResult &r) = 0;
- virtual void OnError(const LDAPResult &err) = 0;
+ virtual void OnResult(const LDAPResult &r) anope_abstract;
+ virtual void OnError(const LDAPResult &err) anope_abstract;
virtual void OnDelete() { }
};
@@ -131,41 +141,39 @@ class LDAPProvider : public Service
/** Attempt to bind to the LDAP server as an admin
* @param i The LDAPInterface the result is sent to
*/
- virtual void BindAsAdmin(LDAPInterface *i) = 0;
+ virtual void BindAsAdmin(LDAPInterface *i) anope_abstract;
/** Bind to LDAP
* @param i The LDAPInterface the result is sent to
* @param who The binddn
* @param pass The password
*/
- virtual void Bind(LDAPInterface *i, const Anope::string &who, const Anope::string &pass) = 0;
+ virtual void Bind(LDAPInterface *i, const Anope::string &who, const Anope::string &pass) anope_abstract;
/** Search ldap for the specified filter
* @param i The LDAPInterface the result is sent to
* @param base The base DN to search
* @param filter The filter to apply
*/
- virtual void Search(LDAPInterface *i, const Anope::string &base, const Anope::string &filter) = 0;
+ virtual void Search(LDAPInterface *i, const Anope::string &base, const Anope::string &filter) anope_abstract;
/** Add an entry to LDAP
* @param i The LDAPInterface the result is sent to
* @param dn The dn of the entry to add
* @param attributes The attributes
*/
- virtual void Add(LDAPInterface *i, const Anope::string &dn, LDAPMods &attributes) = 0;
+ virtual void Add(LDAPInterface *i, const Anope::string &dn, LDAPMods &attributes) anope_abstract;
/** Delete an entry from LDAP
* @param i The LDAPInterface the result is sent to
* @param dn The dn of the entry to delete
*/
- virtual void Del(LDAPInterface *i, const Anope::string &dn) = 0;
+ virtual void Del(LDAPInterface *i, const Anope::string &dn) anope_abstract;
/** Modify an existing entry in LDAP
* @param i The LDAPInterface the result is sent to
* @param base The base DN to modify
* @param attributes The attributes to modify
*/
- virtual void Modify(LDAPInterface *i, const Anope::string &base, LDAPMods &attributes) = 0;
+ virtual void Modify(LDAPInterface *i, const Anope::string &base, LDAPMods &attributes) anope_abstract;
};
-
-#endif // ANOPE_LDAP_H