25 #include <tqcstring.h>
26 #include <tqmemarray.h>
28 #include <tdelibs_export.h>
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 };
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 );
77 static bool splitLine(
const TQCString &line, TQString &fieldname, TQByteArray &value );
85 static bool splitControl(
const TQCString &line, TQString &oid,
bool &critical,
94 ParseVal processLine();
111 void setLDIF(
const TQByteArray &ldif ) { mLdif = ldif; mPos = 0; }
128 const TQString&
dn()
const {
return mDn; }
132 const TQString&
newRdn()
const {
return mNewRdn; }
144 const TQString&
attr()
const {
return mAttr; }
148 const TQByteArray&
val()
const {
return mVal; }
160 const TQString&
oid()
const {
return mOid; }
167 bool mDelOldRdn, mUrl;
168 TQString mDn,mAttr,mNewRdn,mNewSuperior, mOid;
169 TQByteArray mLdif, mVal;
170 EntryType mEntryType;
172 bool mIsNewLine, mIsComment,mCritical;
173 ParseVal mLastParseVal;
const TQByteArray & val() const
Returns the attribute value.
const TQString & newSuperior() const
Returns the new parent of the entry if modType() returned Entry_Modrdn.
bool critical() const
Returns the criticality level when modType() returned Control.
EntryType entryType() const
Returns the requested LDAP operation extracted from the current entry.
const TQString & dn() const
Returns the Distinguished Name of the current entry.
void setLDIF(const TQByteArray &ldif)
Sets a chunk of LDIF.
uint lineNo() const
Returns the line number which the parser processes.
bool isUrl() const
Returns if val() is an url.
const TQString & attr() const
Returns the attribute name.
const TQString & oid() const
Returns the OID when modType() returned Control.
bool delOldRdn() const
Returns if the delete of the old RDN is required.
int modType() const
Returns the LDAP modify request type if entryType() returned Entry_Mod.
const TQString & newRdn() const
Returns the new Relative Distinguished Name if modType() returned Entry_Modrdn.
static data, shared by ALL addressee objects