ReactOS 0.4.15-dev-7953-g1f49173
page.c File Reference
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winldap_private.h"
#include "wldap32.h"
#include "wine/debug.h"
Include dependency graph for page.c:

Go to the source code of this file.

Macros

#define LDAP_MAXINT   2147483647
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (wldap32)
 
ULONG CDECL ldap_create_page_controlA (WLDAP32_LDAP *ld, ULONG pagesize, struct WLDAP32_berval *cookie, UCHAR critical, PLDAPControlA *control)
 
ULONG CDECL ldap_create_page_controlW (WLDAP32_LDAP *ld, ULONG pagesize, struct WLDAP32_berval *cookie, UCHAR critical, PLDAPControlW *control)
 
ULONG CDECL ldap_get_next_page (WLDAP32_LDAP *ld, PLDAPSearch search, ULONG pagesize, ULONG *message)
 
ULONG CDECL ldap_get_next_page_s (WLDAP32_LDAP *ld, PLDAPSearch search, struct l_timeval *timeout, ULONG pagesize, ULONG *count, WLDAP32_LDAPMessage **results)
 
ULONG CDECL ldap_get_paged_count (WLDAP32_LDAP *ld, PLDAPSearch search, ULONG *count, WLDAP32_LDAPMessage *results)
 
ULONG CDECL ldap_parse_page_controlA (WLDAP32_LDAP *ld, PLDAPControlA *ctrls, ULONG *count, struct WLDAP32_berval **cookie)
 
ULONG CDECL ldap_parse_page_controlW (WLDAP32_LDAP *ld, PLDAPControlW *ctrls, ULONG *count, struct WLDAP32_berval **cookie)
 
ULONG CDECL ldap_search_abandon_page (WLDAP32_LDAP *ld, PLDAPSearch search)
 
PLDAPSearch CDECL ldap_search_init_pageA (WLDAP32_LDAP *ld, PCHAR dn, ULONG scope, PCHAR filter, PCHAR attrs[], ULONG attrsonly, PLDAPControlA *serverctrls, PLDAPControlA *clientctrls, ULONG timelimit, ULONG sizelimit, PLDAPSortKeyA *sortkeys)
 
PLDAPSearch CDECL ldap_search_init_pageW (WLDAP32_LDAP *ld, PWCHAR dn, ULONG scope, PWCHAR filter, PWCHAR attrs[], ULONG attrsonly, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG timelimit, ULONG sizelimit, PLDAPSortKeyW *sortkeys)
 

Macro Definition Documentation

◆ LDAP_MAXINT

#define LDAP_MAXINT   2147483647

Definition at line 29 of file page.c.

Function Documentation

◆ ldap_create_page_controlA()

ULONG CDECL ldap_create_page_controlA ( WLDAP32_LDAP ld,
ULONG  pagesize,
struct WLDAP32_berval cookie,
UCHAR  critical,
PLDAPControlA control 
)

Definition at line 47 of file page.c.

49{
51#ifdef HAVE_LDAP
53
54 TRACE( "(%p, 0x%08x, %p, 0x%02x, %p)\n", ld, pagesize, cookie,
55 critical, control );
56
57 if (!ld || !control || pagesize > LDAP_MAXINT)
59
60 ret = ldap_create_page_controlW( ld, pagesize, cookie, critical, &controlW );
61 if (ret == LDAP_SUCCESS)
62 {
63 *control = controlWtoA( controlW );
65 }
66
67#endif
68 return ret;
69}
#define NULL
Definition: types.h:112
ULONG CDECL ldap_control_freeW(LDAPControlW *control)
Definition: control.c:67
ULONG CDECL ldap_create_page_controlW(WLDAP32_LDAP *ld, ULONG pagesize, struct WLDAP32_berval *cookie, UCHAR critical, PLDAPControlW *control)
Definition: page.c:144
#define LDAP_MAXINT
Definition: page.c:29
static const WCHAR controlW[]
Definition: actctx.c:658
#define TRACE(s)
Definition: solgame.cpp:4
Definition: cookie.c:34
uint32_t ULONG
Definition: typedefs.h:59
int ret
#define LDAP_SUCCESS
Definition: winldap.h:59
@ WLDAP32_LDAP_PARAM_ERROR
@ WLDAP32_LDAP_NOT_SUPPORTED

