]> git.sur5r.net Git - openldap/commitdiff
Allow to pass LDAP_SCHEMA_-flags
authorQuanah Gibson-Mount <quanah@openldap.org>
Wed, 3 Sep 2008 01:58:15 +0000 (01:58 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 3 Sep 2008 01:58:15 +0000 (01:58 +0000)
contrib/ldapc++/src/LDAPAttrType.cpp
contrib/ldapc++/src/LDAPAttrType.h
contrib/ldapc++/src/LDAPObjClass.cpp
contrib/ldapc++/src/LDAPObjClass.h

index 39898cd3e34747e54216cd06a0549e2747cc8aad..d7650002a4bd2eb5abeba07d24187fe50b91f32b 100644 (file)
@@ -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 );
index 1069f27fdb685311c6dda579f4e3b682bffedf33..8af09f9d15ba9258519094242f6223f73024a7b7 100644 (file)
@@ -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
index b7621afe07011e82596e61ec2c0cebddde9378a5..978e7ec4c4246a66614d9fd8d327011078ca9e46 100644 (file)
@@ -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);
index 87f87f1dc393af365ea3fd78d3b234aac57d986f..b4221eb788c3e28d27072f9b30562c8949c318c7 100644 (file)
@@ -12,9 +12,6 @@
 
 #include "StringList.h"
 
-#define SCHEMA_PARSE_FLAG    0x03
-
-
 using namespace std;
 
 /**
@@ -36,7 +33,7 @@ class LDAPObjClass{
         /**
          * Copy constructor
         */   
-       LDAPObjClass (const LDAPObjClass& oc);
+       LDAPObjClass( const LDAPObjClass& oc );
 
         /**
         * Constructs new object and fills the data structure by parsing the
@@ -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