ChangeSet ID: 21366 CVSROOT: /opt/cvs-commit Module name: wine Changes by: julliard@winehq.org 2005/11/21 07:33:37
Modified files: dlls/wldap32 : wldap32.spec winldap_private.h control.c
Log message: Hans Leidekker hans@it.vu.nl Implement ldap_create_vlv_control{A,W}, ldap_encode_sort_control{A,W}. Add a stub for ldap_create_page_control{A,W}.
Patch: http://cvs.winehq.org/patch.py?id=21366
Old revision New revision Changes Path 1.29 1.30 +7 -7 wine/dlls/wldap32/wldap32.spec 1.30 1.31 +16 -0 wine/dlls/wldap32/winldap_private.h 1.2 1.3 +68 -0 wine/dlls/wldap32/control.c
Index: wine/dlls/wldap32/wldap32.spec diff -u -p wine/dlls/wldap32/wldap32.spec:1.29 wine/dlls/wldap32/wldap32.spec:1.30 --- wine/dlls/wldap32/wldap32.spec:1.29 21 Nov 2005 13:33:37 -0000 +++ wine/dlls/wldap32/wldap32.spec 21 Nov 2005 13:33:37 -0000 @@ -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) Index: wine/dlls/wldap32/winldap_private.h diff -u -p wine/dlls/wldap32/winldap_private.h:1.30 wine/dlls/wldap32/winldap_private.h:1.31 --- wine/dlls/wldap32/winldap_private.h:1.30 21 Nov 2005 13:33:37 -0000 +++ wine/dlls/wldap32/winldap_private.h 21 Nov 2005 13:33:37 -0000 @@ -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(WLDA 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*); Index: wine/dlls/wldap32/control.c diff -u -p wine/dlls/wldap32/control.c:1.2 wine/dlls/wldap32/control.c:1.3 --- wine/dlls/wldap32/control.c:1.2 21 Nov 2005 13:33:37 -0000 +++ wine/dlls/wldap32/control.c 21 Nov 2005 13:33:37 -0000 @@ -89,6 +89,22 @@ ULONG ldap_controls_freeW( LDAPControlW 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 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 );