X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=contrib%2Fldapc%2B%2B%2Fsrc%2FLDAPObjClass.h;h=da330dc2318f02e364395f11a205a131685e7a6c;hb=98cd6e28571a2a0351d1b5f707514c5832e503c0;hp=13cdea1f620bbeb5b2febcbd2a95f837688e8403;hpb=e995b2fd35ddf8bd919edbc751dcb780f572ae51;p=openldap diff --git a/contrib/ldapc++/src/LDAPObjClass.h b/contrib/ldapc++/src/LDAPObjClass.h index 13cdea1f62..da330dc231 100644 --- a/contrib/ldapc++/src/LDAPObjClass.h +++ b/contrib/ldapc++/src/LDAPObjClass.h @@ -1,5 +1,6 @@ +// $OpenLDAP$ /* - * Copyright 2003, OpenLDAP Foundation, All Rights Reserved. + * Copyright 2003-2014 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ @@ -11,9 +12,6 @@ #include "StringList.h" -#define SCHEMA_PARSE_FLAG 0x03 - - using namespace std; /** @@ -21,7 +19,7 @@ using namespace std; */ class LDAPObjClass{ private : - StringList names, must, may; + StringList names, must, may, sup; string desc, oid; int kind; @@ -35,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 @@ -45,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 @@ -55,32 +54,42 @@ class LDAPObjClass{ /** * Returns object class description */ - string getDesc (); + string getDesc() const; /** * Returns object class oid */ - string getOid (); + string getOid() const; /** * Returns object class name (first one if there are more of them) */ - string getName (); + string getName() const; + + /** + * Returns object class kind: 0=ABSTRACT, 1=STRUCTURAL, 2=AUXILIARY + */ + int getKind() const; /** * Returns all object class names */ - StringList getNames(); + StringList getNames() const; /** * Returns list of required attributes */ - StringList getMust(); + StringList getMust() const; /** * Returns list of allowed (and not required) attributes */ - StringList getMay(); + StringList getMay() const; + + /** + * Returns list of the OIDs of the superior ObjectClasses + */ + StringList getSup() const; void setNames (char **oc_names); void setMay (char **oc_may); @@ -88,6 +97,7 @@ class LDAPObjClass{ void setDesc (char *oc_desc); void setOid (char *oc_oid); void setKind (int oc_kind); + void setSup (char **oc_sup); };