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

KLDAP Library

  • sources
  • kde-4.12
  • kdepimlibs
  • kldap
ldif.h
1 /*
2  This file is part of libkldap.
3  Copyright (c) 2004-2006 Szombathelyi György <gyurco@freemail.hu>
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_LDIF_H
22 #define KLDAP_LDIF_H
23 
24 #include <QtCore/QString>
25 #include <QtCore/QByteArray>
26 
27 #include "ldapdn.h"
28 #include "kldap_export.h"
29 
30 namespace KLDAP {
31 
40 class KLDAP_EXPORT Ldif
41 {
42  public:
43 
44  typedef enum {
45  None, NewEntry, EndEntry, Item, Control, Err, MoreData
46  } ParseValue;
47 
48  typedef enum {
49  Entry_None, Entry_Add, Entry_Del, Entry_Mod, Entry_Modrdn
50  } EntryType;
51 
52  typedef enum {
53  Mod_None, Mod_Add, Mod_Replace, Mod_Del
54  } ModType;
55 
56  Ldif();
57 
58  Ldif( const Ldif &that );
59  Ldif &operator=( const Ldif &that );
60 
61  virtual ~Ldif();
62 
71  static QByteArray assembleLine( const QString &fieldname,
72  const QByteArray &value, uint linelen=0,
73  bool url=false );
78  static QByteArray assembleLine( const QString &fieldname,
79  const QString &value, uint linelen=0,
80  bool url=false );
81 
86  static bool splitLine( const QByteArray &line, QString &fieldname,
87  QByteArray &value );
88 
96  static bool splitControl( const QByteArray &line, QString &oid,
97  bool &critical, QByteArray &value );
98 
102  void startParsing();
103 
107  ParseValue processLine();
108 
119  ParseValue nextItem();
120 
126  void setLdif( const QByteArray &ldif );
127 
132  void endLdif();
133 
137  EntryType entryType() const;
138 
142  int modType() const;
143 
147  LdapDN dn() const;
148 
153  QString newRdn() const;
154 
158  QString newSuperior() const;
159 
163  bool delOldRdn() const;
164 
168  QString attr() const;
169 
173  QByteArray value() const;
174 
178  bool isUrl() const;
179 
183  bool isCritical() const;
184 
188  QString oid() const;
189 
193  uint lineNumber() const;
194 
195  private:
196  class LdifPrivate;
197  LdifPrivate *const d;
198 };
199 
200 }
201 
202 #endif
KLDAP::Ldif
Ldif.
Definition: ldif.h:40
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:21 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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