KLDAPCore::LdapObject Class
This class represents an LDAP Object. More...
| Header: | #include <KLDAPCore/LdapObject> |
| CMake: | find_package(KPim6LdapCore REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::LdapCore) |
Public Functions
| void | addValue(const QString &attributeName, const QByteArray &value) |
| const KLDAPCore::LdapAttrMap & | attributes() const |
| void | clear() |
| KLDAPCore::LdapDN | dn() const |
| bool | hasAttribute(const QString &attributeName) const |
| void | setAttributes(const KLDAPCore::LdapAttrMap &attrs) |
| void | setDn(const KLDAPCore::LdapDN &dn) |
| void | setDn(const QString &dn) |
| void | setValues(const QString &attributeName, const KLDAPCore::LdapAttrValue &values) |
| QString | toString() const |
| QByteArray | value(const QString &attributeName) const |
| KLDAPCore::LdapAttrValue | values(const QString &attributeName) const |
Detailed Description
Member Function Documentation
void LdapObject::addValue(const QString &attributeName, const QByteArray &value)
Adds the given value to the specified attribute. If the given attribute not exists, then it's created. attributeName the attribute for which to add a value value the attribute value to add
const KLDAPCore::LdapAttrMap &LdapObject::attributes() const
Returns the attributes and their values.
See also setAttributes().
void LdapObject::clear()
Clears the name and attributes of the object.
KLDAPCore::LdapDN LdapObject::dn() const
Return the Distinguished Name of the object.
See also setDn().
bool LdapObject::hasAttribute(const QString &attributeName) const
Returns true if the given attributethe exists, false otherwise.
void LdapObject::setAttributes(const KLDAPCore::LdapAttrMap &attrs)
Sets the attributes and attribute values of the object.
See also attributes().
void LdapObject::setDn(const KLDAPCore::LdapDN &dn)
Sets the Distinguished Name of the object.
See also dn().
void LdapObject::setDn(const QString &dn)
Sets the Distinguished Name of the object.
void LdapObject::setValues(const QString &attributeName, const KLDAPCore::LdapAttrValue &values)
Sets the given attribute values. If the given attribute not exists, then it's created, if exists, it's overwritten. attributeName the attribute name for which to set values values the values of attribute to set
See also values().
QString LdapObject::toString() const
Returns the text presentation (LDIF format) of the object.
QByteArray LdapObject::value(const QString &attributeName) const
Returns the first value of the attribute with the given name or an empty byte array if the attribute does not exists.
KLDAPCore::LdapAttrValue LdapObject::values(const QString &attributeName) const
Returns all values of the attribute with the given name.
See also setValues().