syntax.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /** BEGIN COPYRIGHT BLOCK
  2. * Copyright 2001 Sun Microsystems, Inc.
  3. * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
  4. * All rights reserved.
  5. * END COPYRIGHT BLOCK **/
  6. /* syntax.h - string syntax definitions */
  7. #ifndef _LIBSYNTAX_H_
  8. #define _LIBSYNTAX_H_
  9. #define SLAPD_LOGGING 1
  10. #include "slap.h"
  11. #include "slapi-plugin.h"
  12. #include <dirlite_strings.h> /* PLUGIN_MAGIC_VENDOR_STR */
  13. #define SYNTAX_CIS 1
  14. #define SYNTAX_CES 2
  15. #define SYNTAX_TEL 4 /* telephone number: used with SYNTAX_CIS */
  16. #define SYNTAX_DN 8 /* distinguished name: used with SYNTAX_CIS */
  17. #define SYNTAX_SI 16 /* space insensitive: used with SYNTAX_CIS */
  18. #define SUBLEN 3
  19. #ifndef MIN
  20. #define MIN( a, b ) (a < b ? a : b )
  21. #endif
  22. int string_filter_sub( Slapi_PBlock *pb, char *initial, char **any, char *final,Slapi_Value **bvals, int syntax );
  23. int string_filter_ava( struct berval *bvfilter, Slapi_Value **bvals, int syntax,int ftype, Slapi_Value **retVal );
  24. int string_values2keys( Slapi_PBlock *pb, Slapi_Value **bvals,Slapi_Value ***ivals, int syntax, int ftype );
  25. int string_assertion2keys_ava(Slapi_PBlock *pb,Slapi_Value *val,Slapi_Value ***ivals,int syntax,int ftype );
  26. int string_assertion2keys_sub(Slapi_PBlock *pb,char *initial,char **any,char *final,Slapi_Value ***ivals,int syntax);
  27. int value_cmp(struct berval *v1,struct berval *v2,int syntax,int normalize);
  28. void value_normalize(char *s,int syntax,int trim_leading_blanks);
  29. char *first_word( char *s );
  30. char *next_word( char *s );
  31. char *phonetic( char *s );
  32. #endif