Commit da4d701b authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wldap32: Move support for option functions to the Unix library.

parent d48a9495
......@@ -50,6 +50,8 @@ C_ASSERT( sizeof(LDAPModU) == sizeof(LDAPMod) );
C_ASSERT( sizeof(LDAPControlU) == sizeof(LDAPControl) );
C_ASSERT( sizeof(LDAPSortKeyU) == sizeof(LDAPSortKey) );
C_ASSERT( sizeof(LDAPVLVInfoU) == sizeof(LDAPVLVInfo) );
C_ASSERT( sizeof(LDAPAPIInfoU) == sizeof(LDAPAPIInfo) );
C_ASSERT( sizeof(LDAPAPIFeatureInfoU) == sizeof(LDAPAPIFeatureInfo) );
C_ASSERT( sizeof(struct timevalU) == sizeof(struct timeval) );
static LDAPMod *nullmods[] = { NULL };
......@@ -346,6 +348,11 @@ int CDECL wrap_ldap_count_references( void *ld, void *chain )
return ldap_count_references( ld, chain );
}
int CDECL wrap_ldap_count_values_len( struct bervalU **values )
{
return ldap_count_values_len( (struct berval **)values );
}
int CDECL wrap_ldap_create_sort_control( void *ld, LDAPSortKeyU **keylist, int critical, LDAPControlU **control )
{
return ldap_create_sort_control( ld, (LDAPSortKey **)keylist, critical, (LDAPControl **)control );
......@@ -414,6 +421,16 @@ void * CDECL wrap_ldap_first_reference( void *ld, void *chain )
return ldap_first_reference( ld, chain );
}
int CDECL wrap_ldap_get_option( void *ld, int option, void *value )
{
return ldap_get_option( ld, option, value );
}
struct bervalU ** CDECL wrap_ldap_get_values_len( void *ld, void *entry, const char *attr )
{
return (struct bervalU **)ldap_get_values_len( ld, entry, attr );
}
int CDECL wrap_ldap_initialize( void **ld, const char *url )
{
return ldap_initialize( (LDAP **)ld, url );
......@@ -583,6 +600,7 @@ static const struct ldap_funcs funcs =
wrap_ldap_control_free,
wrap_ldap_count_entries,
wrap_ldap_count_references,
wrap_ldap_count_values_len,
wrap_ldap_create_sort_control,
wrap_ldap_create_vlv_control,
wrap_ldap_delete_ext,
......@@ -592,6 +610,8 @@ static const struct ldap_funcs funcs =
wrap_ldap_extended_operation,
wrap_ldap_extended_operation_s,
wrap_ldap_get_dn,
wrap_ldap_get_option,
wrap_ldap_get_values_len,
wrap_ldap_initialize,
wrap_ldap_first_attribute,
wrap_ldap_first_entry,
......
......@@ -60,6 +60,23 @@ typedef struct
void *ldvlv_extradata;
} LDAPVLVInfoU;
typedef struct
{
int ldapai_info_version;
int ldapai_api_version;
int ldapai_protocol_version;
char **ldapai_extensions;
char *ldapai_vendor_name;
int ldapai_vendor_version;
} LDAPAPIInfoU;
typedef struct
{
int ldapaif_info_version;
char *ldapaif_name;
int ldapaif_version;
} LDAPAPIFeatureInfoU;
typedef struct timevalU
{
unsigned long tv_sec;
......@@ -108,6 +125,7 @@ extern int CDECL wrap_ldap_compare_ext_s(void *, const char *, const char *, str
extern void CDECL wrap_ldap_control_free(LDAPControlU *) DECLSPEC_HIDDEN;
extern int CDECL wrap_ldap_count_entries(void *, void *) DECLSPEC_HIDDEN;
extern int CDECL wrap_ldap_count_references(void *, void *) DECLSPEC_HIDDEN;
extern int CDECL wrap_ldap_count_values_len(struct bervalU **) DECLSPEC_HIDDEN;
extern int CDECL wrap_ldap_create_sort_control(void *, LDAPSortKeyU **, int, LDAPControlU **) DECLSPEC_HIDDEN;
extern int CDECL wrap_ldap_create_vlv_control(void *, LDAPVLVInfoU *, LDAPControlU **) DECLSPEC_HIDDEN;
extern int CDECL wrap_ldap_delete_ext(void *, const char *, LDAPControlU **, LDAPControlU **, ULONG *) DECLSPEC_HIDDEN;
......@@ -119,6 +137,8 @@ extern int CDECL wrap_ldap_extended_operation(void *, const char *, struct berva
extern int CDECL wrap_ldap_extended_operation_s(void *, const char *, struct bervalU *, LDAPControlU **,
LDAPControlU **, char **, struct bervalU **) DECLSPEC_HIDDEN;
extern char * CDECL wrap_ldap_get_dn(void *, void *) DECLSPEC_HIDDEN;
extern int CDECL wrap_ldap_get_option(void *, int, void *) DECLSPEC_HIDDEN;
extern struct bervalU ** CDECL wrap_ldap_get_values_len(void *, void *, const char *) DECLSPEC_HIDDEN;
extern int CDECL wrap_ldap_initialize(void **, const char *) DECLSPEC_HIDDEN;
extern char * CDECL wrap_ldap_first_attribute(void *, void *, void **) DECLSPEC_HIDDEN;
extern void * CDECL wrap_ldap_first_entry(void *, void *) DECLSPEC_HIDDEN;
......@@ -181,6 +201,7 @@ struct ldap_funcs
void (CDECL *ldap_control_free)(LDAPControlU *);
int (CDECL *ldap_count_entries)(void *, void *);
int (CDECL *ldap_count_references)(void *, void *);
int (CDECL *ldap_count_values_len)(struct bervalU **);
int (CDECL *ldap_create_sort_control)(void *, LDAPSortKeyU **, int, LDAPControlU **);
int (CDECL *ldap_create_vlv_control)(void *, LDAPVLVInfoU *, LDAPControlU **);
int (CDECL *ldap_delete_ext)(void *, const char *, LDAPControlU **, LDAPControlU **, ULONG *);
......@@ -192,6 +213,8 @@ struct ldap_funcs
int (CDECL *ldap_extended_operation_s)(void *, const char *, struct bervalU *, LDAPControlU **,
LDAPControlU **, char **, struct bervalU **);
char * (CDECL *ldap_get_dn)(void *, void *);
int (CDECL *ldap_get_option)(void *, int, void *);
struct bervalU ** (CDECL *ldap_get_values_len)(void *, void *, const char *);
int (CDECL *ldap_initialize)(void **, const char *);
char * (CDECL *ldap_first_attribute)(void *, void *, void **);
void * (CDECL *ldap_first_entry)(void *, void *);
......
......@@ -33,6 +33,13 @@
#define WLDAP32_LDAP_VERSION2 2
#define WLDAP32_LDAP_VERSION3 3
#define WLDAP32_LDAP_OPT_ON ((void *)1)
#define WLDAP32_LDAP_OPT_OFF ((void *)0)
#define WLDAP32_LDAP_SCOPE_BASE 0x00
#define WLDAP32_LDAP_SCOPE_ONELEVEL 0x01
#define WLDAP32_LDAP_SCOPE_SUBTREE 0x02
typedef enum {
WLDAP32_LDAP_SUCCESS = 0x00,
WLDAP32_LDAP_UNWILLING_TO_PERFORM = 0x35,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment