1
/**************************************************************************
2
* Copyright (C) 2005-2015 by Oleksandr Shneyder *
3
* o.shneyder@phoca-gmbh.de *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
* This program is distributed in the hope that it will be useful, *
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12
* GNU General Public License for more details. *
14
* You should have received a copy of the GNU General Public License *
15
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
16
***************************************************************************/
20
#define LDAP_DEPRECATED 1
21
#include "x2goclientconfig.h"
31
LDAPExeption ( string type,string str ) {err_type=type;err_str=str;}
40
ByteArray ( const ByteArray& );
42
const char* getData() {return data;}
43
string asString() {return data;}
44
int length() {return size;}
45
void load ( const char*,int );
46
void fromStdStr ( const string& );
47
void operator = ( const ByteArray& );
58
list<ByteArray> value;
61
struct LDAPStringValue
67
typedef list<LDAPStringValue> LDAPStringEntry;
68
typedef list<LDAPBinValue> LDAPBinEntry;
75
LDAPSession ( string,int,string,string, bool simple=false,
76
bool start_tls=true );
78
void addStringValue ( string dn,
79
const list<LDAPStringValue>& values );
80
void remove ( string );
81
static list<string> getStringAttrValues (
82
const LDAPStringEntry& entry,
84
static list<ByteArray> getBinAttrValues (
85
const LDAPBinEntry& entry,
87
void modifyStringValue ( string dn,
88
const list<LDAPStringValue>& values );
89
void stringSearch ( string dn,const list<string> &attributes,
91
list<LDAPStringEntry> &result );
92
void binSearch ( string dn,const list<string> &attributes,
94
list<LDAPBinEntry> &result );