◆ ldap_create_page_controlW()

ULONG CDECL ldap_create_page_controlW ( WLDAP32_LDAP ld,
ULONG  pagesize,
struct WLDAP32_berval cookie,
UCHAR  critical,
PLDAPControlW control 
)

Definition at line 144 of file page.c.

146{
147#ifdef HAVE_LDAP
148 TRACE( "(%p, 0x%08x, %p, 0x%02x, %p)\n", ld, pagesize, cookie,
149 critical, control );
150
151 if (!ld || !control || pagesize > LDAP_MAXINT)
153
154 return create_page_control( pagesize, cookie, critical, control );
155
156#else
158#endif
159}

Referenced by ldap_create_page_controlA().

◆ ldap_get_next_page()

ULONG CDECL ldap_get_next_page ( WLDAP32_LDAP ld,
PLDAPSearch  search,
ULONG  pagesize,
ULONG message 
)

Definition at line 161 of file page.c.

163{
164 FIXME( "(%p, %p, 0x%08x, %p)\n", ld, search, pagesize, message );
165
166 if (!ld) return ~0u;
168}
#define FIXME(fmt,...)
Definition: debug.h:111
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
static short search(int val, const short *table, int size)
Definition: msg711.c:255
Definition: tftpd.h:60

◆ ldap_get_next_page_s()

ULONG CDECL ldap_get_next_page_s ( WLDAP32_LDAP ld,
PLDAPSearch  search,
struct l_timeval timeout,
ULONG  pagesize,
ULONG count,
WLDAP32_LDAPMessage **  results 
)

Definition at line 170 of file page.c.

173{
174 FIXME( "(%p, %p, %p, 0x%08x, %p, %p)\n", ld, search, timeout,
175 pagesize, count, results );
176
177 if (!ld) return ~0u;
179}
static struct _test_info results[8]
Definition: SetCursorPos.c:31
GLuint GLuint GLsizei count
Definition: gl.h:1545
Definition: dhcpd.h:245

◆ ldap_get_paged_count()

ULONG CDECL ldap_get_paged_count ( WLDAP32_LDAP ld,
PLDAPSearch  search,
ULONG count,
WLDAP32_LDAPMessage results 
)

Definition at line 181 of file page.c.

183{
185#ifdef HAVE_LDAP
186 FIXME( "(%p, %p, %p, %p)\n", ld, search, count, results );
187
188 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
189 /* FIXME: save the cookie from the server here */
190
191#endif
192 return ret;
193}

◆ ldap_parse_page_controlA()

ULONG CDECL ldap_parse_page_controlA ( WLDAP32_LDAP ld,
PLDAPControlA ctrls,
ULONG count,
struct WLDAP32_berval **  cookie 
)

Definition at line 198 of file page.c.

200{
202#ifdef HAVE_LDAP
203 LDAPControlW **ctrlsW = NULL;
204
205 TRACE( "(%p, %p, %p, %p)\n", ld, ctrls, count, cookie );
206
207 if (!ld || !ctrls || !count || !cookie)
209
210 ctrlsW = controlarrayAtoW( ctrls );
211 if (!ctrlsW) return WLDAP32_LDAP_NO_MEMORY;
212
213 ret = ldap_parse_page_controlW( ld, ctrlsW, count, cookie );
214 controlarrayfreeW( ctrlsW );
215
216#endif
217 return ret;
218}
ULONG CDECL ldap_parse_page_controlW(WLDAP32_LDAP *ld, PLDAPControlW *ctrls, ULONG *count, struct WLDAP32_berval **cookie)
Definition: page.c:223
@ WLDAP32_LDAP_NO_MEMORY

