/usr/include/kldap/ldapserver.h is in kdepimlibs5-dev 4:4.14.10-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | /*
This file is part of libkldap.
Copyright (c) 2004-2006 Szombathelyi György <gyurco@freemail.hu>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KLDAP_LDAPSERVER_H
#define KLDAP_LDAPSERVER_H
#include <QtCore/QString>
#include "ldapurl.h"
#include "ldapdn.h"
#include "kldap_export.h"
namespace KLDAP {
/**
* @short A class that contains LDAP server connection settings.
*
* This class holds various parameters that are needed to connect
* to an LDAP server.
*/
class KLDAP_EXPORT LdapServer
{
public:
/**
* Creates an empty LDAP server object.
*/
LdapServer();
/**
* Creates a new LDAP server object.
*
* @param url The LDAP url of the server.
*/
LdapServer( const LdapUrl &url );
/**
* Creates a new LDAP server object from an @p other object.
*/
LdapServer( const LdapServer &other );
/**
* Overwrites the values of the LDAP server object with
* the values from an @p other object.
*/
LdapServer &operator=( const LdapServer &other );
/**
* Destroys the LDAP server object.
*/
virtual ~LdapServer();
/**
* Describes the encryption settings that can be used
* for the LDAP connection.
*/
typedef enum {
None, ///< Do not use any encryption.
TLS, ///< Use TLS encryption.
SSL ///< Use SSL encryption.
} Security;
/**
* Describes the authentication method that can be used
* for the LDAP connection.
*/
typedef enum {
Anonymous, ///< Do no authentication.
Simple, ///< Authenticate via login and password.
SASL ///< Azthenticate with the SASL framework.
} Auth;
/**
* Clears all server settings.
*/
void clear();
/**
* Sets the host of the LDAP connection.
*/
void setHost( const QString &host );
/**
* Returns the host of the LDAP connection.
*/
QString host() const;
/**
* Sets the port of the LDAP connection.
* If not port is set, 389 is used as default.
* @param port the LDAP port connection to set
*/
void setPort( int port );
/**
* Returns the port of the LDAP connection.
*/
int port() const;
/**
* Sets the @p baseDn of the LDAP connection.
*/
void setBaseDn( const LdapDN &baseDn );
/**
* Returns the baseDn of the LDAP connection.
*/
LdapDN baseDn() const;
/**
* Sets the @p user of the LDAP connection.
*/
void setUser( const QString &user );
/**
* Returns the user of the LDAP connection.
*/
QString user() const;
/**
* Sets the @p bindDn of the LDAP connection.
*/
void setBindDn( const QString &bindDn );
/**
* Returns the bindDn of the LDAP connection.
*/
QString bindDn() const;
/**
* Sets the @p realm of the LDAP connection.
*/
void setRealm( const QString &realm );
/**
* Returns the realm of the LDAP connection.
*/
QString realm() const;
/**
* Sets the @p password of the LDAP connection.
*/
void setPassword( const QString &password );
/**
* Returns the password of the LDAP connection.
*/
QString password() const;
/**
* Sets the protocol @p version of the LDAP connection.
* If no version is set, 3 is used as default.
* @param version the protocol version to set
*/
void setVersion( int version );
/**
* Returns the protocol version of the LDAP connection.
*/
int version() const;
/**
* Sets the security @p mode of the LDAP connection.
* If no security is set, None is used as default.
* @param mode the security mode to set
*/
void setSecurity( Security mode );
/**
* Returns the security mode of the LDAP connection.
*/
Security security() const;
/**
* Sets the @p authentication method of the LDAP connection.
* If no authentication method is set, Anonymous is used as default.
* @param authentication the authentication method to set
*/
void setAuth( Auth authentication );
/**
* Returns the authentication method of the LDAP connection.
*/
Auth auth() const;
/**
* Sets the @p mech of the LDAP connection.
*/
void setMech( const QString &mech );
/**
* Returns the mech of the LDAP connection.
*/
QString mech() const;
/**
* Sets the @p timeout of the LDAP connection.
*/
void setTimeout( int timeout );
/**
* Returns the timeout of the LDAP connection.
*/
int timeout() const;
/**
* Sets the search @p scope of the LDAP connection.
*/
void setScope( LdapUrl::Scope scope );
/**
* Returns the search scope of the LDAP connection.
*/
LdapUrl::Scope scope() const;
/**
* Sets the time @p limit of the LDAP connection.
*/
void setTimeLimit( int limit );
/**
* Returns the time limit of the LDAP connection.
*/
int timeLimit() const;
/**
* Sets the size @p limit of the LDAP connection.
*/
void setSizeLimit( int sizelimit );
/**
* Returns the size limit of the LDAP connection.
*/
int sizeLimit() const;
/**
* Sets the page @p size of the LDAP connection.
*/
void setPageSize( int size );
/**
* Returns the page size of the LDAP connection.
*/
int pageSize() const;
/**
* Sets the @p filter string of the LDAP connection.
*/
void setFilter( const QString &filter );
/**
* Returns the filter string of the LDAP connection.
*/
QString filter() const;
/**
* Sets the server parameters from an RFC2255 compliant LDAP @p url.
*/
void setUrl( const LdapUrl &url );
/**
* Returns the server parameters as an RFC2255 compliant LDAP Url.
* The URL extensions which are supported:
* Standard: bindname
* KLDAP extensions: x-tls, x-version, x-sasl, x-mech, x-realm,
* x-sizelimit, x-timelimit, x-pagesize, x-timeout
*/
LdapUrl url() const;
private:
class LdapServerPrivate;
LdapServerPrivate *const d;
};
}
#endif
|