• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeabc
 

tdeabc

  • tdeabc
ldif.h
1 /*
2  This file is part of libtdeabc.
3  Copyright (c) 2004 Szombathelyi Gyorgy <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 _K_LDIF_H_
22 #define _K_LDIF_H_
23 
24 #include <tqstring.h>
25 #include <tqcstring.h>
26 #include <tqmemarray.h>
27 
28 #include <tdelibs_export.h>
29 
30 namespace TDEABC {
31 
40  class KABC_EXPORT LDIF
41  {
42  public:
43 
44  enum ParseVal{ None, NewEntry, EndEntry, Item, Control, Err, MoreData };
45  enum EntryType{ Entry_None, Entry_Add, Entry_Del, Entry_Mod, Entry_Modrdn };
46  enum ModType{ Mod_None, Mod_Add, Mod_Replace, Mod_Del };
47  LDIF();
48  virtual ~LDIF();
49 
58  static TQCString assembleLine( const TQString &fieldname,
59  const TQByteArray &value, uint linelen=0, bool url=false );
64  static TQCString assembleLine( const TQString &fieldname,
65  const TQCString &value, uint linelen=0, bool url=false );
70  static TQCString assembleLine( const TQString &fieldname,
71  const TQString &value, uint linelen=0, bool url=false );
72 
77  static bool splitLine( const TQCString &line, TQString &fieldname, TQByteArray &value );
85  static bool splitControl( const TQCString &line, TQString &oid, bool &critical,
86  TQByteArray &value );
90  void startParsing();
94  ParseVal processLine();
106  ParseVal nextItem();
111  void setLDIF( const TQByteArray &ldif ) { mLdif = ldif; mPos = 0; }
116  void endLDIF();
120  EntryType entryType() const { return mEntryType; }
124  int modType() const { return mModType; }
128  const TQString& dn() const { return mDn; }
132  const TQString& newRdn() const { return mNewRdn; }
136  const TQString& newSuperior() const { return mNewSuperior; }
140  bool delOldRdn() const { return mDelOldRdn; }
144  const TQString& attr() const { return mAttr; }
148  const TQByteArray& val() const { return mVal; }
152  bool isUrl() const { return mUrl; }
156  bool critical() const { return mCritical; }
160  const TQString& oid() const { return mOid; }
164  uint lineNo() const { return mLineNo; }
165  private:
166  int mModType;
167  bool mDelOldRdn, mUrl;
168  TQString mDn,mAttr,mNewRdn,mNewSuperior, mOid;
169  TQByteArray mLdif, mVal;
170  EntryType mEntryType;
171 
172  bool mIsNewLine, mIsComment,mCritical;
173  ParseVal mLastParseVal;
174  uint mPos,mLineNo;
175  TQCString line;
176 
177  class LDIFPrivate;
178  LDIFPrivate *d;
179  };
180 }
181 
182 #endif

tdeabc

Skip menu "tdeabc"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeabc

Skip menu "tdeabc"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeabc by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.