1
// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPObjClass.h,v 1.3.6.2 2008/05/01 21:28:42 quanah Exp $
3
* Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
4
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
7
#ifndef LDAP_OBJCLASS_H
8
#define LDAP_OBJCLASS_H
10
#include <ldap_schema.h>
13
#include "StringList.h"
15
#define SCHEMA_PARSE_FLAG 0x03
21
* Represents the Object Class (from LDAP schema)
25
StringList names, must, may, sup;
32
* Constructs an empty object.
39
LDAPObjClass (const LDAPObjClass& oc);
42
* Constructs new object and fills the data structure by parsing the
44
* @param oc_item description of object class is string returned
45
* by the search command. It is in the form:
46
* "( SuSE.YaST.OC:5 NAME 'userTemplate' SUP objectTemplate STRUCTURAL
47
* DESC 'User object template' MUST ( cn ) MAY ( secondaryGroup ))"
49
LDAPObjClass (string oc_item);
54
virtual ~LDAPObjClass();
57
* Returns object class description
59
string getDesc() const;
62
* Returns object class oid
64
string getOid() const;
67
* Returns object class name (first one if there are more of them)
69
string getName() const;
72
* Returns object class kind: 0=ABSTRACT, 1=STRUCTURAL, 2=AUXILIARY
77
* Returns all object class names
79
StringList getNames() const;
82
* Returns list of required attributes
84
StringList getMust() const;
87
* Returns list of allowed (and not required) attributes
89
StringList getMay() const;
92
* Returns list of the OIDs of the superior ObjectClasses
94
StringList getSup() const;
96
void setNames (char **oc_names);
97
void setMay (char **oc_may);
98
void setMust (char **oc_must);
99
void setDesc (char *oc_desc);
100
void setOid (char *oc_oid);
101
void setKind (int oc_kind);
102
void setSup (char **oc_sup);
106
#endif // LDAP_OBJCLASS_H