1999-09-09 06:52:19 +08:00
|
|
|
/* $OpenLDAP$ */
|
1999-02-18 10:18:39 +08:00
|
|
|
/* tcl_back.h - tcl backend header (structs, functions)
|
1999-02-17 10:23:18 +08:00
|
|
|
*
|
|
|
|
* Copyright 1999, Ben Collins <bcollins@debian.org>, 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <tcl.h>
|
|
|
|
|
|
|
|
#ifndef SLAPD_TCL_H
|
|
|
|
#define SLAPD_TCL_H
|
|
|
|
|
|
|
|
#include <ldap_cdefs.h>
|
|
|
|
#include "external.h"
|
|
|
|
|
1999-02-18 10:18:39 +08:00
|
|
|
extern ldap_pvt_thread_mutex_t tcl_interpreter_mutex;
|
1999-02-17 10:23:18 +08:00
|
|
|
|
|
|
|
struct i_info {
|
1999-02-18 10:18:39 +08:00
|
|
|
Tcl_Interp *interp;
|
|
|
|
char *name;
|
|
|
|
struct i_info *next;
|
|
|
|
int count;
|
1999-02-17 10:23:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct i_info *global_i;
|
|
|
|
|
|
|
|
struct tclinfo {
|
1999-02-18 10:18:39 +08:00
|
|
|
char *script_path;
|
|
|
|
struct i_info *ti_ii;
|
|
|
|
char *ti_bind;
|
|
|
|
char *ti_unbind;
|
|
|
|
char *ti_search;
|
|
|
|
char *ti_compare;
|
|
|
|
char *ti_modify;
|
|
|
|
char *ti_modrdn;
|
|
|
|
char *ti_add;
|
|
|
|
char *ti_delete;
|
|
|
|
char *ti_abandon;
|
1999-02-17 10:23:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
void readtclscript (char *script, Tcl_Interp * my_tcl);
|
1999-02-18 10:18:39 +08:00
|
|
|
char *tcl_clean_entry (Entry * e);
|
|
|
|
|
1999-02-17 10:23:18 +08:00
|
|
|
int tcl_ldap_debug (
|
1999-02-18 10:18:39 +08:00
|
|
|
ClientData clientData,
|
|
|
|
Tcl_Interp * interp,
|
|
|
|
int argc,
|
|
|
|
char *argv[]
|
1999-02-17 10:23:18 +08:00
|
|
|
);
|
|
|
|
|
1999-02-18 10:18:39 +08:00
|
|
|
int interp_send_results (
|
|
|
|
Backend * be,
|
|
|
|
Connection * conn,
|
|
|
|
Operation * op,
|
|
|
|
char *result,
|
2001-12-31 19:35:52 +08:00
|
|
|
AttributeName *attrs,
|
1999-02-18 10:18:39 +08:00
|
|
|
int attrsonly
|
1999-02-17 10:23:18 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
#endif
|