X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fldap_schema.h;h=3ac68810c9fd7bcff9672c1a82786b88b9d851a3;hb=f28e0c19673a59088edd6bc3e54820507e9eca25;hp=0e66b681f13031c3592d6154b7a607486ea69520;hpb=7129d11e8fd02854312b7bb42b1402d4041f52b0;p=openldap diff --git a/include/ldap_schema.h b/include/ldap_schema.h index 0e66b681f1..3ac68810c9 100644 --- a/include/ldap_schema.h +++ b/include/ldap_schema.h @@ -1,3 +1,4 @@ +/* $OpenLDAP$ */ /* * Copyright 1999 The OpenLDAP Foundation, Redwood City, California, USA * All rights reserved. @@ -32,6 +33,19 @@ LDAP_BEGIN_DECL #define LDAP_SCHERR_DUPOPT 9 #define LDAP_SCHERR_EMPTY 10 +typedef struct ldap_syntax { + char *syn_oid; /* REQUIRED */ + char *syn_desc; /* OPTIONAL */ +} LDAP_SYNTAX; + +typedef struct ldap_matchingrule { + char *mr_oid; /* REQUIRED */ + char **mr_names; /* OPTIONAL */ + char *mr_desc; /* OPTIONAL */ + int mr_obsolete; /* OPTIONAL */ + char *mr_syntax_oid; /* REQUIRED */ +} LDAP_MATCHING_RULE; + typedef struct ldap_attributetype { char *at_oid; /* REQUIRED */ char **at_names; /* OPTIONAL */ @@ -73,11 +87,81 @@ typedef struct ldap_objectclass { #define LDAP_SCHEMA_STRUCTURAL 1 #define LDAP_SCHEMA_AUXILIARY 2 -LDAP_F(LDAP_OBJECT_CLASS *) ldap_str2objectclass LDAP_P(( char * s, int * code, char ** errp )); -LDAP_F(LDAP_ATTRIBUTE_TYPE *) ldap_str2attributetype LDAP_P(( char * s, int * code, char ** errp )); -LDAP_F( char *) ldap_objectclass2str LDAP_P(( LDAP_OBJECT_CLASS * oc )); -LDAP_F( char *) ldap_attributetype2str LDAP_P(( LDAP_ATTRIBUTE_TYPE * at )); -LDAP_F( char *) ldap_scherr2str LDAP_P(( int code )); +LIBLDAP_F( LDAP_CONST char * ) +ldap_syntax2name LDAP_P(( + LDAP_SYNTAX * syn )); + +LIBLDAP_F( LDAP_CONST char * ) +ldap_matchingrule2name LDAP_P(( + LDAP_MATCHING_RULE * mr )); + +LIBLDAP_F( LDAP_CONST char * ) +ldap_attributetype2name LDAP_P(( + LDAP_ATTRIBUTE_TYPE * at )); + +LIBLDAP_F( LDAP_CONST char * ) +ldap_objectclass2name LDAP_P(( + LDAP_OBJECT_CLASS * oc )); + +LIBLDAP_F( void ) +ldap_syntax_free LDAP_P(( + LDAP_SYNTAX * syn )); + +LIBLDAP_F( void ) +ldap_matchingrule_free LDAP_P(( + LDAP_MATCHING_RULE * mr )); + +LIBLDAP_F( void ) +ldap_attributetype_free LDAP_P(( + LDAP_ATTRIBUTE_TYPE * at )); + +LIBLDAP_F( void ) +ldap_objectclass_free LDAP_P(( + LDAP_OBJECT_CLASS * oc )); + +LIBLDAP_F( LDAP_OBJECT_CLASS * ) +ldap_str2objectclass LDAP_P(( + LDAP_CONST char * s, + int * code, + LDAP_CONST char ** errp )); + +LIBLDAP_F( LDAP_ATTRIBUTE_TYPE * ) +ldap_str2attributetype LDAP_P(( + LDAP_CONST char * s, + int * code, + LDAP_CONST char ** errp )); + +LIBLDAP_F( LDAP_SYNTAX * ) +ldap_str2syntax LDAP_P(( + LDAP_CONST char * s, + int * code, + LDAP_CONST char ** errp )); + +LIBLDAP_F( LDAP_MATCHING_RULE * ) +ldap_str2matchingrule LDAP_P(( + LDAP_CONST char * s, + int * code, + LDAP_CONST char ** errp )); + +LIBLDAP_F( char *) +ldap_objectclass2str LDAP_P(( + LDAP_CONST LDAP_OBJECT_CLASS * oc )); + +LIBLDAP_F( char *) +ldap_attributetype2str LDAP_P(( + LDAP_CONST LDAP_ATTRIBUTE_TYPE * at )); + +LIBLDAP_F( char *) +ldap_syntax2str LDAP_P(( + LDAP_CONST LDAP_SYNTAX * syn )); + +LIBLDAP_F( char *) +ldap_matchingrule2str LDAP_P(( + LDAP_CONST LDAP_MATCHING_RULE * mr )); + +LIBLDAP_F( char *) +ldap_scherr2str LDAP_P(( + int code )) LDAP_GCCATTR((const)); LDAP_END_DECL