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

Implement ldap_create_vlv_control{A,W},

ldap_encode_sort_control{A,W}. Add a stub for ldap_create_page_control{A,W}.
parent f41abbd0
......@@ -89,6 +89,22 @@ ULONG ldap_controls_freeW( LDAPControlW **controls )
return ret;
}
ULONG ldap_create_page_controlA( WLDAP32_LDAP *ld, ULONG pagesize,
struct WLDAP32_berval *cookie, UCHAR critical, PLDAPControlA *control )
{
FIXME( "(%p, 0x%08lx, %p, 0x%02x, %p)\n", ld, pagesize, cookie,
critical, control );
return LDAP_NOT_SUPPORTED;
}
ULONG ldap_create_page_controlW( WLDAP32_LDAP *ld, ULONG pagesize,
struct WLDAP32_berval *cookie, UCHAR critical, PLDAPControlW *control )
{
FIXME( "(%p, 0x%08lx, %p, 0x%02x, %p)\n", ld, pagesize, cookie,
critical, control );
return LDAP_NOT_SUPPORTED;
}
ULONG ldap_create_sort_controlA( WLDAP32_LDAP *ld, PLDAPSortKeyA *sortkey,
UCHAR critical, PLDAPControlA *control )
{
......@@ -145,6 +161,58 @@ ULONG ldap_create_sort_controlW( WLDAP32_LDAP *ld, PLDAPSortKeyW *sortkey,
return ret;
}
INT ldap_create_vlv_controlA( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info,
char critical, LDAPControlA **control )
{
INT ret = LDAP_NOT_SUPPORTED;
#ifdef HAVE_LDAP
LDAPControlW **controlW = NULL;
TRACE( "(%p, %p, 0x%02x, %p)\n", ld, info, critical, control );
if (!ld) return ~0UL;
ret = ldap_create_vlv_controlW( ld, info, critical, controlW );
*control = controlWtoA( *controlW );
ldap_control_freeW( *controlW );
#endif
return ret;
}
INT ldap_create_vlv_controlW( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info,
char critical, LDAPControlW **control )
{
INT ret = LDAP_NOT_SUPPORTED;
#ifdef HAVE_LDAP
LDAPControl **controlU = NULL;
TRACE( "(%p, %p, 0x%02x, %p)\n", ld, info, critical, control );
if (!ld) return ~0UL;
ret = ldap_create_vlv_control( ld, (LDAPVLVInfo *)info, controlU );
*control = controlUtoW( *controlU );
ldap_control_free( *controlU );
#endif
return ret;
}
ULONG ldap_encode_sort_controlA( WLDAP32_LDAP *ld, PLDAPSortKeyA *sortkeys,
PLDAPControlA control, BOOLEAN critical )
{
return ldap_create_sort_controlA( ld, sortkeys, critical, &control );
}
ULONG ldap_encode_sort_controlW( WLDAP32_LDAP *ld, PLDAPSortKeyW *sortkeys,
PLDAPControlW control, BOOLEAN critical )
{
return ldap_create_sort_controlW( ld, sortkeys, critical, &control );
}
ULONG ldap_free_controlsA( LDAPControlA **controls )
{
return ldap_controls_freeA( controls );
......
......@@ -187,6 +187,18 @@ typedef struct ldapcontrolW
BOOLEAN ldctl_iscritical;
} LDAPControlW, *PLDAPControlW;
typedef struct WLDAP32_ldapvlvinfo
{
int ldvlv_version;
ULONG ldvlv_before_count;
ULONG ldvlv_after_count;
ULONG ldvlv_offset;
ULONG ldvlv_count;
PBERVAL ldvlv_attrvalue;
PBERVAL ldvlv_context;
VOID *ldvlv_extradata;
} WLDAP32_LDAPVLVInfo, *WLDAP32_PLDAPVLVInfo;
typedef struct ldapsearch LDAPSearch, *PLDAPSearch;
typedef struct ldapsortkeyA
......@@ -275,8 +287,12 @@ ULONG WLDAP32_ldap_count_references(WLDAP32_LDAP*,WLDAP32_LDAPMessage*);
ULONG ldap_count_valuesA(PCHAR*);
ULONG ldap_count_valuesW(PWCHAR*);
ULONG WLDAP32_ldap_count_values_len(PBERVAL*);
ULONG ldap_create_page_controlA(WLDAP32_PLDAP,ULONG,struct WLDAP32_berval*,UCHAR,PLDAPControlA*);
ULONG ldap_create_page_controlW(WLDAP32_PLDAP,ULONG,struct WLDAP32_berval*,UCHAR,PLDAPControlW*);
ULONG ldap_create_sort_controlA(WLDAP32_PLDAP,PLDAPSortKeyA*,UCHAR,PLDAPControlA*);
ULONG ldap_create_sort_controlW(WLDAP32_PLDAP,PLDAPSortKeyW*,UCHAR,PLDAPControlW*);
INT ldap_create_vlv_controlA(WLDAP32_LDAP*,WLDAP32_LDAPVLVInfo*,char,LDAPControlA**);
INT ldap_create_vlv_controlW(WLDAP32_LDAP*,WLDAP32_LDAPVLVInfo*,char,LDAPControlW**);
ULONG ldap_deleteA(WLDAP32_LDAP*,PCHAR);
ULONG ldap_deleteW(WLDAP32_LDAP*,PWCHAR);
ULONG ldap_delete_extA(WLDAP32_LDAP*,PCHAR,PLDAPControlA*,PLDAPControlA*,ULONG*);
......
......@@ -85,9 +85,9 @@
95 cdecl ldap_count_references(ptr ptr) WLDAP32_ldap_count_references
96 cdecl ldap_count_valuesA(ptr)
97 cdecl ldap_count_valuesW(ptr)
98 stub ldap_create_page_control
99 stub ldap_create_page_controlA
100 stub ldap_create_page_controlW
98 cdecl ldap_create_page_control(ptr long ptr long ptr) ldap_create_page_controlA
99 cdecl ldap_create_page_controlA(ptr long ptr long ptr)
100 cdecl ldap_create_page_controlW(ptr long ptr long ptr)
101 cdecl ldap_create_sort_control(ptr ptr long ptr) ldap_create_sort_controlA
102 cdecl ldap_create_sort_controlA(ptr ptr long ptr)
103 cdecl ldap_create_sort_controlW(ptr ptr long ptr)
......@@ -102,8 +102,8 @@
112 cdecl ldap_delete_sA(ptr str)
113 cdecl ldap_delete_sW(ptr wstr)
114 cdecl ldap_dn2ufnW(wstr)
115 stub ldap_encode_sort_controlA
116 stub ldap_encode_sort_controlW
115 cdecl ldap_encode_sort_controlA(ptr ptr ptr long)
116 cdecl ldap_encode_sort_controlW(ptr ptr ptr long)
117 cdecl ldap_err2stringA(long)
118 cdecl ldap_err2stringW(long)
119 cdecl ldap_escape_filter_elementA(str long ptr long)
......@@ -234,8 +234,8 @@
316 cdecl ldap_sasl_bind_sA(ptr str str ptr ptr ptr ptr)
317 stub ldap_parse_extended_resultW
318 stub ldap_parse_extended_resultA
319 stub ldap_create_vlv_controlW
320 stub ldap_create_vlv_controlA
319 cdecl ldap_create_vlv_controlW(ptr ptr long ptr)
320 cdecl ldap_create_vlv_controlA(ptr ptr long ptr)
321 stub ldap_parse_vlv_controlW
322 stub ldap_parse_vlv_controlA
329 cdecl ldap_start_tls_sW(ptr ptr ptr ptr ptr)
......
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