KABC::LDIF Class Reference
#include <ldif.h>
Public Types | |
enum | ParseVal { None, NewEntry, EndEntry, Item, Control, Err, MoreData } |
enum | EntryType { Entry_None, Entry_Add, Entry_Del, Entry_Mod, Entry_Modrdn } |
enum | ModType { Mod_None, Mod_Add, Mod_Replace, Mod_Del } |
Public Member Functions | |
void | startParsing () |
ParseVal | processLine () |
ParseVal | nextItem () |
void | setLDIF (const TQByteArray &ldif) |
void | endLDIF () |
EntryType | entryType () const |
int | modType () const |
const TQString & | dn () const |
const TQString & | newRdn () const |
const TQString & | newSuperior () const |
bool | delOldRdn () const |
const TQString & | attr () const |
const TQByteArray & | val () const |
bool | isUrl () const |
bool | critical () const |
const TQString & | oid () const |
uint | lineNo () const |
Static Public Member Functions | |
static TQCString | assembleLine (const TQString &fieldname, const TQByteArray &value, uint linelen=0, bool url=false) |
static TQCString | assembleLine (const TQString &fieldname, const TQCString &value, uint linelen=0, bool url=false) |
static TQCString | assembleLine (const TQString &fieldname, const TQString &value, uint linelen=0, bool url=false) |
static bool | splitLine (const TQCString &line, TQString &fieldname, TQByteArray &value) |
static bool | splitControl (const TQCString &line, TQString &oid, bool &critical, TQByteArray &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
TQCString LDIF::assembleLine | ( | const TQString & | fieldname, |
const TQByteArray & | value, | ||
uint | linelen = 0 , |
||
bool | url = false |
||
) | [static] |
Assembles fieldname and value into a valid LDIF line, BASE64 encodes the value if neccessary 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 :< ).
TQCString LDIF::assembleLine | ( | const TQString & | fieldname, |
const TQCString & | value, | ||
uint | linelen = 0 , |
||
bool | url = false |
||
) | [static] |
TQCString LDIF::assembleLine | ( | const TQString & | fieldname, |
const TQString & | value, | ||
uint | linelen = 0 , |
||
bool | url = false |
||
) | [static] |
const TQString& KABC::LDIF::attr | ( | ) | const [inline] |
bool KABC::LDIF::critical | ( | ) | const [inline] |
bool KABC::LDIF::delOldRdn | ( | ) | const [inline] |
const TQString& KABC::LDIF::dn | ( | ) | const [inline] |
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 KABC::LDIF::entryType | ( | ) | const [inline] |
bool KABC::LDIF::isUrl | ( | ) | const [inline] |
uint KABC::LDIF::lineNo | ( | ) | const [inline] |
int KABC::LDIF::modType | ( | ) | const [inline] |
Returns the LDAP modify request type if entryType() returned Entry_Mod.
const TQString& KABC::LDIF::newRdn | ( | ) | const [inline] |
const TQString& KABC::LDIF::newSuperior | ( | ) | const [inline] |
LDIF::ParseVal 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.
const TQString& KABC::LDIF::oid | ( | ) | const [inline] |
LDIF::ParseVal LDIF::processLine | ( | ) |
void KABC::LDIF::setLDIF | ( | const TQByteArray & | ldif | ) | [inline] |
Sets a chunk of LDIF.
Call before startParsing(), or if nextItem() returned MoreData.
bool LDIF::splitControl | ( | const TQCString & | line, |
TQString & | oid, | ||
bool & | critical, | ||
TQByteArray & | value | ||
) | [static] |
bool LDIF::splitLine | ( | const TQCString & | line, |
TQString & | fieldname, | ||
TQByteArray & | value | ||
) | [static] |
void LDIF::startParsing | ( | ) |
const TQByteArray& KABC::LDIF::val | ( | ) | const [inline] |
The documentation for this class was generated from the following files: