mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
Allow to pass LDAP_SCHEMA_-flags
This commit is contained in:
parent
4028c83c67
commit
4aa7e7a5b8
@ -19,7 +19,7 @@ LDAPAttrType::LDAPAttrType(){
|
||||
usage = 0;
|
||||
}
|
||||
|
||||
LDAPAttrType::LDAPAttrType (string at_item) {
|
||||
LDAPAttrType::LDAPAttrType (string at_item, int flags ) {
|
||||
|
||||
DEBUG(LDAP_DEBUG_CONSTRUCT,
|
||||
"LDAPAttrType::LDAPAttrType( )" << endl);
|
||||
@ -27,7 +27,7 @@ LDAPAttrType::LDAPAttrType (string at_item) {
|
||||
LDAPAttributeType *a;
|
||||
int ret;
|
||||
const char *errp;
|
||||
a = ldap_str2attributetype (at_item.c_str(), &ret, &errp,SCHEMA_PARSE_FLAG);
|
||||
a = ldap_str2attributetype (at_item.c_str(), &ret, &errp, flags);
|
||||
|
||||
if (a) {
|
||||
this->setNames( a->at_names );
|
||||
|
@ -12,9 +12,6 @@
|
||||
|
||||
#include "StringList.h"
|
||||
|
||||
#define SCHEMA_PARSE_FLAG 0x03
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
@ -43,7 +40,8 @@ class LDAPAttrType{
|
||||
* "( SuSE.YaST.Attr:19 NAME ( 'skelDir' ) DESC ''
|
||||
* EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )"
|
||||
*/
|
||||
LDAPAttrType (string at_item);
|
||||
LDAPAttrType (string at_item, int flags = LDAP_SCHEMA_ALLOW_NO_OID |
|
||||
LDAP_SCHEMA_ALLOW_QUOTED );
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
|
@ -33,7 +33,7 @@ LDAPObjClass::LDAPObjClass (const LDAPObjClass &oc){
|
||||
sup = oc.sup;
|
||||
}
|
||||
|
||||
LDAPObjClass::LDAPObjClass (string oc_item) {
|
||||
LDAPObjClass::LDAPObjClass (string oc_item, int flags ) {
|
||||
|
||||
DEBUG(LDAP_DEBUG_CONSTRUCT,
|
||||
"LDAPObjClass::LDAPObjClass( )" << endl);
|
||||
@ -41,7 +41,7 @@ LDAPObjClass::LDAPObjClass (string oc_item) {
|
||||
LDAPObjectClass *o;
|
||||
int ret;
|
||||
const char *errp;
|
||||
o = ldap_str2objectclass ( oc_item.c_str(), &ret, &errp, SCHEMA_PARSE_FLAG);
|
||||
o = ldap_str2objectclass ( oc_item.c_str(), &ret, &errp, flags );
|
||||
|
||||
if (o) {
|
||||
this->setNames (o->oc_names);
|
||||
|
@ -12,9 +12,6 @@
|
||||
|
||||
#include "StringList.h"
|
||||
|
||||
#define SCHEMA_PARSE_FLAG 0x03
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
@ -46,7 +43,8 @@ class LDAPObjClass{
|
||||
* "( SuSE.YaST.OC:5 NAME 'userTemplate' SUP objectTemplate STRUCTURAL
|
||||
* DESC 'User object template' MUST ( cn ) MAY ( secondaryGroup ))"
|
||||
*/
|
||||
LDAPObjClass (string oc_item);
|
||||
LDAPObjClass (string oc_item, int flags = LDAP_SCHEMA_ALLOW_NO_OID |
|
||||
LDAP_SCHEMA_ALLOW_QUOTED);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
|
Loading…
Reference in New Issue
Block a user