2 * Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
6 #ifndef LDAP_OBJCLASS_H
7 #define LDAP_OBJCLASS_H
9 #include <ldap_schema.h>
12 #include "StringList.h"
14 #define SCHEMA_PARSE_FLAG 0x03
20 * Represents the Object Class (from LDAP schema)
24 StringList names, must, may, sup;
31 * Constructs an empty object.
38 LDAPObjClass (const LDAPObjClass& oc);
41 * Constructs new object and fills the data structure by parsing the
43 * @param oc_item description of object class is string returned
44 * by the search command. It is in the form:
45 * "( SuSE.YaST.OC:5 NAME 'userTemplate' SUP objectTemplate STRUCTURAL
46 * DESC 'User object template' MUST ( cn ) MAY ( secondaryGroup ))"
48 LDAPObjClass (string oc_item);
53 virtual ~LDAPObjClass();
56 * Returns object class description
61 * Returns object class oid
66 * Returns object class name (first one if there are more of them)
71 * Returns object class kind: 0=ABSTRACT, 1=STRUCTURAL, 2=AUXILIARY
76 * Returns all object class names
78 StringList getNames();
81 * Returns list of required attributes
86 * Returns list of allowed (and not required) attributes
91 * Returns list of the OIDs of the superior ObjectClasses
95 void setNames (char **oc_names);
96 void setMay (char **oc_may);
97 void setMust (char **oc_must);
98 void setDesc (char *oc_desc);
99 void setOid (char *oc_oid);
100 void setKind (int oc_kind);
101 void setSup (char **oc_sup);
105 #endif // LDAP_OBJCLASS_H