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

tdeabc

  • TDEABC
  • TDEABC::LDIF
Public Types | Public Member Functions | Static Public Member Functions

TDEABC::LDIF Class Reference

LDIF. More...

#include <ldif.h>

List of all members.

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 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 :< ).

Definition at line 37 of file ldif.cpp.

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.

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.

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

Returns the attribute name.

Definition at line 144 of file ldif.h.

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

Returns the criticality level when modType() returned Control.

Definition at line 156 of file ldif.h.

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

Returns if the delete of the old RDN is required.

Definition at line 140 of file ldif.h.

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

Returns the Distinguished Name of the current entry.

Definition at line 128 of file ldif.h.

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 TDEABC::LDIF::entryType (  )  const [inline]

Returns the requested LDAP operation extracted from the current entry.

Definition at line 120 of file ldif.h.

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

Returns if val() is an url.

Definition at line 152 of file ldif.h.

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

Returns the line number which the parser processes.

Definition at line 164 of file ldif.h.

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.

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.

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.

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.

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

Returns the OID when modType() returned Control.

Definition at line 160 of file ldif.h.

LDIF::ParseVal LDIF::processLine (  ) 

Process one LDIF line.

Definition at line 197 of file ldif.cpp.

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.

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

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

Parameters:
line is the control directive
oid will contain the OID
critical will contain the criticality of control
value is the control value

Definition at line 174 of file ldif.cpp.

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.

void LDIF::startParsing (  ) 

Starts the parsing of a new LDIF.

Definition at line 354 of file ldif.cpp.

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.7.1
This website is maintained by Timothy Pearson.