kabc
#include <ldif_p.h>
Public Member Functions | |
Ldif (const Ldif &that) | |
QString | attr () const |
bool | delOldRdn () const |
LdapDN | dn () const |
void | endLdif () |
EntryType | entryType () const |
bool | isCritical () const |
bool | isUrl () const |
uint | lineNumber () const |
int | modType () const |
QString | newRdn () const |
QString | newSuperior () const |
ParseValue | nextItem () |
QString | oid () const |
Ldif & | operator= (const Ldif &that) |
ParseValue | processLine () |
void | setLdif (const QByteArray &ldif) |
void | startParsing () |
QByteArray | value () const |
Static Public Member Functions | |
static QByteArray | assembleLine (const QString &fieldname, const QByteArray &value, uint linelen=0, bool url=false) |
static QByteArray | assembleLine (const QString &fieldname, const QString &value, uint linelen=0, bool url=false) |
static bool | splitControl (const QByteArray &line, QString &oid, bool &critical, QByteArray &value) |
static bool | splitLine (const QByteArray &line, QString &fieldname, QByteArray &value) |
Detailed Description
Ldif.
Ldif implements an RFC 2849 compliant Ldif parser. Ldif files are used to represent directory information on LDAP-based servers, or to describe a set of changes which are to be applied to a directory.
Member Function Documentation
|
static |
Assembles fieldname and value into a valid Ldif line, BASE64 encodes the value if necessary and optionally splits into more lines.
- Parameters
-
fieldname The name of the entry. value The value of the entry. linelen Maximum length of the lines in the result. url If true, encode value as url ( use :< ).
|
static |
bool Ldif::delOldRdn | ( | ) | const |
LdapDN Ldif::dn | ( | ) | const |
void Ldif::endLdif | ( | ) |
Indicates the end of the Ldif file/stream.
Call if nextItem() returned MoreData, but actually you don't have more data.
Ldif::EntryType Ldif::entryType | ( | ) | const |
bool Ldif::isCritical | ( | ) | const |
uint Ldif::lineNumber | ( | ) | const |
int Ldif::modType | ( | ) | const |
Returns the LDAP modify request type if entryType() returned Entry_Mod.
QString Ldif::newRdn | ( | ) | const |
QString Ldif::newSuperior | ( | ) | const |
Ldif::ParseValue Ldif::nextItem | ( | ) |
Process the Ldif until a complete item can be returned.
- Returns
- NewEntry if a new DN encountered, Item if a new item returned, Err if the Ldif contains error, EndEntry if the parser reached the end of the current entry and MoreData if the parser encountered the end of the current chunk of the Ldif.
If you want to finish the parsing after receiving MoreData, then call endLdif(), so the parser can safely flush the current entry.
QString Ldif::oid | ( | ) | const |
Ldif::ParseValue Ldif::processLine | ( | ) |
void Ldif::setLdif | ( | const QByteArray & | ldif | ) |
Sets a chunk of Ldif.
Call before startParsing(), or if nextItem() returned MoreData.
|
static |
|
static |
void Ldif::startParsing | ( | ) |
QByteArray Ldif::value | ( | ) | const |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.