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)
39 LDAPAttrType (const LDAPAttrType& oc);
42 * Constructs new object and fills the data structure by parsing the
44 * @param at_item description of attribute type is string returned
45 * by the search command. It is in the form:
46 * "( SuSE.YaST.Attr:19 NAME ( 'skelDir' ) DESC ''
47 * EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )"
49 LDAPAttrType (string at_item);
54 virtual ~LDAPAttrType();
58 * Returns attribute description
63 * Returns attribute oid
68 * Returns attribute name (first one if there are more of them)
73 * Returns all attribute names
75 StringList getNames();
78 * Returns true if attribute type allows only single value
83 * Return the 'usage' value:
84 * (0=userApplications, 1=directoryOperation, 2=distributedOperation,
89 void setNames (char **at_names);
90 void setDesc (char *at_desc);
91 void setOid (char *at_oid);
92 void setSingle (int at_single_value);
93 void setUsage (int at_usage );
96 #endif // LDAP_ATTRTYPE_H