2 * Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
6 #ifndef LDAP_ATTRTYPE_H
7 #define LDAP_ATTRTYPE_H
9 #include <ldap_schema.h>
12 #include "StringList.h"
14 #define SCHEMA_PARSE_FLAG 0x03
20 * Represents the Attribute Type (from LDAP schema)
25 string desc, oid, equality, syntax;
38 LDAPAttrType (const LDAPAttrType& oc);
41 * Constructs new object and fills the data structure by parsing the
43 * @param at_item description of attribute type is string returned
44 * by the search command. It is in the form:
45 * "( SuSE.YaST.Attr:19 NAME ( 'skelDir' ) DESC ''
46 * EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )"
48 LDAPAttrType (string at_item);
53 virtual ~LDAPAttrType();
57 * Returns attribute description
62 * Returns attribute oid
67 * Returns equality matching rule
69 string getEquality ();
72 * Returns attribute syntax definition
77 * Returns attribute name (first one if there are more of them)
82 * Returns all attribute names
84 StringList getNames();
87 * Returns true if attribute type allows only single value
91 void setNames (char **at_names);
92 void setDesc (char *at_desc);
93 void setEquality (char *at_equality_oid);
94 void setSyntax (char *at_syntax_oid);
95 void setOid (char *at_oid);
96 void setSingle (int at_single_value);
100 #endif // LDAP_ATTRTYPE_H