◆ ldap_parse_page_controlW()

ULONG CDECL ldap_parse_page_controlW ( WLDAP32_LDAP ld,
PLDAPControlW ctrls,
ULONG count,
struct WLDAP32_berval **  cookie 
)

Definition at line 223 of file page.c.

225{
227#ifdef HAVE_LDAP
228 LDAPControlW *control = NULL;
229 BerElement *ber;
231 ULONG i;
232
233 TRACE( "(%p, %p, %p, %p)\n", ld, ctrls, count, cookie );
234
235 if (!ld || !ctrls || !count || !cookie)
237
238 for (i = 0; ctrls[i]; i++)
239 {
240 if (!lstrcmpW( LDAP_PAGED_RESULT_OID_STRING_W, ctrls[i]->ldctl_oid ))
241 control = ctrls[i];
242 }
243
244 if (!control)
246
247 ber = ber_init( &((LDAPControl *)control)->ldctl_value );
248 if (!ber)
250
251 tag = ber_scanf( ber, "{iO}", count, cookie );
252 if ( tag == LBER_ERROR )
254 else
256
257 ber_free( ber, 1 );
258
259#endif
260 return ret;
261}
#define LBER_ERROR
Definition: ber.c:32
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
Definition: ecma_167.h:138
WINBERAPI void ber_free(BerElement *, int)
WINBERAPI BerElement * ber_init(const BerValue *)
ULONG ber_tag_t
Definition: winber.h:38
WINBERAPI ber_tag_t ber_scanf(BerElement *, const char *,...)
#define LDAPControl
Definition: winldap.h:620
#define LDAP_PAGED_RESULT_OID_STRING_W
Definition: winldap.h:214
@ WLDAP32_LDAP_DECODING_ERROR
@ WLDAP32_LDAP_SUCCESS
@ WLDAP32_LDAP_CONTROL_NOT_FOUND

Referenced by ldap_parse_page_controlA().

◆ ldap_search_abandon_page()

ULONG CDECL ldap_search_abandon_page ( WLDAP32_LDAP ld,
PLDAPSearch  search 
)

Definition at line 263 of file page.c.

264{
265 FIXME( "(%p, %p)\n", ld, search );
266
267 if (!ld) return ~0u;
269}

◆ ldap_search_init_pageA()

PLDAPSearch CDECL ldap_search_init_pageA ( WLDAP32_LDAP ld,
PCHAR  dn,
ULONG  scope,
PCHAR  filter,
PCHAR  attrs[],
ULONG  attrsonly,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
ULONG  timelimit,
ULONG  sizelimit,
PLDAPSortKeyA sortkeys 
)

Definition at line 271 of file page.c.

274{
275 FIXME( "(%p, %s, 0x%08x, %s, %p, 0x%08x)\n", ld, debugstr_a(dn),
276 scope, debugstr_a(filter), attrs, attrsonly );
277 return NULL;
278}
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005
#define debugstr_a
Definition: kernel32.h:31

◆ ldap_search_init_pageW()

PLDAPSearch CDECL ldap_search_init_pageW ( WLDAP32_LDAP ld,
PWCHAR  dn,
ULONG  scope,
PWCHAR  filter,
PWCHAR  attrs[],
ULONG  attrsonly,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
ULONG  timelimit,
ULONG  sizelimit,
PLDAPSortKeyW sortkeys 
)

Definition at line 280 of file page.c.

283{
284 FIXME( "(%p, %s, 0x%08x, %s, %p, 0x%08x)\n", ld, debugstr_w(dn),
285 scope, debugstr_w(filter), attrs, attrsonly );
286 return NULL;
287}
#define debugstr_w
Definition: kernel32.h:32

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( wldap32  )