Commit f667584a authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

winldap.h should include windeh.f and schnlsp.h.

Enclose the API definitions in an extern "C" section and define LDAPAPI. Better stick to the types defined by the PSDK. Fix the ldap_create_vlv_control*() prototypes. Update win32.api.
parent cc01e8ff
......@@ -162,7 +162,7 @@ ULONG ldap_create_sort_controlW( WLDAP32_LDAP *ld, PLDAPSortKeyW *sortkey,
}
INT ldap_create_vlv_controlA( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info,
char critical, LDAPControlA **control )
UCHAR critical, LDAPControlA **control )
{
INT ret = LDAP_NOT_SUPPORTED;
#ifdef HAVE_LDAP
......@@ -182,7 +182,7 @@ INT ldap_create_vlv_controlA( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info,
}
INT ldap_create_vlv_controlW( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info,
char critical, LDAPControlW **control )
UCHAR critical, LDAPControlW **control )
{
INT ret = LDAP_NOT_SUPPORTED;
#ifdef HAVE_LDAP
......
......@@ -264,7 +264,7 @@ exit:
return NULL;
}
ULONG ldap_connect( WLDAP32_LDAP *ld, LDAP_TIMEVAL *timeout )
ULONG ldap_connect( WLDAP32_LDAP *ld, struct l_timeval *timeout )
{
TRACE( "(%p, %p)\n", ld, timeout );
......
......@@ -291,8 +291,8 @@ ULONG ldap_create_page_controlA(WLDAP32_PLDAP,ULONG,struct WLDAP32_berval*,UCHAR
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**);
INT ldap_create_vlv_controlA(WLDAP32_LDAP*,WLDAP32_LDAPVLVInfo*,UCHAR,LDAPControlA**);
INT ldap_create_vlv_controlW(WLDAP32_LDAP*,WLDAP32_LDAPVLVInfo*,UCHAR,LDAPControlW**);
ULONG ldap_deleteA(WLDAP32_LDAP*,PCHAR);
ULONG ldap_deleteW(WLDAP32_LDAP*,PWCHAR);
ULONG ldap_delete_extA(WLDAP32_LDAP*,PCHAR,PLDAPControlA*,PLDAPControlA*,ULONG*);
......
......@@ -19,6 +19,14 @@
#ifndef __WINE_WINLDAP_H
#define __WINE_WINLDAP_H
#include <windef.h>
#include <schnlsp.h>
#ifndef LDAPAPI
#define LDAPAPI __cdecl
#endif
typedef enum {
LDAP_SUCCESS = 0x00,
LDAP_OPERATIONS_ERROR = 0x01,
......@@ -361,6 +369,11 @@ typedef struct ldap_apifeature_infoW
DECL_WINELIB_TYPE_AW(LDAPAPIFeatureInfo)
#ifdef __cplusplus
extern "C" {
#endif
LDAP *cldap_openA(PCHAR,ULONG);
LDAP *cldap_openW(PWCHAR,ULONG);
#define cldap_open WINELIB_NAME_AW(cldap_open)
......@@ -401,7 +414,7 @@ ULONG ldap_compare_ext_sW(LDAP*,PWCHAR,PWCHAR,PWCHAR,struct berval*,PLDAPControl
ULONG ldap_compare_sA(LDAP*,PCHAR,PCHAR,PCHAR);
ULONG ldap_compare_sW(LDAP*,PWCHAR,PWCHAR,PWCHAR);
#define ldap_compare_s WINELIB_NAME_AW(ldap_compare_s)
ULONG ldap_connect(LDAP*,LDAP_TIMEVAL*);
ULONG ldap_connect(LDAP*,struct l_timeval*);
ULONG ldap_control_freeA(LDAPControlA*);
ULONG ldap_control_freeW(LDAPControlW*);
#define ldap_control_free WINELIB_NAME_AW(ldap_control_free)
......@@ -420,8 +433,8 @@ ULONG ldap_create_page_controlW(PLDAP,ULONG,struct berval*,UCHAR,PLDAPControlW*)
ULONG ldap_create_sort_controlA(PLDAP,PLDAPSortKeyA*,UCHAR,PLDAPControlA*);
ULONG ldap_create_sort_controlW(PLDAP,PLDAPSortKeyW*,UCHAR,PLDAPControlW*);
#define ldap_create_sort_control WINELIB_NAME_AW(ldap_create_sort_control)
INT ldap_create_vlv_controlA(LDAP*,LDAPVLVInfo*,char,LDAPControlA**);
INT ldap_create_vlv_controlW(LDAP*,LDAPVLVInfo*,char,LDAPControlW**);
INT ldap_create_vlv_controlA(PLDAP,PLDAPVLVInfo,UCHAR,PLDAPControlA*);
INT ldap_create_vlv_controlW(PLDAP,PLDAPVLVInfo,UCHAR,PLDAPControlW*);
#define ldap_create_vlv_control WINELIB_NAME_AW(ldap_create_vlv_control)
ULONG ldap_deleteA(LDAP*,PCHAR);
ULONG ldap_deleteW(LDAP*,PWCHAR);
......@@ -533,8 +546,8 @@ ULONG ldap_parse_resultW(LDAP*,LDAPMessage*,ULONG*,PWCHAR*,PWCHAR*,PWCHAR**,PLDA
ULONG ldap_parse_sort_controlA(LDAP*,PLDAPControlA*,ULONG*,PCHAR*);
ULONG ldap_parse_sort_controlW(LDAP*,PLDAPControlW*,ULONG*,PWCHAR*);
#define ldap_parse_sort_control WINELIB_NAME_AW(ldap_parse_sort_control)
int ldap_parse_vlv_controlA(LDAP*,LDAPControlA**,unsigned long*,unsigned long*,struct berval**,int*);
int ldap_parse_vlv_controlW(LDAP*,LDAPControlW**,unsigned long*,unsigned long*,struct berval**,int*);
int ldap_parse_vlv_controlA(LDAP*,PLDAPControlA*,unsigned long*,unsigned long*,struct berval**,int*);
int ldap_parse_vlv_controlW(LDAP*,PLDAPControlW*,unsigned long*,unsigned long*,struct berval**,int*);
#define ldap_parse_vlv_control WINELIB_NAME_AW(ldap_parse_vlv_control)
void ldap_perror(LDAP*,const PCHAR);
ULONG ldap_rename_extA(LDAP*,PCHAR,PCHAR,PCHAR,INT,PLDAPControlA*,PLDAPControlA*,ULONG*);
......@@ -593,7 +606,7 @@ LDAP *ldap_sslinitW(PWCHAR,ULONG,int);
ULONG ldap_start_tls_sA(LDAP*,PULONG,LDAPMessage**,PLDAPControlA*,PLDAPControlA*);
ULONG ldap_start_tls_sW(LDAP*,PULONG,LDAPMessage**,PLDAPControlW*,PLDAPControlW*);
#define ldap_start_tls_s WINELIB_NAME_AW(ldap_start_tls_s)
ULONG ldap_startup(LDAP_VERSION_INFO*,HANDLE*);
ULONG ldap_startup(PLDAP_VERSION_INFO,HANDLE*);
BOOLEAN ldap_stop_tls_s(LDAP*);
ULONG ldap_ufn2dnA(PCHAR,PCHAR*);
ULONG ldap_ufn2dnW(PWCHAR,PWCHAR*);
......@@ -624,4 +637,8 @@ ULONG LdapMapErrorToWin32(ULONG);
int LdapUnicodeToUTF8(LPCWSTR,int,LPSTR,int);
int LdapUTF8ToUnicode(LPCSTR,int,LPWSTR,int);
#ifdef __cplusplus
}
#endif
#endif /* __WINE_WINLDAP_H */
......@@ -5074,6 +5074,7 @@ void
%long
BOOLEAN
INT
HANDLE
UCHAR
......@@ -5085,17 +5086,20 @@ int
BerElement *
BERVAL *
CHAR **
HANDLE *
LDAPControlA *
LDAPControlA **
LDAPControlW *
LDAPControlW **
LDAPModA *[]
LDAPModW *[]
LDAP_TIMEVAL *
PBERVAL *
PCHAR *
PCHAR[]
PLDAP_VERSION_INFO
PLDAPControlA
PLDAPControlA *
PLDAPControlW
PLDAPControlW *
PLDAPSortKeyA *
PLDAPSortKeyW *
......@@ -5108,6 +5112,7 @@ WLDAP32_BerElement **
WLDAP32_LDAP *
WLDAP32_LDAPMessage *
WLDAP32_LDAPMessage **
WLDAP32_LDAPVLVInfo *
int *
struct WLDAP32_berval *
struct WLDAP32_berval **
......
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