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

KLDAP Library

ldapmodel_p.h
00001 /*
00002   This file is part of libkldap.
00003   Copyright (c) 2006 Sean Harmer <sh@theharmers.co.uk>
00004 
00005   This library is free software; you can redistribute it and/or
00006   modify it under the terms of the GNU Library General  Public
00007   License as published by the Free Software Foundation; either
00008   version 2 of the License, or (at your option) any later version.
00009 
00010   This library is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013   Library General Public License for more details.
00014 
00015   You should have received a copy of the GNU Library General Public License
00016   along with this library; see the file COPYING.LIB.  If not, write to
00017   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018   Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KLDAP_LDAPMODELPRIVATE_H
00022 #define KLDAP_LDAPMODELPRIVATE_H
00023 
00024 #include "ldapconnection.h"
00025 #include "ldapdn.h"
00026 #include "ldapmodel.h"
00027 #include "ldapobject.h"
00028 
00029 namespace KLDAP {
00030 
00031 class LdapModelDNNode;
00032 class LdapSearch;
00033 
00037 class LdapModel::LdapModelPrivate
00038 {
00039   public:
00040     enum SearchType {
00041       NotSearching = 0,
00042       NamingContexts,
00043       BaseDN,
00044       ChildObjects
00045     };
00046 
00047     explicit LdapModelPrivate( LdapModel *parent );
00048     explicit LdapModelPrivate( LdapModel *parent, LdapConnection &connection );
00049 
00050     ~LdapModelPrivate();
00051 
00052     void setConnection( LdapConnection &connection );
00053 
00054     bool search( const LdapDN &searchBase,
00055                  LdapUrl::Scope scope = LdapUrl::Sub,
00056                  const QString &filter = QString(),
00057                  const QStringList &attributes = QStringList(),
00058                  int pagesize = 0 );
00059 
00060     LdapModelDNNode *rootNode() { return m_root; }
00061     LdapSearch *search() { return m_search; }
00062 
00063     LdapObjects &searchResults() { return m_searchResultObjects; }
00064     const LdapObjects &searchResults() const { return m_searchResultObjects; }
00065 
00066     void recreateRootItem();
00067 
00068     void setBaseDN( const LdapDN &baseDN ) { m_baseDN = baseDN; }
00069     LdapDN &baseDN() { return m_baseDN; }
00070     const LdapDN &baseDN() const { return m_baseDN; }
00071 
00072     void setSearchType( SearchType t, LdapModelDNNode *item = 0 );
00073 
00074     SearchType searchType() { return m_searchType; }
00075     LdapModelDNNode *searchItem() { return m_searchItem; }
00076 
00077     void createConnections();
00078     void populateRootToBaseDN();
00079     void gotSearchResult( KLDAP::LdapSearch *search );
00080     void gotSearchData( KLDAP::LdapSearch *search, const KLDAP::LdapObject &obj );
00081 
00082   private:
00083     LdapModel *m_parent;
00084     LdapModelDNNode *m_root;
00085     LdapSearch *m_search;
00086     LdapObjects m_searchResultObjects;
00087     LdapDN m_baseDN;
00088     SearchType m_searchType;
00089     LdapModelDNNode *m_searchItem;
00090 };
00091 
00092 }
00093 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 14 2012 04:51:55 by doxygen 1.7.5 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.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • 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