version 1.32, 2004/05/23 10:24:04
|
version 1.37, 2004/08/26 03:30:49
|
Line 1
|
Line 1
|
/* $OpenLDAP: pkg/ldap/include/slapi-plugin.h,v 1.31 2004/01/01 18:15:24 kurt Exp $ */ |
/* $OpenLDAP: pkg/ldap/include/slapi-plugin.h,v 1.36 2004/08/25 13:18:56 lukeh Exp $ */ |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
* |
* |
* Copyright 1998-2004 The OpenLDAP Foundation. |
* Copyright 1998-2004 The OpenLDAP Foundation. |
Line 25
|
Line 25
|
|
|
#include <ldap.h> |
#include <ldap.h> |
|
|
typedef struct slapi_pblock Slapi_PBlock; |
typedef struct slapi_pblock Slapi_PBlock; |
typedef struct slapi_entry Slapi_Entry; |
typedef struct slapi_entry Slapi_Entry; |
typedef struct slapi_attr Slapi_Attr; |
typedef struct slapi_attr Slapi_Attr; |
typedef struct slapi_value Slapi_Value; |
typedef struct slapi_value Slapi_Value; |
typedef struct slapi_valueset Slapi_ValueSet; |
typedef struct slapi_valueset Slapi_ValueSet; |
typedef struct slapi_filter Slapi_Filter; |
typedef struct slapi_filter Slapi_Filter; |
typedef struct slapi_dn Slapi_DN; |
typedef struct slap_backend_db Slapi_Backend; |
typedef struct slapi_rdn Slapi_RDN; |
typedef struct slap_op Slapi_Operation; |
|
typedef struct slap_conn Slapi_Connection; |
|
typedef struct slapi_dn Slapi_DN; |
|
typedef struct slapi_rdn Slapi_RDN; |
|
typedef struct slapi_mod Slapi_Mod; |
|
typedef struct slapi_mods Slapi_Mods; |
|
typedef struct slapi_componentid Slapi_ComponentId; |
|
|
/* pblock routines */ |
/* pblock routines */ |
int slapi_pblock_get( Slapi_PBlock *pb, int arg, void *value ); |
int slapi_pblock_get( Slapi_PBlock *pb, int arg, void *value ); |
int slapi_pblock_set( Slapi_PBlock *pb, int arg, void *value ); |
int slapi_pblock_set( Slapi_PBlock *pb, int arg, void *value ); |
Slapi_PBlock *slapi_pblock_new(); |
Slapi_PBlock *slapi_pblock_new( void ); |
void slapi_pblock_destroy( Slapi_PBlock* ); |
void slapi_pblock_destroy( Slapi_PBlock *pb ); |
|
|
/* entry/attr/dn routines */ |
/* entry/attr/dn routines */ |
Slapi_Entry *slapi_str2entry( char *s, int flags ); |
Slapi_Entry *slapi_str2entry( char *s, int flags ); |
Line 62 int slapi_entry_attr_merge( Slapi_Entry
|
Line 68 int slapi_entry_attr_merge( Slapi_Entry
|
int slapi_entry_attr_find( Slapi_Entry *e, char *type, Slapi_Attr **attr ); |
int slapi_entry_attr_find( Slapi_Entry *e, char *type, Slapi_Attr **attr ); |
char *slapi_entry_attr_get_charptr( const Slapi_Entry *e, const char *type ); |
char *slapi_entry_attr_get_charptr( const Slapi_Entry *e, const char *type ); |
int slapi_entry_attr_get_int( const Slapi_Entry *e, const char *type ); |
int slapi_entry_attr_get_int( const Slapi_Entry *e, const char *type ); |
int slapi_entry_attr_get_long( const Slapi_Entry *e, const char *type ); |
long slapi_entry_attr_get_long( const Slapi_Entry *e, const char *type ); |
int slapi_entry_attr_get_uint( const Slapi_Entry *e, const char *type ); |
unsigned int slapi_entry_attr_get_uint( const Slapi_Entry *e, const char *type ); |
int slapi_entry_attr_get_ulong( const Slapi_Entry *e, const char *type ); |
unsigned long slapi_entry_attr_get_ulong( const Slapi_Entry *e, const char *type ); |
int slapi_attr_get_values( Slapi_Attr *attr, struct berval ***vals ); |
int slapi_attr_get_values( Slapi_Attr *attr, struct berval ***vals ); |
char *slapi_dn_normalize( char *dn ); |
char *slapi_dn_normalize( char *dn ); |
char *slapi_dn_normalize_case( char *dn ); |
char *slapi_dn_normalize_case( char *dn ); |
Line 73 char *slapi_dn_beparent( Slapi_PBlock *p
|
Line 79 char *slapi_dn_beparent( Slapi_PBlock *p
|
char *slapi_dn_parent( const char *dn ); |
char *slapi_dn_parent( const char *dn ); |
int slapi_dn_isparent( const char *parentdn, const char *childdn ); |
int slapi_dn_isparent( const char *parentdn, const char *childdn ); |
char *slapi_dn_ignore_case( char *dn ); |
char *slapi_dn_ignore_case( char *dn ); |
|
int slapi_rdn2typeval( char *rdn, char **type, struct berval *bv ); |
|
char *slapi_dn_plus_rdn(const char *dn, const char *rdn); |
|
|
/* DS 5.x SLAPI */ |
/* DS 5.x SLAPI */ |
int slapi_access_allowed( Slapi_PBlock *pb, Slapi_Entry *e, char *attr, struct berval *val, int access ); |
int slapi_access_allowed( Slapi_PBlock *pb, Slapi_Entry *e, char *attr, struct berval *val, int access ); |
Line 120 int slapi_entry_add_string(Slapi_Entry *
|
Line 128 int slapi_entry_add_string(Slapi_Entry *
|
int slapi_entry_delete_string(Slapi_Entry *e, const char *type, const char *value); |
int slapi_entry_delete_string(Slapi_Entry *e, const char *type, const char *value); |
int slapi_entry_first_attr( const Slapi_Entry *e, Slapi_Attr **attr ); |
int slapi_entry_first_attr( const Slapi_Entry *e, Slapi_Attr **attr ); |
int slapi_entry_next_attr( const Slapi_Entry *e, Slapi_Attr *prevattr, Slapi_Attr **attr ); |
int slapi_entry_next_attr( const Slapi_Entry *e, Slapi_Attr *prevattr, Slapi_Attr **attr ); |
|
const char *slapi_entry_get_uniqueid( const Slapi_Entry *e ); |
|
void slapi_entry_set_uniqueid( Slapi_Entry *e, char *uniqueid ); |
|
int slapi_entry_schema_check( Slapi_PBlock *pb, Slapi_Entry *e ); |
|
int slapi_entry_rdn_values_present( const Slapi_Entry *e ); |
|
int slapi_entry_add_rdn_values( Slapi_Entry *e ); |
char *slapi_attr_syntax_normalize( const char *s ); |
char *slapi_attr_syntax_normalize( const char *s ); |
|
|
Slapi_Value *slapi_value_new( void ); |
Slapi_Value *slapi_value_new( void ); |
Line 155 int slapi_valueset_next_value( Slapi_Val
|
Line 168 int slapi_valueset_next_value( Slapi_Val
|
int slapi_valueset_count( const Slapi_ValueSet *vs); |
int slapi_valueset_count( const Slapi_ValueSet *vs); |
void slapi_valueset_set_valueset(Slapi_ValueSet *vs1, const Slapi_ValueSet *vs2); |
void slapi_valueset_set_valueset(Slapi_ValueSet *vs1, const Slapi_ValueSet *vs2); |
|
|
|
/* locks and synchronization */ |
typedef struct slapi_mutex Slapi_Mutex; |
typedef struct slapi_mutex Slapi_Mutex; |
typedef struct slapi_condvar Slapi_CondVar; |
typedef struct slapi_condvar Slapi_CondVar; |
Slapi_Mutex *slapi_new_mutex( void ); |
Slapi_Mutex *slapi_new_mutex( void ); |
Line 166 void slapi_destroy_condvar( Slapi_CondVa
|
Line 180 void slapi_destroy_condvar( Slapi_CondVa
|
int slapi_wait_condvar( Slapi_CondVar *cvar, struct timeval *timeout ); |
int slapi_wait_condvar( Slapi_CondVar *cvar, struct timeval *timeout ); |
int slapi_notify_condvar( Slapi_CondVar *cvar, int notify_all ); |
int slapi_notify_condvar( Slapi_CondVar *cvar, int notify_all ); |
|
|
|
/* thread-safe LDAP connections */ |
|
LDAP *slapi_ldap_init( char *ldaphost, int ldapport, int secure, int shared ); |
|
void slapi_ldap_unbind( LDAP *ld ); |
|
|
char *slapi_ch_malloc( unsigned long size ); |
char *slapi_ch_malloc( unsigned long size ); |
void slapi_ch_free( void **ptr ); |
void slapi_ch_free( void **ptr ); |
void slapi_ch_free_string( char **ptr ); |
void slapi_ch_free_string( char **ptr ); |
Line 511 void slapi_set_object_extension(int obje
|
Line 529 void slapi_set_object_extension(int obje
|
#define SLAPI_RESULT_TEXT 882 |
#define SLAPI_RESULT_TEXT 882 |
#define SLAPI_RESULT_MATCHED 883 |
#define SLAPI_RESULT_MATCHED 883 |
|
|
|
/* managedsait control */ |
|
#define SLAPI_MANAGEDSAIT 1000 |
|
|
/* audit plugin defines */ |
/* audit plugin defines */ |
#define SLAPI_PLUGIN_AUDIT_DATA 1100 |
#define SLAPI_PLUGIN_AUDIT_DATA 1100 |
#define SLAPI_PLUGIN_AUDIT_FN 1101 |
#define SLAPI_PLUGIN_AUDIT_FN 1101 |
|
|
/* managedsait control */ |
/* backend_group extension */ |
#define SLAPI_MANAGEDSAIT 1000 |
#define SLAPI_X_PLUGIN_PRE_GROUP_FN 1202 |
|
#define SLAPI_X_PLUGIN_POST_GROUP_FN 1203 |
|
|
|
#define SLAPI_X_GROUP_ENTRY 1250 /* group entry */ |
|
#define SLAPI_X_GROUP_ATTRIBUTE 1251 /* member attribute */ |
|
#define SLAPI_X_GROUP_OPERATION_DN 1252 /* asserted value */ |
|
#define SLAPI_X_GROUP_TARGET_ENTRY 1253 /* target entry */ |
|
|
/* config stuff */ |
/* config stuff */ |
#define SLAPI_CONFIG_FILENAME 40 |
#define SLAPI_CONFIG_FILENAME 40 |