KLDAPCore::LdapControl Class

This class represents an LDAP Control. More...

Header: #include <KLDAPCore/LdapControl>
CMake: find_package(KPim6LdapCore REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::LdapCore)

Public Functions

LdapControl()
LdapControl(const QString &oid, const QByteArray &value, bool critical = false)
LdapControl(const KLDAPCore::LdapControl &that)
~LdapControl()
bool critical() const
QString oid() const
int parsePageControl(QByteArray &cookie) const
void setControl(const QString &oid, const QByteArray &value, bool critical = false)
void setCritical(bool critical)
void setOid(const QString &oid)
void setValue(const QByteArray &value)
QByteArray value() const
KLDAPCore::LdapControl &operator=(const KLDAPCore::LdapControl &that)

Static Public Members

KLDAPCore::LdapControl createPageControl(int pagesize, const QByteArray &cookie = QByteArray())
void insert(KLDAPCore::LdapControls &list, const KLDAPCore::LdapControl &ctrl)

Detailed Description

Member Function Documentation

LdapControl::LdapControl()

Creates an empty control.

LdapControl::LdapControl(const QString &oid, const QByteArray &value, bool critical = false)

Creates a control with the given OID, value and criticality. oid the OID of the control value the value of the control critical whether the control is critical

LdapControl::LdapControl(const KLDAPCore::LdapControl &that)

Constructs a copy of the given control. that the control to copy

[noexcept] LdapControl::~LdapControl()

Destroys the control object.

[static] KLDAPCore::LdapControl LdapControl::createPageControl(int pagesize, const QByteArray &cookie = QByteArray())

Creates a paging search control. pagesize the page size cookie the cookie from a previous search (for continuation) Returns the created paging control

bool LdapControl::critical() const

Returns the control's criticality. Returns true if the control is critical

See also setCritical().

[static] void LdapControl::insert(KLDAPCore::LdapControls &list, const KLDAPCore::LdapControl &ctrl)

Inserts a unique control into a list of controls. If the control already exists in the list it is updated, otherwise it is appended to the list. list the current list of controls ctrl the control to insert

QString LdapControl::oid() const

Returns the control's OID. Returns the OID string

See also setOid().

int LdapControl::parsePageControl(QByteArray &cookie) const

Parses a paging results control returned by the server. Puts the server's cookie into the output parameter and returns the estimated result set size. If the OID is not the page control's OID, or the value cannot be decoded, returns -1. cookie output parameter to hold server's cookie Returns the estimated result set size, or -1 if parsing failed

void LdapControl::setControl(const QString &oid, const QByteArray &value, bool critical = false)

Sets the control's OID, value and criticality. oid the OID to set value the value to set critical whether the control is critical

void LdapControl::setCritical(bool critical)

Sets the control's criticality. critical whether the control is critical

See also critical().

void LdapControl::setOid(const QString &oid)

Sets the control's OID. oid the OID to set

See also oid().

void LdapControl::setValue(const QByteArray &value)

Sets the control's value. value the value to set

See also value().

QByteArray LdapControl::value() const

Returns the control's value. Returns the value byte array

See also setValue().

KLDAPCore::LdapControl &LdapControl::operator=(const KLDAPCore::LdapControl &that)

Assigns the given control to this control. that the control to assign Returns a reference to this control