kabc
ldif_p.h
00001 /* 00002 A temporary copy to break dependency to KLDAP 00003 00004 This file is part of libkldap. 00005 Copyright (c) 2004-2006 Szombathelyi György <gyurco@freemail.hu> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00020 Boston, MA 02110-1301, USA. 00021 */ 00022 00023 #ifndef LDIF_P_H 00024 #define LDIF_P_H 00025 00026 #include <QtCore/QString> 00027 #include <QtCore/QByteArray> 00028 00029 #include "ldapdn_p.h" 00030 00038 class Ldif 00039 { 00040 public: 00041 00042 typedef enum { 00043 None, NewEntry, EndEntry, Item, Control, Err, MoreData 00044 } ParseValue; 00045 00046 typedef enum { 00047 Entry_None, Entry_Add, Entry_Del, Entry_Mod, Entry_Modrdn 00048 } EntryType; 00049 00050 typedef enum { 00051 Mod_None, Mod_Add, Mod_Replace, Mod_Del 00052 } ModType; 00053 00054 Ldif(); 00055 00056 Ldif( const Ldif &that ); 00057 Ldif &operator=( const Ldif &that ); 00058 00059 virtual ~Ldif(); 00060 00069 static QByteArray assembleLine( const QString &fieldname, 00070 const QByteArray &value, uint linelen=0, 00071 bool url=false ); 00076 static QByteArray assembleLine( const QString &fieldname, 00077 const QString &value, uint linelen=0, 00078 bool url=false ); 00079 00084 static bool splitLine( const QByteArray &line, QString &fieldname, 00085 QByteArray &value ); 00086 00094 static bool splitControl( const QByteArray &line, QString &oid, 00095 bool &critical, QByteArray &value ); 00096 00100 void startParsing(); 00101 00105 ParseValue processLine(); 00106 00117 ParseValue nextItem(); 00118 00123 void setLdif( const QByteArray &ldif ); 00124 00129 void endLdif(); 00130 00134 EntryType entryType() const; 00135 00139 int modType() const; 00140 00144 LdapDN dn() const; 00145 00150 QString newRdn() const; 00151 00155 QString newSuperior() const; 00156 00160 bool delOldRdn() const; 00161 00165 QString attr() const; 00166 00170 QByteArray value() const; 00171 00175 bool isUrl() const; 00176 00180 bool isCritical() const; 00181 00185 QString oid() const; 00186 00190 uint lineNumber() const; 00191 00192 private: 00193 class LdifPrivate; 00194 LdifPrivate *const d; 00195 }; 00196 00197 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:55 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:55 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.