X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fsets.h;h=e1d0f0f55c75c917c6aaf999a9454047a18223df;hb=d1824b14ae78b128fb9ff6cf73d2ec4a0e756a90;hp=7346e12d80b77f0e2ecee425c0277159db803e65;hpb=2f6f6f6a0758a57d5ab5e76e7f6ecfc3fc0ee09d;p=openldap diff --git a/servers/slapd/sets.h b/servers/slapd/sets.h index 7346e12d80..e1d0f0f55c 100644 --- a/servers/slapd/sets.h +++ b/servers/slapd/sets.h @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2004 The OpenLDAP Foundation. + * Copyright 1998-2006 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -21,7 +21,7 @@ LDAP_BEGIN_DECL typedef struct slap_set_cookie { - struct slap_op *op; + struct slap_op *set_op; } SetCookie; /* this routine needs to return the bervals instead of @@ -38,7 +38,37 @@ LDAP_SLAPD_F (int) slap_set_filter( struct berval *user, struct berval *target, BerVarray *results); LDAP_SLAPD_F (BerVarray) slap_set_join(SetCookie *cp, - BerVarray lset, int op, BerVarray rset); + BerVarray lset, unsigned op, BerVarray rset); + +#define SLAP_SET_OPMASK 0x00FF + +#define SLAP_SET_REFARR 0x0100 +#define SLAP_SET_REFVAL 0x0200 +#define SLAP_SET_REF (SLAP_SET_REFARR|SLAP_SET_REFVAL) + +/* The unsigned "op" can be ORed with the flags below; + * - if the rset's values must not be freed, or must be copied if kept, + * it is ORed with SLAP_SET_RREFVAL + * - if the rset array must not be freed, or must be copied if kept, + * it is ORed with SLAP_SET_RREFARR + * - the same applies to the lset with SLAP_SET_LREFVAL and SLAP_SET_LREFARR + * - it is assumed that SLAP_SET_REFVAL implies SLAP_SET_REFARR, + * i.e. the former is checked only if the latter is defined. + */ + +#define SLAP_SET_RREFARR SLAP_SET_REFARR +#define SLAP_SET_RREFVAL SLAP_SET_REFVAL +#define SLAP_SET_RREF SLAP_SET_REF +#define SLAP_SET_RREFMASK 0x0F00 + +#define SLAP_SET_RREF2REF(r) ((r) & SLAP_SET_RREFMASK) + +#define SLAP_SET_LREFARR 0x1000 +#define SLAP_SET_LREFVAL 0x2000 +#define SLAP_SET_LREF (SLAP_SET_LREFARR|SLAP_SET_LREFVAL) +#define SLAP_SET_LREFMASK 0xF000 + +#define SLAP_SET_LREF2REF(r) (((r) & SLAP_SET_LREFMASK) >> 4) LDAP_END_DECL