3 * Copyright 2003-2013 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
13 #include "LDAPObjClass.h"
14 #include "LDAPAttrType.h"
17 * Represents the LDAP schema
22 * map of object classes: index is name, value is LDAPObjClass object
24 map <string, LDAPObjClass> object_classes;
27 * map of attribute types: index is name, value is LDAPAttrType object
29 map <string, LDAPAttrType> attr_types;
34 * Constructs an empty object
41 virtual ~LDAPSchema();
44 * Fill the object_classes map
45 * @param oc description of one objectclass (string returned by search
47 * "( 1.2.3.4.5 NAME '<name>' SUP <supname> STRUCTURAL
48 * DESC '<description>' MUST ( <attrtype> ) MAY ( <attrtype> ))"
50 void setObjectClasses (const StringList &oc);
53 * Fill the attr_types map
54 * @param at description of one attribute type
55 * (string returned by search command), in form:
56 * "( 1.2.3.4.6 NAME ( '<name>' ) DESC '<desc>'
57 * EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )"
59 void setAttributeTypes (const StringList &at);
62 * Returns object class object with given name
64 LDAPObjClass getObjectClassByName (std::string name);
67 * Returns attribute type object with given name
69 LDAPAttrType getAttributeTypeByName (string name);
73 #endif // LDAP_SCHEMA_H