Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.7 KiB

  1. /*
  2. * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms are permitted
  6. * provided that this notice is preserved and that due credit is given
  7. * to the University of Michigan at Ann Arbor. The name of the University
  8. * may not be used to endorse or promote products derived from this
  9. * software without specific prior written permission. This software
  10. * is provided ``as is'' without express or implied warranty.
  11. *
  12. * searchpref.h: display template library defines
  13. * 16 May 1994 by Gordon Good
  14. */
  15. #ifndef _SRCHPREF_H
  16. #define _SRCHPREF_H
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. struct ldap_searchattr {
  21. char *sa_attrlabel;
  22. char *sa_attr;
  23. /* max 32 matchtypes for now */
  24. unsigned long sa_matchtypebitmap;
  25. char *sa_selectattr;
  26. char *sa_selecttext;
  27. struct ldap_searchattr *sa_next;
  28. };
  29. struct ldap_searchmatch {
  30. char *sm_matchprompt;
  31. char *sm_filter;
  32. struct ldap_searchmatch *sm_next;
  33. };
  34. struct ldap_searchobj {
  35. char *so_objtypeprompt;
  36. unsigned long so_options;
  37. char *so_prompt;
  38. short so_defaultscope;
  39. char *so_filterprefix;
  40. char *so_filtertag;
  41. char *so_defaultselectattr;
  42. char *so_defaultselecttext;
  43. struct ldap_searchattr *so_salist;
  44. struct ldap_searchmatch *so_smlist;
  45. struct ldap_searchobj *so_next;
  46. };
  47. #define NULLSEARCHOBJ ((struct ldap_searchobj *)0)
  48. /*
  49. * global search object options
  50. */
  51. #define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
  52. #define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \
  53. (((so)->so_options & option ) != 0 )
  54. #define LDAP_SEARCHPREF_VERSION_ZERO 0
  55. #define LDAP_SEARCHPREF_VERSION 1
  56. #define LDAP_SEARCHPREF_ERR_VERSION 1
  57. #define LDAP_SEARCHPREF_ERR_MEM 2
  58. #define LDAP_SEARCHPREF_ERR_SYNTAX 3
  59. #define LDAP_SEARCHPREF_ERR_FILE 4
  60. #ifndef NEEDPROTOS
  61. int ldap_init_searchprefs();
  62. int ldap_init_searchprefs_buf();
  63. void ldap_free_searchprefs();
  64. struct ldap_searchobj *ldap_first_searchobj();
  65. struct ldap_searchobj *ldap_next_searchobj();
  66. #else /* !NEEDPROTOS */
  67. LDAPFUNCDECL int
  68. ldap_init_searchprefs( char *file, struct ldap_searchobj **solistp );
  69. LDAPFUNCDECL int
  70. ldap_init_searchprefs_buf( char *buf, long buflen,
  71. struct ldap_searchobj **solistp );
  72. LDAPFUNCDECL void
  73. ldap_free_searchprefs( struct ldap_searchobj *solist );
  74. LDAPFUNCDECL struct ldap_searchobj *
  75. ldap_first_searchobj( struct ldap_searchobj *solist );
  76. LDAPFUNCDECL struct ldap_searchobj *
  77. ldap_next_searchobj( struct ldap_searchobj *sollist,
  78. struct ldap_searchobj *so );
  79. #endif /* !NEEDPROTOS */
  80. #ifdef __cplusplus
  81. }
  82. #endif
  83. #endif /* _SRCHPREF_H */