KLDAPCore::Ldif
#include <ldif.h>
Public Types | |
using | EntryType |
using | ModType |
using | ParseValue |
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 Typedef Documentation
◆ EntryType
using KLDAPCore::Ldif::EntryType |
◆ ModType
using KLDAPCore::Ldif::ModType |
◆ ParseValue
using KLDAPCore::Ldif::ParseValue |
Constructor & Destructor Documentation
◆ Ldif() [1/2]
◆ Ldif() [2/2]
Member Function Documentation
◆ assembleLine() [1/2]
|
staticnodiscard |
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 :< ).
◆ assembleLine() [2/2]
|
staticnodiscard |
◆ attr()
|
nodiscard |
◆ delOldRdn()
|
nodiscard |
◆ dn()
|
nodiscard |
◆ endLdif()
void Ldif::endLdif | ( | ) |
Indicates the end of the Ldif file/stream.
Call if nextItem() returned MoreData, but actually you don't have more data.
◆ entryType()
|
nodiscard |
◆ isCritical()
|
nodiscard |
◆ isUrl()
|
nodiscard |
◆ lineNumber()
|
nodiscard |
◆ modType()
|
nodiscard |
Returns the LDAP modify request type if entryType() returned Entry_Mod.
◆ newRdn()
|
nodiscard |
◆ newSuperior()
|
nodiscard |
◆ nextItem()
|
nodiscard |
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.
◆ oid()
|
nodiscard |
◆ operator=()
◆ processLine()
|
nodiscard |
◆ setLdif()
void Ldif::setLdif | ( | const QByteArray & | ldif | ) |
Sets a chunk of Ldif.
Call before startParsing(), or if nextItem() returned MoreData.
- Parameters
-
ldif the Ldif chunk to set
◆ splitControl()
|
static |
◆ splitLine()
|
staticnodiscard |
◆ startParsing()
void Ldif::startParsing | ( | ) |
◆ value()
|
nodiscard |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:07 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.