/* $OpenLDAP$ */
/*
- * Copyright 1999-2000 The OpenLDAP Foundation, Redwood City, California, USA
+ * Copyright 1998-2002 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
- * Redistribution and use in source and binary forms are permitted only
- * as authorized by the OpenLDAP Public License. A copy of this
- * license is available at http://www.OpenLDAP.org/license.html or
- * in file LICENSE in the top-level directory of the distribution.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License. A copy of this license is available at
+ * http://www.OpenLDAP.org/license.html or in file LICENSE in the
+ * top-level directory of the distribution.
*/
/*
* ldap-schema.h - Header for basic schema handling functions that can be
* used by both clients and servers.
+ * these routines should be renamed ldap_x_...
*/
#ifndef _LDAP_SCHEMA_H
LDAPSchemaExtensionItem **mr_extensions; /* OPTIONAL */
} LDAPMatchingRule;
+typedef struct ldap_matchingruleuse {
+ char *mru_oid; /* REQUIRED */
+ char **mru_names; /* OPTIONAL */
+ char *mru_desc; /* OPTIONAL */
+ int mru_obsolete; /* OPTIONAL */
+ char **mru_applies_oids; /* REQUIRED */
+ LDAPSchemaExtensionItem **mru_extensions; /* OPTIONAL */
+} LDAPMatchingRuleUse;
+
typedef struct ldap_attributetype {
char *at_oid; /* REQUIRED */
char **at_names; /* OPTIONAL */
#define LDAP_SCHEMA_ALLOW_QUOTED 0x02 /* Allow bogus extra quotes */
#define LDAP_SCHEMA_ALLOW_DESCR 0x04 /* Allow descr instead of OID */
#define LDAP_SCHEMA_ALLOW_DESCR_PREFIX 0x08 /* Allow descr as OID prefix */
-#define LDAP_SCHEMA_ALLOW_ALL 0x0f /* Be very liberal in parsing */
+#define LDAP_SCHEMA_ALLOW_OID_MACRO 0x10 /* Allow OID macros in slapd */
+#define LDAP_SCHEMA_ALLOW_ALL 0x1f /* Be very liberal in parsing */
+#define LDAP_SCHEMA_SKIP 0x80 /* Don't malloc any result */
LDAP_F( LDAP_CONST char * )
ldap_syntax2name LDAP_P((
ldap_matchingrule2name LDAP_P((
LDAPMatchingRule * mr ));
+LDAP_F( LDAP_CONST char * )
+ldap_matchingruleuse2name LDAP_P((
+ LDAPMatchingRuleUse * mru ));
+
LDAP_F( LDAP_CONST char * )
ldap_attributetype2name LDAP_P((
LDAPAttributeType * at ));
ldap_matchingrule_free LDAP_P((
LDAPMatchingRule * mr ));
+LDAP_F( void )
+ldap_matchingruleuse_free LDAP_P((
+ LDAPMatchingRuleUse * mr ));
+
LDAP_F( void )
ldap_attributetype_free LDAP_P((
LDAPAttributeType * at ));
LDAP_CONST char ** errp,
LDAP_CONST int flags ));
+LDAP_F( LDAPMatchingRuleUse * )
+ldap_str2matchingruleuse LDAP_P((
+ LDAP_CONST char * s,
+ int * code,
+ LDAP_CONST char ** errp,
+ LDAP_CONST int flags ));
+
LDAP_F( char * )
ldap_objectclass2str LDAP_P((
- LDAP_CONST LDAPObjectClass * oc ));
+ LDAPObjectClass * oc ));
+
+LDAP_F( struct berval * )
+ldap_objectclass2bv LDAP_P((
+ LDAPObjectClass * oc, struct berval *bv ));
LDAP_F( char * )
ldap_attributetype2str LDAP_P((
- LDAP_CONST LDAPAttributeType * at ));
+ LDAPAttributeType * at ));
+
+LDAP_F( struct berval * )
+ldap_attributetype2bv LDAP_P((
+ LDAPAttributeType * at, struct berval *bv ));
LDAP_F( char * )
ldap_syntax2str LDAP_P((
- LDAP_CONST LDAPSyntax * syn ));
+ LDAPSyntax * syn ));
+
+LDAP_F( struct berval * )
+ldap_syntax2bv LDAP_P((
+ LDAPSyntax * syn, struct berval *bv ));
LDAP_F( char * )
ldap_matchingrule2str LDAP_P((
- LDAP_CONST LDAPMatchingRule * mr ));
+ LDAPMatchingRule * mr ));
+
+LDAP_F( struct berval * )
+ldap_matchingrule2bv LDAP_P((
+ LDAPMatchingRule * mr, struct berval *bv ));
+
+LDAP_F( char * )
+ldap_matchingruleuse2str LDAP_P((
+ LDAPMatchingRuleUse * mru ));
+
+LDAP_F( struct berval * )
+ldap_matchingruleuse2bv LDAP_P((
+ LDAPMatchingRuleUse * mru, struct berval *bv ));
LDAP_F( char * )
ldap_scherr2str LDAP_P((