• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KLDAP Library

  • KLDAP
  • Ber
Public Member Functions | List of all members
KLDAP::Ber Class Reference

#include <ber.h>

Public Member Functions

 Ber ()
 
 Ber (const Ber &that)
 
 Ber (const QByteArray &value)
 
virtual ~Ber ()
 
QByteArray flatten () const
 
Ber & operator= (const Ber &that)
 
unsigned int peekTag (int &size)
 
int printf (const QString &format,...)
 
int scanf (const QString &format,...)
 
unsigned int skipTag (int &size)
 

Detailed Description

This class allows encoding and decoding Qt structures using Basic Encoding Rules.

Definition at line 34 of file ber.h.

Constructor & Destructor Documentation

◆ Ber() [1/3]

Ber::Ber ( )

Constructs a Ber object.

Definition at line 403 of file ber.cpp.

◆ Ber() [2/3]

Ber::Ber ( const QByteArray & value)
explicit

Constructs a Ber object from the value.

Definition at line 409 of file ber.cpp.

◆ ~Ber()

Ber::~Ber ( )
virtual

Destroys the Ber object.

Definition at line 415 of file ber.cpp.

◆ Ber() [3/3]

Ber::Ber ( const Ber & that)

Definition at line 420 of file ber.cpp.

Member Function Documentation

◆ flatten()

QByteArray Ber::flatten ( ) const

Returns the Ber object as a flat QByteArray.

Definition at line 435 of file ber.cpp.

◆ operator=()

Ber & Ber::operator= ( const Ber & that)

Definition at line 426 of file ber.cpp.

◆ peekTag()

unsigned int Ber::peekTag ( int & size)

Definition at line 455 of file ber.cpp.

◆ printf()

int Ber::printf ( const QString & format,
... )

Appends the data with the specified format to the Ber object.

This function works like printf, except that it's appending the parameters, not replacing them. The allowed format characters and the expected parameter types are:

  • b Boolean. An int parameter should be supplied. A boolean element is output.
  • e Enumeration. An int parameter should be supplied. An enumeration element is output.
  • i Integer. An int parameter should be supplied. An integer element is output.
  • B Bitstring. A pointer to a QByteArray which contains the bitstring is supplied, followed by the number of bits in the bitstring. A bitstring element is output.
  • n Null. No parameter is required. A null element is output.
  • O,o,s Octet string. A QByteArray * is supplied. An octet string element is output. Due to versatility of Qt's QByteArray, these three format strings are all accepts the same parameter, but using the 's' format the string will be encoded only to the first zero character (a null terminated string)!
  • t Tag. An int specifying the tag to give the next element is provided. This works across calls.
  • v,V Several octet strings. A QList<QByteArray>* is supplied. Note that a construct like ’{v}’ is required to get an actual SEQUENCE OF octet strings. Also note that the 'v' format recognizes the QByteArray only to the first zero character, so it's not appropriate for binary data, just only for null terminated strings!
  • { Begin sequence. No parameter is required.
  • } End sequence. No parameter is required.
  • [ Begin set. No parameter is required.
  • ] End set. No parameter is required.

Definition at line 441 of file ber.cpp.

◆ scanf()

int Ber::scanf ( const QString & format,
... )

Definition at line 448 of file ber.cpp.

◆ skipTag()

unsigned int Ber::skipTag ( int & size)

Definition at line 462 of file ber.cpp.


The documentation for this class was generated from the following files:
  • ber.h
  • ber.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KLDAP Library

Skip menu "KLDAP Library"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal