• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

libkdepim

  • sources
  • kde-4.14
  • kdepim
  • libkdepim
  • ldap
ldapclientsearch.h
Go to the documentation of this file.
1 /* kldapclient.h - LDAP access
2  * Copyright (C) 2002 Klarälvdalens Datakonsult AB
3  *
4  * Author: Steffen Hansen <hansen@kde.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef LDAPCLIENTSEARCH_H
23 #define LDAPCLIENTSEARCH_H
24 
25 #include "libkdepim/kdepim_export.h"
26 #include <kldap/ldapobject.h>
27 #include <QtCore/QObject>
28 #include <QtCore/QStringList>
29 
30 
31 
32 namespace KLDAP {
33 class LdapClient;
34 
35 
41 struct LdapResultObject {
42  const LdapClient *client;
43  KLDAP::LdapObject object;
44 };
45 
51 struct LdapResult
52 {
56  typedef QList<LdapResult> List;
57 
58  LdapDN dn;
59  QString name;
60  QStringList email;
61  int clientNumber;
62  int completionWeight;
63 };
64 
68 class KDEPIM_EXPORT LdapClientSearch : public QObject
69 {
70  Q_OBJECT
71 
72 public:
78  explicit LdapClientSearch( QObject *parent = 0 );
79 
83  ~LdapClientSearch();
84 
88  void startSearch( const QString &query );
89 
93  void cancelSearch();
94 
101  bool isAvailable() const;
102 
107  void updateCompletionWeights();
108 
112  QList<LdapClient*> clients() const;
113 
114 
120  QString filter() const;
121 
127  void setFilter(const QString &);
128 
134  QStringList attributes() const;
135 
141  void setAttributes(const QStringList&);
142 
143 Q_SIGNALS:
150  void searchData( const QStringList &results );
151 
158  void searchData( const KLDAP::LdapResult::List &results );
159 
166  void searchData( const QList<KLDAP::LdapResultObject> &results );
167 
172  void searchDone();
173 
174 private:
175  //@cond PRIVATE
176  class Private;
177  Private* const d;
178 
179  Q_PRIVATE_SLOT( d, void slotLDAPResult( const KLDAP::LdapClient&, const KLDAP::LdapObject& ) )
180  Q_PRIVATE_SLOT( d, void slotLDAPError( const QString& ) )
181  Q_PRIVATE_SLOT( d, void slotLDAPDone() )
182  Q_PRIVATE_SLOT( d, void slotDataTimer() )
183  Q_PRIVATE_SLOT( d, void slotFileChanged( const QString& ) )
184  //@endcond
185 };
186 
187 }
188 
189 #endif // LDAPCLIENTSEARCH_H
KLDAP::LdapResultObject::client
const LdapClient * client
Definition: ldapclientsearch.h:42
kdepim_export.h
KLDAP::LdapResult::clientNumber
int clientNumber
The client the contact comes from (used for sorting in a ldap-only lookup).
Definition: ldapclientsearch.h:61
KLDAP::LdapClientSearch
Definition: ldapclientsearch.h:68
KLDAP::LdapResult
Describes the result returned by an LdapClientSearch query.
Definition: ldapclientsearch.h:51
KLDAP::LdapResult::name
QString name
The full name of the contact.
Definition: ldapclientsearch.h:59
QObject
QString
QList
QStringList
KLDAP::LdapResultObject
Describes the result returned by an LdapClientSearch query.
Definition: ldapclientsearch.h:41
KLDAP::LdapResultObject::object
KLDAP::LdapObject object
Definition: ldapclientsearch.h:43
KLDAP::LdapResult::email
QStringList email
The list of emails of the contact.
Definition: ldapclientsearch.h:60
KLDAP::LdapClient
An object that represents a configured LDAP server.
Definition: ldapclient.h:46
KDEPIM_EXPORT
#define KDEPIM_EXPORT
Definition: kdepim_export.h:35
KLDAP::LdapResult::List
QList< LdapResult > List
A list of LdapResult objects.
Definition: ldapclientsearch.h:56
KLDAP::LdapResult::completionWeight
int completionWeight
The weight of the contact (used for sorting in a completion list).
Definition: ldapclientsearch.h:62
KLDAP::LdapResult::dn
LdapDN dn
Definition: ldapclientsearch.h:58
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdepim

Skip menu "libkdepim"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal