• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KLDAP Library

  • kldap
ldapmodel_p.h
1/*
2 This file is part of libkldap.
3 Copyright (c) 2006 Sean Harmer <sh@theharmers.co.uk>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KLDAP_LDAPMODELPRIVATE_H
22#define KLDAP_LDAPMODELPRIVATE_H
23
24#include "ldapconnection.h"
25#include "ldapdn.h"
26#include "ldapmodel.h"
27#include "ldapobject.h"
28
29namespace KLDAP {
30
31class LdapModelDNNode;
32class LdapSearch;
33
37class LdapModel::LdapModelPrivate
38{
39 public:
40 enum SearchType {
41 NotSearching = 0,
42 NamingContexts,
43 BaseDN,
44 ChildObjects
45 };
46
47 explicit LdapModelPrivate( LdapModel *parent );
48 explicit LdapModelPrivate( LdapModel *parent, LdapConnection &connection );
49
50 ~LdapModelPrivate();
51
52 void setConnection( LdapConnection &connection );
53
54 bool search( const LdapDN &searchBase,
55 LdapUrl::Scope scope = LdapUrl::Sub,
56 const QString &filter = QString(),
57 const QStringList &attributes = QStringList(),
58 int pagesize = 0 );
59
60 LdapModelDNNode *rootNode() { return m_root; }
61 LdapSearch *search() { return m_search; }
62
63 LdapObjects &searchResults() { return m_searchResultObjects; }
64 const LdapObjects &searchResults() const { return m_searchResultObjects; }
65
66 void recreateRootItem();
67
68 void setBaseDN( const LdapDN &baseDN ) { m_baseDN = baseDN; }
69 LdapDN &baseDN() { return m_baseDN; }
70 const LdapDN &baseDN() const { return m_baseDN; }
71
72 void setSearchType( SearchType t, LdapModelDNNode *item = 0 );
73
74 SearchType searchType() { return m_searchType; }
75 LdapModelDNNode *searchItem() { return m_searchItem; }
76
77 void createConnections();
78 void populateRootToBaseDN();
79 void gotSearchResult( KLDAP::LdapSearch *search );
80 void gotSearchData( KLDAP::LdapSearch *search, const KLDAP::LdapObject &obj );
81
82 private:
83 LdapModel *m_parent;
84 LdapModelDNNode *m_root;
85 LdapSearch *m_search;
86 LdapObjects m_searchResultObjects;
87 LdapDN m_baseDN;
88 SearchType m_searchType;
89 LdapModelDNNode *m_searchItem;
90};
91
92}
93#endif
KLDAP::LdapConnection
This class represents a connection to an LDAP server.
Definition ldapconnection.h:37
KLDAP::LdapModelDNNode
Definition ldapmodelnode_p.h:69
KLDAP::LdapModel::LdapModelPrivate
Definition ldapmodel_p.h:38
KLDAP::LdapModel
A ModelView interface to an LDAP tree.
Definition ldapmodel.h:43
KLDAP::LdapModel::parent
virtual QModelIndex parent(const QModelIndex &child) const
Reimplemented from QAbstractItemModel::parent().
Definition ldapmodel.cpp:67
KLDAP::LdapObject
This class represents an LDAP Object.
Definition ldapobject.h:42
KLDAP::LdapSearch
This class starts a search operation on a LDAP server and returns the search values via a Qt signal.
Definition ldapsearch.h:46
KLDAP::LdapUrl::Scope
Scope
Describes the scope of the LDAP url.
Definition ldapurl.h:58
KLDAP::LdapUrl::Sub
@ Sub
All levels below the url's level.
Definition ldapurl.h:61
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KLDAP Library

Skip menu "KLDAP Library"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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