home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ldapsdk.zip / include / srchpref.h < prev    next >
C/C++ Source or Header  |  2001-06-02  |  3KB  |  105 lines

  1. /* $OpenLDAP: pkg/ldap/include/srchpref.h,v 1.7.6.4 2001/06/02 00:33:03 kurt Exp $ */
  2. /*
  3.  * Copyright 1998-2001 The OpenLDAP Foundation, Redwood City, California, USA
  4.  * All rights reserved.
  5.  *
  6.  * Redistribution and use in source and binary forms, with or without
  7.  * modification, are permitted only as authorized by the OpenLDAP
  8.  * Public License.  A copy of this license is available at
  9.  * http://www.OpenLDAP.org/license.html or in file LICENSE in the
  10.  * top-level directory of the distribution.
  11.  */
  12. /* Portions
  13.  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  14.  * All rights reserved.
  15.  *
  16.  * Redistribution and use in source and binary forms are permitted
  17.  * provided that this notice is preserved and that due credit is given
  18.  * to the University of Michigan at Ann Arbor. The name of the University
  19.  * may not be used to endorse or promote products derived from this
  20.  * software without specific prior written permission. This software
  21.  * is provided ``as is'' without express or implied warranty.
  22.  *
  23.  * searchpref.h:  display template library defines
  24.  * 16 May 1994 by Gordon Good
  25.  */
  26.  
  27.  
  28. #ifndef _SRCHPREF_H
  29. #define _SRCHPREF_H
  30.  
  31. #include <ldap_cdefs.h>
  32.  
  33. LDAP_BEGIN_DECL
  34.  
  35. struct ldap_searchattr {
  36.     char                *sa_attrlabel;
  37.     char                *sa_attr;
  38.                     /* max 32 matchtypes for now */
  39.     unsigned long            sa_matchtypebitmap;
  40.     char                *sa_selectattr;
  41.     char                *sa_selecttext;
  42.     struct ldap_searchattr        *sa_next;
  43. };
  44.  
  45. struct ldap_searchmatch {
  46.     char                *sm_matchprompt;
  47.     char                *sm_filter;
  48.     struct ldap_searchmatch        *sm_next;
  49. };
  50.  
  51. struct ldap_searchobj {
  52.     char                *so_objtypeprompt;
  53.     unsigned long            so_options;
  54.     char                *so_prompt;
  55.     short                so_defaultscope;
  56.     char                *so_filterprefix;
  57.     char                *so_filtertag;
  58.     char                *so_defaultselectattr;
  59.     char                *so_defaultselecttext;
  60.     struct ldap_searchattr        *so_salist;
  61.     struct ldap_searchmatch        *so_smlist;
  62.     struct ldap_searchobj        *so_next;
  63. };
  64.  
  65. /*
  66.  * global search object options
  67.  */
  68. #define LDAP_SEARCHOBJ_OPT_INTERNAL    0x00000001
  69.  
  70. #define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option )    \
  71.     (((so)->so_options & (option) ) != 0 )
  72.  
  73. #define LDAP_SEARCHPREF_VERSION_ZERO    0
  74. #define LDAP_SEARCHPREF_VERSION        1
  75.  
  76. #define LDAP_SEARCHPREF_ERR_VERSION    1
  77. #define LDAP_SEARCHPREF_ERR_MEM        2
  78. #define LDAP_SEARCHPREF_ERR_SYNTAX    3
  79. #define LDAP_SEARCHPREF_ERR_FILE    4
  80.  
  81.  
  82. LDAP_F( int )
  83. ldap_init_searchprefs LDAP_P(( char *file,
  84.     struct ldap_searchobj **solistp ));
  85.  
  86. LDAP_F( int )
  87. ldap_init_searchprefs_buf LDAP_P(( char *buf,
  88.     ber_len_t buflen,
  89.     struct ldap_searchobj **solistp ));
  90.  
  91. LDAP_F( void )
  92. ldap_free_searchprefs LDAP_P(( struct ldap_searchobj *solist ));
  93.  
  94. LDAP_F( struct ldap_searchobj * )
  95. ldap_first_searchobj LDAP_P(( struct ldap_searchobj *solist ));
  96.  
  97. LDAP_F( struct ldap_searchobj * )
  98. ldap_next_searchobj LDAP_P(( struct ldap_searchobj *sollist,
  99.     struct ldap_searchobj *so ));
  100.  
  101.  
  102. LDAP_END_DECL
  103.  
  104. #endif /* _SRCHPREF_H */
  105.