KLdap

ldapdn.h
1/*
2 This file is part of libkldap.
3 SPDX-FileCopyrightText: 2006 Sean Harmer <sh@theharmers.co.uk>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#pragma once
9
10#include "kldap_core_export.h"
11#include <QString>
12#include <memory>
13namespace KLDAPCore
14{
15class KLDAP_CORE_EXPORT LdapDN
16{
17public:
18 explicit LdapDN();
19 explicit LdapDN(const QString &dn);
20
21 LdapDN(const LdapDN &that);
22 LdapDN &operator=(const LdapDN &that);
23
24 ~LdapDN();
25
26 void clear();
27
28 [[nodiscard]] bool isEmpty() const;
29
30 /**
31 * \returns A QString representing the DN.
32 */
33 [[nodiscard]] QString toString() const;
34
35 /**
36 * \param depth The depth of the DN to return using a zero-based index.
37 * \returns A QString representing the DN levels deep in the directory.
38 */
39 [[nodiscard]] QString toString(int depth) const;
40
41 /**
42 * \returns A QString representing the RDN of this DN.
43 */
44 [[nodiscard]] QString rdnString() const;
45
46 /**
47 * \param depth The depth of the RDN to return using a zero-based index.
48 * \returns A QString representing the RDN levels deep in the directory.
49 */
50 [[nodiscard]] QString rdnString(int depth) const;
51
52 /**
53 * \returns True if this is a valid DN, false otherwise.
54 */
55 [[nodiscard]] bool isValid() const;
56
57 /**
58 * \returns The depth of this DN in the directory.
59 */
60 [[nodiscard]] int depth() const;
61
62 [[nodiscard]] bool operator==(const LdapDN &rhs) const;
63
64 [[nodiscard]] bool operator!=(const LdapDN &rhs) const;
65
66private:
67 class LdapDNPrivate;
68 std::unique_ptr<LdapDNPrivate> const d;
69};
70}
char * toString(const EngineQuery &query)
KIOCORE_EXPORT bool operator!=(const UDSEntry &entry, const UDSEntry &other)
bool isValid(QStringView ifopt)
bool operator==(const StyleDelim &l, const StyleDelim &r)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:36 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.