+// $OpenLDAP$
/*
- * Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 2003-2016 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "StringList.h"
-#define SCHEMA_PARSE_FLAG 0x03
-
-
using namespace std;
/**
/**
* Copy constructor
*/
- LDAPObjClass (const LDAPObjClass& oc);
+ LDAPObjClass( const LDAPObjClass& oc );
/**
* Constructs new object and fills the data structure by parsing the
* "( 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
/**
* 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();
+ StringList getSup() const;
void setNames (char **oc_names);
void setMay (char **oc_may);