/usr/include/kldap/ldapcontrol.h is in kdepimlibs5-dev 4:4.14.2-2+deb8u2.
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 113 114 115 116 117 | /*
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_LDAPCONTROL_H
#define KLDAP_LDAPCONTROL_H
#include <QtCore/QString>
#include <QtCore/QList>
#include <QtCore/QSharedDataPointer>
#include "kldap_export.h"
namespace KLDAP {
class LdapControl;
typedef QList<LdapControl> LdapControls;
/**
@brief
This class represents an LDAP Control
*/
class KLDAP_EXPORT LdapControl
{
public:
/**
* Creates an empty control.
*/
LdapControl();
/**
* Creates a control with the given OID, value and criticality.
*/
LdapControl( QString &oid, QByteArray &value, bool critical = false );
LdapControl( const LdapControl &that );
LdapControl &operator= ( const LdapControl &that );
/**
* Destroys the control object.
*/
virtual ~LdapControl();
/**
* Sets the control's OID, value and criticality.
*/
void setControl( const QString &oid, const QByteArray &value,
bool critical = false );
/**
* Sets the control's OID.
*/
void setOid( const QString &oid );
/**
* Sets the control's value.
*/
void setValue( const QByteArray &value );
/**
* Sets the control's criticality.
*/
void setCritical( bool critical );
/**
* Returns the control's OID.
*/
QString oid() const;
/**
* Returns the control's value.
*/
QByteArray value() const;
/**
* Returns the control's criticality.
*/
bool critical() const;
/**
* Parses a paging results control, which the server returned.
* Puts the server's cookie into @p cookie, 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.
* @param cookie the cookie to hold server's cookie
*/
int parsePageControl( QByteArray &cookie ) const;
/**
* Creates a paging search control.
*/
static LdapControl createPageControl( int pagesize, const QByteArray &cookie = QByteArray() );
/**
* Inserts a unique control against a list of controls.
* If the control already exists in the list is is updated, otherwise
* it is appended to the list.
* @param list the current list of controls
* @param ctrl the control to insert
* @since 4.4
*/
static void insert( LdapControls &list, const LdapControl &ctrl );
private:
class Private;
QSharedDataPointer<Private> d;
};
}
#endif
|