*/
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2000-2007 The OpenLDAP Foundation.
+ * Copyright 2000-2010 The OpenLDAP Foundation.
* Portions Copyright 2000-2003 Pierangelo Masarati.
* All rights reserved.
*
struct rewrite_info *info
);
+/*
+ * Mapping implementations
+ */
+
+struct rewrite_mapper;
+
+typedef void * (rewrite_mapper_config)(
+ const char *fname,
+ int lineno,
+ int argc,
+ char **argv );
+
+typedef int (rewrite_mapper_apply)(
+ void *ctx,
+ const char *arg,
+ struct berval *retval );
+
+typedef int (rewrite_mapper_destroy)(
+ void *ctx );
+
+typedef struct rewrite_mapper {
+ char *rm_name;
+ rewrite_mapper_config *rm_config;
+ rewrite_mapper_apply *rm_apply;
+ rewrite_mapper_destroy *rm_destroy;
+} rewrite_mapper;
+
+/* For dynamic loading and unloading of mappers */
+LDAP_REWRITE_F (int)
+rewrite_mapper_register(
+ const rewrite_mapper *map );
+
+LDAP_REWRITE_F (int)
+rewrite_mapper_unregister(
+ const rewrite_mapper *map );
+
+LDAP_REWRITE_F (const rewrite_mapper *)
+rewrite_mapper_find(
+ const char *name );
+
LDAP_END_DECL
#endif /* REWRITE_H */