/usr/include/KF5/libkdepim/ldapclient.h is in libkf5libkdepim-dev 4:16.04.2-3.
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 | /* kldapclient.h - LDAP access
* Copyright (C) 2002 Klarälvdalens Datakonsult AB
*
* Author: Steffen Hansen <hansen@kde.org>
*
* 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_LDAPCLIENT_H
#define KLDAP_LDAPCLIENT_H
#include "kdepim_export.h"
#include <QObject>
#include <QStringList>
class KJob;
namespace KLDAP
{
class LdapObject;
class LdapServer;
/**
* @short An object that represents a configured LDAP server.
*
* This class represents a client that to an LDAP server that
* can be used for LDAP lookups. Every client is identified by
* a unique numeric id.
*
* @since 4.5
*/
class KDEPIM_EXPORT LdapClient : public QObject
{
Q_OBJECT
public:
/**
* Creates a new ldap client.
*
* @param clientNumber The unique number of this client.
* @param parent The parent object.
*/
explicit LdapClient(int clientNumber, QObject *parent = Q_NULLPTR);
/**
* Destroys the ldap client.
*/
virtual ~LdapClient();
/**
* Returns the number of this client.
*/
int clientNumber() const;
/**
* Returns whether this client is currently running
* a search query.
*/
bool isActive() const;
/**
* Sets the completion @p weight of this client.
*
* This value will be used to sort the results of this
* client when used for auto completion.
*/
void setCompletionWeight(int weight);
/**
* Returns the completion weight of this client.
*/
int completionWeight() const;
/**
* Sets the LDAP @p server information that shall be
* used by this client.
*/
void setServer(const KLDAP::LdapServer &server);
/**
* Returns the ldap server information that are used
* by this client.
*/
const KLDAP::LdapServer server() const;
/**
* Sets the LDAP @p attributes that should be returned
* in the query result.
*
* Pass an empty list to include all available attributes.
*/
void setAttributes(const QStringList &attributes);
/**
* Returns the LDAP attributes that should be returned
* in the query result.
*/
QStringList attributes() const;
/**
* Sets the @p scope of the LDAP query.
*
* Valid values are 'one' or 'sub'.
*/
void setScope(const QString &scope);
/**
* Starts the query with the given @p filter.
*/
void startQuery(const QString &filter);
/**
* Cancels a running query.
*/
void cancelQuery();
Q_SIGNALS:
/**
* This signal is emitted when the query has finished.
*/
void done();
/**
* This signal is emitted in case of an error.
*
* @param message A message that describes the error.
*/
void error(const QString &message);
/**
* This signal is emitted once for each object that is
* returned from the query
*/
void result(const KLDAP::LdapClient &client, const KLDAP::LdapObject &);
private:
//@cond PRIVATE
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void slotData(KIO::Job *, const QByteArray &))
Q_PRIVATE_SLOT(d, void slotData(const QByteArray &))
Q_PRIVATE_SLOT(d, void slotInfoMessage(KJob *, const QString &, const QString &))
Q_PRIVATE_SLOT(d, void slotDone())
//@endcond
};
}
#endif
|