[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#4314) C API for paged results
On Sunday 08 January 2006 19:16, Kurt D. Zeilenga wrote:
> I would like to this be reworked using ppolicy API as a basis than
Can you specify what you mean by "ppolicy API"? I presume you
mean taking a single control instead of an array?. And assert()ing
on faulty parameters maybe? Anything else?
I see a function ldap_parse_passwordpolicy_control() in ppolicy.c
that does inline berval parsing, which contrasts with what Pierangelo
said about splitting it up.
> the older sort/vlv control APIs (which should also be reworked).
> Parse routines shouldn't also find the control as this makes it
> harder to use in programs that include their own finding.
Hmm, anything else? ;-) So if I take into account what Pierangelo
and you wrote I arrive at the following API:
int
ldap_create_page_control(
LDAP *ld,
unsigned long pagesize,
struct berval *cookie,
int iscritical,
LDAPControl **ctrlp );
int
ldap_parse_page_control (
LDAP *ld,
LDAPControl *ctrls,
unsigned long *count,
struct berval *cookie );
Changes relative to the previous version:
- change iscritical from a "const char" to an "int".
- accept an "LDAPControl *" instead of an "LDAPControl **"
- return a "struct berval *" instead of a "struct berval **".
-Hans