/*
* Copyright (c) 2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/*
* Copyright (c) 1993, 1994 Regents of the University of Michigan.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of Michigan at Ann Arbor. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
*
* disptmpl.h: display template library defines
*/
#ifndef _DISPTMPL_H
#define _DISPTMPL_H
#ifdef __cplusplus
extern "C" {
#endif
/* calling conventions used by library */
#ifndef LDAP_CALL
#ifndef _WIN32
#else
#define LDAP_CALLBACK
#endif /* _WIN32 */
#else /* _WINDOWS */
#define LDAP_C
#define LDAP_CALLBACK
#define LDAP_PASCAL
#define LDAP_CALL
#endif /* _WINDOWS */
#endif /* LDAP_CALL */
#ifndef _SOLARIS_SDK
/*
* general types of items (confined to most significant byte)
*/
/*
* syntax options (confined to second most significant byte)
*/
/*
* display template item syntax ids (defined by common agreement)
* these are the valid values for the ti_syntaxid of the tmplitem
* struct (defined below). A general type is encoded in the
* most-significant 8 bits, and some options are encoded in the next
* 8 bits. The lower 16 bits are reserved for the distinct types.
*/
/*
* handy macros
*/
/*
* display options for output routines (used by entry2text and friends)
*/
/*
* use calculated label width (based on length of longest label in
* template) instead of contant width
*/
/*
* perform search actions (applies to ldap_entry2text_search only)
*/
/*
* include additional info. relevant to "non leaf" entries only
* used by ldap_entry2html and ldap_entry2html_search to include "Browse"
* and "Move Up" HREFs
*/
#endif /* ifndef _SOLARIS_SDK */
/*
* display template item options (may not apply to all types)
* if this bit is set in ti_options, it applies.
*/
#ifndef _SOLARIS_SDK
/*
* display template item structure
*/
struct ldap_tmplitem {
unsigned long ti_syntaxid;
unsigned long ti_options;
char *ti_attrname;
char *ti_label;
char **ti_args;
void *ti_appdata;
};
/*
* object class array structure
*/
struct ldap_oclist {
char **oc_objclasses;
};
/*
* add defaults list
*/
struct ldap_adddeflist {
int ad_source;
char *ad_attrname;
char *ad_value;
};
/*
* display template global options
* if this bit is set in dt_options, it applies.
*/
/*
* users should be allowed to try to add objects of these entries
*/
/*
* users should be allowed to do "modify RDN" operation of these entries
*/
/*
* this template is an alternate view, not a primary view
*/
/*
* display template structure
*/
struct ldap_disptmpl {
char *dt_name;
char *dt_pluralname;
char *dt_iconname;
unsigned long dt_options;
char *dt_authattrname;
char *dt_defrdnattrname;
char *dt_defaddlocation;
void *dt_appdata;
};
/*
* buffer size needed for entry2text and vals2text
*/
LDAP_API(int)
LDAP_API(int)
struct ldap_disptmpl **tmpllistp );
LDAP_API(void)
LDAP_API(struct ldap_disptmpl *)
LDAP_API(struct ldap_disptmpl *)
struct ldap_disptmpl *tmpl );
LDAP_API(struct ldap_disptmpl *)
LDAP_API(struct ldap_disptmpl *)
LDAP_API(char **)
unsigned long syntaxmask );
LDAP_API(struct ldap_tmplitem *)
LDAP_API(struct ldap_tmplitem *)
LDAP_API(struct ldap_tmplitem *)
LDAP_API(struct ldap_tmplitem *)
struct ldap_tmplitem *col );
LDAP_API(int)
unsigned long opts );
LDAP_API(int)
LDAP_API(int)
unsigned long opts );
LDAP_API(int)
LDAP_API(int)
LDAP_API(int)
#endif /* ifndef _SOLARIS_SDK */
LDAP_API(char *)
ldap_tmplerr2string( int err );
#ifdef __cplusplus
}
#endif
#endif /* _DISPTMPL_H */