1N/A/*
1N/A * Copyright (c) 2001 by Sun Microsystems, Inc.
1N/A * All rights reserved.
1N/A */
1N/A
1N/A#pragma ident "%Z%%M% %I% %E% SMI"
1N/A
1N/A/*
1N/A * The contents of this file are subject to the Netscape Public
1N/A * License Version 1.1 (the "License"); you may not use this file
1N/A * except in compliance with the License. You may obtain a copy of
1N/A * the License at http://www.mozilla.org/NPL/
1N/A *
1N/A * Software distributed under the License is distributed on an "AS
1N/A * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
1N/A * implied. See the License for the specific language governing
1N/A * rights and limitations under the License.
1N/A *
1N/A * The Original Code is Mozilla Communicator client code, released
1N/A * March 31, 1998.
1N/A *
1N/A * The Initial Developer of the Original Code is Netscape
1N/A * Communications Corporation. Portions created by Netscape are
1N/A * Copyright (C) 1998-1999 Netscape Communications Corporation. All
1N/A * Rights Reserved.
1N/A *
1N/A * Contributor(s):
1N/A */
1N/A
1N/A/*
1N/A * Copyright (c) 1993, 1994 Regents of the University of Michigan.
1N/A * All rights reserved.
1N/A *
1N/A * Redistribution and use in source and binary forms are permitted
1N/A * provided that this notice is preserved and that due credit is given
1N/A * to the University of Michigan at Ann Arbor. The name of the University
1N/A * may not be used to endorse or promote products derived from this
1N/A * software without specific prior written permission. This software
1N/A * is provided ``as is'' without express or implied warranty.
1N/A *
1N/A * searchpref.h: display template library defines
1N/A */
1N/A
1N/A
1N/A#ifndef _SRCHPREF_H
1N/A#define _SRCHPREF_H
1N/A
1N/A#ifdef __cplusplus
1N/Aextern "C" {
1N/A#endif
1N/A
1N/A/* calling conventions used by library */
1N/A#ifndef LDAP_CALL
1N/A#if defined( _WINDOWS ) || defined( _WIN32 )
1N/A#define LDAP_C __cdecl
1N/A#ifndef _WIN32
1N/A#define __stdcall _far _pascal
1N/A#define LDAP_CALLBACK _loadds
1N/A#else
1N/A#define LDAP_CALLBACK
1N/A#endif /* _WIN32 */
1N/A#define LDAP_PASCAL __stdcall
1N/A#define LDAP_CALL LDAP_PASCAL
1N/A#else /* _WINDOWS */
1N/A#define LDAP_C
1N/A#define LDAP_CALLBACK
1N/A#define LDAP_PASCAL
1N/A#define LDAP_CALL
1N/A#endif /* _WINDOWS */
1N/A#endif /* LDAP_CALL */
1N/A
1N/A#ifndef _SOLARIS_SDK
1N/A
1N/Astruct ldap_searchattr {
1N/A char *sa_attrlabel;
1N/A char *sa_attr;
1N/A /* max 32 matchtypes for now */
1N/A unsigned long sa_matchtypebitmap;
1N/A char *sa_selectattr;
1N/A char *sa_selecttext;
1N/A struct ldap_searchattr *sa_next;
1N/A};
1N/A
1N/Astruct ldap_searchmatch {
1N/A char *sm_matchprompt;
1N/A char *sm_filter;
1N/A struct ldap_searchmatch *sm_next;
1N/A};
1N/A
1N/Astruct ldap_searchobj {
1N/A char *so_objtypeprompt;
1N/A unsigned long so_options;
1N/A char *so_prompt;
1N/A short so_defaultscope;
1N/A char *so_filterprefix;
1N/A char *so_filtertag;
1N/A char *so_defaultselectattr;
1N/A char *so_defaultselecttext;
1N/A struct ldap_searchattr *so_salist;
1N/A struct ldap_searchmatch *so_smlist;
1N/A struct ldap_searchobj *so_next;
1N/A};
1N/A
1N/A#define NULLSEARCHOBJ ((struct ldap_searchobj *)0)
1N/A
1N/A/*
1N/A * global search object options
1N/A */
1N/A#define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
1N/A
1N/A#define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \
1N/A (((so)->so_options & option ) != 0 )
1N/A
1N/A#define LDAP_SEARCHPREF_VERSION_ZERO 0
1N/A#define LDAP_SEARCHPREF_VERSION 1
1N/A
1N/A#define LDAP_SEARCHPREF_ERR_VERSION 1
1N/A#define LDAP_SEARCHPREF_ERR_MEM 2
1N/A#define LDAP_SEARCHPREF_ERR_SYNTAX 3
1N/A#define LDAP_SEARCHPREF_ERR_FILE 4
1N/A
1N/A
1N/ALDAP_API(int)
1N/ALDAP_CALL
1N/Aldap_init_searchprefs( char *file, struct ldap_searchobj **solistp );
1N/A
1N/ALDAP_API(int)
1N/ALDAP_CALL
1N/Aldap_init_searchprefs_buf( char *buf, long buflen,
1N/A struct ldap_searchobj **solistp );
1N/A
1N/ALDAP_API(void)
1N/ALDAP_CALL
1N/Aldap_free_searchprefs( struct ldap_searchobj *solist );
1N/A
1N/ALDAP_API(struct ldap_searchobj *)
1N/ALDAP_CALL
1N/Aldap_first_searchobj( struct ldap_searchobj *solist );
1N/A
1N/ALDAP_API(struct ldap_searchobj *)
1N/ALDAP_CALL
1N/Aldap_next_searchobj( struct ldap_searchobj *sollist,
1N/A struct ldap_searchobj *so );
1N/A
1N/A#endif /* _SOLARIS_SDK */
1N/A
1N/A#ifdef __cplusplus
1N/A}
1N/A#endif
1N/A#endif /* _SRCHPREF_H */