Skip to content
Snippets Groups Projects
Commit 39bc8e7e authored by Ralf Haferkamp's avatar Ralf Haferkamp
Browse files

honor superior Objectclasses

parent 5a5da65d
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ LDAPObjClass::LDAPObjClass(){
names = StringList ();
must = StringList();
may = StringList();
sup = StringList();
}
LDAPObjClass::LDAPObjClass (const LDAPObjClass &oc){
......@@ -28,6 +29,7 @@ LDAPObjClass::LDAPObjClass (const LDAPObjClass &oc){
must = oc.must;
may = oc.may;
kind = oc.kind;
sup = oc.sup;
}
LDAPObjClass::LDAPObjClass (string oc_item) {
......@@ -47,6 +49,7 @@ LDAPObjClass::LDAPObjClass (string oc_item) {
this->setKind (o->oc_kind);
this->setMust (o->oc_at_oids_must);
this->setMay (o->oc_at_oids_may);
this->setSup (o->oc_sup_oids);
}
// else? -> error
}
......@@ -71,6 +74,10 @@ void LDAPObjClass::setMay (char **oc_may) {
may = StringList (oc_may);
}
void LDAPObjClass::setSup (char **oc_sup) {
sup = StringList (oc_sup);
}
void LDAPObjClass::setDesc (char *oc_desc) {
desc = string ();
if (oc_desc)
......@@ -103,6 +110,10 @@ StringList LDAPObjClass::getMay () {
return may;
}
StringList LDAPObjClass::getSup () {
return sup;
}
string LDAPObjClass::getName () {
if (names.empty())
......
......@@ -21,7 +21,7 @@ using namespace std;
*/
class LDAPObjClass{
private :
StringList names, must, may;
StringList names, must, may, sup;
string desc, oid;
int kind;
......@@ -81,6 +81,11 @@ class LDAPObjClass{
* Returns list of allowed (and not required) attributes
*/
StringList getMay();
/**
* Returns list of the OIDs of the superior ObjectClasses
*/
StringList getSup();
void setNames (char **oc_names);
void setMay (char **oc_may);
......@@ -88,6 +93,7 @@ class LDAPObjClass{
void setDesc (char *oc_desc);
void setOid (char *oc_oid);
void setKind (int oc_kind);
void setSup (char **oc_sup);
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment