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

tdeabc

  • TDEABC
  • LDIF
Public Types | Public Member Functions | Static Public Member Functions | List of all members
TDEABC::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.

Definition at line 40 of file ldif.h.

Member Enumeration Documentation

◆ EntryType

enum TDEABC::LDIF::EntryType

Definition at line 45 of file ldif.h.

◆ ModType

enum TDEABC::LDIF::ModType

Definition at line 46 of file ldif.h.

◆ ParseVal

enum TDEABC::LDIF::ParseVal

Definition at line 44 of file ldif.h.

Constructor & Destructor Documentation

◆ LDIF()

LDIF::LDIF ( )

Definition at line 28 of file ldif.cpp.

◆ ~LDIF()

LDIF::~LDIF ( )
virtual

Definition at line 33 of file ldif.cpp.

Member Function Documentation

◆ assembleLine() [1/3]

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
fieldnameThe name of the entry.
valueThe value of the entry.
linelenMaximum length of the lines in the result.
urlIf true, encode value as url ( use :< ).

Definition at line 37 of file ldif.cpp.

◆ assembleLine() [2/3]

TQCString LDIF::assembleLine ( const TQString &  fieldname,
const TQCString &  value,
uint  linelen = 0,
bool  url = false 
)
static

This is the same as the above function, the only difference that this accepts TQCString as the value.

Definition at line 85 of file ldif.cpp.

◆ assembleLine() [3/3]

TQCString LDIF::assembleLine ( const TQString &  fieldname,
const TQString &  value,
uint  linelen = 0,
bool  url = false 
)
static

This is the same as the above function, the only difference that this accepts TQString as the value.

Definition at line 100 of file ldif.cpp.

◆ attr()

const TQString & TDEABC::LDIF::attr ( ) const
inline

Returns the attribute name.

Definition at line 144 of file ldif.h.

◆ critical()

bool TDEABC::LDIF::critical ( ) const
inline

Returns the criticality level when modType() returned Control.

Definition at line 156 of file ldif.h.

◆ delOldRdn()

bool TDEABC::LDIF::delOldRdn ( ) const
inline

Returns if the delete of the old RDN is required.

Definition at line 140 of file ldif.h.

◆ dn()

const TQString & TDEABC::LDIF::dn ( ) const
inline

Returns the Distinguished Name of the current entry.

Definition at line 128 of file ldif.h.

◆ 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.

Definition at line 344 of file ldif.cpp.

◆ entryType()

EntryType TDEABC::LDIF::entryType ( ) const
inline

Returns the requested LDAP operation extracted from the current entry.

Definition at line 120 of file ldif.h.

◆ isUrl()

bool TDEABC::LDIF::isUrl ( ) const
inline

Returns if val() is an url.

Definition at line 152 of file ldif.h.

◆ lineNo()

uint TDEABC::LDIF::lineNo ( ) const
inline

Returns the line number which the parser processes.

Definition at line 164 of file ldif.h.

◆ modType()

int TDEABC::LDIF::modType ( ) const
inline

Returns the LDAP modify request type if entryType() returned Entry_Mod.

Definition at line 124 of file ldif.h.

◆ newRdn()

const TQString & TDEABC::LDIF::newRdn ( ) const
inline

Returns the new Relative Distinguished Name if modType() returned Entry_Modrdn.

Definition at line 132 of file ldif.h.

◆ newSuperior()

const TQString & TDEABC::LDIF::newSuperior ( ) const
inline

Returns the new parent of the entry if modType() returned Entry_Modrdn.

Definition at line 136 of file ldif.h.

◆ nextItem()

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.

Definition at line 308 of file ldif.cpp.

◆ oid()

const TQString & TDEABC::LDIF::oid ( ) const
inline

Returns the OID when modType() returned Control.

Definition at line 160 of file ldif.h.

◆ processLine()

LDIF::ParseVal LDIF::processLine ( )

Process one LDIF line.

Definition at line 197 of file ldif.cpp.

◆ setLDIF()

void TDEABC::LDIF::setLDIF ( const TQByteArray &  ldif)
inline

Sets a chunk of LDIF.

Call before startParsing(), or if nextItem() returned MoreData.

Definition at line 111 of file ldif.h.

◆ splitControl()

bool LDIF::splitControl ( const TQCString &  line,
TQString &  oid,
bool &  critical,
TQByteArray &  value 
)
static

Splits a control specification (without the "control:" directive)

Parameters
lineis the control directive
oidwill contain the OID
criticalwill contain the criticality of control
valueis the control value

Definition at line 174 of file ldif.cpp.

◆ splitLine()

bool LDIF::splitLine ( const TQCString &  line,
TQString &  fieldname,
TQByteArray &  value 
)
static

Splits one line from an LDIF file to attribute and value components.

Returns
true if value is an URL, false otherwise

Definition at line 106 of file ldif.cpp.

◆ startParsing()

void LDIF::startParsing ( )

Starts the parsing of a new LDIF.

Definition at line 354 of file ldif.cpp.

◆ val()

const TQByteArray & TDEABC::LDIF::val ( ) const
inline

Returns the attribute value.

Definition at line 148 of file ldif.h.


The documentation for this class was generated from the following files:
  • ldif.h
  • ldif.cpp

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
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeabc by doxygen 1.9.4
This website is maintained by Timothy Pearson.