This file is indexed.

/usr/include/kldap/ldapobject.h is in kdepimlibs5-dev 4:4.8.5-0ubuntu0.3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
/*
  This file is part of libkldap.
  Copyright (c) 2004-2006 Szombathelyi György <gyurco@freemail.hu>

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Library General  Public
  License as published by the Free Software Foundation; either
  version 2 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Library General Public License for more details.

  You should have received a copy of the GNU Library General Public License
  along with this library; see the file COPYING.LIB.  If not, write to
  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  Boston, MA 02110-1301, USA.
*/

#ifndef KLDAP_LDAPOBJECT_H
#define KLDAP_LDAPOBJECT_H

#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QSharedDataPointer>
#include <QtCore/QString>

#include "ldapdn.h"
#include "kldap_export.h"

namespace KLDAP {

typedef QList<QByteArray> LdapAttrValue;
typedef QMap<QString,LdapAttrValue > LdapAttrMap;

/**
 * @brief
 * This class represents an LDAP Object
*/
class KLDAP_EXPORT LdapObject
{
  public:
    LdapObject();
    explicit LdapObject( const QString &dn );
    virtual ~LdapObject();

    LdapObject( const LdapObject &that );
    LdapObject &operator=( const LdapObject &that );

    /**
     * Returns the text presentation (LDIF format) of the object.
     */
    QString toString() const;

    /**
     * Clears the name and attributes of the object.
     */
    void clear();
    /**
     * Sets the Distinguished Name of the object.
     */
    void setDn( const LdapDN &dn );
    /**
     * Sets the Distinguished Name of the object.
     */
    void setDn( const QString &dn );
    /**
     * Sets the attributes and attribute values of the object.
     */
    void setAttributes( const LdapAttrMap &attrs );
    /**
     * Sets the given attribute values. If the given attribute not exists,
     * then it's created, if exists, it's overwritten.
     */
    void setValues( const QString &attributeName, const LdapAttrValue &values );
    /**
     * Adds the given value to the specified attribute. If the given attribute
     * not exists, then it's created.
     */
    void addValue( const QString &attributeName, const QByteArray &value );
    /**
     * Return the Distinguished Name of the object.
     */
    LdapDN dn() const;
    /**
     * Returns the attributes and their values.
     */
    const LdapAttrMap &attributes() const;
    /**
     * Returns all values of the attribute with the given name.
     */
    LdapAttrValue values( 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.
     */
    QByteArray value( const QString &attributeName ) const;
    /**
     * Returns true if the given attributethe exists, false otherwise.
     */
    bool hasAttribute( const QString &attributeName ) const;

  private:
    class Private;
    QSharedDataPointer<Private> d;
};

typedef QList<LdapObject> LdapObjects;
}

#endif